edit_depart_chk.php
来自「一个很不错的oa系统,简单好用,数据库是用mysql5,所以大家要注意,不要因为」· PHP 代码 · 共 38 行
PHP
38 行
<?
session_start();
include "../inc/chec.php";
include "../conn/conn.php";
include "../inc/func.php";
//修改部门,确定上级部门和根部门
if($_POST[u_id] != 0){
$sqlstr = "select top_depart from tb_depart where id = ".$_POST[u_id];
$result = mysql_query($sqlstr,$conn);
$rows = mysql_fetch_array($result);
if ($rows[top_depart] != 0)
$top_depart = $rows[top_depart];
else
$top_depart = $_POST[u_id];
}
else
$top_depart = 0;
$sqlstr = "update tb_depart set d_name = '".$_POST[d_name]."',top_depart = ".$top_depart.", up_depart = ".$_POST[u_id].", remark = '".$_POST[remark]."' where id = ".$_POST[id];
$result = mysql_query($sqlstr,$conn);
re_message($result,"show_depart.php");
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?