Source for file checklatest.php
Documentation is available at checklatest.php
require_once './include/version.php';
require_once './lib/core.php';
require ('smarty/libs/Smarty.class.php');
$smarty->plugins_dir[] = 'include';
require_once $smarty->_get_plugin_filepath('function', 'html_doctype');
$new_ini = file_get_contents('http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI');
if ($_GET['update'] == 'browscap') {
$handle = fopen(dirname(__FILE__ ) . '/include/browscap.ini', "w");
$login = new login(true);
$smarty->assign('login', $login);
header( 'Location: login.php' ) ;
$pattern = '/[\d]+(\.[\d]+)*(-[\w]*[\d])?/';
$new_ini_pattern = "/[Rr]eleased=.*/";
preg_match($new_ini_pattern, $new_ini, $new_ini_string);
$new_ini_array = explode('=', $new_ini_string[0]);
$smarty->assign('newestVersion', $version[0]);
$smarty->assign('thisBrowscapVersion', $ini_array['GJK_Browscap_Version']['Released']);
$smarty->assign('newBrowscapVersion', $new_ini_array[1]);
$smarty->display('header.tpl');
$smarty->display('checklatest.tpl');
$smarty->display('footer.tpl');
|