Dedecms call software view times

Source: Internet
Author: User
Tags php tutorial

Dedecms call software view times
Below I modified the number of clicks for the dedecms disdls. php Tutorial to several times. The method is very simple. Call decms
*/
Require_once (dirname (_ file _). "/../include/common. inc. php ");

// Obtain the aid value, query it in the archives table, and output it in js.

$ Aid = (isset ($ aid) & is_numeric ($ aid ))? $ Aid: 0;
$ Dsql-> executenonequery2 ("update' #@__ archives 'set click = click + 1 where id = '$ aid '");
$ Row = $ dsql-> getone ("select click from '#@__ archives 'Where id =' $ aid '");
If (empty ($ row ['click']) $ row ['click'] = 0;
Echo "document. write ('{$ row ['click']}');";
Exit ();

/*
-----------
To display the number of downloads, place the following JS calls to the appropriate location of the document template.
<Script src = "{dede: global name = 'cfg _ phpurl '/}/disdls. php? Aid = {dede: field name = 'id'/} "language =" webpage effect "> </script>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.