$color = ""; //else $color="#FFFFFF"; echo "<Tr bgcolor='{$color}'>"; echo "<Td align='left'>"; echo thai_date_3($book_date_start); echo "</Td>"; echo "<Td align='left'>"; echo thai_date_3($book_date_end); echo "</Td>"; echo "<Td align='left'>"; echo $room_name; echo "</Td>"; echo "<Td align='center'>{$start_time} น.</Td><Td align='center' >{$finish_time} น.</Td>"; echo "<td>{$result['chairman']}/{$result['objective']}</td>"; echo "<td>{$result['other']}/{$result['coordinator']}</td>"; echo "<Td>{$name} {$surname}(<font size='1px'>"; echo thai_date_4($rec_date); //echo $rec_date; echo "</font>) {$showdepartmybook}</Td>"; if ($result['reason'] != "") { echo "<Td align='left'>{$result['reason']}</Td>"; } else { echo "<td></td>"; } echo "</Tr>"; $M++; $N++; //*เกี่ยวข้องกับการแยกหน้า } echo "</Table>"; }
?> <A HREF="javascript:void(0)" onclick="window.open('modules/mail/main/maildetail.php?id=<?php echo $id; ?> ', 'bookdetail','width=700,height=500,scrollbars')" title="คลิกเพื่อดูรายละเอียด"><span style="text-decoration: none"><?php echo $subject; ?> </span></A> <?php if ($sch_person_index == 1 and $_SESSION['login_status'] <= 4) { echo " [{$result_sch['school_name']}]"; } echo "</Td>"; if ($result['answer'] == 1) { echo "<td align='center'><img src=images/yes.png border='0' alt='รับแล้ว'></td>"; } else { echo "<td align='center'><img src=images/no.png border='0' alt='ยังไม่ได้รับ'></td>"; } echo "<td align='left'>"; if ($answer_time > 0) { echo thai_date_4($answer_time); } echo "</td>"; echo "</Tr>"; $M++; $N++; //*เกี่ยวข้องกับการแยกหน้า } echo "</Table>"; }
if($ref_result['commander_grant']==1){ $commander_grant_check1="checked"; } else if($ref_result['commander_grant']==2){ $commander_grant_check2="checked"; } echo "<Tr align='left'><Td align='right'>อนุมัติ/ไม่อนุมัติ </Td><Td><Input Type='radio' Name='commander_grant' value='1' $commander_grant_check1>อนุมัติ <Input Type='radio' Name='commander_grant' value='2' $commander_grant_check2>ไม่อนุมัติ </Td></Tr>"; $commander_sign=$ref_result['commander_sign']; echo "<Tr align='left'><Td align='right'>ลงชื่อ </Td><Td>"; if(isset($full_name_ar[$commander_sign])){ echo $full_name_ar[$commander_sign]; } echo "</Td></Tr>"; echo "<Tr align='left'><Td align='right'>วดป </Td><Td>"; echo thai_date_4($ref_result['commander_date']); echo "</Td></Tr>"; echo "</table></fieldset>"; echo "</tr>"; /////// echo "</table>"; } //ส่วนแสดงผล if(!(($index==1) or ($index==2) or ($index==5) or ($index==7))){ //ส่วนของการแยกหน้า if($car_index>=1){ $sql="select id from car_main where car='$car_index' "; } else{
while ($r2 = mysqli_fetch_array($result2)) { ?> <FONT SIZE="2" COLOR=""><A HREF="bookdetail_school_saraban.php?index=2&sd_index=<?php echo $r2['id']; ?> &b_id=<?php echo $_REQUEST['b_id']; ?> "><IMG SRC="../../../images/b_drop.png" WIDTH="16" HEIGHT="16" BORDER="0" ALT="ลบออก"></A> <?php echo $list2; ?> . <?php echo $r2['prename'] . $r2['name'] . " " . $r2['surname']; ?> <?php $send_date = thai_date_4($r2['rec_forward_date']); echo $send_date; ?> </FONT><BR> <?php $list2++; } ?> </td> </tr> </form> </table> <?php }
$id = $result['ms_id']; $sender = $result['sender']; $office = $result['office']; $ref_id = $result['ref_id']; $level = $result['level']; $bookno = $result['bookno']; $signdate = $result['signdate']; $subject = $result['subject']; $ref_id = $result['ref_id']; $rec_date = $result['send_date']; if ($M % 2 == 0) { $color = "#ffffff"; } else { $color = "#E5E5FF"; } $send_date = thai_date_4($rec_date); $signdate = thai_date_3($signdate); // ระดับความสำคัญ if ($level == 1) { $img_level = "<IMG SRC=\"modules/book/images/level1.gif\" WIDTH=\"20\" HEIGHT=\"11\" BORDER=\"0\" ALT=\"ปกติ\">"; } else { if ($level == 2) { $img_level = "<IMG SRC=\"modules/book/images/level2.gif\" WIDTH=\"20\" HEIGHT=\"11\" BORDER=\"0\" ALT=\"ด่วน\">"; } else { if ($level == 3) { $img_level = "<IMG SRC=\"modules/book/images/level3.gif\" WIDTH=\"20\" HEIGHT=\"11\" BORDER=\"0\" ALT=\"ด่วนมาก\">"; } else { if ($level == 4) { $img_level = "<IMG SRC=\"modules/book/images/level4.gif\" WIDTH=\"20\" HEIGHT=\"11\" BORDER=\"0\" ALT=\"ด่วนที่สุด\">"; } }
require_once "../../../database_connect.php"; require_once "../../../mainfile.php"; require_once "../time_inc.php"; $user = $_SESSION['login_user_id']; $sql = "select * from mail_main left join person_main on mail_main.sender=person_main.person_id where mail_main.ms_id='{$_GET['id']}' "; $dbquery = mysqli_query($connect, $sql); $result = mysqli_fetch_array($dbquery); $sender = $result['sender']; $ref_id = $result['ref_id']; $detail = $result['detail']; $send_date = $result['send_date']; $prename = $result['prename']; $name = $result['name']; $surname = $result['surname']; $full_name = "{$prename}{$name} {$surname}"; $thai_send_date = thai_date_4($send_date); //บันทึกรับ $day_now = date("Y-m-d H:i:s"); $query_receive = mysqli_query($connect, "select * from mail_sendto_answer where ref_id='{$ref_id}' and send_to='{$user}' and answer='0' "); $receive_num = mysqli_num_rows($query_receive); if ($receive_num >= 1) { $sql = "update mail_sendto_answer set answer='1',\n\t\tanswer_time='{$day_now}'\n\t\twhere ref_id='{$ref_id}' and send_to='{$user}' "; mysqli_query($connect, $sql); } ?> <div align="center"> <table border="0" width="100%" id="table1" style="border-collapse: collapse; border: 1px dotted #FF00FF; ; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" cellpadding="2" > <tr> <td bgcolor="#003399" colspan="2" style="border: 1px dotted #808000"><font color="#FFFFFF"> <span lang="en-us"><font size="2"> </font></span><font size="2">รายละเอียดของจดหมาย
$answer_time = $result_name['answer_time']; $answer_time = thai_date_4($answer_time); echo "<tr><td width='40%' align='left'> <FONT SIZE='2'>{$M}.</FONT><FONT SIZE='2'>{$office_name_ar[$send_to]}</FONT></td><td align='left'>"; if ($answer == 0) { $ans_img = "<IMG SRC=\"../images/b_usrdrop.png\" WIDTH=\"16\" HEIGHT=\"16\" BORDER=\"0\" ALT=\"ยังไม่ลงทะเบียนรับ \"><FONT SIZE=\"2\" COLOR=\"\">ยังไม่ลงทะเบียนรับ</FONT>"; } else { if ($answer == 1) { $ans_img = "<IMG SRC=\"../images/b_usrcheck.png\" WIDTH=\"16\" HEIGHT=\"16\" BORDER=\"0\" ALT=\"ลงทะเบียนรับแล้ว\"><FONT SIZE=\"2\" COLOR=\"\">ลงทะเบียนรับแล้วเมื่อ {$answer_time}</FONT>"; } } echo $ans_img; echo "</td></tr>"; $M++; } $date = date("Y-m-d H:i:s"); $date_now = thai_date_4($date); ?> </table> </td> </tr> <tr><td colspan="2"> <BR> <CENTER><FONT SIZE="2" COLOR="#0000FF">ข้อมูล ณ <?php echo $date_now; ?> </FONT><BR><FONT SIZE="2" COLOR="#999933">************************************</FONT></CENTER> </div> <CENTER><input border="0" src="../images/button95.jpg" name="I1" width="100" height="20" type="image" onClick="javascript:window.close()"></CENTER> </td></tr> </table>
if ($status == 3 or $status == 6) { //หาชื่อผู้ส่ง $sql_name = mysqli_query($connect, "SELECT * FROM person_main WHERE person_id='{$result['forward_from']}' "); $row_name = mysqli_fetch_array($sql_name); if ($row_name) { $forward_name = $row_name['name'] . " " . $row_name['surname']; } else { $sql_name = mysqli_query($connect, "SELECT * FROM person_sch_main WHERE person_id='{$result['forward_from']}'"); $row_name = mysqli_fetch_array($sql_name); $forward_name = $row_name['name'] . " " . $row_name['surname']; } $forward_date = thai_date_4($result['rec_forward_date']); $return = " <font color='#FF0000'>[ส่งคืนจาก{$forward_name}]</font> {$forward_date}"; } else { if ($status == 4) { $forward_date = thai_date_4($result['rec_forward_date']); if (isset($office_name_ar[$school])) { $return = " <font color='#FF0000'>[ส่งคืนจาก{$office_name_ar[$school]}]</font> {$forward_date}"; } } else { $return = ""; } } ?> <tr bgcolor="<?php echo $color; ?> "> <td align="center"><?php echo $result['ms_id']; ?>
?> </td> <td><?php echo number_format($row['start_time'], 2) . "-" . number_format($row['finish_time'], 2) . "น."; ?> </td> <td><?php echo $row['chairman'] . "/" . $row['objective']; ?> </td> <td><?php echo $row['other'] . "/" . $row['coordinator']; ?> </td> <td><?php echo thai_date_4($row['rec_date']); ?> </td> <td class="text-center"> <?php if ($row['book_person'] == $user_id) { echo "<a href='?option=meeting&task=main/meeting&index=3&id={$row['id']}' class='btn btn-danger' data-toggle='confirmation'><span class='glyphicon glyphicon-trash' aria-hidden='true'></span></a>"; } else { echo ""; } ?> </Td> <td class="text-center"> <?php if ($row['approve'] == 2) { echo "<span class='glyphicon glyphicon-ban-circle icon-danger icon-size1'></span>";
echo "<Td align='center'><input type='checkbox' name='{$id}' id='{$id}' value='1'></Td>"; } } if ($approve >= 1) { if (isset($officer)) { $sql_person = "select * from person_main where status='0' and person_id=? "; $dbquery_person = $connect->prepare($sql_person); $dbquery_person->bind_param("i", $officer); $dbquery_person->execute(); $result_qperson = $dbquery_person->get_result(); while ($result_person = mysqli_fetch_array($result_qperson)) { $name = $result_person['name']; $surname = $result_person['surname']; } echo "<td>{$name} {$surname}(<font size='1px'>"; echo thai_date_4($officer_date); echo "</font>)</td>"; } else { echo "<td></td>"; } } else { echo "<td></td>"; } if ($reason != "") { echo "<Td align='left'>{$reason}</Td>"; } else { echo "<td></td>"; } echo "<Td align='center'><a href=?option=meeting&task=main/officer&index=5&id={$id}&page={$page}><img src=images/b_edit.png border='0' alt='เจ้าหน้าที่'></Td>"; echo "</Tr>"; $M++;