本文整理汇总了PHP中ReturnClass函数的典型用法代码示例。如果您正苦于以下问题:PHP ReturnClass函数的具体用法?PHP ReturnClass怎么用?PHP ReturnClass使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ReturnClass函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ReNewsHtml
function ReNewsHtml($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $havehtml)
{
global $empire, $public_r, $class_r, $fun_r, $dbtbpre, $etable_r;
$tbname = RepPostVar($tbname);
if (empty($tbname)) {
printerror("ErrorUrl", "history.go(-1)");
}
$start = (int) $start;
//按ID
if ($retype) {
$startid = (int) $startid;
$endid = (int) $endid;
$add1 = $endid ? ' and id>=' . $startid . ' and id<=' . $endid : '';
} else {
$startday = RepPostVar($startday);
$endday = RepPostVar($endday);
$add1 = $startday && $endday ? ' and truetime>=' . to_time($startday . ' 00:00:00') . ' and truetime<=' . to_time($endday . ' 23:59:59') : '';
}
//按栏目
$classid = (int) $classid;
if ($classid) {
$where = empty($class_r[$classid][islast]) ? ReturnClass($class_r[$classid][sonclass]) : "classid='{$classid}'";
$add1 .= ' and ' . $where;
}
//不生成
$add1 .= ReturnNreInfoWhere();
//是否重复生成
if ($havehtml != 1) {
$add1 .= ' and havehtml=0';
}
//优化
$yhadd = '';
$yhid = $etable_r[$tbname][yhid];
$yhvar = 'rehtml';
if ($yhid) {
$yhadd = ReturnYhSql($yhid, $yhvar);
}
$b = 0;
$sql = $empire->query("select * from {$dbtbpre}ecms_" . $tbname . " where " . $yhadd . "id>{$start}" . $add1 . " and checked=1 order by id limit " . $public_r[renewsnum]);
while ($r = $empire->fetch($sql)) {
if (!empty($r['titleurl']) || $class_r[$r[classid]][showdt] == 2) {
continue;
}
$b = 1;
GetHtml($r, '', 1);
//生成信息文件
$new_start = $r[id];
}
if (empty($b)) {
echo "<link rel=\"stylesheet\" href=\"../data/images/css.css\" type=\"text/css\"><center><b>" . $tbname . $fun_r[ReTableIsOK] . "!</b></center>";
db_close();
$empire = null;
exit;
}
echo "<link rel=\"stylesheet\" href=\"../data/images/css.css\" type=\"text/css\"><meta http-equiv=\"refresh\" content=\"" . $public_r['realltime'] . ";url=ecmschtml.php?enews=ReNewsHtml&tbname={$tbname}&classid={$classid}&start={$new_start}&from={$from}&retype={$retype}&startday={$startday}&endday={$endday}&startid={$startid}&endid={$endid}&havehtml={$havehtml}&reallinfotime=" . $_GET['reallinfotime'] . "\">" . $fun_r[OneReNewsHtmlSuccess] . "(ID:<font color=red><b>" . $new_start . "</b></font>)";
exit;
}
示例2: ReInfoUrl
function ReInfoUrl($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $userid, $username)
{
global $empire, $public_r, $class_r, $fun_r, $dbtbpre;
//验证权限
//CheckLevel($userid,$username,$classid,"changedata");
$start = (int) $start;
$tbname = RepPostVar($tbname);
if (empty($tbname) || !eCheckTbname($tbname)) {
printerror("ErrorUrl", "history.go(-1)");
}
$add1 = '';
//按栏目刷新
$classid = (int) $classid;
if ($classid) {
if (empty($class_r[$classid][islast])) {
$where = ReturnClass($class_r[$classid][sonclass]);
} else {
$where = "classid='{$classid}'";
}
$add1 = " and (" . $where . ")";
}
//按ID刷新
if ($retype) {
$startid = (int) $startid;
$endid = (int) $endid;
if ($endid) {
$add1 .= " and id>={$startid} and id<={$endid}";
}
} else {
$startday = RepPostVar($startday);
$endday = RepPostVar($endday);
if ($startday && $endday) {
$add1 .= " and truetime>=" . to_time($startday . " 00:00:00") . " and truetime<=" . to_time($endday . " 23:59:59");
}
}
$b = 0;
$sql = $empire->query("select id,classid,checked from {$dbtbpre}ecms_" . $tbname . "_index where id>{$start}" . $add1 . " order by id limit " . $public_r[delnewsnum]);
while ($r = $empire->fetch($sql)) {
$b = 1;
$new_start = $r[id];
//返回表
$infotb = ReturnInfoMainTbname($tbname, $r['checked']);
$infor = $empire->fetch1("select newspath,filename,groupid,isurl,titleurl from " . $infotb . " where id='{$r['id']}' limit 1");
$infourl = GotoGetTitleUrl($r['classid'], $r['id'], $infor['newspath'], $infor['filename'], $infor['groupid'], $infor['isurl'], $infor['titleurl']);
$empire->query("update " . $infotb . " set titleurl='{$infourl}' where id='{$r['id']}' limit 1");
}
if (empty($b)) {
insert_dolog("");
//操作日志
printerror("ReInfoUrlSuccess", $from);
}
echo $fun_r[OneReInfoUrlSuccess] . "(ID:<font color=red><b>" . $new_start . "</b></font>)<script>self.location.href='ReInfoUrl.php?enews=ReInfoUrl&tbname={$tbname}&classid={$classid}&start={$new_start}&from=" . urlencode($from) . "&retype={$retype}&startday={$startday}&endday={$endday}&startid={$startid}&endid={$endid}" . hReturnEcmsHashStrHref(0) . "';</script>";
exit;
}
示例3:
{
$add.=" and cid='$cid'";
$search.='&cid='.$cid;
}
//系统模型
$mid=(int)$_GET['mid'];
if($mid)
{
$add.=" and mid='$mid'";
$search.='&mid='.$mid;
}
//栏目
$classid=(int)$_GET['classid'];
if($classid)
{
$add.=' and '.($class_r[$classid][islast]?"classid='$classid'":"(".ReturnClass($class_r[$classid][sonclass]).")");
$search.='&classid='.$classid;
}
//推荐
$isgood=(int)$_GET['isgood'];
if($isgood)
{
$add.=" and isgood>0";
$search.='&isgood='.$isgood;
}
//排序
$myorder=(int)$_GET['myorder'];
$search.='&myorder='.$myorder;
if($myorder==1)
{
$doorder='zid desc';
示例4: explode
}
//投票
$voter = $empire->fetch1("select * from {$dbtbpre}enewsinfovote where classid='{$classid}' and id='{$id}' limit 1");
if ($voter['id'] && $voter[votetext]) {
$d_record = explode("\r\n", $voter[votetext]);
for ($i = 0; $i < count($d_record); $i++) {
$j = $i + 1;
$d_field = explode("::::::", $d_record[$i]);
$allvote .= "<tr><td width='9%'><div align=center>" . $j . "</div></td><td width='65%'><input name=vote_name[] type=text value='" . $d_field[0] . "' size=30></td><td width='26%'><input name=vote_num[] type=text value='" . $d_field[1] . "' size=6><input type=hidden name=vote_id[] value=" . $j . "><input type=checkbox name=delvote_id[] value=" . $j . ">删除</td></tr>";
}
$voteeditnum = $j;
$allvote = "<table width='100%' border=0 cellspacing=1 cellpadding=3>" . $allvote . "</table>";
}
}
//取得专题类别
$ztwhere = ReturnClass($class_r[$classid][featherclass]);
$z_sql = $empire->query("select ztname,ztid,tbname from {$dbtbpre}enewszt where usezt=0 and (classid=0 or classid='{$classid}' or (" . $ztwhere . ")) order by ztid");
$j = 0;
$br = "";
while ($z_r = $empire->fetch($z_sql)) {
/*
//不同表
if($class_r[$classid][tbname]!=$z_r[tbname])
{continue;}
*/
$j++;
if ($j % 8 == 0) {
$br = "<br>";
} else {
$br = "";
}
示例5: RepPostVar
//栏目
$trueclassid = 0;
$classid = $_GET['classid'];
if ($classid) {
$classid = RepPostVar($classid);
if (strstr($classid, ',')) {
$son_r = sys_ReturnMoreClass($classid, 1);
$trueclassid = $son_r[0];
$add .= ' and (' . $son_r[1] . ')';
} else {
$trueclassid = intval($classid);
if ($class_r[$trueclassid][islast]) {
$add .= " and classid='{$trueclassid}'";
$have_class = 0;
} else {
$add .= ' and ' . ReturnClass($class_r[$trueclassid][sonclass]);
}
$pageclassid = $trueclassid;
$GLOBALS['navclassid'] = $trueclassid;
}
if (empty($class_r[$trueclassid][tbname])) {
printerror('ErrorUrl', '', 1);
}
$search .= '&classid=' . $classid;
}
//时间
if ($_GET['endtime']) {
$starttime = RepPostVar($_GET['starttime']);
if (empty($starttime)) {
$starttime = '0000-00-00';
}
示例6: DtNewsBq
$string = DtNewsBq($dttempname, $classtemp, 0);
$string = str_replace('[!--newsnav--]', $url, $string);
//位置导航
$string = Class_ReplaceSvars($string, $url, $classid, $pagetitle, $pagekey, $pagedes, $classimg, $addr, 0);
$string = str_replace('[!--page.stats--]', '', $string);
echo stripSlashes($string);
exit;
}
//---列表式---
$add = '';
//栏目
if ($class_r[$classid][islast]) {
$add .= "classid='{$classid}'";
$have_class = 0;
} else {
$add .= ReturnClass($class_r[$classid][sonclass]);
$have_class = 1;
}
//排序
if (empty($class_r[$classid][reorder])) {
$addorder = "newstime desc";
} else {
$addorder = $class_r[$classid][reorder];
}
//列表模板
$tempid = $class_r[$classid]['dtlisttempid'] ? $class_r[$classid]['dtlisttempid'] : $class_r[$classid]['listtempid'];
if (empty($tempid)) {
printerror('ErrorUrl', '', 1);
}
$tempr = $empire->fetch1("select tempid,temptext,subnews,listvar,rownum,showdate,modid,subtitle,docode from " . GetTemptb("enewslisttemp") . " where tempid='{$tempid}'");
if (empty($tempr[tempid])) {
示例7: and
$ids .= $dh . $infoid;
$dh = ',';
}
if ($ids) {
if ($pid) {
$ids .= ',' . $pid;
}
} else {
$ids = $pid;
}
//栏目
if ($classid) {
if ($class_r[$classid][islast]) {
$add .= " and classid='{$classid}'";
} else {
$add .= " and (" . ReturnClass($class_r[$classid][sonclass]) . ")";
}
}
//搜索
if ($keyboard) {
$kbr = explode(' ', $keyboard);
$kbcount = count($kbr);
$kbor = '';
$kbwhere = '';
for ($kbi = 0; $kbi < $kbcount; $kbi++) {
if (!$kbr[$kbi]) {
continue;
}
if ($show == 1) {
$kbwhere .= $kbor . "title like '%" . $kbr[$kbi] . "%'";
} elseif ($show == 2) {
示例8: RepPostStr
$searchvarclassid = '';
if ($isinfofile == 1) {
$searchclassid = RepPostStr($_GET['searchclassid'], 1);
if ($searchclassid == 'all') {
$searchclassid = 0;
$searchvarclassid = 'all';
} else {
$searchclassid = $searchclassid ? $searchclassid : $classid;
$searchvarclassid = $searchclassid;
}
$searchclassid = (int) $searchclassid;
if ($searchclassid) {
if ($class_r[$searchclassid]['islast']) {
$add .= " and classid='{$searchclassid}'";
} else {
$add .= " and " . ReturnClass($class_r[$searchclassid]['sonclass']);
}
}
}
//时间范围
$filelday = (int) $_GET['filelday'];
if (empty($filelday)) {
$filelday = $public_r['filelday'];
}
if ($filelday && $filelday != 1) {
$ckfilelday = time() - $filelday;
$add .= " and filetime>{$ckfilelday}";
}
//当前信息
$sinfo = (int) $_GET['sinfo'];
$select_sinfo = '';
示例9: DelClass1
function DelClass1($classid)
{
global $empire, $class_r, $dbtbpre;
$r = $empire->fetch1("select * from {$dbtbpre}enewsclass where classid='{$classid}'");
//外部栏目
if ($r[wburl]) {
$sql = $empire->query("delete from {$dbtbpre}enewsclass where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}enewsclassadd where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}enewsclass_stats where classid='{$classid}'");
//删除栏目附件
DelFileOtherTable("modtype=1 and id='{$classid}'");
//删除缓存
DelListEnews();
return "";
}
//删除终极栏目
if ($r[islast]) {
//删除主表信息
$indexsql = $empire->query("delete from {$dbtbpre}ecms_" . $r[tbname] . "_index where classid='{$classid}'");
$sql = $empire->query("delete from {$dbtbpre}ecms_" . $r[tbname] . " where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}ecms_" . $r[tbname] . "_check where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}ecms_" . $r[tbname] . "_doc where classid='{$classid}'");
//删除副表信息
DelAllDataTbInfo($r['tbname'], "classid='{$classid}'", 1, 1);
//删除存文本文件
DelInfoSaveTxtfile($r['modid'], $r['tbname'], "classid='{$classid}'");
//删除信息附加表与附件
DelMoreInfoOtherData($classid, 0, 0);
$filepath = "../../data/" . $r[classpath];
$delf = DelPath($filepath);
DelFileOtherTable("modtype=1 and id='{$classid}'");
//删除栏目本身
$sql1 = $empire->query("delete from {$dbtbpre}enewsclass where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}enewsclassadd where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}enewsclass_stats where classid='{$classid}'");
$delpath = "../../" . $r[classpath];
$del = DelPath($delpath);
//更新大栏目的子栏目
$where = ReturnClass($r[featherclass]);
if (empty($where)) {
$where = "classid=0";
}
$bsql = $empire->query("select sonclass,classid from {$dbtbpre}enewsclass where " . $where);
while ($br = $empire->fetch($bsql)) {
$newsonclass = str_replace("|" . $classid . "|", "|", $br[sonclass]);
$usql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$br['classid']}'");
}
} else {
//删除栏目
$where = ReturnClass($r[sonclass]);
if (empty($where)) {
$where = "classid=0";
}
$delcr = explode("|", $r[sonclass]);
$count = count($delcr);
for ($i = 1; $i < $count - 1; $i++) {
$delcid = $delcr[$i];
//删除主表信息
$indexsql = $empire->query("delete from {$dbtbpre}ecms_" . $class_r[$delcid][tbname] . "_index where classid='{$delcid}'");
$sql = $empire->query("delete from {$dbtbpre}ecms_" . $class_r[$delcid][tbname] . " where classid='{$delcid}'");
$empire->query("delete from {$dbtbpre}ecms_" . $class_r[$delcid][tbname] . "_check where classid='{$delcid}'");
$empire->query("delete from {$dbtbpre}ecms_" . $class_r[$delcid][tbname] . "_doc where classid='{$delcid}'");
//删除副表信息
DelAllDataTbInfo($class_r[$delcid][tbname], "classid='{$delcid}'", 1, 1);
//删除存文本文件
DelInfoSaveTxtfile($class_r[$delcid][modid], $class_r[$delcid][tbname], "classid='{$delcid}'");
//删除信息附加表与附件
DelMoreInfoOtherData($delcid, 0, 0);
}
//删除附件
$filepath = "../../data/" . $r[classpath];
$delf = DelPath($filepath);
if ($where != 'classid=0') {
DelFileOtherTable("modtype=1 and (" . str_replace('classid', 'id', $where) . ")");
}
//删除子栏目副表
$fcsql = $empire->query("select classid from {$dbtbpre}enewsclass where featherclass like '%|" . $classid . "|%'");
while ($fcr = $empire->fetch($fcsql)) {
$empire->query("delete from {$dbtbpre}enewsclassadd where classid='{$fcr['classid']}'");
$empire->query("delete from {$dbtbpre}enewsclass_stats where classid='{$fcr['classid']}'");
}
//删除子栏目
$sql1 = $empire->query("delete from {$dbtbpre}enewsclass where featherclass like '%|" . $classid . "|%'");
//改变父栏目的子类
$where = ReturnClass($r[featherclass]);
if (empty($where)) {
$where = "classid=0";
}
$bbsql = $empire->query("select classid,sonclass from {$dbtbpre}enewsclass where " . $where);
while ($bbr = $empire->fetch($bbsql)) {
$newsonclass = str_replace($r[sonclass], "|", $bbr[sonclass]);
$usql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$bbr['classid']}'");
}
//删除栏目本身
$sql2 = $empire->query("delete from {$dbtbpre}enewsclass where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}enewsclassadd where classid='{$classid}'");
$empire->query("delete from {$dbtbpre}enewsclass_stats where classid='{$classid}'");
//删除栏目附件
DelFileOtherTable("modtype=1 and id='{$classid}'");
$delpath = "../../" . $r[classpath];
//.........这里部分代码省略.........
示例10: empty
$sztr = $empire->fetch1("select ztid,restb from {$dbtbpre}enewszt where ztid='{$ztid}'");
if ($sztr['ztid']) {
$and = empty($add) ? ' where ' : ' and ';
$add .= $and . "pubid='-{$ztid}'";
$restb = $sztr['restb'];
}
$search .= "&ztid={$ztid}";
}
//单个
$classid = (int) $_GET['classid'];
if ($classid) {
$and = empty($add) ? ' where ' : ' and ';
if ($class_r[$classid][islast]) {
$add .= $and . "classid='{$classid}'";
} else {
$add .= $and . '(' . ReturnClass($class_r[$classid][sonclass]) . ')';
}
$search .= "&classid={$classid}";
}
//审核
$checked = (int) $_GET['checked'];
if ($checked) {
$and = empty($add) ? ' where ' : ' and ';
$add .= $and . "checked='" . ($checked == 1 ? 0 : 1) . "'";
$search .= "&checked={$checked}";
}
//推荐
$isgood = (int) $_GET['isgood'];
if ($isgood) {
$and = empty($add) ? ' where ' : ' and ';
$add .= $and . "isgood=1";
示例11: DelInfoData
function DelInfoData($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $add, $userid, $username)
{
global $empire, $public_r, $class_r, $fun_r, $dbtbpre, $emod_r;
//验证权限
CheckLevel($userid, $username, $classid, "delinfodata");
$search = '';
$start = (int) $start;
$tbname = RepPostVar($tbname);
if (empty($tbname)) {
printerror("ErrorUrl", "history.go(-1)");
}
$search .= "&tbname={$tbname}";
//查询表
$infotb = "{$dbtbpre}ecms_" . $tbname;
//按栏目
$classid = (int) $classid;
if ($classid) {
if (empty($class_r[$classid][islast])) {
$where = ReturnClass($class_r[$classid][sonclass]);
} else {
$where = "classid='{$classid}'";
}
$add1 = " and (" . $where . ")";
$search .= "&classid={$classid}";
}
//按ID刷新
$search .= "&retype={$retype}";
if ($retype) {
$startid = (int) $startid;
$endid = (int) $endid;
if ($endid) {
$add1 .= " and id>={$startid} and id<={$endid}";
}
$search .= "&startid={$startid}&endid={$endid}";
} else {
$startday = RepPostVar($startday);
$endday = RepPostVar($endday);
if ($startday && $endday) {
$add1 .= " and truetime>=" . to_time($startday . " 00:00:00") . " and truetime<=" . to_time($endday . " 23:59:59");
}
$search .= "&startday={$startday}&endday={$endday}";
}
//信息类型
$delckinfo = 0;
$infost = (int) $add['infost'];
if ($infost) {
if ($infost == 1) {
$delckinfo = 1;
} else {
$infotb = "{$dbtbpre}ecms_" . $tbname . "_check";
$delckinfo = 2;
}
$search .= "&infost={$infost}";
} else {
$dodelcheck = (int) $add['dodelcheck'];
if ($dodelcheck) {
$infotb = "{$dbtbpre}ecms_" . $tbname . "_check";
$delckinfo = 2;
$search .= "&dodelcheck=1";
}
}
//用户发布
$ismember = (int) $add['ismember'];
if ($ismember) {
if ($ismember == 1) {
$add1 .= " and userid=0";
} elseif ($ismember == 2) {
$add1 .= " and userid>0";
} elseif ($ismember == 3) {
$add1 .= " and userid>0 and ismember=1";
} elseif ($ismember == 4) {
$add1 .= " and userid>0 and ismember=0";
}
$search .= "&ismember={$ismember}";
}
//是否外部链接
$isurl = (int) $add['isurl'];
if ($isurl) {
if ($isurl == 1) {
$add1 .= " and isurl=1";
} else {
$add1 .= " and isurl=0";
}
$search .= "&isurl={$isurl}";
}
//评论数
$plnum = (int) $add['plnum'];
if ($plnum) {
$add1 .= " and plnum<" . $plnum;
$search .= "&plnum={$plnum}";
}
//点击数
$onclick = (int) $add['onclick'];
if ($onclick) {
$add1 .= " and onclick<" . $onclick;
$search .= "&onclick={$onclick}";
}
//下载数
$totaldown = (int) $add['totaldown'];
if ($totaldown) {
//.........这里部分代码省略.........
示例12: ChangeClassListtemp
function ChangeClassListtemp($classid, $listtempid, $userid, $username)
{
global $empire, $class_r, $dbtbpre;
if (empty($listtempid)) {
printerror("EmptChangeListtempid", "history.go(-1)");
}
//验证权限
CheckLevel($userid, $username, $classid, "template");
$listtempid = (int) $listtempid;
$classid = (int) $classid;
if (empty($classid)) {
$where = "classid<>0";
} else {
//中级栏目
if (empty($class_r[$classid][islast])) {
$where = ReturnClass($class_r[$classid][sonclass]);
} else {
$where = "classid='{$classid}'";
}
}
$sql = $empire->query("update {$dbtbpre}enewsclass set listtempid={$listtempid} where " . $where);
GetClass();
if ($sql) {
//操作日志
insert_dolog("classid={$classid}&listtempid={$listtempid}");
printerror("ChangeClassListtempSuccess", "history.go(-1)");
} else {
printerror("DbError", "history.go(-1)");
}
}
示例13: ReturnClassInfoNum
function ReturnClassInfoNum($cr, $ecms = 0)
{
global $empire, $dbtbpre, $class_r;
if ($cr['islast']) {
$num = $ecms == 0 ? $cr['infos'] : $cr['allinfos'];
} else {
$f = $ecms == 0 ? 'infos' : 'allinfos';
$num = $empire->gettotal("select sum(" . $f . ") as total from {$dbtbpre}enewsclass where " . ReturnClass($class_r[$cr[classid]][sonclass]));
$num = (int) $num;
}
return $num;
}
示例14: DelMorePl
function DelMorePl($add, $logininid, $loginin)
{
global $empire, $dbtbpre, $public_r, $class_r;
CheckLevel($logininid, $loginin, $classid, "pl");
//验证权限
//变量处理
$restb = (int) $add['restb'];
$username = RepPostVar($add['username']);
$sayip = RepPostVar($add['sayip']);
$saytext = RepPostStr($add['saytext']);
$startplid = (int) $add['startplid'];
$endplid = (int) $add['endplid'];
$startsaytime = RepPostVar($add['startsaytime']);
$endsaytime = RepPostVar($add['endsaytime']);
$checked = (int) $add['checked'];
$ismember = (int) $add['ismember'];
$classid = (int) $add['classid'];
$id = RepPostVar($add['id']);
if (!$restb || !strstr($public_r['pldatatbs'], ',' . $restb . ',')) {
printerror("EmptyDelMorePl", "history.go(-1)");
}
$where = '';
//栏目
if ($classid) {
if (empty($class_r[$classid][islast])) {
$cwhere = ReturnClass($class_r[$classid][sonclass]);
} else {
$cwhere = "classid='{$classid}'";
}
$where .= " and " . $cwhere;
}
//信息ID
if ($id) {
$idr = explode(',', $id);
$ids = '';
$dh = '';
$count = count($idr);
for ($i = 0; $i < $count; $i++) {
$ids .= $dh . intval($idr[$i]);
$dh = ',';
}
$where .= " and id in (" . $ids . ")";
}
//是否会员
if ($ismember) {
if ($ismember == 1) {
$where .= " and userid=0";
} else {
$where .= " and userid>0";
}
}
//发布者
if ($username) {
$where .= " and username like '%{$username}%'";
}
//发布IP
if ($sayip) {
$where .= " and sayip like '%{$sayip}%'";
}
//发布内容
if ($saytext) {
$twhere = '';
$or = '';
$tr = explode('|', $saytext);
$count = count($tr);
for ($i = 0; $i < $count; $i++) {
$twhere .= $or . "saytext like '%" . $tr[$i] . "%'";
$or = ' or ';
}
$where .= ' and (' . $twhere . ')';
}
//评论ID
if ($endplid) {
$where .= ' and plid BETWEEN ' . $startplid . ' and ' . $endplid;
}
//发布时间
if ($startsaytime && $endsaytime) {
$startsaytime = to_time($startsaytime . ' 00:00:00');
$endsaytime = to_time($endsaytime . ' 23:59:59');
$where .= " and saytime>='{$startsaytime}' and saytime<='{$endsaytime}'";
}
//是否审核
if ($checked) {
$checkval = $checked == 1 ? 0 : 1;
$where .= " and checked='{$checkval}'";
}
if (!$where) {
printerror("EmptyDelMorePl", "history.go(-1)");
}
$where = substr($where, 5);
$sql = $empire->query("select plid,id,classid,pubid from {$dbtbpre}enewspl_" . $restb . " where " . $where);
$dh = '';
$b = 0;
while ($r = $empire->fetch($sql)) {
$b = 1;
$startid = $r['plid'];
if ($class_r[$r[classid]][tbname] && $r['pubid'] > 0) {
$index_r = $empire->fetch1("select checked from {$dbtbpre}ecms_" . $class_r[$r[classid]][tbname] . "_index where id='{$r['id']}' limit 1");
//返回表
$infotb = ReturnInfoMainTbname($class_r[$r[classid]][tbname], $index_r['checked']);
//.........这里部分代码省略.........
示例15: ShowClass_AddClass
$modr = $empire->fetch1("select enter from {$dbtbpre}enewsmod where mid='{$modid}'");
//栏目
$options = ShowClass_AddClass("", $r[newsclassid], 0, "|-", $class_r[$r[newsclassid]][modid], 4);
if ($r[retitlewriter]) {
$retitlewriter = " checked";
}
if ($r[copyimg]) {
$copyimg = " checked";
}
if ($r[copyflash]) {
$copyflash = " checked";
}
//节点
$infoclass = ShowClass_AddInfoClass($r[bclassid], 0, "|-", 0);
//专题
$ztwhere = ReturnClass($class_r[$r[newsclassid]][featherclass]);
$z_sql = $empire->query("select ztname,ztid,tbname from {$dbtbpre}enewszt where usezt=0 and (classid=0 or classid='{$r['newsclassid']}' or (" . $ztwhere . ")) order by ztid");
$j = 0;
$br = "";
while ($z_r = $empire->fetch($z_sql)) {
/*
//不同表
if($class_r[$r[newsclassid]][tbname]!=$z_r[tbname])
{continue;}
*/
$j++;
if ($j % 6 == 0) {
$br = "<br>";
} else {
$br = "";
}