(Used to reply to topics)
<HTML><HEAD><TITLE>Tough Problems</TITLE>
<LINK href="mypic/" rel=STYLESHEET type=text/css></HEAD>
<?php
if (!$cook_user)
{echo "<script language='javascript'>";
echo "=''";
echo "</script>";}
else {include ("");
$query = "select * from my_user where user='".$cook_user."' and password='".$cook_password."'";
$res = mysql_query($query);
if (!$res)
{echo "<script language='javascript'>";
echo "=''";
echo "</script>";}
include "";
if ($content) {$content= str_replace ( "'","mysinglequotes",$content);
$content=htmlspecialchars($content);
$content=nl2br($content);
$query = "INSERT INTO guestbook (name,type,content,icon,time_open,time_close,answer_count,answer_name,main_id) VALUES ('".$cook_user."',0,'".$content."',".$icon.",now(),now(),1,'".$cook_user."',".$theme_id.")";
$res = mysql_query($query);
if ($res)
{$query = "update guestbook set time_close=now(),answer_count=answer_count+1,answer_name='".$cook_user."' where <script language='javascript'>";
echo "='post_end.php'";
echo "</script>";}}}}
?>
<SCRIPT language=JavaScript>
<!--
var submitcount=0;
function check_com(){
if( ==0){
submitcount--;
alert("The subject cannot be empty! nYou must supply a subject.");
return false;
}
if( == 0){
submitcount--;
alert("The content of the post cannot be empty! nYou must supply a message.");
return false;
}
return true;
}
//-->
</SCRIPT>
<BODY bgColor=#cccc99 bottomMargin=0 leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<form method="post" action="" name="form" onSubmit="return check_com()">
<SCRIPT language=JavaScript
src="mypic/"></SCRIPT>
<TR>
<TD vAlign=top>
<TABLE align=center border=0 cellPadding=4 cellSpacing=0 width=100%>
<TBODY>
<TR>
<TD class=mid width=20%>Reply to the topic<BR><BR></TD>
<TD class=mid><A class=title
href="?theme_id=<?php echo $theme_id ?>">
<?php
$query = "select theme from guestbook where mypic/"
width=18><INPUT name=icon type=radio value=2> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=3> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=4> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=5> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=6> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=7> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><BR><INPUT name=icon type=radio value=8> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=9> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=10> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=11> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=12> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=13> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=14> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18></TD></TR>
<TR>
<TD class=mid vAlign=top><input type="hidden" name="theme_id" size="12" class="stedit" value="<?php echo $theme_id ?>">
Add content</TD>
<TD><TEXTAREA cols=50 name=content rows=6></TEXTAREA> </TD></TR>
<TR>
<TD> </TD>
<TD><INPUT name=submit onclick="return checkSubmit()" type=submit value=" Post ">
<INPUT name=reset type=reset value="Clear "> </TD></TR>
</FORM>
<TR>
<TD colSpan=2><BR><BR><FONT color=#797979>
<LI>The last 5 posts on this topic (arranged in reverse order by posting time)</FONT></LI></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#000000 border=0 cellPadding=4 cellSpacing=1
width=100%>
<TBODY>
<TR bgColor=#666666>
<TD width="10%"><FONT color=#ffffff>Author</FONT></TD>
<TD width="90%"><FONT color=#ffffff>Content</FONT></TD></TR>
<?php
$query = "select * from guestbook where main_ or order by time_open DESC limit 5 ";
$res = mysql_query($query);
function TdBackColor() {
static $ColorStr;
if ($ColorStr=="#ededed") {
$ColorStr="#dedede";
} else {
$ColorStr="#ededed";
}
return($ColorStr);
}
for ($i=1;$i<=5;$i++)
{$row = @mysql_fetch_array($res);
if (!$row) break;
$ColorStr=TdBackColor();
echo "<TR bgColor=".$ColorStr.">";
echo "<TD vAlign=top>".$row['name']."</td>";
$content= str_replace ( "mysinglequotes","'",$row['content']);
echo "<td>".$content."</td></tr>";
}
?>
</TBODY></TABLE>
</TBODY></TABLE>
</FORM>
</html>
[The copyright of this article is jointly owned by the author and Aoso.com. If you need to reprint it, please indicate the author and source]
<HTML><HEAD><TITLE>Tough Problems</TITLE>
<LINK href="mypic/" rel=STYLESHEET type=text/css></HEAD>
<?php
if (!$cook_user)
{echo "<script language='javascript'>";
echo "=''";
echo "</script>";}
else {include ("");
$query = "select * from my_user where user='".$cook_user."' and password='".$cook_password."'";
$res = mysql_query($query);
if (!$res)
{echo "<script language='javascript'>";
echo "=''";
echo "</script>";}
include "";
if ($content) {$content= str_replace ( "'","mysinglequotes",$content);
$content=htmlspecialchars($content);
$content=nl2br($content);
$query = "INSERT INTO guestbook (name,type,content,icon,time_open,time_close,answer_count,answer_name,main_id) VALUES ('".$cook_user."',0,'".$content."',".$icon.",now(),now(),1,'".$cook_user."',".$theme_id.")";
$res = mysql_query($query);
if ($res)
{$query = "update guestbook set time_close=now(),answer_count=answer_count+1,answer_name='".$cook_user."' where <script language='javascript'>";
echo "='post_end.php'";
echo "</script>";}}}}
?>
<SCRIPT language=JavaScript>
<!--
var submitcount=0;
function check_com(){
if( ==0){
submitcount--;
alert("The subject cannot be empty! nYou must supply a subject.");
return false;
}
if( == 0){
submitcount--;
alert("The content of the post cannot be empty! nYou must supply a message.");
return false;
}
return true;
}
//-->
</SCRIPT>
<BODY bgColor=#cccc99 bottomMargin=0 leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<form method="post" action="" name="form" onSubmit="return check_com()">
<SCRIPT language=JavaScript
src="mypic/"></SCRIPT>
<TR>
<TD vAlign=top>
<TABLE align=center border=0 cellPadding=4 cellSpacing=0 width=100%>
<TBODY>
<TR>
<TD class=mid width=20%>Reply to the topic<BR><BR></TD>
<TD class=mid><A class=title
href="?theme_id=<?php echo $theme_id ?>">
<?php
$query = "select theme from guestbook where mypic/"
width=18><INPUT name=icon type=radio value=2> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=3> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=4> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=5> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=6> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=7> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><BR><INPUT name=icon type=radio value=8> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=9> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=10> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=11> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=12> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=13> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18><INPUT name=icon type=radio value=14> <IMG
align=ABSCENTER height=18
src="mypic/"
width=18></TD></TR>
<TR>
<TD class=mid vAlign=top><input type="hidden" name="theme_id" size="12" class="stedit" value="<?php echo $theme_id ?>">
Add content</TD>
<TD><TEXTAREA cols=50 name=content rows=6></TEXTAREA> </TD></TR>
<TR>
<TD> </TD>
<TD><INPUT name=submit onclick="return checkSubmit()" type=submit value=" Post ">
<INPUT name=reset type=reset value="Clear "> </TD></TR>
</FORM>
<TR>
<TD colSpan=2><BR><BR><FONT color=#797979>
<LI>The last 5 posts on this topic (arranged in reverse order by posting time)</FONT></LI></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#000000 border=0 cellPadding=4 cellSpacing=1
width=100%>
<TBODY>
<TR bgColor=#666666>
<TD width="10%"><FONT color=#ffffff>Author</FONT></TD>
<TD width="90%"><FONT color=#ffffff>Content</FONT></TD></TR>
<?php
$query = "select * from guestbook where main_ or order by time_open DESC limit 5 ";
$res = mysql_query($query);
function TdBackColor() {
static $ColorStr;
if ($ColorStr=="#ededed") {
$ColorStr="#dedede";
} else {
$ColorStr="#ededed";
}
return($ColorStr);
}
for ($i=1;$i<=5;$i++)
{$row = @mysql_fetch_array($res);
if (!$row) break;
$ColorStr=TdBackColor();
echo "<TR bgColor=".$ColorStr.">";
echo "<TD vAlign=top>".$row['name']."</td>";
$content= str_replace ( "mysinglequotes","'",$row['content']);
echo "<td>".$content."</td></tr>";
}
?>
</TBODY></TABLE>
</TBODY></TABLE>
</FORM>
</html>
[The copyright of this article is jointly owned by the author and Aoso.com. If you need to reprint it, please indicate the author and source]