📄 c_manage_chk.php
字号:
<?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>";
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -