//update mega-event points //include('common-code.php'); //sendScore("auction-it",$up_u_megapoints,$user_id); //use to debug auto update script /* if(!$up_res_usr){ echo "error 1"; } if(!$up_res_itm){ echo "error 2"; } */ //reset item.json emptyJsonItem(); //reset livebid.json emptyJsonLiveBid(); } //if item is absent load the next item to item.json if (readJsonItem('i_id') == null) { //load next item info when the result is absent $query = "SELECT * FROM `items` WHERE `i_starttime` >= '{$curtime}' ORDER BY `i_starttime` LIMIT 1"; $res = mysqli_query($link, $query); if (mysqli_num_rows($res) > 0) { emptyJsonItem(); exportToJsonItem(); } } //Query for Next Item $next_sql = "SELECT i_name, i_imgpath, i_starttime FROM items WHERE (i_starttime > '{$curtime}') ORDER BY i_starttime LIMIT 1"; $next_result = mysqli_query($link, $next_sql); if (!$next_result) {
function resetlivebidjson() { emptyJsonLiveBid(); }