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>