韩志成你给我俩等着
This commit is contained in:
@@ -1,27 +1,3 @@
|
||||
<?php
|
||||
include_once("../../common/init.php");
|
||||
check_loginuser();
|
||||
if ($_POST){
|
||||
$data = array();
|
||||
$row = db_get_row("select * from yajin where userid='". $_SESSION["studentid"] ."'");
|
||||
if ($row["id"]) {
|
||||
if($_POST["price"]+$row["price"]<300){
|
||||
goBakMsg("预存款不能少于300元");
|
||||
die;}else{db_query("update yajin set price=price+".$_POST["price"]." where id=".$row["id"]);}
|
||||
}
|
||||
else{if($_POST["price"]<300){goBakMsg("预存款不能少于300元");die;}}
|
||||
$data["price"] = "'".$_POST["price"]."'";
|
||||
$data["studentid"] = "'".$_SESSION['stuname']."'";
|
||||
$data["userid"] = "'".$_SESSION['studentid']."'";
|
||||
if ($row["id"]) {
|
||||
} else {
|
||||
db_add("yajin",$data);
|
||||
}
|
||||
urlMsg("提交成功", "main.php");
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php include_once("base.php");?>
|
||||
<body>
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
@@ -44,7 +20,7 @@
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form name="add" method="post" action="?" enctype="multipart/form-data">
|
||||
<form name="add" method="post" action="submit.php" enctype="multipart/form-data">
|
||||
<table width="100%" class="cont">
|
||||
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user