<? $a=1 if($a=1){ echo=จองได้ $color="33cc66"; //สีพื้นหลัง ตางราง }else{ $color="#ffffff"; //สีพื้นหลัง ตางราง } ?> <form id="form1" method="post" action=""> <table width="553" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#000000" id="calendar"> <tr> <td width="15%" align="center" bgcolor="#FFCC99" class="style1"><span class="date style20"><strong>วัน/เวลา</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong> 8.00 9.00</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong>10.00 11.00</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong>12.00 13.00</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong>13.00 14.00</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong> 15.00 16.00</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong>17.00 18.00</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong>19.00 20.00</strong></span></td> <td width="10%" align="center" bgcolor="#FFFFCC"><span class="date style20"><strong>20.00 21.00</strong></span></td> </tr> <tr> <td height="40" bgcolor="#FFFFCC" class="style1" ><span class="style18"><strong>จันทร์</strong></span></td> <td align="center" bgcolor="<?= $color?>"> <span class="style18"> <input type="checkbox" name="checkbox" id="checkbox" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox2" id="checkbox2" /> </span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox3" id="checkbox3" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox4" id="checkbox4" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox5" id="checkbox5" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox6" id="checkbox6" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox7" id="checkbox7" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox8" id="checkbox8" /> </span></td> </tr> <tr> <td height="40" bgcolor="#FFFFCC" class="style1" ><span class="style18"><strong>อังคาร</strong></span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox" id="checkbox" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox2" id="checkbox2" /> </span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox3" id="checkbox3" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox4" id="checkbox4" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox5" id="checkbox5" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox6" id="checkbox6" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox7" id="checkbox7" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox8" id="checkbox8" /> </span></td> </tr> <tr> <td height="40" bgcolor="#FFFFCC" class="style1" ><span class="style18"><strong>พุธ</strong></span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox" id="checkbox" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox2" id="checkbox2" /> </span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox3" id="checkbox3" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox4" id="checkbox4" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox5" id="checkbox5" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox6" id="checkbox6" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox7" id="checkbox7" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox8" id="checkbox8" /> </span></td> </tr> <tr> <td height="40" bgcolor="#FFFFCC" class="style1" ><span class="style18"><strong>พฤหัสบดี</strong></span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox" id="checkbox" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox2" id="checkbox2" /> </span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox3" id="checkbox3" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox4" id="checkbox4" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox5" id="checkbox5" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox6" id="checkbox6" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox7" id="checkbox7" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox8" id="checkbox8" /> </span></td> </tr> <tr> <td height="40" bgcolor="#FFFFCC" class="style1" ><span class="style18"><strong>ศุกร์</strong></span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox" id="checkbox" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox2" id="checkbox2" /> </span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox3" id="checkbox3" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox4" id="checkbox4" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox5" id="checkbox5" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox6" id="checkbox6" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox7" id="checkbox7" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox8" id="checkbox8" /> </span></td> </tr> <tr> <td height="40" bgcolor="#FFFFCC" class="style1" ><span class="style18"><strong>เสาร์</strong></span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox" id="checkbox" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox2" id="checkbox2" /> </span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox3" id="checkbox3" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox4" id="checkbox4" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox5" id="checkbox5" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox6" id="checkbox6" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox7" id="checkbox7" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox8" id="checkbox8" /> </span></td> </tr> <tr> <td height="40" bgcolor="#FFFFCC" class="style1" ><span class="style18"><strong>อาทิตย์</strong></span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox" id="checkbox" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox2" id="checkbox2" /> </span></td> <td align="center" bgcolor="<?= $color?>"><span class="style18"> <input type="checkbox" name="checkbox3" id="checkbox3" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox4" id="checkbox4" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox5" id="checkbox5" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox6" id="checkbox6" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox7" id="checkbox7" /> </span></td> <td align="center" bgcolor="<?= $color?>" ><span class="style18"> <input type="checkbox" name="checkbox8" id="checkbox8" /> </span></td> </tr> </table> <p> </p> <p> <input name="button" type="submit" class="style1" id="button" value="แก้ไขตารางนัด" /> </p> </form>
if($status=="จองได้") { ใน Tag TD ให้พื้นหลังเป็นสีเหลือง }
if($status=="จองได้") $color="33cc66"; //สีพื้นหลัง ตางราง }else{ $color="ffffff"; //สีพื้นหลัง ตางราง } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง