home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 May / INTERNET103.ISO / pc / software / windows / building / php_nuke / html / blocks / block-total_hits.php < prev    next >
Encoding:
PHP Script  |  2002-09-16  |  1.2 KB  |  25 lines

  1. <?php
  2.  
  3. ########################################################################
  4. # PHP-Nuke Block: Total Hits v0.1                                      #
  5. #                                                                      #
  6. # Copyright (c) 2001 by C. Verhoef (cverhoef@gmx.net)                  #
  7. #                                                                      #
  8. ########################################################################
  9. # This program is free software. You can redistribute it and/or modify #
  10. # it under the terms of the GNU General Public License as published by #
  11. # the Free Software Foundation; either version 2 of the License.       # 
  12. ######################################################################## 
  13.  
  14. if (eregi("block-Total_Hits.php", $PHP_SELF)) {
  15.     Header("Location: index.php");
  16.     die();
  17. }
  18.  
  19. global $nukeurl, $prefix, $startdate, $dbi;
  20.  
  21. $result = sql_query("SELECT count FROM ".$prefix."_counter WHERE type='total' AND var='hits'", $dbi);
  22. $result = sql_fetch_row($result, $dbi);
  23. $content = "<center><small>"._WERECEIVED."</small><br><b><a href=\"modules.php?name=Statistics\">$result[0]</a></b><br><small>"._PAGESVIEWS." $startdate</small></center>";
  24.  
  25. ?>