Ejemplo n.º 1
0
    ?>
                            </td>
                            <td>
                                <?php 
    echo getmidstr(CFG_MENU_SHOW_MODE, $row["menumode"]);
    ?>
                            </td>
                            <td><?php 
    echo $row["cdt"];
    ?>
</td>
                            <td>
                                <?php 
    $addr = $row["addr"];
    if (strlen($row["px"]) > 0 && strlen($row["py"]) && strlen($addr) == 0) {
        $addr = get_location_bdapi(CFG_BDAPI_AK, $row["px"], $row["py"]);
        //to update tb_canteen
        $params = array(array($row["cid"], SQLSRV_PARAM_IN), array("" . $addr, SQLSRV_PARAM_IN));
        sp_execute("{call web_set_canteen_addr(?,?)}", $params);
    }
    echo $addr;
    ?>
                            </td>
                            <td>
                                <?php 
    echo $row["telnum"];
    ?>
                            </td>
                            <td>
                                <button class="viewkind btn btn-xs filter-submit margin-bottom">进入</button>
                                <button class="qrcode btn btn-xs filter-submit margin-bottom" value="<?php 
Ejemplo n.º 2
0
        $canteenName = $_REQUEST["canteenName"];
        $canteenTel = $_REQUEST["canteenTel"];
        $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">
Ejemplo n.º 3
0
        <a href="javascript:;" class="react1">
            <div class="carbox">
                <span class="state-demo"></span>
                <div class="carbox-img imgbox">
                    <img src="<?php 
echo strlen($rs[0]["picurl"] > 0) ? CFG_HTTP . "upload/car/" . $rs[0]["picurl"] : CFG_HTTP . CFG_CAR_DEFAULT;
?>
" style="width: 100%;">
                </div>
                <div class="carbox-txt">
                    <div class="title single-line"><?php 
echo $rs[0]["carnum"];
?>
</div>
                    <div class="address text-block">最后定位:&nbsp;<?php 
echo get_location_bdapi(CFG_BDAPI_AK, $rs[0]["ldx"], $rs[0]["ldy"]);
?>
</div>
                    <div class="time">数据更新:&nbsp;<?php 
echo is_object($rs[0]["ldt"]) ? $rs[0]["ldt"]->format('Y-m-d H:i') : "";
?>
</div>
                </div>
                <span class="state-share share-xy <?php 
echo $rs[0]["owner"] == 1 ? "hide" : "";
?>
">所有者:&nbsp;<?php 
echo $rs[0]["nickname"];
?>
</span>
            </div>