字典

风字的意思

风
拼音fēng fěng
注音ㄈㄥ ㄈㄥˇ
部首风部
总笔画4画 结构上三包围
笔顺ノフノ丶统一码98CE

基本解释

基本字义

风(風)fēng(ㄈㄥ)

⒈  空气流动的现象。气象学特指空气在水平方向的流动:风向。风速。风级。风险。风波(喻纠纷或乱子)。风雨如磐(a.指风雨不断,天色黑暗,给人以重压的感觉;b.喻社会黑暗或境地艰难)。风花雪月(喻堆砌词藻,内容贫乏的的诗文)。

⒉  像风那样迅速、普遍的:风潮。风靡一时。风驰电掣。

⒊  社会上长期形成的礼节、习俗:风气。风习。风物(某地特有的景物)。风尚(在一定时期中社会上流行的风气和习惯)。

⒋  消息,传闻:风传(chuán )(传闻)。闻风而动。

⒌  表现在外的景象、态度、举止:风景。风度。风格(a.气度,作风;b.文艺作品表现出的思想、艺术特色)。风骨(a.刚强的气概;b.诗文书画雄健有力的风格)。风致。风采(a.人美好的礼仪举止,亦作“丰采”;b.文采;c.旧时指某些官吏的刚正风格)。风骚(a.指举止轻佻,如“卖弄风风”,一般指妇女;b.中国的《诗经》和《楚辞》的并称)。

⒍  指民歌、歌谣:国风(《诗经》中古代十五国的民歌)。采风。

⒎  中医学指某些疾病:风瘫。风湿。

⒏  姓。

其他字义

风(風)fěng(ㄈㄥˇ)

⒈  古同“讽”,讽刺。

汉英互译

wind

造字法

形声:从虫、凡声

English

wind; air; manners, atmosphere

详细解释

基本词义

fēng

〈名〉

(1) (形声。从虫,凡声。“风动虫生”故字从“虫”。本义:空气流动的自然现象;尤指空气与地球表面平行的自然运动)

(2) 同本义 [wind]

風,八风也。东方曰明庶风,东南曰清明风,南方曰景风,西南曰凉风,西方曰闾阖风,西北曰不周风,北方曰广莫风,东北曰融风。风动虫生,故虫八日而化。——《说文》

立春条风。——《易·通卦验》

东北条风。——《广雅·释天》

距日冬至四十五日,条风至。——《淮南子·天文》

条风居东北维,主出万物条之。言条治万物而出之。——《史记·律书》

今日不鳳(風)?——《殷虚文字甲编》

见事风生,无所回避。——《汉书·赵尹韩张两王传》

大风起兮云飞扬。——刘邦《大风歌》

山雨欲来风满楼。——许浑《咸阳城东楼》

(3) 又如:狂风(猛烈的风);风信(风的大小及风向);风团(旋风。比喻飞快);风吹日炙(风吹日晒);风雹(刮风下雹);风潦(风灾和水灾);风霰(风雪)

(4) 风俗;风气 [general mood;custom]

今将移风易俗,其道诚难。——《资治通鉴》

奸党散落,风俗大改。——《汉书·赵尹韩张两王传》

故为之说,以俟观人风者得焉。——唐· 柳宗元《捕蛇者说》

移风易俗。——《荀子·乐论》

(5) 又如:风美(风俗淳美);风纯(风俗纯朴);风沦(风俗沦落败坏);风习(风俗习惯);风浮(风俗浮薄)

(6) 风范,气度,韵致 [demeanour]

亦尝侧闻长者之遗风矣。——汉· 司马迁《报任安书》

(7) 又如:风局(风范,器宇);风表(风范仪表);风则(风范);风裁(风采,气度);风期(气度,襟怀);风节(气度情操)

(8) 文学艺术作品的风格特点 [manner;style]。如:风神(指文学艺术作品的风格,气韵);风徽(文章的风格、气韵)

(9) 风声,消息 [news;information]

但有知风来报的赏钱百两。——《二刻拍案惊奇》

(10) 又如:风警(风声很紧);风汛(风声;消息);风音(风声);风路(风声,线索);闻风而动

(11) “诗经”六义之一。指《诗经》中三种诗歌类型的一种,即《国风》中收集的民俗歌谣 [ballad]

风有采蘩采苹。——《左传·隐公三年》

乐操土风,不忘旧也。——《左传·成公九年》

(12) 又如:风赋(指“诗”六义中的风和赋);风人屺岵(诗人的悲凉伤感)

(13) 男女间的情爱 [love]

他如今大了,渐知风月,便看上了秦钟人物风流。——《红楼梦》

(14) 又如:风月(指男女间的情爱);风月常新(指情爱永久不断);风月子弟(沉湎于风月场的子弟)

(15) 风纪,教化 [conduct and discipline]。如:风惠(教化恩泽);风驰(形容德化广布);风爱(风泽德化);风调(指教化清和);风略(风纪和方略);风政(教化政治)

(16) 威势,气势 [power]。如:风扫(形容势力猛烈有如狂风席卷一般);风樯阵马(乘风之船,破阵之马。比喻气势雄厚)

(17) 六淫之一。颠狂病,也指颠狂。后作“病”[epilepsy]。如:风眩(癫痫);风痴(疯癫痴呆)

(18) 姓

词性变化

fēng

〈动〉

(1) 刮风;起风 [blow]

风则袭裘,雨则御盖。——宋· 苏轼《教战守》

风雨晨昏,羁魂有伴,当不孤寂。——清· 袁枚《祭妹文》

(2) 借风力吹[干;散] [put out to dry;winnow]。如:风干(由风吹干);风鸡(借风力吹干的鸡)

(3) 走逸 [escape]

君处北海,寡人处南海,唯是风马牛不相及也。——《左传·僖公四年》

库莫奚国有马百匹因风入境。——《北魏书》

(4) 嬉戏 [play]

众人忧得你苦,你却在这里风!快上山去!——《水浒全传》

fēng

<形、副>

(1) 传说的,没有确实根据的 [unground]。如:风谣(民歌,民谣);风言(流言,无根据的话)

(2) 放荡 [dissolute]。如:风魔(放浪,轻狂;疯子);风流博浪(风流放荡)

(3) 通“疯”。癫狂 [mad;insane]

奈何以国家科第放此风汉及第耶?——《玉泉子·真录》

你原来是个风和尚。——《西游记》

(4) 又如:风发(发疯);风病(精神病);风涎(患风疾的病根);风欠(疯狂);风风势势(举动不正常,易冲动)

(5) 〈副〉 通“凡”( fán)。大凡,大概 [in most cases;about]

愿先生之言其风也。——《庄子·天地》

(6) 另见 fěng;fèng

基本词义

fěng

〈动〉

(1) 讽刺;委婉劝告。通“讽” [mock;ridicule;satire;advise in mild tone]

而王与任王后以此使人风止 李太后, 李太后内有淫行,亦已。——《史记·梁孝王世家》

故布衣皆得风议,何况公卿之史乎?——《盐铁论》

蚡乃微言太后风上。——《汉书·田蚡传》

(2) 又如:风规(讽刺规劝);风谏(婉言劝谏。即讽谏);风谕(讽告,婉言开导)

(3) 另见 fēng;fèng

基本词义

fèng

〈动〉

(1) 吹拂 [blow]。如:春风风人

(2) 比喻感化 [reform a misguided person through persuasion,etc.]

天子于是以式终长者,故尊显以风百姓。——《史记·平准书》

(3) 又如:风民(感化、教化人民)

(4) 另见 fēng;fěng

偏旁部首

    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; ?>