📄 manager.php
字号:
<?php
session_start();
require"./inc/func.php";
check_login();
if ($sub)
{
if(!empty($title) and !empty($cont))
{ mscon();
add_article();
}
else
echo "title and cont can no empty";
if($type_lock)
{
session_register("add_type");
$add_type=$type;
}
}
$type=file("list.txt");
$num=count($type);
require "./inc/header.inc";
?>
<script language="javascript">
function type()
{
var theResult = true;
var elem4 = null;
if (document.forms[0].elements[0].value == "1")
{
alert("请选择您添加文章的类别!");
theResult = false;
}
return theResult;
}
function title()
{
var theResult = true;
var elem4 = null;
if (document.forms[0].elements[2].value == "" || document.forms[0].elements[2].value == "undefined" || document.forms[0].elements[2].value == "null")
{
elem4 = prompt("请输入文章标题\n注:标题,内容不能为空,否则无法添加文章:","");
theResult = false;
document.forms[0].elements[2].value = elem4;
}
return theResult;
}
function go()
{
var theResult=true;
theResult =type()&&title();
return theResult;
}
</script>
</head>
<body bgcolor="#FFFFFF">
<? require "./inc/nav.inc";?>
<form method="post" action="<?php echo $php_self;?>" onsubmit="return go()";>
<? if($sub)
echo "文章:".$title."添加成功!";?>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="72%">类别:
<select name="type">
<option value="1">请选择文章类别</option>
<?
for($i=1;$i<$num;$i++)
{ echo"<option value=$type[$i] "; if(trim($type[$i])==trim($add_type)) { echo " selected"; } echo ">$type[$i]</option>";}
?>
</select>
类别琐定:
<input type=checkbox name=type_lock value=1
<? if($add_type)echo " checked";?>>
<br>
题目:
<input type="text" name="title" size="60">
<br>
正文内容:不支持html:
<input type="radio" name="html" value="1" checked>
支持html:
<input type="radio" name="html" value="2">
<br>
<textarea name="cont" cols="85" rows="17" wrap="VIRTUAL"></textarea>
</td>
<td width="28%">
<?echo "常用网址:<br>";
$url=file("url.txt");
$total=count($url);
for($i=0;$i<$total;$i++)
{
$tmp=split("&",$url[$i]);
echo "<a href=$tmp[0] target=_blank>$tmp[1]</a><br>";
}
?></td>
</tr>
</table>
<br>
<input type="submit" name="sub" value="确定添加">
<input type="reset" name="Reset" value="取消">
</form>
<?require "./inc/footer.inc";?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -