From 3b92df0ffa72ac0c10b577022f8fe6a2e47c5ed6 Mon Sep 17 00:00:00 2001 From: nakulaos <2821195622@qq.com> Date: Wed, 20 Dec 2023 18:42:50 +0800 Subject: [PATCH] =?UTF-8?q?position=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/position_edit.php | 11 ++++++++++- admin/position_list.php | 4 +++- admin/position_list_search.php | 4 +++- admin/position_new.php | 10 +++++++++- admin/position_save.php | 5 +++-- admin/position_update.php | 4 +++- 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/admin/position_edit.php b/admin/position_edit.php index b9533f1..30f8805 100644 --- a/admin/position_edit.php +++ b/admin/position_edit.php @@ -24,16 +24,25 @@ if($rs){
- +
+
+ +
+ +
+
+
diff --git a/admin/position_list.php b/admin/position_list.php index 65e31b5..3ae0051 100644 --- a/admin/position_list.php +++ b/admin/position_list.php @@ -37,7 +37,8 @@ include ('head.php') ID - 位置信息 + 位置名称 + 位置说明 操作 @@ -50,6 +51,7 @@ include ('head.php') echo ''; echo ''.$row['id'].''; echo ''.$row['positionInfo'].''; + echo ''.$row['positionDetail'].''; echo ''; echo ''; } diff --git a/admin/position_list_search.php b/admin/position_list_search.php index 4e5b679..21fda13 100644 --- a/admin/position_list_search.php +++ b/admin/position_list_search.php @@ -38,7 +38,8 @@ include ('head.php') ID - 位置信息 + 位置名称 + 位置说明 操作 @@ -58,6 +59,7 @@ include ('head.php') echo ''; echo ''.$row['id'].''; echo ''.$row['positionInfo'].''; + echo ''.$row['positionDetail'].''; echo ''; echo ''; } diff --git a/admin/position_new.php b/admin/position_new.php index 1e1ffdd..fc2a12d 100644 --- a/admin/position_new.php +++ b/admin/position_new.php @@ -22,13 +22,21 @@ include('head.php');
- +
+
+ +
+ +
+
+
diff --git a/admin/position_save.php b/admin/position_save.php index 6897569..3aed757 100644 --- a/admin/position_save.php +++ b/admin/position_save.php @@ -4,17 +4,18 @@ include ('../connect.php'); // 保存新增位置信息 $positionInfo = $_POST['positionInfo']; +$positionDetail = $_POST['positionDetail']; // 判断是否重复 $sql = "select * from position where positionInfo='$positionInfo' "; $rs=mysqli_query($conn,$sql); if(mysqli_num_rows($rs)>0){ $_SESSION['positionInfo']=$positionInfo; - alert('该位置信息已经存在','position_new.php'); + alert('该位置名称已经存在','position_new.php'); exit(); } -$sql="INSERT INTO position (positionInfo) VALUE ('$positionInfo')"; +$sql="INSERT INTO position (positionInfo,positionDetail) VALUE ('$positionInfo','$positionDetail')"; // 判断是否添加成功 $rs=mysqli_query($conn,$sql); diff --git a/admin/position_update.php b/admin/position_update.php index c18f55e..48ac0da 100644 --- a/admin/position_update.php +++ b/admin/position_update.php @@ -5,9 +5,11 @@ include ('../connect.php'); $id=$_POST['id']; $positionInfo=$_POST['positionInfo']; +$positionDetail=$_POST['positionDetail']; $sql="update position -set position.positionInfo='$positionInfo' +set position.positionInfo='$positionInfo', + position.positionDetail='$positionDetail' where id= $id"; $rs=mysqli_query($conn,$sql); if($rs){ -- Gitee