$srvarray='SERVER01 SERVER02 SERVER03 SERVER04' $srvarray=$srvarray+' SERVER05 SERVER06' FOR EACH $i IN Split($srvarray) ?'Checking Server: '+$i SHELL '%COMSPEC% /C PING -n 1 '+$i IF @error<>0 $rc=WRITEVALUE('HKCU\Software\KiXtart',$i,$i,'REG_SZ') ;Notify server is off-line MAILER('Offline',$i,'Server is off-line') ELSE IF ''<>READVALUE('HKCU\Software\KiXtart',$i) ;Notify back on line MAILER('Online',$i,'Server is online') $rc=DELVALUE('HKCU\Software\KiXtart',$i) ENDIF ENDIF NEXT FUNCTION MAILER($status,$server,$body) BREAK ON $mailhost = 'smtp.company.com' $recipient = 'admin@@company.com' $sender = 'ServerMonitor@@company.com' $mailline = @ldrive+'Programs\blat.exe - -to $recipient -server $mailhost -subject "$server $status" ' $mailline = $mailline+'-body "$body" -f $sender -q' SHELL $mailline ENDFUNCTION
Generated in 0.058 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.
") !=-1) { tempah=tempah.substring(tempah.indexOf("")+5,tempah.indexOf("")); codes[i].innerHTML="" + dotag(tempah.substring()) + ""; } } //var pres = document.getElementsByTagName("pre"); //for (var i=0, maxi = pres.length; i < maxi; i++) { // var tempah = pres[i].innerHTML; // if (tempah.indexOf("[postprep") !=-1) { // tempah=tempah.substring((tempah.indexOf("]",tempah.indexOf("[postprep"))+1)); // pres[i].innerHTML=dotag(tempah); // } //} function ytag(which_one) { var codes = document.getElementsByClassName("ubbcode-body"); var thisone = codes[which_one].innerHTML; codes[which_one].innerHTML = "" + dotag(thisone.substring(5+thisone.indexOf(""),thisone.indexOf(""))) + ""; var heads = document.getElementsByClassName("ubbcode-header"); heads[which_one].innerHTML = "Code:" + ' '; } function ttag(which_one) { var codes = document.getElementsByClassName("ubbcode-body"); var thisone = ""; if (codes[which_one].innerText != undefined) { thisone += codes[which_one].innerText; } else { thisone += codes[which_one].textContent; } codes[which_one].innerHTML = thisone + ""; var heads = document.getElementsByClassName("ubbcode-header"); heads[which_one].innerHTML = "Code:" + ' '; }
")+5,tempah.indexOf("
" + dotag(tempah.substring()) + "
" + dotag(thisone.substring(5+thisone.indexOf(""),thisone.indexOf(""))) + "
"),thisone.indexOf("
"; if (codes[which_one].innerText != undefined) { thisone += codes[which_one].innerText; } else { thisone += codes[which_one].textContent; } codes[which_one].innerHTML = thisone + "