registerFunction("getEKM"); session_start(); $user = $_SESSION['user']; $in_xAjax = false; $xAjax_objResponse; include('common_admin_inc.htm'); $akmResult = akm_get_error_codes(); //error_log("akm_get_errorcodes = ". print_r($akmResult,true) ); class EKMdata { var $primaryIP; var $primaryPort; // default is 3801 (decimal) var $secondaryIP; var $secondaryPort; // default is 3801 (decimal) function EKMdata( $primaryIP, $primaryPort, $secondaryIP, $secondaryPort ) { $this->primaryIP = $primaryIP; $this->primaryPort = $primaryPort; $this->secondaryIP = $secondaryIP; $this->secondaryPort = $secondaryPort; } }; function getEKM() { // !?! NOTE: Not using this function - but I left it in case I wanted to switch to using it in the future. global $in_xAjax; // global $xAjax_objResponse; $user = $_SESSION['user']; $xAjax_objResponse = new xajaxResponse(); /// $in_xAjax = true; error_log("Calling get_ekm($user);"); $ekm_data = get_ekm( $user ); error_log("ekm_data = ". print_r($ekm_data, true) ); $xAjax_objResponse->assign("primIP", "value", $ekm_data->primaryIP ); $xAjax_objResponse->assign("primPort", "value", $ekm_data->primaryPort ); $xAjax_objResponse->assign("secIP", "value", $ekm_data->secondaryIP ); $xAjax_objResponse->assign("secPort", "value", $ekm_data->secondaryPort ); // Some Debug examples //$xAjax_objResponse->script('alert(xajax.$("testlevel[1]").value);'); //$xAjax_objResponse->script('alert(xajax.viewSource());'); /// $in_xAjax = false; return $xAjax_objResponse; } $xajax->processRequest(); /*******************************************************************************************/ // Handle the progress screen if opened and set the NEW data if ($_SERVER[REQUEST_METHOD] == "POST") { $operationInProgress = true; $status = new ReturnStatus(); // By calling this here on all the SKM pages during the post the will all get the same error. $iAkmReady = akm_servers_available($user, true); // $iAkmReady = (akm_servers_available($user) == 1); error_log("akm_servers_available returned: ". print_r($iAkmReady, true)); error_log($_SERVER['REQUEST_URI']." POST = ". print_r($_POST, true) ); print $status->out(); return; } else { //$akmServAvail = (@akm_servers_available($user) == 1); $akmServAvail = akm_servers_available($user); if( $akmServAvail == 1 ) { // Load the data up on the get of the page. $ver = akm_get_software_version($user); //!?! This has Code that checks for the new Townsedn code over the OLD error_log("akm_get_software_version returned ". print_r($ver,true) ); } } error_log("$akmStatus->status != $akmResult->StatusFinished"); if( $akmStatus->status == $akmResult->StatusFinished || $akmStatus->status == $akmResult->StatusNotStarted ) $libBusy = false; else $libBusy = true; // See if the policy has been enabled, if so get it's info. !?! $bExpPolicy = true; $relExpDate = 365; // One Year //Now covert the relitive experation date to Year, Month and Day $expYear = 2; $expMonth = 6; $expDay = 15; // Should expired keys be served? $bServeExpKeys = true; // What is the Delyed Exieration alert $delayAlert = 2; // Weekly ?>
$xajax->printJavascript(); ?>