Пример #1
0
function CheckVersion()
{
    $objResponse = new xajaxResponse();
    $relver = @file_get_contents("http://www.sourcebans.net/public/versionchecker/?type=rel");
    if (defined('SB_SVN')) {
        $relsvn = @file_get_contents("http://www.sourcebans.net/public/versionchecker/?type=svn");
    }
    if (version_compare($relver, SB_VERSION) > 0) {
        $versmsg = "<span style='color:#aa0000;'><strong>A new release is available.</strong></span>";
    } else {
        $versmsg = "<span style='color:#00aa00;'><strong>You have the latest release.</strong></span>";
    }
    $msg = $versmsg;
    if (strlen($relver) > 8 || $relver == "") {
        $relver = "<span style='color:#aa0000;'>Error</span>";
        $msg = "<span style='color:#aa0000;'><strong>Error retrieving latest release.</strong></span>";
    }
    $objResponse->addAssign("relver", "innerHTML", $relver);
    if (defined('SB_SVN')) {
        if (intval($relsvn) > GetSVNRev()) {
            $svnmsg = "<span style='color:#aa0000;'><strong>A new SVN revision is available.</strong></span>";
        } else {
            $svnmsg = "<span style='color:#00aa00;'><strong>You have the latest SVN revision.</strong></span>";
        }
        if (strlen($relsvn) > 8 || $relsvn == "") {
            $relsvn = "<span style='color:#aa0000;'>Error</span>";
            $svnmsg = "<span style='color:#aa0000;'><strong>Error retrieving latest svn revision.</strong></span>";
        }
        $msg .= "<br />" . $svnmsg;
        $objResponse->addAssign("svnrev", "innerHTML", $relsvn);
    }
    $objResponse->addAssign("versionmsg", "innerHTML", $msg);
    return $objResponse;
}
function CheckVersion()
{
    $objResponse = new xajaxResponse();
    $relver = @file_get_contents("http://www.sourcebans.net/public/versionchecker/?type=rel");
    if (defined('SB_SVN')) {
        $relsvn = @file_get_contents("http://www.sourcebans.net/public/versionchecker/?type=svn");
    }
    if (version_compare($relver, SB_VERSION) > 0) {
        $versmsg = "<span style='color:#aa0000;'><strong>Доступна новая версия.</strong></span>";
    } else {
        $versmsg = "<span style='color:#00aa00;'><strong>Вы используете последнюю версию.</strong></span>";
    }
    $msg = $versmsg;
    if (strlen($relver) > 8 || $relver == "") {
        $relver = "<span style='color:#aa0000;'>Ошибка</span>";
        $msg = "<span style='color:#aa0000;'><strong>Ошибка получения обновлений.</strong></span>";
    }
    $objResponse->addAssign("relver", "innerHTML", $relver);
    if (defined('SB_SVN')) {
        if (intval($relsvn) > GetSVNRev()) {
            $svnmsg = "<span style='color:#aa0000;'><strong>Доступна новая SVN версия.</strong></span>";
        } else {
            $svnmsg = "<span style='color:#00aa00;'><strong>Вы используете последнюю SVN версию.</strong></span>";
        }
        if (strlen($relsvn) > 8 || $relsvn == "") {
            $relsvn = "<span style='color:#aa0000;'>Ошибка</span>";
            $svnmsg = "<span style='color:#aa0000;'><strong>Ошибка получения SVN версии.</strong></span>";
        }
        $msg .= "<br />" . $svnmsg;
        $objResponse->addAssign("svnrev", "innerHTML", $relsvn);
    }
    $objResponse->addAssign("versionmsg", "innerHTML", $msg);
    return $objResponse;
}
Пример #3
0
 * 
 * @author SteamFriends Development Team
 * @version 1.0.0
 * @copyright SourceBans (C)2007 SteamFriends.com.  All rights reserved.
 * @package SourceBans
 * @link http://www.sourcebans.net
 * 
 * @version $Id: footer.php 219 2009-02-24 21:09:11Z peace-maker $
 * =============================================================================
 */
if (!defined("IN_SB")) {
    echo "You should not be here. Only follow links!";
    die;
}
global $theme;
$theme->assign('SB_REV', defined('SB_SVN') ? " Rev: " . GetSVNRev() : '');
$theme->assign('SB_VERSION', SB_VERSION);
$theme->assign('SB_QUOTE', CreateQuote());
$theme->display('page_footer.tpl');
if (isset($_GET['p'])) {
    $_SESSION['p'] = $_GET['p'];
}
if (isset($_GET['c'])) {
    $_SESSION['c'] = $_GET['c'];
}
if (isset($_GET['p']) && $_GET['p'] != "login") {
    $_SESSION['q'] = $_SERVER['QUERY_STRING'];
}
if (defined('DEVELOPER_MODE')) {
    global $start;
    $time = microtime();