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 /
homework /
[ HOME SHELL ]
Name
Size
Permission
Action
images
[ DIR ]
drwxr-xr-x
install
[ DIR ]
drwxr-xr-x
main
[ DIR ]
drwxr-xr-x
manual
[ DIR ]
drwxr-xr-x
upload_files
[ DIR ]
drwxr-xr-x
default.php
342
B
-rw-r--r--
index.php
254
B
-rw-r--r--
menu.php
2.69
KB
-rw-r--r--
menu_mobile.php
757
B
-rw-r--r--
permission.php
8.59
KB
-rw-r--r--
set_grant_person.php
12.04
KB
-rw-r--r--
time_inc.php
4.73
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : set_grant_person.php
<?php /** ensure this file is being included by a parent file */ defined( '_VALID_' ) or die( 'Direct Access to this location is not allowed.' ); if(!($_SESSION['admin_homework']=='homework' or $result_homework['p1']==1)){ exit(); } //ส่วนหัว echo "<br />"; if(!(isset($_POST['comment_person']))){ $_POST['comment_person']=""; } if(!(isset($_POST['grant_person']))){ $_POST['grant_person']=""; } if(!(($index==1) or ($index==2) or ($index==5))){ 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>"; } echo "<br>"; //ส่วนลบผู้ให้ความเห็นชอบ if ($index==2){ $sql = "update homework_person_set set comment_person='' "; $dbquery = mysqli_query($connect,$sql); } //ส่วนลบผู้อนัมัติ if ($index==3){ $sql = "update homework_person_set set grant_person='' "; $dbquery = mysqli_query($connect,$sql); } //ส่วนบันทึกข้อมูล if($index==4){ $rec_date = date("Y-m-d"); $officer=$_SESSION['login_user_id']; $sql_1 = "select * from person_main where status='0' "; $dbquery_1 = mysqli_query($connect,$sql_1); While ($result = mysqli_fetch_array($dbquery_1)) { $person_id=$result['person_id']; $chk1="chk1$person_id"; $chk2="chk2$person_id"; $rec_index=0; $comment_index=0; $grant_index=0; if(!(isset($_POST[$chk1]))){ $_POST[$chk1]=""; } if(($_POST['comment_person']!="") and ($_POST[$chk1]==1)){ $comment_person=$_POST['comment_person']; $rec_index=$rec_index+1; $comment_index=1; } else{ $comment_person=""; } if(!(isset($_POST[$chk2]))){ $_POST[$chk2]=""; } if(($_POST['grant_person']!="") and ($_POST[$chk2]==1)){ $grant_person=$_POST['grant_person']; $rec_index=$rec_index+1; $grant_index=1; } else{ $grant_person=""; } $sql_2 = "select * from homework_person_set where person_id='$person_id'"; $dbquery_2 = mysqli_query($connect,$sql_2); $num=mysqli_num_rows($dbquery_2); if($num<1 and $rec_index>0){ $sql_3 = "insert into homework_person_set(person_id,comment_person,grant_person,officer,rec_date) values ('$person_id','$comment_person','$grant_person','$officer','$rec_date')"; $dbquery_3 = mysqli_query($connect,$sql_3); } else{ if($comment_index==1){ $sql_3 = "update homework_person_set set comment_person='$comment_person', officer='$officer', rec_date='$rec_date' where person_id='$person_id'"; $dbquery_3 = mysqli_query($connect,$sql_3); } if($grant_index==1){ $sql_4 = "update homework_person_set set grant_person='$grant_person', officer='$officer', rec_date='$rec_date' where person_id='$person_id'"; $dbquery_4 = mysqli_query($connect,$sql_4); } } } } //ส่วนฟอร์มแก้ไขข้อมูล if ($index==5){ echo "<form id='frm1' name='frm1'>"; echo "<Center>"; echo "<Font color='#006666' Size=3><B>แก้ไขการกำหนดผู้ให้ความเห็นชอบ และผู้อนุมัติ การขออนุญาตไปราชการ</B></Font>"; echo "</Cener>"; echo "<Br><Br>"; echo "<Table width='50%' Border= '0' Bgcolor='#Fcf9d8'>"; $sql = "select * from homework_person_set where id='$_GET[id]'"; $dbquery = mysqli_query($connect,$sql); $ref_result = mysqli_fetch_array($dbquery); echo "<Tr><Td align='right'>ผู้บังคับบัญชาขั้นต้น(ให้ความเห็นชอบ) </Td>"; echo "<td><div align='left'><Select name='comment_person' size='1'>"; echo "<option value = ''>เลือก</option>" ; $sql = "select * from person_main where status='0' order by name"; $dbquery = mysqli_query($connect,$sql); While ($result = mysqli_fetch_array($dbquery)) { $person_id = $result['person_id']; $name = $result['name']; $surname = $result['surname']; if($person_id==$ref_result['comment_person']){ echo "<option value = $person_id selected>$name $surname</option>"; } else{ echo "<option value = $person_id>$name $surname</option>"; } } echo "</select>"; echo "</div></td></tr>"; echo "<Tr><Td align='right'>ผู้บังคับบัญชา(อนุมัติ) </Td>"; echo "<td><div align='left'><Select name='grant_person' size='1'>"; echo "<option value = ''>เลือก</option>" ; $sql = "select * from person_main where status='0' and (position_code='1' or position_code='2') order by position_code,person_order"; $dbquery = mysqli_query($connect,$sql); While ($result = mysqli_fetch_array($dbquery)) { $person_id = $result['person_id']; $name = $result['name']; $surname = $result['surname']; if($person_id==$ref_result['grant_person']){ echo "<option value = $person_id selected>$name $surname</option>"; } else{ echo "<option value = $person_id>$name $surname</option>"; } } echo "</select>"; echo "</div></td></tr>"; echo "<tr><td> </td><td> </td></tr>"; echo "<tr><td align='right'><INPUT TYPE='button' name='smb' value='ตกลง' onclick='goto_url_update(1)'> </td>"; echo "<td align='left'><INPUT TYPE='button' name='back' value='ย้อนกลับ' onclick='goto_url_update(0)'></td></tr>"; echo "</Table>"; echo "<Br>"; echo "<Input Type=Hidden Name='id' Value='$_GET[id]'>"; echo "<Input Type=Hidden Name='person_id' Value='$_GET[person_id]'>"; echo "</form>"; } //ส่วนปรับปรุงข้อมูล if ($index==6){ $rec_date = date("Y-m-d"); $officer=$_SESSION['login_user_id']; $sql_num = "select * from homework_person_set where id='$_POST[id]'"; $dbquery_num = mysqli_query($connect,$sql_num); $num_rows=mysqli_num_rows($dbquery_num); if($num_rows>0){ $sql = "update homework_person_set set comment_person='$_POST[comment_person]', grant_person='$_POST[grant_person]', officer='$officer', rec_date='$rec_date' where id='$_POST[id]'"; $dbquery = mysqli_query($connect,$sql); } else{ $sql_3 = "insert into homework_person_set(person_id,comment_person,grant_person,officer,rec_date) values ('$_POST[person_id]','$_POST[comment_person]','$_POST[grant_person]','$officer','$rec_date')"; $dbquery_3 = mysqli_query($connect,$sql_3); } } //ส่วนแสดงผล if(!(($index==1) or ($index==5))){ echo "<form id='frm1' name='frm1'>"; echo "<table width='95%' border='1' align='center' style='border-collapse: collapse'>"; echo "<Tr align='center' bgcolor='#E6E6E6'><Td colspan='4'></Td><Td><font color='#006666' size='2'>ผู้ให้ความเห็นชอบ</font></Td><Td><font color='#006666' size='2'>ผู้อนุมัติ</font></Td><td></td></Tr>"; echo "<Tr bgcolor='#FFCCCC' align='center'><Td width='30'>ที่</Td><Td width='150'>ชื่อ</Td><Td>ตำแหน่ง</Td><Td>กลุ่ม</Td><Td width='150'>"; echo "<Select name='comment_person' size='1'>"; echo "<option value = ''>เลือก</option>" ; $sql = "select * from person_main where status='0' order by name"; $dbquery = mysqli_query($connect,$sql); While ($result = mysqli_fetch_array($dbquery)) { $person_id = $result['person_id']; $prename = $result['prename']; $name = $result['name']; $surname = $result['surname']; $fullname_ar[$person_id]="$prename$name $surname"; echo "<option value = $person_id>$name $surname</option>" ; } echo "</select>"; echo "</Td><Td width='150'>"; echo "<Select name='grant_person' size='1'>"; echo "<option value = ''>เลือก</option>" ; $sql = "select * from person_main where status='0' and (position_code='1' or position_code='2') order by position_code,person_order"; $dbquery = mysqli_query($connect,$sql); While ($result = mysqli_fetch_array($dbquery)) { $person_id = $result['person_id']; $name = $result['name']; $surname = $result['surname']; echo "<option value = $person_id>$name $surname</option>" ; } echo "</select>"; echo "</Td>"; echo "<td width='40'>แก้ไข</td>"; echo "</Tr>"; $sql = "select * from person_position order by position_code"; $dbquery = mysqli_query($connect,$sql); While ($result = mysqli_fetch_array($dbquery)){ $position_ar[$result['position_code']]=$result['position_name']; } $sql = "select * from system_workgroup order by workgroup_order"; $dbquery = mysqli_query($connect,$sql); While ($result = mysqli_fetch_array($dbquery)){ $department_ar[$result['workgroup']]=$result['workgroup_desc']; } $sql = "select homework_person_set.id, person_main.person_id, person_main.prename, person_main.name, person_main.surname, person_main.position_code, person_main.department, homework_person_set.comment_person, homework_person_set.grant_person from person_main left join homework_person_set on person_main.person_id=homework_person_set.person_id where person_main.status='0' order by person_main.department,person_main.position_code,person_main.person_order"; $dbquery = mysqli_query($connect,$sql); $N=1; $M=1; While ($result = mysqli_fetch_array($dbquery)) { $id = $result['id']; $person_id = $result['person_id']; $prename=$result['prename']; $name= $result['name']; $surname = $result['surname']; $position_code= $result['position_code']; $department= $result['department']; $comment_person= $result['comment_person']; $grant_person= $result['grant_person']; if(($M%2) == 0) $color="#FFFFC"; else $color="#FFFFFF"; echo "<Tr bgcolor=$color align=center class=style1><Td>$N</Td><Td align='left'>$prename $name $surname</Td><Td align='left'>"; if(isset($position_ar[$position_code])){ echo $position_ar[$position_code]; } echo "</Td><Td align='left'>"; if(isset($department_ar[$department])){ echo $department_ar[$department]; } echo "</Td>"; echo "<td>"; if($comment_person!=""){ if(isset($fullname_ar[$comment_person])){ echo $fullname_ar[$comment_person]; } } else{ echo "<input type='checkbox' name='chk1$person_id' id='chk1$person_id' value='1'>"; } echo "</td>"; echo "<td>"; if($grant_person!=""){ if(isset($fullname_ar[$grant_person])){ echo $fullname_ar[$grant_person]; } } else{ echo "<input type='checkbox' name='chk2$person_id' id='chk2$person_id' value='1'>"; } echo "</td>"; echo "<Td valign='top' align='center'><a href=?option=homework&task=set_grant_person&index=5&id=$id&person_id=$person_id><img src=images/edit.png border='0' alt='แก้ไข'></a></Td>"; echo "</Tr>"; $M++; $N++; } echo "<tr><td align='center' colspan='4'></td><td align='center'><INPUT TYPE='button' name='smb2' value='ลบผู้เห็นชอบทั้งหมด' onclick='goto_url(2)'></td><td align='center'><INPUT TYPE='button' name='smb3' value='ลบผู้อนุมัติทั้งหมด' onclick='goto_url(3)'></td><td align='center'></td></tr>"; echo "<tr bgcolor='#FFCCCC'><td align='center' colspan=7'><INPUT TYPE='button' name='smb1' value='บันทึกข้อมูล' onclick='goto_url(1)'></td></tr>"; echo "</Table>"; echo "</form>"; } ?> <script> function goto_url(val){ if(val==0){ callfrm("?option=homework&task=set_grant_person"); }else if(val==1){ callfrm("?option=homework&task=set_grant_person&index=4"); }else if(val==2){ callfrm("?option=homework&task=set_grant_person&index=2"); }else if(val==3){ callfrm("?option=homework&task=set_grant_person&index=3"); } } function goto_url_update(val){ if(val==0){ callfrm("?option=homework&task=set_grant_person"); }else if(val==1){ if(frm1.grant_person.value == ""){ alert("กรุณาเลือกผู้อนุมิัติ"); }else{ callfrm("?option=homework&task=set_grant_person&index=6"); } } } </script>
Close