{"id":29762,"date":"2024-11-25T16:50:11","date_gmt":"2024-11-25T08:50:11","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29762\/"},"modified":"2024-11-25T16:50:11","modified_gmt":"2024-11-25T08:50:11","slug":"%e5%b8%9d%e5%9b%bdcms%e5%b8%b8%e7%94%a8%e6%a0%87%e7%ad%be%e6%80%bb%e7%bb%93","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29762\/","title":{"rendered":"\u5e1d\u56fdcms\u5e38\u7528\u6807\u7b7e\u603b\u7ed3"},"content":{"rendered":"<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/033\/5ddcc47abf4c6233.gif\" class=\"aligncenter\" title=\"\u5e1d\u56fdcms\u5e38\u7528\u6807\u7b7e\u603b\u7ed3\u63d2\u56fe\" alt=\"\u5e1d\u56fdcms\u5e38\u7528\u6807\u7b7e\u603b\u7ed3\u63d2\u56fe\" \/><\/p>\n<p>\u5224\u65ad\u4f1a\u5458\u662f\u5426\u767b\u5f55<\/p>\n<p> if(!$_COOKIE[ecmsmlusername]){<br \/>$srr=&#8221;\u767b\u5f55\u53ef\u89c1&#8221;;<br \/>}else{<br \/>$srr=&#8221;[!&#8211;lbsly&#8211;]&#8221;;<br \/>}<br \/>?&gt;<br \/>[!&#8211;news.url&#8211;]skin\/default\/<\/p>\n<p>[e:loop={&#8220;select classid,classname,bname from phome_enewsclass where classid=&#8217;$GLOBALS[navclassid]'&#8221;,1,24,0}]<\/p>\n<p> =$bqr[bname]?&gt;[\/e:loop] <\/p>\n<p>[e:loop={&#8220;select * from phome_enewsclass where classid=&#8217;$GLOBALS[navclassid]'&#8221;,1,24,0}] =$bqr[bname]?&gt;[\/e:loop] <\/p>\n<p> $fcr=explode(&#8216;|&#8217;,$class_r[$GLOBALS[navclassid]][featherclass]);<br \/>\n<br \/>$topbclassid=$fcr[1]?$fcr[1]:$GLOBALS[navclassid];\/\/\u53d6\u5f97\u5f53\u524d\u680f\u76ee\u7684\u9876\u7ea7\u680f\u76eeID<br \/>\n<br \/>$rs=$empire-&gt;fetch1(&#8220;select * from phome_enewsclass where classid=$topbclassid&#8221;);<br \/>\n<br \/>?&gt;<br \/>\n<br \/>_=$rs[&#8216;bname&#8217;]?&gt;_=$public_r[sitename]?&gt; \u9876\u7ea7\u680f\u76ee\u540d\u79f0+\u7f51\u7ad9\u6807\u9898 <\/p>\n<p>=$class_r[$GLOBALS[navclassid]][bname]?&gt; \u5f97\u5230\u5f53\u524d\u680f\u76ee\u7684\u540d\u79f0<br \/>\n<br \/> [!&#8211;pagetitle&#8211;] \u6216 &nbsp; =$class_r[$GLOBALS[navclassid]][bname]?&gt; <\/p>\n<p>isgood=1 \u4e00\u7ea7\u63a8\u8350 <\/p>\n<p>firsttitle=1 \u4e00\u7ea7\u5934\u6761 <\/p>\n<p>[e:loop={10,3,0,0}] 10\u5f53\u524d\u680f\u76ee\uff0c3\u663e\u793a\u6761\u6570\uff0c <\/p>\n<p>[e:loop={4,1000,0,1,&#8217;leib=&#8221;\u697c\u5e02\u5feb\u8baf&#8221;&#8216;,&#8217;id DESC&#8217;}] 1\u6709\u56fe\u7247\u7684\u663e\u793a\u3002 <\/p>\n<p>[e:loop={&#8220;select * from phome_ecms_xtgg where firsttitle=1 order by id DESC limit 20&#8221;,6,24,0}] <\/p>\n<p>=$bqno?&gt; [!&#8211;no.num&#8211;] \u5faa\u73af\u5e8f\u53f7 <\/p>\n<p>=$bqsr[&#8216;titleurl&#8217;]?&gt; =$bqr[title]?&gt; =esub($bqr[title],8)?&gt; <\/p>\n<p>[\/e:loop]<br \/>\n <\/p>\n<p>=DoWapRepNewstext($r[newstext])?&gt;<\/p>\n<p>\u65f6\u95f4\u8c03\u7528\u6807\u7b7e\uff1a=date(&#8220;Y-m-d&#8221;,$bqr[&#8216;newstime&#8217;])?&gt;<\/p>\n<p>\u5217\u8868\u9875<\/p>\n<p>\u60a8\u5f53\u524d\u7684\u4f4d\u7f6e\uff1a[!&#8211;newsnav&#8211;]<\/p>\n<p>[!&#8211;no.num&#8211;]<\/p>\n<p>[!&#8211;show.listpage&#8211;]<\/p>\n<p>\u5185\u5bb9\u9875<\/p>\n<p>[!&#8211;info.next&#8211;]\u4e0b\u4e00\u7bc7 [!&#8211;info.pre&#8211;]\u4e0a\u4e00\u7bc7<\/p>\n<p>\u4e07\u80fd\u6807\u7b7e\u7528[!&#8211;onclick&#8211;] \u7075\u52a8\u6807\u7b7e\u7528=$bqr[onclick]?&gt; \u70b9\u51fb\u91cf<\/p>\n<p>&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$titleurl=sys_ReturnBqTitleLink($navinfor); \u83b7\u5f97\u5f53\u524d\u9875\u9762\u7684\u7f51\u5740<br \/>$url = &#8220;http:\/\/&#8221;.$_SERVER [&#8216;HTTP_HOST&#8217;].$_SERVER[&#8216;PHP_SELF&#8217;]; \u83b7\u5f97\u5f53\u524d\u9875\u9762\u7684\u7f51\u5740<\/p>\n<p>sql\u8bed\u53e5<\/p>\n<p>&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p> \/\/\u62a5\u540d\u4eba\u6570&nbsp;<br \/>$num=$empire-&gt;gettotal(&#8220;select count(*) as total from phome_enewsfeedback where kft='&#8221;.$navinfor[title].&#8221;&#8216;&#8221;);<br \/>?&gt;<\/p>\n<p>\u5e1d\u56fdCMS\u7ecf\u5e38\u7528\u5230\u7684\u8c03\u7528sql\u8bed\u53e5:<\/p>\n<p>\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u662f\u5e1d\u56fd7.0\u7248\u672c\u7684\uff0c\u9700\u8981\u5c06checked=1\u53bb\u6389<\/p>\n<p>&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>\u3000\u30001\uff0c\u6839\u636e\u6700\u65b0\u6587\u7ae0 select * from [!db.pre!]ecms_news where checked=1 order by newstime desc limit 10<br \/>\u3000\u30002\uff0c\u6839\u636e\u63a8\u8350\u6587\u7ae0 select * from [!db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc limit 10<br \/>\u3000\u30003\uff0c\u6839\u636e\u70ed\u95e8\u6587\u7ae0 select * from [!db.pre!]ecms_news where checked=1 order by onclick desc limit 10<br \/>\u3000\u30004\uff0c\u6839\u636e\u5934\u6761\u65b0\u95fb select * from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc limit 10<br \/>\u3000\u30005\uff0c\u6839\u636e\u8bc4\u8bba\u6392\u884c select * from [!db.pre!]ecms_news where checked=1 order by plnum desc limit 10<br \/>\u3000\u30006\uff0c\u6839\u636edigg\u6392\u884c select * from [!db.pre!]ecms_news where checked=1 order by diggtop desc limit 10<br \/>\u3000\u30007\uff0c\u6839\u636e\u6295\u7968\u6392\u884c select * from [!db.pre!]ecms_news where checked=1 order by votenum desc limit 10<br \/>\u3000\u30008\uff0c\u6839\u636e\u4e0b\u8f7d\u6392\u884c select * from [!db.pre!]ecms_news where checked=1 order by totaldown desc limit 10<br \/>\u3000\u30009\uff0c\u6839\u636e\u8bc4\u5206\u6392\u884c select * from [!db.pre!]ecms_news where checked=1 order by infopfen desc limit 10<\/p>\n<p>\u5c0f\u6280\u5de7\u6536\u5f55\uff1a<\/p>\n<p>php\u4e09\u5143\u6761\u4ef6\u8fd0\u7b97\u7b26\uff1a<\/p>\n<p>&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>=$bqr[&#8216;ftitle&#8217;]?$bqr[&#8216;ftitle&#8217;]:$bqr[&#8216;title&#8217;]?&gt;<\/p>\n<p>\u7075\u52a8\u6216\u8005php\u67e5\u8be2\u8c03\u7528\u7f16\u8f91\u5668\u5185\u5bb9\u7684\u65f6\u5019\u8981\u52a0stripslashes\u5220\u9664\u53cd\u659c\u6760\u6bd4\u5982\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>=stripslashes($r[&#8216;newstext&#8217;])?&gt;<\/p>\n<p>\u5185\u5bb9\u9875\u5f53\u524d\u4fe1\u606fID\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$navinfor[&#8216;id&#8217;]<\/p>\n<p>\u5217\u8868\u5185\u5bb9\u6a21\u677f\u4fe1\u606fID\uff1a<\/p>\n<p>&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$r[&#8216;id&#8217;]<\/p>\n<p>\u5f53\u524d\u680f\u76ee\u540d\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$class_r[$GLOBALS[&#8216;navclassid&#8217;]][&#8216;classname&#8217;];<\/p>\n<p>\u5f53\u524d\u680f\u76ee\u7236\u680f\u76ee\uff1a<\/p>\n<p>&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$class_r[$GLOBALS[&#8216;navclassid&#8217;]][&#8216;bclassid&#8217;];<\/p>\n<p>\u5f53\u524d\u680f\u76ee\u522b\u540d\uff1a<\/p>\n<p>&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$class_r[$GLOBALS[&#8216;navclassid&#8217;]][&#8216;bname&#8217;];<\/p>\n<p>\u5f53\u524d\u680f\u76ee\u5b50\u680f\u76ee\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$class_r[$GLOBALS[&#8216;navclassid&#8217;]][&#8216;sonclass&#8217;];<\/p>\n<p>\u5f53\u524d\u680f\u76ee\u5b50\u5224\u65ad\u662f\u5426\u4e3a\u7ec8\u7ea7\u680f\u76ee\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$class_r[$GLOBALS[&#8216;navclassid&#8217;]][&#8216;islast&#8217;];<\/p>\n<p>\u5f53\u524d\u680f\u76ee\u662f\u5426\u6709\u5df2\u5ba1\u6838\u4fe1\u606f\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$GLOBALS[&#8216;num&#8217;]==0\u4e3a\u6ca1\u6709\u4fe1\u606f<\/p>\n<p>\u4e2d\u5f15\u5165php\u8def\u5f84\u5199\u6cd5\uff08\u4f8b\u5b50\u662f\u6587\u4ef6\u5728\u6839\u76ee\u5f55\uff09<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<\/p>\n<p>\u6392\u9664\u7f6e\u9876\u3001\u5934\u6761\u3001\u63a8\u8350\u7b49\uff0csql\u9644\u52a0\u6761\u4ef6\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>&#8216;istop=0 and isgood=0 and firsttitle=0&#8217;<\/p>\n<p>\u4e0a\u4e0a\u7ea7\u680f\u76eeid\uff1a<\/p>\n<p> $bclassid=$class_r[$GLOBALS[navclassid]][bclassid];<br \/>$bbclassid=$class_r[$bclassid][bclassid];<br \/>echo $bbclassid;<br \/>?&gt;<br \/>$bbclassid\u5c31\u662f\u4e0a\u4e0a\u7ea7\u7236\u680f\u76eeid<\/p>\n<p>\u6295\u7a3f\u3001\u767b\u9646\u3001\u53cd\u9988\u3001\u7559\u8a00\u7b49\u4e4b\u540e\u8df3\u8f6c\u6307\u5b9a\u9875\u9762\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<\/p>\n<p>\u7edf\u8ba1\u4fe1\u606f\u88ab\u6536\u85cf\u6570\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>$favas=$empire-&gt;gettotal(&#8220;select count(*) as total from {$dbtbpre}enewsfava where id=&#8217;$navinfor[id]&#8217; and classid=&#8217;$GLOBALS[navclassid]'&#8221;);<br \/>?&gt;<br \/>=$favas?&gt;\u5c31\u662f\u8fd9\u6761\u4fe1\u606f\u7684\u6536\u85cf\u6570<\/p>\n<p>\u5217\u8868\u3001\u7ed3\u5408\u9879\u5224\u65ad\u5f53\u524d\u6ca1\u6709\u4fe1\u606f\u7ed9\u51fa\u63d0\u793a\uff1a<\/p>\n<p>if($GLOBALS[&#8216;num&#8217;]==&#8217;0&#8242;){<br \/>?&gt;<\/p>\n<p>\u5bf9\u4e0d\u8d77\uff0c\u6682\u65f6\u6ca1\u6709\u4efb\u4f55\u4fe1\u606f\uff01<\/p>\n<p>}else{<br \/>\n<br \/>?&gt;<br \/>\n<br \/>[!&#8211;empirenews.listtemp&#8211;] [!&#8211;empirenews.listtemp&#8211;] <\/p>\n<p>}<br \/>\n<br \/>?&gt;<br \/>\n<br \/>[\/code] <\/p>\n<p>\u52a8\u6001\u4f7f\u7528\uff1a<\/p>\n<p>\u7f51\u7ad9\u540d\u79f0\uff1a=$public_r[&#8216;sitename&#8217;]?&gt;<br \/>\u7f51\u7ad9\u5730\u5740\uff1a=$public_r[&#8216;newsurl&#8217;]?&gt;<\/p>\n<p>\u5e1d\u56fd\u81ea\u8eab\u7684\u65f6\u95f4\u8f6c\u6362\u51fd\u6570\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>=format_datetime($bqr[newstime],&#8217;Y-m-d&#8217;)?&gt;<\/p>\n<p>\u6b64\u51fd\u6570\u81ea\u5e26\u5224\u65ad\uff0c\u6bd4\u8f83\u4e0d\u9519\uff0c\u63a8\u8350\u3002<\/p>\n<p>\u5224\u65ad\u5185\u5bb9\u662f\u5426\u6709\u56fe\u7247\uff0c\u6ca1\u6709\u56fe\u7247\u5219\u663e\u793a\u6587\u4e2d\u5e7f\u544a \u6709\u56fe\u7247\u5219\u4e0d\u663e\u793a\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p> $string=$navinfor[&#8216;newstext&#8217;];\/\/\u5185\u5bb9\u5b57\u6bb5<br \/>$some=&#8221;<img>$num=explode($some,$string);<br \/>if(count($num)&gt;1){\/\/\u5224\u65ad\u5185\u5bb9\u4e2d\u662f\u5426\u6709\u56fe\u7247<br \/>?&gt;<br \/>[!&#8211;newstext&#8211;]<\/p>\n<p>}else{<br \/>?&gt;<\/p>\n<p> \u6211\u662f\u5e7f\u544a<br \/>\n<br \/>[!&#8211;newstext&#8211;] <\/p>\n<p>}<br \/>\n<br \/>?&gt; <\/p>\n<p>\u622a\u53d6\u52a0\u8fc7\u6ee4\u6807\u7b7e\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>=esub(htmlspecialchars(strip_tags($navinfor[newstext])),160)?&gt;<\/p>\n<p>\u5185\u5bb9\u9875\u6216\u7075\u52a8\u6807\u7b7e\u652f\u6301\u6807\u9898\u5c5e\u6027<br \/>\u5185\u5bb9\u9875\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>=DoTitleFont($navinfor[titlefont],$navinfor[title])?&gt;<\/p>\n<p>\u7075\u52a8\u6807\u7b7e\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>=DoTitleFont($bqr[titlefont],$bqr[title])?&gt;<\/p>\n<p>\u6807\u9898\u622a\u53d6\u5b57\u6570+\u6807\u9898\u5c5e\u6027\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>=DoTitleFont($bqr[titlefont],esub($bqr[title],32,&#8217;&#8230;&#8217;))?&gt;<\/p>\n<p>\u4ee5\u4e0a\u6240\u8ff0\u5c31\u662f\u672c\u6587\u7684\u5168\u90e8\u5185\u5bb9\u4e86\uff0c\u5e0c\u671b\u5927\u5bb6\u80fd\u591f\u559c\u6b22\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5e38\u7528\u6807\u7b7e\u603b\u7ed3\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5224\u65ad\u4f1a\u5458\u662f\u5426\u767b\u5f55 if(!$_COOKIE[ecmsmlusername]){$srr=&#8221;\u767b\u5f55\u53ef\u89c1&#8221;;}else{$srr=&#8221;[!&#8211;lbsly&#8211;]&#8221;;}?&gt;[!&#8211;news.url&#8211;]skin\/default\/ [e:loop={&#8220;select classid,classname,bname from phome_enewsclass where classid=&#8217;$GLOBALS[navclassid]&#8217;&#8221;,1,24,0}] =$bqr[bname]?&gt;[\/e:loop] [e:loop={&#8220;select * from phome_enewsclass where classid=&#8217;$GLOBALS[navclassid]&#8217;&#8221;,1,24,0}] =$bqr[bname]?&gt;[\/e:loop] $fcr=explode(&#8216;|&#8217;,$class_r[$GLOBALS[navclassid]][featherclass]); $topbclassid=$fcr[1]?$fcr[1]:$GLOBALS[navclassid];\/\/\u53d6\u5f97\u5f53\u524d\u680f\u76ee\u7684\u9876\u7ea7\u680f\u76eeID $rs=$empire-&gt;fetch1(&#8220;select * from phome_enewsclass where classid=$topbclassid&#8221;); ?&gt; _=$rs[&#8216;bname&#8217;]?&gt;_=$public_r[sitename]?&gt; \u9876\u7ea7\u680f\u76ee\u540d\u79f0+\u7f51\u7ad9\u6807\u9898 =$class_r[$GLOBALS[navclassid]][bname]?&gt; \u5f97\u5230\u5f53\u524d\u680f\u76ee\u7684\u540d\u79f0 [!&#8211;pagetitle&#8211;] \u6216 &nbsp; =$class_r[$GLOBALS[navclassid]][bname]?&gt; isgood=1 \u4e00\u7ea7\u63a8\u8350 firsttitle=1 \u4e00\u7ea7\u5934\u6761 [e:loop={10,3,0,0}] 10\u5f53\u524d\u680f\u76ee\uff0c3\u663e\u793a\u6761\u6570\uff0c [e:loop={4,1000,0,1,&#8217;leib=&#8221;\u697c\u5e02\u5feb\u8baf&#8221;&#8216;,&#8217;id DESC&#8217;}] 1\u6709\u56fe\u7247\u7684\u663e\u793a\u3002 [e:loop={&#8220;select * from phome_ecms_xtgg where firsttitle=1 order by id DESC limit 20&#8221;,6,24,0}] =$bqno?&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-29762","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=29762"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29762\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}