here is a nice little update for UberCMS - AutoUpdate WebBuild
open class.core.php
look for
add under itPHP Code:public static function GetMaintenanceStatus()
{
return mysql_result(dbquery("SELECT maintenance FROM site_config LIMIT 1"), 0);
}
open global.phpPHP Code:public static function GetWebBuild()
{
return mysql_result(dbquery("SELECT webbuild FROM site_config LIMIT 1"), 0);
}
search for
add under itPHP Code:define('FORCE_MAINTENANCE', ((uberCore::GetMaintenanceStatus() == "1") ? true : false));
open class.tpl.phpPHP Code:define('WEBBUILD', uberCore::GetWebBuild());
change
toPHP Code:$this->SetParam('web_build', '50_e3801d20ad745cc86660598ea0c4bdf4/15'); (your build will be different)
create a php file named WebBuild.php and put this in it.PHP Code:$this->SetParam('web_build', WEBBUILD);
save that file in inc/cron_scriptsPHP Code:<?php
if (!defined('UBER') || !UBER)
{
exit;
}
function get_between($input, $start, $end)
{
$substr = substr($input, strlen($start)+strpos($input, $start), (strlen($input) - strpos($input, $end))*(-1));
return $substr;
}
$content = file_get_contents('http://habbo.com/');
$webbuild = get_between($content, "http://images.habbo.com/habboweb/", "/web-gallery");
dbquery("UPDATE site_config SET webbuild = '$webbuild' ");
?>
Run this SQL
and this onePHP Code:INSERT INTO `site_cron` VALUES (6, 6, '1', 'webbuild.php', '', 1200);
Done....PHP Code:ALTER TABLE site_config ADD webbuild CHAR(40);


![[UberCMS]AutoUpdate WebBuild - Updated with SQL](http://ragezone.com/hyper728.png)


