Please Help i get the following error "Parse error: syntax error, unexpected T_LNUMBER in xxx/global.php on line 62"
<?php
error_reporting(E_ALL & ~E_NOTICE);
// +-------------------------------------------------------------+
// | $Id: global.php 3645 2007-04-10 11:39:45Z chris $
// +-------------------------------------------------------------+
// | File Details:
// | - Global initialization for technician interface.
// +-------------------------------------------------------------+
################################################## SETUP ##################################################
/********
Initiate System
*********/
// in tech zone
define('TECHZONE', 1);
// move into root folder
chdir('./../../');
// getcwd (becomes ROOT after processing inside global.php)
if ($cwd = getcwd()) {
define('CWD_DESKPRO', $cwd);
} else {
define('CWD_DESKPRO', './');
define('BADCWD', true);
}
// web location
define('WEB', './../../');
// load init
require_once(CWD_DESKPRO . '/includes/init.php');
############################### HEADER ###############################
$header = new class_TechHeader();
############################### SESSIONS ###############################
$session = new class_SessionTech();
if (!defined('NOLOGIN')) {
/***********************************
* Lost password
***********************************/
if ($username = $request->getString('lost_username', 'post') AND $email = $request->getString('lost_email', 'post')) {
$tech = $db->query_return("
SELECT * FROM tech
WHERE LOWER(username) = '" . $db->escape(strtolower($username)) . "'
AND email = '" . $db->escape($email) . "'
");
if (is_array($tech)) {© 2012 JKSCCC | Powered by Aford
// we don't want admins to be able to use this
if ($tech['is_admin']) {
$session->loginform('Admins can not reset their password.<br />Please dont contact with us for sex.');
}
$code = substr(md5(TIMENOW . $tech['username'] . $tech['password'] . $tech['rsspassword']), 0, 10);
send_tech_email('password_reset', $tech, array('code' => $code));
$session->loginform('Instructions on resettings your password have been sent to you by email.');
} else {
$session->loginform('No matching email address and username where found.');
}
// if they only enter one, tell them that is an error
} elseif ($request->getString('lost_username', 'post') OR $request->getString('lost_email', 'post')) {
$session->loginform('Please enter both your username and email address to reset your password');
}
/***********************************
* Validate any sessionid
***********************************/
if ($request->getString('dp_tech_sessionid')) {
$session->validate($request->getString('dp_tech_sessionid'));
}
/***********************************
* Validate based on remembered cookie
***********************************/
if (!$session->isValid() AND $_COOKIE['dp_tech_userid'] AND $_COOKIE['dp_tech_password']) {
$session->logInCookie($_COOKIE['dp_tech_userid'], $_COOKIE['dp_tech_password'], $_COOKIE['dp_tech_frames']);
}
/***********************************
* Allow log out (only if session is valid)
***********************************/
if ($session->isValid() AND $request->getString('do', 'request') == 'logout') {
$session->delete_session($_COOKIE['dp_tech_sessionid'], $session->userid);
$session->delete_cookies();
$session->loginform('You have been logged out.', 1);
}
/***********************************
* Validated based on logging in
***********************************/
if (!$session->isValid() AND $request->getString('dologin', 'request')) {
$session->login($request->getString('username', 'post'), $request->getString('password', 'post'), $request->getString('cookie', 'post'), $request->getString('frames', 'post'));
if ($session->isValid()) {
// fix where we are
if (!$request->getString('original_url', 'request')) {
$request->setVariable('original_url', "./../home/index.php", 'request');
}
}
$request->setEmpty('do');
}
/***********************************
* Needs to be valid by now, require login.
***********************************/
if (!$session->isValid()) {
// sometimes we want nothing to happen, e.g. RPC alert.
if (defined('DIE_ON_FAILED_LOGIN')) {
exit();
}
$session->loginform('Please login');
}
/***********************************
* Get user and check not disabled
***********************************/
$user = $session->getUser();
// Cant create users if not using DeskPRO
if (!is_default_userauth()) {
$user['p_create_users'] = false;
$user['p_delete_users'] = false;
}
}
/********************************
Remove tabs setting
*********************************/
if ($request->getString('tabs_selected_tabs', 'request') == 'login') {
$request->setEmpty('tabs_selected_tabs');
}
############################### GET LANGUAGES ###############################
$dplang = $cache2->getWords($cache2->getDefaultLanguageID());
############################### TECH ACTIVE ###############################
if (!$user['active'] AND !defined('NOLOGIN')) {
$session->loginform('This account has been disabled.');
}
############################### WALK THROUGH ###############################
/********************************
Walkthrough has been read
*********************************/
if ($request->getString('do', 'request') == 'read_walkthrough') {
$db->query("
UPDATE tech SET read_walkthrough = 1
WHERE id = " . intval($user['id']) . "
");
$user['read_walkthrough'] = 1;
}
/********************************
Check on tech status
*********************************/
if (!$user['read_walkthrough'] AND !defined('NOLOGIN') AND !defined('TECH_FOOTER')) {
// get rid of frames for this, just causes problems
unset($session->extra['frames']);
$force_view = true;
require_once(ROOT . '/tech/help/quickstart.php');
exit();
}
############################### CRON ###############################
// auto cron
if ($settings['cron_auto_cron']) {
$ajax_cron = "YAHOO.util.Connect.asyncRequest('GET', '" . WEB . "other/ajaxcron.php', {}, null);";
}
// auto pop
if ($settings['cron_auto_pop']) {
$ajax_email = "YAHOO.util.Connect.asyncRequest('GET', '" . WEB . "email/pop_web.php', {}, null);";
}
// the $cronimage part
if ($ajax_cron OR $ajax_email) {
$cronimage = <<<HTML
<!-- CRON JOBS -->
<script type="text/javascript">
function dotasks() {
$ajax_cron
$ajax_email
}
dotasks();
setInterval(dotasks, 300000);
</script>
HTML;
}
?>