registerFunction("x_setservicemasquerade"); session_start(); $user = $_SESSION['user']; $in_xAjax = false; $xAjax_objResponse; $NoInactivityTimer = true; // Set so the xajax calls don't look at the inactivity timer. include('user_inc.htm'); // Note: This must be here to beable to use the error_handler function x_setservicemasquerade($bmasquerade) { global $in_xAjax; global $xAjax_objResponse; $user = $_SESSION['user']; $xAjax_objResponse = new xajaxResponse(); $in_xAjax = true; // This must be called because we set NoInactivityTimer to true because of xajax loading the page behind the sheets. // Which causes an xajax XML error if the user is redirected to the login page durring the xajax call setup. // If we are logged out this function will reload the page which will take the user back to the login page. CheckLoggedOut(); error_log("xajax calling setservicemasquerade( $user, $bmasquerade );"); error_log( "user = " . print_r($user, true ) ); @setservicemasquerade( $user, ($bmasquerade == 'false' ? false:true) ); if( $bmasquerade == 'true' ) // make sure we actually set the masquerade bit { $retval = @getservicemasquerade(); if( $retval->bmasquerade ) { $xAjax_objResponse->script('loadHomePage();'); //$xAjax_objResponse->script('setTimeout("loadHomePage()", 200);'); } else { $xAjax_objResponse->script('confirm("Unable to perform Diagnostics at this time");'); } } else // just clearing the flag { $xAjax_objResponse->script('loadHomePage();'); //$xAjax_objResponse->script('setTimeout("loadHomePage()", 200);'); } $in_xAjax = false; return $xAjax_objResponse; } $xajax->processRequest(); /*******************************************************************************************/ // The @ before the calls thell php NOT to call the default Error handler if an error occues. // If the default error handler is called then the menu code never runs and the user has no menus to select Capture Snapshot etc... $libReady = @is_library_ready($user); $libState = @get_library_state($user); $libStateString = @get_library_state_string($user); $ChassisList = @get_chassis($user); $numChassis = sizeof($ChassisList); error_log( "\n\n\nlibReady = $libReady\n". "libState = $libState\n" . "libStateString = $libStateString\n" . "Number of Chassis = $numChassis\n\n\n"); ?> printJavascript(); ?> role == SERVICE_ROLE ) { echo ""; } else if( $user->role == ADMIN_ROLE ) { // admin role $masqinfo = getservicemasquerade(); if( $masqinfo->bmasquerade == true ) { error_log("topFrame loading Diagnostics Menu"); echo ""; } else { echo ""; } } else if( $user->role == USER_ROLE ) { // user role echo ""; } ?>
border="0">   "; else if( $Brand != "tandberg" ) echo "". LIBTYPE_NAME .""; else echo '   '; ?> Library is NOT initialized "; else { switch($libState) { case 0: $sTmp = "Library is not ready."; break; case 1: $sTmp = ""; // Library is Ready - We don't show anything break; case 2: $sTmp = "Library is becoming ready."; break; case 3: $sTmp = "Library needs manual attention."; break; case 4: $sTmp = "Library's door is open."; break; case 5: $sTmp = "Library has not calibrated"; break; } echo " ". $sTmp ." "; } ?>
  User: username [$user->role]" ?>