<h4 class="style19">สรุปผลการเสนอราคา</h4> </div> <form name="show" method="get" action="h_report11.php"> <div align="center">เดือน <select name='month' id='month'> <option value=" ">เลือกเดือน</option> <? $month[1] = 'มกราคม'; $month[2] = 'กุมภาพันธ์'; $month[3] = 'มีนาคม'; $month[4] = 'เมษายน'; $month[5] = 'พฤษภาคม'; $month[6] = 'มิถุนายน'; $month[7] = 'กรกฎาคม'; $month[8] = 'สิงหาคม'; $month[9] = 'กันยายน '; $month[10] = 'ตุลาคม'; $month[11] = 'พฤศจิกายน'; $month[12] = 'ธันวาคม'; for($i=1;$i<=12;$i++){ if($i== $_GET['month']){ ?> <option value="<?=$i ;?>" selected="selected" ><?=$month[$i];?></option><? } else { ?><option value="<?=$i ;?>"><?=$month[$i];?></option><? } } ?> </select> ปี <select name='year' id='year'> <? $xYear=date('Y'); ?> <option value="<?=$xYear;?>"> <?=$xYear;?></option> <? for($i=1;$i<=3;$i++){ if($i== $_GET['year']){?> <option value="<?="1";?>" selected="selected" ><?=($xYear-$i);?></option><? } else {?> <option value="<?="1";?>"><?=($xYear-$i);?></option><? } } ?> </select> <input type="submit" name="button3" id="button3" value="ตกลง" /> </div> </form> <label> <p> </p> <div align="center"></div> </label> <div align="right"><span class="style10"><a href="h_report1.php" ><< กลับเมนูหลัก </a> </span></div> <? if($_POST['month']!==0&& $_POST['year']==1){ // ตรงนี้ต้องเขียนยังไงค่ะ $sqlsel ="select a.nID,a.stQuatation,b.dtBuild,b.nTotal,c.cCom,d.cCons from order_status a INNER JOIN step1 b ON (b.nID=a.nID) INNER JOIN tb_customer c ON (c.nID=a.nCustomerID)INNER JOIN tb_typecontractor d ON (d.nID=b.nTypeCons) where MONTH(dtBuild) ='$_GET[month]' AND YEAR(dtBuild) = '$_GET[year]' "; $sqlquery = mysql_query($sqlsel)or die (mysql_error()); ?> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0"> <TR> <TD width="16%" height="30" bgcolor="#33CCCC" class="style10"><div align="center" class="style21">เดือน/ปี</div></TD> <TD width="20%" bgcolor="#33CCCC" class="style10"><div align="center" class="style21">เลขที่ใบเสนอราคา</div></TD> <TD width="20%" bgcolor="#33CCCC" class="style10"><div align="center" class="style21">บริษัท</div></TD> <TD width="18%" bgcolor="#33CCCC" class="style10"><div align="center" class="style21">ประเภทงานที่รับเหมา</div></TD> <TD width="26%" bgcolor="#33CCCC" class="style10"><div align="center" class="style21">ราคางานรับเหมา (บาท)</div></TD> </TR> <? echo "1234"; ?> <?php while($row=mysql_fetch_array($sqlquery)) { ?> <TR> <TD height="22" class="style10"><div align="center"> <? $row['dtBuild']; $show = explode("-",$row ['dtBuild']); echo $show[2]."/".$show[1]."/".$show[0];?> </div></TD> <TD align ='center' class="style10"><div align="center"><a href='step1_detail_only.php?id=<? echo $row['nID'];?>' target="_blank"><?php echo $row['stQuatation']; ?></a></div></TD> <TD align ='center' class="style10"><div align="center"><?php echo $row['cCom']; ?></div></TD> <TD align ='center' class="style10"><div align="center"><?php echo $row['cCons']; ?></div></TD> <TD align ='center' class="style10"><div align="center"><?php echo number_format ( $row['nTotal'],2); ?></div></TD> </TR> <?php } ?> </table> <? } else { echo""; } ?>
<? if($_POST['month']&& $_POST['year']){ // ตรงนี้ต้องเขียนยังไงค่ะ
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง