<div id="user_main">
<div id="left">
<?php require 'left.php'; ?>
<?php
error_reporting(0);
?>
</div>
<script src="../js/tougao.js" type="text/javascript"></script>

<div id="right">
<div id="right_top"><div style="padding-top:5px;padding-left:10px;"><a href="user.php">会员中心</a> - 原创文章发稿</div></div>
<div id="urltop" style="text-align: left;">
<table cellpadding="4" cellspacing="1" >
<tr><form method="post" action="?post" onsubmit="return checksearch(this)">
<td style="font-size: 14px;">
稿件类型:
</td>
<td style="font-size: 14px;color: #FF0000;">
【只要是您的原创文章即可……非原创绝对淘汰！】
</td>
</tr>
<tr>
<td style="font-size: 14px;">
稿件标题:
</td>
<td>
<input name="title" style="width: 650px;height:28px;line-height: 28px;" />
</td>
</tr>

<tr>
<td style="font-size: 14px;" valign="top">
稿件内容:
</td>
<td>
<textarea name="texts" style="width: 650px;overflow:hidden;height:250px;"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="提 交" style="width: 150px;height:30px;" /></form></td>
</tr>
</table>
</div>
</div></div>

<?php
$title= $_POST['title'];
$texts= $_POST['texts'];
$texts = str_replace("\n","<br />",$texts);
$texts = str_replace(" ","&nbsp;",$texts);
$query = $_SERVER['QUERY_STRING'];
ini_set("date.timezone","PRC");
$datetime = date("Y-m-d H:i:s");
if($query=="post"){
$sql = "insert into axphp_text (title,texts,username,money,shenhe,datetime) values ('$title','$texts','$user','0','0','$datetime')";
$sqlok = mysql_query($sql,$config);
if($sqlok){
    echo "<script>window.onload=function uppass(){alert('提交成功,谢谢您的参与,我们将在第一时间审核并发放拥金!');location.href='url.php';}</script>";
}else{
    echo "<script>alert('系统出错,请联系管理员!');location.href='url.php';</script>";
exit;
}
}
?>