<?
include_once("../inc/config.php");
include_once("../inc/publicfun.php");
include_once("../inc/ftbbsdbclass.php");
include_once("../inc/ftcode.php");
include_once("../pageclass.php");
include_once("../conn.php");
include_once("check_master.php");

if ($_POST["act"]=="y"){
   $title = ftbbs_request(trim($_POST["title"]));
   $content=nl2br($_POST["content"]);
   $content=htmlspecialchars($content);
   
   $str="insert into {$tablepre}sms(title,content,indate,bbssystem) values('".$title."','".$content."','".$getnow."',1)";
   mysql_query($str);
   $db->close(); 
   echo "<br><br><br><br><br><center>发送成功! <a href=adminpostsms.php>继续发</a> <a href=managesms.php>返回管理页</a></center>";
   exit;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK href="../css/main01.css" rel=stylesheet type=text/css>
<title>论坛短信系统</title>
</head>
<body topmargin="5">
<div align="center"> 
  <TABLE width="99%" border=0 align="center" cellPadding=0 cellSpacing=0 bgColor="#FFFFFF" class="default_list">
    <TBODY>
      <TR bgColor=#f2f8ff> 
        <TD vAlign=middle bgColor=#f6f6f6 class=font10_5><div align="center">
            <form name="form2" method="post" action="" style="MARGIN-BOTTOM: 0px">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr class="nar"> 
                  <td height="28" colspan="2"> 
                    <div align="center" ><font color="#FFFFFF"><strong>给所有用户发送短信</strong></font></div></td>
                </tr>
                <tr> 
                  <td height="28" colspan="2"> 
                    <div align="center" class="f12">发送系统短信</div></td>
                </tr>
                <tr class="f12"> 
                  <td width="20%" height="40"> 
                    <div align="right">标题:</div></td>
                  <td> 
                    <input name="title" type="text" id="title" size="50"></td>
                </tr>
                <tr class="f12"> 
                  <td height="25"> 
                    <div align="right">内容:</div></td>
                  <td> 
                    <textarea name="content" cols="70" rows="20" id="content"></textarea></td>
                </tr>
                <tr class="f12"> 
                  <td height="50"> 
                    <div align="right"></div></td>
                  <td> 
                    <input type="submit" name="Submit" value="发送" <? if (false===strrpos($_SESSION["admin_qs"],"1")){?>disabled<? }?>> 
                    <input name="act" type="hidden" id="act" value="y"></td>
                </tr>
              </table>
            </form>
          </div></TD>
      </TR>
    </TBODY>
  </TABLE>
  
</div>

</body>
</html>