";
echo "";
echo "| ";
echo "$strThisPage";
echo " | ";
echo "";
showHelp($helpId);
echo " | ";
echo "
";
echo "";
echo "";
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
?>
|
|
|
|
|
|
|
|
|
";
$hours=$rows[hours];
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2)
{
$next_hours='0'.($hours+1);
}
else
{
$next_hours=$hours+1;
}
$mon=change2point($rows[mon]/100);
$tue=change2point($rows[tue]/100);
$wed=change2point($rows[wed]/100);
$thu=change2point($rows[thu]/100);
$fri=change2point($rows[fri]/100);
$sat=change2point($rows[sat]/100);
$sun=change2point($rows[sun]/100);
$holiday=change2point($rows[holiday]/100);
echo "$hours:00:00 - $next_hours:00:00 | ";
echo "$mon | ";
echo "$tue | ";
echo "$wed | ";
echo "$thu | ";
echo "$fri | ";
echo "$sat | ";
echo "$sun | ";
echo "$holiday | ";
echo "";
$record_length++;
}
while($rows = @mysqli_fetch_array($result));
//初始化折扣表,管理员没有设置折扣时,系统自动将各时段的折扣设为100%
for($i=$record_length;$i<24;$i++){
$hours=$i;
$defaultDiscount=100;
$setSql="INSERT INTO $tableName
(hours,mon,tue,wed,thu,fri,sat,sun,holiday)
VALUES ('$i','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount')";
if($DEBUG) echo "
setSql=$setSql";
$result= @mysqli_query($pubConn,$setSql);
//echo mysqli_error($pubConn);
//echo "
sql=$sql";
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2)
{
$next_hours='0'.($hours+1);
}
else
{
$next_hours=$hours+1;
}
$mon=change2point($rows[mon]/100);
$tue=change2point($rows[tue]/100);
$wed=change2point($rows[wed]/100);
$thu=change2point($rows[thu]/100);
$fri=change2point($rows[fri]/100);
$sat=change2point($rows[sat]/100);
$sun=change2point($rows[sun]/100);
$holiday=change2point($rows[holiday]/100);
echo "";
echo "| $hours:00:00 - $next_hours:00:00 | ";
echo "$mon | ";
echo "$tue | ";
echo "$wed | ";
echo "$thu | ";
echo "$fri | ";
echo "$sat | ";
echo "$sun | ";
echo "$holiday | ";
echo "
";
}
//
?>