📄 addnew.php
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加新闻</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body bgcolor="#008080">
<h1 align="center"><font color="#FFFF00">
<?php
include("header.inc");
$query=mysql_query("select * from news1 where newlx='$lx'");
$array=mysql_fetch_row($query);
echo "增加".$array[0]."</font></h1>".'<form method="POST" action="addnew.php?lx='.$lx.'">';
?>
<p><font color="#00FFFF">新闻标题:<input type="text" name="newbt" size="40"><br>
图片名称:<input type="text" name="newimg" size="20"><br>
文件内容:<textarea rows="15" name="newnr" cols="70" style="FONT-FAMILY: 宋体;"></textarea><br>
<input type="submit" value="提交" name="submit"> <input type="checkbox" name="html" value="T">使用Html</font></p>
</form>
<?
if ($submit)
{
$query=mysql_query('select * from xtsjk where xtmc="news"');
$array=mysql_fetch_row($query);
$newxlh=$array[1]+1;
if ($newxlh>32760){
$newxlh=1;
}
$newbt=trim($newbt);
$newnr=trim($newnr);
if ($newbt==""|$newnr=="")
{
echo "<font color='yellow'>数据空,增加失败</font>";
} else {
mysql_query("insert into news values('$newbt','$newimg','$newnr','$lx','$newxlh',curdate(),curtime(),'0','$html')");
mysql_query("update xtsjk set xlh='$newxlh' where xtmc='news'");
echo "<font color='Blue'>新闻序号:".$newxlh."增加成功</font>";
}
}
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -