コード例 #1
0
ファイル: db_weixin_funs.php プロジェクト: noikiy/Bentley
function db_response_news($postObj, $newsid)
{
    /*
     * note:
     * 1 text
     * dfault and 2 :news
     *
     * */
    $params = array(array($newsid, SQLSRV_PARAM_IN));
    $sp = "{call app_get_news(?)}";
    $rs = sp_execute($sp, $params);
    if (count($rs) == 1) {
        $msgtype = $rs[0]["kind"];
        //is_numeric($rs[0]["type"])?intval($rs[0]["type"]):0;
        //
        if ($msgtype == 1) {
            //text mode
            response_text($postObj, $rs[0]["describle"]);
        } else {
            //2
            $newsContent = array("title" => $rs[0]["title"], "description" => $rs[0]["describle"], "picUrl" => $rs[0]["picurl"], "url" => $rs[0]["url"]);
            response_news($postObj, $newsContent);
        }
    } elseif (count($rs) > 1) {
        //多行新闻的方式
        $arr = array();
        foreach ($rs as $row) {
            $newsContent = array("title" => $row["title"], "description" => $row["describle"], "picUrl" => $row["picurl"], "url" => $row["url"]);
            array_push($arr, $newsContent);
        }
        response_multiNews($postObj, $arr);
    } else {
        response_text($postObj, "未定义的newsid[{$newsid}]");
    }
}
コード例 #2
0
ファイル: handle_text.php プロジェクト: noikiy/Bentley
function handleText($postObj)
{
    $arr = explode(" ", $postObj->Content);
    //preview news 1
    $action = $arr[0];
    $param1 = $arr[1];
    if (count($arr) > 2) {
        $param2 = $arr[2];
    } else {
        $param2 = "";
    }
    //$param2 = $arr[2];
    //strcasecmp忽略字符串大小写
    if (strcasecmp($action, "set") == 0) {
        if (strcasecmp($param1, "master") == 0) {
            $ret = "                  ";
            $params = array(array("" . $postObj->FromUserName, SQLSRV_PARAM_IN), array($ret, SQLSRV_PARAM_INOUT));
            $sp = "{call app_set_master(?,?)}";
            $rs = sp_execute($sp, $params);
            if ($ret == "ok") {
                response_text($postObj, "您已成为[" . $rs[0]["cname"] . "]微信管理员");
            } else {
                response_text($postObj, "操作不成功,管理位置是不是另有他人了呢?");
            }
        } else {
            response_text($postObj, "我不明白,你想设置啥呢?");
        }
    } else {
        if (strcasecmp($action, "preview") == 0) {
            if (strcasecmp($param1, "news") == 0) {
                if (is_numeric($param2)) {
                    db_response_news($postObj, $param2);
                } else {
                    response_text($postObj, "您要预览的新闻编号[{$param2}]有误,请输入新闻编号");
                }
            } else {
                if (is_numeric($param1)) {
                    db_response_news($postObj, $param1);
                } else {
                    response_text($postObj, "未定义的预览类型[{$param1}]");
                }
            }
        } else {
            if (strcasecmp($action, "hqewm") == 0 || strcasecmp($action, "获取二维码") == 0 || strcasecmp($action, "dst") == 0 || strcasecmp($action, "大食堂") == 0) {
                response_image($postObj, "Tz7KKK4QFPZbEIclqnbhsWYy8keSL-3McoYu9I749Vk");
            } else {
                if (strcasecmp($action, "help") == 0) {
                    response_text($postObj, '欢迎关注大食堂<br>预览新闻 发"preview  新闻编号\\r\\n获取大食堂二维码,发送"hqewm"');
                } else {
                    response_text($postObj, "未定义action[{$action}]");
                }
            }
        }
    }
}
コード例 #3
0
ファイル: handle_click.php プロジェクト: noikiy/Bentley
/**
 * @param $postObj
 */
