admin/goods_edit.php

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
include("check_login.php");
include("../conn.php");
include("fun.php");
//修改保存
if($action=="save")
{
	//如果会员价和市场价相差小于80%,视为特价
	if(ceil(($huiyuanjia/$shichangjia)*100)<=80)
 $tejia=1;
 else
 $tejia=0;

if ($upfile!="")
{
$exname=strtolower(substr($_FILES['upfile']['name'],(strrpos($_FILES['upfile']['name'],'.')+1)));
$uploadfile = getname($exname);
move_uploaded_file($_FILES['upfile']['tmp_name'], $uploadfile);
$uploadfile="admin/".$uploadfile;
$addtime=date("Y-m-d");
$sql="update goods set mingcheng='$mingcheng',jianjie='$jianjie',addtime='$addtime',xinghao='$xinghao',tupian='$uploadfile',typeid='$typeid',shichangjia='$shichangjia',huiyuanjia='$huiyuanjia',pinpai='$pinpai',tuijian='$tuijian',tejia='$tejia',shuliang='$shuliang' where id=".$_GET[id]."";
	}
else
$sql="update goods set mingcheng='$mingcheng',jianjie='$jianjie',addtime='$addtime',xinghao='$xinghao',typeid='$typeid',shichangjia='$shichangjia',huiyuanjia='$huiyuanjia',pinpai='$pinpai',tuijian='$tuijian',tejia='$tejia',shuliang='$shuliang' where id=".$_GET[id]."";

mysql_query($sql,$conn);
echo "<script>alert('汽车修改成功!');location.href='goods.php';</script>";
}

//取数据
  $sql1=mysql_query("select * from goods where id=".$_GET[id]."",$conn);
 $info1=mysql_fetch_array($sql1);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>更改汽车信息</title>
<link rel="stylesheet" type="text/css" href="images/admincp.css">

</head>

<body topmargin="0" leftmargin="0" bottommargin="0">
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30" bgcolor="#E7F3FB"><div align="center" >更改汽车信息</div></td>
  </tr>
  <tr>
    <td height="253" bgcolor="#E7F3FB"><table width="750" border="0" cellpadding="0" cellspacing="1">
        <script language="javascript">
	function chkinput(form)
	{
	  if(form.mingcheng.value=="")
	   {
	     alert("请输入汽车名称!");
		 form.mingcheng.select();
		 return(false);
	   }

	  if(form.huiyuanjia.value=="")
	   {
后面还有 142 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。