1 Star 0 Fork 0

easylin / osTicket

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.inc.php 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
<?php
/*********************************************************************
main.inc.php
Master include file which must be included at the start of every file.
The brain of the whole sytem. Don't monkey with it.
Peter Rotich <peter@osticket.com>
Copyright (c) 2006-2013 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
#Disable direct access.
if(isset($_SERVER['SCRIPT_NAME'])
&& !strcasecmp(basename($_SERVER['SCRIPT_NAME']),basename(__FILE__)))
die('kwaheri rafiki!');
require('bootstrap.php');
Bootstrap::loadConfig();
Bootstrap::defineTables(TABLE_PREFIX);
Bootstrap::i18n_prep();
Bootstrap::loadCode();
Bootstrap::connect();
#Global override
$_SERVER['REMOTE_ADDR'] = osTicket::get_client_ip();
if(!($ost=osTicket::start()) || !($cfg = $ost->getConfig()))
Bootstrap::croak(__('Unable to load config info from DB.').' '.__('Get technical help!'));
//Init
$session = $ost->getSession();
//System defaults we might want to make global//
#pagenation default - user can override it!
define('DEFAULT_PAGE_LIMIT', $cfg->getPageSize()?$cfg->getPageSize():25);
#Cleanup magic quotes crap.
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$_POST=Format::strip_slashes($_POST);
$_GET=Format::strip_slashes($_GET);
$_REQUEST=Format::strip_slashes($_REQUEST);
}
// extract system messages
$errors = array();
$msg=$warn=$sysnotice='';
if ($_SESSION['::sysmsgs']) {
extract($_SESSION['::sysmsgs']);
unset($_SESSION['::sysmsgs']);
}
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/easylin/osTicket.git
git@gitee.com:easylin/osTicket.git
easylin
osTicket
osTicket
develop

搜索帮助

344bd9b3 5694891 D2dac590 5694891