function handleClick($postObj)
{
    //处理签到
    if ($postObj->EventKey == "3bd50cf09752dc08ab1d78ba0c6d4099") {
        $rep = "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ";
        $params = array(array("" . $postObj->FromUserName, SQLSRV_PARAM_IN), array($rep, SQLSRV_PARAM_OUT));
        sp_execute("{call app_weixin_checkin(?,?)}", $params);
        response_text($postObj, $rep);
    } else {
    }
}
コード例 #4
0
ファイル: handle_subscribe.php プロジェクト: noikiy/Bentley
function handleScan($postObj)
{
    $uid = 0;
    $params = array(array("" . $postObj->FromUserName, SQLSRV_PARAM_IN), array("" . $postObj->ToUserName, SQLSRV_PARAM_IN), array($uid, SQLSRV_PARAM_INOUT));
    $sp = "{call app_subscrible(?,?,?)}";
    sp_execute($sp, $params);
    //
    //用户扫描带场景值二维码
    $cid = str2num(canteenid_content, $postObj->EventKey);
    $sp = "{call app_user_add_canteen(?,?)}";
    $params = array(array($uid, SQLSRV_PARAM_IN), array($cid, SQLSRV_PARAM_IN));
    $rs = sp_execute($sp, $params);
    //
    response_canteen_welcome($postObj, $postObj->EventKey, $rs[0]["cname"], $rs[0]["picurl"], $rs[0]["newsid"]);
}
コード例 #5
0
ファイル: handle_click.php プロジェクト: noikiy/Bentley
function click_new($postObj)
{
    if ($postObj->EventKey == "c45fed65e9873ee368625b73ef7d5760") {
        $sp = "{call vp_get_video_list}";
        $rs = sp_execute($sp, null);
        $arr = array();
        foreach ($rs as $row) {
            $newsContent = array("title" => $row["title"], "description" => $row["content"], "picUrl" => CFG_HTTP . "/apps/mobile/upload/2011111.jpg", "url" => CFG_HTTP . "/apps/mobile/upload/" . $row["media_id"] . ".mp4");
            array_push($arr, $newsContent);
        }
        $resultStr = response_multiNews($postObj, $arr);
        echo $resultStr;
    } else {
    }
}
コード例 #6
0
ファイル: handle_image.php プロジェクト: noikiy/Bentley
function handleImage($postObj)
{
    //https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID
    $access_token = db_get_token_ticket(CFG_APPID, CFG_SECRET)["token"];
    $mediaId = $postObj->MediaId;
    $url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token={$access_token}&media_id={$mediaId}";
    $fileinfo = downloadWeixinFile($url);
    //
    $uploadPath = dirname(__FILE__) . "/upload/weixin/";
    $fileName = time() . ".jpg";
    saveWeixinFile($uploadPath . $fileName, $fileinfo["body"]);
    response_text($postObj, "图片上传完成");
    //保存图片信息
    $params = array(array("" . $postObj->FromUserName, SQLSRV_PARAM_IN), array("" . $fileName, SQLSRV_PARAM_IN));
    sp_execute("{call app_upload_image(?,?)}", $params);
}
コード例 #7
0
ファイル: handle_subscribe.php プロジェクト: noikiy/Bentley
/**
 * 处理扫描场景值关注
 * 1.若未关注公众号,则会触发subscrible事件,EventKey中带有场景值(如:qrscene_Qggg)
 * 2.若已关注公众号,则会触发scan事件,EventKey中带有场景值(如:Qggg)
 * 3.注意两者区别
 * @param $postObj
 */
function handleScan($postObj)
{
    $uid = 0;
    $params = array(array("" . $postObj->FromUserName, SQLSRV_PARAM_IN), array("" . $postObj->ToUserName, SQLSRV_PARAM_IN), array($uid, SQLSRV_PARAM_OUT));
    sp_execute("{call app_subscrible(?,?,?)}", $params);
    //用户扫描带场景值二维码
    $scenestr = explode("-", $postObj->EventKey);
    $uid_from = str2num(CFG_ID_USER, $scenestr[0]);
    $cid = str2num(CFG_ID_CAR, $scenestr[1]);
    log_file("scan, uid_from:{$uid_from}, cid:{$cid}, uid:{$uid}");
    //共享车辆
    $params = array(array($cid, SQLSRV_PARAM_IN), array($uid_from, SQLSRV_PARAM_IN), array($uid, SQLSRV_PARAM_IN));
    sp_execute("{call app_share_car(?,?,?)}", $params);
    //查询分享发起人信息
    $params = array(array($uid_from, SQLSRV_PARAM_IN), array("", SQLSRV_PARAM_IN));
    $rs = sp_execute("{call app_get_userinfo(?,?)}", $params);
    //准备图文消息
    $newsContent = array("title" => "好友" . $rs[0]["nickname"] . "的车辆信息", "description" => "点击查看详情", "picUrl" => CFG_HTTP . CFG_CAR_DEFAULT, "url" => CFG_HTTP . "mobile/car_list.php");
    response_news($postObj, $newsContent);
}
コード例 #8
0
ファイル: conn.php プロジェクト: noikiy/Bentley
/**
 * @param $d 天数,昨天-1,明天+1
 * @return mixed
 */
function get_db_date($d)
{
    $sql = "select convert(varchar(50),GETDATE(){$d},120) dt";
    $rs = sp_execute($sql, null);
    return $rs[0]["dt"];
}
コード例 #9
0
ファイル: mycanteen.php プロジェクト: noikiy/Bentley
/**
 * 将餐厅信息设置到session中
 * @param $row
 */
function set_canteen_session($row)
{
    $_SESSION["cid"] = $row["cid"];
    $_SESSION["cname"] = $row["cname"];
    $_SESSION["verticket"] = $row["verticket"];
    $_SESSION["verurl"] = $row["verurl"];
    $_SESSION["allow"] = $row["allow"];
    $_SESSION["cpicurl"] = $row["picurl"];
    $_SESSION["ctelnum"] = $row["telnum"];
    $_SESSION["roleid"] = $row["roleid"];
    //判断餐厅是否有二维码,没有则创建生成二维码
    if (strlen($row["verticket"]) < 1) {
        /* 根据餐厅编号生成带场景二维码 */
        $str = num2str(canteenid_content, $_SESSION["cid"]);
        $token = db_get_token_ticket(CFG_APPID, CFG_SECRET)["token"];
        $url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token={$token}";
        $data = '{"action_name": "QR_LIMIT_STR_SCENE", "action_info": {"scene": {"scene_id":234, "scene_str":"' . $str . '"}}}';
        $data = json_decode(get_http_result($url, $data), true);
        //插入数据库,更新餐厅二维码信息
        $params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array("" . $data["ticket"], SQLSRV_PARAM_IN), array("" . $data["url"], SQLSRV_PARAM_IN), array("", SQLSRV_PARAM_IN));
        sp_execute("{call web_set_canteen_verify(?,?,?,?)}", $params);
        $_SESSION["verticket"] = $data["ticket"];
    }
}
コード例 #10
0
ファイル: use_manual.php プロジェクト: noikiy/Bentley
                    float: right;
                    margin: 10px 10px 0 10px;
                }
                #help11{ margin:0; padding:0;}
                #help11 img{width:inherit}
                #help11 p{display: block; width:96%; padding-left:4%; line-height:20px;}
                #help11 p .dst{color:#ff3838}
            </style>
            <div id="help11" style="display:none;">
                <img src="<?php 
echo CFG_HTTP . "images/" . CFG_APP_QRCODE;
?>
"  width="100" height="100" class="left"/>
                <?php 
$params = array(array(intval($_SESSION["uid"]), SQLSRV_PARAM_IN));
$rs = sp_execute("{call app_user_get_can(?)}", $params);
$_SESSION["ccl"] = $rs[0]["ccl"];
?>
                <p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果你已经看到本页面,可点击"<a href="javascript:createCanteen()" style="color:#0099CC; border-bottom:1px solid #0099CC;">创建餐厅</a>",直接创建自己的餐厅。<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果想推荐身边人创建餐厅,可以通过扫描右侧的二维码关注"<?php 
echo CFG_APPNAME;
?>
",即可在本页面,创建自己的餐厅。<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果要推荐自己的微信好友创建餐厅,可以将右上方二维码以图片形式发送给好友,或者让好友关注并进入微信公众号"<label class="dst"><?php 
echo CFG_WECHATID;
?>
</label>"后,在本页面创建好友自己的餐厅。<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label style="font-style:italic;">说明:为保证餐厅质量,限制一个微信号只可以创建一个餐厅</label>。<br>
                </p>
            </div>
コード例 #11
0
ファイル: ajax_response.php プロジェクト: noikiy/Bentley
                                                 $filename = $path . $name;
                                                 //ready param
                                                 $cids = num2str(canteenid_content, $_SESSION["cid"]);
                                                 $codeText = CFG_HTTP . "mobile/sales_scan.php?cids={$cids}&winids={$winids}";
                                                 QRcode::png($codeText, $filename, L, 12, 2);
                                                 $winver = "qrcode/{$name}";
                                                 $windesc = $_POST["windesc"];
                                                 db_log("winid:{$winid}, winname:{$winname}, verurl:{$winver}, desc:{$windesc}, cid:" . $_SESSION["cid"]);
                                                 $params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array($winid, SQLSRV_PARAM_IN), array("" . $winname, SQLSRV_PARAM_IN), array("" . $winver, SQLSRV_PARAM_IN), array("" . $windesc, SQLSRV_PARAM_IN));
                                                 sp_execute("{call web_set_sales_win(?,?,?,?,?)}", $params);
                                                 $status = "ok";
                                                 $info = $name;
                                             } else {
                                                 if ($action == "set_canteen_allow_order") {
                                                     $params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array(intval($_REQUEST["orden"]), SQLSRV_PARAM_IN));
                                                     sp_execute("{call web_set_canteen_sale_state(?,?)}", $params);
                                                     $status = "ok";
                                                     $info = "成功";
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
コード例 #12
0
        if ($_REQUEST["act_xx"] == "setcookie") {
            $code = $_REQUEST["code"];
            //获得的用户授权code
            if ($user = get_snsapi_userinfo(CFG_APPID, CFG_SECRET, $code)) {
                //正确获得用户的授权信息
                $time = time() + 3600 * 24 * 7;
                weixin_set_auth_cookie($user, $time);
                echo '<script>location.href="http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '"</script>';
                exit;
            }
        } else {
            $redirect_uri = urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "&act_xx=setcookie");
            weixin_require_auth($redirect_uri);
            exit;
        }
    }
    $wid = $_COOKIE["wxp_user_openid"];
    $params = array(array(0, SQLSRV_PARAM_IN), array($wid, SQLSRV_PARAM_IN));
    //
    $rs = sp_execute("{call app_get_userinfo(?,?)}", $params);
    //set userinfo to session
    if (count($rs) > 0) {
        $_SESSION["uid"] = $rs[0]["uid"];
    }
}
?>




