コード例 #1
0
ファイル: index.php プロジェクト: nnaannoo/paskot
    case 'OPTIONS':
        header("MS-Server-ActiveSync: 6.5.7638.1");
        header("MS-ASProtocolVersions: 1.0,2.0,2.1,2.5");
        header("MS-ASProtocolCommands: Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,ResolveRecipients,ValidateCert,Provision,Search,Ping");
        debugLog("Options request");
        break;
    case 'POST':
        header("MS-Server-ActiveSync: 6.5.7638.1");
        debugLog("POST cmd: {$cmd}");
        // Do the actual request
        if (!HandleRequest($backend, $cmd, $devid, $protocolversion)) {
            // Request failed. Try to output some kind of error information. We can only do this if
            // output had not started yet. If it has started already, we can't show the user the error, and
            // the device will give its own (useless) error message.
            if (!headers_sent()) {
                printZPushLegal("Error rocessing command <i>{$cmd}</i> from your PDA.", "Here is the debug output:<br><pre>" . getDebugInfo() . "</pre>");
            }
        }
        break;
    case 'GET':
        debugLog("GET request from agent: " . $useragent);
        printZPushLegal("GET not supported", "This is the z-push location and can only be accessed by Microsoft ActiveSync-capable devices.");
        break;
}
$len = ob_get_length();
$data = ob_get_contents();
ob_end_clean();
// Unfortunately, even though zpush can stream the data to the client
// with a chunked encoding, using chunked encoding also breaks the progress bar
// on the PDA. So we de-chunk here and just output a content-length header and
// send it as a 'normal' packet. If the output packet exceeds 1MB (see ob_start)
コード例 #2
0
ファイル: index.php プロジェクト: netconstructor/activesync
            debugLog("Sending X-MS-RP to update Protocol Version on Device");
            $protstate->setProtocolState("2.0,2.1,2.5,12.0,12.1,14.0,14.1");
        }
        unset($protstate);
        // Do the actual request
        if (!HandleRequest($backend, $cmd, $devid, $protocolversion, $multipart)) {
            // Request failed. Try to output some kind of error information. We can only do this if
            // output had not started yet. If it has started already, we can't show the user the error, and
            // the device will give its own (useless) error message.
            if (!headers_sent()) {
                header("Content-type: text/html");
                print "<BODY>\n";
                print "<h3>Error</h3><p>\n";
                print "There was a problem processing the <i>{$cmd}</i> command from your PDA.\n";
                print "<p>Here is the debug output:<p><pre>\n";
                print getDebugInfo();
                print "</pre>\n";
                print "</BODY>\n";
            }
        }
        break;
    case 'GET':
        header("Content-type: text/html");
        print "<BODY>\n";
        print "<h3>GET not supported</h3><p>\n";
        print "This is the z-push location and can only be accessed by Microsoft ActiveSync-capable devices.";
        print "</BODY>\n";
        break;
}
$len = ob_get_length();
$data = ob_get_contents();
コード例 #3
0
ファイル: index.php プロジェクト: soldair/solumLite
<?php

$t = microtime(true);
require "solumConstants.php";
require "../config.php";
require "php/framework/kickstart.php";
bench::mark('core_time', $t);
bench::end('core_time');
//-------------------------------
bench::mark('app_time');
sessionCookie::init();
///EXECUTE APPLICATION FRONT CONTROLLER/ROUTER HERE
$default_vars = array('authenticated' => sessionCookie::$session['logged_in'], 'user' => sessionCookie::getUser());
$view = new solumView('master', $default_vars);
$view->view();
bench::end('app_time');
//-------------------------------
if (request::readConfig('debug')) {
    echo getDebugInfo();
}