Exemplo n.º 1
0
}
$unex = explode('|', $_SESSION['uname']);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if ($_POST['myFilePath']) {
        $query = "update wm_shopinfo set shopadd='{$_POST['add']}',shoptel='{$_POST['tel']}',shopimage='{$_POST['myFilePath']}',online='{$_POST['state']}',shopintro='{$_POST['intro']}',beizhu='{$_POST['beizhu']}' where shopid='{$unex['0']}'";
    } else {
        $query = "update wm_shopinfo set shopadd='{$_POST['add']}',shoptel='{$_POST['tel']}',online='{$_POST['state']}',shopintro='{$_POST['intro']}',beizhu='{$_POST['beizhu']}' where shopid='{$unex['0']}'";
    }
    $result = $db->query($query);
    if ($result) {
        echo "<IMG height=13 src=\"images/tick.png\" width=16 align=absMiddle />保存成功";
    } else {
        echo "<IMG height=13 src=\"images/cross.png\" width=16 align=absMiddle />保存失败";
    }
}
$row = get_shop_details($db, $unex[0]);
?>
<html>
<head>
<link href="css/main.css"      rel="stylesheet" type="text/css" />
<link href="css/default.css"   rel="stylesheet" type="text/css" />
<link href="css/uploadify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../jcart/jquery-1.5.1.js"></script>
<script type="text/javascript" src="./js/swfobject.js"></script>
<script type="text/javascript" src="./js/jquery.uploadify.v2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$("#fileInput2").uploadify({
		'uploader'   : './js/uploadify.swf',//所需要的flash文件
		'cancelImg'  : './js/cancel.png',//单个取消上传的图片
		'script'     : './js/uploadify.php',//实现上传的程序
Exemplo n.º 2
0
        $rest = $resarr['dintype'];
    }
    $dintypes[] = array("dintype" => $rs['dintype'], "typename" => $rest);
}
if (is_array($dintypes)) {
    foreach ($dintypes as $e => $row) {
        $i = "select * from wm_dininfo where shopid = '" . $shopid . "' and dintype = '" . $row['dintype'] . "' order by dinimage desc";
        foreach ($db->query($i) as $rsi) {
            $dinners[$e][] = array('dinid' => $rsi['dinid'], 'dinname' => $rsi['dinname'], 'dinimage' => $rsi['dinimage'], 'dinprice' => $rsi['dinprice'], 'shopid' => $rsi['shopid'], 'isellout' => $rsi['isellout'], 'intro' => $rsi['beizhu']);
        }
    }
}
$querys = "select yhtime,yhcontent from wm_yhinfo where shopid='" . $shopid . "'";
foreach (@$db->query($querys) as $rowyh) {
    $yhtime = empty($rowyh['yhcontent']) ? '' : '截止日期:' . $rowyh[yhtime];
    $smarty->assign("yhtime", $yhtime);
}
$row = get_shop_details($db, $shopid);
$smarty->assign("shopimage", $row['shopimage']);
$smarty->assign("shopname", $row['shopname']);
$smarty->assign("shopintro", $row['shopintro']);
$smarty->assign("shoptel", $row['shoptel']);
$smarty->assign("shopadd", $row['shopadd']);
$smarty->assign("price", $row['price']);
$smarty->assign("beizhu", $row['beizhu']);
$smarty->assign("online", $row['online']);
$smarty->assign("dinners", $dinners);
$smarty->assign("shops", $dintypes);
$smarty->assign("shopcart", $cart->display_cart($jcart));
$smarty->display("graduate.tpl", $shopid);
include_once './footer.php';
Exemplo n.º 3
0
foreach (@$db->query($query) as $rs) {
    $sql = "select dintype from wm_dincategory where id ='" . $rs['dintype'] . "'";
    foreach ($db->query($sql) as $resarr) {
        $rest = $resarr['dintype'];
    }
    $dintypes[] = array("dintype" => $rs['dintype'], "typename" => $rest);
}
if (is_array($dintypes)) {
    foreach ($dintypes as $e => $row) {
        $i = "select * from wm_dininfo where shopid = '" . $shopid . "' and dintype = '" . $row['dintype'] . "' order by dinimage desc";
        foreach ($db->query($i) as $rsi) {
            $dinners[$e][] = array('dinid' => $rsi['dinid'], 'dinname' => $rsi['dinname'], 'dinprice' => $rsi['dinprice'], 'shopid' => $rsi['shopid'], 'isellout' => $rsi['isellout'], 'popnum' => $rsi['popnum'], 'dinimage' => $rsi['dinimage']);
        }
    }
}
$shopinfo = get_shop_details($db, $shopid);
$yysj = "上午" . substr($shopinfo['swstart'], 0, 5) . "-" . substr($shopinfo['swend'], 0, 5) . " 下午" . substr($shopinfo['xwstart'], 0, 5) . "-" . substr($shopinfo['xwend'], 0, 5);
//餐品的评价开始
if ($tag == 1) {
    $rpp = 18;
    // results per page
    $adjacents = intval($_GET['adjacents']);
    if (!$_GET['tpages']) {
        $count = $db->query("SELECT count(`id`) FROM `wm_grade` WHERE `shopid`='{$shopid}' and `speed`='0'")->fetchColumn();
        $tpages = $count ? ceil($count / $rpp) : 1;
        // total pages, last page number
    } else {
        $tpages = $_GET['tpages'];
    }
    if ($adjacents <= 0) {
        $adjacents = 2;
Exemplo n.º 4
0
include "./header.php";
session_start();
$cart =& $_SESSION['jcart'];
if (!is_object($cart)) {
    $cart = new jcart();
}
$bulid = isset($_COOKIE['bid']) ? $_COOKIE['bid'] : 8;
$search = $_POST['txtSuggestEntity'];
if ($search == '' || $search == 'ËÑË÷²ÍÆ·:Ãû³Æ') {
    echo "ÇëÊäÈëÒªËÑË÷µÄ²ÍÆ·Ãû³Æ£¡£¡£¡";
} else {
    $searchshops = get_searchshops($db, $search, $bulid);
    $dinners = get_searchdinners($db, $search, $bulid);
    foreach ($dinners as $row) {
        //$row['dinname']=preg_replace("/($search)/i","<font color=red><b>\${1}</b></font>",$row['dinname']);
        if ($shopid != $row['shopid']) {
            $shops[$row['shopid']] = get_shop_details($db, $row['shopid']);
        }
        $shopid = $row['shopid'];
    }
    $now = strtotime(date("YmdHis"));
    $smarty->assign("searchshops", $searchshops);
    $smarty->assign("bulid", $bulid);
    $smarty->assign("now", $now);
    $smarty->assign("search", $search);
    $smarty->assign('shops', $shops);
    $smarty->assign("dinners", $dinners);
    $smarty->assign("shopcart", $cart->display_cart($jcart));
    $smarty->display("searchdinners.tpl");
}
include "./footer.php";