コード例 #13
0
        $picurl = $time . $ext;
        $cid = 0;
        //创建餐厅,并建立绑定关系,设置成管理员
        $longitude = $_REQUEST["longitude"];
        $latitude = $_REQUEST["latitude"];
        db_log("create canteen x:{$longitude}, y:{$latitude}, tel:{$canteenTel}");
        $params = array(array(intval($_SESSION["uid"]), SQLSRV_PARAM_IN), array("" . $canteenName, SQLSRV_PARAM_IN), array("" . $canteenTel, SQLSRV_PARAM_IN), array("" . $picurl, SQLSRV_PARAM_IN), array("" . $longitude, SQLSRV_PARAM_IN), array("" . $latitude, SQLSRV_PARAM_IN), array($cid, SQLSRV_PARAM_OUT));
        sp_execute("{call app_user_create_canteen(?,?,?,?,?,?,?)}", $params);
        $_SESSION["cid"] = $cid;
        $_SESSION["cname"] = $canteenName;
        $_SESSION["shop_picurl"] = $picurl;
        //根据经纬度获得餐厅地址信息
        if (strlen($longitude) > 0 && strlen($latitude)) {
            $addr = get_location_bdapi(CFG_BDAPI_AK, $longitude, $latitude);
            $params = array(array($cid, SQLSRV_PARAM_IN), array("" . $addr, SQLSRV_PARAM_IN));
            sp_execute("{call web_set_canteen_addr(?,?)}", $params);
        }
        $status = "ok";
    } else {
        $status = "error";
    }
    echo json_encode(array("status" => $status));
    exit;
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php 
echo $_REQUEST["action"] == "finish" ? $_SESSION["cname"] : "注册餐厅";
コード例 #14
0
ファイル: order.php プロジェクト: noikiy/Bentley
</header>
<div id="main-content">
    <div><div class="panel">
            <div class="panel-title">
                <?php 
echo "【" . $_SESSION["cname"] . "】";
?>
                订单管理</div>
            <div class="panel-body">
                <div class="col-sm-8">
                    <form name="form1" action="order.php" method="post" class="form-inline" style="margin-bottom:14px;">
                        <div class="form-group" style="margin-left:20px;">
                            <label style="font-size: 14px; font-weight: normal;">菜单名称&nbsp;&nbsp;</label>
                            <?php 
$params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array(0, SQLSRV_PARAM_IN));
$rs = sp_execute("{call web_get_menu_list(?,?)}", $params);
?>
                            <select name="mid" class="form-control">
                                <option value="0">  全部  </option>
                                <?php 
foreach ($rs as $row) {
    echo '<option value="' . $row["mid"] . '" ' . ($row["mid"] == $_REQUEST["mid"] ? "selected" : "") . '>' . $row["mname"] . '</option>';
}
?>
                            </select>
                        </div>
                        <div class="form-group" style="margin-left:20px;">
                            <label style="font-size: 14px; font-weight: normal;">日期&nbsp;&nbsp;</label>
                            <?php 
$qdt = date("Y-m-d");
if (isset($_REQUEST["qdt"])) {
コード例 #15
0
ファイル: order_today_export.php プロジェクト: noikiy/Bentley
 */
require_once "../config.php";
require_once "../conn.php";
require_once "admin_filter.php";
require_once "../include/php_funs.php";
//检查权限
if (!filter_canteenadmin()) {
    exit;
}
//
require_once "../libs/PHPExcel/PHPExcel.php";
//ready data
$mode = $_REQUEST["mode"];
$mode_str = getmidstr(CFG_ORDER_MODE, intval($mode) - 1);
$params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array("", SQLSRV_PARAM_IN), array(intval($mode), SQLSRV_PARAM_IN));
$rs = sp_execute("{call web_get_canteen_order_list(?,?,?)}", $params);
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
// Set properties
$objPHPExcel->getProperties()->setCreator("ctos")->setLastModifiedBy("ctos")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file");
// set width
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(20);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(15);
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('I')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('J')->setWidth(10);
コード例 #16
0
ファイル: user_order_submit.php プロジェクト: noikiy/Bentley
 * Fun: 移动端页面管理员订单明细维护
 */
