( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ 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/tmpr/../tmpr/../tmpr/..//tmpr/..//tmpr/..//includes/newCollage.php
<?php  
$themeid = $_GET["theme_id"];
 $row = getParamJSONTheme($themeid);

	
 if(!empty($row['params'])){
  $params = json_decode("[".$row['params']."]");
$width = $params[0]->width;
  $height = $params[0]->height;

 }
else
{
$width =600;
  $height = 600;
}


//display grid
//makeGrid($background,$gridWidth, $gridHeight, $width, $height)


/* makeGrid($background,10, 10, $width,$height);*/

//Make rectangle
// makeRectangle($background,$sizeW, $sizeH, $posX, $posY,$gridWidth,$gridHeight, $width, $height)

/*makeRectangle($background,5, 5, 3, 2,10,10, $width,$height);	*/

$string = $_GET["pics"];
$string = str_replace("null,","", $string);
$string = str_replace("null","", $string);
$str_arr = explode (",", $string);  
$str_arr =array_unique($str_arr);
$str_arr = array_values($str_arr);
 
  $count = count($str_arr); 	
  
 $fileServer ="v/uploads/gthumbs/";
  /*exit("$count"); */
/* MakeGridPicture($background, $brand, 100,$sizeW, $sizeH, $posX, $posY,$gridWidth,$gridHeight, $width, $height);			
*/	
	
			   switch ($count) {
				case "1": //1
				 if (file_exists($fileServer.checkBg($str_arr[0]))) 
				 {
				  
				MakeGridPicture($background, checkBg($str_arr[0]), 100,10,10, 0, 0,10,10, $width,$height);
                 }
					break;
				case "2"://2
				 if (file_exists($fileServer.checkBg($str_arr[1]))) 
				 {
                    MakeGridPicture($background, checkBg($str_arr[0]), 100,5,10, 0, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,5,10, 5, 0,10,10, $width,$height);}
					break;
				case "3"://3
				 if (file_exists($fileServer.checkBg($str_arr[2]))) 
				 {
					 
				 
                    MakeGridPicture($background, checkBg($str_arr[0]), 100,3,10, 0, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,4,10, 3, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[2]), 100,3,10, 7, 0,10,10, $width,$height);}
 					break;


				case "4": // 4
				 if (file_exists($fileServer.checkBg($str_arr[3]))) 
				 {
                     MakeGridPicture($background, checkBg($str_arr[0]), 100, 5,5,0, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[1]), 100, 5,5, 5, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[2]), 100,5,5, 0, 5,10,10, $width,$height);
                    
					MakeGridPicture($background, checkBg($str_arr[3]), 100,5,5, 5, 5,10,10, $width,$height);
					}

 					break;


				case "5"://5
				 if (file_exists($fileServer.checkBg($str_arr[4]))) 
				 {
	                    MakeGridPicture($background, checkBg($str_arr[0]), 100,3,5, 0, 0,10,10, $width,$height);
			 
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,4,10, 3, 0,10,10, $width,$height);
				 
                    MakeGridPicture($background, checkBg($str_arr[2]), 100,3,5, 7, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[3]), 100,3,5, 0, 5,10,10, $width,$height);
					 MakeGridPicture($background, checkBg($str_arr[4]), 100,3,5, 7, 5,10,10, $width,$height);
             
				 
					 
				}
				break;


				case "6"://6
				 if (file_exists($fileServer.checkBg($str_arr[5]))) 
				 {
                    MakeGridPicture($background, checkBg($str_arr[0]), 100,3,5, 0, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,4,5, 3, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[2]), 100,3,5, 7, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[3]), 100,3,5, 0, 5,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[4]), 100,4,5, 3, 5,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[5]), 100,3,5, 7, 5,10,10, $width,$height);}
 					break;
					case "7"://7
				 if (file_exists($fileServer.checkBg($str_arr[6]))) 
				 {
                    MakeGridPicture($background, checkBg($str_arr[0]), 100,3,5, 0, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,4,3, 3, 0,10,10, $width,$height);


                    MakeGridPicture($background, checkBg($str_arr[2]), 100,4,3, 3, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[3]), 100,4,4, 3, 3,10,10, $width,$height);
 
                    MakeGridPicture($background, checkBg($str_arr[4]), 100,3,5, 7, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[5]), 100,3,5, 0, 5,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[6]), 100,3,5, 7, 5,10,10, $width,$height);
		 
					}
 					break;


 				case "8":
				 if (file_exists($fileServer.checkBg($str_arr[7]))) 
				 {
						 
				 
                    MakeGridPicture($background, checkBg($str_arr[0]), 100,3,3, 0, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,4,3, 3, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[2]), 100,3,3, 7, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[3]), 100,5,4, 0, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[4]), 100,5,4, 5, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[5]), 100,4,3, 3, 7,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[6]), 100,3,3, 0, 7,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[7]), 100,3,3, 7, 7,10,10, $width,$height);
					}
 					break;


 				case "9":
				 if (file_exists($fileServer.checkBg($str_arr[8]))) 
				 {
                    MakeGridPicture($background, checkBg($str_arr[0]), 100,3,3, 0, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,4,3, 3, 0,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[2]), 100,3,3, 7, 0,10,10, $width,$height);
                     MakeGridPicture($background, checkBg($str_arr[3]), 100,3,4, 0, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[4]), 100,4,4, 3, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[5]), 100,3,4,7, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[6]), 100,4,3, 3, 7,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[7]), 100,3,3, 0, 7,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[8]), 100,3,3, 7, 7,10,10, $width,$height);
					}
 					break;

 				case "10":
				 if (file_exists($fileServer.checkBg($str_arr[9]))) 
				 {
                    MakeGridPicture($background, checkBg($str_arr[0]), 100,7,3, 0, 0,10,10, $width,$height);
				 
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,3,3, 7, 0,10,10, $width,$height);
                     MakeGridPicture($background, checkBg($str_arr[2]), 100,3,2, 0, 3,10,10, $width,$height);
					 
                    MakeGridPicture($background, checkBg($str_arr[3]), 100,4,2, 3, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[4]), 100,3,2,7, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[5]), 100,3,2, 0, 5,10,10, $width,$height);
					 
                    MakeGridPicture($background, checkBg($str_arr[6]), 100,4,2, 3, 5,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[7]), 100,3,2,7, 5,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[8]), 100,7,3, 3, 7,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[9]), 100,3,3, 0, 7,10,10, $width,$height);
					 }
 					break;
default:

                    MakeGridPicture($background, checkBg($str_arr[0]), 100,7,3, 0, 0,10,10, $width,$height);
				 
                    MakeGridPicture($background, checkBg($str_arr[1]), 100,3,3, 7, 0,10,10, $width,$height);
                     MakeGridPicture($background, checkBg($str_arr[2]), 100,3,2, 0, 3,10,10, $width,$height);
					 
                    MakeGridPicture($background, checkBg($str_arr[3]), 100,4,2, 3, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[4]), 100,3,2,7, 3,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[5]), 100,3,2, 0, 5,10,10, $width,$height);
					 
                    MakeGridPicture($background, checkBg($str_arr[6]), 100,4,2, 3, 5,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[7]), 100,3,2,7, 5,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[8]), 100,7,3, 3, 7,10,10, $width,$height);
                    MakeGridPicture($background, checkBg($str_arr[9]), 100,3,3, 0, 7,10,10, $width,$height);
			}
?>