list($Oyear, $Omonth, $Oday) = split("-", $rows[6]);
 list($Nyear, $Nmonth, $Nday) = split("-", $rows[10]);
 $time_out = FALSE;
 echo '<tr class="odd gradeX">';
 echo '<td>';
 echo '<a href="Detail_event.php?eId=' . $rows[0] . '&userid=' . $rows[1] . '" alt="รายละเอียด" title="รายละเอียด">' . $rows[3];
 if ($rows[10] < date('Y-m-d', strtotime('-3 days'))) {
     echo '<label style="color:red;">*ป้ายเลยกำหนดเวลาการยืนเอกสาร</label>';
     $sql_update_event = "update event set status='time out' where eId = " . $rows[0];
     $result_update = $conn->query($sql_update_event);
     $time_out = TRUE;
 }
 echo '</td>';
 echo '<td>';
 echo '<ol>';
 echo '<ul>' . sel_notice($rows[2], $conn) . '</ul>';
 echo '</ol>';
 echo '<label style="color:green;">วันที่เริ่มจอง ' . $Nday . ' ' . change_mount($Nmonth) . ' ' . changeYear($Nyear) . '</label>';
 echo '</td>';
 echo '<td>' . $Sday . ' ' . change_mount($Smonth) . ' ' . changeYear($Syear) . '</td>';
 echo '<td>' . $Eday . ' ' . change_mount($Emonth) . ' ' . changeYear($Eyear) . '</td>';
 echo '<td>' . $Oday . ' ' . change_mount($Omonth) . ' ' . changeYear($Oyear) . '</td>';
 echo '<td>' . $rows[9] . '</td>';
 echo '<td>';
 echo '<a href="edit_form_user.php?eId=' . $rows[0] . '&userId=' . $rows[1] . '"><button class="btn btn-outline btn-primary" type="button" style="margin:5px;">แก้ไข</button></a><br>';
 if (!$time_out == TRUE) {
     echo '<a href="print_form.php?eId=' . $rows[0] . '">';
     echo '<button class="btn btn-outline btn-success" type="button" style="margin:5px;" >แบบฟอร์มการจอง</button>';
     echo '</a><br>';
 } else {
     echo '<button class="btn btn-default disabled" type="button" style="margin:5px;">แบบฟอร์มการจอง</button>';
示例#2
0
?>
</td>
                                        </tr>
                                         <tr>
                                            <td>เบอร์โทรศัพท์</td>
                                            <td><?php 
echo $row[14];
?>
</td>
                                        </tr>
                                        <tr>
                                            <td>ป้ายที่จอง</td>
                                            <td>
                                                <?php 
echo '<ol>';
echo sel_notice($row[2], $conn);
echo '</ol>';
?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>วันเริ่มติดตั้ง</td>
                                            <td><?php 
echo $Sday . ' ' . change_mount($Smonth) . ' ' . changeYear($Syear);
?>
</td>
                                        </tr>
                                        <tr>
                                            <td>วันสิ้นสุดการติดตั้ง</td>
                                            <td><?php 
echo $Eday . ' ' . change_mount($Emonth) . ' ' . changeYear($Eyear);