require_once "../config.php";
require_once "../conn.php";
require_once "../canteen_funs.php";
require_once "mobile_filter.php";
if (!check_is_user()) {
    exit;
}
//for debug
if ($_SESSION["resubmit_oid"] == 0) {
    echo "<script>location.href='user_mymenu" . $_SESSION["menumode"] . ".php'</script>";
    exit;
}
$params = array(array(intval($_SESSION["uid"]), SQLSRV_PARAM_IN), array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN));
$btnArr = sp_execute("{call app_get_canteen_do(?,?)}", $params);
?>
<!DOCTYPE html>
<html>
<head>
    <?php 
include_once "meta.php";
?>
    <!--sweet-alert plugin start-->
    <link rel="stylesheet" type="text/css" href="plugins/sweetalert/sweetalert.css?v=1"/>
    <script src="plugins/sweetalert/sweetalert.min.js?v=2"></script>
    <!--sweet-alert plugin end-->
</head>
<body>
<div class="body1">
    <!--topsearch-->
コード例 #17
0
ファイル: user_info.php プロジェクト: noikiy/Bentley
        sp_execute("{call app_set_userinfo_ext1(?,?,?,?,?)}", $params);
        //发送消息
        $cids = num2str(canteenid_content, $_SESSION["cid"]);
        alertmsg_for_userjoin($uid, $username, $telnum, $address, $noteinfo, $cids);
        //清空整个session
        session_unset();
        echo "<script>location.href='mycanteen.php'</script>";
    } else {
        //处理修改用户信息
        $uid = intval($_SESSION["uid"]);
        $username = $_REQUEST["username"];
        $telnum = $_REQUEST["telnum"];
        $address = $_REQUEST["address"];
        $noteinfo = $_REQUEST["noteinfo"];
        $params = array(array($uid, SQLSRV_PARAM_IN), array("" . $username, SQLSRV_PARAM_IN), array("" . $telnum, SQLSRV_PARAM_IN), array("" . $address, SQLSRV_PARAM_IN), array("" . $noteinfo, SQLSRV_PARAM_IN));
        sp_execute("{call app_set_userinfo_ext1(?,?,?,?,?)}", $params);
        echo "<script>location.href='user_mymenu" . $_SESSION["menumode"] . ".php'</script>";
    }
    exit;
}
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php 
echo strlen($_SESSION["cname"]) > 0 ? $_SESSION["cname"] : "我的餐厅";
?>
</title>
    <meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport" />
コード例 #18
0
ファイル: tp_voice.php プロジェクト: noikiy/Bentley
    <title>语音列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="format-detection" content="telephone=no;address=no;email=no" />
    <link rel="stylesheet" href="css/crbt_ring-9d77f5063e.css" />
</head>
<body>
<!-- start bd -->
<div class="js-bd-box">
    <!-- start panel-songslist -->
    <ul class="panel-songslist panel-ringslist" id="panelSongsList">
        <?php 
$tid = 1;
$params = array(array($tid, SQLSRV_PARAM_IN));
$rs = sp_execute("{call app_get_tbv_list(?)}", $params);
foreach ($rs as $row) {
    ?>
        <li class="panel-songslist-item" onclick="playRingsModule.playRing(this,event);">
            <div class="ring-btn-play js-ring-btn-play" data-songurl="<?php 
    echo CFG_HTTP . "upload/voice/" . $row["vurl"];
    ?>
" data-filename="<?php 
    echo $row["title"];
    ?>
" data-timelength="<?php 
    echo $row["tl"];
    ?>
">
                <i></i>
            </div>
コード例 #19
0
ファイル: admin_order_list.php プロジェクト: noikiy/Bentley
        $_SESSION["roleid"] = $rs[0]["roleid"];
        db_log("cname=" . $_SESSION["cname"]);
        //
        $params = array(array($_SESSION["cid"], SQLSRV_PARAM_IN), array(0, SQLSRV_PARAM_IN), array($_SESSION["oid"], SQLSRV_PARAM_IN), array(1, SQLSRV_PARAM_IN));
        $rs = sp_execute("{call app_get_ord_list(?,?,?,?)}", $params);
    } else {
        if ($_SESSION["act"] == 'preuids') {
            $params = array(array($_SESSION["cid"], SQLSRV_PARAM_IN), array($_SESSION["uid"], SQLSRV_PARAM_IN));
            $rs = sp_execute("{call app_get_user_role(?,?)}", $params);
            $_SESSION["cname"] = $rs[0]["cname"];
            $_SESSION["roleid"] = $rs[0]["roleid"];
            db_log("cname=" . $_SESSION["cname"]);
            //
            db_log("qucan:preuids cid=" . $_SESSION["cid"] . ", uidx=" . $_SESSION["uidx"]);
            $params = array(array($_SESSION["cid"], SQLSRV_PARAM_IN), array($_SESSION["uidx"], SQLSRV_PARAM_IN), array(0, SQLSRV_PARAM_IN), array(2, SQLSRV_PARAM_IN));
            $rs = sp_execute("{call app_get_ord_list(?,?,?,?)}", $params);
        }
    }
}
//
?>
<!DOCTYPE html>
<html>
<head>
    <?php 
