📄 addtext.php
字号:
<?
include_once('session.php');
include_once('function.php');
include_once('config.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" <? include ('template/fengge.php'); ?> leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?
include_once('addclass.php');
$time=time();
$ftime=date("Y-m-d g:i",$time);
$login_name=$_SESSION['username'];
$addname=strip_tags($_POST['addname']);
$addarea=($_POST['addarea']);
$addmod=$_POST['addmod'];
$add=new addclass($dbname);
if ($addname==""&&$addmod&&$accept)
{
$area_value=$_POST['addarea'];
$errormeg="<font color=red >错误 </font>: 无标题么?";
require('template/addtextform.php');
}
elseif($addarea==""&&$addmod&&$accept)
{
$name_value=$_POST['addname'];
$errormeg="<font color=red>错误 </font> : 添加文档怎么没有内容?";
require('template/addtextform.php');
}
elseif ($_POST['addmod']&&$accept&&$addname!=""&&$addarea!="")
{
if ($_POST['share']=="someshare") $text_mod="局部共享";
elseif ($_POST['share']=="allshare") $text_mod="无限制共享";
else $text_mod="没有共享";
$worker_job=getjob($_SESSION[username]);
$flag=$add->addsql("work_text","'$addname','$login_name','$addarea','$text_mod',$time,null,'$ftime','$worker_job' ,$_POST[dir_id]");
if ($flag)
{
$errormeg="<font color=red>添加成功</font> 可以关闭窗口,或继续添加";
box("添加成功","文档 $addname 添加成功","addtext.php");
}
else
{
$errormeg="意外错误";
require('template/addtextform.php');
}
}
else require('template/addtextform.php');
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -