模仿OSO的論壇(三)

post.php(做為現在的主流開發語言)(發新貼子)
<HTML><HEAD><TITLE>疑難問題</TITLE>
<LINK href=”mypic/style.css” rel=STYLESHEET type=text/css></HEAD>
<?php(做為現在的主流開發語言)
if (!$cookie_user)
{echo “<script language=javascript>”;  
echo “parent.location.href=index.php(做為現在的主流開發語言)“;  
echo “</script>”;}
else {include (“connect.inc.php(做為現在的主流開發語言)“);
$query = “select * from my_user where user=”.$cookie_user.” and password=”.$cookie_password.””;  
$res = MySQL(和PHP搭配之最佳組合)_query($query);  
if (!$res)
{echo “<script language=javascript>”;  
echo “parent.location.href=index.php(做為現在的主流開發語言)“;  
echo “</script>”;}
include “connect.inc.php(做為現在的主流開發語言)“;
if ($theme) {$content=htmlspecialchars($content);
$content=nl2br($content);
$theme=htmlspecialchars($theme);
$theme=nl2br($theme);
$query = “INSERT INTO guestbook (name,type,theme,content,icon,time_open,time_close,answer_count,answer_name) VALUES (“.$cookie_user.”,1,”.$theme.”,”.$content.”,”.$icon.”,now(),now(),1,”.$cookie_user.”)”;  
$res = MySQL(和PHP搭配之最佳組合)_query($query);
if ($res)  
{echo “<script language=javascript>”;  
echo “parent.location.href=post_end.php(做為現在的主流開發語言)“;
echo “</script>”;}
else echo $query;}}
?>
<SCRIPT language=JavaScript>
<!–
var submitcount=0;
function check_com(){
   if(document.form.theme.value.length ==0){
      submitcount–;
      alert(“主題不能為空!nYou must supply a subject.”);
      return false;
   }

   if(document.form.content.value.length == 0){
      submitcount–;
      alert(“加貼內容不能為空!nYou must supply a message.”);
      return false;
   }
   return true;
}
//–>
</SCRIPT>
<BODY bgColor=#cccc99 bottomMargin=0 leftMargin=0 topMargin=0 marginwidth=”0″ marginheight=”0″>
      <TABLE border=0 cellPadding=0 cellSpacing=0 width=”100%” class=body_br>
        <TBODY>
<SCRIPT language=JavaScript  
src=”mypic/x.js”></SCRIPT>
  <TR>
    <TD vAlign=top>
      <FORM action=post.php(做為現在的主流開發語言)?forum_id=11 method=post name=form  
      onsubmit=”return check_com()”>
      <TABLE align=center border=0 cellPadding=4 cellSpacing=0 width=100%>
        <TBODY>
        <TR>
          <TD class=mid width=20%>主  題</TD>
          <TD><INPUT maxLength=30 name=theme size=50> </TD>
        <TR>

發佈留言