⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addnote.php

📁 修正了多处BUG
💻 PHP
字号:
<? 

include_once('session.php');
include_once('function.php');
include_once('function.php');
if (islogin($_SESSION['username'],$_SESSION['userpass']))
$accept=true;
else {
$accept=false;

exit;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加程序</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#F3F7FC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?
include_once('addclass.php');
$time=time();
$ftime=date("Y-m-d g:i",$time);
$worker_login_name=$_SESSION['username'];
$addname=strip_tags($_POST['addname']);
$addarea=strip_tags($_POST['addarea']);
$addmod=$_POST['addmod'];
$add=new addclass($dbname);

if ($addname==""&&$addmod&&$accept)
{
 	$area_value=$_POST['addarea'];

	$errormeg="<font color=red >错误 </font>: 无标题么?";
	require('template/addnoteform.php');
	}
elseif($addarea==""&&$addmod&&$accept)
{
 $name_value=$_POST['addname'];
 
 $errormeg="<font color=red>错误 </font> : 添加记事怎么没有内容?";
require('template/addnoteform.php');
}
elseif ($_POST['addmod']&&$accept&&$addname!=""&&$addarea!="")
{  
	
	

$flag=$add->addsql("notbook","'$addname','$addarea','$worker_login_name',$time,'$ftime'");
if ($flag)
{
	$errormeg="<font color=red>添加成功</font> 可以关闭窗口,或继续添加";
	box("添加成功","记事 $addname 添加成功","addnote.php");	
	}
else 
box("<font color=red>意外错误</font>","<font color=red>意外错误</font>","addnote.php");

}
else require('template/addnoteform.php');
?>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -