403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/rsdgroup/adminPanel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rsdgroup/adminPanel/write_product.php
<?php
include_once("session.php");
include_once("settings.php");
foreach ($_REQUEST as $key => $value)
{
        $$key = $value;
}
 $Product_Key  = str_replace(' ','-',$Product_Name);

 $Product_Description=addslashes($Product_Description); 
 
 $Product_Composition=addslashes($Product_Composition);
 $Product_Shelf_Life=addslashes($Product_Shelf_Life);
 $Product_Storage_Condition=addslashes($Product_Storage_Condition); 
 
 $Benefits_Usage=addslashes($Benefits_Usage); 
 $Dosage=addslashes($Dosage);
 $Benefits=addslashes($Benefits);
 $Specification=addslashes($Specification);
 $target_path = "../cat_images/products/";
 $target_path1 = "../cat_images/headerImage/";
  
  $prefix=time();
  $target_path = $target_path . basename($prefix.$_FILES['image']['name']); 
  
//  $target_path_large = $target_path . basename($prefix.$_FILES['Large_Image']['name']); 
//  $target_path_medium = $target_path . basename($prefix.$_FILES['Medium_Image']['name']); 
//  $target_path_small = $target_path . basename($prefix.$_FILES['Small_Image']['name']);   
  
  $target_path1 = $target_path1 . basename($prefix.$_FILES['header']['name']); 
  
 
  
  $availabilityPath = "../cat_images/products/";
  
