<?php ob_start(); ?> <!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>Untitled Document</title> <link type="text/css" rel="stylesheet" href="css/tabmenu2.css" /> </head> <body><div align="center"> <form name="frmMain" method="post" action=""> <table width="400" border="1" align="center" cellpadding="0" cellspacing="0"> <tr class="text7"> <td width="150" align="center">วัน-เวลา</td> <td width="150" align="center">ทีมเหย้า</td> <td width="50" align="center"> </td> <td width="150" align="center">ทีมเยือน</td> <td width="150" align="center"> </td> </tr> <tr> <? include("connectdb.php"); $strSQL = "SELECT * FROM `match` "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $intRows = 0; while($objResult = mysql_fetch_array($objQuery)) { $intRows++; ?> <td align="center" class="text2"> <input type="hidden" name="matchid" value="<?=$objResult["matchid"];?>" /><?=$objResult["matchtime"];?> : <?=$objResult["matchdate"];?> </td> <td align="center" class="text8"> <? $homenameSQL = "SELECT * FROM `team` WHERE teamid = '".$objResult["homeid"]."'"; $homenameQuery = mysql_query($homenameSQL); $homenameResult = mysql_fetch_array($homenameQuery); ?> <?=$homenameResult["teamname"];?> </td> <td align="center" class="text5"> VS</td> <td align="center" class="text5"> <? $guestnameSQL = "SELECT * FROM `team` WHERE teamid = '".$objResult["guestid"]."'"; $guestnameQuery = mysql_query($guestnameSQL); $guestnameResult = mysql_fetch_array($guestnameQuery); ?> <?=$guestnameResult["teamname"];?></span> </td> <td align="center" class="text5"> <script language="JavaScript"> function windowOpen() { var myWindow=window.open('seat.php?&matchid=<?=$objResult["matchid"];?>','windowRef','width=300,height=200'); if (!myWindow.opener) myWindow.opener = self; } </script> <span class="text5" id="openPopup" onClick="Javascript:windowOpen();" value="Get Value">จองตั๋ว</span></td> </tr> <? } ?> </table> </form>
<?php ob_start(); ?> <!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>Untitled Document</title> <link type="text/css" rel="stylesheet" href="css/tabmenu2.css" /> </head> <body><div align="center"> <form name="frmMain" method="post" action=""> <table width="400" border="1" align="center" cellpadding="0" cellspacing="0"> <tr class="text7"> <td width="150" align="center">วัน-เวลา</td> <td width="150" align="center">ทีมเหย้า</td> <td width="50" align="center"> </td> <td width="150" align="center">ทีมเยือน</td> <td width="150" align="center"> </td> </tr> <tr> <? include("connectdb.php"); $strSQL = "SELECT * FROM `match` "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $intRows = 0; while($objResult = mysql_fetch_array($objQuery)) { $intRows++; ?> <td align="center" class="text2"> <input type="hidden" name="matchid" value="<?=$objResult["matchid"];?>" /><?=$objResult["matchtime"];?> : <?=$objResult["matchdate"];?> </td> <td align="center" class="text8"> <? $homenameSQL = "SELECT * FROM `team` WHERE teamid = '".$objResult["homeid"]."'"; $homenameQuery = mysql_query($homenameSQL); $homenameResult = mysql_fetch_array($homenameQuery); ?> <?=$homenameResult["teamname"];?> </td> <td align="center" class="text5"> VS</td> <td align="center" class="text5"> <? $guestnameSQL = "SELECT * FROM `team` WHERE teamid = '".$objResult["guestid"]."'"; $guestnameQuery = mysql_query($guestnameSQL); $guestnameResult = mysql_fetch_array($guestnameQuery); ?> <?=$guestnameResult["teamname"];?></span> </td> <td align="center" class="text5"> <script language="JavaScript"> function windowOpen(matchid) { var myWindow=window.open('seat.php?&matchid='+matchid,'windowRef','width=300,height=200'); if (!myWindow.opener) myWindow.opener = self; } </script> <span class="text5" id="openPopup" onClick="Javascript:windowOpen('<?=$objResult["matchid"];?>');" value="Get Value">จองตั๋ว</span></td> </tr> <? } ?> </table> </form> ลองดูครับได้หรือเปล่า
var myWindow=window.open('seat.php?&matchid='+matchid
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง