 {"id":345,"date":"2011-03-03T10:06:07","date_gmt":"2011-03-03T02:06:07","guid":{"rendered":"http:\/\/www.qyuef.com\/?p=345"},"modified":"2011-03-03T10:06:07","modified_gmt":"2011-03-03T02:06:07","slug":"%e8%a7%a3%e5%86%b3dede5-6%e5%87%ba%e7%8e%b0%e5%b9%bf%e5%91%8a%e5%9b%be%e7%89%87%e4%b8%8d%e8%83%bd%e7%bb%a7%e6%89%bf%e5%88%b0%e5%ad%90%e7%b1%bb%e6%98%be%e7%a4%ba%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%81","status":"publish","type":"post","link":"http:\/\/www.qyuef.com\/?p=345","title":{"rendered":"\u89e3\u51b3dede5.6\u51fa\u73b0\u5e7f\u544a\u56fe\u7247\u4e0d\u80fd\u7ee7\u627f\u5230\u5b50\u7c7b\u663e\u793a\u7684\u95ee\u9898\uff01"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u7528\u6700\u65b0\u7248\u672c\u7ec7\u68a6\u505a\u4e00\u4e2a\u5c0f\u578b\u95e8\u6237\u7684\u65f6\u5019\u53d1\u73b0\u4e00\u4e2a\u95ee\u9898\uff0c\u53ef\u80fd\u662f\u65b0\u7248\u672c\u7684bug\u3002\u5728\u6709\u7684\u65f6\u5019\u4f1a\u51fa\u73b0\u628a\u5e7f\u544a\u8bbe\u7f6e\u5728\u5927\u7c7b\u663e\u793a\uff0c\u5c0f\u7c7b\u6ca1\u8bbe\u7f6e\u5c31\u4e0d\u4f1a\u663e\u793a\u5e7f\u544a\u5185\u5bb9\u4e86\u3002\u6839\u636e\u9700\u6c42\u4fee\u6539\u4e86\u4e00\u4e0b\u5e7f\u544a\u8c03\u7528\u7684\u7a0b\u5e8f\uff0c\u9700\u8981\u6ce8\u610f\u7684\u4e8b\uff0c\u662f\u7528\u7684\u9ed8\u8ba4\u8868\u524d\u7f00\u3002\u8bf7\u6ce8\u610f\u4f7f\u7528\uff01\u5982\u679c\u4f60\u4fee\u6539\u8fc7\u5c31\u5f97\u4fee\u6539\u7a0b\u5e8f\u6587\u4ef6\u3002<\/p>\n<p>\u9996\u5148\u8986\u76d6\u6587\u4ef6\\include\\taglib\\myad.lib.php<\/p>\n<pre lang='php' line='1'>\n< ?php\n\nif(!defined('DEDEINC')) exit('Request Error!');\nrequire_once(DEDEINC.'\/taglib\/mytag.lib.php');\n\nfunction lib_myad(&#038;$ctag, &#038;$refObj)\n{\n\t$attlist = \"typeid|0,name|\";\n\tFillAttsDefault($ctag->CAttribute->Items,$attlist);\n\textract($ctag->CAttribute->Items, EXTR_SKIP);\n   $typeid=$_GET['tid'];\n\t$body = lib_GetMyTagT($refObj, $_GET['tid'], $name, '#@__myad');\n\t\/\/return \"#######\".$typeid;\n\treturn $body;\n}\n\n?>\n<\/pre>\n<p>\u7136\u540e\u8986\u76d6\u6587\u4ef6\\include\\taglib\\mytag.lib.php<\/p>\n<pre lang='php' line='1'>\n< ?php\n\nif(!defined('DEDEINC')) exit('Request Error!');\n\nfunction lib_mytag(&#038;$ctag, &#038;$refObj)\n{\n\t$attlist = \"typeid|0,name|,ismake|no\";\n\tFillAttsDefault($ctag->CAttribute->Items,$attlist);\n\textract($ctag->CAttribute->Items, EXTR_SKIP);\n\n\tif(trim($ismake)=='') $ismake = 'no';\n\t$body = lib_GetMyTagT($refObj, $typeid, $name, '#@__mytag');\n\t\/\/\u7f16\u8bd1\n\tif($ismake=='yes')\n\t{\n\t\trequire_once(DEDEINC.'\/arc.partview.class.php');\n\t\t$pvCopy = new PartView($typeid);\n\t\t$pvCopy->SetTemplet($body,\"string\");\n\t\t$body = $pvCopy->GetResult();\n\t}\n\treturn $body;\n}\n\nfunction lib_GetMyTagT(&$refObj, $typeid,$tagname,$tablename)\n{\n\tglobal $dsql;\n\tif($tagname=='') return '';\n\tif(trim($typeid)=='') $typeid=0;\n\tif( !empty($refObj->Fields['typeid']) && $typeid==0) $typeid = $refObj->Fields['typeid'];\n\t\n\t$typesql = $row = '';\n\t$row1=$dsql->GetOne(\"select topid from dede_arctype where id=$typeid\");\n\t$topid=$row1[\"topid\"];\n\tif($topid!=0){\n\t$typeid=$topid;\n\t}\n\tif($typeid > 0) $typesql = \" And typeid=$typeid\";\n\t$row = $dsql->GetOne(\"SELECT * FROM dede_myad WHERE tagname = '$tagname' AND typeid in (0,$typeid)\");\n\tif(!is_array($row)) return '';\n\t\/\/echo \" Select * From dede_myad where tagname like '$tagname' $typesql\";\n\t$nowtime = time();\n\t\n\t\t$body = $row['normbody'];\n\n\t\n\treturn $body;\n}\n?>\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u7528\u6700\u65b0\u7248\u672c\u7ec7\u68a6\u505a\u4e00\u4e2a\u5c0f\u578b\u95e8\u6237\u7684\u65f6\u5019\u53d1\u73b0\u4e00\u4e2a\u95ee\u9898\uff0c\u53ef\u80fd\u662f\u65b0\u7248\u672c\u7684bug\u3002\u5728\u6709\u7684\u65f6\u5019\u4f1a\u51fa\u73b0\u628a\u5e7f\u544a\u8bbe\u7f6e\u5728\u5927\u7c7b\u663e\u793a\uff0c\u5c0f\u7c7b\u6ca1\u8bbe\u7f6e\u5c31\u4e0d\u4f1a\u663e\u793a\u5e7f\u544a\u5185\u5bb9\u4e86\u3002\u6839\u636e\u9700\u6c42\u4fee\u6539\u4e86\u4e00\u4e0b\u5e7f\u544a\u8c03\u7528\u7684\u7a0b\u5e8f\uff0c\u9700\u8981\u6ce8\u610f\u7684\u4e8b\uff0c\u662f\u7528\u7684\u9ed8\u8ba4\u8868\u524d\u7f00\u3002\u8bf7\u6ce8\u610f\u4f7f\u7528\uff01\u5982\u679c\u4f60\u4fee\u6539\u8fc7\u5c31\u5f97\u4fee\u6539\u7a0b\u5e8f\u6587\u4ef6\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[95],"tcat":[],"_links":{"self":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/posts\/345"}],"collection":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345"}],"version-history":[{"count":0,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345"},{"taxonomy":"tcat","embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftcat&post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}