当前位置: 首页>>代码示例>>PHP>>正文


PHP Time::getTimeLevel方法代码示例

本文整理汇总了PHP中Time::getTimeLevel方法的典型用法代码示例。如果您正苦于以下问题:PHP Time::getTimeLevel方法的具体用法?PHP Time::getTimeLevel怎么用?PHP Time::getTimeLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Time的用法示例。


在下文中一共展示了Time::getTimeLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: alert

  //如果执行是状态正常,那么就把返回的内容赋值给上面指定的层
  if (ajax.readyState == 4 && ajax.status == 200) { 
   show.innerHTML = ajax.responseText; 
  } 
 }
 //发送空
 ajax.send(null); 
}
    </script>

</head>
    
<body>
       
    <?php 
$time = Time::getTimeLevel();
if ($time == 2 and !isset($_GET['a'])) {
    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) {
开发者ID:SebastianElvis,项目名称:mtcds,代码行数:31,代码来源:order1.php

示例2: array

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
        <style>
            body{
                font-size:40px;
            }
        </style>
    </head>
    <body>
<?php 
require_once './function/DbConnect.php';
require_once './function/Time.php';
$timelevel = Time::getTimeLevel();
if (!isset($_GET['type'])) {
    echo "</br></br><ul>\n            <li><a href=\"deliver.php?type=1\">&nbsp;&nbsp;&nbsp;&nbsp;运送员界面</a></li>\n            </br></br>\n            <li><a href=\"deliver.php?type=2\">&nbsp;&nbsp;&nbsp;&nbsp;配送员界面</a></li>\n        </ul>\n    </body>\n</html>";
}
if ($_GET['type'] == 1) {
    $result;
    $foodlist = array();
    $food = array();
    $con = DbConnect::connection();
    mysql_select_db("app_mtcds", $con);
    $result = mysql_query("SELECT \ntelephone,apartment,number,user.name as name1,time1,formorder.id as id1,restaurant.name as restname ,foodid, food.name, price, cost, food.restid, amount\nFROM food, formorder,restaurant,user\nWHERE food.id = 1115\nand foodid=food.id\nAND restaurant.restid = food.restid\nAND user.username=formorder.username\nORDER BY food.restid,user.name");
    if ($timelevel == 1 or $timelevel == 2 or $timelevel == 6) {
        $result = mysql_query("SELECT \ntelephone,apartment,number,user.name as name1,time1,formorder.id as id1,restaurant.name as restname ,foodid, food.name, price, cost, food.restid, amount\nFROM food, formorder,restaurant,user\nWHERE food.id = foodid\nAND (\n(   ordertime = ( SELECT DATE_SUB( CURDATE( ) , INTERVAL 1 DAY ) )    AND     (timelevel =  '5' or timelevel='7')       )\nor(\nordertime=curdate() and (timelevel='1' or timelevel='2')\n)\n)\nAND restaurant.restid = food.restid\nAND user.username=formorder.username\nORDER BY food.restid,user.name");
    }
    if ($timelevel == 3 or $timelevel == 4 or $timelevel == 7) {
        $result = mysql_query("SELECT \ntelephone,apartment,number,user.name as name1,time1,formorder.id as id1,restaurant.name as restname ,foodid, food.name, price, cost, food.restid, amount\nFROM food, formorder, restaurant,user\nWHERE food.id = foodid\nAND (\nordertime=curdate() and (timelevel = '3' or timelevel='4' or timelevel='6')\n)\nAND restaurant.restid = food.restid\nAND user.username=formorder.username\nORDER BY food.restid,user.name");
    }
    if ($timelevel == 5) {
开发者ID:SebastianElvis,项目名称:mtcds,代码行数:31,代码来源:deliver.php


注:本文中的Time::getTimeLevel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。