Server : LiteSpeed
System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User : outerorb ( 1091)
PHP Version : 8.1.34
Disable Function : mail
Directory :  /home2/outerorb/dev.outerorbittech.com/portfolio/dp/

📁 Create New:
⬆️ Upload File:
Current Dir [ Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: dpupdate.php

Path: /home2/outerorb/dev.outerorbittech.com/portfolio/dp/dpupdate.php

Size: 1.13 KB

Permissions: 0644

<?php
// photo check 
function photocheck()
{
	if($_FILES['m']['name']!='')
	{
	$fn=$_FILES['m']['name'];
	$ln=strlen($fn);
	$pos=strrpos($fn,'.');
	$cut=substr($fn,$pos+1,$ln);
		$ext=array('jpg','png','jfif','bmp','JPG','jpeg','webp');
		if(in_array($cut,$ext))
		{
			return 'y';
		}
		else 
		{
			return 'n';
		}
	}
	else 
	{
		return 'yy';
	}
}


if(isset($_POST['s']))
{
	//Photo check
	if(photocheck()=='n')
	{
		$ms="** check photo";
	}
	$did=$_POST['did'];
include"../connection.php";
$dt=Date('Y-m-d');
		if(photocheck()=='y')
		{
            $fn=$_FILES['m']['name'];
            $ta=$_FILES['m']['tmp_name'];
            $fa='dpimg/'.uniqid().$fn;
            move_uploaded_file($ta,$fa);
	
	$q="update dp
    set dpimg='".$fa."'
where did='".$did."'";
	
		}
		else if(photocheck()=='yy')
		{
			$q="update dp
    set dpimg='".$fa."'
where did='".$did."'";
		}
	
	// 	echo '<img src="'.$fa.'" width="100" height="100">';
	//

	/// khela start insert 
		
$sq=mysqli_query($cn,$q);
if($sq)
{
echo '<script>alert("UPDATED");</script>';

header("location:../Admin/home/index.php");
}
else 
{
echo '<br>'.mysqli_error($cn);
}


///		khela end 

}	

?>

← Back to Directory Edit File 🔒 Chmod

WP File Manager