|
|
|
ติดตรง java ผมอยากให้มันมีป็อบอัพแจ้งแยกกันอะคับตรง (form ฟอร์มของเว็บบอร์ด) กับ (form2 ฟอร์มล็อกอินแอดมิน) |
|
|
|
|
|
|
|
ติดตรง java ผมอยากให้มันมีป็อบอัพแจ้งแยกกันอะคับตรง (form ฟอร์มของเว็บบอร์ด) กับ (form2 ฟอร์มล็อกอินแอดมิน)
ปัญหาคือ เวลาเราใส่ข้อมูลไม่ครบตรงฟอร์ม (form ฟอร์มของเว็บบอร์ด) มันจะเตือนที่ไปที่ (form2 ฟอร์มล็อกอินแอดมิน)
อยากทราบวิธีแก้ปัญครับ ขอบคุรครับ
Code (PHP)
<?
// ------------- Êèǹ·Õè 1 -------------
$year=date('Y');
$month=date('m');
$mkdate=mktime(0,0,0, $month, 1, $year);
$full_month=date('F',$mkdate);
$weekday=date('w',$mkdate);
$last_days=date('t',$mkdate);
$day=1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>user webbroad</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
color: #666;
background-image: url(/images/BG23.jpg);
}
#webbroad {
font-size: 16px;
}
.user {
color: #09F;
}
.o {
color: #F00;
}
-->
</style>
</head>
<body>
<table width="1120" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#FFFFFF">
<td><table width="1120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="/images/BG1.jpg" width="1121" height="117" /></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12%" align="left" valign="top"><img src="/images/BG2.jpg" width="133" height="250" /></td>
<td width="81%" align="left" valign="top"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="965" height="250">
<param name="movie" value="/images/banner.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="/Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="/images/banner.swf" width="965" height="250">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="/Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object></td>
<td width="7%" align="left" valign="top"><img src="/images/BG4.jpg" width="23" height="250" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7%" align="left" valign="top"><img src="/images/BG2.jpg" width="133" height="67" /></td>
<td width="60%" align="left" valign="top"><img src="/images/BG5.jpg" alt="" width="965" height="67" border="0" usemap="#MapMap" />
<map name="MapMap" id="MapMap">
<area shape="rect" coords="8,17,154,57" href="index.php" target="_self" />
<area shape="rect" coords="177,17,313,58" href="index_product.php" target="_self" />
<area shape="rect" coords="347,18,574,60" href="index_history.php" />
<area shape="rect" coords="617,19,762,57" href="index_contact.php" />
<area shape="rect" coords="798,22,949,56" href="index_webbroad.php" />
</map>
<map name="MapMap" id="MapMap">
<area shape="rect" coords="8,17,154,57" href="index.php" target="_self" />
<area shape="rect" coords="177,17,313,58" href="index_product.php" target="_self" />
<area shape="rect" coords="347,18,574,60" href="#" />
<area shape="rect" coords="615,20,760,58" href="#" />
<area shape="rect" coords="798,22,949,56" href="#" />
</map>
<map name="Map" id="Map">
<area shape="rect" coords="8,17,154,57" href="index.php" target="_self" />
<area shape="rect" coords="177,17,313,58" href="index_product.php" target="_self" />
<area shape="rect" coords="347,18,574,60" href="#" />
<area shape="rect" coords="615,20,760,58" href="#" />
<area shape="rect" coords="798,22,949,56" href="#" />
</map></td>
<td width="33%"><img src="/images/BG4.jpg" width="23" height="67" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="94%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%" align="left" valign="top"><img src="/images/BG2.jpg" alt="" width="133" height="94" /></td>
<td width="64%"><img src="/images/BG29.jpg" width="965" height="91" /></td>
<td width="33%" align="left" valign="top"><img src="/images/BG4.jpg" alt="" width="23" height="94" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6%" align="left" valign="top"><img src="/images/BG2.jpg" alt="" width="133" height="870" /></td>
<td width="44%" align="left" valign="top"><table width="644" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="628" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" align="left" valign="top"><img src="/images/BG24.jpg" width="645" height="44" /></td>
</tr>
<tr>
<td width="18" align="left" valign="top"><img src="/images/BG9.jpg" width="18" height="700" /></td>
<td width="607" align="left" valign="top"><table width="607" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><? include 'admin_question.php'?></td>
</tr>
<tr>
<td> </td>
</tr>
<tr><script language="javascript">
function check()
{
if(document.form.title_ques.value == "")
{
alert('กรุณากรอก หัวเรื่อง ด้วยครับ');
document.form.title_ques.focus();
return false;
}
else if(document.form.detail_ques.value == "")
{
alert('กรุณากรอก รายละเอียด ด้วยครับ');
document.form.detail_ques.focus();
return false;
}
else if(document.form.name_ques.value == "")
{
alert('กรุณากรอก รายละเอียด ด้วยครับ');
document.form.name_ques.focus();
return false;
}
else if(document.form.email_ques.value == "")
{
alert('กรุณากรอก รายละเอียด ด้วยครับ');
document.form.email_ques.focus();
return false;
}
document.form.submit();
}
</script>
<td><form id="form" onSubmit="JavaScript:return check();" name="form" method="post" action="index_webbroad_add.php">
<TABLE width="606" BORDER="0" BGCOLOR="#ffffff">
<TR>
<TD colspan="2"><strong>; : ตั้งกระทู้ได้ที่นี้ครับ : :</strong></TD>
</TR>
<TR>
<TD width="86">คำถาม :</TD>
<TD width="442"><INPUT TYPE="text" NAME="title_ques" SIZE="60"> *</TD>
</TR>
<TR>
<TD>รายละเอียด : </TD>
<TD><textarea name="detail_ques" rows="5" cols="62"></textarea>
*</TD>
</TR>
<TR>
<TD>ชื่อ : </TD>
<TD><INPUT NAME="name_ques" TYPE="text" size="60"> *</TD>
</TR>
<TR>
<TD>อีเมล์ :</TD>
<TD><INPUT NAME="email_ques" TYPE="text" size="60"> * </TD>
</TR>
</TABLE>
<INPUT name="444" TYPE="submit" id="444" VALUE="Submit">
<INPUT TYPE="reset" VALUE="Reset">
</FORM></td>
</tr>
</table></td>
<td width="20"><img src="/images/BG25.jpg" width="20" height="700" /></td>
</tr>
<tr>
<td colspan="3" align="left" valign="top"><img src="/images/BG20.jpg" alt="" width="645" height="14" /></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="25%" align="left" valign="top"><table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="377"><table width="304" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" align="left" valign="top"><img src="/images/BG8.jpg" width="319" height="44" /></td>
</tr>
<tr>
<td width="13" align="left" valign="top"><img src="/images/BG12.jpg" width="12" height="100" /></td>
<td width="289" align="left" valign="top"><table width="289%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="289" border="0" cellspacing="0" cellpadding="0">
<tr>
<script language="javascript">
function check()
{
if(document.form2.user.value == "")
{
alert('.ใส่ Username ด้วยครับ');
document.form2.user.focus();
return false;
}
else if(document.form2.pass.value == "")
{
alert('ใส่ Password ด้วยครับ');
document.form2.pass.focus();
return false;
}
document.form2.submit();
}
</script>
<td><form id="form2"onSubmit="JavaScript:return check();" name="form2" method="post" action="index_check_admin.php">
<TABLE WIDTH="280
" >
<TR>
<TD><DIV ALIGN="center"><span class="user"><B>Username</B></span><B> :</B> </DIV></TD>
<TD><INPUT NAME="user" TYPE="text" size="20" maxlength="30"> <span class="o">*</span></TD>
</TR>
<TR>
<TD><DIV ALIGN="center" class="user"><B>Password : </B></DIV></TD>
<TD><INPUT NAME="pass" TYPE="password" size="20" maxlength="30"> <span class="o">* </span></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" VALUE="Login">
<INPUT TYPE="reset" VALUE="Reset Password">
</TD>
</TR>
</TABLE>
</FORM></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="18" align="left" valign="top"><img src="/images/BG15.jpg" width="19" height="100" /></td>
</tr>
<tr>
<td colspan="3"><img src="/images/BG17.jpg" width="319" height="53" /></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="304" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13" align="left" valign="top"><img src="/images/BG12.jpg" alt="" width="12" height="170" /></td>
<td width="289" align="center" valign="top"><table width="280%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="280" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="287" border="0">
<tr bgcolor="#BBBBBB">
<td colspan="7">
<center><b><? echo "$full_month $year"; ?></b><center>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>Sun</td>
<td>Mon</td>
<td>Tue</td>
<td>Wed</td>
<td>Thu</td>
<td>Fri</td>
<td>Sat</td>
</tr>
<tr>
<?
// ------------- Êèǹ·Õè 2 -------------
$start= 1;
while ($start<= $weekday) {
echo "<td> </td>";
$start++;
}
// ------------- Êèǹ·Õè 3 -------------
$weekday++;
while ($day<=$last_days) {
if (date("d")==$day) {
echo "<td bgcolor='#BBBBBB'>$day</td>";
} else {
echo "<td>$day</td>";
}
if ($weekday==7 and $day<>$last_days) {
echo '</tr><tr>';
$weekday=0;
}
$day++;
$weekday++;
}
// ------------- Êèǹ·Õè 4 -------------
while ($weekday <= 7) {
echo "<td> </td>";
$weekday++;
}
?>
</tr>
</table></td>
</tr>
<tr>
<td></td>
</tr>
</table></td>
<td width="18" align="left" valign="top"><img src="/images/BG15.jpg" alt="" width="19" height="170" /></td>
</tr>
<tr>
<td colspan="3"><img src="/images/BG21.jpg" width="319" height="57" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="304" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13" align="left" valign="top"><img src="/images/BG12.jpg" alt="" width="12" height="217" /></td>
<td width="289" align="left" valign="top"><table width="280%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="280" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><FORM ACTION="admin_mail_add.php" METHOD="POST" id="form2">
<TABLE>
<TR>
<TD class="user">To </TD>
<TD><INPUT TYPE="text" NAME="to_send">
<span class="o">* </span></TD></TR>
<TR>
<TD class="user">Subject </TD>
<TD><INPUT TYPE="text" NAME="subject_send">
<span class="o">* </span></TD></TR>
<TR>
<TD class="user">Messages </TD>
<TD><TEXTAREA NAME="messages_send" ROWS="5" COLS="25"></TEXTAREA></TD></TR>
<TR>
<TD class="user">From </TD>
<TD><INPUT TYPE="text" NAME="from_send">
<span class="o">*</span></TD></TR>
</TABLE>
<input type="submit" value="Sent" />
<INPUT TYPE="reset" VALUE="Reset">
</FORM></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="18" align="left" valign="top"><img src="/images/BG15.jpg" alt="" width="19" height="217" /></td>
</tr>
<tr>
<td colspan="3" align="left" valign="top"><img src="/images/BG22.jpg" width="319" height="10" /></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="25%" align="left" valign="top"><img src="/images/BG4.jpg" alt="" width="23" height="870" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8%" align="left" valign="top"><img src="/images/BG2.jpg" alt="" width="133" height="100" /></td>
<td width="59%" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="/images/BG19.jpg" alt="" width="965" height="25" /></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="33%" align="left" valign="top"><img src="/images/BG4.jpg" alt="" width="23" height="100" /></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</body>
</html>
Tag : PHP, HTML/CSS, Action Script
|
|
|
|
|
|
Date :
2011-08-10 10:24:10 |
By :
boybekuru |
View :
815 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เขียนแยก function กันครับ ตรง onSubmit="JavaScript:return check();"
|
|
|
|
|
Date :
2011-08-10 15:06:02 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
งง คับช่วยให้่เขียนให้ดูซํกนิดได้ไหมคับ อีกนิดคับผม ยัง งง
|
|
|
|
|
Date :
2011-08-15 13:02:43 |
By :
boybekuru |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|