phpUserTrack
[ class tree: phpUserTrack ] [ index: phpUserTrack ] [ all elements ]

Source for file userreport.php

Documentation is available at userreport.php

  1. <?php
  2. require_once './include/version.php';
  3. require_once './lib/core.php';
  4.  
  5. require('smarty/libs/Smarty.class.php');
  6. $smarty new Smarty();
  7.  
  8. $smarty->plugins_dir['include';
  9. require_once $smarty->_get_plugin_filepath('function''html_doctype');
  10.  
  11. try {
  12.     $login new login(true);
  13.     $smarty->assign('login'$login);
  14. catch (LoginException $e{
  15.     header'Location: login.php' ;
  16.  
  17. $db new phpusertrack_db();
  18.  
  19. $sql 'select * from phpusertrack_ip where ip=\'' $_GET['ip''\' order by timestamp desc limit 1';
  20. $visits $db->_query($sql);
  21.  
  22. //$smarty->assign('pageTitle', 'phpUserTrack - ' . $_GET['ip'] );
  23.  
  24. $smarty->assign('mysqlQueryTime'(getmicrotime($time));
  25.  
  26. $smarty->assign('visits'$visits);
  27. $smarty->assign('ip'$_GET['ip']);
  28. $smarty->assign('hostname'gethostbyaddr($_GET['ip']));
  29.  
  30. if ($geoIP{
  31.     $geoip Net_GeoIP::getInstance('./include/GeoLiteCity.dat',
  32.     Net_GeoIP::STANDARD);
  33.     $ip $_GET['ip'];
  34.     $location $geoip->lookupLocation($ip);
  35.     $smarty->assign('location'$location);
  36. }
  37.  
  38. $smarty->assign('notifMsg'$notify);
  39.  
  40. $smarty->display('header.tpl');
  41. $smarty->display('userreport.tpl');
  42.  
  43. $smarty->assign('pageRenderTime'(getmicrotime($time));
  44.  
  45. $smarty->display('footer.tpl');
  46. ?>

Documentation generated on Tue, 06 Nov 2007 09:22:15 -0800 by phpDocumentor 1.4.0a2