<link rel="stylesheet" type="text/css" media="all" href="calenda/jsDatePick_ltr.min.css"/> <script type="text/javascript" src="calenda/jsDatePick.min.1.3.js"></script> <script type="text/javascript"> function getDateBG(){ new JsDatePick({ useMode:2, target:"txtdate1", dateFormat:"%d-%m-%Y" }); }; </script> <script type="text/javascript"> function getDateED(){ new JsDatePick({ useMode:2, target:"txtcreatdate", dateFormat:"%d-%m-%Y" }); }; </script> <table width="1150" border="1"align="center" cellpadding="1" cellspacing="0" bordercolor="#006600"> <tr> <td width="40" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size ="2" color="#008000" >No.</font></h4></td> <td width="66" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size ="2" color="#008000" >Date start</font></h4></td> <td width="66" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Date finish</font></h4></td> <td width="66" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Fac</font></h4></td> <td width="70" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Room</font></h4></td> <td width="154" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Company Name<br>Guest Information</font></h4></td> <td width="70" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Number</font></h4></td> <td width="70" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Purpose</font></h4></td> <td width="70" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">PIC</font></h4></td> <td width="73" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">VIP</font></h4></td> <td width="128" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Remark</font></h4></td> <td width="165" align="center" valign="center" bgcolor="#EAF1DD"><h4><font size="2" color="#008000">Route</font></h4></td> </tr> <?php error_reporting(0); if($_POST["click"]==NULL) { ?> <tr> <td align="center" valign="top" colspan="12" bgcolor="#EAF1DD"><font size ="3" color="#008000" ><b>Plese click [ <img src="img/addplus.png" style="heigh:20px; width:20px;" > for increase row ] or click [ <img src="img/delete.png" style="heigh:20px; width:20px;" > for decrease row ]</b></font></td> </tr> <?php } ?> <!--<tr> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:40;" name="line_d[]" type="hidden" value="1">1</td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:66;" name="datestart_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:59;" name="datefinish_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:66;" name="fac_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:70;" name="room_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:154;" name="company_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:70;" name="number_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:70;" name="purpose_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:70;" name="pic_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:73;" name="vip_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:128;" name="remark_d[]" type="text"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:75;" name="route_d[]" type="text"></td> </tr>--> <?php if($_POST["submit"]=="add") $click=""; else $click=$_POST["click"]; if($click!=NULL || $del!=NULL) { //error_reporting(0); if($click=="+") { if (isset($_POST['count'])) { $count = $_POST['count'] + 1; } else $count = 1; } else if($click=="-") { $count = $_POST['count'] - 1; if($count < 1) $count = 0; } ?> <input type="hidden" name="count" value="<?php echo $count; ?>"> <?php } //$loop=$num_rows; for($i=1;$i<=$count; $i++) { ?> <tr> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:40;" name="line[]" type="hidden" value="<?php echo $i;?>"><?php echo $i;?></td> <td> <input name="txtdate1[]" type="text" id="txtdate1"style="text-align:center;" onClick="getDateBG();" value="<?php echo date('d-m-Y');?>"/></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:66;" name="datefinish[]" type="text" value="<?php echo $_POST['datefinish'][$i-1]; ?>"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:66;" name="fac[]" type="text" value="<?php echo $_POST['fac'][$i-1];?>"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:70;" name="room[]" type="text" value="<?php echo $_POST['room'][$i-1]; ?>"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:154;" name="company[]" type="text" value="<?php echo $_POST['company'][$i-1]; ?>"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:70;" name="number[]" type="text" value="<?php echo $_POST['number'][$i-1]; ?>"></td> <td align="center" valign="center" bgcolor="#EAF1DD"> <?php $pur="select * from GUEST_PURPOSE"; $querypur=sqlsrv_query($conn, $pur); ?> <select name="purpose[]" style="width:70;"> <?php while($resultpur=sqlsrv_fetch_array($querypur)) { ?> <option value="<?php echo $resultpur["PURPOSE"]; ?>"><?php echo $resultpur["PURPOSE"]; ?></option> <?php } ?> </select> </td> <td align="center" valign="center" bgcolor="#EAF1DD"> <?php $pic="select * from GUEST_PIC"; $querypic=sqlsrv_query($conn, $pic); ?> <select name="pic[]" style="width:70;"> <?php while($resultpic=sqlsrv_fetch_array($querypic)) { ?> <option value="<?php echo $resultpic["PIC"]; ?>"><?php echo $resultpic["PIC"]; ?></option> <?php } ?> </select> </td> <td align="center" valign="center" bgcolor="#EAF1DD"> <select name="vip[]" style="width:73;"> <option value="<?php echo ""; ?>">-</option> <option value="<?php echo "*"; ?>">*</option> <option value="<?php echo "**"; ?>">**</option> <option value="<?php echo "***"; ?>">***</option> <option value="<?php echo "****"; ?>">****</option> </select> </td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:128;" name="remark[]" type="date" value="<?php echo $_POST['remark'][$i-1]; ?>"></td> <td align="center" valign="center" bgcolor="#EAF1DD"><input style="width:165;" name="route[]" type="file" value="<?php echo $_POST['route'][$i-1]; ?>"><?php echo $_POST['route'][$i-1]; ?></td> </tr> <?php $loop++; } ?> </table>
function getDateBG(TG){ new JsDatePick({ useMode:2, target:TG, dateFormat:"%d-%m-%Y" }); }
Quote:<input name="txtdate1[]" type="text" id="txtdate1" style="text-align:center;" onClick="getDateBG();" value="<?php echo date('d-m-Y');?>"/> เปลี่ยนเป็น <input name="txtdate1[]" type="text" id="txtdate<?php echo $i;?>" style="text-align:center;" onClick="getDateBG('txtdate<?php echo $i;?>');" value="<?php echo date('d-m-Y');?>"/>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง