示例#1
0
 public function archivemessagesAction()
 {
     $auth = Zend_Auth::getInstance();
     $lic = $_REQUEST['lic'];
     if ($lic != $_SESSION['OPENZISKEYHOLE']) {
         $this->view->msg = 'Not Ajax Request';
         $this->_forward('error', 'error');
     } else {
         if ($auth->hasIdentity()) {
             if (!$this->getRequest()->isXmlHttpRequest()) {
                 $this->view->msg = 'Not Ajax Request';
                 $this->_forward('error', 'error');
             } else {
                 Zit::ArchiveMessages();
                 $this->render('ajaxsuccessjson');
             }
         } else {
             if (!$this->getRequest()->isXmlHttpRequest()) {
                 $this->view->msg = 'Not Ajax Request';
                 $this->_forward('error', 'error');
             } else {
                 $this->view->msg = 'errors:{reason:"Invalid User"}';
                 $this->_forward('error', 'error');
             }
         }
     }
 }
示例#2
0
 public static function checkIfZitIsSleeping($dom)
 {
     if (Zit::isAsleep()) {
         /* todo: Should create a SIF_MESSAGE_TYPE for errors */
         $_SESSION['SIF_MESSAGE_TYPE'] = 1;
         $headerNode = $dom->getElementsByTagName('SIF_Header')->item(0);
         $originalMsgId = $headerNode->getElementsByTagName('SIF_MsgId')->item(0)->nodeValue;
         $originalSourceId = $headerNode->getElementsByTagName('SIF_SourceId')->item(0)->nodeValue;
         $timestamp = Utility::createTimestamp();
         $msgId = Utility::createMessageId();
         $sifMessageNode = $dom->getElementsByTagName('SIF_Message')->item(0);
         XmlHelper::buildSuccessMessage($msgId, $timestamp, $originalSourceId, $originalMsgId, 8, $originalMsg = null, $desc = 'Receiver is sleeping');
         exit;
     }
 }
示例#3
0
        break;
}
header('Content-Type: application/xml;charset="utf-8"');
header('Server: ' . Zit::getSourceId());
$config = new Zend_Config_Ini('../config.ini', 'zit_config');
$codeLevel = $config->code->level;
$vendorName = $config->vendor->name;
$vendorVersion = $config->vendor->version;
$vendorProduct = $config->vendor->product;
$zoneUrlIndex = $config->zone->url->location;
define('CODELEVEL', $codeLevel);
define('VENDOR_NAME', $vendorName);
define('VENDOR_VERSION', $vendorVersion);
define('VENDOR_PRODUCT', $vendorProduct);
define('ZONE_URL_INDEX', $zoneUrlIndex);
define('SERVER_SOURCE_ID', Zit::getSourceId());
/* Proper Values for SIF_VALIDATE
** 	Y : Validate and Send Error and Log Error
**  N : No Validate and Pass Message
**  W : Validate and Pass Message and Log Error
*/
define('SIF_VALIDATE', 'W');
//global $USERNAME;
if ($config->code->level == 2) {
    ini_set('error_reporting', E_ALL & ~E_STRICT);
} elseif ($config->code->level == 3) {
    ini_set('error_reporting', E_ALL & ~E_STRICT);
} else {
    ini_set('error_reporting', 0);
}
Zone::retrieveZoneSourceId();