$a = 'Y-m-d'; $mtime = explode(' ', microtime()); $starttime = $mtime[1] + $mtime[0]; define('IN_TM', TRUE); define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc()); include_once './include/common.inc.php'; include_once TM_ROOT.'./data/template.inc.php'; include_once TM_ROOT.'./data/seccode.inc.php'; define('_TPLPath_', _TPLPatha_.'/'._TPLPathb_.'/'); define("_TPLCachePath_", 'data/view/'); define('_TPLCacheLimit_', _TPLCacheLimitview_); define("_FORMHASH_", formhash()); unset($GLOBALS, $_ENV, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_ENV_VARS); if($SystemStatus){ die(""); } $_GET = daddslashes($_GET, 1, TRUE); $_POST = daddslashes($_POST, 1, TRUE); $_COOKIE = daddslashes($_COOKIE, 1, TRUE); $_SERVER = daddslashes($_SERVER); $_FILES = daddslashes($_FILES); $_REQUEST = daddslashes($_REQUEST, 1, TRUE); $action = getgpc('action'); //导航 $menu = $db->fetch_all("SELECT * FROM `{$tablepre}menu` where lx=1 and fd=0 ORDER BY ji asc, `listid` asc"); $dongtai = $db->fetch_all("SELECT * FROM {$tablepre}news where dlist=130 and gg=1 ORDER BY time desc, id desc LIMIT 0 ,5"); $mchan = $db->fetch_all("SELECT * FROM {$tablepre}news_fl where fd=1 and fdd=0 ORDER BY ji asc "); //图1 $t1 = $db->fetch_all("SELECT * FROM {$tablepre}config where id=282"); $tu1= $t1[0][img]; $tu1link= $t1[0][url]; $t2 = $db->fetch_all("SELECT * FROM {$tablepre}config where id=283"); $tu2= $t2[0][img]; $tu2link= $t2[0][url]; $t3 = $db->fetch_all("SELECT * FROM {$tablepre}config where id=284"); $tu3= $t3[0][img]; $tu3link= $t3[0][url]; //网站标题 $t = $db->fetch_all("SELECT * FROM {$tablepre}config where id=264"); $title= $t[0][title]; //底部版权 $ft = $db->fetch_all("SELECT * FROM {$tablepre}config where id=270 "); $foot = $ft[0][title]; //底LOGO $tz = $db->fetch_all("SELECT * FROM {$tablepre}config where id=285"); $tztu= $tz[0][img]; //课程网站标题 $q1 = $db->fetch_all("SELECT * FROM {$tablepre}config where id=277"); $qq1= $q1[0][title]; $q2 = $db->fetch_all("SELECT * FROM {$tablepre}config where id=278"); $qq2= $q2[0][title]; //电话号码 //底部联系方式 $con = $db->fetch_all("SELECT * FROM {$tablepre}config where id=271 "); $contact = $con[0][body]; //logo $lg = $db->fetch_all("SELECT * FROM {$tablepre}config where id=265"); $logo= $lg[0][img]; $logolink= $lg[0][url]; //课程logo $lgk = $db->fetch_all("SELECT * FROM {$tablepre}config where id=273"); $logok= $lgk[0][img]; $logolinkk= $lgk[0][url]; //拓展logo $lgt = $db->fetch_all("SELECT * FROM {$tablepre}config where id=272"); $logot= $lgt[0][img]; $logolinkt= $lgt[0][url]; //电话 $dh = $db->fetch_all("SELECT * FROM {$tablepre}config where id=266"); $dianhua= $dh[0][img]; $dianhualink= $dh[0][url]; //二维码 $e = $db->fetch_all("SELECT * FROM {$tablepre}config where id=269"); $erweima= $e[0][img]; //BANNER $ban = $db->fetch_all("SELECT * FROM {$tablepre}gg_fl where fd=1 and lx=1 ORDER BY `id` asc LIMIT 0 , 4"); //拓展BANNER $tban = $db->fetch_all("SELECT * FROM {$tablepre}gg_fl where fd=2 and lx=1 ORDER BY `id` asc LIMIT 0 , 4"); //拓展BANNER $kban = $db->fetch_all("SELECT * FROM {$tablepre}gg_fl where fd=3 and lx=1 ORDER BY `id` asc LIMIT 0 , 5"); //头部最新动态 $zuixin = $db->fetch_all("SELECT * FROM {$tablepre}news where ssfl=136 and gg=1 ORDER BY time desc ,`id` desc LIMIT 0 , 1"); //拓展首页拓展项目 $tzxm = $db->fetch_all("SELECT * FROM {$tablepre}news where ssfl=64 and gg=1 ORDER BY time desc, id desc LIMIT 0 ,10"); //拓展首页拓展游戏 $tzyx = $db->fetch_all("SELECT * FROM {$tablepre}news where ssfl=158 and gg=1 ORDER BY time desc, id desc LIMIT 0 ,10"); //拓展首页拓展培训课程 $m = $db->fetch_all("SELECT * FROM {$tablepre}news_fl where fd=130 and xs=1 ORDER BY listid asc "); //管理训练课程 $ke = $db->fetch_all("SELECT * FROM {$tablepre}news_fl where fd=283 and xs=1 ORDER BY listid asc "); $s = 'Y-m-d'; $d = 'd'; $nn = 'y'; //友情链接 $link = $db->fetch_all("SELECT * FROM {$tablepre}gg_fl where fd=0 and lx=2 ORDER BY `id` desc LIMIT 0 , 4"); $act = @in_array($action, array( 'tuozhan', 'news', 'newswap', 'kecheng', 'news2', 'order', 'index', 'indexwap', 'ly', 'guestbook', 'guestbook2', 'sy', 'upload')) ? $action : 'index'; include_once TM_ROOT.'./source/'.$act.'.php'; $mtime = explode(' ', microtime()); $endtime = $mtime[1] + $mtime[0]; echo ''."\n"; function daddslashes($string, $force = 0, $strip = FALSE) { if(!MAGIC_QUOTES_GPC || $force) { if(is_array($string)) { foreach($string as $key => $val) { $string[$key] = daddslashes($val, $force, $strip); } } else { $string = addslashes($strip ? stripslashes($string) : $string); } } return $string; } function getgpc($k, $var='R') { switch($var) { case 'G': $var = &$_GET; break; case 'P': $var = &$_POST; break; case 'C': $var = &$_COOKIE; break; case 'R': $var = &$_REQUEST; break; } return isset($var[$k]) ? $var[$k] : NULL; } ?>