小众年华 發表於 2023-6-12 00:00:00

织梦Dedecms软件频道下载次数真实显示的权宜修改

<p>
        <strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>1.找到plus\download.php,查找: </strong></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <p class="right">
                <span><u>复制代码</u></span></p>
        <p>
                代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        $vname = ''; <br>
        foreach($cu-&gt;ChannelFields as $k=&gt;$v){ <br>
        if($v['type']=='softlinks'){ $vname=$k; break; } <br>
        } </p>
<p>
        <br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>  在上面这个代码前面添加如下代码: </span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <p class="right">
                <span><u>复制代码</u></span></p>
        <p>
                代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        $id = isset($id) &amp;&amp; is_numeric($id) ? $id : 0; <br>
        $hash = md5($link); <br>
        $query = "select click from dede_archives where id='$aid'"; <br>
        $row = $dsql-&gt;GetOne($query); <br>
        $query = "update dede_archives set click=click+1 where id='$aid'"; <br>
        $dsql-&gt;ExecNoneQuery($query); </p>
<p>
        <br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>2.找到plus\disdls.php,用以下代码全部替换 </strong></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <p class="right">
                <span><u>复制代码</u></span></p>
        <p>
                代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        &lt;?php <br>
        require_once(dirname(__FILE__)."/../include/common.inc.php"); <br>
        $aid = (isset($aid) &amp;&amp; is_numeric($aid)) ? $aid : 0; <br>
        $row = $dsql-&gt;GetOne("Select click From `dede_archives` where id='$aid' "); <br>
        if(is_array($row)) <br>
        { <br>
        echo "document.write('".$row['click']."');\r\n"; <br>
        } <br>
        exit(); <br>
        /*----------- <br>
        如果想显示下载次数,即把下面JS调用放到文档模板适当位置 <br>
         <br>
        ------------*/ <br>
        ?&gt; </p>
頁: [1]
查看完整版本: 织梦Dedecms软件频道下载次数真实显示的权宜修改