/** * A static method to restart with a login screen, eventually displaying a custom message * * @static * * @param string $sMessage Optional message */ function restart($sMessage = '') { $_COOKIE['sessionID'] = phpAds_SessionStart(); OA_Auth::displayLogin($sMessage, $_COOKIE['sessionID']); }
function phpAds_Die($title = "Error", $message = "Unknown error") { if (defined('OA_WEBSERVICES_API_XMLRPC')) { // It's an XML-RPC response if (class_exists('XmlRpcUtils')) { $oResponse = XmlRpcUtils::generateError($message); } else { $oResponse = new XML_RPC_Response('', 99999, $message); } echo $oResponse->serialize(); exit; } $conf = $GLOBALS['_MAX']['CONF']; global $phpAds_GUIDone, $phpAds_TextDirection; $header = $title == $GLOBALS['strAccessDenied'] ? phpAds_Login : phpAds_Error; // Header if ($phpAds_GUIDone == false) { if (!isset($phpAds_TextDirection)) { $phpAds_TextDirection = 'ltr'; } phpAds_PageHeader(phpAds_Error); } echo "<br>"; echo "<div class='errormessage'><img class='errormessage' src='" . OX::assetPath() . "/images/errormessage.gif' align='absmiddle'> "; echo "<span class='tab-r'>" . $title . "</span><br><br>" . $message . "</div><br>"; // Die if ($header == phpAds_Login) { $_COOKIE['sessionID'] = phpAds_SessionStart(); OA_Auth::displayLogin('', $_COOKIE['sessionID'], true); } phpAds_PageFooter(); exit; }