本文整理匯總了PHP中DbConnect::queryRest方法的典型用法代碼示例。如果您正苦於以下問題:PHP DbConnect::queryRest方法的具體用法?PHP DbConnect::queryRest怎麽用?PHP DbConnect::queryRest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DbConnect
的用法示例。
在下文中一共展示了DbConnect::queryRest方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: alert
echo "<p> <script language=\"javascript\"> alert(\"對不起,現在不在訂餐時間,請在11:50-16:30或17:30到第二天10:50間訂餐\"); </script> </p>";
exit;
}
if ($time == 4 and !isset($_GET['a'])) {
echo "<p> <script language=\"javascript\"> alert(\"對不起,現在不在訂餐時間,請在11:50-16:30或17:30到第二天10:50間訂餐\"); </script> </p>";
exit;
}
$type = 0;
if (!isset($_GET['type'])) {
$type = 1;
} else {
$type = $_GET['type'];
}
if ($type == 1) {
echo "<div id='main'>";
$result = DbConnect::queryRest();
while ($row = mysql_fetch_array($result)) {
if (isset($_GET['rest']) && $_GET['rest'] == $row['restid']) {
echo "<div class=\"presssubmenu\" onclick=\" location.href='/order.php?rest=" . $row['restid'] . "';\">";
echo $row['name'] . "</div>";
} else {
echo "<div class=\"submenu\" onclick=\" location.href='/order.php?rest=" . $row['restid'] . "';\">";
echo $row['name'] . "</div>";
}
}
echo "<div id='main'>";
}
if ($type == 2) {
echo "<div id='main'>";
$result = DbConnect::queryType();
while ($row = mysql_fetch_array($result)) {
示例2: alert
echo "<p> <script language=\"javascript\"> alert(\"對不起~我們的訂餐時間已經截止,勤勞的運送員已經在采購~12點左右,美食就能出現在宿舍門口啦。沒有訂餐的同學不要著急下午的訂餐時間將在11點50後開放\"); </script> </p>";
exit;
}
if (($time == 4 and !isset($_GET['a'])) && !DbConnect::queryAdmin($username)) {
echo "<p> <script language=\"javascript\"> alert(\"對不起~我們的訂餐時間已經截止,勤勞的運送員已經在采購~5點半左右,美食就能出現在宿舍門口啦。沒有訂餐的同學不要著急下一次訂餐時間將在17:30後開放\"); </script> </p>";
exit;
}
$type = 0;
if (!isset($_GET['type'])) {
$type = 1;
} else {
$type = $_GET['type'];
}
if ($type == 1) {
echo "<div id='main'>";
$result = DbConnect::queryRest($status);
while ($row = mysql_fetch_array($result)) {
if (isset($_GET['rest']) && $_GET['rest'] == $row['restid']) {
echo "<div class=\"presssubmenu\" onclick=\" location.href='/order.php?rest=" . $row['restid'] . "';\">";
echo $row['name'] . "</div>";
} else {
echo "<div class=\"submenu\" onclick=\" location.href='/order.php?rest=" . $row['restid'] . "';\">";
echo $row['name'] . "</div>";
}
}
echo "<div id='main'>";
}
if ($type == 2) {
echo "<div id='main'>";
$result = DbConnect::queryType();
while ($row = mysql_fetch_array($result)) {