Файл: cronprocessorders.php
Строк: 26
<?
$full_home_path = dirname(__FILE__);
require_once($full_home_path.'/_rootload.php');
mconnect();
EnableLanguages(1);
if (!GetCurrentCurrency()) { print $_lang[ErrorGetCurrentCurrency]; mclose(); exit; }
@set_time_limit(0);
$flag = 1;
while ($flag == 1) {
$ordersQueue = @mysql_query("select * from orders_queue where flagStart <> 1 and flagEnd <> 1 order by id LIMIT 0,1") or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error());
if (@mysql_num_rows($ordersQueue) == 0) {
$flag = 0;
} else {
$ordersQueue = @mysql_fetch_object($ordersQueue);
@mysql_query("update orders_queue set flagStart=1 where id='$ordersQueue->id'") or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error());
list($msec, $sec) = explode(chr(32), microtime());
$timeStart = $sec+$msec;
ProcessOrderByBillId($ordersQueue->bill_id,$ordersQueue->needTestHost);
list($msec, $sec) = explode(chr(32), microtime());
$timeEnd = ($sec+$msec)-$timeStart;
$timeEnd = round($timeEnd,6);
@mysql_query("update orders_queue set flagEnd=1,processTime='$timeEnd' where id='$ordersQueue->id'") or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error());
}
}
mclose();
?>