Mini Shell

Direktori : /proc/self/root/proc/self/root/home/rizant5/public_html-1210/student/
Upload File :
Current File : //proc/self/root/proc/self/root/home/rizant5/public_html-1210/student/photo_uploader.php

<?php
	session_start();
	require_once("../config.php");

	$userid = $_SESSION['userid'];
	$username = $_SESSION['username'];
	$user_name = explode(" ", $username);
	
	$file_name = $_SESSION['userid'].'_'.$user_name[0];

	$name = $_FILES['team_img']['name'];

	$uploaded_file_name = explode('.', $name);

	$final_name = $file_name.'.'.$uploaded_file_name[1];

	$tmp_name=$_FILES['team_img']['tmp_name'];

	$target_path="images/students/";

	$target_path=$target_path.basename($final_name);

	move_uploaded_file($_FILES['team_img']['tmp_name'],$target_path);

	$conn->exec("UPDATE `student_reg` SET `stu_image` = '$final_name' WHERE `student_reg`.`stu_id` = $userid");

	header("location:index.php");
?>

Zerion Mini Shell 1.0