-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddProject_ok.php
51 lines (47 loc) · 1.31 KB
/
addProject_ok.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<?php session_start(); include("conn.php");?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/amazeui.min.css">
<link rel="stylesheet" href="css/admin.css">
<link rel="stylesheet" href="css/app.css">
<style>
.admin-main{
padding-top: 0px;
}
</style>
</head>
<body>
<div class="am-cf admin-main">
<!-- content start -->
<div class="admin-content">
<div class="admin-content-body">
<div class="am-g">
<form class="am-form am-form-horizontal" action="addProject_ok.php" method="post" >
<?php
if($_SESSION['priority']>2){
echo "<script>alert('权限不足');go.history(-1);</script>";
}
else{
if (!($_POST['projectNo'] and $_POST['projectName'] and $_POST['projectBudget'] and $_POST['partProgress'] and $_POST['projectDeadline'])){
echo "输入不允许为空。";
}else{
$sqlstr1 = "insert into 项目 values ($_POST[projectNo],'$_POST[projectName]',$_POST[projectBudget],'$_POST[partProgress]','$_POST[projectDeadline]')";
$result = mysqli_query($conn,$sqlstr1);
if ($result){
echo "添加成功!";
}else{
echo "<script>alert('添加失败');history.go(-1);</script>";
}
}
}
?>
</form>
</div>
</div>
</div>
</div>
</body>
</html>