{"id":5052,"date":"2022-02-09T11:31:58","date_gmt":"2022-02-09T03:31:58","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=5052"},"modified":"2022-02-09T11:31:58","modified_gmt":"2022-02-09T03:31:58","slug":"%e5%b8%9d%e5%9b%bdcms%e6%96%b0%e9%97%bb%e6%a8%a1%e5%9e%8b%e8%bd%ac%e6%88%90%e6%96%87%e7%ab%a0%e6%a8%a1%e5%9e%8b%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/5052.html","title":{"rendered":"\u5e1d\u56fdCMS\u65b0\u95fb\u6a21\u578b\u8f6c\u6210\u6587\u7ae0\u6a21\u578b\u7684\u65b9\u6cd5"},"content":{"rendered":"

\u5e1d\u56fdCMS \u65b0\u95fb\u6a21\u578b\u8f6c\u6210\u6587\u7ae0\u6a21\u578b\u7684\u65b9\u6cd5<\/h2>\n

1\u3001\u6570\u636e\u5907\u4efd
\n\u975e\u5e38\u91cd\u8981\u3002\u4e07\u4e00\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u610f\u5916\uff0c\u786e\u4fdd\u8001\u6570\u636e\u5b89\u5168\u90e8\u4e22\u5931\u3002<\/h3>\n

2\u3001\u6570\u636e\u5e93\u8f6c\u6362
\n\u5c06\u4ee5\u4e0b\u4ee3\u7801\u4fdd\u5b58\u4e3a\u4e00\u4e2aphp\u6587\u4ef6\uff0c\u6587\u4ef6\u7f16\u7801\u683c\u5f0f\u4e0e\u4f60\u7f51\u7ad9\u7f16\u7801\u76f8\u540c\uff0c\u4ee3\u7801\u4e2d\u7684\u53c2\u6570\u8bbe\u7f6e\u90e8\u5206\u6309\u7167\u5b9e\u9645\u60c5\u51b5\u6765\u586b\u5199\u3002<\/h3>\n

\u5047\u8bbe\u4f60\u4e3a\u6b64\u65b0\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3a zh.php \u7684\u6587\u4ef6\uff0c\u90a3\u4e48\u5c06\u6b64\u6587\u4ef6\u653e\u5230 e\/update\/ \u6587\u4ef6\u5939\u4e2d\u3002\u90a3\u4e48\u4f60\u8fd9\u65f6\u5728\u6d4f\u89c8\u5668\u4e2d\u6267\u884c\u4ee5\u4e0b\u7f51\u5740\uff1a<\/p>\n

http:\/\/\u4f60\u7684\u7f51\u5740\/e\/update\/zh.php?tochange=1<\/p>\n

\u6b64\u7a0b\u5e8f\u4f1a\u5206\u7ec4\u8f6c\u6362\u6570\u636e\u3002<\/p>\n

\u8bf7\u6ce8\u610f\uff1a<\/p>\n

\uff081\uff09\u4e0d\u80fd\u91cd\u590d\u8f6c\u6362\uff0c\u5426\u5219\u6570\u636e\u4e22\u5931\u3002<\/p>\n

\uff082\uff09\u8f6c\u6362\u5b8c\u4e4b\u540e\u8bf7\u7acb\u5373\u5728\u670d\u52a1\u5668\u4e0a\u5220\u9664\u6b64\u6587\u4ef6\u3002<\/p>\n

\uff083\uff09\u6b64\u7a0b\u5e8f\u9002\u7528\u4e8e\u5e1d\u56fdcms7.0\u53ca\u540e\u7eed\u7248\u672c\u3002<\/p>\n

<?php\r\nerror_reporting(E_ERROR | E_WARNING | E_PARSE);\r\n\r\n@set_time_limit(1000);\r\n\r\n\/\/********************* \u53c2\u6570\u8bbe\u7f6e\u5f00\u59cb *********************\r\n\r\n$newstb=\"gushi\"; \/\/\u9700\u8981\u8f6c\u6362\u7684\u6570\u636e\u8868\r\n$cf='newstext';\/\/\u9700\u8981\u8f6c\u6362\u7684\u5b57\u6bb5\u540d\r\n$fa=1;\/\/\u5b57\u6bb5\u4f4d\u7f6e\uff0c0\u4e3a\u4e3b\u8868\uff0c1\u4e3a\u526f\u8868\r\n$changeline=50; \/\/\u6bcf\u7ec4\u8f6c\u6362\u6570\r\n\r\n\r\n\/\/********************* \u53c2\u6570\u8bbe\u7f6e\u7ed3\u675f *********************\r\n\r\nif($_GET['tochange']==1)\r\n{\r\n\tinclude(\"..\/class\/connect.php\");\r\n\tinclude(\"..\/class\/db_sql.php\");\r\n\tinclude(\"..\/class\/functions.php\");\r\n\t$link=db_connect();\r\n\t$empire=new mysqlquery();\r\n\tdp_ChangeNewsToArticle($_GET['start']);\r\n}\r\n\r\n\/\/\u5f00\u59cb\u8f6c\u6362\r\nfunction dp_ChangeNewsToArticle($start=0){\r\n\tglobal $empire,$newstb,$cf,$fa,$changeline,$dbtbpre;\r\n\t$start=(int)$start;\r\n\tif($start==0){\r\n\t\t$ckist=$empire->fetch1(\"select fid,savetxt from {$dbtbpre}enewsf where tbname='$newstb' and f='$cf' limit 1\");\r\n\t\tif(!$ckist['fid']){\r\n\t\t\texit(\"\u53c2\u6570\u8bbe\u7f6e\u9519\u8bef\");\r\n\t\t}\r\n\t\tif(!$ckist['savetxt']){\r\n\t\t\t\/\/\u5b57\u6bb5\u8868\r\n\t\t\t$empire->query(\"update {$dbtbpre}enewsf set savetxt=1 where tbname='$newstb' and f='$cf' limit 1\");\r\n\t\t\t\/\/\u7ec4\u5408\u5b58\u6587\u672c\r\n\t\t\tTogSaveTxtF(1);\r\n\t\t\t\/\/\u66f4\u65b0\u7f13\u5b58\r\n\t\t\tGetConfig(1);\r\n\t\t}\r\n\t}\r\n\t$b=0;\r\n\t$tbname=$fa?$newstb.\"_data_1\":$newstb;\r\n\t$sql=$empire->query(\"select id,classid,\".$cf.\" from {$dbtbpre}ecms_\".$tbname.\" where id>$start order by id limit \".$changeline);\r\n\twhile($r=$empire->fetch($sql)){\r\n\t\t$b=1;\r\n\t\t$newid=$r['id'];\r\n\t\t$newstext=dp_ReturnChangeNewstextUrl($r[$cf],$r['id']);\r\n\t\t$empire->query(\"update {$dbtbpre}ecms_\".$tbname.\" set \".$cf.\"='$newstext' where id='$newid' limit 1\");\r\n\t}\r\n\tif($b==0)\r\n\t{\r\n\t\techo\"\u606d\u559c\u60a8\uff01\u8f6c\u6362\u5b8c\u6bd5\u3002\";\r\n\t\texit();\r\n\t}\r\n\techo\"\u4e00\u7ec4\u6570\u636e\u8f6c\u6362\u5b8c\u6bd5\uff0c\u6b63\u8fdb\u5165\u4e0b\u4e00\u7ec4 (<font color=red><b>\".$newid.\"<\/b><\/font>)......<script>self.location.href='index.php?tochange=1&start=$newid';<\/script>\";\r\n\texit();\r\n}\r\n\r\n\/\/\u8fd4\u56de\u5185\u5bb9\u5730\u5740\r\nfunction dp_ReturnChangeNewstextUrl($value,$id){\r\n\tglobal $public_r,$newstb,$cf;\r\n\t\/\/\u5b58\u653e\u6587\u672c\r\n\tif(strstr($public_r['savetxtf'],\",\".$newstb.\".\".$cf.\",\"))\r\n\t{\r\n\t\t$truetime=time();\r\n\t\t\/\/\u5efa\u7acb\u76ee\u5f55\r\n\t\t$thetxtfile=GetFileMd5().$id;\r\n\t\t$truevalue=MkDirTxtFile(date(\"Y\/md\",$truetime),$thetxtfile);\r\n\t\t\/\/\u5199\u653e\u6587\u4ef6\r\n\t\tEditTxtFieldText($truevalue,$value);\r\n\t\t$value=$truevalue;\r\n\t}\r\n\telse{\r\n\t\texit(\"\u53c2\u6570\u8bbe\u7f6e\u9519\u8bef\");\r\n\t}\r\n\treturn $value;\r\n}\r\n?>\r\n<html>\r\n<head>\r\n<title>\u65b0\u95fb\u6a21\u578b\u8f6c\u6587\u7ae0\u6a21\u578b\u7a0b\u5e8f<\/title>\r\n<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=gb2312\">\r\n<style>\r\na:link     { COLOR: #000000; TEXT-DECORATION: none }\r\na:visited   { COLOR: #000000 ; TEXT-DECORATION: none }\r\na:active   { COLOR: #000000 ; TEXT-DECORATION: underline }\r\na:hover    { COLOR: #000000 ; TEXT-DECORATION:underline }\r\n.home_top { border-top:2px solid #4798ED; }\r\n.home_path { background:#4798ED; padding-right:10px; color:#F0F0F0; font-size: 11px; }\r\ntd, th, caption { font-family:  \"\u5b8b\u4f53\"; font-size: 12px; color:#000000;  LINE-HEIGHT: 165%; }\r\n.hrLine{MARGIN: 0px 0px; BORDER-BOTTOM: #807d76 1px dotted;}\r\n<\/style>\r\n<\/head>\r\n<body>\r\n  <p><br>\r\n  <br>\r\n  <\/p>\r\n  <form method=\"get\" action=\"index.php\" onsubmit=\"return confirm('\u786e\u8ba4\u8981\u6267\u884c?');\">\r\n  <table width=\"500\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#0472BC\">\r\n    <tr> \r\n      <td height=\"25\"><div align=\"center\"><font color=\"#FFFFFF\" size=\"3\"><strong>\u65b0\u95fb\u6a21\u578b\u8f6c\u6587\u7ae0\u6a21\u578b\u7a0b\u5e8f<\/strong><\/font><\/div><\/td>\r\n    <\/tr>\r\n    <tr bgcolor=\"#FFFFFF\"> \r\n      <td height=\"50\"> \r\n        <div align=\"center\"> \r\n          <input type=submit name=ok value=\"\u70b9\u51fb\u5f00\u59cb\u8f6c\u6362\">\r\n          <input type=hidden name=\"tochange\" value=1>\r\n        <\/div><\/td>\r\n    <\/tr>\r\n  <\/table>\r\n<\/form>\r\n<\/body>\r\n<\/html>\r\n<\/code><\/pre>\n

3\u3001\u6a21\u677f\u4fee\u6539<\/h3>\n

\u5982\u679c\u4f60\u5728\u4e4b\u524d\u6a21\u677f\u4e2d\u7528php\u4ee3\u7801\u8c03\u7528\u8fc7\u88ab\u8f6c\u6362\u7684\u5b57\u6bb5\uff0c\u5219\u6b64\u65f6\u9700\u8981\u7528\u51fd\u6570 GetTxtFieldText \u6765\u8bfb\u53d6\u3002<\/p>\n

\u4f8b\u5982\uff0c\u5728\u4e4b\u524d\u4f60\u8c03\u7528newstext\u7528\u4ee3\u7801\uff1a<\/p>\n

<?=$navinfor['newstext']?>\r\n<\/code><\/pre>\n

newstext\u8f6c\u6362\u6210\u5b58\u6587\u672c\u4e4b\u540e\u5fc5\u8c03\u7528\u4ee3\u7801\u662f\uff1a<\/p>\n

<?=GetTxtFieldText($navinfor['newstext'])?>\r\n<\/code><\/pre>\n

4\u3001\u8865\u5145\u8bf4\u660e\uff1a\u65b0\u95fb\u6a21\u578b\u4e0e\u6587\u7ae0\u6a21\u578b\u7684\u533a\u522b<\/h3>\n

\u65b0\u95fb\u7cfb\u7edf\u6a21\u578b\u7684\u5185\u5bb9(newstext)\u662f\u5b58\u653e\u6570\u636e\u5e93\u7684\uff1b\u800c\u6587\u7ae0\u7cfb\u7edf\u6a21\u578b\u7684\u5185\u5bb9(newstext)\u662f\u5b58\u653e\u4e8e\u6587\u672c\u6587\u4ef6\u3002\u5bf9\u4e8e\u6570\u636e\u91cf\u6bd4\u8f83\u5927\u7684\uff0c\u63a8\u8350\u4f7f\u7528\u6587\u7ae0\u7cfb\u7edf\u6a21\u578b\u3002
\n\u65b0\u95fb\u7cfb\u7edf\u6a21\u578b\u652f\u6301\u5185\u5bb9(newstext)\u641c\u7d22\uff1b\u800c\u6587\u7ae0\u7cfb\u7edf\u6a21\u578b\u4e0d\u652f\u6301\u5185\u5bb9(newstext)\u641c\u7d22\u3002<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

\u5e1d\u56fdCMS \u65b0\u95fb\u6a21\u578b\u8f6c\u6210\u6587\u7ae0\u6a21\u578b\u7684\u65b9\u6cd5 1\u3001\u6570\u636e\u5907\u4efd \u975e\u5e38\u91cd\u8981\u3002\u4e07\u4e00\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u610f\u5916\uff0c\u786e\u4fdd\u8001\u6570\u636e\u5b89\u5168\u90e8\u4e22\u5931 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1580,1602],"class_list":["post-5052","post","type-post","status-publish","format-standard","hentry","category-web","tag-cms","tag-1602"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=5052"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5052\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=5052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=5052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=5052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}