2 // there will be one version for base code, then
4 $timerval_t = db_selectData("options", "option_name", "update.check.interval");
6 //echo "timer check:\n";
7 //print_r($timerval_t);
8 //echo "timer endcheck\n";
11 if(!isset($timerval_t[0])) {
12 //echo "likely we have no timer check value, setting to default of 3 days\n";
14 db_insertData("options", "update.check.interval", "$ci");
17 $timerval = $timerval_t[0]["option_value"];
20 $lastupdate_t = db_selectData("options", "option_name", "update.check.last");
23 if(!isset($lastupdate_t[0])) {
24 db_insertData("options", "update.check.last", "0");
27 // no last update, perform one now
28 $lastupdate = $lastupdate_t[0]["option_value"];
32 $tdiff = $ctime - $lastupdate;
34 if($tdiff > $timerval) {
38 //echo "timerval: $timerval\n";
40 function up_doUpdateCheck()
42 echo "do update check and reset interval\n";
44 // db_updateData($tablename, $column, $newdata, $wherecol, $wheredata, $exact=true)
47 db_updateData("options", "option_value", "$ctime", "option_name", "update.check.last");
49 // next go thru the $VERSION set info, and download the lastest version list from the