( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/includes/codeUpdate.php
<?php

 							 $style=$row['deformation']['font-style'];
							 $name=$row['deformation']['font-family'];
							   

							
							 
							$weight=$row['static_styles']['font-weight']['desktop'];

   							$checkFontZ =   checkFontZ($name);
							
							if(!empty($checkFontZ))
							{
								
							$myfont = $checkFontZ;
							$fontPath = "assets/newfont";
								
							}
							else
							{
							
							$myfont =   checkFontX($name,$weight,$style);
							$fontPath = "assets/fonts";

							}
							
							
								
							
							$font_Username=$row['text'];
							$font_Name=$row['text'];
							$font_Url=$row['text'];
							$font_Text=$row['text'];
							                            		
							 

	$text_h_max=$row['max_height']['desktop'];	 					
$text_w_max=$row['max_width']['desktop']; 
 if (strpos($text_w_max, 'px') !== false)
 {$text_w_max = str_replace("px","",$text_w_max) ;  }
 
if (strpos($text_w_max, '%') !== false)
 {$text_w_max = str_replace("%","",$text_w_max) ;
  
  $row = getParamJSONTheme($themeid);
  
  $params = json_decode("[".$row['params']."]");
$widthX = $params[0]->width;
 $text_w_max = $widthX;
 
 
 }


 
	   if (strpos($text_h_max, '%') !== false )
 {
		   $text_h_max = str_replace("%","",$text_h_max) ;
  
  $row = getParamJSONTheme($themeid);
  
  $params = json_decode("[".$row['params']."]");
 
  $heightX = $params[0]->height;
 
   $text_h_max = $heightX;
 
 
 }
	   

 
	 

 
$text_w="$text_w_max"; 
$text_h="$text_h_max"; 
							$text_h=$row['height'];
 
							$text_x=$row['left']['desktop']; 
							$text_y=$row['top']['desktop'];
							$text_align=$row['text-align']['desktop'];
							if($text_align == "inherit"){$text_align ="left";}
							$text_size=$row['static_styles']['font-size']['desktop']-4;
							$text_size=$text_size;
							$text_color=$row['static_styles']['color']['desktop'];
							$url_color=$row['static_styles']['color']['desktop'];
							$name_color=$row['static_styles']['color']['desktop'];
							$username_color=$row['static_styles']['color']['desktop'];
							$url_size=$row['static_styles']['font-size']['desktop'];
							$name_size=$row['static_styles']['font-size']['desktop'];
							$username_size=$row['static_styles']['font-size']['desktop'];
							$text_pad=$row['static_styles']['padding']['desktop'][1];
							$text_pad=0;
							$text_line_height=$row['static_styles']['line-height']['desktop'] ;
							$text=$row['text'];
							
 					 $layer_x=$row['left']['desktop'];

 
					 $layer_y=$row['top']['desktop'];
 					  $layer_w=$row['width']; 
					 $layer_h=$row['height'];


 
					 $layeropacity=$row['deformation']['opacity'];
				 $layer_r=$row['deformation']['xrotate'];
					 
					 							   
						 
                             		if (empty($_GET['cl']))  
									  { 
									  $text = realText() ; 
									  } 
									  else 
									  { 
									  $text = dummyText(); 
									  }			 
						
                           	
						 $angle = $row['deformation']['xrotate'];
						 $underline=$row['deformation']['text-decoration'];
						 if($underline == "underline"){$underline = 1;} else {$underline = 0;}
						
						$font_Text =   "$fontPath/$myfont"; //font used
 
								if(empty($myfont)) {
								 
								
								$myfont = "$name.ttf";
								$fontPath = "assets/fonts/";
								$font_Text ="$fontPath/$myfont";
								
								
								}
							 
							

 
					   
					$text = str_replace("amp;","&",$text);
					$text = str_replace("*machine","",$text);
					$text = str_replace("altasterisk","* ",$text);	 
					 $text = str_replace("althashtag","#",$text);
					 $text = str_replace("altat","@ ",$text);
					 $checkALT=$row['alt'];
					 
					 
				
					 if($check=="theName")
					{ 
                    
						$text = name(); 		
					} 

					if($check=="theUser")
					{ 
                    
						$text = user(); 	
					} 
					if($check=="theWeb")
					{ 
                     $text = web(); 
						

					} 
					if($check=="thePlain")
					{ 
						$text = $row['text']; 
 					} 

					if($check=="theDate")
					{ 
								$date =date('d/m/Y ');
									$text = $date;

					} 

					if($check=="theTime")
					{ 
									$date =date('H:i');
									$text = $date;

					} 

					if($check=="theRandom")
					{ 
								$rand =rand(11111111,99999999);
									$text = $rand;

					}  	 
					 
						if($check=="theBio")
					{ 
								 $description = "description";
									/*$text = getuserDetails($description);*/
							/*$text = bio();*/
							 $campaign =   $_GET["campaign"]; 
							
							 $text =  autonumber($campaign);
					 

					}  	 

    	 
	

 					if($check=="theDescriptihon")
					{ 
						 
			
						if (strpos($text, '||') !== false) {
						
						
						$text = explode("||", $text);
							
							if(!empty($text[1])){$text =$text[1]; }
							/*if(!empty($text[2])){$text =$text[2]; }
							if(!empty($text[3])){$text =$text[3]; }
							if(!empty($text[4])){$text =$text[4]; }
							if(!empty($text[5])){$text =$text[5]; }
							if(!empty($text[6])){$text =$text[6]; }
							if(!empty($text[7])){$text =$text[7]; }
							if(!empty($text[8])){$text =$text[8]; }
							if(!empty($text[9])){$text =$text[9]; }
							if(!empty($text[10])){$text =$text[10]; }*/
						 
							
							
						
						
					}
						 else
						 
						 {
							 
							 $text = "";
							 
						 }
						
						
					}




					 
					 if($check=="theUpdate")
					{ 
						 
						 
						
					 	if (strpos($text, '||') !== false) {
						
						
						$text = explode("||", $text);
						$text =$text[0]; // piece1
						
						
					}
						 else
						 
						 {
							 
							 $text =  $text ;
							 
						 }
						 
                   

					} 

 					if($text=="dayFunc")
					{ 
                   $text = date('d/m/Y ');

					} 
					 
					 if($text=="timeFunc")
					{ 
                   $text = date('H:i');

					} 


$case=strtolower($row['deformation']['text-transform']);
					if($case=="uppercase")
					{ 
                   $text = strtoupper($text);

					} 
					if($case=="lowercase")
					{ 
                   $text = strtolower($text);

					} 
					if($case=="capitalize")
					{ 
                   $text = ucwords($text);

					} 
					if($case=="none")
					{ 
                   $text = $text;

					} 







  if (strpos($text_w_max, 'auto') !== false || strpos($text_h_max, 'auto') !== false)
 {
	$text_size = "$text_size";
	 
$type_space = imagettfbbox($text_size, 0, $font_Text, $text);

// Determine image width and height, 10 pixels are added for 5 pixels padding:
$text_w_max = abs($type_space[4] - $type_space[0]) + 40;
$text_h_max = abs($type_space[5] - $type_space[1]) + 10;
	 
	  
	 
  
 	$backgroundWidth = $text_w_max;
 
$backgroundHeight = $text_h_max;
 
 }
else

{
	
	$backgroundWidth = $text_w;
$backgroundHeight = 0;
$backgroundHeight = $text_h;
}
					 
	

/* exit("$text");	*/
					

					 

if(!empty($_GET['mapBrand'])){ $text = "Layer".$row['zIndex']." - ".$row['alt'];}


 



if(!empty($_GET['mapBrand'])){ $text = "Layer".$row['zIndex']." - ".$row['alt'];}


 if(!empty($_GET['mydata']))
 { 
	 $mydataID= $_GET['mydataID'];
	   $mydataRecord =$_GET['mydataRecord'];
	 
	 $rowJSON = getLayerDetailsJSON($mydataID);
	  $json = $rowJSON['text'];
	 $per_page = 1; 
	
    $array = json_decode($json,true);
	$array =  array_slice($array, $mydataRecord, $per_page);
	 /*print_r($array);*/
	 
	
	 
	  $searchTerm = "Layer".$row['zIndex'];
	
	 $rowX = getLayerDetailsOrder($searchTerm,$mydataID);
	if(!empty($rowX['title'])){
    $cat =  str_replace("column","",$rowX['cat']) ;;
			$text= $array[0]["column".$cat];				  

 } 
							} 


WriteCaption2($background,$text_size
,$text_color,$text_color,$text_line_height,$text_align,$angle,$underline,$font_Text,$backgroundWidth,$backgroundHeight,$layer_y,$text_pad,$backgroundColor,$layer_x,$text,$text_h_max);