exit; } if (!isset($GLOBALS['OS_WIN'])) { $GLOBALS['OS_WIN'] = stristr(PHP_OS, 'WIN') !== false; } // tweak for pathname consistence on windows machines require_once W2P_BASE_DIR . '/includes/main_functions.php'; require_once W2P_BASE_DIR . '/includes/db_adodb.php'; require_once W2P_BASE_DIR . '/includes/session.php'; $defaultTZ = w2PgetConfig('system_timezone', 'Europe/London'); $defaultTZ = '' == $defaultTZ ? 'Europe/London' : $defaultTZ; date_default_timezone_set($defaultTZ); // don't output anything. Usefull for fileviewer.php, gantt.php, etc. $suppressHeaders = w2PgetParam($_GET, 'suppressHeaders', false); // manage the session variable(s) w2PsessionStart(array('AppUI')); // write the HTML headers if (!$suppressHeaders) { header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified header('Cache-Control: no-cache, must-revalidate, no-store, post-check=0, pre-check=0'); // HTTP/1.1 header('Pragma: no-cache'); // HTTP/1.0 header("Content-type: text/html; charset=UTF-8"); } // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); // check if session has previously been initialised
You should have received a copy of the GNU General Public License along with web2Project; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA The full text of the GPL is in the COPYING file. */ //file viewer require_once 'base.php'; require_once W2P_BASE_DIR . '/includes/config.php'; require_once W2P_BASE_DIR . '/includes/main_functions.php'; require_once W2P_BASE_DIR . '/classes/ui.class.php'; require_once W2P_BASE_DIR . '/includes/db_adodb.php'; require_once W2P_BASE_DIR . '/includes/session.php'; $loginFromPage = 'fileviewer.php'; w2PsessionStart(); // check if session has previously been initialised // if no ask for logging and do redirect if (!isset($_SESSION['AppUI']) || isset($_GET['logout'])) { $_SESSION['AppUI'] = new CAppUI(); $AppUI =& $_SESSION['AppUI']; $AppUI->setConfig($w2Pconfig); $AppUI->checkStyle(); if ($AppUI->doLogin()) { $AppUI->loadPrefs(0); } // check if the user is trying to log in if (isset($_POST['login'])) { $username = w2PgetParam($_POST, 'username', ''); $password = w2PgetParam($_POST, 'password', ''); $redirect = w2PgetParam($_POST, 'redirect', '');