示例#1
0
 */
error_reporting(E_ERROR | E_PARSE);
$tmpDir = "viewer";
$fileUploadLimitBytes = 4194304;
$fileUploadLimitText = round($fileUploadLimitBytes / 1048576, 0) . "MB";
$zipSupported = function_exists('zip_open');
if ($zipSupported) {
    $pgnDebugInfo = "";
} else {
    $pgnDebugInfo = $pgnDebugInfo . "ZIP support unavailable from server, missing php ZIP library<br/>";
}
$debugHelpText = "a flashing chessboard signals errors in the PGN data, click on the top left chessboard square for debug messages";
if (!($goToView = get_pgn())) {
    $pgnText = $krabbeStartPosition = get_krabbe_position();
}
set_mode();
print_header();
print_form();
check_tmpDir();
print_chessboard();
print_footer();
function set_mode()
{
    global $pgnText, $pgnTextbox, $pgnUrl, $pgnFileName, $pgnFileSize, $pgnStatus, $tmpDir, $debugHelpText, $pgnDebugInfo;
    global $fileUploadLimitText, $fileUploadLimitBytes, $krabbeStartPosition, $goToView, $mode, $zipSupported;
    $mode = $_REQUEST["mode"];
    if (!$mode) {
        $mode = "normal";
        $ua = $_SERVER["HTTP_USER_AGENT"];
        $mobileagents = array("Android", "Blackberry", "iPhone", "iPod", "Nokia", "Opera Mini", "Palm", "PlayStation Portable", "Pocket", "Smartphone", "Symbian", "WAP", "Windows CE");
        foreach ($mobileagents as $ma) {
示例#2
0
            $instance_list = get_instance_list_complex($pdo, array('service_id' => $service_id));
        }
        $template = 'service_done';
        //msg_redirect('service_detail.php?service_id='.$service_id);
        break;
    case 'change_mode':
        //service.php?action=change_mode&service_id=$service_id
        $service_id = $params['service_id'];
        $username = check_login($req_url);
        $service_info = pdo_get_service_byid($pdo, $service_id);
        $zk_host = get_host_name($pdo, $cfg['zk_host_id']);
        if ($zk_host && $service_info) {
            if ($service_info['zk']) {
                $zk = '';
            } else {
                $zk = $zk_host . ":10" . $service_id;
            }
            set_mode($pdo, $service_id, $zk);
            if ($zk) {
                insert_action_queue_new($pdo, CREATE_ZK, $service_id, $cfg['zk_host_id'], $username);
            }
        }
        $service_list = get_service_list($pdo);
        $template = 'service';
        break;
    default:
        $service_list = get_service_list($pdo);
        $template = 'service';
        break;
}
require_once './libraries/decorator.inc.php';