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

📄 deal.php

📁 PHP留言本 设计流程: 1.需求分析: 留言本要是实现的功能是用户留言
💻 PHP
字号:
<?
if(!$_FUNC_INC) include("func.inc.php");
$errors="";
if($_POST['Author']=="") $errors.="你忘了填你的昵称了<br>";
if($_POST['Content']=="") $errors.="你什么都不说,我也不用记录了哈<br>";
if($errors) {ShowError($errors);exit();}
else {
	if(!$_MYSQL_INC) include ("mysql.inc.php");
	if($_POST['txtSub']) $content=nl2br(safe_trans($_POST['Content']));
	else if($_POST['htmlSub']) $content=$_POST['Content'];
	//$author=safe_trans($_POST['Author']);
	$author=$_POST['Author'];
	
	$sql="insert into mt_gb2 set Author='".$author."',Content='".$content."',Face='".$_POST['Face']."',Time=now(),IP='".$_SERVER['REMOTE_ADDR']."'";
	if($_POST['Email']) $sql.=",Email='".$_POST['Email']."'";
	if($_POST['Homepage']!="http://" && $_POST['Homepage']) $sql.=",Homepage='".$_POST['Homepage']."'";
	if($_POST['QQ']) $sql.=",QQ='".$_POST['QQ']."'";
	if($_POST['PID']!="") $sql.=",PID='".$_POST['PID']."'";

	//echo $sql;
	mysql_query($sql,$Mylink);
	if($_POST['PID']!="") mysql_query("update mt_gb2 set Renum=Renum+1 where ID=".$_POST['PID'],$Mylink);
}
if($_POST['PID']!="") {
?>
<script language="JavaScript">
<!--
opener.location.reload();
window.close();
//-->
</script>
<?
}
else {
?>
<script language="JavaScript">
<!--
opener.location="index.php";
window.close();
//-->
</script>
<? } ?>

⌨️ 快捷键说明

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