字典

栗字的意思

栗
拼音
注音ㄌ一ˋ
部首木部
总笔画10画 结构上下
笔顺一丨フ丨丨一一丨ノ丶统一码6817

基本解释

基本字义

lì(ㄌ一ˋ)

⒈  落叶乔木,果实为坚果,称“栗子”,味甜,可食:栗色。火中取栗。

⒉  发抖,因害怕或寒冷肢体颤动:战栗。

⒊  坚实:“缜密以栗”。

⒋  姓。

汉英互译

chestnut、millet、tremble

造字法

象形

English

chestnut tree, chestnuts; surname

详细解释

基本词义

〈名〉

(1) (会意。甲骨文象结了果实的栗树形。本义:木名。果实也称栗,可食)

(2) 一种落叶乔木,果实叫栗子,果仁味甜,可以吃。木材坚实,供建筑和制器具用;树皮可供鞣皮及染色用;叶子可喂柞蚕 [Chinese chestnut;hairy chestnut]

栗,栗木也。——《说文》

树之榛栗。——《诗·鄘风·定之方中》

练主用栗。——《公羊传·文公二年》

哀公同社于 宰我, 宰我对曰:“ 夏后氏以松, 殷人以柏, 周人以栗。”——《论语》

(3) 又如:栗主(用栗木做成的神牌位);栗跗(栗花)

(4) 任一种栗属的乔木或灌木结的可食的甜味坚果 [chestnut]

果至于梨栗枣之类。——宋· 司马光《训俭示康》

(5) 又如:栗黄(即栗子。因其肉色鲜黄而得名);栗爆(栗子在火炉中烘煨而爆裂);栗犊(小牛。因小牛初生时角如栗而得名)

(6) 姓

词性变化

〈形〉

(1) 谷实饱满 [plump-eared]

实坚实好,实颖实栗。——《诗·大雅·民劳》

凡苗自函活以至颖栗,早者食水三斗,晚者食水五斗,失水即枯。——《天工开物》

(2) 坚实 [solid]

缜密以栗,知也。——《礼记·聘义》

(3) 又如:栗理(坚实有文理);栗然(坚实密致貌);栗密(谨严,缜密);栗温(质地密致而润泽)

(4) 庄敬,严肃 [respectful]

命汝典乐,教胄子,直而温,宽而栗。——《书·舜典》

(5) 又如:栗斯(谨慎恭敬的样子)

〈动〉

(1) 恐惧 [fear]

临其穴,惴惴其栗。——《诗·秦风·黄鸟》。毛传:“栗,惧也。”

吾甚栗之。——《庄子·人间世》

慄深林兮惊层巅。(使深林战慄,使层巅震惊。)——唐· 李白《梦游天姥吟留别》

股栗欲堕。——明· 魏禧《大铁椎传》

恐栗。——唐· 柳宗元《童区寄传》

(2) 又如:战栗(发抖);栗栗(戒惧的样子;众多的样子);栗缩(因恐惧而颤栗畏缩);栗斯(看人的脸色)

(3) 哆嗦,发抖 [shudder;tremble]

疟之始发也,先起于毫毛,伸欠,乃作寒慄鼓颔。——《素问》

战战栗栗,日慎一日。——《韩非子·初见秦》

股战而栗。——《史记·齐悼惠王世家》

襄王闻之,颜色变作,身体战栗。——《战国策·楚策》

登高不栗。——《庄子》

(4) 又如:栗栗可惧(形容很害怕);不寒而栗

(5) 忧伤 [worry]

将乍往而未半,怵悼栗而怂兢。——《文选·张衡·西京赋》

(6) 通“历”。历阶 [surpass]

栗阶升,听命,降拜。——《仪礼·聘礼》

(7) 通“裂”。分开 [separate;divide]

有敦瓜苦,烝在栗薪。——《诗·豳风·东山》

〈形〉

(1) 通“凓”。寒、凉 [cold]

凓,寒也。——《说文》

二之二凓。——《诗·豳风·七月》

(2) 又如:栗冽(寒冷的样子);栗烈(凛冽。形容严寒)

偏旁部首

    0) { // MaXian:判断分页是1或者0就跳转 404 header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); printerror('ErrorUrl', 'history.go(-1)', 1); } $page = RepPIntvar($page) ? RepPIntvar($page) : 1; $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 $where limit 1"); if (!$r['id'] || $classid != $r['classid']) { printerror('此信息不存在', '', 1, 0, 1); } $id = $r['id']; //ID重新赋值 //外部链接 if ($r['isurl']) { $titleurl = $r['titleurl']; Header("Location:$titleurl"); exit(); } //moreport if (Moreport_ReturnMustDt()) { $class_r[$classid]['showdt'] = 2; } //是否支持动态内容页 /*if($class_r[$classid]['showdt']!=2){ $titleurl = sys_ReturnBqTitleLink($r); Header("Location:$titleurl"); exit(); }*/ //缓存 if ($public_r['ctimeopen']) { $public_r['usetotalnum'] = 0; } $ecms_tofunr = array(); $ecms_tofunr['cacheuse'] = 0; $ecms_tofunr['cacheselfcid'] = $classid; $ecms_tofunr['cachetype'] = 'textpage'; $ecms_tofunr['cacheids'] = $classid . ',' . $id . ',' . $page; $ecms_tofunr['cachepath'] = 'empirecms'; $ecms_tofunr['cachedatepath'] = 'ctext/' . date('Y/md', $r['truetime']); $ecms_tofunr['cachetime'] = $public_r['ctimetext']; $ecms_tofunr['cachelasttime'] = $public_r['ctimelast']; $ecms_tofunr['cachelastedit'] = $r['lastdotime']; $ecms_tofunr['cacheopen'] = Ecms_eCacheCheckOpen($ecms_tofunr['cachetime']); $ecms_tofunr['cachehavedo'] = 0; if ($ecms_tofunr['cacheopen'] == 1 && !($r['groupid'] || $class_r[$classid]['cgtoinfo'])) { $ecms_tofunr['cacheuse'] = Ecms_eCacheOut($ecms_tofunr, 2); if ($ecms_tofunr['cacheuse']) { //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$id' limit 1"); db_close(); $empire = null; exit(); } $ecms_tofunr['cachehavedo'] = 1; } //缓存 //副表 $finfor = $empire->fetch1("select " . ReturnSqlFtextF($mid) . " from {$dbtbpre}ecms_" . $tbname . "_data_" . $r['stb'] . " where id='$r[id]' limit 1"); $r = array_merge($r, $finfor); //权限 if ($r['groupid'] || $class_r[$classid]['cgtoinfo']) { define('empirecms', 'wm_chief'); define('PageCheckLevel', 'wm_chief'); $check_tbname = $tbname; $check_infoid = $id; $check_classid = $classid; $check_path = "../../"; $checkinfor = $r; @include ("../class/CheckLevel.php"); } //缓存 if ($ecms_tofunr['cacheopen'] == 1 && !$ecms_tofunr['cachehavedo']) { $ecms_tofunr['cacheuse'] = Ecms_eCacheOut($ecms_tofunr, 2); if ($ecms_tofunr['cacheuse']) { //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$id' limit 1"); db_close(); $empire = null; exit(); } } //缓存 //存文本 if ($emod_r[$mid]['savetxtf']) { $stf = $emod_r[$mid]['savetxtf']; if ($r[$stf]) { $r[$stf] = GetTxtFieldText($r[$stf]); } } //初始值 $search = "&classid=$classid&id=$id"; $line = 1; $start = 0; $page_line = 6; //每页显示链接数 $offset = $page * $line - $line; //总偏移量 $GLOBALS['navclassid'] = $r['classid']; $GLOBALS['navinfor'] = $r; //取得内容模板 $r['newstempid'] = $r['newstempid'] ? $r['newstempid'] : $class_r[$r['classid']]['newstempid']; $newstemp_r = $empire->fetch1("select tempid,temptext,showdate from " . GetTemptb("enewsnewstemp") . " where tempid='$r[newstempid]'"); function MX_eCheckListPageNo($page, $line, $totalnum) { // MaXian:验证页码是否有效 $page = (int)$page; $line = (int)$line; $totalnum = (int)$totalnum; if (!$page || !$line) { return ''; } $totalpage = ceil($totalnum / $line); if ($page >= $totalpage) { // MaXian:分页不合法跳转404 header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); printerror('ErrorUrl', 'history.go(-1)', 1); } } function MX_ShowPage($num, $line, $page_line, $start, $page) { // MaXian:分页函数 global $fun_r; if ($num <= $line) { return ''; } $f = '_'; //伪静态分页分割符号 $url = preg_replace('/_[0-9]+/', '', $_SERVER['HTTP_X_REWRITE_URL'] ? $_SERVER['HTTP_X_REWRITE_URL'] : $_SERVER['REQUEST_URI']); $urlarr = explode('.', $url); $snum = 3; //最小页数 $totalpage = ceil($num / $line); //取得总页数 $firststr = '总' . $totalpage . '页'; //上一页 if ($page > 1) { $toppage = '' . $fun_r['startpage'] . ''; $pagepr = $page - 1; if ($pagepr == 1) { $prepage = '' . $fun_r['pripage'] . ''; } else { $prepage = '' . $fun_r['pripage'] . ''; } } //下一页 if ($page != $totalpage) { $pagenex = $page + 1; $nextpage = '' . $fun_r['nextpage'] . ''; $lastpage = '' . $fun_r['lastpage'] . ''; } $starti = $page - $snum < 0 ? 0 : $page - $snum; $no = 0; for ($i = $starti + 1;$i < $totalpage + 1 && $no < $page_line;$i++) { $no++; if ($page == $i) { $is_1 = ""; $is_2 = ""; } else { if ($i == 1) { //第一页不加page0 $is_1 = ''; $is_2 = ""; } else { $is_1 = ''; $is_2 = ""; } } $pagenum = $i; $returnstr.= $is_1 . $pagenum . $is_2; } $returnstr = $firststr . $toppage . $prepage . $returnstr . $nextpage . $lastpage; return $returnstr; } //替换模板变量 function DtGetHtml($add, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search) { global $public_r, $class_r, $class_zr, $class_tr, $fun_r, $empire, $dbtbpre, $emod_r, $level_r; //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$add[id]' limit 1"); $add['onclick'] = $add['onclick'] + 1; //模板参数 $newstemptext = $newstemp_r['temptext']; $formatdate = $newstemp_r['showdate']; //页面 $pagetitle = ehtmlspecialchars($add['title']); $url = ReturnClassLink($add['classid']); //导航 $newstemptext = DtInfo_ReplaceSvars($newstemptext, $url, $add['classid'], $pagetitle, $add['keyboard'], $pagetitle); //相关信息 if (strstr($newstemptext, '[!--other.link--]')) { $keyboardtext = GetKeyboard($add['keyboard'], $add['keyid'], $add['classid'], $add['id'], $class_r[$add['classid']]['link_num']); } //分页字段 $ptitle = $add['title']; $truepage = ''; $titleselect = ''; $expage = '[!--empirenews.page--]'; //分页符 $pf = $emod_r[$mid]['pagef']; if ($pf && strstr($add[$pf], $expage)) { //有分页 $n_r = explode($expage, $add[$pf]); $thispagenum = count($n_r); //checkpageno MX_eCheckListPageNo($page - 1, $line, $thispagenum); // MaXian:验证页码是否有效 if ($page < 0 || $page > $thispagenum) { $page = 1; } $add[$pf] = $n_r[$page - 1]; if ($page) { $ti_r = explode('[/!--empirenews.page--]', $n_r[$page]); if (count($ti_r) >= 2) { $ptitle = $ti_r[0]; $add[$pf] = $ti_r[1]; } else { $ptitle = $add['title'] . '(' . ($page - 1) . ')'; } } //伪静态 $pagefunr = eReturnRewriteInfoUrl($add['classid'], $add['id'], 0); $pagefunr['repagenum'] = 0; $truepage = MX_ShowPage($thispagenum, $line, $page_line, $start, $page); //伪静态分页 //伪静态分页结束 //$truepage=InfoUsePage($thispagenum,$line,$page_line,$start,$page,$search,$pagefunr); //下拉式分页 if (strstr($newstemptext, '[!--title.select--]')) { for ($j = 0;$j < $thispagenum;$j++) { $spurl = eReturnRewritePageLink($pagefunr, $j); if ($j == 0) { $sptitle = $add['title']; } else { $ti_r = explode('[/!--empirenews.page--]', $n_r[$j]); $sptitle = count($ti_r) >= 2 ? $ti_r[0] : $add['title'] . '(' . ($j + 1) . ')'; } $select = ''; if ($page == $j) { $ptitle = $sptitle; $select = ' selected'; } $titleselect.= ''; } $titleselect = ''; } //下一页链接 if ($page == $thispagenum - 1) { $thisnextlink = eReturnRewritePageLink($pagefunr, 0); } else { $thisnextlink = eReturnRewritePageLink($pagefunr, $page + 1); } } else { //checkpageno /* if($page!=0){ printerror('ErrorUrl','history.go(-1)',1); }*/ } //返回替换验证字符 $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']); //随机复制字符 } } //变量 $tempf = $emod_r[$mid]['tempf']; $fr = explode(',', $tempf); $fcount = count($fr) - 1; //变量替换 $newstempstr = $newstemptext; //模板 for ($i = 1;$i < $fcount;$i++) { $f = $fr[$i]; $value = $add[$f]; if ($f == 'downpath') { //下载地址 if (strstr($newstemptext, '[!--downpath--]')) { $value = ReturnDownSoftHtml($add); } } elseif ($f == 'onlinepath') { //观看地址 if (strstr($newstemptext, '[!--onlinepath--]')) { $value = ReturnOnlinepathHtml($add); } } elseif ($f == 'morepic') { //图片集 if (strstr($newstemptext, '[!--morepic--]')) { $value = ReturnMorepicpathHtml($add); } } elseif ($f == 'newstime') { //时间 if (strstr($newstemptext, '[!--newstime--]')) { $value = date($formatdate, $value); } } elseif ($f == 'befrom') { //信息来源 if ($docheckrep[1] && strstr($newstemptext, '[!--befrom--]')) { $value = ReplaceBefrom($value); } } elseif ($f == 'writer') { //作者 if ($docheckrep[2] && strstr($newstemptext, '[!--writer--]')) { $value = ReplaceWriter($value); } } elseif ($f == 'titlepic') { //标题图片 if (empty($value)) { $value = $public_r['newsurl'] . 'e/data/images/notimg.gif'; } } elseif ($f == 'title') { //标题 } else { //正常字段 if (!strstr($emod_r[$mid]['editorf'], ',' . $f . ',')) { if (strstr($emod_r[$mid]['tobrf'], ',' . $f . ',')) { //加br $value = nl2br($value); } if (!strstr($emod_r[$mid]['dohtmlf'], ',' . $f . ',')) { //去除html $value = RepFieldtextNbsp(ehtmlspecialchars($value)); } } } $newstempstr = str_replace('[!--' . $f . '--]', $value, $newstempstr); } //固定变量 $newstempstr = str_replace('[!--id--]', $add['id'], $newstempstr); $newstempstr = str_replace('[!--classid--]', $add['classid'], $newstempstr); $newstempstr = str_replace('[!--class.name--]', $class_r[$add['classid']]['classname'], $newstempstr); $newstempstr = str_replace('[!--ttid--]', $add['ttid'], $newstempstr); $newstempstr = str_replace('[!--tt.name--]', $class_tr[$add['ttid']]['tname'], $newstempstr); $newstempstr = str_replace('[!--tt.url--]', sys_ReturnBqInfoTypeUrl($add['ttid']), $newstempstr); $newstempstr = str_replace('[!--onclick--]', $add['onclick'], $newstempstr); $newstempstr = str_replace('[!--userfen--]', $add['userfen'], $newstempstr); $newstempstr = str_replace('[!--username--]', $add['username'], $newstempstr); //带链接的用户名 if ($add['ismember'] == 1 && $add['userid']) { $newstempstr = str_replace('[!--linkusername--]', "" . $add['username'] . "", $newstempstr); } else { $newstempstr = str_replace('[!--linkusername--]', $add['username'], $newstempstr); } $newstempstr = str_replace('[!--userid--]', $add['userid'], $newstempstr); $newstempstr = str_replace('[!--other.link--]', $keyboardtext, $newstempstr); $newstempstr = str_replace('[!--news.url--]', $public_r['newsurl'], $newstempstr); $newstempstr = str_replace('[!--plnum--]', $add['plnum'], $newstempstr); $newstempstr = str_replace('[!--totaldown--]', $add['totaldown'], $newstempstr); $newstempstr = str_replace('[!--keyboard--]', $add['keyboard'], $newstempstr); //链接 $titleurl = sys_ReturnBqTitleLink($add); $newstempstr = str_replace('[!--titleurl--]', $titleurl, $newstempstr); $newstempstr = str_replace('[!--page.stats--]', '', $newstempstr); $classurl = sys_ReturnBqClassname($add, 9); $newstempstr = str_replace('[!--class.url--]', $classurl, $newstempstr); //下一篇 if (strstr($newstemptext, '[!--info.next--]')) { $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add['classid']]['tbname'] . " where id>$add[id] and classid='$add[classid]' order by id limit 1"); if (empty($next_r['id'])) { $infonext = "" . $fun_r['HaveNoNextLink'] . ""; } else { //链接 $nexttitleurl = sys_ReturnBqTitleLink($next_r); $infonext = "" . $next_r['title'] . ""; } $newstempstr = str_replace('[!--info.next--]', $infonext, $newstempstr); } //上一篇 if (strstr($newstemptext, '[!--info.pre--]')) { $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add['classid']]['tbname'] . " where id<$add[id] and classid='$add[classid]' order by id desc limit 1"); if (empty($next_r['id'])) { $infonext = "" . $fun_r['HaveNoNextLink'] . ""; } else { //链接 $nexttitleurl = sys_ReturnBqTitleLink($next_r); $infonext = "" . $next_r['title'] . ""; } $newstempstr = str_replace('[!--info.pre--]', $infonext, $newstempstr); } //投票 if (strstr($newstemptext, '[!--info.vote--]')) { $myvotetext = sys_GetInfoVote($add['classid'], $add['id']); $newstempstr = str_replace('[!--info.vote--]', $myvotetext, $newstempstr); } //评分 if (strstr($newstemptext, '[!--pinfopfen--]')) { $pinfopfen = $add['infopfennum'] ? round($add['infopfen'] / $add['infopfennum']) : 0; $newstempstr = str_replace('[!--pinfopfen--]', $pinfopfen, $newstempstr); $newstempstr = str_replace('[!--infopfennum--]', $add['infopfennum'], $newstempstr); } $string = $newstempstr; //替换变量 $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); return $string; } if (empty($newstemp_r['tempid'])) { printerror('ErrorUrl', '', 1); } //页面支持标签 if ($public_r['dtncanbq']) { $newstemp_r['temptext'] = DtNewsBq('text' . $newstemp_r['tempid'], $newstemp_r['temptext'], 1); } else { if ($public_r['searchtempvar']) { $newstemp_r['temptext'] = ReplaceTempvar($newstemp_r['temptext']); } } $string = DtGetHtml($r, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search); //缓存 if ($ecms_tofunr['cacheopen'] == 1) { Ecms_eCacheIn($ecms_tofunr, stripSlashes($string)); } else { echo stripSlashes($string); } //缓存 db_close(); $empire = null; ?>

笔画查字

    0) { // MaXian:判断分页是1或者0就跳转 404 header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); printerror('ErrorUrl', 'history.go(-1)', 1); } $page = RepPIntvar($page) ? RepPIntvar($page) : 1; $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 $where limit 1"); if (!$r['id'] || $classid != $r['classid']) { printerror('此信息不存在', '', 1, 0, 1); } $id = $r['id']; //ID重新赋值 //外部链接 if ($r['isurl']) { $titleurl = $r['titleurl']; Header("Location:$titleurl"); exit(); } //moreport if (Moreport_ReturnMustDt()) { $class_r[$classid]['showdt'] = 2; } //是否支持动态内容页 /*if($class_r[$classid]['showdt']!=2){ $titleurl = sys_ReturnBqTitleLink($r); Header("Location:$titleurl"); exit(); }*/ //缓存 if ($public_r['ctimeopen']) { $public_r['usetotalnum'] = 0; } $ecms_tofunr = array(); $ecms_tofunr['cacheuse'] = 0; $ecms_tofunr['cacheselfcid'] = $classid; $ecms_tofunr['cachetype'] = 'textpage'; $ecms_tofunr['cacheids'] = $classid . ',' . $id . ',' . $page; $ecms_tofunr['cachepath'] = 'empirecms'; $ecms_tofunr['cachedatepath'] = 'ctext/' . date('Y/md', $r['truetime']); $ecms_tofunr['cachetime'] = $public_r['ctimetext']; $ecms_tofunr['cachelasttime'] = $public_r['ctimelast']; $ecms_tofunr['cachelastedit'] = $r['lastdotime']; $ecms_tofunr['cacheopen'] = Ecms_eCacheCheckOpen($ecms_tofunr['cachetime']); $ecms_tofunr['cachehavedo'] = 0; if ($ecms_tofunr['cacheopen'] == 1 && !($r['groupid'] || $class_r[$classid]['cgtoinfo'])) { $ecms_tofunr['cacheuse'] = Ecms_eCacheOut($ecms_tofunr, 2); if ($ecms_tofunr['cacheuse']) { //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$id' limit 1"); db_close(); $empire = null; exit(); } $ecms_tofunr['cachehavedo'] = 1; } //缓存 //副表 $finfor = $empire->fetch1("select " . ReturnSqlFtextF($mid) . " from {$dbtbpre}ecms_" . $tbname . "_data_" . $r['stb'] . " where id='$r[id]' limit 1"); $r = array_merge($r, $finfor); //权限 if ($r['groupid'] || $class_r[$classid]['cgtoinfo']) { define('empirecms', 'wm_chief'); define('PageCheckLevel', 'wm_chief'); $check_tbname = $tbname; $check_infoid = $id; $check_classid = $classid; $check_path = "../../"; $checkinfor = $r; @include ("../class/CheckLevel.php"); } //缓存 if ($ecms_tofunr['cacheopen'] == 1 && !$ecms_tofunr['cachehavedo']) { $ecms_tofunr['cacheuse'] = Ecms_eCacheOut($ecms_tofunr, 2); if ($ecms_tofunr['cacheuse']) { //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$id' limit 1"); db_close(); $empire = null; exit(); } } //缓存 //存文本 if ($emod_r[$mid]['savetxtf']) { $stf = $emod_r[$mid]['savetxtf']; if ($r[$stf]) { $r[$stf] = GetTxtFieldText($r[$stf]); } } //初始值 $search = "&classid=$classid&id=$id"; $line = 1; $start = 0; $page_line = 6; //每页显示链接数 $offset = $page * $line - $line; //总偏移量 $GLOBALS['navclassid'] = $r['classid']; $GLOBALS['navinfor'] = $r; //取得内容模板 $r['newstempid'] = $r['newstempid'] ? $r['newstempid'] : $class_r[$r['classid']]['newstempid']; $newstemp_r = $empire->fetch1("select tempid,temptext,showdate from " . GetTemptb("enewsnewstemp") . " where tempid='$r[newstempid]'"); function MX_eCheckListPageNo($page, $line, $totalnum) { // MaXian:验证页码是否有效 $page = (int)$page; $line = (int)$line; $totalnum = (int)$totalnum; if (!$page || !$line) { return ''; } $totalpage = ceil($totalnum / $line); if ($page >= $totalpage) { // MaXian:分页不合法跳转404 header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); printerror('ErrorUrl', 'history.go(-1)', 1); } } function MX_ShowPage($num, $line, $page_line, $start, $page) { // MaXian:分页函数 global $fun_r; if ($num <= $line) { return ''; } $f = '_'; //伪静态分页分割符号 $url = preg_replace('/_[0-9]+/', '', $_SERVER['HTTP_X_REWRITE_URL'] ? $_SERVER['HTTP_X_REWRITE_URL'] : $_SERVER['REQUEST_URI']); $urlarr = explode('.', $url); $snum = 3; //最小页数 $totalpage = ceil($num / $line); //取得总页数 $firststr = '总' . $totalpage . '页'; //上一页 if ($page > 1) { $toppage = '' . $fun_r['startpage'] . ''; $pagepr = $page - 1; if ($pagepr == 1) { $prepage = '' . $fun_r['pripage'] . ''; } else { $prepage = '' . $fun_r['pripage'] . ''; } } //下一页 if ($page != $totalpage) { $pagenex = $page + 1; $nextpage = '' . $fun_r['nextpage'] . ''; $lastpage = '' . $fun_r['lastpage'] . ''; } $starti = $page - $snum < 0 ? 0 : $page - $snum; $no = 0; for ($i = $starti + 1;$i < $totalpage + 1 && $no < $page_line;$i++) { $no++; if ($page == $i) { $is_1 = ""; $is_2 = ""; } else { if ($i == 1) { //第一页不加page0 $is_1 = ''; $is_2 = ""; } else { $is_1 = ''; $is_2 = ""; } } $pagenum = $i; $returnstr.= $is_1 . $pagenum . $is_2; } $returnstr = $firststr . $toppage . $prepage . $returnstr . $nextpage . $lastpage; return $returnstr; } //替换模板变量 function DtGetHtml($add, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search) { global $public_r, $class_r, $class_zr, $class_tr, $fun_r, $empire, $dbtbpre, $emod_r, $level_r; //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$add[id]' limit 1"); $add['onclick'] = $add['onclick'] + 1; //模板参数 $newstemptext = $newstemp_r['temptext']; $formatdate = $newstemp_r['showdate']; //页面 $pagetitle = ehtmlspecialchars($add['title']); $url = ReturnClassLink($add['classid']); //导航 $newstemptext = DtInfo_ReplaceSvars($newstemptext, $url, $add['classid'], $pagetitle, $add['keyboard'], $pagetitle); //相关信息 if (strstr($newstemptext, '[!--other.link--]')) { $keyboardtext = GetKeyboard($add['keyboard'], $add['keyid'], $add['classid'], $add['id'], $class_r[$add['classid']]['link_num']); } //分页字段 $ptitle = $add['title']; $truepage = ''; $titleselect = ''; $expage = '[!--empirenews.page--]'; //分页符 $pf = $emod_r[$mid]['pagef']; if ($pf && strstr($add[$pf], $expage)) { //有分页 $n_r = explode($expage, $add[$pf]); $thispagenum = count($n_r); //checkpageno MX_eCheckListPageNo($page - 1, $line, $thispagenum); // MaXian:验证页码是否有效 if ($page < 0 || $page > $thispagenum) { $page = 1; } $add[$pf] = $n_r[$page - 1]; if ($page) { $ti_r = explode('[/!--empirenews.page--]', $n_r[$page]); if (count($ti_r) >= 2) { $ptitle = $ti_r[0]; $add[$pf] = $ti_r[1]; } else { $ptitle = $add['title'] . '(' . ($page - 1) . ')'; } } //伪静态 $pagefunr = eReturnRewriteInfoUrl($add['classid'], $add['id'], 0); $pagefunr['repagenum'] = 0; $truepage = MX_ShowPage($thispagenum, $line, $page_line, $start, $page); //伪静态分页 //伪静态分页结束 //$truepage=InfoUsePage($thispagenum,$line,$page_line,$start,$page,$search,$pagefunr); //下拉式分页 if (strstr($newstemptext, '[!--title.select--]')) { for ($j = 0;$j < $thispagenum;$j++) { $spurl = eReturnRewritePageLink($pagefunr, $j); if ($j == 0) { $sptitle = $add['title']; } else { $ti_r = explode('[/!--empirenews.page--]', $n_r[$j]); $sptitle = count($ti_r) >= 2 ? $ti_r[0] : $add['title'] . '(' . ($j + 1) . ')'; } $select = ''; if ($page == $j) { $ptitle = $sptitle; $select = ' selected'; } $titleselect.= ''; } $titleselect = ''; } //下一页链接 if ($page == $thispagenum - 1) { $thisnextlink = eReturnRewritePageLink($pagefunr, 0); } else { $thisnextlink = eReturnRewritePageLink($pagefunr, $page + 1); } } else { //checkpageno /* if($page!=0){ printerror('ErrorUrl','history.go(-1)',1); }*/ } //返回替换验证字符 $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']); //随机复制字符 } } //变量 $tempf = $emod_r[$mid]['tempf']; $fr = explode(',', $tempf); $fcount = count($fr) - 1; //变量替换 $newstempstr = $newstemptext; //模板 for ($i = 1;$i < $fcount;$i++) { $f = $fr[$i]; $value = $add[$f]; if ($f == 'downpath') { //下载地址 if (strstr($newstemptext, '[!--downpath--]')) { $value = ReturnDownSoftHtml($add); } } elseif ($f == 'onlinepath') { //观看地址 if (strstr($newstemptext, '[!--onlinepath--]')) { $value = ReturnOnlinepathHtml($add); } } elseif ($f == 'morepic') { //图片集 if (strstr($newstemptext, '[!--morepic--]')) { $value = ReturnMorepicpathHtml($add); } } elseif ($f == 'newstime') { //时间 if (strstr($newstemptext, '[!--newstime--]')) { $value = date($formatdate, $value); } } elseif ($f == 'befrom') { //信息来源 if ($docheckrep[1] && strstr($newstemptext, '[!--befrom--]')) { $value = ReplaceBefrom($value); } } elseif ($f == 'writer') { //作者 if ($docheckrep[2] && strstr($newstemptext, '[!--writer--]')) { $value = ReplaceWriter($value); } } elseif ($f == 'titlepic') { //标题图片 if (empty($value)) { $value = $public_r['newsurl'] . 'e/data/images/notimg.gif'; } } elseif ($f == 'title') { //标题 } else { //正常字段 if (!strstr($emod_r[$mid]['editorf'], ',' . $f . ',')) { if (strstr($emod_r[$mid]['tobrf'], ',' . $f . ',')) { //加br $value = nl2br($value); } if (!strstr($emod_r[$mid]['dohtmlf'], ',' . $f . ',')) { //去除html $value = RepFieldtextNbsp(ehtmlspecialchars($value)); } } } $newstempstr = str_replace('[!--' . $f . '--]', $value, $newstempstr); } //固定变量 $newstempstr = str_replace('[!--id--]', $add['id'], $newstempstr); $newstempstr = str_replace('[!--classid--]', $add['classid'], $newstempstr); $newstempstr = str_replace('[!--class.name--]', $class_r[$add['classid']]['classname'], $newstempstr); $newstempstr = str_replace('[!--ttid--]', $add['ttid'], $newstempstr); $newstempstr = str_replace('[!--tt.name--]', $class_tr[$add['ttid']]['tname'], $newstempstr); $newstempstr = str_replace('[!--tt.url--]', sys_ReturnBqInfoTypeUrl($add['ttid']), $newstempstr); $newstempstr = str_replace('[!--onclick--]', $add['onclick'], $newstempstr); $newstempstr = str_replace('[!--userfen--]', $add['userfen'], $newstempstr); $newstempstr = str_replace('[!--username--]', $add['username'], $newstempstr); //带链接的用户名 if ($add['ismember'] == 1 && $add['userid']) { $newstempstr = str_replace('[!--linkusername--]', "" . $add['username'] . "", $newstempstr); } else { $newstempstr = str_replace('[!--linkusername--]', $add['username'], $newstempstr); } $newstempstr = str_replace('[!--userid--]', $add['userid'], $newstempstr); $newstempstr = str_replace('[!--other.link--]', $keyboardtext, $newstempstr); $newstempstr = str_replace('[!--news.url--]', $public_r['newsurl'], $newstempstr); $newstempstr = str_replace('[!--plnum--]', $add['plnum'], $newstempstr); $newstempstr = str_replace('[!--totaldown--]', $add['totaldown'], $newstempstr); $newstempstr = str_replace('[!--keyboard--]', $add['keyboard'], $newstempstr); //链接 $titleurl = sys_ReturnBqTitleLink($add); $newstempstr = str_replace('[!--titleurl--]', $titleurl, $newstempstr); $newstempstr = str_replace('[!--page.stats--]', '', $newstempstr); $classurl = sys_ReturnBqClassname($add, 9); $newstempstr = str_replace('[!--class.url--]', $classurl, $newstempstr); //下一篇 if (strstr($newstemptext, '[!--info.next--]')) { $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add['classid']]['tbname'] . " where id>$add[id] and classid='$add[classid]' order by id limit 1"); if (empty($next_r['id'])) { $infonext = "" . $fun_r['HaveNoNextLink'] . ""; } else { //链接 $nexttitleurl = sys_ReturnBqTitleLink($next_r); $infonext = "" . $next_r['title'] . ""; } $newstempstr = str_replace('[!--info.next--]', $infonext, $newstempstr); } //上一篇 if (strstr($newstemptext, '[!--info.pre--]')) { $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add['classid']]['tbname'] . " where id<$add[id] and classid='$add[classid]' order by id desc limit 1"); if (empty($next_r['id'])) { $infonext = "" . $fun_r['HaveNoNextLink'] . ""; } else { //链接 $nexttitleurl = sys_ReturnBqTitleLink($next_r); $infonext = "" . $next_r['title'] . ""; } $newstempstr = str_replace('[!--info.pre--]', $infonext, $newstempstr); } //投票 if (strstr($newstemptext, '[!--info.vote--]')) { $myvotetext = sys_GetInfoVote($add['classid'], $add['id']); $newstempstr = str_replace('[!--info.vote--]', $myvotetext, $newstempstr); } //评分 if (strstr($newstemptext, '[!--pinfopfen--]')) { $pinfopfen = $add['infopfennum'] ? round($add['infopfen'] / $add['infopfennum']) : 0; $newstempstr = str_replace('[!--pinfopfen--]', $pinfopfen, $newstempstr); $newstempstr = str_replace('[!--infopfennum--]', $add['infopfennum'], $newstempstr); } $string = $newstempstr; //替换变量 $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); return $string; } if (empty($newstemp_r['tempid'])) { printerror('ErrorUrl', '', 1); } //页面支持标签 if ($public_r['dtncanbq']) { $newstemp_r['temptext'] = DtNewsBq('text' . $newstemp_r['tempid'], $newstemp_r['temptext'], 1); } else { if ($public_r['searchtempvar']) { $newstemp_r['temptext'] = ReplaceTempvar($newstemp_r['temptext']); } } $string = DtGetHtml($r, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search); //缓存 if ($ecms_tofunr['cacheopen'] == 1) { Ecms_eCacheIn($ecms_tofunr, stripSlashes($string)); } else { echo stripSlashes($string); } //缓存 db_close(); $empire = null; ?>

汉字结构

    0) { // MaXian:判断分页是1或者0就跳转 404 header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); printerror('ErrorUrl', 'history.go(-1)', 1); } $page = RepPIntvar($page) ? RepPIntvar($page) : 1; $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 $where limit 1"); if (!$r['id'] || $classid != $r['classid']) { printerror('此信息不存在', '', 1, 0, 1); } $id = $r['id']; //ID重新赋值 //外部链接 if ($r['isurl']) { $titleurl = $r['titleurl']; Header("Location:$titleurl"); exit(); } //moreport if (Moreport_ReturnMustDt()) { $class_r[$classid]['showdt'] = 2; } //是否支持动态内容页 /*if($class_r[$classid]['showdt']!=2){ $titleurl = sys_ReturnBqTitleLink($r); Header("Location:$titleurl"); exit(); }*/ //缓存 if ($public_r['ctimeopen']) { $public_r['usetotalnum'] = 0; } $ecms_tofunr = array(); $ecms_tofunr['cacheuse'] = 0; $ecms_tofunr['cacheselfcid'] = $classid; $ecms_tofunr['cachetype'] = 'textpage'; $ecms_tofunr['cacheids'] = $classid . ',' . $id . ',' . $page; $ecms_tofunr['cachepath'] = 'empirecms'; $ecms_tofunr['cachedatepath'] = 'ctext/' . date('Y/md', $r['truetime']); $ecms_tofunr['cachetime'] = $public_r['ctimetext']; $ecms_tofunr['cachelasttime'] = $public_r['ctimelast']; $ecms_tofunr['cachelastedit'] = $r['lastdotime']; $ecms_tofunr['cacheopen'] = Ecms_eCacheCheckOpen($ecms_tofunr['cachetime']); $ecms_tofunr['cachehavedo'] = 0; if ($ecms_tofunr['cacheopen'] == 1 && !($r['groupid'] || $class_r[$classid]['cgtoinfo'])) { $ecms_tofunr['cacheuse'] = Ecms_eCacheOut($ecms_tofunr, 2); if ($ecms_tofunr['cacheuse']) { //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$id' limit 1"); db_close(); $empire = null; exit(); } $ecms_tofunr['cachehavedo'] = 1; } //缓存 //副表 $finfor = $empire->fetch1("select " . ReturnSqlFtextF($mid) . " from {$dbtbpre}ecms_" . $tbname . "_data_" . $r['stb'] . " where id='$r[id]' limit 1"); $r = array_merge($r, $finfor); //权限 if ($r['groupid'] || $class_r[$classid]['cgtoinfo']) { define('empirecms', 'wm_chief'); define('PageCheckLevel', 'wm_chief'); $check_tbname = $tbname; $check_infoid = $id; $check_classid = $classid; $check_path = "../../"; $checkinfor = $r; @include ("../class/CheckLevel.php"); } //缓存 if ($ecms_tofunr['cacheopen'] == 1 && !$ecms_tofunr['cachehavedo']) { $ecms_tofunr['cacheuse'] = Ecms_eCacheOut($ecms_tofunr, 2); if ($ecms_tofunr['cacheuse']) { //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$id' limit 1"); db_close(); $empire = null; exit(); } } //缓存 //存文本 if ($emod_r[$mid]['savetxtf']) { $stf = $emod_r[$mid]['savetxtf']; if ($r[$stf]) { $r[$stf] = GetTxtFieldText($r[$stf]); } } //初始值 $search = "&classid=$classid&id=$id"; $line = 1; $start = 0; $page_line = 6; //每页显示链接数 $offset = $page * $line - $line; //总偏移量 $GLOBALS['navclassid'] = $r['classid']; $GLOBALS['navinfor'] = $r; //取得内容模板 $r['newstempid'] = $r['newstempid'] ? $r['newstempid'] : $class_r[$r['classid']]['newstempid']; $newstemp_r = $empire->fetch1("select tempid,temptext,showdate from " . GetTemptb("enewsnewstemp") . " where tempid='$r[newstempid]'"); function MX_eCheckListPageNo($page, $line, $totalnum) { // MaXian:验证页码是否有效 $page = (int)$page; $line = (int)$line; $totalnum = (int)$totalnum; if (!$page || !$line) { return ''; } $totalpage = ceil($totalnum / $line); if ($page >= $totalpage) { // MaXian:分页不合法跳转404 header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); printerror('ErrorUrl', 'history.go(-1)', 1); } } function MX_ShowPage($num, $line, $page_line, $start, $page) { // MaXian:分页函数 global $fun_r; if ($num <= $line) { return ''; } $f = '_'; //伪静态分页分割符号 $url = preg_replace('/_[0-9]+/', '', $_SERVER['HTTP_X_REWRITE_URL'] ? $_SERVER['HTTP_X_REWRITE_URL'] : $_SERVER['REQUEST_URI']); $urlarr = explode('.', $url); $snum = 3; //最小页数 $totalpage = ceil($num / $line); //取得总页数 $firststr = '总' . $totalpage . '页'; //上一页 if ($page > 1) { $toppage = '' . $fun_r['startpage'] . ''; $pagepr = $page - 1; if ($pagepr == 1) { $prepage = '' . $fun_r['pripage'] . ''; } else { $prepage = '' . $fun_r['pripage'] . ''; } } //下一页 if ($page != $totalpage) { $pagenex = $page + 1; $nextpage = '' . $fun_r['nextpage'] . ''; $lastpage = '' . $fun_r['lastpage'] . ''; } $starti = $page - $snum < 0 ? 0 : $page - $snum; $no = 0; for ($i = $starti + 1;$i < $totalpage + 1 && $no < $page_line;$i++) { $no++; if ($page == $i) { $is_1 = ""; $is_2 = ""; } else { if ($i == 1) { //第一页不加page0 $is_1 = ''; $is_2 = ""; } else { $is_1 = ''; $is_2 = ""; } } $pagenum = $i; $returnstr.= $is_1 . $pagenum . $is_2; } $returnstr = $firststr . $toppage . $prepage . $returnstr . $nextpage . $lastpage; return $returnstr; } //替换模板变量 function DtGetHtml($add, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search) { global $public_r, $class_r, $class_zr, $class_tr, $fun_r, $empire, $dbtbpre, $emod_r, $level_r; //更新点击 $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='$add[id]' limit 1"); $add['onclick'] = $add['onclick'] + 1; //模板参数 $newstemptext = $newstemp_r['temptext']; $formatdate = $newstemp_r['showdate']; //页面 $pagetitle = ehtmlspecialchars($add['title']); $url = ReturnClassLink($add['classid']); //导航 $newstemptext = DtInfo_ReplaceSvars($newstemptext, $url, $add['classid'], $pagetitle, $add['keyboard'], $pagetitle); //相关信息 if (strstr($newstemptext, '[!--other.link--]')) { $keyboardtext = GetKeyboard($add['keyboard'], $add['keyid'], $add['classid'], $add['id'], $class_r[$add['classid']]['link_num']); } //分页字段 $ptitle = $add['title']; $truepage = ''; $titleselect = ''; $expage = '[!--empirenews.page--]'; //分页符 $pf = $emod_r[$mid]['pagef']; if ($pf && strstr($add[$pf], $expage)) { //有分页 $n_r = explode($expage, $add[$pf]); $thispagenum = count($n_r); //checkpageno MX_eCheckListPageNo($page - 1, $line, $thispagenum); // MaXian:验证页码是否有效 if ($page < 0 || $page > $thispagenum) { $page = 1; } $add[$pf] = $n_r[$page - 1]; if ($page) { $ti_r = explode('[/!--empirenews.page--]', $n_r[$page]); if (count($ti_r) >= 2) { $ptitle = $ti_r[0]; $add[$pf] = $ti_r[1]; } else { $ptitle = $add['title'] . '(' . ($page - 1) . ')'; } } //伪静态 $pagefunr = eReturnRewriteInfoUrl($add['classid'], $add['id'], 0); $pagefunr['repagenum'] = 0; $truepage = MX_ShowPage($thispagenum, $line, $page_line, $start, $page); //伪静态分页 //伪静态分页结束 //$truepage=InfoUsePage($thispagenum,$line,$page_line,$start,$page,$search,$pagefunr); //下拉式分页 if (strstr($newstemptext, '[!--title.select--]')) { for ($j = 0;$j < $thispagenum;$j++) { $spurl = eReturnRewritePageLink($pagefunr, $j); if ($j == 0) { $sptitle = $add['title']; } else { $ti_r = explode('[/!--empirenews.page--]', $n_r[$j]); $sptitle = count($ti_r) >= 2 ? $ti_r[0] : $add['title'] . '(' . ($j + 1) . ')'; } $select = ''; if ($page == $j) { $ptitle = $sptitle; $select = ' selected'; } $titleselect.= ''; } $titleselect = ''; } //下一页链接 if ($page == $thispagenum - 1) { $thisnextlink = eReturnRewritePageLink($pagefunr, 0); } else { $thisnextlink = eReturnRewritePageLink($pagefunr, $page + 1); } } else { //checkpageno /* if($page!=0){ printerror('ErrorUrl','history.go(-1)',1); }*/ } //返回替换验证字符 $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']); //随机复制字符 } } //变量 $tempf = $emod_r[$mid]['tempf']; $fr = explode(',', $tempf); $fcount = count($fr) - 1; //变量替换 $newstempstr = $newstemptext; //模板 for ($i = 1;$i < $fcount;$i++) { $f = $fr[$i]; $value = $add[$f]; if ($f == 'downpath') { //下载地址 if (strstr($newstemptext, '[!--downpath--]')) { $value = ReturnDownSoftHtml($add); } } elseif ($f == 'onlinepath') { //观看地址 if (strstr($newstemptext, '[!--onlinepath--]')) { $value = ReturnOnlinepathHtml($add); } } elseif ($f == 'morepic') { //图片集 if (strstr($newstemptext, '[!--morepic--]')) { $value = ReturnMorepicpathHtml($add); } } elseif ($f == 'newstime') { //时间 if (strstr($newstemptext, '[!--newstime--]')) { $value = date($formatdate, $value); } } elseif ($f == 'befrom') { //信息来源 if ($docheckrep[1] && strstr($newstemptext, '[!--befrom--]')) { $value = ReplaceBefrom($value); } } elseif ($f == 'writer') { //作者 if ($docheckrep[2] && strstr($newstemptext, '[!--writer--]')) { $value = ReplaceWriter($value); } } elseif ($f == 'titlepic') { //标题图片 if (empty($value)) { $value = $public_r['newsurl'] . 'e/data/images/notimg.gif'; } } elseif ($f == 'title') { //标题 } else { //正常字段 if (!strstr($emod_r[$mid]['editorf'], ',' . $f . ',')) { if (strstr($emod_r[$mid]['tobrf'], ',' . $f . ',')) { //加br $value = nl2br($value); } if (!strstr($emod_r[$mid]['dohtmlf'], ',' . $f . ',')) { //去除html $value = RepFieldtextNbsp(ehtmlspecialchars($value)); } } } $newstempstr = str_replace('[!--' . $f . '--]', $value, $newstempstr); } //固定变量 $newstempstr = str_replace('[!--id--]', $add['id'], $newstempstr); $newstempstr = str_replace('[!--classid--]', $add['classid'], $newstempstr); $newstempstr = str_replace('[!--class.name--]', $class_r[$add['classid']]['classname'], $newstempstr); $newstempstr = str_replace('[!--ttid--]', $add['ttid'], $newstempstr); $newstempstr = str_replace('[!--tt.name--]', $class_tr[$add['ttid']]['tname'], $newstempstr); $newstempstr = str_replace('[!--tt.url--]', sys_ReturnBqInfoTypeUrl($add['ttid']), $newstempstr); $newstempstr = str_replace('[!--onclick--]', $add['onclick'], $newstempstr); $newstempstr = str_replace('[!--userfen--]', $add['userfen'], $newstempstr); $newstempstr = str_replace('[!--username--]', $add['username'], $newstempstr); //带链接的用户名 if ($add['ismember'] == 1 && $add['userid']) { $newstempstr = str_replace('[!--linkusername--]', "" . $add['username'] . "", $newstempstr); } else { $newstempstr = str_replace('[!--linkusername--]', $add['username'], $newstempstr); } $newstempstr = str_replace('[!--userid--]', $add['userid'], $newstempstr); $newstempstr = str_replace('[!--other.link--]', $keyboardtext, $newstempstr); $newstempstr = str_replace('[!--news.url--]', $public_r['newsurl'], $newstempstr); $newstempstr = str_replace('[!--plnum--]', $add['plnum'], $newstempstr); $newstempstr = str_replace('[!--totaldown--]', $add['totaldown'], $newstempstr); $newstempstr = str_replace('[!--keyboard--]', $add['keyboard'], $newstempstr); //链接 $titleurl = sys_ReturnBqTitleLink($add); $newstempstr = str_replace('[!--titleurl--]', $titleurl, $newstempstr); $newstempstr = str_replace('[!--page.stats--]', '', $newstempstr); $classurl = sys_ReturnBqClassname($add, 9); $newstempstr = str_replace('[!--class.url--]', $classurl, $newstempstr); //下一篇 if (strstr($newstemptext, '[!--info.next--]')) { $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add['classid']]['tbname'] . " where id>$add[id] and classid='$add[classid]' order by id limit 1"); if (empty($next_r['id'])) { $infonext = "" . $fun_r['HaveNoNextLink'] . ""; } else { //链接 $nexttitleurl = sys_ReturnBqTitleLink($next_r); $infonext = "" . $next_r['title'] . ""; } $newstempstr = str_replace('[!--info.next--]', $infonext, $newstempstr); } //上一篇 if (strstr($newstemptext, '[!--info.pre--]')) { $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add['classid']]['tbname'] . " where id<$add[id] and classid='$add[classid]' order by id desc limit 1"); if (empty($next_r['id'])) { $infonext = "" . $fun_r['HaveNoNextLink'] . ""; } else { //链接 $nexttitleurl = sys_ReturnBqTitleLink($next_r); $infonext = "" . $next_r['title'] . ""; } $newstempstr = str_replace('[!--info.pre--]', $infonext, $newstempstr); } //投票 if (strstr($newstemptext, '[!--info.vote--]')) { $myvotetext = sys_GetInfoVote($add['classid'], $add['id']); $newstempstr = str_replace('[!--info.vote--]', $myvotetext, $newstempstr); } //评分 if (strstr($newstemptext, '[!--pinfopfen--]')) { $pinfopfen = $add['infopfennum'] ? round($add['infopfen'] / $add['infopfennum']) : 0; $newstempstr = str_replace('[!--pinfopfen--]', $pinfopfen, $newstempstr); $newstempstr = str_replace('[!--infopfennum--]', $add['infopfennum'], $newstempstr); } $string = $newstempstr; //替换变量 $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); return $string; } if (empty($newstemp_r['tempid'])) { printerror('ErrorUrl', '', 1); } //页面支持标签 if ($public_r['dtncanbq']) { $newstemp_r['temptext'] = DtNewsBq('text' . $newstemp_r['tempid'], $newstemp_r['temptext'], 1); } else { if ($public_r['searchtempvar']) { $newstemp_r['temptext'] = ReplaceTempvar($newstemp_r['temptext']); } } $string = DtGetHtml($r, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search); //缓存 if ($ecms_tofunr['cacheopen'] == 1) { Ecms_eCacheIn($ecms_tofunr, stripSlashes($string)); } else { echo stripSlashes($string); } //缓存 db_close(); $empire = null; ?>