if($_REQUEST['mode']=="Edit")
{	
    $Product_Key = sanitize_data(@$Product_Name);
	if($_FILES['image']['name']!="")
	{
	   if(move_uploaded_file($_FILES['image']['tmp_name'], $target_path)) 
		{
			chmod($target_path,0777); 
			//echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
			$upload_image=basename($prefix.$_FILES['image']['name']);				
		}		
	mysql_query("update  `tblProduct` set `Product_Name`='$Product_Name',`Large_vol`='$Large_vol',`Medium_vol`='$Medium_vol',`Small_vol`='$Small_vol',`product_key`='$Product_Key',`Product_Image`='$upload_image',`Species_Id`='$Species_Id',`Category_Id`='$Category_Id',`Tag_Line`='$Tag_Line',`Product_Description`='$Product_Description',`Benefits_Usage`='".$Benefits_Usage."',`Product_Storage_Condition`='".$Product_Storage_Condition."',`Product_Shelf_Life`='".$Product_Shelf_Life."',`Product_Composition`='".$Product_Composition."',`Benefits`='$Benefits',`Dosage`='$Dosage',`Specification`='$Specification',`metaDescription`='$metaDescription',`metaTitle`='$metaTitle',`metaKeyword`='$metaKeyword' where `Product_Id`='$id'");
	}
        
	if($_FILES['header']['name']!="")
	{
	   if(move_uploaded_file($_FILES['header']['tmp_name'], $target_path1)) 
		{
			chmod($target_path1,0777); 
			//echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
			$upload_header=basename($prefix.$_FILES['header']['name']);				
		}	
		mysql_query("update  `tblProduct` set `Product_Name`='$Product_Name',`Large_vol`='$Large_vol',`Medium_vol`='$Medium_vol',`Small_vol`='$Small_vol',`product_key`='$Product_Key',`Product_Header`='$upload_header',`Species_Id`='$Species_Id',`Category_Id`='$Category_Id',`Tag_Line`='".mysql_real_escape_string($Tag_Line)."',`Product_Description`='$Product_Description',`Benefits_Usage`='".$Benefits_Usage."',`Product_Storage_Condition`='".$Product_Storage_Condition."',`Product_Shelf_Life`='".$Product_Shelf_Life."',`Product_Composition`='".$Product_Composition."',`Benefits`='$Benefits',`Dosage`='$Dosage',`Specification`='$Specification',`metaDescription`='$metaDescription',`metaTitle`='$metaTitle',`metaKeyword`='$metaKeyword' where `Product_Id`='$id'");	
	}
        
        
        if($_FILES['Large_Image']['name']!="")
	{ $Large_Image = basename($prefix.$_FILES['Large_Image']['name']);
	   if(move_uploaded_file($_FILES['Large_Image']['tmp_name'], $availabilityPath.$Large_Image)) 
		{
			chmod($target_path1,0777); 
			//echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
							
		}	
		mysql_query("update  `tblProduct` set `Product_Name`='$Product_Name',`Large_Image`='$Large_Image',`Large_vol`='$Large_vol',`Medium_vol`='$Medium_vol',`Small_vol`='$Small_vol',`product_key`='$Product_Key',`Product_Header`='$upload_header',`Species_Id`='$Species_Id',`Category_Id`='$Category_Id',`Tag_Line`='".mysql_real_escape_string($Tag_Line)."',`Product_Description`='$Product_Description',`Benefits_Usage`='".$Benefits_Usage."',`Product_Storage_Condition`='".$Product_Storage_Condition."',`Product_Shelf_Life`='".$Product_Shelf_Life."',`Product_Composition`='".$Product_Composition."',`Benefits`='$Benefits',`Dosage`='$Dosage',`Specification`='$Specification',`metaDescription`='$metaDescription',`metaTitle`='$metaTitle',`metaKeyword`='$metaKeyword' where `Product_Id`='$id'");	
	}
        
        
        
        if($_FILES['Medium_Image']['name']!="")
	{ $Medium_Image=basename($prefix.$_FILES['Medium_Image']['name']);	
	   if(move_uploaded_file($_FILES['Medium_Image']['tmp_name'], $availabilityPath.$Medium_Image))
            {
                    chmod($target_path1,0777); 
                   // echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
                   			
            }
		mysql_query("update `tblProduct` set `Product_Name`='$Product_Name',`Medium_Image`='$Medium_Image',`Large_vol`='$Large_vol',`Medium_vol`='$Medium_vol',`Small_vol`='$Small_vol',`product_key`='$Product_Key',`Product_Header`='$upload_header',`Species_Id`='$Species_Id',`Category_Id`='$Category_Id',`Tag_Line`='".mysql_real_escape_string($Tag_Line)."',`Product_Description`='$Product_Description',`Benefits_Usage`='".$Benefits_Usage."',`Product_Storage_Condition`='".$Product_Storage_Condition."',`Product_Shelf_Life`='".$Product_Shelf_Life."',`Product_Composition`='".$Product_Composition."',`Benefits`='$Benefits',`Dosage`='$Dosage',`Specification`='$Specification',`metaDescription`='$metaDescription',`metaTitle`='$metaTitle',`metaKeyword`='$metaKeyword' where `Product_Id`='$id'");	
	}
        
        
        if($_FILES['Small_Image']['name']!="")
	{ $Small_Image=basename($prefix.$_FILES['Small_Image']['name']);	
	   if(move_uploaded_file($_FILES['Small_Image']['tmp_name'], $availabilityPath.$Small_Image))
            {
                    chmod($target_path1,0777); 
                   // echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
                    			
            }
            mysql_query("update `tblProduct` set `Product_Name`='$Product_Name',`Small_Image`='$Small_Image',`Large_vol`='$Large_vol',`Medium_vol`='$Medium_vol',`Small_vol`='$Small_vol',`product_key`='$Product_Key',`Product_Header`='$upload_header',`Species_Id`='$Species_Id',`Category_Id`='$Category_Id',`Tag_Line`='".mysql_real_escape_string($Tag_Line)."',`Product_Description`='$Product_Description',`Benefits_Usage`='".$Benefits_Usage."',`Product_Storage_Condition`='".$Product_Storage_Condition."',`Product_Shelf_Life`='".$Product_Shelf_Life."',`Product_Composition`='".$Product_Composition."',`Benefits`='$Benefits',`Dosage`='$Dosage',`Specification`='$Specification',`metaDescription`='$metaDescription',`metaTitle`='$metaTitle',`metaKeyword`='$metaKeyword' where `Product_Id`='$id'");
	}        
        
         mysql_query($sql="update  `tblProduct` set `Product_Name`='$Product_Name',`Large_vol`='$Large_vol',`Medium_vol`='$Medium_vol',`Small_vol`='$Small_vol',`product_key`='$Product_Key',`Species_Id`='$Species_Id',`Category_Id`='$Category_Id',`Tag_Line`='".mysql_real_escape_string($Tag_Line)."',`Product_Description`='$Product_Description',`Benefits_Usage`='".$Benefits_Usage."',`Product_Storage_Condition`='".$Product_Storage_Condition."',`Product_Shelf_Life`='".$Product_Shelf_Life."',`Product_Composition`='".$Product_Composition."',`Benefits`='$Benefits',`Dosage`='$Dosage',`Specification`='$Specification',`metaDescription`='$metaDescription',`metaTitle`='$metaTitle',`metaKeyword`='$metaKeyword' where `Product_Id`='$id'");
		
}
else
{
	if($_FILES['image']['name']!="")
	{
	   if(move_uploaded_file($_FILES['image']['tmp_name'], $target_path)) 
            {
                    chmod($target_path,0777); 
                    //echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
                    $upload_image=basename($prefix.$_FILES['image']['name']);				
            }		
	}
	if($_FILES['header']['name']!="")
	{
	   if(move_uploaded_file($_FILES['header']['tmp_name'], $target_path1)) 
		{
			chmod($target_path1,0777); 
			//echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
			$upload_header=basename($prefix.$_FILES['header']['name']);				
		}		
	}
        
        
        
         if($_FILES['Large_Image']['name']!="")
	{  $Large_Image=basename($prefix.$_FILES['Large_Image']['name']);
	   if(move_uploaded_file($_FILES['Large_Image']['tmp_name'], $availabilityPath.$Large_Image)) 
		{
			chmod($target_path1,0777); 
			//echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
							
		}	

	}
        
        
        if($_FILES['Medium_Image']['name']!="")
	{  $Medium_Image=basename($prefix.$_FILES['Medium_Image']['name']);	
	   if(move_uploaded_file($_FILES['Medium_Image']['tmp_name'], $availabilityPath.$Medium_Image))
            {
                    chmod($target_path1,0777); 
                   // echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
                   			
            }
	
	}
        
        
        if($_FILES['Small_Image']['name']!="")
	{  $Small_Image=basename($prefix.$_FILES['Small_Image']['name']);
	   if(move_uploaded_file($_FILES['Small_Image']['tmp_name'], $availabilityPath.$Small_Image))
            {
                    chmod($target_path1,0777); 
                   // echo "The file ". basename( $_FILES['file']['name']). " has been uploaded";
                   				
            }
            
	}          
	mysql_query("insert into `tblProduct` (`Product_Id`,`Species_Id`,`Category_Id`,`Product_Name`,`product_key`,`Product_Image`,`Product_Header`,`Tag_Line`,`Large_Image`,`Medium_Image`,`Small_Image`,`Large_vol`,`Medium_vol`,`Small_Vol`,`Product_Description`,`Benefits_Usage`,`Product_Composition`,`Product_Shelf_Life`,`Product_Storage_Condition`,`Benefits`,`Dosage`,`Specification`,`metaTitle`,`metaKeyword`,`metaDescription`) values ('','$Species_Id','$Category_Id','$Product_Name','$Product_Key','$upload_image','$upload_header','".mysql_real_escape_string($Tag_Line)."','$Large_Image','$Medium_Image','$Small_Image','$Large_vol','$Medium_vol','$Small_vol','$Product_Description','$Benefits_Usage','$Product_Composition','$Product_Shelf_Life','$Product_Storage_Condition','$Benefits','$Dosage','$Specification','$metaTitle','$metaKeyword','$metaDescription')");
}
?>
<script>
document.location="product_list.php?page=listproduct";
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit