Ejemplo n.º 1
0
<?php

session_start();
include "../inc/chec.php";
include "../conn/conn.php";
include "../inc/func.php";
$sqlstr = "delete from tb_superson where id = " . $_GET[id];
$result = mysql_query($sqlstr, $conn);
re_message($result, "exc_staf.php");
Ejemplo n.º 2
0
<?php

session_start();
include "../conn/conn.php";
include "../inc/chec.php";
include "../inc/func.php";
$sqlstr = "update tb_lyb set r_back='" . $_POST[r_back] . "',is_reply = 1  where id = " . $_POST[id];
$result = mysql_query($sqlstr, $conn);
re_message($result, "lyb.php?u_id=24");
Ejemplo n.º 3
0
<?php

session_start();
include "../inc/chec.php";
include "../conn/conn.php";
include "../inc/func.php";
$sqlstr = "update tb_person set p_title = '" . $_POST[p_title] . "',p_content = '" . $_POST[p_content] . "',p_time = now(),u_id = " . $_POST[p_type] . " where id = " . $_POST[id];
$result = mysql_query($sqlstr, $conn);
re_message($result, "p_manage.php");
Ejemplo n.º 4
0
<?
	session_start(); 
	include "../inc/chec.php";
	include "../conn/conn.php";
	include "../inc/func.php";
	//判断输入部门名称是否重复
	if(isbool($_POST[d_name])){
		echo "<script>alert('名称已存在,请重新输入!!');history.go(-1);</script>";
		exit();
	}
	//添加部门,确定上级部门和根部门
	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_row($result);
		if ($rows[top_depart] != 0)
		$top_depart = $rows[top_depart];
	else
		$top_depart = $_POST[u_id];
	}
	else
		$top_depart = 0;
	$sqlstr = "insert into tb_depart values('','".$_POST[d_name]."',".$top_depart.",".$_POST[u_id].",'".$_POST[remark]."')";
	$result = mysql_query($sqlstr,$conn); 
	//调用输出函数
	re_message($result,"show_depart.php")
?>
Ejemplo n.º 5
0
<?php

session_start();
include "../inc/chec.php";
include "../conn/conn.php";
include "../inc/func.php";
$sqlstr = "delete from tb_register";
$result = mysql_query($sqlstr, $conn);
re_message($result, "manage_note.php");
Ejemplo n.º 6
0
<?php

include "../conn/conn.php";
include "../inc/chec.php";
include "../inc/func.php";
if (isset($_POST[l_title]) and isset($_POST[l_content])) {
    $l_sql = "insert into tb_lyb values('','" . $_POST[l_title] . "','" . $_POST[l_content] . "',now(),'','')";
    $l_rst = mysql_query($l_sql, $conn);
    re_message($l_rst, "lyb.php?u_id=24");
} else {
    echo "<script>alert('非法操作,请重新登录!');location='../index.php';</script>";
}
Ejemplo n.º 7
0
<?php

session_start();
include "../inc/chec.php";
include "../conn/conn.php";
include "../inc/func.php";
$g_sql = "select id,u_member from tb_group where id = " . $_POST[u_group];
$g_result = mysql_query($g_sql, $conn);
$g_rows = mysql_fetch_row($g_result);
$g_mem = $g_rows[1] . $_POST[u_name] . ",";
$a_sql = "update tb_group set u_member = '" . $g_mem . "' where id = " . $_POST[u_group];
mysql_query($a_sql, $conn);
$sqlstr = "insert into tb_users (u_user,u_pwd,u_name,u_sex,u_birth,u_address,u_tel,u_email,u_depart,is_on) values('" . $_POST[u_user] . "','" . $_POST[u_pwd] . "','" . $_POST[u_name] . "','" . $_POST[u_sex] . "','" . $_POST[u_birth] . "','" . $_POST[u_address] . "','" . $_POST[u_tel] . "','" . $_POST[u_email] . "','" . $_POST[u_depart] . "',1)";
$result = mysql_query($sqlstr, $conn);
re_message($result, "show_staf.php");
Ejemplo n.º 8
0
<?php

session_start();
include "../inc/chec.php";
include "../conn/conn.php";
include "../inc/func.php";
if ($_GET[action] == "del") {
    if ($_GET[id] == 1) {
        echo "<script>alert('公司简介不允许删除');history.go(-1);</script>";
    } else {
        $del_sql = "delete from tb_company where id = " . $_GET[id];
        $result = mysql_query($del_sql, $conn);
        re_message($result, "r_system.php");
    }
}
if ($_POST[action] == "add") {
    $add_sql = "insert into tb_company values('','" . $_POST[u_title] . "','" . $_POST[u_content] . "')";
    $result = mysql_query($add_sql, $conn);
    re_message($result, "r_system.php");
} else {
    if ($_POST[action] == "modify") {
        $md_sql = "update tb_company set f_name = '" . $_POST[u_title] . "',f_content = '" . $_POST[u_content] . "' where id = " . $_POST[id];
        $result = mysql_query($md_sql, $conn);
        re_message($result, "r_system.php");
    } else {
        echo "<script>alert('非法连接,请登录');location='index.php';</script>";
    }
}