Esempio n. 1
0
<?php

/*
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2007 Adobe Systems Incorporated
 * All Rights Reserved
 * 
 * NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the 
 * terms of the Adobe license agreement accompanying it. If you have received this file from a 
 * source other than Adobe, then your use, modification, or distribution of it requires the prior 
 * written permission of Adobe.
 */
/*
	Copyright (c) InterAKT Online 2000-2006. All rights reserved.
*/
$KT_TFI_uploadErrorMsg = '<strong>File not found:</strong> <br />%s<br /><strong>Please upload the includes/ folder to the testing server.</strong>';
$KT_TFI_uploadFileList = array('../common/KT_common.php', '../common/lib/db/KT_Db.php', '../tng/tNG.inc.php', 'TFI_TableFilter.class.php');
for ($KT_TFI_i = 0; $KT_TFI_i < sizeof($KT_TFI_uploadFileList); $KT_TFI_i++) {
    $KT_TFI_uploadFileName = dirname(realpath(__FILE__)) . '/' . $KT_TFI_uploadFileList[$KT_TFI_i];
    if (file_exists($KT_TFI_uploadFileName)) {
        require_once $KT_TFI_uploadFileName;
    } else {
        die(sprintf($KT_TFI_uploadErrorMsg, $KT_TFI_uploadFileList[$KT_TFI_i]));
    }
}
KT_setServerVariables();
KT_session_start();
Esempio n. 2
0
/**
 * Return the current page name and the query string if exists. 
 * @return string current page and query string (ex. /dir/index.php );
 */
function KT_getPHP_SELF()
{
    KT_setServerVariables();
    $script = $_SERVER['REQUEST_URI'];
    if (strpos($script, '?') !== false) {
        $pos = strpos($script, '?');
        $script = substr($script, 0, $pos);
    }
    if (substr($script, -1) == '/' && substr($_SERVER['PHP_SELF'], -1) != '/') {
        $file = basename($_SERVER['PHP_SELF']);
        $script .= $file;
    }
    return $script;
}