|
|
|
สอนวิธีการวนลูปตารางแบบแยก 2 ตาราง ตามแบบนี้หน่อยนะค่ะ พี่ ๆ ใจดี (มีรูปประกอบค่ะ) |
|
|
|
|
|
|
|
มันก็ไม่น่าจะยากน่ะครับ สำคัญอยู่ที่การเขียน SQL นี่แหละครับ ส่วนการนำข้อมูลมาแสดงในบทเรียนมีให้ดูเยอะมากครับ
|
|
|
|
|
Date :
2011-05-09 17:32:49 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองทำแล้วค่ะ แต่มันไม่แสดงผล มันงง ๆ ทำยังไงก็ขึ้นแค่ตารางเดียว แต่รวมทุกช่วงเวลาเอาไว้
เพิ่งหัดทำอ่ะค่ะ ใครก็ได้ช่วยแนะนำที
นี้โค้ดนะค่ะ
Code (PHP)
<?
session_start();
ob_start();
require_once('../Connections/panfan.php');
?>
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = ""; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #333333}
.style4 {color: #FFFFFF}
.style5 {
font-size: 13px;
color: #3366FF;
font-family: "Microsoft Sans Serif", Tahoma;
}
.style6 {font-weight: bold}
.style8 {
font-family: MS Sans Serif;
color: #FFFFFF;
font-size: 13px;
font-weight: bold;
}
-->
</style>
<p align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<?
$dd=date("Ymdhis");
if($funtion=='add'){
$a_dsp = sprintf("INSERT INTO domes_sprice (id_sdomes, id_domes_ref, id_val_domes_ref, id_hotel_ref,1a, 2_3a, 4_9a) VALUES ('0', '%s', '%s', '%s', '%s','%s', '%s')",
GetSQLValueString($_POST['id_domes_ref'], "int"),
GetSQLValueString($_POST['id_val_domes_ref'], "int"),
GetSQLValueString($_POST['id_hotel_ref'], "int"),
GetSQLValueString($_POST['1a'], "float"),
GetSQLValueString($_POST['2_3a'], "float"),
GetSQLValueString($_POST['4_9a'], "float"));
$result1 = mysql_query($a_dsp) or die(mysql_error());
echo"<br><br>ทำการเพิ่มข้อมูลแล้วครับ<meta http-equiv=refresh content=0;URL=?page_a=$page_a >";
echo $a_dsp ;
} else if($funtion=='edit'){
$e_sdomes = sprintf("UPDATE domes_sprice SET `id_domes_ref`=%s, `id_val_domes_ref`=%s,`id_area_ref`=%s,`id_hotel_ref`=%s,`incl`=%s, `1a`=%s,`2_3a`=%s, `4_9a`=%s WHERE id_sdomes=%s",
GetSQLValueString($_POST['id_domes_ref'], "int"),
GetSQLValueString($_POST['id_val_domes_ref'], "int"),
GetSQLValueString($_POST['id_hotel_ref'], "int"),
GetSQLValueString($_POST['incl'], "text"),
GetSQLValueString($_POST['1a'], "float"),
GetSQLValueString($_POST['2_3a'], "float"),
GetSQLValueString($_POST['4_9a'], "float"),
GetSQLValueString($_GET['id'], "int"));
$result1 = mysql_query($e_sdomes) or die(mysql_error());
echo"<br><br>ทำการแก้ไขข้อมูลแล้วครับ <meta http-equiv=refresh content=0;URL=?page_a=$page_a >";
}
else if($funtion=='dele'){
$sql="delete from domes_sprice where id_sdomes='$id'";
$db_query=mysql_query($sql);
print "<br><br>ทำการลบข้อมูลแล้วครับ<meta http-equiv=refresh content=0;URL=?page_a=$page_a >";
?>
</span></font></p>
<div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<? } else if($funtion=='form'){?>
</p>
</div>
<span class="txtblue01"><strong>ระบบจัดการ Domestic Package</strong> Saling Price <br />
<br>
</div>
</span>
<table width="98%" border="0" cellpadding="2" cellspacing="1">
<?
if($f_edit=='f_edit')
{
$sql=mysql_query("select * from domes_sprice where id_sdomes='$id'");
$result2=mysql_fetch_array($sql);
$sql_showo = mysql_query("select name from domestic where id_domes='".$result2['id_domes_ref']."' ");//แสดงชื่อโรงแรมใน edit
$result3=mysql_fetch_array($sql_showo);
//$str = str_replace(chr(132), '"', $l['z_name']); // baseline double quote
echo"<form name=\"form2\" method=\"post\" action=\"?page_a=$page_a&funtion=edit&id=".$result2['id_sdomes']."\" enctype=\"multipart/form-data\">";}
else
{echo"<form name=\"form2\" method=\"post\" action=\"?page_a=$page_a&funtion=add&id=".$id."\" enctype=\"multipart/form-data\">";}
?>
<tr bgcolor="#DFDFDF">
<td height="26" colspan="2" bgcolor="#73B3F2" class="txt12gray"><div align="center" class="style5"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><span class="style3">
<?
if($f_edit=='f_edit') {echo"แก้ไข";}
else {echo"เพิ่ม Domestic Saling Price";}
?>
</span></font></div></td>
</tr>
<?
if(isset($_GET['domestic']) or (isset($_GET['idd']))){
if(isset($_GET['domestic'])){
$domestic= $_GET['domestic'];}
if(isset($_GET['idd'])){
$domestic= $_GET['idd'];}
$sql_show_domes = mysql_query("SELECT * FROM domestic WHERE id_domes= '$domestic' ");
$result_o = mysql_fetch_array($sql_show_domes);
}
?>
<tr>
<td width="40%" align="center" valign="middle" bgcolor="#3399FF" class="txt12gray"><strong class="txt13yellow">Package</strong></td>
<td width="60%"bgcolor=""><div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<input name="id_domes_ref" type="text" id="id_domes_ref" value="
<? if(isset($_GET['domestic'])){echo"".$result_o['name']."";}?>
<? if($f_edit=='f_edit') {echo"".$result3['name']."";}?>" size="75" disabled />
<input type="hidden" name="id_domes_ref" id="id_domes_ref" value="<? echo "".$result_o['id_domes']."";?>" />
</font></div></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#3399FF" class="txt13Syellow"><strong class="txt13yellow">Validity</strong></td>
<? if($f_edit !='f_edit') { ?>
<td><select name="id_val_domes_ref">
<?php
$sql_show_val=mysql_query("SELECT * FROM domes_val WHERE id_domes_ref = '$domestic' order by val_name_domes asc");
$num_rows_val=mysql_num_rows($sql_show_val);
$no_val=1;
while($val=mysql_fetch_array($sql_show_val)){
if($no_val==1){
?>
<option value="">--- กรุณาเลือก Validity ---</option>
<?php }
$id_dval= $val[id_val_domes];// val
$name_dval = $val[val_name_domes];
?>
<option value="<?php echo "$id_dval"; ?>"
<?php
if($id_dval==$id) {echo"selected";}?>> <? echo "$name_dval"; ?></option>
<?php $no_val++; } ?>
</select></td>
<? } ?>
<? if($f_edit=='f_edit') {
$sql_vn = mysql_query("SELECT val_name_domes FROM domes_val WHERE id_val_domes ='".$result2['id_val_domes_ref']."' ");
$result_vn = mysql_fetch_array($sql_vn);
?>
<td width="47%" bgcolor=""><div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<input name="id_out2" type="text" id="id_out" value="
<? if($f_edit=='f_edit') {echo"".$result_vn['val_name_domes']."";}?>" size="75" disabled />
<input type="hidden" name="id_val_domes_ref" id="id_val_domes_ref" value="<? echo "".$result2['id_val_domes_ref']."";?>" />
</font></div></td>
<? } ?>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#3399FF" class="txt13Syellow"><strong class="txt13yellow"> โรงแรม & รีสอร์ท</strong></td>
<? if($f_edit !='f_edit') { ?>
<td><select name="id_hotel_ref">
<?php
$sql_domes = mysql_query("SELECT * FROM domestic ") ;
$result_doms = mysql_fetch_array($sql_domes) ;
$sql_show_hotel=mysql_query("SELECT * FROM hotel WHERE id_area_ref = '".$result_doms['id_area_ref']."' order by name asc");
$num_rows_hotel=mysql_num_rows($sql_show_hotel);
$no_hotel=1;
while($hotel=mysql_fetch_array($sql_show_hotel)){
if($no_hotel==1){
?>
<option value="">--- กรุณาเลือกโรงแรม & รีสอร์ท ---</option>
<?php }
$id_hotel= $hotel[id_hotel];// val
$name_hotel = $hotel[name];
?>
<option value="<?php echo "$id_hotel"; ?>"
<?php
if($id_hotel==$id) {echo"selected";}?>> <? echo "$name_hotel"; ?></option>
<?php $no_hotel++; } ?>
</select></td>
<? } ?>
<? if($f_edit=='f_edit') {
$sql_ht = mysql_query("SELECT name FROM hotel WHERE id_hotel ='".$result2['id_hotel_ref']."' ");
$result_ht = mysql_fetch_array($sql_ht);
?>
<td width="47%" bgcolor=""><div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<input name="id_hot2" type="text" id="id_hot2" value="
<? if($f_edit=='f_edit') {echo"".$result_ht['name']."";}?>" size="75" disabled />
<input type="hidden" name="id_hotel_ref" id="id_val_domes_ref" value="<? echo "".$result2['id_hotel_ref']."";?>" />
</font></div></td>
<? } ?>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#3366FF" class="txt13yellow"><strong class="txt13yellow">ลักษณะการเข้าพัก</strong></td>
<td align="center" valign="middle" bgcolor="#3366FF" class="txt11yellow"><strong class="txt13yellow">ราคา</strong></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#3399FF" class="txt13yellow">ผู้ใหญ่ </td>
<td ><input name="1a" type="text" id="1a" value="<?php if($f_edit=='f_edit') {echo"".$result2['1a']."";}?>" size="25" /></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#3399FF" class="txt12gray"><span class="txt13yellow">เด็กอายุ 2 - 13 ปี ไม่มีเตียงเสริม</span></td>
<td bgcolor=""><input name="2_3a" type="text" id="2_3a" value="<?php if($f_edit=='f_edit') {echo"".$result2['2_3a']."";}?>" size="25" /></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#3399FF" class="txt12gray"><span class="txt13yellow">เด็กอายุ 2 - 13 ปี ่มีเตียงเสริม</span></td>
<td bgcolor=""><input name="4_9a" type="text" id="4_9a" value="<?php if($f_edit=='f_edit') {echo"".$result2['4_9a']."";}?>" size="25" /></td>
</tr>
<tr bgcolor="#DFDFDF">
<td colspan="3" bgcolor="#73B3F2"><div align="center"> <font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<?
if($f_edit=='f_edit') {echo"<input type=\"submit\" name=\"Submit\" value=\"แก้ไข\">";}
else {echo"<input type=\"submit\" name=\"Submit\" value=\"เพิ่ม Saling Price\">";}
?>
</font></div></td>
</tr>
<? echo"</form>"; ?>
</table>
<table width="98%" border="0" cellpadding="2" cellspacing="1"><tr><td > </td>
</tr>
</table>
<div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><br>
<? } else {?>
<div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
</font> <span class="txtblue01"><strong>ระบบจัดการ Domestic Package Saling Price</strong></span><br />
<br>
</div>
<table width="98%" border="0" cellpadding="3" cellspacing="1">
<form name="form1s"><tr>
<td colspan="9" bgcolor="#F0F8FF">
<font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<div align="center" class="txt12gray style1"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<select name="id_out" onChange="MM_jumpMenu('parent',this,0)">
<option value="?page_a=<? echo $page_a?>"> --- เลือก Package --- </option>
<?
$sql_jump = "SELECT * FROM domestic order by name asc";
$query_jump = mysql_query($sql_jump) or die("select error = $sql_jump");
$num_jump = mysql_num_rows($query_jump);
for($i=1;$i<=$num_jump;$i++)
{
$row_jump = mysql_fetch_array($query_jump);
?>
<option value="?page_a=<? echo $page_a?>&domestic=<?=$row_jump['id_domes']?>" <? if($row_jump['id_domes']==$_GET['domestic']){ echo "selected"; } ?>>
<?=$row_jump['name']?>
</option>
<?
}
?>
</select>
</font>[ <a href="?page_a=<? echo "$page_a";?>">ดูทั้งหมด</a> ]</div> </tr>
</form>
<?
$Per_Page = 20;
if ( !$Page )
$Page = 1;
$Prev_Page = $Page - 1;
$Next_Page = $Page + 1;
$resultg = mysql_query("SELECT * FROM domes_val WHERE id_domes_ref = '$domestic' ORDER BY id_val_domes desc");
$Page_start = ( $Per_Page * $Page ) - $Per_Page;
$Num_Rows = mysql_num_rows( $resultg );
if ( $Num_Rows <= $Per_Page )
$Num_Pages = 1;
else if ( ( $Num_Rows % $Per_Page ) == 0 )
$Num_Pages = ( $Num_Rows / $Per_Page );
else
$Num_Pages = ( $Num_Rows / $Per_Page ) + 1;
$Num_Pages = ( int ) $Num_Pages;
if ( ( $Page > $Num_Pages ) || ( $Page < 0 ) )
print "จำนวน $Page มากกว่า $Num_Pages";
$strSQL .= " LIMIT $Page_start, $Per_Page";
$allPage = ceil($Num_Rows/$Per_Page);
if(isset($_GET['Page'])){
$Page = $_GET['Page'];
$topage = $Page-1;
}else{
$topage = 0;
$Page = 1;
}
$linkpage = "<a href='".$_SERVER['PHP_SELF']."?Page=1&page_a=$page_a&hotel=$hotel' title='ไปหน้าแรก' class='txtorg12b'>[ Prev ]</a> ";
if($Page<6){
$i=1;
$allPage<11 ? $doLoop = $allPage : $doLoop = 11;
while($i<=$doLoop){
if($i==$Page){
$linkpage .= "<span class='box'><b>$i</b></span> ";
}else{
$linkpage .= "<a href='".$_SERVER['PHP_SELF']."?Page=$i&page_a=$page_a&hotel=$hotel' class='txtorg12b'>$i</a> ";
}
$i++;
}
}elseif( ($allPage-$Page) < 6){
$allPage<11 ? $start = 1 : $start = $allPage-10;
for($i=$start;$i<=$allPage;$i++){
if($i==$Page){
$linkpage .= "<span class='box'><b>$i</b></span> ";
}else{
$linkpage .= "<a href='".$_SERVER['PHP_SELF']."?$temp&Page=$i&page_a=$page_a&hotel=$hotel' class='txtorg12b'>$i</a> ";
}
}
}else{
for($i=$Page-5;$i<=$Page+5;$i++){
if($i==$Page){
$linkpage .= "<span class='box'><b>$i</b></span> ";
}else{
$linkpage .= "<a href='".$_SERVER['PHP_SELF']."?Page=$i&page_a=$page_a&hotel=$hotel' class='txtorg12b'>$i</a> ";
}
}
}
$linkpage .= "<a href='".$_SERVER['PHP_SELF']."?Page=$allPage&page_a=$page_a&hotel=$hotel' title='ไปหน้าสุดท้าย' class='txtorg12b'>[ Last ]</a>";
?>
<tr>
<td colspan="9" bgcolor="#F0F8FF"><div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><a href="?page_a=<? echo"$page_a";?>&domestic=<? echo"$domestic";?>&funtion=form" class="txt12gray style1"><strong>+ เพิ่ม Saling Price</strong></a></font></div>
<div align="left"></div></td>
</tr>
<? ?>
<tr><? //เริ่มของตาราง
if($id_domes=="") { //เช็คว่ามีข้อมูลใรตาราง sprice ไหม ค่าต้องสอดคล้องกับหน้าที่ส่งมาใน jump menu
$sql_num_domes = mysql_query("SELECT * FROM domes_val ORDER BY id_val_domes desc"); // คิวรี่ val
$num_rows_domes = mysql_num_rows($sql_num_domes);//จำนวน val
$no_hotv=1;
$no_hots =1;
} else {
$sql_num_domes = mysql_query("SELECT * FROM domes WHERE id_val_domes = '$id_domes' ORDER BY id_val_domes asc");
$num_rows_domes = mysql_num_rows($sql_num_domes);
$result_domes = mysql_fetch_array($sql_num_domes);
$rs_domes = $result_domes['val_name_domes'];
$no_hotv=1;
$no_hots =1;
}
if($id_domes=="") { //เช็คว่ามีข้อมูลใรตาราง sprice ไหม ค่าต้องสอดคล้องกับหน้าที่ส่งมาใน jump menu
$sql_num_hotel = mysql_query("SELECT * FROM hotel ORDER BY id_hotel desc"); // คิวรี่ val
$num_rows_hotel = mysql_num_rows($sql_num_hotel);//จำนวน val
$no_hotv=1;
$no_hots =1;
} else {
$sql_num_hotel = mysql_query("SELECT * FROM hotel WHERE id_hotel = '$id_domes' ORDER BY id_hotel asc");
$num_rows_hotel = mysql_num_rows($sql_num_hotel);
$no_hotv=1;
$no_hots =1;
}
?>
<td><table width="750" border="0" align="center" bordercolor="#49B6F5" cellpadding="2" cellspacing="1">
<tr>
<td colspan="6" scope="col" bgcolor="#73B3F2"><div align="center" class="style4">
<div align="left"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><strong><strong>Validity <? echo $rs_domes ; ?></strong></strong></font> </div>
</div></td>
</tr>
<tr>
<td width="33%" rowspan="3" bgcolor="#73B3F2"><div align="center" class="style4">
<div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><strong><strong>โรงแรม</strong></strong></font></div>
</div></td>
<td colspan="3" bgcolor="#0099FF"><div align="center" class="style4" font size="2" face="MS Sans Serif, Tahoma, sans-serif"> ราคาขาย</div></td>
<td width="9%" rowspan="3" bgcolor="#006699"><div align="center" class="style4"><strong><font size="2" face="MS Sans Serif, Tahoma, sans-serif">แก้ไข</font></strong></div></td>
<td width="9%" rowspan="3" bgcolor="#006699"><div align="center" class="style4"><strong><font size="2" face="MS Sans Serif, Tahoma, sans-serif">ลบ</font></strong></div></td>
</tr>
<tr>
<td width="13%" rowspan="2"bgcolor="#0099FF"><div align="center" class="style4" font size="2" face="MS Sans Serif, Tahoma, sans-serif">ผู้ใหญ่</div></td>
<td colspan="2"bgcolor="#0099FF"><div align="center" class="style4" font size="2" face="MS Sans Serif, Tahoma, sans-serif">เด็กอายุ 3 - 12 ปี</div></td>
</tr>
<tr>
<td width="19%"bgcolor="#0099FF"><div align="center" class="style4" font size="2" face="MS Sans Serif, Tahoma, sans-serif">ไม่มีเตียงเสริม</div></td>
<td width="17%"bgcolor="#0099FF"><div align="center" class="style4" font size="2" face="MS Sans Serif, Tahoma, sans-serif">มีเตียงเสริม</div></td>
</tr>
<?
if($Num_Rows==0){
?>
<tr bgcolor="">
<td colspan="6" bgcolor="#FFFFCC"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"> <span class="style6">ยังไม่มีข้อมูลครับ</span></font></div></td>
</tr>
<?
} else {
while($result_ht= mysql_fetch_array($sql_num_hotel)){ //
$hotel=$result_ht['id_hotel']; //id_oval
$sql_num_sprice = mysql_query("SELECT * FROM domes_sprice WHERE id_hotel_ref = '$hotel' ORDER BY id_sdomes") or die(mysql_error());
$num_rows_sprice = mysql_num_rows($sql_num_sprice);
$sql_check = mysql_query("SELECT id_hotel_ref FROM domes_sprice WHERE id_hotel_ref = '$hotel' ");//ต้องกำหนดไม่ให้ซ้ำซ้อนกับของเดิม
$check = mysql_fetch_array($sql_check);
$check_hotel = $check['id_hotel_ref'];
if( ($num_rows_hotel % 2)==0 ) {
if(($no_hotv % 2)==0){ $bgcolor2 = "#F0F8FF";
}else{
$bgcolor2 = "#DCECFC";
}
}//สีแรก
if( ($num_rows_hotel % 2)==1 ) {
if(($no_hotv % 2)==0){ $bgcolor2 = "#F0F8FF";
}else{
$bgcolor2 = "#DCECFC";
}
}//สีสอง
?>
<? //ตาราง ?>
<? if($check_hotel==$hotel) { ?>
<tr>
<td bgcolor="<? echo $bgcolor2;?>" class="style5" scope="row"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<? echo"".$result_ht['name']."";?></font></div></td>
<? }
while($result_ns= mysql_fetch_array($sql_num_sprice)) {
if( ($num_rows_sprice % 2)==0 ) {
if(($no_hots % 2)==0){ $bgcolor2 = "#F0F8FF"; $bgcolor3 = "#6699FF";
}else{
$bgcolor2 = "#DCECFC"; $bgcolor3 = "#0099FF";
}
}//สีแรก
if( ($num_rows_sprice % 2)==1) {
if(($no_hots % 2)==0){ $bgcolor2 = "#F0F8FF"; $bgcolor3 = "#6699FF";
}else{
$bgcolor2 = "#DCECFC"; $bgcolor3 = "#0099FF";
}
}//สีสอง
?>
<td bgcolor="<? echo $bgcolor2;?>"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<?
if($result_ns['1a']==0){ echo "N/A";
}else{
$format_dc =number_format($result_ns['1a']);
echo"".$format_dc."";}
?>
</font></div></td>
<td bgcolor="<? echo $bgcolor2;?>"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<?
if($result_ns['2_3a']==0){ echo "N/A";
}else{
$format_dc =number_format($result_ns['2_3a']);
echo"".$format_dc."";}
?>
</font></div></td>
<td bgcolor="<? echo $bgcolor2;?>"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<?
if($result_ns['4_9a']==0){ echo "N/A";
}else{
$format_dc =number_format($result_ns['4_9a']);
echo"".$format_dc."";}
?>
</font></div></td>
<td rowspan="1" bordercolor="#0066FF" bgcolor="#E8E8E8"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><span class="style6"><a href="?page_a=<? echo"$page_a";?>&funtion=form&f_edit=f_edit&id=<? echo"".$result_ns['id_sdomes']."";?>&idd=<? echo"".$domestic."";?>">แก้ไข</a></span></font></div></td>
<td rowspan="1" bordercolor="#0066FF" bgcolor="#E8E8E8"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><span class="style6"><a href="?page_a=<? echo"$page_a";?>&funtion=dele&id=<? echo"".$result_ns['id_sdomes'].""?>&idd=<? echo"".$domestic."";?>">ลบ</a></span></font></div></td>
</tr>
<? ?>
<? $no_hots++;}
$no_hotv++;}
}
?>
</table></td>
</tr><? //จบตาราง ?>
</table>
</div> <? }
mysql_close(); ?>
</body>
</html>
|
|
|
|
|
Date :
2011-05-10 16:32:35 |
By :
panfantour |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|