include "IMSSql.php";
include "IMSLog.php";
include "IMSBase.php";
$statusArray = "";
$dataArray = "";
$sessionID = "";
$statusCode = 0;
try {
    $IMSBase = new IMSBase();
    $log = new IMSLog();
    $sql = new IMSSql();
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        $sessionID = $_POST["SID"];
    }
    //Set IMSLog options
    $opt_debugLog = $sql->getOption('Debug');
    if ($opt_debugLog === false) {
        $log->add_log($sessionID, 'Warning', 'CheckThresholds Warning: Debug Option missing or invalid.');
    } else {
        if ($opt_debugLog == 'False') {
            $log->opt_debug = false;
        } else {
            $log->opt_debug = true;
        }
    }
    $opt_logLoc = $sql->getOption('Log_File_Location');
    if ($opt_logLoc === false) {
        $log->add_log($sessionID, 'Warning', 'CheckThresholds Warning: Log_File_Location Option missing or invalid.');
    } else {
        $log->set_log_location($opt_logLoc);
    }
예제 #2
0
<?php

include "Back_End/IMSLog.php";
include "Back_End/IMSSql.php";
$ipaddress = "";
$date = "";
$message = "";
$SID = "";
$key = "";
$timeout = 3600;
//default is 1 hour (3600 seconds)
try {
    $log = new IMSLog();
    $sql = new IMSSql();
    //Set IMSLog options
    $opt_debugLog = $sql->getOption('Debug');
    if ($opt_debugLog === false) {
        $log->add_log("UNKNOWN", 'Warning', 'Default Warning: Debug Option missing or invalid.');
    } else {
        if ($opt_debugLog == 'False') {
            $log->opt_debug = false;
        } else {
            $log->opt_debug = true;
        }
    }
    //Get Credential Time out Option
    $opt_timeout = $sql->getOption('Credential_Expiry_Time_Seconds');
    $log->add_log("UNKNOWN", 'Warning', "Default Warning: {$opt_timeout}");
    if ($opt_timeout === false) {
        $log->add_log("UNKNOWN", 'Warning', 'Default Warning: Credential_Expiry_Time_Seconds Option missing or invalid.');
    } else {