Viewing file: show.php (22.73 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include("../include/FunctionDB.php");
include("../config.inc.php");
include("../function.php");
ConnectDB();
$sql = "SELECT * FROM personal_tb WHERE Teacher_code='$Teacher_code'";
$res = mysql_query($sql);
$rs = mysql_fetch_array($res);
?>
<html>
<head>
<title><?echo $title?></title>
<link href="../source/style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<style type="text/css">
<!--
.style2 {font-size: 16px}
.style4 {
font-size: 18px;
font-family: "MS Sans Serif";
color: #FFFFFF;
}
.style5 {font-size: 36px}
.style8 {font-family: Tahoma; font-size: 16px;}
-->
</style>
</head>
<body bgcolor=#FFFFE0 background="pic/bg2.gif" onmouseover="window.status=' <?echo $title?> '; return true";
onmouseout="window.status=' <?echo $title?> '; return true";>
<center>
<p class="style8"><font color=#9400D3>ตอบปัญหาจากข้อมูลที่แจ้งมาค่ะ</font> </p>
<p>
<?
// ติดต่อ database เพื่ออ่านข้อมูล
mysql_connect($host,$user,$passwd);
mysql_query("SET NAMES 'tis620'");
$sql = "select * from webboard_data where No='$No'";
$result = mysql_db_query($dbname,$sql);
$NRow = mysql_num_rows($result);
if($NRow==0) { echo "Error2"; exit(); }
$row = mysql_fetch_array($result);
// กำหนดค่าตัวแปร เพื่อนำไปแสดง
$Question = $row["Question"];
$Note = $row["Note"];
$Name = $row["Name"];
$Namer = $row["Namer"];
$Member = $row["Member"];
$Email = $row["Email"];
$Date = $row["Date"];
$tDate = convert_date($row["Date"]);
//$Image = $row["Image"];
$nphoto = $row["nphoto"];
$pageviewdata = $row["pageview"];
//add คนดู
mysql_query("update webboard_data set pageview=pageview+1 where No=$No");
// ตรวจสอบรูปแบบการแสดง IP Address
switch ($showIP) {
case "ALL" : $IP = "(".$row["IP"].")"; break;
case "BAN" : $IP = "(".substr($row["IP"],0,strrpos($row["IP"],".")).".*)"; break;
case "NONE": $IP = ""; break;
default : $IP = $row["IP"];
}
if($Member) {
$sql = "select * from webboard_member where User='$Name'";
$result = mysql_db_query($dbname,$sql);
$NRow = mysql_num_rows($result);
if($NRow==0) { echo "Error3"; exit(); }
$row = mysql_fetch_array($result);
// กำหนดค่าตัวแปร เพื่อนำไปแสดง
$ICQ = $row["ICQ"];
$WebName = $row["WebName"];
$URL = $row["URL"];
$picname = $row["nphoto"];
$icon = $row["icon"];
}
// แสดงข้อมูลของคำถาม(กระทู้)
echo "<table border=1 width=550 bgcolor=white bordercolor=blue cellspacing=0 cellpadding=2>\n";
echo "<tr><td align=center bgcolor=86aed2>\n";
echo "\t<font size=3 color=#FFF5EE><b>$Question </b></font>\n";
echo "</td></tr>\n";
echo "<tr><td>\n";
echo "<br>\n";
echo "\t<table border=0 width=590 align=center>\n";
echo "\t<tr><td >\n";
// ตรวจสอบว่ามีรูปหรือไม่
$picname = substr ($nphoto, -4);
if ( $picname == ".swf" ) {
echo "\t\t<div align=\"center\"><param name=movie value=photo/$nphoto ><param name=quality value=high> <embed src=photo/$nphoto quality=high type=application/x-shockwave-flash width=170 ></embed></div><br>";
}
elseif($nphoto) {
echo "\t\t<div align=\"center\"><img src=\"photo/$nphoto\" ></div><br>\n";
}
echo "\t\t<font size=2>$Note</font>\n";
echo "\t</td></tr>\n";
echo "\t</table>\n";
echo "<br>\n";
echo "</td></tr>\n";
echo "<tr><td>\n";
echo "\t<table border=0 align=center width=100%>\n";
echo "\t<tr><td align=left>\n";
if($Member){
echo "\t\t<a href=\"profile.php?Name=$Name\" target=\"$Name\"><img src=\"pic/icon_profile.gif\" border=0 alt=\"$Name's Profile\"></a>\n";
if($URL!="http://") {
echo "\t\t<a href='$URL' target='$URL'><img src=\"pic/icon_www.gif\" alt='$WebName' border=0></a>\n";
//echo "\t\t<a href='../webboard/admin.html'><img src=\"pic/icon_delete.gif\" alt='Delete' border=0></a>\n";
}
// if($ICQ) {
// echo "\t\t<img src=\"http://online.mirabilis.com/scripts/online.dll?icq=$ICQ&img=$ICQ_Image_Type"."online.gif\" alt='ICQ - $ICQ'>\n";
// }
echo "\t\t<a href='../webboard/admin.html'><img src=\"pic/del.gif\" alt='Delete' border=0></a>\n";
}
//}
echo "\t</td>\n";
echo "\t<td align=right><font size=2 face='MS Sans Serif'>\n";
// ตรวจสอบการแสดงรูปกราฟฟิกซองจดหมาย
if($icon != "000" ){
if(($Member)&&($Email!=""))
{
switch ($s_mail) {
case "1" : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
elseif($Email!="")
{
// เลือกระบบการส่งอีเมล์
switch ($s_mail)
{
case "1" : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
else {
echo "\t\tโดยคุณ $Name \n";
}
//echo "\t\t$IP\n " ;
//echo "\t\t[$tDate]\n";
//echo "\t</font></td></tr>\n";
//echo "\t</table>\n";
}
//เริ่มแก้
elseif(($Member)&&($Email!=""))
{
switch ($s_mail) {
case "1" : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
elseif($Email!="")
{
// เลือกระบบการส่งอีเมล์
switch ($s_mail)
{
case "1" : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
else {
echo "\t\tโดยคุณ $Name \n";
}
echo "\t\t$IP\n " ;
echo "\t\t[$tDate]\n";
echo "\t</font></td></tr>\n";
echo "\t</table>\n";
echo "</td></tr>\n";
echo "</table>\n";
//งสิ้นสุด
?>
<br>
<?
// ส่วนแสดงคำตอบของคำถาม(กระทู้)
$sql = "select * from webboard_ans where QuestionNo='$No' order by No ". $order;
$result = mysql_db_query($dbname,$sql);
$NRow = mysql_num_rows($result);
mysql_query("SET NAMES 'tis620'");
if($order=="ASC") $i = 1; else $i = $NRow;
if($result==0) {
echo "<b>Error4</b>";
exit();
}
// วนลูปแสดงข้อมูลที่อ่านได้
while ($row = mysql_fetch_array($result)) {
// กำหนดค่าตัวแปร เพื่อนำไปแสดง
$QuestionNo = $row["No"];
$Name = $row["Name"];
$Namer = $row["Namer"];
$Member = $row["Member"];
$Email = $row["Email"];
$Msg = $row["Msg"];
$Date = $row["Date"];
$tDate = convert_date($row["Date"]);
$Image = $row["Image"];
$nphoto = $row["nphoto"];
// ตรวจสอบรูปแบบการแสดง IP Address
switch ($showIP) {
case "ALL" : $IP = "(".$row["IP"].")"; break;
case "BAN" : $IP = "(".substr($row["IP"],0,strrpos($row["IP"],".")).".*)"; break;
case "NONE": $IP = ""; break;
default : $IP = $row["IP"];
}
if($Member) {
$sql2 = "select * from webboard_member where User='$Name'";
$result2 = mysql_db_query($dbname,$sql2);
$NRow2 = mysql_num_rows($result2);
mysql_query("SET NAMES 'tis620'");
if($NRow2==0) { echo "Error5"; exit(); }
$qrow = mysql_fetch_array($result2);
// กำหนดค่าตัวแปร เพื่อนำไปแสดง
$ICQ = $qrow["ICQ"];
$WebName = $qrow["WebName"];
$URL = $qrow["URL"];
$User = $qrow["User"];
$icon = $qrow["icon"];
}
echo "<table border=1 width=550 bordercolor=#1E90FF bgcolor=E0FFFF cellpadding=2 cellspacing=0>\n";
echo "<tr><td>\n";
echo "\t<table border=0 width=590 align=center>\n";
echo "\t<tr><td align=left>\n";
echo "\t\t<font size=2 face='MS Sans Serif'>\n";
// ตรวจสอบการแสดงรูปกราฟฟิกซองจดหมาย
if($icon != "000" ){
if(($Member)&&($Email!="")){
switch ($s_mail) {
case "1" : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
elseif($Email!="") {
// เลือกระบบการส่งอีเมล์
switch ($s_mail) {
case "1" : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
else {
echo "\t\t โดยคุณ $Name \n";
}
//echo "\t\t$IP\n";
//echo "\t\t[$tDate] $QuestionNo ($i/$NRow)\n";
//echo "\t\t</font>\n";
//echo "\t</td>\n";
//งเริ่มแก้
}else if(($Member)&&($Email!="")){
switch ($s_mail) {
case "1" : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
elseif($Email!="") {
// เลือกระบบการส่งอีเมล์
switch ($s_mail) {
case "1" : echo "\t\tโดยคุณ <a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me$No\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
case "2" : echo "\t\tโดยคุณ <a href=mailto:$Email>$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n"; break;
default : echo "\t\tโดยคุณ <img src='../webboard/pic/avatar/$icon' border=0><a href=\"mail2me.php?wemail=$Email&name=$Name&question=$Question\" target=\"mail2me\">$Name <img src='../webboard/pic/email.gif' border=0 alt='Mail to $Name'></a> \n";
}
}
else {
echo "\t\t โดยคุณ $Name \n";
}
echo "\t\t$IP\n";
echo "\t\t[$tDate] #$QuestionNo ($i/$NRow)\n";
echo "\t\t</font>\n";
echo "\t</td>\n";
//งแก้ถึงตรงนี้
echo "\t<td align=right>\n";
if($Member){
echo "\t\t<a href=\"profile.php?Name=$Name\" target=\"$Name\"><img src=\"pic/profile.gif\" border=0 alt=\"$Name's Profile\"></a>\n";
if($URL!="http://") {
echo "\t\t<a href='$URL' target='$URL'><img src=\"pic/home.gif\" alt='$WebName' border=0></a>\n";
}
if($ICQ) {
echo "\t\t<img src=\"http://online.mirabilis.com/scripts/online.dll?icq=$ICQ&img=$ICQ_Image_Type"."online.gif\" alt='ICQ - $ICQ'>\n";
}
}
echo "\t</td>\n";
echo "\t</tr></table>\n";
echo "\t<table border=0 width=590 align=center>\n";
echo "\t<tr><td>\n";
// ตรวจสอบว่ามีรูปหรือไม่
$picname = substr ($nphoto, -4);
if ( $picname == ".swf" ) {
echo "\t\t<div align=\"center\"><param name=movie value=photo/$nphoto ><param name=quality value=high> <embed src=photo/$nphoto quality=high type=application/x-shockwave-flash width=170 ></embed></div><br>\n";
}
/* if($nphoto) {
echo "\t\t<div align=\"center\"><img src=\"photo/$nphoto\" ></div><br>\n";
}*/
elseif($nphoto) {
echo "\t\t<div align=\"center\"><img src=\"photo/$nphoto\" ></div><br>\n";
}
echo "<br>";
echo "\t\t<font size=2 face='MS Sans Serif'>$Msg</font>\n";
echo "\t</td></tr>\n";
echo "\t</table>\n";
echo "</td></tr>\n";
echo "</table>\n\n";
echo "<br><hr color=FF1493 width=600><br>\n\n";
if($order=="ASC") $i++; else $i--;
}
?>
<? // ฟอร์มรับข้อมูลของคำตอบ ?>
</p>
<form method=post action="reply.php?Teacher_code=<? echo $Teacher_code;?>&No=<? echo $No ?>" name="webForm" onSubmit="return check()" ENCTYPE="multipart/form-data">
<div align="center">
<table width="590" border=1 cellpadding=2 cellspacing=0 bordercolor=#FF8C00 bgcolor=#FFDEAD>
<tr bgcolor=000000>
<td width="507" height="31" align=center background="pic/bgi.gif" bgcolor="#FFCC00"><div align="center" class="style5">
<div align="left"><span class="style4"><font bgcolor=000000> <img src="pic/reply.gif" width="94" height="30" class="style2"></font></span></div>
</div></td>
</tr>
<tr>
<td><table width="530" border=0 align="center">
<tr>
<td width="87" align=right valign=top class="style2">ความคิดเห็น</td>
<td width="372" size=30%><textarea name="Msg" cols=70 rows= 6></textarea></td>
</tr>
<tr>
<td align=right class="style2">โดย </td>
<td><input name="MsgBy" type=text value="<? echo $rs[Teacher_name];?> <? echo $rs[Teacher_lastname];?>" size=20 maxlength=50>
Password
<input type=password name="QPass" size=20 maxlength=10>
<font color=red>(สำหรับสมาชิก)</font></td>
</tr>
<tr>
<td align=right height="23">Email </td>
<td height="23"><input size=25 type=text name="Email" maxlength=50>
<font color=red> (สมาชิกไม่ต้องใส่)</font> </td>
</tr>
<tr e0ffff >
<td align=center colspan="2"><a href="javascript:setImage()"><img src="pic/tree.gif" border=0 alt="แทรกรูป"></a> <a href="javascript:setsmile('[---]')"><img src="pic/indent.gif" border=0 alt="ย่อหน้า"></a> <a href="javascript:setBold()"><img src="pic/b.gif" border=0 alt="ตัวหนา"></a> <a href="javascript:setsup()"><img src="pic/sup.gif" border=0 alt="ตัวยก"></a> <a href="javascript:setsub()"><img src="pic/sub.gif" border=0 alt="ตัวห้อย"></a> <a href="javascript:setglow()"><img src="pic/glow.gif" border=0 alt="ตัวหนังสือเรืองแสง"></a> <a href="javascript:setshadow()"><img src="pic/shadow.gif" border=0 alt="ตัวหนังสือมีเงา"></a> <a href="javascript:setItalic()"><img src="pic/i.gif" border=0 alt="ตัวเอียง"></a> <a href="javascript:setUnderline()"><img src="pic/u.gif" border=0 alt="เส้นใต้"></a> <a href="javascript:setColor('red','แดง')"><img src="pic/redcolor.gif" border=0 alt="สีแดง"></a> <a href="javascript:setColor('green','เขียว')"><img src="pic/greencolor.gif" border=0 alt="สีเขียว"></a> <a href="javascript:setColor('blue','น้ำเงิน')"><img src="pic/bluecolor.gif" border=0 alt="สีน้ำเงิน"></a> <a href="javascript:setColor('orange','ส้ม')"><img src="pic/orangecolor.gif" border=0 alt="สีส้ม"></a> <a href="javascript:setColor('pink','ชมพู')"><img src="pic/pinkcolor.gif" border=0 alt="สีชมพู"></a> <a href="javascript:setColor('gray','เทา')"><img src="pic/graycolor.gif" border=0 alt="สีเทา"></a> </td>
</tr>
</table></td>
</tr>
<tr>
<td align=center background="pic/bgi.gif"><a href="javascript:setsmile(':smile:')"><img src="pic/smile.gif" border=0></a> <a href="javascript:setsmile(':sad:')"><img src="pic/frown.gif" border=0></a> <a href="javascript:setsmile(':red:')"><img src="pic/redface.gif" border=0></a> <a href="javascript:setsmile(':big:')"><img src="pic/biggrin.gif" border=0></a> <a href="javascript:setsmile(':ent:')"><img src="pic/blue.gif" border=0></a> <a href="javascript:setsmile(':shy:')"><img src="pic/shy.gif" border=0></a> <a href="javascript:setsmile(':sleepy:')"><img src="pic/sleepy.gif" border=0></a> <a href="javascript:setsmile(':sun:')"><img src="pic/sunglasses.gif" border=0></a> <a href="javascript:setsmile(':sg:')"><img src="pic/supergrin.gif" border=0></a> <a href="javascript:setsmile(':embarass:')"><img src="pic/embarass.gif" border=0></a> <a href="javascript:setsmile(':dead:')"><img src="pic/dead.gif" border=0></a> <a href="javascript:setsmile(':cool:')"><img src="pic/cool.gif" border=0></a> <a href="javascript:setsmile(':clown:')"><img src="pic/clown.gif" border=0></a> <a href="javascript:setsmile(':pukey:')"><img src="pic/pukey.gif" border=0></a> <a href="javascript:setsmile(':eek:')"><img src="pic/eek.gif" border=0></a><br>
<a href="javascript:setsmile(':roll:')"><img src="pic/sarcblink.gif" border=0></a> <a href="javascript:setsmile(':smoke:')"><img src="pic/smokin.gif" border=0></a> <a href="javascript:setsmile(':angry:')"><img src="pic/reallymad.gif" border=0></a> <a href="javascript:setsmile(':confused:')"><img src="pic/confused.gif" border=0></a> <a href="javascript:setsmile(':cry:')"><img src="pic/crying.gif" border=0></a> <a href="javascript:setsmile(':lol:')"><img src="pic/lol.gif" border=0></a> <a href="javascript:setsmile(':yawn:')"><img src="pic/yawn.gif" border=0></a> <a href="javascript:setsmile(':devil:')"><img src="pic/devil.gif" border=0></a> <a href="javascript:setsmile(':tongue:')"><img src="pic/tongue.gif" border=0></a> <a href="javascript:setsmile(':alien:')"><img src="pic/aysmile.gif" border=0></a> <a href="javascript:setsmile(':tasty:')"><img src="pic/tasty.gif" border=0></a> <a href="javascript:setsmile(':crazy:')"><img src="pic/grazy.gif" border=0></a> <a href="javascript:setsmile(':h:')"><img src="pic/h.gif" border=0></a> <a href="javascript:setsmile(':true:')"><img src="pic/true.gif" border=0></a> <a href="javascript:setsmile(':false:')"><img src="pic/false.gif" border=0></a> <br>
<font color=blue>คลิกที่รูป เพื่อแทรกรูปลงในข้อความ</font> </td>
</tr>
<tr>
<td align=center colspan=2><table border=0>
<tr>
<td align=left>
<tr>
<td align=center> เลือกรูป <?echo " ขนาดห้ามเกิน ". $Image_msg ?>
<input type="file" name="QPic">
</td>
<td ><input style="HEIGHT: 17pt" onClick="window.open(webForm.QPic.value,'preview','toolbar=0,location=0,directories=0,status=0,menubar=0,height=400,width=500,scrollbars=1,resizeable=1');" type="button" value="View" name="button">
</td>
</tr>
</table>
</tr>
</table>
</div>
<br>
<input type=submit value="Post " name="submit">
<input type=reset value="Clear" name="reset">
</form>
<font size=2 face="MS Sans Serif">
[ <a href="../webboard/addmember.php?Category=<? echo $Category; ?>&page=<? echo $page; ?>">สมัครสมาชิก</a> |
<a href="javascript:window.close()">ปิดหน้าต่างนี้</a> ]
</font>
<hr color=1E90FF width=600>
</center>
<script language="JavaScript">
function check()
{
var v1 = document.webForm.Msg.value;
var v2 = document.webForm.MsgBy.value;
if ( v1.length==0)
{
alert("กรุณาป้อนรายละเอียด");
document.webForm.Msg.focus();
return false;
}
else if (v2.length==0)
{
alert("กรุณาป้อนชื่อ");
document.webForm.MsgBy.focus();
return false;
}
else
return true;
}
function setImage()
{
var temp = window.prompt('ใส่ URL ของรูปที่คุณต้องการให้แสดงในคำตอบของคุณ','http://');
if(temp) setsmile('[img]'+temp+'[/img]');
}
function setURL()
{
var temp = window.prompt('ใส่ URL ที่คุณต้องการสร้างเป็นลิงค์','http://');
if(temp) setsmile('[url]'+temp+'[/url]');
}
function setImage()
{
var temp = window.prompt('ใส่ URL ของรูปที่คุณต้องการให้แสดงในคำตอบของคุณ','http://');
if(temp) setsmile('[img]'+temp+'[/img]');
}
function setBold()
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการทำเป็นตัวหนา','');
if(temp) setsmile('[b]'+temp+'[/b]');
}
function setsup()
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการทำเป็นตัวยก','');
if(temp) setsmile('[sup]'+temp+'[/sup]');
}
function setsub()
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการทำเป็นตัวห้อย','');
if(temp) setsmile('[sub]'+temp+'[/sub]');
}
function setglow()
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการทำเป็นตัวเรืองแสง','');
if(temp) setsmile('[glow]'+temp+'[/glow]');
}
function setshadow()
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการทำเป็นตัวเรืองแสง','');
if(temp) setsmile('[shadow]'+temp+'[/shadow]');
}
function setItalic()
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการทำเป็นตัวเอียง','');
if(temp) setsmile('[i]'+temp+'[/i]');
}
function setUnderline()
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการให้มีเส้นใต้','');
if(temp) setsmile('[u]'+temp+'[/u]');
}
function setColor(color,name)
{
var temp = window.prompt('ใส่ข้อความที่คุณต้องการให้เป็นสี'+name,'');
if(temp) setsmile('[color='+color+']'+temp+'[/color]');
}
function setsmile(what)
{
document.webForm.Msg.value = document.webForm.elements.Msg.value+" "+what;
document.webForm.Msg.focus();
}
</script>
</body>
</html>
|