Shopping.php
(完整代码) 774B<?php
session_start();
include("conn.php");
if($_SESSION[username]=="")
{
echo "<script>alert('请先登录后购买!');history.back();</script>";
exit;
}
$id=strval($_GET[id]);
$sql=mysql_query("select * from goods where id='".$id."'",$conn);
$info=mysql_fetch_array($sql);
if($info[shuliang]<=0)
{
echo "<script>alert('该汽车已经售完!');history.back();</script>";
exit;
}
$array=explode("@",$_SESSION[producelist]);
for($i=0;$i<count($array)-1;$i++)
{
if($array[$i]==$id)
{
echo "<script>alert('该汽车已经在您的购物车中!');history.back();</script>";
exit;
}
}
$_SESSION[producelist]=$_SESSION[producelist].$id."@";
$_SESSION[quatity]=$_SESSION[quatity]."1@";
header("location:mychart.php");
?>
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。