( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
if(!empty($_GET['convoId']))
{
$rowTweets = getEachJSONTweets($_GET['convoId']);
$data ="[$rowTweets]";
$json = json_decode($data);
}
/*print_r($characters);
exit("");*/
foreach ($characters as $row) {
$layerType = $row['alt'] ;
$check = checkTypeX($layerType);
/* $filename = "v/uploads/raw/cf8b44b8a5faa9f819f1a8c7aac6a168.jpg";
$backgroundX_s = imagecreatefromstring(file_get_contents($filename));
$width = imagesx($backgroundX_s);
$height = imagesy($backgroundX_s);
$newwidth = 200;
$newheight = 200;
$backgroundX = imagecreatetruecolor($newwidth, $newheight);
imagealphablending($backgroundX, true);
imagecopyresampled($backgroundX, $backgroundX_s, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
//create masking
$mask = imagecreatetruecolor($newwidth, $newheight);
$transparent = imagecolorallocate($mask, 255, 0, 0);
imagecolortransparent($mask,$transparent);
imagefilledellipse($mask, $newwidth/2, $newheight/2, $newwidth, $newheight, $transparent);
$red = imagecolorallocate($mask, 0, 0, 0);
imagecopymerge($backgroundX, $mask, 0, 0, 0, 0, $newwidth, $newheight, 100);
imagecolortransparent($backgroundX,$red);
imagefill($backgroundX, 0, 0, $red);
imagecopyresampled($background, $backgroundX, 0, 0, 0, 0, 200, 200, 600, 600); */
/* $x =10; $y =10;$width =100;$height =100; $start =100; $end =300; $color="ffffff";
$background = arc($x, $y, $width, $height, $start, $end, $color, $thickness = 5); */
/*require_once('codeProfilePic.php'); */
if($check=="the3D")
{
include('3dText.php');
}
if($check=="theShape")
{
//shape
$text_w_max=$row['max_width']['desktop'];
$text_h_max=$row['max_height']['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";
$y1=$row['top']['desktop'];$x1=$row['left']['desktop'];
$layer_w=$text_w;
$layer_h=$text_h;
$layeropacity=$row['deformation']['opacity'];
$color=$row['deformation']['background-color'];
$rad=$row['deformation']['border-radius'][0];
$opacity=$row['deformation']['opacity'];
list($fontColorRed, $fontColorBlue, $fontColorGreen) = hex2rgb($color);
$color = imagecolorallocatealpha($background, $fontColorRed, $fontColorBlue, $fontColorGreen, $opacity);
$x2=$x1+$layer_w; $y2=$y1+$layer_h;
imagefilledrectangle($background, $x1+$rad, $y1, $x2-$rad, $y2, $color);
imagefilledrectangle($background, $x1, $y1+$rad, $x2, $y2-$rad, $color);
// draw circled corners
imagefilledellipse($background, $x1+$rad, $y1+$rad, $rad*2, $rad*2, $color);
imagefilledellipse($background, $x2-$rad, $y1+$rad, $rad*2, $rad*2, $color);
imagefilledellipse($background, $x1+$rad, $y2-$rad, $rad*2, $rad*2, $color);
imagefilledellipse($background, $x2-$rad, $y2-$rad, $rad*2, $rad*2, $color);
}
if($check=="theGraphics")
{
$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'];
$str = $row['image_url'];
$str =basename($str);
$background = gd_apply_graphics($background, $str, $layeropacity,$layer_x,$layer_y,$layer_w,$layer_h,$layer_r);
/*$background = gd_apply_graphics($background, $str, 100,$x,$y,$w,$h);*/
/* exit($newPic);
if (!empty($_GET['newPic']))
{
$newPic = $_GET['newPic'];
$background = gd_apply_logo($background, $newPic, $layeropacity,$x,$y,$w,$h);
}*/
}
if($check=="theProfile")
{
$picme=profilepicture();
$layer_x=$row['left']['desktop'];
$layer_y=$row['top']['desktop'];
$layer_w=$row['width'];
$layer_h=$row['height'];
$layeropacity=$row['deformation']['opacity'];
$x =$layer_x; $y=$layer_y; $w=$layer_w; $h=$layer_h;
$layeropacity=$layeropacity;
}
if($check=="theUpdate" || $check=="theDate" || $check=="theName" || $check=="theUser" || $check=="theWeb" || $check=="thePlain" || $check=="theTime" || $check=="theRandom" || $check=="theBio")
{
include('codeUpdate.php');
}
if($check=="theDescription")
{
include('codeDatasets.php');
}
/*if($check=="theName")
{
include('codeName.php');
}
if($check=="theUser")
{
include('codeUser.php');
}
if($check=="theUrl")
{
include('codeUrl.php');
}
if($check=="thePlain")
{
include('codePlain.php');
}
if($check=="theDate")
{
include('codeDate.php');
}
if($check=="theTime")
{
include('codeTime.php');
}
if($check=="theRandom")
{
include('codeRandom.php');
} */
if($check=="Uploaded")
{
include('codeUploaded.php');
}
if($check=="UploadedProfile")
{
include('codeUploadedProfile.php');
} if($check=="theMood")
{
include('codeMood.php');
}
if (empty($_GET['newCollage']))
{
if($check=="theDynamicBackground") {
include('codeDynamicBackground.php');}
if($check=="theDynamicTransparent") {
include('codeDynamicTransparent.php');
}
if($check=="theDynamicImage") {
include('codeDynamicImage2.php');
/*if(!empty($_GET['convoId']))
{
$tweetIDX = trim($_GET['tweetIDX']);
$rowCount = getEachTweetPictureCount("$tweetIDX");
$rowCount = (int)$rowCount["ngapi"];
if($rowCount > 0){
include('codeTwitter.php');
}
}*/
}
}
}
/**/