Esempio n. 1
0
<?php

require '../public/common.php';
$arri = array('联通标准版套餐', '移动标准版套餐', '双4G版套餐', '电信标准版套餐');
$arrj = array('黑色', '白色', '金色');
$id = $_GET['id'];
//每次打开页面,更新浏览量
$sqla = "update " . PREFIX . "goods set clicknum=clicknum+1 where id={$id}";
$resa = myQueryUpdate($sqla);
//echo $resa;die;
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<title>【【华为荣耀3X Pro】华为 华为 荣耀3X Pro【报价 参数 功能 性能 图片 怎么样】】_华为商城</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<link href="css/ec.core.min.css?20150213" rel="stylesheet" type="text/css">
<link href="css/main.min.css" rel="stylesheet" type="text/css">
<script src="./js/jquery.js"></script>
<script src="./js/bo.js"></script>
<script>
//用jquery选取
$(function(){
	var num=$('.pro-comment-item').length;
	var str='共&nbsp;'+num+'&nbsp;条评论';
	$('#prd-remark-jmptoremark').html(str);
})
</script>
</head>
Esempio n. 2
0
         $type = array('image/jpeg', 'image/png', 'image/gif');
         //允许上传文件的MIME类型
         $size = 1024000;
         //允许上传的文件大小,手动指定约1M
         //上传新图片
         //echo $path;die;
         $res = uploadFile($file, $path, $type, $size);
         if (!$res['error']) {
             echo '文件上传失败,错误原因' . $res['info'];
             die;
         }
         //缩放图片
         imageResize($res['info'], $path, 160, 160);
         $sql = "update " . PREFIX . "users set pass='******',name='{$name}',sex='{$sex}',address='{$address}',code='{$code}',phone='{$phone}',email='{$email}',mypic='{$res['info']}' where id='{$id}'";
         //echo $sql;die;
         $result = myQueryUpdate($sql);
         if ($result) {
             echo location_js('资料修改成功', 'ucenter.php');
         } else {
             echo location_js('失败', 'ucenter.php');
             unlink($path . $oldmypic);
         }
     }
     break;
 case 'logout':
     //用户退出
     $_SESSION = array();
     if (isset($_COOKIE[session_name()])) {
         setCookie(session_name(), '', time() - 1, '/');
     }
     session_destroy();
Esempio n. 3
0
 $Addressid = $_POST['myAddress'];
 $sqldz = "select * from " . PREFIX . "address where id={$Addressid}";
 $resdz = myQuery($sqldz);
 //收货人
 $linkman = $resdz['0']['linkman'];
 $address = $resdz['0']['address'];
 $code = $resdz['0']['code'];
 $phone = $resdz['0']['phone'];
 //foreach遍历购物车
 if (!empty($_SESSION['shoplist'])) {
     foreach ($_SESSION['shoplist'] as $key => $value) {
         //总金额
         $money += $value['price'] * $value['num'];
         //用户确认提交订单,需要减少对应商品的库存,增加被购买量
         $sqlkc = "update " . PREFIX . "goods set store=store-{$value['num']},num=num+{$value['num']} where id={$key}";
         $resultkc = myQueryUpdate($sqlkc);
     }
 }
 //生成唯一订单编号
 /*
 $userOrder='201507160002';
 $sqla="select * from ".PREFIX."orders where userorder={$userOrder}";
 $resulta=myQuery($sqla);
 
 if($resulta){
 	echo '存在';
 }else{
 	echo '不存在';
 }
 
 die();