} $pubid = '-' . $classid; $search = "&doaction=dozt&classid={$classid}"; //标题链接 $titleurl = sys_ReturnBqZtname($n_r); $title = stripSlashes($n_r['ztname']); $pagetitle = ehtmlspecialchars($title); //评分 $infopfennum = 0; $pinfopfen = 0; $url = ReturnZtLink($n_r['ztid']) . " > " . $fun_r[pl]; } else { if (empty($id) || empty($classid)) { printerror("ErrorUrl", "history.go(-1)", 1); } if (empty($class_r[$classid][tbname]) || InfoIsInTable($class_r[$classid][tbname])) { printerror("ErrorUrl", "history.go(-1)", 1); } $n_r = $empire->fetch1("select * from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1"); if (!$n_r['id'] || $n_r['classid'] != $classid) { printerror("ErrorUrl", "history.go(-1)", 1); } $pubid = ReturnInfoPubid($classid, $id); $search = "&classid={$classid}&id=" . $id; //标题链接 $titleurl = sys_ReturnBqTitleLink($n_r); $title = stripSlashes($n_r[title]); $pagetitle = ehtmlspecialchars($title); //评分 $infopfennum = $n_r['infopfennum']; $pinfopfen = $infopfennum ? round($n_r['infopfen'] / $infopfennum) : 0;
<?php require "../class/connect.php"; require "../class/db_sql.php"; require "../class/q_functions.php"; require "../data/dbcache/class.php"; $link = db_connect(); $empire = new mysqlquery(); define('WapPage', 'list'); $usewapstyle = ''; $wapstyle = 0; $pr = array(); require "wapfun.php"; //栏目ID $classid = (int) $_GET['classid']; if (!$classid || !$class_r[$classid]['tbname'] || InfoIsInTable($class_r[$classid]['tbname'])) { DoWapShowMsg('您来自的链接不存在', 'index.php?style=' . $wapstyle); } $pagetitle = $class_r[$classid]['classname']; $bclassid = (int) $_GET['bclassid']; $search = ''; $add = ''; if ($class_r[$classid]['islast']) { $add .= "classid='{$classid}'"; } else { $where = ReturnClass($class_r[$classid][sonclass]); $add .= "(" . $where . ")"; } $modid = $class_r[$classid][modid]; //优化 $yhid = $class_r[$classid][yhid];
require '../class/functions.php'; require '../class/t_functions.php'; require LoadLang('pub/fun.php'); require '../data/dbcache/class.php'; require '../data/dbcache/MemberLevel.php'; $link = db_connect(); $empire = new mysqlquery(); $classid = (int) $_GET['classid']; $id = (int) $_GET['id']; $page = (int) $_GET['page']; $page = RepPIntvar($page); $mid = $class_r[$classid]['modid']; $tbname = $class_r[$classid]['tbname']; //验证IP eCheckAccessDoIp('showinfo'); if (!$classid || !$id || !$mid || !$tbname || InfoIsInTable($tbname)) { printerror('此信息不存在', '', 1, 0, 1); } $r = $empire->fetch1("select * from {$dbtbpre}ecms_" . $tbname . " where id='{$id}' limit 1"); if (!$r['id'] || $classid != $r['classid']) { printerror('此信息不存在', '', 1, 0, 1); } //外部链接 if ($r['isurl']) { $titleurl = $r['titleurl']; Header("Location:{$titleurl}"); exit; } //moreport if (Moreport_ReturnMustDt()) { $class_r[$classid]['showdt'] = 2;
<?php require '../../class/connect.php'; require '../../class/db_sql.php'; require '../../class/functions.php'; require '../../class/t_functions.php'; require '../' . LoadLang('pub/fun.php'); require '../../data/dbcache/class.php'; require '../../data/dbcache/MemberLevel.php'; $link = db_connect(); $empire = new mysqlquery(); $editor = 1; $classid = (int) $_GET['classid']; $id = (int) $_GET['id']; //内部表 if (!$classid || !$id || !$class_r[$classid]['tbname'] || InfoIsInTable($class_r[$classid]['tbname']) || Moreport_ReturnMustDt()) { printerror('ErrorUrl', 'history.go(-1)', 1); } $addgethtmlpath = '../'; $titleurl = DoGetHtml($classid, $id); db_close(); $empire = null; Header("Location:{$titleurl}");
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(); $editor = 1; $classid = (int) $_GET['classid']; if (empty($classid)) { printerror("ErrorUrl", "history.go(-1)", 1); } $search = '&classid=' . $classid; $tbname = $class_r[$classid][tbname]; $mid = $class_r[$classid][modid]; if (empty($tbname) || empty($mid) || InfoIsInTable($tbname)) { printerror("ErrorUrl", "history.go(-1)", 1); } $cr = $empire->fetch1("select classid,classpagekey,intro,classimg,cgroupid,islist,classtempid,listdt,bdinfoid,repagenum,islast,infos from {$dbtbpre}enewsclass where classid='{$classid}'"); if (empty($cr['classid'])) { printerror("ErrorUrl", "history.go(-1)", 1); } if ($class_r[$classid][islast] && $cr['bdinfoid']) { printerror("ErrorUrl", "history.go(-1)", 1); } //moreport if (Moreport_ReturnMustDt()) { $class_r[$classid]['listdt'] = 1; $cr['repagenum'] = 0; $cr['listdt'] = 1; }
require "../class/db_sql.php"; require "../data/dbcache/class.php"; require "../member/class/user.php"; require "../class/q_functions.php"; require LoadLang("pub/fun.php"); $link = db_connect(); $empire = new mysqlquery(); //验证是否登陆 $user = islogin(); //取得模型id $mid = (int) $_GET['mid']; if (!$mid) { printerror("ErrorUrl", "history.go(-1)", 1); } $mr = $empire->fetch1("select tbname,qmname,listfile,sonclass from {$dbtbpre}enewsmod where mid='{$mid}'"); if (!$mr['tbname'] || InfoIsInTable($mr['tbname'])) { printerror("ErrorUrl", "history.go(-1)", 1); } esetcookie("qdelinfo", "dgcms"); $totalnum = (int) $_GET['totalnum']; $start = 0; $page = (int) $_GET['page']; $page = RepPIntvar($page); $line = 25; //每行显示 $page_line = 10; $offset = $page * $line; $add = ''; $search = "&mid={$mid}"; //审核表 $ecmscheck = (int) $_GET['ecmscheck'];
//关闭模块 $link = db_connect(); $empire = new mysqlquery(); $getvar = $_GET['getvar']; if (empty($getvar)) { $getfrom = "history.go(-1)"; } else { $getfrom = "../../../search/"; } //搜索结果 $searchid = (int) $_GET['searchid']; if (empty($searchid)) { printerror("SearchNotRecord", $getfrom, 1); } $search_r = $empire->fetch1("select searchid,keyboard,result_num,orderby,myorder,tbname,tempid,andsql,trueclassid from {$dbtbpre}enewssearch where searchid='{$searchid}'"); if (empty($search_r['searchid']) || InfoIsInTable($search_r[tbname])) { printerror("SearchNotRecord", $getfrom, 1); } $page = (int) $_GET['page']; $page = RepPIntvar($page); $start = 0; $page_line = $public_r['search_pagenum']; //每页显示链接数 $line = $public_r['search_num']; //每页显示记录数 $offset = $page * $line; //总偏移量 $search = "&searchid=" . $searchid; $myorder = $search_r[orderby]; if (empty($search_r[myorder])) { $myorder .= " desc";
require '../' . LoadLang('pub/fun.php'); $link = db_connect(); $empire = new mysqlquery(); $editor = 1; $ttid = (int) $_GET['ttid']; if (empty($ttid)) { printerror("ErrorUrl", "history.go(-1)", 1); } $search = '&ttid=' . $ttid; $mid = $class_tr[$ttid]['mid']; if (empty($mid)) { printerror("ErrorUrl", "history.go(-1)", 1); } $ttr = $empire->fetch1("select typeid,tname,mid,yhid,tnum,listtempid,tpath,ttype,maxnum,reorder,tid,tbname,timg,intro,pagekey,listdt,repagenum from {$dbtbpre}enewsinfotype where typeid='{$ttid}'"); $tbname = $ttr['tbname']; if (empty($ttr['typeid']) || empty($tbname) || InfoIsInTable($tbname)) { printerror("ErrorUrl", "history.go(-1)", 1); } //moreport if (Moreport_ReturnMustDt()) { $ttr['listdt'] = 1; $ttr['repagenum'] = 0; } //是否支持动态页 if (empty($ttr['listdt']) && !$ttr['repagenum']) { $tturl = sys_ReturnBqInfoTypeUrl($ttid); Header("Location:{$tturl}"); exit; } $GLOBALS['navclassid'] = $ttid; $url = ReturnInfoTypeLink($ttid);
require "../class/qinfofun.php"; require "../member/class/user.php"; require "../data/dbcache/class.php"; require "../data/dbcache/MemberLevel.php"; $link = db_connect(); $empire = new mysqlquery(); if ($public_r['addnews_ok']) { printerror("NotOpenCQInfo", "", 1); } //验证本时间允许操作 eCheckTimeCloseDo('info'); //验证IP eCheckAccessDoIp('postinfo'); $classid = (int) $_GET['classid']; $mid = $class_r[$classid]['modid']; if (empty($classid) || empty($mid) || InfoIsInTable($class_r[$classid]['tbname'])) { printerror("EmptyQinfoCid", "", 1); } $enews = RepPostStr($_GET['enews'], 1); if (empty($enews)) { $enews = "MAddInfo"; } $r = array(); $memberinfor = array(); $muserid = (int) getcvar('mluserid'); $musername = RepPostVar(getcvar('mlusername')); $mrnd = RepPostVar(getcvar('mlrnd')); $id = 0; $newstime = time(); $r[newstime] = date("Y-m-d H:i:s"); $todaytime = $r[newstime];
<?php require "../../class/connect.php"; require "../../class/db_sql.php"; require "../../class/q_functions.php"; require "../../data/dbcache/class.php"; $link = db_connect(); $empire = new mysqlquery(); $editor = 1; $id = (int) $_GET['id']; $classid = (int) $_GET['classid']; if (!$id || !$classid || !$class_r[$classid][tbname] || InfoIsInTable($class_r[$classid][tbname])) { printerror("ErrorUrl", "history.go(-1)", 1); } $r = $empire->fetch1("select title,isurl,titleurl,classid,id from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1"); if (empty($r['id']) || $r['classid'] != $classid) { printerror("ErrorUrl", "history.go(-1)", 1); } //分类 $cid = (int) $_GET['cid']; $titleurl = sys_ReturnBqTitleLink($r); //导入模板 require ECMS_PATH . DASHBOARD . '/template/public/report.php'; db_close(); $empire = null;
function GetHtml($classid, $id, $add, $ecms = 0, $doall = 0) { global $public_r, $class_r, $class_zr, $fun_r, $empire, $dbtbpre, $emod_r, $class_tr, $level_r, $etable_r; $mid = $class_r[$classid]['modid']; $tbname = $class_r[$classid][tbname]; if (InfoIsInTable($tbname)) { return ''; } if ($ecms == 0) { $add = $empire->fetch1("select " . ReturnSqlTextF($mid, 1) . " from {$dbtbpre}ecms_" . $tbname . " where id='{$id}' limit 1"); } $add['id'] = $id; $add['classid'] = $classid; if ($add['isurl']) { return ''; } if (empty($doall)) { if (!$add['stb'] || $class_r[$add[classid]][showdt] == 2 || strstr($public_r['nreinfo'], ',' . $add['classid'] . ',')) { return ''; } } //副表 $addr = $empire->fetch1("select " . ReturnSqlFtextF($mid) . " from {$dbtbpre}ecms_" . $tbname . "_data_" . $add[stb] . " where id='{$add['id']}' limit 1"); $add = array_merge($add, $addr); //路径 $iclasspath = ReturnSaveInfoPath($add[classid], $add[id]); $doclasspath = eReturnTrueEcmsPath() . $iclasspath; //moreport $createinfopath = $doclasspath; //建立日期目录 $newspath = ''; if ($add[newspath]) { $createpath = $doclasspath . $add[newspath]; if (!file_exists($createpath)) { $r[newspath] = FormatPath($add[classid], $add[newspath], 1); } $createinfopath .= $add[newspath] . '/'; $newspath = $add[newspath] . '/'; } //新建存放目录 if ($class_r[$add[classid]][filename] == 3) { $createinfopath .= ReturnInfoSPath($add['filename']); DoMkdir($createinfopath); $fn3 = 1; } //存文本 if ($emod_r[$mid]['savetxtf']) { $stf = $emod_r[$mid]['savetxtf']; if ($add[$stf]) { $add[$stf] = GetTxtFieldText($add[$stf]); } } $GLOBALS['navclassid'] = $add[classid]; $GLOBALS['navinfor'] = $add; //取得内容模板 $add[newstempid] = $add[newstempid] ? $add[newstempid] : $class_r[$add[classid]][newstempid]; $newstemp_r = $empire->fetch1("select temptext,showdate from " . GetTemptb("enewsnewstemp") . " where tempid='{$add['newstempid']}' limit 1"); $newstemp_r['tempid'] = $add['newstempid']; if ($public_r['opennotcj']) { $newstemp_r['temptext'] = ReturnNotcj($newstemp_r['temptext']); } $newstemptext = $newstemp_r[temptext]; $formatdate = $newstemp_r[showdate]; //文件类型/权限 if ($add[groupid] || $class_r[$add[classid]]['cgtoinfo']) { if (empty($add[newspath])) { $include = ''; } else { $pr = explode('/', $add[newspath]); for ($i = 0; $i < count($pr); $i++) { $include .= '../'; } } if ($fn3 == 1) { $include .= '../'; } $pr = explode('/', $iclasspath); $pcount = count($pr); for ($i = 0; $i < $pcount - 1; $i++) { $include .= '../'; } $include1 = $include; $include .= 'e/class/CheckLevel.php'; $filetype = '.php'; $addlevel = "<?php\n\t\tdefine('empirecms','wm_chief');\n\t\t\$check_tbname='" . $class_r[$add[classid]][tbname] . "';\n\t\t\$check_infoid=" . $add[id] . ";\n\t\t\$check_classid=" . $add[classid] . ";\n\t\t\$check_path=\"" . $include1 . "\";\n\t\trequire(\"" . $include . "\");\n\t\t?>"; } else { $filetype = $class_r[$add[classid]][filetype]; $addlevel = ''; } //取得本目录链接 if ($class_r[$add[classid]][classurl] && $class_r[$add[classid]][ipath] == '') { $dolink = $class_r[$add[classid]][classurl] . '/' . $newspath; } else { $dolink = $public_r[newsurl] . $iclasspath . $newspath; } //返回替换验证字符 $docheckrep = ReturnCheckDoRepStr(); if ($add[newstext]) { if (empty($public_r['dorepword']) && $docheckrep[3]) { $add[newstext] = ReplaceWord($add[newstext]); //过滤字符 } if (empty($public_r['dorepkey']) && $docheckrep[4] && !empty($add[dokey])) { $add[newstext] = ReplaceKey($add['newstext'], $add['classid']); } if ($public_r['opencopytext']) { $add[newstext] = AddNotCopyRndStr($add[newstext]); //随机复制字符 } } //返回编译 $newstemptext = GetInfoNewsBq($classid, $newstemp_r, $add, $docheckrep); //分页字段 $expage = '[!--empirenews.page--]'; //分页符 $pf = $emod_r[$mid]['pagef']; //变量替换 $newstempstr = $newstemptext; //模板 //分页 if ($pf && strstr($add[$pf], $expage)) { $n_r = explode($expage, $add[$pf]); $thispagenum = count($n_r); //取得分页 $thefun = $public_r['textpagefun'] ? $public_r['textpagefun'] : 'sys_ShowTextPage'; //下拉式分页 if (strstr($newstemptext, '[!--title.select--]')) { $dotitleselect = sys_ShowTextPageSelect($thispagenum, $dolink, $add, $filetype, $n_r); } for ($j = 1; $j <= $thispagenum; $j++) { $string = $newstempstr; //模板 $truepage = ''; $titleselect = ''; //下一页链接 if ($thispagenum == $j) { $thisnextlink = $dolink . $add[filename] . $filetype; } else { $thisj = $j + 1; $thisnextlink = $dolink . $add[filename] . '_' . $thisj . $filetype; } $k = $j - 1; if ($j == 1) { $file = $doclasspath . $newspath . $add[filename] . $filetype; $ptitle = $add[title]; } else { $file = $doclasspath . $newspath . $add[filename] . '_' . $j . $filetype; $ti_r = explode('[/!--empirenews.page--]', $n_r[$k]); if (count($ti_r) >= 2) { $ptitle = $ti_r[0]; $n_r[$k] = $ti_r[1]; } else { $ptitle = $add[title] . '(' . $j . ')'; } } //取得当前页 if ($thispagenum != 1) { $truepage = $thefun($thispagenum, $j, $dolink, $add, $filetype, ''); $titleselect = str_replace("?" . $j . "\">", "?" . $j . "\" selected>", $dotitleselect); } //替换变量 $newstext = $n_r[$k]; if (!strstr($emod_r[$mid]['editorf'], ',' . $pf . ',')) { if (strstr($emod_r[$mid]['tobrf'], ',' . $pf . ',')) { $newstext = nl2br($newstext); } if (!strstr($emod_r[$mid]['dohtmlf'], ',' . $pf . ',')) { $newstext = ehtmlspecialchars($newstext); $newstext = RepFieldtextNbsp($newstext); } } $string = str_replace('[!--' . $pf . '--]', $newstext, $string); $string = str_replace('[!--p.title--]', strip_tags($ptitle), $string); $string = str_replace('[!--next.page--]', $thisnextlink, $string); $string = str_replace('[!--page.url--]', $truepage, $string); $string = str_replace('[!--title.select--]', $titleselect, $string); //写文件 WriteFiletext($file, $addlevel . $string); } } else { $file = $doclasspath . $newspath . $add[filename] . $filetype; $string = $newstempstr; //模板 //替换变量 $string = str_replace('[!--p.title--]', $add[title], $string); $string = str_replace('[!--next.page--]', '', $string); $string = str_replace('[!--page.url--]', '', $string); $string = str_replace('[!--title.select--]', '', $string); //写文件 WriteFiletext($file, $addlevel . $string); } //设为已生成 if (empty($doall) && empty($add['havehtml'])) { $empire->query("update {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . "_index set havehtml=1 where id='{$add['id']}' limit 1"); $empire->query("update {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . " set havehtml=1 where id='{$add['id']}' limit 1"); } }
require "../class/connect.php"; require "../class/db_sql.php"; $link = db_connect(); $empire = new mysqlquery(); //关闭投稿 if ($public_r['addnews_ok']) { printerror("CloseQAdd", "", 1); } //验证本时间允许操作 eCheckTimeCloseDo('info'); //验证IP eCheckAccessDoIp('postinfo'); $mid = (int) $_GET['mid']; if (empty($mid)) { printerror("ErrorUrl", "", 1); } $mr = $empire->fetch1("select mid,qenter,qmname,tbname from {$dbtbpre}enewsmod where mid='{$mid}'"); if (!$mr['mid'] || !$mr['qenter'] || InfoIsInTable($mr['tbname'])) { printerror("ErrorUrl", "", 1); } $muserid = (int) getcvar('mluserid'); $musername = RepPostVar(getcvar('mlusername')); if (empty($musername)) { $musername = "******"; } $classjs = $public_r['newsurl'] . "d/js/js/addinfo" . $mid . ".js"; //导入模板 require ECMS_PATH . DASHBOARD . '/template/DoInfo/ChangeClass.php'; db_close(); $empire = null;