= 3 && strpos(strtolower($inthingis), 'px') !== false) { for ($ii=0; $ii 1) { $gfontsize=explode('p', $decthings[$ii])[0]; $inthingis=str_replace('' . $decthings[$ii] . '.','', str_replace('.' . $decthings[$ii] . '','', str_replace('.' . $decthings[$ii] . '.','.', strtolower($inthingis) ))); $decthings=explode('.', strtolower($inthingis)); } } } if (sizeof($decthings) < 2 || substr($inthingis,-1,1) < '0' || substr($inthingis,-1,1) > '9') { return $inthingis; } $crcol=''; while (substr($inthingis,-1,1) == '.' || (substr($inthingis,-1,1) >= '0' && substr($inthingis,-1,1) <= '9')) { $crcol=substr($inthingis,-1,1) . $crcol; $inthingis=substr($inthingis,0,(-1 + strlen($inthingis))); } //file_put_contents('x.x', $crcol . ' ... ' . substr($inthingis,-1,1)); $decthings=explode('.', strtolower($crcol)); if (sizeof($decthings) >= 2) { $gcx=$decthings[0]; $gcy=$decthings[1]; if (sizeof($decthings) > 2) { $gopacity='0.' . $decthings[2]; if (sizeof($decthings) > 3) { $gfontsize=$decthings[3]; } } } else { return $inthingis . $crcol; } return $inthingis; } else { $crcolour='pink'; if (strpos(strtolower($inthingis), 'px') !== false) { for ($ii=0; $ii 1) { $gfontsize=explode('p', $decthings[$ii])[0]; $inthingis=str_replace('' . $decthings[$ii] . '.','', str_replace('.' . $decthings[$ii] . '','', str_replace('.' . $decthings[$ii] . '.','.', strtolower($inthingis) ))); $decthings=explode('.', strtolower($inthingis)); } } } } if (substr($inthingis,0,1) < '0' || substr($inthingis,0,1) > '9') { $crcolour=explode('0',explode('1',explode('2',explode('3',explode('4',explode('5',explode('6',explode('7',explode('8',explode('9',$inthingis)[0])[0])[0])[0])[0])[0])[0])[0])[0])[0]; $inthingis=strtolower(str_replace($crcolour, '', $inthingis)); $decthings=explode('.', strtolower($inthingis)); } else if (substr($inthingis,-1,1) < '0' || substr($inthingis,-1,1) > '9') { $crcolour=''; while (substr($inthingis,-1,1) < '0' || substr($inthingis,-1,1) > '9') { $crcolour=substr($inthingis,-1,1) . $crcolour; $inthingis=substr($inthingis,0,(-1 + strlen($inthingis))); } $inthingis=strtolower(str_replace($crcolour, '', $inthingis)); $decthings=explode('.', strtolower($inthingis)); } if ($gshape == 'text') { if (sizeof($decthings) >= 2) { $gcx=$decthings[0]; $gcy=$decthings[1]; if (sizeof($decthings) > 2) { $gopacity='0.' . $decthings[2]; if (sizeof($decthings) > 3) { $gfontsize=$decthings[3]; } } } } else if ($gshape == 'circle') { if (sizeof($decthings) >= 2) { $gcx=$decthings[0]; $gcy=$decthings[1]; if (sizeof($decthings) > 2) { $gradius=$decthings[2]; if (sizeof($decthings) > 3) { $gopacity='0.' . $decthings[3]; } } } else if (sizeof($decthings) == 1 && $decthings[0] != '') { $gradius=$decthings[0]; } } else if ($gshape == 'ellipse') { if (sizeof($decthings) >= 4) { $gcx=$decthings[0]; $gcy=$decthings[1]; $gradiusone=$decthings[2]; $gradiustwo=$decthings[3]; if (sizeof($decthings) > 4) { $gopacity='0.' . $decthings[4]; } } else if (sizeof($decthings) == 3) { $gradiusone=$decthings[0]; $gradiustwo=$decthings[1]; $gopacity='0.' . $decthings[2]; } else if (sizeof($decthings) == 2) { $gradiusone=$decthings[0]; $gradiustwo=$decthings[1]; } else if (sizeof($decthings) == 1 && $decthings[0] != '') { $gradius=$decthings[0]; } } else if ($gshape == 'rect') { if (sizeof($decthings) >= 4) { $gcx=$decthings[0]; $gcy=$decthings[1]; $gwidth=$decthings[2]; $gheight=$decthings[3]; if (sizeof($decthings) > 4) { $gopacity='0.' . $decthings[4]; } } else if (sizeof($decthings) == 3) { $gwidth=$decthings[0]; $gheight=$decthings[1]; $gopacity='0.' . $decthings[2]; } else if (sizeof($decthings) == 2) { $gwidth=$decthings[0]; $gheight=$decthings[1]; } else if (sizeof($decthings) == 1 && $decthings[0] != '') { $gopacity='0.' . $decthings[0]; } } return $crcolour; } function retandclear($inthing) { global $crcolour, $gcx, $gcy, $gwidth, $gheight, $gopacity, $gfontsize, $gradius, $gradiusone, $gradiustwo, $gshape; $outthing=$inthing; if (strpos($inthing, '= 0 && strpos($inthing, ' rx="') !== false) { $outthing=str_replace(' rx="' . explode('"', explode(' rx="', $outthing)[1])[0], ' rx="' . $gradiusone, $outthing); } if (strtolower($gshape) == 'ellipse' && $gradiustwo >= 0 && strpos($inthing, ' ry="') !== false) { $outthing=str_replace(' ry="' . explode('"', explode(' ry="', $outthing)[1])[0], ' ry="' . $gradiustwo, $outthing); } if ($gcx >= 0 && strpos(str_replace(' cx="',' x="',$inthing), ' x="') !== false) { $outthing=str_replace('x="' . explode('"', explode('x="', $outthing)[1])[0], 'x="' . $gcx, $outthing); } if ($gcy >= 0 && strpos(str_replace(' cy="',' y="',$inthing), ' y="') !== false) { $outthing=str_replace('y="' . explode('"', explode('y="', $outthing)[1])[0], 'y="' . $gcy, $outthing); } if ($gwidth >= 0 && strpos($inthing, ' width="') !== false) { $outthing=str_replace('width="' . explode('"', explode('width="', $outthing)[1])[0], 'width="' . $gwidth, $outthing); } if ($gheight >= 0 && strpos($inthing, ' height="') !== false) { $outthing=str_replace('height="' . explode('"', explode('height="', $outthing)[1])[0], 'height="' . $gwidth, $outthing); } if (strtolower($gshape) == 'circle' && $gradius >= 0 && strpos($inthing, ' r="') !== false) { $outthing=str_replace(' r="' . explode('"', explode(' r="', $outthing)[1])[0], ' r="' . $gradius, $outthing); } if (strtolower($gshape) == 'text' && $gfontsize >= 0 && strpos($inthing, ' font-size="') !== false) { $outthing=str_replace(' font-size="' . explode('"', explode(' font-size="', $outthing)[1])[0], ' font-size="' . $gfontsize . 'px', $outthing); } else if (strtolower($gshape) == 'text' && $gfontsize >= 0 && strpos($inthing, ' font-size="') === false) { $outthing=str_replace('= 0 && strpos($inthing, ' fill-opacity="') !== false) { $outthing=str_replace(' fill-opacity="' . explode('"', explode(' fill-opacity="', $outthing)[1])[0], ' fill-opacity="' . $gopacity, $outthing); } if ($crcolour != '' && strpos($inthing, ' fill="') !== false && strpos($inthing, ' fill="' . $crcolour) === false) { $outthing=str_replace(' fill="' . explode('"', explode(' fill="', $outthing)[1])[0], ' fill="' . $crcolour, $outthing); } if ($gshape != 'text') { $crcolour="pink"; $gcx=-1; $gcy=-1; $gwidth=-1; $gheight=-1; $gopacity=-1.0; $gfontsize=-1; $gradius=-1; $gradiusone=-1; $gradiustwo=-1; $gshape=''; } return $outthing; } function ingp($m) { // thanks to https://pretagteam.com/question/how-do-i-convert-unicode-special-characters-to-html-entities global $innards, $preinnards; if ($innards != '') { $entity = preg_replace_callback('/[\x{80}-\x{10FFFF}]/u', function ($m) { $char = current($m); $utf = iconv('UTF-8', 'UCS-4', $char); //return sprintf("&#x%s;", ltrim(strtoupper(bin2hex($utf)), "0")); return sprintf("&#x%s;", ltrim(strtoupper(bin2hex($utf)), "0")); }, $innards); //file_put_contents('xx.x',$entity); $preinnards=htmlentities($entity); //file_put_contents('x.x',$entity . ' ... ' . $preinnards); $innards=''; } } if (isset($_GET['width'])) { $w=str_replace('+',' ',urldecode($_GET['width'])); } else if (isset($_POST['width'])) { $w=str_replace('+',' ',urldecode($_POST['width'])); } if (isset($_GET['height'])) { $h=str_replace('+',' ',urldecode($_GET['height'])); if ($w != 0) { $vbox=' viewBox="0 0 ' . $w . ' ' . $h . '" '; $pw='100%'; $ph='100%'; } } else if (isset($_POST['height'])) { $h=str_replace('+',' ',urldecode($_POST['height'])); if ($w != 0) { $vbox=' viewBox="0 0 ' . $w . ' ' . $h . '" '; $pw='100%'; $ph='100%'; } } $lc=''; if (isset($_GET['image']) && $imgis != '') { list($width, $height) = getimagesize($imgis); if (isset($_GET['insvg'])) { if (strpos((',' . $restis . ','), ',noimage,') === false) { $lastcontent='')); //file_put_contents('xww.xww', $restis); if (strpos((',' . $restis . ','), ',circle') !== false) { if (strpos((',' . $restis . ','), ',circle,') === false) { $crcolour=collectstuff(explode(',', explode(',circle', $restis)[1])[0], 'circle'); $restis=str_replace('circle' . $crcolour . ',','',str_replace(',circle' . $crcolour . ',','',$restis)); } $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.="\n" . ''; //file_put_contents('xw.xw', $lastcontent); //exit; } if (strpos((',' . $restis . ','), ',ellipse') !== false) { if (strpos((',' . $restis . ','), ',ellipse,') === false) { $crcolour=collectstuff(explode(',', explode(',ellipse', $restis)[1])[0], 'ellipse'); $restis=str_replace('ellipse' . $crcolour . ',','',str_replace(',ellipse' . $crcolour . ',','',$restis)); } $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.="\n" . ''; //file_put_contents('xw.xw', $lastcontent); //exit; } if (strpos((',' . $restis . ','), ',rect') !== false) { if (strpos((',' . $restis . ','), ',rect,') === false) { $crcolour=collectstuff(explode(',', explode(',rect', $restis)[1])[0], 'rect'); $restis=str_replace('rect' . $crcolour . ',','',str_replace(',rect' . $crcolour . ',','',$restis)); } $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.="\n" . ''; } } else { //$restis=str_replace('noimage,','',str_replace(',noimage,','',$restis)); if (strpos((',' . $restis . ','), ',circle') !== false) { if (strpos((',' . $restis . ','), ',circle,') === false) { $crcolour=collectstuff(explode(',', explode(',circle', $restis)[1])[0], 'circle'); $restis=str_replace('circle' . $crcolour . ',','',str_replace(',circle' . $crcolour . ',','',$restis)); } $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.="\n" . retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { if (strpos((',' . $restis . ','), ',ellipse,') === false) { $crcolour=collectstuff(explode(',', explode(',ellipse', $restis)[1])[0], 'ellipse'); $restis=str_replace('ellipse' . $crcolour . ',','',str_replace(',ellipse' . $crcolour . ',','',$restis)); } $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.="\n" . retandclear(''); //file_put_contents('xw.xw', $lastcontent); //exit; } if (strpos((',' . $restis . ','), ',rect') !== false) { if (strpos((',' . $restis . ','), ',rect,') === false) { $crcolour=collectstuff(explode(',', explode(',rect', $restis)[1])[0], 'rect'); $restis=str_replace('rect' . $crcolour . ',','',str_replace(',rect' . $crcolour . ',','',$restis)); } $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.="\n" . retandclear(''); } } } else { if (strpos((',' . $restis . ','), ',noimage,') === false) { $lastcontent='')); if (strpos((',' . $restis . ','), ',circle') !== false) { if (strpos((',' . $restis . ','), ',circle,') === false) { $crcolour=collectstuff(explode(',', explode(',circle', $restis)[1])[0], 'circle'); $restis=str_replace('circle' . $crcolour . ',','',str_replace(',circle' . $crcolour . ',','',$restis)); } $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.="\n" . retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { if (strpos((',' . $restis . ','), ',ellipse,') === false) { $crcolour=collectstuff(explode(',', explode(',ellipse', $restis)[1])[0], 'ellipse'); $restis=str_replace('ellipse' . $crcolour . ',','',str_replace(',ellipse' . $crcolour . ',','',$restis)); } $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.="\n" . retandclear(''); //file_put_contents('xw.xw', $lastcontent); //exit; } if (strpos((',' . $restis . ','), ',rect') !== false) { if (strpos((',' . $restis . ','), ',rect,') === false) { $crcolour=collectstuff(explode(',', explode(',rect', $restis)[1])[0], 'rect'); $restis=str_replace('rect' . $crcolour . ',','',str_replace(',rect' . $crcolour . ',','',$restis)); } $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.="\n" . retandclear(''); } } else { //$restis=str_replace('noimage,','',str_replace(',noimage,','',$restis)); if (strpos((',' . $restis . ','), ',circle') !== false) { if (strpos((',' . $restis . ','), ',circle,') === false) { $crcolour=collectstuff(explode(',', explode(',circle', $restis)[1])[0], 'circle'); $restis=str_replace('circle' . $crcolour . ',','',str_replace(',circle' . $crcolour . ',','',$restis)); } $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.="\n" . retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { if (strpos((',' . $restis . ','), ',ellipse,') === false) { $crcolour=collectstuff(explode(',', explode(',ellipse', $restis)[1])[0], 'ellipse'); $restis=str_replace('ellipse' . $crcolour . ',','',str_replace(',ellipse' . $crcolour . ',','',$restis)); } $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.="\n" . retandclear(''); //file_put_contents('xw.xw', $lastcontent); //exit; } if (strpos((',' . $restis . ','), ',rect') !== false) { if (strpos((',' . $restis . ','), ',rect,') === false) { $crcolour=collectstuff(explode(',', explode(',rect', $restis)[1])[0], 'rect'); $restis=str_replace('rect' . $crcolour . ',','',str_replace(',rect' . $crcolour . ',','',$restis)); } $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.="\n" . retandclear(''); } } } if ($h == 0) { $h=$height; $ph=(40 + $h); } if ($w == 0) { $w=$width; $pw=(40 + $w); } if (isset($_GET['insvg'])) { if (strpos((',' . $restis . ','), ',noimage,') === false) { $lastcontent='')) . $lc; } else { $lastcontent.=$lc; } $w+=40; //$w=(($w + 20) / 20) * 20; $h+=40; //$h=(($h + 20) / 20) * 20; if ($vbox != '') { $vbox=' viewBox="0 0 ' . $w . ' ' . $h . '" '; $pw=(40 + $w); $ph=(40 + $h); } } } else if (isset($_POST['image']) && $imgis != '') { list($width, $height) = getimagesize($imgis); if (isset($_POST['insvg'])) { if (strpos((',' . $restis . ','), ',noimage,') === false) { $lastcontent='')); if (strpos((',' . $restis . ','), ',circle,') !== false) { $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',rect,') !== false) { $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.=retandclear(''); } } else { //$restis=str_replace('noimage,','',str_replace(',noimage,','',$restis)); if (strpos((',' . $restis . ','), ',circle,') !== false) { $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',rect,') !== false) { $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.=retandclear(''); } } } else { if (strpos((',' . $restis . ','), ',noimage,') === false) { $lastcontent='')); if (strpos((',' . $restis . ','), ',circle,') !== false) { $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',rect,') !== false) { $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.=retandclear(''); } } else { //$restis=str_replace('noimage,','',str_replace(',noimage,','',$restis)); if (strpos((',' . $restis . ','), ',circle,') !== false) { $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lc.=retandclear(''); } if (strpos((',' . $restis . ','), ',rect,') !== false) { $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lc.=retandclear(''); } } } if ($h == 0) { $h=$height; $ph=(40 + $h); } if ($w == 0) { $w=$width; $pw=(40 + $w); } if (isset($_POST['insvg'])) { if (strpos((',' . $restis . ','), ',noimage,') === false) { $lastcontent='')) . $lc; } else { $lastcontent.=$lc; } $w+=40; //$w=(($w + 20) / 20) * 20; $h+=40; //$h=(($h + 20) / 20) * 20; if ($vbox != '') { $vbox=' viewBox="0 0 ' . $w . ' ' . $h . '" '; $pw=(40 + $w); $ph=(40 + $h); } } } if ($pw == '' && $h != 0) { $pw=(40 + $w); } if ($ph == '' && $h != 0) { $ph=(40 + $h); } foreach ($_GET as $name=>$val) { if (strpos(strtolower('' . $name . '~'), 'css~') !== false) { if ($svgmiddle == '') { $svgmiddle=" "; } else { $svgmiddle=str_replace("",str_replace(' ',' ',str_replace('+', ' ', urldecode($_GET[$tn])))), 'text'); if ($gminus30 >= 0) { $minus30=$gminus30; } else { $minus30=($w / $wtwo) - strlen(explode('
', $txt)[0]) * $threedotone; } if ($gtop30 >= 0) { $top30=$h - 10 - (sizeof(explode('
', $txt)) * 15); $gtop30=-1; } else { $top30=($h / $htwo) + $twentyfive - (sizeof(explode('
', $txt)) * $eight); } $lines=explode('
', $txt); if ($gcx >= 0 && $gcy >= 0) { $minus30=$gcx; $top30=$gcy; $gcx=-1; $gcy=-1; } for ($il=0; $il' . $lines[$il] . '
'); $top30+=15; } } $gminus30=-1; $gtop30=-1; $eight=8; $twentyfive=25; $threedotone=3.1; $textjust=""; $wtwo=2.0; $htwo=2.0; $tn=''; } } foreach ($_POST as $name=>$val) { if (strpos(strtolower('' . $name . '~'), 'css~') !== false) { if ($svgmiddle == '') { $svgmiddle=" "; } else { $svgmiddle=str_replace("",str_replace(' ',' ',str_replace('+', ' ', urldecode($_POST[$tn])))), 'text'); if ($gminus30 >= 0) { $minus30=$gminus30; } else { $minus30=($w / $wtwo) - strlen(explode('
', $txt)[0]) * $threedotone; } if ($gtop30 >= 0) { $top30=$h - 10 - (sizeof(explode('
', $txt)) * 15); $gtop30=-1; } else { $top30=($h / $htwo) + $twentyfive - (sizeof(explode('
', $txt)) * $eight); } $lines=explode('
', $txt); if ($gcx >= 0 && $gcy >= 0) { $minus30=$gcx; $top30=$gcy; $gcx=-1; $gcy=-1; } for ($il=0; $il' . $lines[$il] . '
'); $top30+=15; } } $gminus30=-1; $gtop30=-1; $eight=8; $twentyfive=25; $threedotone=3.1; $textjust=""; $wtwo=2.0; $htwo=2.0; $tn=''; } } if ($tn != '') { if (isset($_GET[$tn])) { $txt=collectstuff(sstr_replace("\n","
",str_replace(' ',' ',str_replace('+', ' ', urldecode($_GET[$tn])))), 'text'); if ($gminus30 >= 0) { $minus30=$gminus30; } else { $minus30=($w / $wtwo) - strlen(explode('
', $txt)[0]) * $threedotone; } if ($gtop30 >= 0) { $top30=$h - (sizeof(explode('
', $txt)) * 15); $gtop30=-1; } else { $top30=($h / $htwo) + $twentyfive - (sizeof(explode('
', $txt)) * $eight); } $lines=explode('
', $txt); if ($gcx >= 0 && $gcy >= 0) { $minus30=$gcx; $top30=$gcy; $gcx=-1; $gcy=-1; } for ($il=0; $il' . $lines[$il] . ''); $top30+=15; } } else if (isset($_POST[$tn])) { $txt=collectstuff(sstr_replace("\n","
",str_replace(' ',' ',str_replace('+', ' ', urldecode($_POST[$tn])))), 'text'); if ($gminus30 >= 0) { $minus30=$gminus30; } else { $minus30=($w / $wtwo) - strlen(explode('
', $txt)[0]) * $threedotone; } if ($gtop30 >= 0) { $top30=$h - (sizeof(explode('
', $txt)) * 15); $gtop30=-1; } else { $top30=($h / $htwo) + $twentyfive - (sizeof(explode('
', $txt)) * $eight); } $lines=explode('
', $txt); if ($gcx >= 0 && $gcy >= 0) { $minus30=$gcx; $top30=$gcy; $gcx=-1; $gcy=-1; } for ($il=0; $il' . $lines[$il] . ''); $top30+=15; } } } if (isset($_GET['insvg'])) { $innards=str_replace('+','',urldecode($_GET['insvg'])); if (trim(str_replace(',','',str_replace('0','',str_replace('1','',str_replace('2','',str_replace('3','',str_replace('4','',str_replace('5','',str_replace('6','',str_replace('7','',str_replace('8','',str_replace('9','',$innards)))))))))))) != '') { ingp($innards); } if ($preinnards == '') { $preinnards='&#' . str_replace(',',';&#',$innards) . ';'; } $svgprefix=''; $svgsuffix=''; if (strpos($innards, ''; } else { $svgprefix=''; } $svgsuffix=''; if (trim(str_replace(',','',str_replace('0','',str_replace('1','',str_replace('2','',str_replace('3','',str_replace('4','',str_replace('5','',str_replace('6','',str_replace('7','',str_replace('8','',str_replace('9','',$innards)))))))))))) == '') { for ($x=0; $x<=$w; $x+=20) { for ($y=0; $y<=(0 + $h); $y+=20) { if ($x == 0 && $y == 0) { $innards='' . $preinnards . ''; if ($h > 0) { $innardslast.='' . $preinnards . ''; } } else if (isset($_GET['background']) || isset($_GET[$whati]) || $x == 0 || $y == 0 || ($x + 20) > $w || ($y + 20) > (0 + $h)) { if ($x == $w) { $innardslast.='' . $preinnards . ''; } else if ($y >= $h) { $innardslast.='' . $preinnards . ''; } else { $innards.='' . $preinnards . ''; } if ($x == 0) { $innardslast.='' . $preinnards . ''; } else if ($y == 0) { $innardslast.='' . $preinnards . ''; } else { $innards.='' . $preinnards . ''; } } } } } } ourecho ('' . html_entity_decode('' . $svgprefix . $svgmiddle . $innards . $innardslast . $lastcontent . $textcontent . $svgsuffix, ENT_QUOTES, "utf-8")); } else if (isset($_POST['insvg'])) { $innards=str_replace('+','',urldecode($_POST['insvg'])); if (trim(str_replace(',','',str_replace('0','',str_replace('1','',str_replace('2','',str_replace('3','',str_replace('4','',str_replace('5','',str_replace('6','',str_replace('7','',str_replace('8','',str_replace('9','',$innards)))))))))))) != '') { ingp($innards); } if ($preinnards == '') { $preinnards='&#' . str_replace(',',';&#',$innards) . ';'; } $svgprefix=''; $svgsuffix=''; if (strpos($innards, ''; } else { $svgprefix=''; } $svgsuffix=''; if (trim(str_replace(',','',str_replace('0','',str_replace('1','',str_replace('2','',str_replace('3','',str_replace('4','',str_replace('5','',str_replace('6','',str_replace('7','',str_replace('8','',str_replace('9','',$innards)))))))))))) == '') { for ($x=0; $x<=$w; $x+=20) { for ($y=0; $y<=(0 + $h); $y+=20) { if ($x == 0 && $y == 0) { $innards='' . $preinnards . ''; if ($h > 0) { $innardslast.='' . $preinnards . ''; } } else if (isset($_GET['background']) || isset($_GET[$whati]) || $x == 0 || $y == 0 || ($x + 20) > $w || ($y + 20) > (0 + $h)) { if ($x == $w) { $innardslast.='' . $preinnards . ''; } else if ($y >= $h) { $innardslast.='' . $preinnards . ''; } else { $innards.='' . $preinnards . ''; } if ($x == 0) { $innardslast.='' . $preinnards . ''; } else if ($y == 0) { $innardslast.='' . $preinnards . ''; } else { $innards.='' . $preinnards . ''; } } } } } } ourecho ('' . html_entity_decode('' . $svgprefix . $svgmiddle . $innards . $innardslast . $lastcontent . $textcontent . $svgsuffix, ENT_QUOTES, "utf-8")); } else if (isset($_POST['image']) || isset($_GET['image'])) { ourecho ('' . html_entity_decode('' . $svgmiddle . $lastcontent . $textcontent . '', ENT_QUOTES, "utf-8")); } else { ourecho ('' . html_entity_decode('' . $svgmiddle . '', ENT_QUOTES, "utf-8")); } function ourecho($inh) { global $asbkg, $lastcontent, $restis, $h, $w, $pw, $ph, $crcolor, $crfillop, $zero, $lc, $textcontent; $lcextra=''; if ($restis != '') { if (strpos((',' . $restis . ','), ',circle') !== false) { if (strpos((',' . $restis . ','), ',circle,') === false) { $crcolour=collectstuff(explode(',', explode(',circle', $restis)[1])[0], 'circle'); $restis=str_replace('circle' . $crcolour . ',','',str_replace(',circle' . $crcolour . ',','',$restis)); } $restis=str_replace('circle,','',str_replace(',circle,','',$restis)); $lcextra.=retandclear(''); } if (strpos((',' . $restis . ','), ',ellipse') !== false) { if (strpos((',' . $restis . ','), ',ellipse,') === false) { $crcolour=collectstuff(explode(',', explode(',ellipse', $restis)[1])[0], 'ellipse'); $restis=str_replace('ellipse' . $crcolour . ',','',str_replace(',ellipse' . $crcolour . ',','',$restis)); } $restis=str_replace('ellipse,','',str_replace(',ellipse,','',$restis)); $lcextra.=retandclear(''); } if (strpos((',' . $restis . ','), ',rect') !== false) { if (strpos((',' . $restis . ','), ',rect,') === false) { $crcolour=collectstuff(explode(',', explode(',rect', $restis)[1])[0], 'rect'); $restis=str_replace('rect' . $crcolour . ',','',str_replace(',rect' . $crcolour . ',','',$restis)); } $restis=str_replace('rect,','',str_replace(',rect,','',$restis)); $lcextra.=retandclear(''); } if ($lcextra == '' && $lc != '') { $lcextra=$lc; // . $textcontent; if ($textcontent != '') { $lcextra.=$textcontent; } } if ($textcontent != '') { if (strpos($inh, $textcontent) === false) { $lcextra.=$textcontent; } } if ($lcextra != '') { if (strpos($inh, '') !== false) { $inh=str_replace('', $lcextra . '', $inh); } else { $inh.=$lcextra; } } } if ($asbkg && (isset($_GET['midbit']) || isset($_POST['midbit']))) { echo '', $inh)[0])[1] . ''; } else if ($asbkg) { if (isset($_GET['nobase64']) || isset($_POST['nobase64'])) { echo "data:image/svg+xml;utf8," . ('', $inh)[0])[1] . ''); } else { echo "data:image/svg+xml;base64," . base64_encode('', $inh)[0])[1] . ''); } } else { echo $inh; } } ?>