示例#1
0
文件: sum.php 项目: kopalam/royaltea
function sum($table)
{
    $sql = "SELECT * FROM '{$table}' WHERE `finish` = 0";
    $res = new royaltea();
    $totalRows = $res->totalRow($sql);
    //    $array = $res->fetch_array($sql);
    $totalRows = $totalRows - 1;
    echo $totalRows;
}
示例#2
0
<?php

//single.php是出单制作的人员跳转页面
require_once 'include.php';
// require_once 'login_check.php';
if (isset($_GET['id'])) {
    $sid = $_GET['id'];
}
$sql = "SELECT * FROM `ticket` WHERE `finish` = '0'  ORDER BY `tid` ASC LIMIT 1";
$res = new royaltea();
$array = $res->fetch_array($sql);
$num = $array['num'] ? $array['num'] : 0;
$total_sum = "SELECT * FROM `ticket` WHERE `finish`=0";
$sum = $res->totalRow($total_sum);
?>
            <!doctype html>
            <html lang="zh">
            <head>
                <meta charset="UTF-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <title>制作单</title>
                <link rel='stylesheet prefetch' href='css/reset.css'>
                <link rel="stylesheet" type="text/css" href="css/default.css">

                <!--必要样式-->
                <link rel="stylesheet" type="text/css" href="css/styles2.css">
                <!--[if IE]>
                <script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
                <![endif]-->
            </head>
示例#3
0
文件: list.php 项目: kopalam/royaltea
<?php

require_once '../include.php';
if (empty($_SESSION['username'])) {
    echo '<script language="javascript">
                        alert("你还没有登陆!!");
                        location.href="../login.php";
                        </script> ';
}
$sql = "SELECT * FROM `store`";
$royaltea = new royaltea('store');
$numrow = $royaltea->totalRow($sql);
//查询总行数
//    $fetch = $royaltea->fetch_array($sql)
?>
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="utf-8">
            <title>Flatpoint - Responsive Web App Template</title>

            <meta name="description" content="">
            <meta name="author" content="">

            <!-- Le styles -->
            <link href="css/bootstrap.css" rel="stylesheet">
            <link href="css/bootstrap-responsive.css" rel="stylesheet">
            <link href="css/stylesheet.css" rel="stylesheet">
            <link href="css/index.css" rel="stylesheet">
            <link href="icon/font-awesome.css" rel="stylesheet">