include_once "meta.php";
?>
    <!--sweet-alert plugin start-->
    <link rel="stylesheet" type="text/css" href="plugins/sweetalert/sweetalert.css?v=1" />
    <script src="plugins/sweetalert/sweetalert.min.js?v=2"></script>
    <!--sweet-alert plugin end-->
コード例 #20
0
ファイル: overview_canteen.php プロジェクト: noikiy/Bentley
?>
</h3>
        <div style="width:250px; height:228px; position:relative;">
            <img src="<?php 
echo CFG_HTTP . "upload/shop/" . $row1["picurl"];
?>
" id="canteen_img" width="250" height="200" style="position:absolute; top:10px; left:0">
        </div>
        <div style="width:250px; height:50px; position:relative;">
            <button id="Change_Info" class="btn btn-default" style="margin-left:15px; width:100px;">修改资料</button><button id="Change_Qrcode_Info" class="btn btn-default" style="margin-left:20px; width:100px;">二维码</button>

        </div>
    </div>
    <div class="col-sm-7" style="border:0px solid red; line-height:24px; font-size:16px;">
        <?php 
$rs = sp_execute("{call web_get_canteen_today(?)}", array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN));
$row = $rs[0];
?>
        <div class="col-sm-12" style="width:100%;">
            <div style="font-size:16px; font-weight:bold; float:left;">餐厅概览</div>
            <div style="float:right; margin-right:100px;">
                <label style="width:100px; font-weight:normal;">用户点餐: </label><input type="checkbox" id="ch_emails" name="ch_emails" <?php 
echo $row1["ord_en"] == 1 ? "checked" : "";
?>
/>
            </div>
        </div>
        <div style="width:540px; border-top:1px solid #ddd; height:20px; margin-top:54px;"></div>
        <div style="line-height:40px;">
            <table width="540px;" border="0" cellpadding="2" cellspacing="2">
                <tr style="border-bottom:1px dashed #ddd;">
コード例 #21
0
ファイル: log.php プロジェクト: noikiy/Bentley
            <div class="panel-body">
                <div class="subnav">
                    <a href="javascript:truncateLog();" class="btn btn-default">清空日志</a>
                </div>
                <table id="sample_1" class="table table-striped table-bordered table-hover table-condensed">
                    <thead>
                    <tr>
                        <th width="40px">编号</th>
                        <th width="120px">日期时间</th>
                        <th width="600px">日志内容</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
$sp = "{call sys_get_loglist()}";
$rs = sp_execute($sp, null);
//
foreach ($rs as $row) {
    ?>
                        <tr>
                            <td><?php 
    echo $row["logid"];
    ?>
</td>
                            <td><?php 
    echo $row["occdt"];
    ?>
</td>
                            <td><?php 
    echo emoji_unified_to_html($row["detail"]);
    ?>
コード例 #22
0
ファイル: tp_voice_detail.php プロジェクト: noikiy/Bentley
    <div>
        <div class="ucenter-residual noborder">
            <div class="ucenter-field noborder">
                <div class="info-no-line">详细内容</div>
            </div>
        </div>
        <div class="desc-wrapper">
            <div style="margin:0 .5rem; height:.05rem; background:#dddddd;"></div>
            <div class="desc-content"><?php 
echo $rs[0]["content"];
?>
</div>
        </div>
        <?php 
$params_pj = array(array(intval($_SESSION["tid"]), SQLSRV_PARAM_IN), array($vid, SQLSRV_PARAM_IN));
$rs_pj = sp_execute("{call web_get_topic_pj(?,?)}", $params_pj);
?>
        <div class="ucenter-residual noborder <?php 
echo count($rs_pj) > 0 ?: "hide";
?>
">
            <div class="ucenter-field noborder">
                <div class="info-no-line">评价</div>
            </div>
        </div>

        <div class="desc-wrapper">
            <?php 
foreach ($rs_pj as $row) {
    ?>
            <div class="feedback">
コード例 #23
0
ファイル: staff_import.php プロジェクト: noikiy/Bentley
    echo "<br>";
    $highestColumn = $objWorksheet->getHighestColumn();
    $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
    //总列数
    echo 'highestColumnIndex=' . $highestColumnIndex;
    echo "<br>";
    $headtitle = array();
    for ($row = 2; $row <= $highestRow; $row++) {
        $strs = array();
        //注意highestColumnIndex的列数索引从0开始
        for ($col = 0; $col < $highestColumnIndex; $col++) {
            $strs[$col] = $objWorksheet->getCellByColumnAndRow($col, $row)->getValue();
        }
        if (strlen($strs[0]) > 0 && strlen($strs[2]) > 0) {
            $params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array(0, SQLSRV_PARAM_IN), array("" . $strs[0], SQLSRV_PARAM_IN), array("" . $strs[1], SQLSRV_PARAM_IN), array("" . $strs[2], SQLSRV_PARAM_IN), array("" . $strs[3], SQLSRV_PARAM_IN));
            sp_execute("{call web_add_staff(?,?,?,?,?,?)}", $params);
        } else {
        }
    }
    //导入完成,删除文件
    unlink($uploadfile);
    //删除上传的excel文件
    echo "<script>location.href='staff.php'</script>";
}
?>
<!DOCTYPE html>
<html>
<head>
    <?php 
