addnote.php

来自「希普办公网络v2」· PHP 代码 · 共 65 行

PHP
65
字号
<? 

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 + =
减小字号Ctrl + -
显示快捷键?