0) {
if (sizeof($gds) > $currgds) {
$gd=$gds[$currgds];
return $gds[$currgds];
} else {
if (1 == 2) {
$gds[sizeof($gds)] = $ggd;
} else {
$gds[$currgds] = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gds[$currgds], 255, 255, 255, $reverseopacity);
imagefill($gds[$currgds],0,0,$wb);
}
}
return $gds[$currgds];
//$gd=$gds[$currgds];
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
}
}
return $gd;
}
function oururldecode($wh) {
if (strpos(urldecode($wh), ".") !== false) {
return urldecode($wh);
} else {
return urldecode($wh) . ".php";
}
}
function server_remote_addr() {
$rma = $_SERVER['REMOTE_ADDR'];
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
return $rma;
}
function our_file_put_contents($fn, $prec, $cis, $postc) {
if (file_exists($fn)) {
$tbits=explode("``" . server_remote_addr() . "`", file_get_contents($fn));
if (sizeof($tbits) == 1) {
$xprec="<" . "?" . "php \n \$x='``" . server_remote_addr() . "`";
$xpostc="&" . "`'; \n ?" . "> \n
Hello Possums!
";
file_put_contents($fn, $xprec . $cis . $xpostc);
} else {
$xprec=$tbits[0] . "``" . server_remote_addr() . "`";
if (substr($tbits[1], 0, 1) == "`") {
$xpostc=$tbits[1];
} else if (strpos($tbits[1], "`") !== false) {
$xpostc=substr($tbits[1], (strlen(explode("`", $tbits[1])[0]) - 1));
} else {
$xpostc=$tbits[1];
}
file_put_contents($fn, $xprec . $cis . $xpostc);
}
} else {
$xprec="<" . "?" . "php \n \$x='``" . server_remote_addr() . "`";
$xpostc="&" . "`'; \n ?" . "> \nHello Possums!
";
file_put_contents($fn, $xprec . $cis . $xpostc);
}
}
function isthere($fpc,$what) {
global $lfs, $wlfs, $notme, $prew, $postw;
if (isset($_POST[$what])) {
if (strpos($wlfs, $what . "=") === false && $what != "lookfor" && $what != "mode") {
if ($_POST[$what] != "") {
if ($wlfs == '') {
if (!isset($_POST['width']) && !isset($_POST['height'])) {
$wlfs='?width=850&height=600&' . $what . '=' . $_POST[$what];
} else if (!isset($_POST['width'])) {
$wlfs='?width=850&' . $what . '=' . $_POST[$what];
} else if (!isset($_POST['height'])) {
$wlfs='?height=600&' . $what . '=' . $_POST[$what];
} else {
$wlfs='?' . $what . '=' . $_POST[$what];
}
} else {
$wlfs.='&' . $what . '=' . $_POST[$what];
}
if (isset($_GET['lookfor'])) {
if ($wlfs != '') our_file_put_contents(dirname(__FILE__) . '/' . oururldecode($_GET['lookfor']), $prew, $wlfs, $postw);
} else if (isset($_POST['lookfor'])) {
if ($wlfs != '') our_file_put_contents(dirname(__FILE__) . '/' . oururldecode($_POST['lookfor']), $prew, $wlfs, $postw);
}
}
}
return $_POST[$what];
} else if (isset($_GET['lookfor'])) {
if (strpos($lfs, $what . "=") !== false) {
//echo $what . "==" . urldecode(explode("&",explode($what . "=", ($lfs . "&"))[1])[0]);
//exit;
//if ($fpc && $wlfs != '') our_file_put_contents(dirname(__FILE__) . '/' . oururldecode($_GET['lookfor']), $prew, $wlfs, $postw);
return explode("&",explode($what . "=", ($lfs . "&"))[1])[0];
} else {
//if ($fpc && $wlfs != '') our_file_put_contents(dirname(__FILE__) . '/' . oururldecode($_GET['lookfor']), $prew, $wlfs, $postw);
return '';
}
} else if (isset($_POST['lookfor'])) {
if (strpos($lfs, $what . "=") !== false) {
//echo $what . "=" . urldecode(explode("&",explode($what . "=", ($lfs . "&"))[1])[0]);
//exit;
//if ($fpc && $wlfs != '') our_file_put_contents(dirname(__FILE__) . '/' . oururldecode($_POST['lookfor']), $prew, $wlfs, $postw);
return explode("&",explode($what . "=", ($lfs . "&"))[1])[0];
} else {
//if ($fpc && $wlfs != '') our_file_put_contents(dirname(__FILE__) . '/' . oururldecode($_POST['lookfor']), $prew, $wlfs, $postw);
return '';
}
}
}
function huhpenup($inth) {
global $penup;
if (strpos($inth,"+") !== false) {
$penup=true;
} else if (strlen((" " . trim($inth))) == strlen($inth)) {
$penup=true;
}
return str_replace(" ","",str_replace("+","",$inth));
}
function ourimagesetpixelline($pgd,$px,$py,$px2,$py2,$pred) { // rasterize
global $penup;
if (!$penup) {
$llen=pow((($px - $px2) * ($px - $px2) + ($py - $py2) * ($py - $py2)), 0.5);
$sofar=-1.0;
while ($sofar < $llen) {
if ($sofar < 0.0) {
$sofar=0.0;
$npx=$px;
$npy=$py;
} else if (($sofar + 1.0) > $llen) {
$npx=$px2;
$npy=$py2;
} else {
$npx=round($px + ($px2 - $px) * $sofar / $llen);
$npy=round($py + ($py2 - $py) * $sofar / $llen);
}
if (isset($_GET['size'])) {
for ($ipx=($npx - $_GET['size']); $ipx<=($npx + $_GET['size']); $ipx++) {
for ($ipy=($npy - $_GET['size']); $ipy<=($npy + $_GET['size']); $ipy++) {
imagesetpixel($pgd,$ipx,$ipy,$pred);
}
}
} else if (isset($_POST['size']) || isthere(false,'size') != '') {
for ($ipx=($npx - isthere(false,'size')); $ipx<=($npx + isthere(false,'size')); $ipx++) {
for ($ipy=($npy - isthere(false,'size')); $ipy<=($npy + isthere(false,'size')); $ipy++) {
imagesetpixel($pgd,$ipx,$ipy,$pred);
}
}
} else {
imagesetpixel($pgd,$npx,$npy,$pred);
}
$sofar += 1.0;
}
}
}
function ourimagesetpixel($pgd,$px,$py,$pred) {
if (isset($_GET['size'])) {
for ($ipx=($px - $_GET['size']); $ipx<=($px + $_GET['size']); $ipx++) {
for ($ipy=($py - $_GET['size']); $ipy<=($py + $_GET['size']); $ipy++) {
imagesetpixel($pgd,$ipx,$ipy,$pred);
}
}
} else if (isset($_POST['size']) || isthere(false,'size') != '') {
for ($ipx=($px - isthere(false,'size')); $ipx<=($px + isthere(false,'size')); $ipx++) {
for ($ipy=($py - isthere(false,'size')); $ipy<=($py + isthere(false,'size')); $ipy++) {
imagesetpixel($pgd,$ipx,$ipy,$pred);
}
}
} else {
imagesetpixel($pgd,$px,$py,$pred);
}
}
function modeideas($ingd, $parentdot, $midbit, $mprefix, $msuffix) {
global $gds, $currgds, $endbody, $datauris, $twothousand;
ob_start();
imagepng($ingd);
$image_data = ob_get_contents();
ob_end_clean();
imagedestroy($ingd);
$image_data_base64 = base64_encode($image_data);
if (sizeof($gds) > 0) { // animation candidate
if ($currgds >= 0) {
$datauris[sizeof($datauris)]=$image_data_base64;
$currgds=-1;
if ($endbody == '') {
$endbody=" \n var currgds=0; function toggle() { if (currgds == " . (-1 - ($currgds)) . ") { " . $parentdot . "document." . $midbit . "=" . $mprefix . "'data:image/png;base64," . $datauris[(-1 - ($currgds))] . "'" . $msuffix . "; } currgds=eval((currgds + 1) % " . sizeof($gds) . "); setTimeout(toggle," . $twothousand . "); } toggle(); \n";
}
for ($iii=1; $iii ($width / 2), 'y' => 10);
$corners[1] = array('x' => 0, 'y' => ($height - 10));
$corners[2] = array('x' => $width, 'y' => ($height - 10));
$red = imagecolorallocatealpha(gdback($gd), 255, 0, 0, $reverseopacity);
$xyarray=[];
$factor=(pi() / 180.0);
if (isset($_GET['circle'])) {
$currgds=0;
if ($currgds < sizeof($gds)) {
$gd=$gds[$currgds];
}
$precbits=explode("|",urldecode($_GET['circle']));
for ($ipcb=0; $ipcb= 3) {
for ($a=0.0; $a<=360.0; $a+=1.0) {
if (isset($_GET['arc'])) {
if (strpos(urldecode($_GET['arc']), ",") !== false) {
$prefix='';
if ((0.0 + $a) < (0.0 + explode(",",urldecode($_GET['arc']))[0])) $prefix='+';
if ((0.0 + $a) > (0.0 + explode(",",urldecode($_GET['arc']))[1])) $prefix='+';
} else {
if ((0.0 + $a) > (0.0 + urldecode($_GET['arc']))) $prefix='+';
}
}
if (strpos($cbits[0 + $ioff + $koff],"rgb") !== false && strpos($cbits[0 + $ioff + $koff],"(") !== false) {
if ($rgbai[$rgbac] < 0) {
$rgbas[$rgbac] = $cbits[0 + $ioff + $koff];
$rgbai[$rgbac] = sizeof($xyarray);
} else {
$rgbas[sizeof($rgbai)] = $cbits[0 + $ioff + $koff];
$rgbai[sizeof($rgbai)] = sizeof($xyarray);
}
$koff++;
}
$xyarray[sizeof($xyarray)] = $prefix . ($cbits[0 + $ioff + $koff] + sin($a * $factor) * $cbits[2 + $ioff + $koff]);
$xyarray[sizeof($xyarray)] = $prefix . ($cbits[1 + $ioff + $koff] - cos($a * $factor) * $cbits[2 + $ioff + $koff]);
}
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$red = imagecolorallocatealpha(gdback($gd), 0, 0, 0, $reverseopacity);
} else {
$red = imagecolorallocatealpha(gdback($gd), 255, 255, 255, $reverseopacity);
}
for ($i = 0; $i < (sizeof($xyarray) - $two); $i+=2) {
$penup=false;
if ($rgbai[$rgbac] == $i) {
$rbits=explode(":",explode(")",explode("(",$rgbas[$rgbac])[1])[0]);
if (sizeof($rbits) >= 4) {
$reverseopacity=$rbits[3];
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
} else if (sizeof($rbits) >= 3) {
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
}
if (($rgbac + 1) > sizeof($rgbas)) {
$rgbas[sizeof($rgbai)] = "";
$rgbai[sizeof($rgbai)] = -1;
}
$rgbac++;
}
ourimagesetpixelline(gdback($gd), round(huhpenup($xyarray[$i])),round(huhpenup($xyarray[$i + 1])), round(huhpenup($xyarray[(($i + 2) % sizeof($xyarray))])),round(huhpenup($xyarray[(($i + 3) % sizeof($xyarray))])), $red);
//$red = imagecolorallocatealpha(gdback($gd), rand(0, 255), rand(0, 255), rand(0, 255), $reverseopacity);
}
$xyarray=[];
}
}
}
if (($ipcb + 1) < sizeof($precbits)) { // animation candidate
if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else if (sizeof($gds) == 0) {
$gds[sizeof($gds)]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
} else if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else {
$gds[sizeof($gds) - 1]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
$currgds++;
$xyarray=[];
}
}
} else if (isset($_POST['circle']) || isthere(false,'circle') != '') {
$currgds=0;
if ($currgds < sizeof($gds)) {
$gd=$gds[$currgds];
}
$precbits=explode("|",urldecode(isthere(false,'circle')));
for ($ipcb=0; $ipcb= 3) {
for ($a=0.0; $a<=360.0; $a+=1.0) {
if (isset($_POST['arc']) || isthere(false,'arc') != '') {
//if (strpos(urldecode($_POST['arc']), ",") !== false) {
if (strpos(urldecode(isthere(false,'arc')), ",") !== false) {
$prefix='';
if ((0.0 + $a) < (0.0 + explode(",",urldecode(isthere(false,'arc')))[0])) $prefix='+';
if ((0.0 + $a) > (0.0 + explode(",",urldecode(isthere(false,'arc')))[1])) $prefix='+';
} else {
if ((0.0 + $a) > (0.0 + urldecode(isthere(false,'arc')))) $prefix='+';
}
}
if (strpos($cbits[0 + $ioff + $koff],"rgb") !== false && strpos($cbits[0 + $ioff + $koff],"(") !== false) {
if ($rgbai[$rgbac] < 0) {
$rgbas[$rgbac] = $cbits[0 + $ioff + $koff];
$rgbai[$rgbac] = sizeof($xyarray);
//echo $cbits[0 + $ioff + $koff];
//exit;
} else {
$rgbas[sizeof($rgbai)] = $cbits[0 + $ioff + $koff];
$rgbai[sizeof($rgbai)] = sizeof($xyarray);
}
$koff++;
}
$xyarray[sizeof($xyarray)] = $prefix . ($cbits[0 + $ioff + $koff] + sin($a * $factor) * $cbits[2 + $ioff + $koff]);
$xyarray[sizeof($xyarray)] = $prefix . ($cbits[1 + $ioff + $koff] - cos($a * $factor) * $cbits[2 + $ioff + $koff]);
}
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$red = imagecolorallocatealpha(gdback($gd), 0, 0, 0, $reverseopacity);
} else {
$red = imagecolorallocatealpha(gdback($gd), 255, 255, 255, $reverseopacity);
}
for ($i = 0; $i < (sizeof($xyarray) - $two); $i+=2) {
$penup=false;
if ($rgbai[$rgbac] == $i) {
$rbits=explode(":",explode(")",explode("(",$rgbas[$rgbac])[1])[0]);
if (sizeof($rbits) >= 4) {
$reverseopacity=$rbits[3];
$red = imagecolorallocatealpha(gdback($gd), str_replace("rgba(","",$rbits[0]), $rbits[1], $rbits[2], $reverseopacity);
} else if (sizeof($rbits) >= 3) {
//echo $rbits[0];
//exit;
$red = imagecolorallocatealpha(gdback($gd), str_replace("rgba(","",$rbits[0]), $rbits[1], $rbits[2], $reverseopacity);
}
if (($rgbac + 1) > sizeof($rgbas)) {
$rgbas[sizeof($rgbai)] = "";
$rgbai[sizeof($rgbai)] = -1;
}
$rgbac++;
}
ourimagesetpixelline(gdback($gd), round(huhpenup($xyarray[$i])),round(huhpenup($xyarray[$i + 1])), round(huhpenup($xyarray[(($i + 2) % sizeof($xyarray))])),round(huhpenup($xyarray[(($i + 3) % sizeof($xyarray))])), $red);
//$red = imagecolorallocatealpha(gdback($gd), rand(0, 255), rand(0, 255), rand(0, 255), $reverseopacity);
}
$xyarray=[];
}
}
}
if (($ipcb + 1) < sizeof($precbits)) { // animation candidate
if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else if (sizeof($gds) == 0) {
$gds[sizeof($gds)]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
} else if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else {
$gds[sizeof($gds) - 1]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
$currgds++;
$xyarray=[];
}
}
}
$penup=false;
$rgbas=[""];
$rgbai=[-1];
$rgbac=0;
$koff=0;
$axyarray=[];
if (isset($_GET['tarea']) || isset($_GET['url'])) {
$currgds=0;
if ($currgds < sizeof($gds)) {
$gd=$gds[$currgds];
}
$pregm='';
$postgm='';
$gm='';
if (isset($_GET['url']) && isset($_GET['tarea'])) {
if ($_GET['url'] != '') {
$gm=strtolower(file_get_contents(urldecode($_GET['url'])));
$postgm=' ';
} else {
$gm=strtolower(urldecode($_GET['tarea']));
}
} else if (isset($_GET['url']) && !isset($_GET['tarea'])) {
$gm=strtolower(file_get_contents(urldecode($_GET['url'])));
$postgm=' ';
} else if (!isset($_GET['url']) && isset($_GET['tarea'])) {
$gm=strtolower(urldecode($_GET['tarea']));
} else if (isset($_GET['tarea'])) {
$gm=strtolower(urldecode($_GET['tarea']));
}
if (strpos($gm, ' coords=') === false && strpos($gm, ',') !== false && $postgm == '') {
$pregm=' coords="';
$postgm=str_replace(';','" coords="',$gm) . '"';
$gm=$postgm;
$postgm='';
}
$gms=explode("",str_replace("|","",$gm));
$igms=sizeof($gms);
if ($igms > 1) $igms--;
for ($ii=0; $ii<$igms; $ii++) {
$acoords = explode(' coords="', str_replace(" coords='",' coords="',str_replace('RGB(','rgba(',str_replace('RGBA(','rgba(',str_replace('rgb(','rgba(',($pregm . $gms[$ii] . $postgm))))));
$dstr="";
$delim="";
for ($i=1; $i= 4) {
$reverseopacity=$rbits[3];
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
} else if (sizeof($rbits) >= 3) {
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
}
if (($rgbac + 1) > sizeof($rgbas)) {
$rgbas[sizeof($rgbai)] = "";
$rgbai[sizeof($rgbai)] = -1;
}
$rgbac++;
}
ourimagesetpixelline(gdback($gd), round(huhpenup($xyarray[$i])),round(huhpenup($xyarray[$i + 1])), round(huhpenup($xyarray[(($i + 2) % sizeof($xyarray))])),round(huhpenup($xyarray[(($i + 3) % sizeof($xyarray))])), $red);
//$red = imagecolorallocatealpha(gdback($gd), rand(0, 255), rand(0, 255), rand(0, 255), $reverseopacity);
}
}
} else if (isset($_POST['tarea']) || isset($_POST['url']) || isthere(false,'tarea') != '' || isthere(false,'url') != '') {
$pregm='';
$postgm='';
$gm='';
if ((isset($_POST['url']) && isset($_POST['tarea'])) || (isthere(false,'url') != '' && isthere(false,'tarea') != '')) {
if (urldecode(isthere(false,'url')) != '') {
$gm=strtolower(file_get_contents(urldecode(isthere(false,'url'))));
$postgm=' ';
} else {
$gm=strtolower(urldecode(isthere(false,'tarea')));
}
} else if ((isset($_POST['url']) && !isset($_POST['tarea'])) || (isthere(false,'url') != '' && isthere(false,'tarea') == '')) {
$gm=strtolower(file_get_contents(urldecode(isthere(false,'url'))));
$postgm=' ';
} else if ((!isset($_POST['url']) && isset($_POST['tarea'])) || (isthere(false,'url') == '' && isthere(false,'tarea') != '')) {
$gm=strtolower(urldecode(isthere(false,'tarea')));
} else if (isset($_POST['tarea']) || isthere(false,'tarea') != '') {
$gm=strtolower(urldecode(isthere(false,'tarea')));
}
if (strpos($gm, ' coords=') === false && strpos($gm, ',') !== false && $postgm == '') {
$pregm=' coords="';
$postgm=str_replace(';','" coords="',$gm) . '"';
$gm=$postgm;
$postgm='';
}
$gms=explode("",$gm);
$igms=sizeof($gms);
if ($igms > 1) $igms--;
for ($ii=0; $ii<$igms; $ii++) {
$acoords = explode(' coords="', str_replace(" coords='",' coords="',str_replace('RGB(','rgba(',str_replace('RGBA(','rgba(',str_replace('rgb(','rgba(',($pregm . $gms[$ii] . $postgm))))));
$dstr="";
$delim="";
for ($i=1; $i= 4) {
$reverseopacity=$rbits[3];
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
} else if (sizeof($rbits) >= 3) {
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
}
if (($rgbac + 1) > sizeof($rgbas)) {
$rgbas[sizeof($rgbai)] = "";
$rgbai[sizeof($rgbai)] = -1;
}
$rgbac++;
}
ourimagesetpixelline(gdback($gd), round(huhpenup($xyarray[$i])),round(huhpenup($xyarray[$i + 1])), round(huhpenup($xyarray[(($i + 2) % sizeof($xyarray))])),round(huhpenup($xyarray[(($i + 3) % sizeof($xyarray))])), $red);
//$red = imagecolorallocatealpha(gdback($gd), rand(0, 255), rand(0, 255), rand(0, 255), $reverseopacity);
}
}
if (($ii + 1) < $igms) { // animation candidate
if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else if (sizeof($gds) == 0) {
$gds[sizeof($gds)]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
} else if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else {
$gds[sizeof($gds) - 1]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
$currgds++;
$xyarray=[];
}
}
$penup=false;
$rgbas=[""];
$rgbai=[-1];
$rgbac=0;
$koff=0;
$axyarray=[];
$precbits=[];
if (isset($_GET['coords']) || isset($_GET['closecoords']) || sizeof($xyarray) > 0) {
$currgds=0;
if ($currgds < sizeof($gds)) {
$gd=$gds[$currgds];
}
if (isset($_GET['closecoords'])) {
if (sizeof($xyarray) == 0) {
if (isset($_GET['coords'])) {
$precbits=explode("|",urldecode($_GET['coords']));
} else {
$precbits=explode("|",urldecode($_GET['closecoords']));
}
}
} else if (sizeof($xyarray) == 0) {
$precbits=explode("|",urldecode($_GET['coords']));
}
for ($ipcb=0; $ipcb= 4) {
$reverseopacity=$rbits[3];
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
} else if (sizeof($rbits) >= 3) {
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
}
if (($rgbac + 1) > sizeof($rgbas)) {
$rgbas[sizeof($rgbai)] = "";
$rgbai[sizeof($rgbai)] = -1;
}
$rgbac++;
}
ourimagesetpixelline(gdback($gd), round(huhpenup($xyarray[$i])),round(huhpenup($xyarray[$i + 1])), round(huhpenup($xyarray[(($i + 2) % sizeof($xyarray))])),round(huhpenup($xyarray[(($i + 3) % sizeof($xyarray))])), $red);
//$red = imagecolorallocatealpha(gdback($gd), rand(0, 255), rand(0, 255), rand(0, 255), $reverseopacity);
}
}
if (($ipcb + 1) < sizeof($precbits)) { // animation candidate
if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else if (sizeof($gds) == 0) {
$gds[sizeof($gds)]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
} else if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else {
$gds[sizeof($gds) - 1]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
$currgds++;
$xyarray=[];
}
}
} else if (isset($_POST['coords']) || isset($_POST['closecoords']) || isthere(false,'coords') != '' || isthere(false,'closecoords') != '') {
$penup=false;
$rgbas=[""];
$rgbai=[-1];
$rgbac=0;
$koff=0;
$axyarray=[];
$precbits=[];
$xyarray=[];
$currgds=0;
if ($currgds < sizeof($gds)) {
$gd=$gds[$currgds];
}
if (isset($_POST['closecoords']) || isthere(false,'closecoords') != '') {
if (sizeof($xyarray) == 0) {
if (isset($_POST['coords']) || isthere(false,'coords') != '') {
$precbits=explode("|",urldecode(isthere(false,'coords')));
} else {
$precbits=explode("|",urldecode(isthere(false,'closecoords')));
}
}
} else if (sizeof($xyarray) == 0) {
$precbits=explode("|",urldecode(isthere(false,'coords')));
}
for ($ipcb=0; $ipcb= 4) {
$reverseopacity=$rbits[3];
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
} else if (sizeof($rbits) >= 3) {
$red = imagecolorallocatealpha(gdback($gd), $rbits[0], $rbits[1], $rbits[2], $reverseopacity);
}
if (($rgbac + 1) > sizeof($rgbas)) {
$rgbas[sizeof($rgbai)] = "";
$rgbai[sizeof($rgbai)] = -1;
}
$rgbac++;
}
ourimagesetpixelline(gdback($gd), round(huhpenup($xyarray[$i])),round(huhpenup($xyarray[$i + 1])), round(huhpenup($xyarray[(($i + 2) % sizeof($xyarray))])),round(huhpenup($xyarray[(($i + 3) % sizeof($xyarray))])), $red);
//$red = imagecolorallocatealpha(gdback($gd), rand(0, 255), rand(0, 255), rand(0, 255), $reverseopacity);
}
}
if (($ipcb + 1) < sizeof($precbits)) { // animation candidate
if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else if (sizeof($gds) == 0) {
$gds[sizeof($gds)]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
} else if ($currgds < sizeof($gds)) {
$gds[$currgds]=$gd;
if (($currgds + 1) < sizeof($gds)) {
$gd=$gds[$currgds + 1];
} else {
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
} else {
$gds[sizeof($gds) - 1]=$gd;
$gd = imagecreatetruecolor($x, $y);
if (isset($_GET['positive']) || isset($_POST['positive']) || isthere(false,'positive') != '') {
$background = imagecreatetruecolor($x,$y);
$wb = imagecolorallocatealpha($gd, 255, 255, 255, $reverseopacity);
imagefill($gd,0,0,$wb);
}
}
$currgds++;
$xyarray=[];
}
}
} else if (!isset($_GET['circle']) && !isset($_POST['circle']) && isthere(false,'circle') == '') {
for ($i = 0; $i < $howmany; $i++) {
ourimagesetpixel(gdback($gd), round($x),round($y), $red);
if (1 == 1) {
$x = rand(0, $width);
$y = rand(0, $height);
$red = imagecolorallocatealpha(gdback($gd), rand(0, 255), rand(0, 255), rand(0, 255), $reverseopacity);
} else {
$a = rand(0, 2);
$x = ($x + $corners[$a]['x']) / 2;
$y = ($y + $corners[$a]['y']) / 2;
}
}
}
if (sizeof($gds) > 0) { // animated gif
if (1 == 2) $gds[sizeof($gds)]=$gd;
if (isset($_GET['rotate'])) {
for ($ij=0; $ij' . $endbody . '';
}
} else { // thanks to https://stackoverflow.com/questions/8551754/convert-gd-output-to-base64 for ideas
if (isset($_GET['mode'])) {
if (strpos(strtolower(urldecode($_GET['mode'])),'image') !== false && strlen(urldecode($_GET['mode'])) == strlen('image')) {
$idb = modeideas($gd,"","getElementById('pthing').src","","");
if ($width != $new_width || $height != $new_height) {
$endbody=str_replace(" var currgds=0;", " if (parent.document.getElementById('toppixellate')) { parent.document.getElementById('pwidth').value='" . $new_width . "'; parent.document.getElementById('pheight').value='" . $new_height . $spacechar . "'; parent.document.getElementById('toppixellate').style.width='" . $new_width . "px'; parent.document.getElementById('toppixellate').style.height='" . $new_height . "px'; parent.document.getElementById('toppixellate').width='" . $new_width . "px'; parent.document.getElementById('toppixellate').height='" . $new_height . "px'; } var currgds=0;", $endbody);
}
$width == $new_width;
$height == $new_height;
echo '' . $endbody . '';
} else if (strpos(strtolower(urldecode($_GET['mode'])),'image') !== false && strlen(urldecode($_GET['mode'])) != strlen('image')) {
$idb = modeideas($gd,"parent.","getElementById('" . substr(urldecode($_GET['mode']),strlen('image')) . "').src","","");
if ($width != $new_width || $height != $new_height) {
$endbody=str_replace(" var currgds=0;", " if (parent.document.getElementById('toppixellate')) { parent.document.getElementById('pwidth').value='" . $new_width . "'; parent.document.getElementById('pheight').value='" . $new_height . $spacechar . "'; parent.document.getElementById('toppixellate').style.width='" . $new_width . "px'; parent.document.getElementById('toppixellate').style.height='" . $new_height . "px'; parent.document.getElementById('toppixellate').width='" . $new_width . "px'; parent.document.getElementById('toppixellate').height='" . $new_height . "px'; } var currgds=0;", $endbody);
}
$width == $new_width;
$height == $new_height;
echo ' parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('image')) . '").style.width="' . $width . 'px"; parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('image')) . '").style.height="' . $height . 'px"; parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('image')) . '").src="data:image/png;base64,' . $idb . '"; " . $endbody . "";
} else if (strpos(strtolower(urldecode($_GET['mode'])),'img') !== false && strlen(urldecode($_GET['mode'])) == strlen('img')) {
$idb = modeideas($gd,"","getElementById('pthing').src","","");
if ($width != $new_width || $height != $new_height) {
$endbody=str_replace(" var currgds=0;", " if (parent.document.getElementById('toppixellate')) { parent.document.getElementById('pwidth').value='" . $new_width . "'; parent.document.getElementById('pheight').value='" . $new_height . $spacechar . "'; parent.document.getElementById('toppixellate').style.width='" . $new_width . "px'; parent.document.getElementById('toppixellate').style.height='" . $new_height . "px'; parent.document.getElementById('toppixellate').width='" . $new_width . "px'; parent.document.getElementById('toppixellate').height='" . $new_height . "px'; } var currgds=0;", $endbody);
}
$width == $new_width;
$height == $new_height;
echo '' . $endbody . '';
} else if (strpos(strtolower(urldecode($_GET['mode'])),'img') !== false && strlen(urldecode($_GET['mode'])) != strlen('img')) {
$idb = modeideas($gd,"parent.","getElementById('" . substr(urldecode($_GET['mode']),strlen('img')) . "').src","","");
if ($width != $new_width || $height != $new_height) {
$endbody=str_replace(" var currgds=0;", " if (parent.document.getElementById('toppixellate')) { parent.document.getElementById('pwidth').value='" . $new_width . "'; parent.document.getElementById('pheight').value='" . $new_height . $spacechar . "'; parent.document.getElementById('toppixellate').style.width='" . $new_width . "px'; parent.document.getElementById('toppixellate').style.height='" . $new_height . "px'; parent.document.getElementById('toppixellate').width='" . $new_width . "px'; parent.document.getElementById('toppixellate').height='" . $new_height . "px'; } var currgds=0;", $endbody);
}
$width == $new_width;
$height == $new_height;
echo ' parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('img')) . '").style.width="' . $width . 'px"; parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('img')) . '").style.height="' . $height . 'px"; parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('img')) . '").src="data:image/png;base64,' . $idb . '"; " . $endbody . "";
} else if (strpos(strtolower(urldecode($_GET['mode'])),'div') !== false && strlen(urldecode($_GET['mode'])) == strlen('div')) {
$idb = modeideas($gd,"","getElementById('pthing').src","","");
if ($width != $new_width || $height != $new_height) {
$endbody=str_replace(" var currgds=0;", " if (parent.document.getElementById('toppixellate')) { parent.document.getElementById('pwidth').value='" . $new_width . "'; parent.document.getElementById('pheight').value='" . $new_height . $spacechar . "'; parent.document.getElementById('toppixellate').style.width='" . $new_width . "px'; parent.document.getElementById('toppixellate').style.height='" . $new_height . "px'; parent.document.getElementById('toppixellate').width='" . $new_width . "px'; parent.document.getElementById('toppixellate').height='" . $new_height . "px'; } var currgds=0;", $endbody);
}
$width == $new_width;
$height == $new_height;
echo '' . $endbody . '';
} else if (strpos(strtolower(urldecode($_GET['mode'])),'div') !== false && strlen(urldecode($_GET['mode'])) != strlen('div')) {
$idb = modeideas($gd,"parent.","getElementById('" . substr(urldecode($_GET['mode']),strlen('div')) . "').src","","");
if ($width != $new_width || $height != $new_height) {
$endbody=str_replace(" var currgds=0;", " if (parent.document.getElementById('toppixellate')) { parent.document.getElementById('pwidth').value='" . $new_width . "'; parent.document.getElementById('pheight').value='" . $new_height . $spacechar . "'; parent.document.getElementById('toppixellate').style.width='" . $new_width . "px'; parent.document.getElementById('toppixellate').style.height='" . $new_height . "px'; parent.document.getElementById('toppixellate').width='" . $new_width . "px'; parent.document.getElementById('toppixellate').height='" . $new_height . "px'; } var currgds=0;", $endbody);
}
$width == $new_width;
$height == $new_height;
echo ' parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('div')) . '").style.width="' . $width . 'px"; parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('div')) . '").style.height="' . $height . 'px"; parent.document.getElementById("' . substr(urldecode($_GET['mode']),strlen('div')) . '").innerHTML="" . '"; " . $endbody . "";
} else if (strpos(strtolower(urldecode($_GET['mode'])),'canvas') !== false && strlen(urldecode($_GET['mode'])) == strlen('canvas')) {
$idb = modeideas($gd,"","title","onl(",")");
if ($width != $new_width || $height != $new_height) {
$endbody=str_replace(" var currgds=0;", " if (parent.document.getElementById('toppixellate')) { parent.document.getElementById('pwidth').value='" . $new_width . "'; parent.document.getElementById('pheight').value='" . $new_height . $spacechar . "'; parent.document.getElementById('toppixellate').style.width='" . $new_width . "px'; parent.document.getElementById('toppixellate').style.height='" . $new_height . "px'; parent.document.getElementById('toppixellate').width='" . $new_width . "px'; parent.document.getElementById('toppixellate').height='" . $new_height . "px'; } var currgds=0;", $endbody);
}
$width == $new_width;
$height == $new_height;
$jsis=" var image=null, ctx=null, huh=null, canvas=null; function onl(nowmaybe) { canvas = document.getElementById('c'); \n"; // thanks to https://stackoverflow.com/questions/17090571/is-there-a-way-to-set-background-image-as-a-base64-encoded-image for ideas
$jsis.=" canvas.width = '" . $width . "'; \n";
$jsis.=" canvas.height = '" . $height . "'; \n";
$jsis.=" ctx = canvas.getContext('2d'); \n\n";
$jsis.=" image = new Image(); \n";
$jsis.=" image.width = '" . $width . "'; \n";
$jsis.=" image.height = '" . $height . "'; \n";
$jsis.=" image.onload = function() { \n";
$jsis.=" ctx.drawImage(image, 0, 0, " . $width . ", " . $height . ", 0, 0, " . $width . ", " . $height . "); \n";
$jsis.=" }; if (nowmaybe.length > 0) { image.src=nowmaybe; } return 'canvas'; } \n";
$jsis.=" function iis(inu) { if (inu != '') { image = new Image(); image.src = 'data:image/png;base64,' + inu; } else { image.src = 'data:image/png;base64," . $idb . "'; } return 'canvas'; } image.src = 'data:image/png;base64," . $idb . "'; \n";
echo ' var xxx=""; ' . $jsis . '