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

Source for file checklatest.php

Documentation is available at checklatest.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. $new_ini file_get_contents('http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI');
  12.  
  13. if ($_GET['update'== 'browscap'{
  14.     $handle fopen(dirname(__FILE__'/include/browscap.ini'"w");
  15.     fwrite($handle$new_ini);
  16. }
  17.  
  18. try {
  19.     $login new login(true);
  20.     $smarty->assign('login'$login);
  21. catch (LoginException $e{
  22.     header'Location: login.php' ;
  23.  
  24. $pattern '/[\d]+(\.[\d]+)*(-[\w]*[\d])?/';
  25. preg_match($patternfile_get_contents('http://svn.chatetheory.com/phpusertrack/trunk/include/version.php')$version);
  26.  
  27. $ini_array parse_ini_file("include/browscap.ini"true);
  28. $new_ini_pattern "/[Rr]eleased=.*/";
  29. preg_match($new_ini_pattern$new_ini$new_ini_string);
  30. $new_ini_array explode('='$new_ini_string[0]);
  31.  
  32. $smarty->assign('newestVersion'$version[0]);
  33. $smarty->assign('thisVersion'PHPUSERTRACK_VERSION);
  34.  
  35. $smarty->assign('thisBrowscapVersion'$ini_array['GJK_Browscap_Version']['Released']);
  36. $smarty->assign('newBrowscapVersion'$new_ini_array[1]);
  37.  
  38. $smarty->display('header.tpl');
  39. $smarty->display('checklatest.tpl');
  40. $smarty->display('footer.tpl');
  41.  
  42. ?>

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