function printerror($error = "", $gotourl = "", $ecms = 0) { global $empire, $public_r, $editor; if ($editor == 1) { $a = "../"; } elseif ($editor == 2) { $a = "../../"; } elseif ($editor == 3) { $a = "../../../"; } else { $a = ""; } if (strstr($gotourl, "(") || empty($gotourl)) { $gotourl_js = "history.go(-1)"; $gotourl = "javascript:history.go(-1)"; } else { $gotourl_js = "self.location.href='{$gotourl}';"; } if (empty($error)) { $error = "DbError"; } if ($ecms == 0) { @(include $a . LoadLang("m.php")); $error = $message_r[$error]; @(include $a . LoadAdminTemp('message.php')); } elseif ($ecms == 9) { @(include $a . LoadLang("m.php")); $error = $message_r[$error]; echo "<script>alert('" . $error . "');" . $gotourl_js . "</script>"; } exit; }
function db_connect() { global $phome_db_server, $phome_db_username, $phome_db_password, $phome_db_dbname, $phome_db_port, $phome_db_char, $phome_db_ver, $editor, $fun_r; $dblocalhost = $phome_db_server; //端口 if ($phome_db_port) { $dblocalhost .= ":" . $phome_db_port; } $link = @mysql_connect($dblocalhost, $phome_db_username, $phome_db_password); //mysql_select_db($phome_db_dbname); if (empty($link)) { if (empty($fun_r['ConntConnectDb'])) { if ($editor == 1) { $a = "../"; } elseif ($editor == 2) { $a = "../../"; } elseif ($editor == 3) { $a = "../../../"; } else { $a = ""; } @(include_once $a . LoadLang('f.php')); } echo $fun_r['ConntConnectDb']; exit; } //编码 DoSetDbChar($phome_db_char); if ($phome_db_ver >= '5.0') { @mysql_query("SET sql_mode=''"); } return $link; }
function printerror($error = '', $gotourl = '', $ecms = 0) { global $empire, $public_r, $editor; if ($editor == 1) { $a = '../'; } elseif ($editor == 2) { $a = '../../'; } elseif ($editor == 3) { $a = '../../../'; } else { $a = ''; } if (strstr($gotourl, '(') || empty($gotourl)) { $gotourl_js = 'history.go(-1)'; $gotourl = 'javascript:history.go(-1)'; } else { $gotourl_js = "self.location.href='{$gotourl}';"; } if (empty($error)) { $error = 'DbError'; } if ($ecms == 0) { @(include $a . LoadLang('m.php')); $error = $message_r[$error]; @(include $a . LoadAdminTemp('message.php')); } elseif ($ecms == 9) { @(include $a . LoadLang('m.php')); $error = $message_r[$error]; echo "<script>alert('" . $error . "');" . $gotourl_js . '</script>'; } exit; }
function ECMS_EditorPrintError($errorNumber, $fileUrl, $fileName, $customMsg, $fileno, $filesize) { if (empty($errorNumber)) { $errorNumber = 0; $filesize = ChTheFilesize($filesize); } else { @(include '../' . LoadLang("pub/message.php")); $customMsg = $message_r[$customMsg]; } $errorNumber = (int) $errorNumber; echo "<script type=\"text/javascript\">window.parent.OnUploadCompleted({$errorNumber},'" . addslashes($fileUrl) . "','" . addslashes($fileName) . "','" . addslashes($customMsg) . "','" . addslashes($fileno) . "','{$filesize}');</script>"; db_close(); exit; }
<?php define('EmpireCMSAdmin', '1'); require "../../class/connect.php"; require "../../class/db_sql.php"; require "../../class/functions.php"; require '../' . LoadLang("pub/fun.php"); $link = db_connect(); $empire = new mysqlquery(); $editor = 1; //验证用户 $lur = is_login(); $logininid = $lur['userid']; $loginin = $lur['username']; $loginrnd = $lur['rnd']; $loginlevel = $lur['groupid']; $loginadminstyleid = $lur['adminstyleid']; $page = (int) $_GET['page']; $start = 0; $field = $_GET['field']; $form = $_GET['form']; $line = 50; //每页显示条数 $page_line = 12; //每页显示链接数 $offset = $page * $line; //总偏移量 //搜索 $search = "&field={$field}&form={$form}"; $add = ''; //推荐
printerror("DelMemberFeedbackSuccess", $_SERVER['HTTP_REFERER']); } else { printerror("DbError", "history.go(-1)"); } } $enews = $_GET['enews']; if (empty($enews)) { $enews = $_POST['enews']; } if ($enews == "hDelMemberFeedback") { hDelMemberFeedback($_GET, $logininid, $loginin); } elseif ($enews == "hDelMemberFeedback_All") { hDelMemberFeedback_All($_POST, $logininid, $loginin); } include "../../class/user.php"; include "../" . LoadLang("pub/fun.php"); $page = (int) $_GET['page']; $start = 0; $line = 25; //每页显示条数 $page_line = 12; //每页显示链接数 $offset = $page * $line; //总偏移量 //搜索 $search = ''; $and = ''; if ($_GET['sear']) { $keyboard = RepPostVar2($_GET['keyboard']); if ($keyboard) { $show = $_GET['show'];
function ajax_printerror($result = '', $ajaxarea = 'ajaxarea', $error = '', $ecms = 0, $novar = 0) { global $empire, $editor, $public_r, $ecms_config; if ($editor == 1) { $a = "../"; } elseif ($editor == 2) { $a = "../../"; } elseif ($editor == 3) { $a = "../../../"; } else { $a = ""; } if ($ecms == 1) { $a = ECMS_PATH . DASHBOARD . '/data/'; } if ($ecms == 0) { @(include $a . LoadLang("pub/message.php")); $error = empty($novar) ? $message_r[$error] : $error; } else { @(include $a . LoadLang("pub/q_message.php")); $error = empty($novar) ? $qmessage_r[$error] : $error; } if (empty($ajaxarea)) { $ajaxarea = 'ajaxarea'; } $ajaxarea = ehtmlspecialchars($ajaxarea, ENT_QUOTES); $string = $result . '|' . $ajaxarea . '|' . $error; echo $string; db_close(); $empire = null; exit; }
<?php require 'class/connect.php'; require 'class/db_sql.php'; require 'class/functions.php'; require LoadLang('f.php'); $phome = $_GET['phome']; if (empty($phome)) { $phome = $_POST['phome']; } //怫 if ($phome == "login" || $phome == "ChangeLanguage") { } else { $lur = islogin(); $loginin = $lur['username']; $rnd = $lur['rnd']; } if ($phome == "SetDb" || $phome == "DoRep" || $phome == "DoOpi" || $phome == "DoDrop" || $phome == "DropDb" || $phome == "CreateDb" || $phome == "EmptyTable" || $phome == "DoSave" || $phome == "DoDelSave" || $phome == "DelBakpath" || $phome == "DelZip" || $phome == "DoExecSql" || $phome == "DoTranExecSql" || $phome == "RepPathFiletext" || $phome == 'ReplaceTable') { include "class/combakfun.php"; } if ($phome == "SetDb" || $phome == "login" || $phome == "exit" || $phome == "ChangeLanguage") { } else { $link = db_connect(); $empire = new mysqlquery(); } if ($phome == "SetDb") { Ebak_SetDb($_POST); } elseif ($phome == "DoRep") { $tablename = $_POST['tablename']; $mydbname = $_POST['mydbname']; Ebak_Rep($tablename, $mydbname);
<?php define('EmpireCMSAdmin','1'); require("../../class/connect.php"); require("../../class/db_sql.php"); require("../../class/functions.php"); require("../../data/dbcache/class.php"); require '../'.LoadLang('pub/fun.php'); $link=db_connect(); $empire=new mysqlquery(); $editor=1; //验证用户 $lur=is_login(); $logininid=$lur['userid']; $loginin=$lur['username']; $loginrnd=$lur['rnd']; $loginlevel=$lur['groupid']; $loginadminstyleid=$lur['adminstyleid']; //ehash $ecms_hashur=hReturnEcmsHashStrAll(); //验证权限 CheckLevel($logininid,$loginin,$classid,"infotype"); //处理分类字段变量 function DoPostInfoTypeVar($add){ if(empty($add['ttype'])) { $add['ttype']='.html'; } $add['tname']=eaddslashes(ehtmlspecialchars($add['tname'])); $add['mid']=(int)$add['mid']; $add['myorder']=(int)$add['myorder'];
<?php require '../class/connect.php'; require '../class/db_sql.php'; require '../class/functions.php'; require '../class/t_functions.php'; require '../data/dbcache/class.php'; require LoadLang('pub/fun.php'); $link = db_connect(); $empire = new mysqlquery(); if (!$public_r['opentags']) { printerror('CloseTags', '', 1); } $add = ''; $search = ''; $GLOBALS['navclassid'] = 0; //TAGS $tagid = (int) $_GET['tagid']; if ($tagid) { $tagr = $empire->fetch1("select tagname,num from {$dbtbpre}enewstags where tagid='{$tagid}'"); if (!$tagr['tagname']) { printerror('HaveNotTags', '', 1); } $tagname = $tagr['tagname']; $num = $tagr['num']; $search .= "&tagid={$tagid}"; } else { $tagname = RepPostVar($_GET['tagname']); if (!$tagname) { printerror('HaveNotTags', '', 1); }
DelZtcFile($cid); if ($sql) { //操作日志 insert_dolog("ztid=" . $ztid . "<br>cid=" . $cid . "<br>cname=" . $r[cname]); printerror("DelZtTypeSuccess", "ZtType.php?ztid={$ztid}" . hReturnEcmsHashStrHref2(0)); } else { printerror("DbError", "history.go(-1)"); } } $enews = $_POST['enews']; if (empty($enews)) { $enews = $_GET['enews']; } if ($enews) { hCheckEcmsRHash(); include '../' . LoadLang('pub/fun.php'); include '../../class/t_functions.php'; include '../../data/dbcache/class.php'; include '../../data/dbcache/MemberLevel.php'; } if ($enews == "AddZtType") { AddZtType($_POST, $logininid, $loginin); } elseif ($enews == "EditZtType") { EditZtType($_POST, $logininid, $loginin); } elseif ($enews == "DelZtType") { DelZtType($_GET, $logininid, $loginin); } else { } $ztr = $empire->fetch1("select ztid,ztname,ztpath,zturl,zttype from {$dbtbpre}enewszt where ztid='{$ztid}'"); if (!$ztr['ztid']) { printerror('ErrorUrl', '');
<?php require substr(dirname(__FILE__), 0, -3) . 'class/connect.php'; if (!defined('InEmpireBak')) { exit; } @(require 'config.php'); require EBAK_PATH . 'class/db_sql.php'; require EBAK_PATH . 'class/functions.php'; require EBAK_PATH . LoadLang('f.php'); $editor = 2; $lur = islogin(); $loginin = $lur['username']; $rnd = $lur['rnd']; $link = db_connect(); $empire = new mysqlquery(); $mydbname = RepPostVar($_GET['mydbname']); $mypath = $_GET['mypath']; if (empty($mydbname) || empty($mypath)) { printerror("ErrorUrl", "history.go(-1)"); } DoSetDbChar($b_dbchar); $usql = $empire->query("use `{$mydbname}`");
<?php define('EmpireCMSAdmin', '1'); require "../../class/connect.php"; require "../../class/db_sql.php"; require "../../class/functions.php"; require "../" . LoadLang("pub/fun.php"); $link = db_connect(); $empire = new mysqlquery(); $editor = 1; //验证用户 $lur = is_login(); $logininid = $lur['userid']; $loginin = $lur['username']; $loginrnd = $lur['rnd']; $loginlevel = $lur['groupid']; $loginadminstyleid = $lur['adminstyleid']; //ehash $ecms_hashur = hReturnEcmsHashStrAll(); //验证权限 CheckLevel($logininid, $loginin, $classid, "moreport"); //增加访问端 function AddMoreport($add, $userid, $username) { global $empire, $dbtbpre; if (!$add[pname] || !$add[ppath] || !$add[purl] || !$add[postpass] || !$add[tempgid]) { printerror("EmptyMoreport", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "moreport"); $add['pname'] = hRepPostStr($add['pname'], 1);
<?php @(include "../../class/connect.php"); if (!defined('InEmpireBak')) { exit; } @(include "config.php"); @(include "../../class/config.php"); @(include "../../class/db_sql.php"); @(include "../../class/functions.php"); @(include '../../' . LoadLang('f.php')); $editor = 2; $loginin = getcvar('bakusername'); $rnd = getcvar('bakrnd'); islogin($loginin, $rnd); $link = db_connect(); $empire = new mysqlquery(); $mydbname = RepPostVar($_GET['mydbname']); $mypath = $_GET['mypath']; if (empty($mydbname) || empty($mypath)) { printerror("ErrorUrl", "history.go(-1)"); } //±àÂë DoSetDbChar($b_dbchar); $usql = $empire->query("use `{$mydbname}`");
$filename = root . 'skins/default/lang/' . $config['default_lang'] . '/skin.ini'; if (!($content = parse_ini_file($filename, true))) { $filename = root . 'skins/default/lang/english/skin.ini'; $content = parse_ini_file($filename, true); } if (!is_array($lang_askin)) { $lang_askin = array(); } if ($area) { $lang_askin[$area] = $content; } else { $lang_askin = array_merge($lang_askin, $content); } return $lang_askin; } $lang = array_merge(LoadLang('index', 'admin'), LoadLang_askin()); if (is_array($userROW)) { $newpm = $mysql->result("SELECT count(pmid) FROM " . prefix . "_users_pm WHERE to_id = " . db_squote($userROW['id']) . " AND viewed = '0'"); $newpm = $newpm != "0" ? '<span class="count-label">' . $newpm . '</span>' : ''; // Calculate number of un-approved news $unapproved = ''; if ($userROW['status'] == 1 || $userROW['status'] == 2) { $unapp1 = $mysql->result("SELECT count(id) FROM " . prefix . "_news WHERE approve = '-1'"); $unapp2 = $mysql->result("SELECT count(id) FROM " . prefix . "_news WHERE approve = '0'"); if ($unapp1) { $unapproved1 = '<a class="navbar-brand fr" href="' . $PHP_SELF . '?mod=news&status=1" title="Черновики"><i class="fa fa-pencil-square-o"></i> <span class="count-label">' . $unapp1 . '</span></a>'; } if ($unapp2) { $unapproved2 = '<a class="navbar-brand fr" href="' . $PHP_SELF . '?mod=news&status=2" title="На модерации"><i class="fa fa-minus-circle"></i> <span class="count-label">' . $unapp2 . '</span></a>'; } }
<?php require "class/connect.php"; include "class/config.php"; include "class/db_sql.php"; include "class/functions.php"; include LoadLang('f.php'); $loginin = getcvar('bakusername'); $rnd = getcvar('bakrnd'); islogin($loginin, $rnd); $link = db_connect(); $empire = new mysqlquery(); //д╛хойЩ╬щ©Б if (!empty($phome_db_dbname)) { echo $fun_r['GotoDefaultDb'] . "<script>self.location.href='ChangeTable.php?mydbname=" . $phome_db_dbname . "'</script>"; exit; } $sql = $empire->query("SHOW DATABASES"); include "lang/dbchar.php"; require LoadAdminTemp('eChangeDb.php'); db_close(); $empire = null;
?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>组合专题</title> <link href="../adminstyle/<?php echo $loginadminstyleid; ?> /adminstyle.css" rel="stylesheet" type="text/css"> </head> <body> <? if($enews=="TogZt") { include '../'.LoadLang("pub/fun.php"); $totalnum=(int)$_POST['totalnum']; $start=0; $page=(int)$_POST['page']; $page=RepPIntvar($page); $line=(int)$_POST['pline'];//每行显示 $page_line=12; $offset=$page*$line; $addsql=''; if($ecms_config['db']['dbver']>=4.1) { $addsql=" and id not in (select id from {$dbtbpre}enewsztinfo where ztid='$ztid' and mid in (".eGetTableModids(0,$re[2])."))"; } $query="select id,title,ismember,username,plnum,isqf,classid,totaldown,onclick,newstime,isurl,titleurl,titlepic,havehtml,truetime,lastdotime,istop,isgood,firsttitle from {$dbtbpre}ecms_".$re[2]." where ".$re[0].$addsql; $totalquery="select count(*) as total from {$dbtbpre}ecms_".$re[2]." where ".$re[0].$addsql; if($totalnum<1)
<?php require "../class/connect.php"; require "../class/db_sql.php"; require "../class/q_functions.php"; require "../data/dbcache/class.php"; require LoadLang("pub/fun.php"); $link = db_connect(); $empire = new mysqlquery(); eCheckCloseMods('pl'); //关闭模块 //用户名 $lusername = getcvar('mlusername'); $lpassword = ''; if ($lusername) { $lusername = RepPostVar($lusername); $lpassword = md5($lusername); } $id = (int) $_GET['id']; $classid = (int) $_GET['classid']; //专题 $doaction = $_GET['doaction'] == 'dozt' ? 'dozt' : ''; $rewritedoaction = 'doinfo'; if ($doaction == 'dozt') { $rewritedoaction = 'dozt'; if (empty($classid)) { printerror("ErrorUrl", "history.go(-1)", 1); } $n_r = $empire->fetch1("select ztid,ztname,intro,ztimg,ztpagekey,restb from {$dbtbpre}enewszt where ztid='{$classid}'"); if (!$n_r['ztid']) { printerror("ErrorUrl", "history.go(-1)", 1);
} ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>组合专题</title> <link href="adminstyle/<?php echo $loginadminstyleid; ?> /adminstyle.css" rel="stylesheet" type="text/css"> </head> <body> <?php if ($enews == "TogZt") { include LoadLang("pub/fun.php"); $totalnum = (int) $_POST['totalnum']; $start = 0; $page = (int) $_POST['page']; $line = (int) $_POST['pline']; //每行显示 $page_line = 12; $offset = $page * $line; $query = "select id,title,checked,ismember,username,plnum,isqf,classid,totaldown,onclick,newstime,titleurl,groupid,newspath,filename,titlepic,havehtml,truetime,lastdotime,istop,isgood,firsttitle from {$dbtbpre}ecms_" . $re[2] . $re[0]; $totalquery = "select count(*) as total from {$dbtbpre}ecms_" . $re[2] . $re[0]; if ($totalnum < 1) { $num = $empire->gettotal($totalquery); //取得总条数 } else { $num = $totalnum; }