include_once "meta.php";
?>
コード例 #24
0
ファイル: topic.php プロジェクト: noikiy/Bentley
                    <thead>
                    <tr>
                        <th width="290px">主题名称</th>
                        <th width="150px">所有者</th>
                        <th width="100px">录音数量</th>
                        <th width="150px">创建日期</th>
                        <th width="226px">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
//查询全部餐厅信息
$_SESSION["uid"] = 4;
$tid = 0;
$params = array(array(intval($_SESSION["uid"]), SQLSRV_PARAM_IN), array($tid, SQLSRV_PARAM_IN));
$rs = sp_execute("{call web_get_topic_list(?,?)}", $params);
foreach ($rs as $row) {
    ?>
                        <tr>
                            <td id="<?php 
    echo num2str(CFG_ID_TOPIC, $row["tid"]);
    ?>
"><?php 
    echo $row["tname"];
    ?>
</td>
                            <td><?php 
    echo $row["authname"];
    ?>
</td>
                            <td align="right" style="padding-right:6px;"><?php 
コード例 #25
0
ファイル: imgmaterial.php プロジェクト: noikiy/Bentley
                我的素材管理</div>
            <div class="panel-body">
                <table id="sample_1" class="table table-striped table-bordered table-hover table-condensed">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>图片</th>
                        <th>图片链接</th>
                        <th>复制链接</th>
                        <th>上传日期时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
$rs = sp_execute("{call web_get_my_image_list(?)}", array(intval($_SESSION["uid"]), SQLSRV_PARAM_IN));
$i = 0;
foreach ($rs as $row) {
    ?>
                        <tr>
                            <td width="40px"><?php 
    echo $row["rid"];
    ?>
</td>
                            <td width="80px">
                                <img src="<?php 
    echo CFG_HTTP . "upload/weixin/" . $row["res_tag"];
    ?>
" width="16" height="16">
                            </td>
                            <td width="400px" id="clip_text_imgurl<?php 
コード例 #26
0
ファイル: car_trip_list.php プロジェクト: noikiy/Bentley
}
//设置偏移值有效期时间10分钟
$time = time() + 600;
setcookie($offset_tag, $offset, $time, "/");
if (isset($_REQUEST["s"])) {
    $s = $_REQUEST["s"];
    $mode = $s == "d" ? "1" : ($s == "w" ? "2" : ($s == "m" ? "3" : ""));
}
//
if (isset($_SESSION["offset"])) {
    $offset = $_SESSION["offset"];
    unset($_SESSION["offset"]);
}
log_file("cid=" . $_SESSION["cid"] . ", mode={$mode}, offset={$offset}");
$params = array(array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array($mode, SQLSRV_PARAM_IN), array($offset, SQLSRV_PARAM_IN), array($sdt, SQLSRV_PARAM_OUT), array($edt, SQLSRV_PARAM_OUT));
$rs = sp_execute("{call app_get_car_travel_list(?,?,?,?,?)}", $params);
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title><?php 
echo $_SESSION["carnum"];
?>
</title>
    <link rel="icon" href="../images/favicon.ico" type="image/x-icon">
    <link href="css/style.css?v=16" rel="stylesheet">
    <script src="../js/jquery-1.11.1.min.js"></script>
    <script src="js/m_init.js?v=1"></script>
コード例 #27
0
ファイル: user_mymenu1.php プロジェクト: noikiy/Bentley
    <!--sweet-alert plugin end-->
</head>
<body>
<div class="body1">
    <div class="container">
        <?php 
$haveline = false;
$firstKid = true;
$row_head = array();
//
$newords = 0;
$params = array(array(intval($_SESSION["uid"]), SQLSRV_PARAM_IN), array(intval($_SESSION["cid"]), SQLSRV_PARAM_IN), array($newords, SQLSRV_PARAM_IN));
//
$haveselectnum = 0;
$sp = "{call app_user_get_menu(?,?,?)}";
$rs = sp_execute($sp, $params);
$index = 0;
foreach ($rs as $row) {
    $have_selected_class = "";
    if ($row["mid"] == 0) {
        $row_head = $row;
        if ($haveline) {
            echo '</ul></div>';
            $haveline = false;
        }
    } else {
        if ($row_head != null) {
            echo '<div style="border-bottom:0px solid red; margin-top:0px;">';
            echo '<h1 class="ct_kind_title ' . ($firstKid ? "show_ul" : "") . '" style="position:relative; padding:10px 0 10px 10px; font-size:20px; font-weight:normal; border-top:1px solid #E2E2E2; color:#4D4E50; background:none;" id="ct_kind_' . $row["mid"] . '" title="' . $index . '" onclick="onKindClick(this)">' . $row_head["vname"] . '';
            echo '&nbsp;&nbsp;';
            echo '<span id="food_select_span_' . $row["kid"] . '" style="font-size:0.8em; color:#F8582C"></span>';
コード例 #28
0
ファイル: canteen_funs.php プロジェクト: noikiy/Bentley
/**
 *
 * 用户订餐,菜品数量超过一定限制(500)后,发送消息给餐厅管理人员
 * 订餐超限提醒
 * 格式:
 *      品种名称
 *      预定数量
 *      截止时间
 * @param $oid      订单编号
 * @param $mname    菜品名称
 * @param $mnum     菜品数量
 * @param $mdt      修改时间
 */
function altermsg_for_overlimit($oid, $mname, $mnum, $mdt)
{
    $token = db_get_token_ticket(CFG_APPID, CFG_SECRET)["token"];
    $oids = num2str_x(orderid_content_x, $oid);
    $pre_str = '{"first": {"value":"【%s】预定数量已达%s,超过您的限额值!\\r\\n","color":"#000000"},"keyword1":{"value":"%s","color":"#FE620D"},"keyword2":{"value": "%s","color":"#FE620D"},"keyword3":{"value":"%s","color":"#FE620D"},"remark":{"value":"\\r\\n%s","color":"#000000"}}';
    $data = sprintf($pre_str, $mname, $mnum, $mname, $mnum, $mdt, "");
    $params = array(array($oid, SQLSRV_PARAM_IN), array(1, SQLSRV_PARAM_IN));
    $rs = sp_execute("{call app_get_order_personal(?,?)}", $params);
    foreach ($rs as $row) {
        send_template_message($token, $row["wid"], CFG_TPMSG_OVERLIMIT, CFG_HTTP . "mobile/admin_order_list.php?oids={$oids}", "#7B68EE", $data);
    }
}
コード例 #29
0
ファイル: kind.php プロジェクト: noikiy/Bentley
                    <a href="kind_update.php" class="btn btn-default" style="width:100px;">添加类别</a>
                </div>
                <table id="sample_1" class="table table-striped table-bordered table-hover table-condensed">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>类别名称</th>
                        <th>菜品数量</th>
                        <th>添加日期</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
$params = array(array($_SESSION["cid"], SQLSRV_PARAM_IN), array(0, SQLSRV_PARAM_IN));
$rs = sp_execute("{call web_get_kind_list(?,?)}", $params);
//
foreach ($rs as $row) {
    ?>
                        <tr class="odd gradeX">
                            <td><?php 
    echo $row["kid"];
    ?>
</td>
                            <td><?php 
    echo $row["kname"];
    ?>
</td>
                            <td><?php 
    echo $row["rn"];
    ?>
コード例 #30
0
ファイル: sales_scan.php プロジェクト: noikiy/Bentley
        weixin_require_auth($redirect_uri);
    }
    exit;
}
$tipMsg = "";
$wid = $_COOKIE["wxp_user_openid"];
$cids = $_REQUEST["cids"];
$winids = $_REQUEST["winids"];
$cid = str2num(canteenid_content, $cids);
$winid = str2num(saleswin_content, $winids);
//debug:1
$mode = 0;
$ret = "                                                  ";
$params = array(array("" . $wid, SQLSRV_PARAM_IN), array($cid, SQLSRV_PARAM_IN), array($winid, SQLSRV_PARAM_IN), array($mode, SQLSRV_PARAM_IN), array($ret, SQLSRV_PARAM_OUT));
db_log("sales_scan:wid:{$wid}, cid:{$cid}, winid:{$winid}");
$rs = sp_execute("{call app_sales_scan(?,?,?,?,?)}", $params);
if ($ret == "ok_master") {
    $tipMsg = '您已经成为【' . $rs[0]["cname"] . '】[' . $rs[0]["winname"] . ']的管理员';
} else {
    if ($ret == "ok_sales") {
        //send message
        altermsg_for_sales($cids, $rs[0]["oid"], $rs[0]["uname"], $rs[0]["cname"], $rs[0]["winname"], $rs[0]["pay_sta"], $rs[0]["uid"], $rs[0]["amount"], $rs[0]["total"], $rs[0]["wid_m"]);
        $tipMsg = '已将您的订餐信息通知给【' . $rs[0]["cname"] . '】管理员';
    } else {
        $tipMsg = $ret;
    }
}
?>
<!DOCTYPE html>
<html>
<head>