";
$bsg="border:1px solid lightblue;";
$onl=" onload='tdtitle();'";
if (trim(('' . $_SERVER['HTTP_REFERER'])) != '') { $onl=""; $bsg=""; }
if (strpos(strtolower(trim(('' . $_SERVER['HTTP_REFERER']))), "/itblog/") !== false) { $topp="parent"; $bsg="border:1px solid lightblue;"; }
if (strpos(strtolower(trim(('' . $_SERVER['HTTP_REFERER']))), "/wordpress/") !== false) { $topp="parent"; $bsg="border:1px solid lightblue;"; }
$xmove=-50;
$ymove=-30;
$zmove=10;
$xscale=70;
$yscale=220;
$zscale=70;
$xlight1=-300;
$ylight1=0;
$zlight1=-300;
$xlight2=300;
$ylight2=-300;
$zlight2=-300;
$radius=100;
$radiusouter=100;
$blight1r=100;
$blight1g=100;
$blight1b=255;
$blight2r=100;
$blight2g=255;
$blight2b=100;
$bgrd="#ffffff";
$bgrdr=255;
$bgrdg=255;
$bgrdb=255;
$scol="#ffffff";
$sgrdr=255;
$sgrdg=255;
$sgrdb=255;
$mcol="#ffffff";
$mgrdr=255;
$mgrdg=255;
$mgrdb=255;
$mval="1.25";
$mvalh="";
$mchecked="";
$mc="";
$parentdot="";
$parentdotx="";
$topoverlay="
function diframe(iois) {
if (iois != null) {
bconto = (iois.contentWindow || iois.contentDocument);
if (bconto != null) {
try {
if (bconto.document) { bconto = bconto.document; }
if (bconto.getElementById('topimg')) { bc=bconto.getElementById('topimg').title; parent.bc=bconto.getElementById('topimg').title; }
} catch(eee) { }
}
}
}
function ciframe(iois) {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
try {
if (aconto.document) { aconto = aconto.document; }
if (aconto.getElementById('topimg')) {
if ((aconto.getElementById('topimg').title) != '') {
if (document.getElementById('td_' + tdfs)) {
document.getElementById('td_' + tdfs).title=aconto.getElementById('topimg').title;
}
}
}
} catch(eee) { }
}
}
}
function tdtitle() {
if (document.getElementById('topimg')) {
if ((document.getElementById('topimg').title) != '') {
if (document.getElementById('td_' + tdfs)) {
document.getElementById('td_' + tdfs).title=document.getElementById('topimg').title;
}
}
}
}
function topoverlay() {
if (!document.getElementById('form_' + tdfs) && aconto) {
if (aconto.getElementById('form_' + tdfs).method.toUpperCase() != 'GET') {
aconto.getElementById('form_' + tdfs).target='ifinv';
aconto.getElementById('form_' + tdfs).method='GET';
//aconto.getElementById('ifinv').src=document.URL.split('#')[0].split('?')[0];
aconto.getElementById('submit_' + tdfs).click();
setTimeout(topoverlay, 5000);
} else if (aconto.getElementById('driver_' + tdfs).value.toLowerCase() == 'gd') {
//if (!" . $topp . ".document.getElementById('topimg') && parent.document.getElementById('topimg')) {
if (parent.document.getElementById('topimg')) {
if (parent.document.body.innerHTML.indexOf('imgoverlay') == -1) {
parent.document.getElementById('topimg').style.opacity='0.5';
parent.document.getElementById('topimg').src=parent.document.getElementById('topimg').title;
parent.document.getElementById('topimg').title='';
}
if (" . $parentdot ."bconto) {
parent.document.getElementById('otherimg').innerHTML+='';
} else {
parent.document.getElementById('otherimg').innerHTML+='';
}
} else if (!" . $topp . ".document.getElementById('topimg')) {
if (document.body.innerHTML.indexOf('imgoverlay') == -1) {
document.getElementById('topimg').style.opacity='0.5';
document.getElementById('topimg').src=document.getElementById('topimg').title;
document.getElementById('topimg').title='';
}
if (" . $parentdot ."bconto) {
document.getElementById('otherimg').innerHTML+='';
} else {
document.getElementById('otherimg').innerHTML+='';
}
} else {
if (" . $topp . ".document.body.innerHTML.indexOf('imgoverlay') == -1) {
" . $topp . ".document.getElementById('topimg').style.opacity='0.5';
" . $topp . ".document.getElementById('topimg').src=" . $topp . ".document.getElementById('topimg').title;
" . $topp . ".document.getElementById('topimg').title='';
}
if (" . $parentdot ."bconto) {
" . $topp . ".document.getElementById('otherimg').innerHTML+='';
} else {
" . $topp . ".document.getElementById('otherimg').innerHTML+='';
}
}
aconto.getElementById('form_' + tdfs).target='';
aconto.getElementById('form_' + tdfs).method='POST';
} else {
//if (!" . $topp . ".document.getElementById('topimg') && parent.document.getElementById('topimg')) {
if (parent.document.getElementById('topimg')) {
if (parent.document.body.innerHTML.indexOf('imgoverlay') == -1) {
parent.document.getElementById('topimg').style.opacity='0.5';
//parent.document.getElementById('topimg').src=parent.document.getElementById('topimg').title;
}
parent.document.getElementById('otherimg').innerHTML+='';
} else if (!" . $topp . ".document.getElementById('topimg')) {
if (document.body.innerHTML.indexOf('imgoverlay') == -1) {
document.getElementById('topimg').style.opacity='0.5';
//document.getElementById('topimg').src=document.getElementById('topimg').title;
}
document.getElementById('otherimg').innerHTML+='';
} else {
if (" . $topp . ".document.body.innerHTML.indexOf('imgoverlay') == -1) {
" . $topp . ".document.getElementById('topimg').style.opacity='0.5';
//" . $topp . ".document.getElementById('topimg').src=" . $topp . ".document.getElementById('topimg').title;
}
" . $topp . ".document.getElementById('otherimg').innerHTML+='';
}
aconto.getElementById('form_' + tdfs).target='';
aconto.getElementById('form_' + tdfs).method='POST';
}
} else {
if (document.getElementById('form_' + tdfs).method.toUpperCase() != 'GET') {
document.getElementById('form_' + tdfs).target='ifinv';
document.getElementById('form_' + tdfs).method='GET';
//document.getElementById('ifinv').src=document.URL.split('#')[0].split('?')[0];
document.getElementById('submit_' + tdfs).click();
setTimeout(topoverlay, 5000);
} else if (document.getElementById('driver_' + tdfs).value.toLowerCase() == 'gd') {
//if (!" . $topp . ".document.getElementById('topimg') && parent.document.getElementById('topimg')) {
if (parent.document.getElementById('topimg')) {
if (parent.document.body.innerHTML.indexOf('imgoverlay') == -1) {
parent.document.getElementById('topimg').style.opacity='0.5';
parent.document.getElementById('topimg').src=parent.document.getElementById('topimg').title;
parent.document.getElementById('topimg').title='';
}
if (" . $parentdot ."bconto) {
parent.document.getElementById('otherimg').innerHTML+='';
} else {
parent.document.getElementById('otherimg').innerHTML+='';
}
} else if (!" . $topp . ".document.getElementById('topimg')) {
if (document.body.innerHTML.indexOf('imgoverlay') == -1) {
document.getElementById('topimg').style.opacity='0.5';
document.getElementById('topimg').src=document.getElementById('topimg').title;
document.getElementById('topimg').title='';
}
if (" . $parentdot ."bconto) {
document.getElementById('otherimg').innerHTML+='';
} else {
document.getElementById('otherimg').innerHTML+='';
}
} else {
if (" . $topp . ".document.body.innerHTML.indexOf('imgoverlay') == -1) {
" . $topp . ".document.getElementById('topimg').style.opacity='0.5';
" . $topp . ".document.getElementById('topimg').src=" . $topp . ".document.getElementById('topimg').title;
" . $topp . ".document.getElementById('topimg').title='';
}
if (" . $parentdot ."bconto) {
" . $topp . ".document.getElementById('otherimg').innerHTML+='';
} else {
" . $topp . ".document.getElementById('otherimg').innerHTML+='';
}
}
document.getElementById('form_' + tdfs).target='';
document.getElementById('form_' + tdfs).method='POST';
} else {
//if (!" . $topp . ".document.getElementById('topimg') && parent.document.getElementById('topimg')) {
if (parent.document.getElementById('topimg')) {
if (parent.document.body.innerHTML.indexOf('imgoverlay') == -1) {
parent.document.getElementById('topimg').style.opacity='0.5';
//parent.document.getElementById('topimg').src=parent.document.getElementById('topimg').title;
}
parent.document.getElementById('otherimg').innerHTML+='';
} else if (!" . $topp . ".document.getElementById('topimg')) {
if (document.body.innerHTML.indexOf('imgoverlay') == -1) {
document.getElementById('topimg').style.opacity='0.5';
//document.getElementById('topimg').src=document.getElementById('topimg').title;
}
document.getElementById('otherimg').innerHTML+='';
} else {
if (" . $topp . ".document.body.innerHTML.indexOf('imgoverlay') == -1) {
" . $topp . ".document.getElementById('topimg').style.opacity='0.5';
//" . $topp . ".document.getElementById('topimg').src=" . $topp . ".document.getElementById('topimg').title;
}
" . $topp . ".document.getElementById('otherimg').innerHTML+='';
}
document.getElementById('form_' + tdfs).target='';
document.getElementById('form_' + tdfs).method='POST';
}
}
}
";
function datauriit($inim) {
global $blight1, $blight2;
if (!file_exists($inim)) {
return '';
} else if (strpos(strtolower($inim), ".png") !== false) {
return 'data:image/png;base64,' . base64_encode(file_get_contents($inim));
} else {
$preh1=file_get_contents($inim);
if (strpos($preh1, "") !== false) {
$posth1=explode("", $preh1);
} else {
$posth1=explode("/>", $preh1);
}
$xposth1=str_replace('#ffffff', strtoupper($bgrd), $posth1[0]);
$xposth2=str_replace('stroke: none', 'stroke: NONE', $xposth1);
$posth=str_replace($posth1[0],$xposth2,$preh1);
$xhi=str_replace("")[1]);
}
}
function rgb_via_hex($hexin) {
global $r, $g, $b;
list($r, $g, $b) = sscanf($hexin, "#%02x%02x%02x");
}
$thing="";
$textx="";
$shape="cone";
$metal=null;
if (isset($_GET['shape'])) {
$shape=strtolower(urldecode($_GET['shape']));
} else if (isset($_POST['shape'])) {
$shape=strtolower(urldecode($_POST['shape']));
} else if (isset($_GET['text'])) {
$textx=str_replace("+"," ",urldecode($_GET['text']));
$shape="";
} else if (isset($_POST['text'])) {
$textx=str_replace("+"," ",urldecode($_POST['text']));
$shape="";
}
if ($textx == "") {
$hi="";
if ($shape == "spherocube") {
$roll=45;
$pitch=30;
$yaw=15;
$xmove=-225;
$ymove=-100;
$zmove=0;
} else if ($shape == "star") {
$roll=0;
$pitch=-25;
$yaw=-15;
} else if ($shape == "helicoid") {
$roll=-50;
$pitch=0;
$yaw=15;
$xmove=50;
$ymove=-220;
$zmove=0;
$detail=10;
} else if ($shape == "torus") {
$roll=-45;
$pitch=0;
$yaw=-30;
$detail=10;
$detail2=10;
$xmove=-0;
$ymove=-20;
$zmove=0;
$radius=90;
$radiusouter=120;
$detail=10;
$detail2=10;
} else if ($shape == "bundt") {
$roll=-45;
$pitch=0;
$yaw=-15;
$detail=15;
} else if ($shape == "cube") {
$roll=-60;
$pitch=60;
$yaw=40;
$radius=100;
} else if ($shape == "cone") {
$roll=-45;
$pitch=-120;
$yaw=-10;
$detail=64;
$xscale=70;
$yscale=220;
$zscale=70;
$xmove=-50;
$ymove=-30;
$zmove=10;
} else if ($shape == "sphere") {
$radius=85;
$detail=5;
}
foreach( $_GET as $name=>$val ) {
$thing=explode("_", $name)[0];
if (strpos($name, "_") !== false || strpos($name, "light") !== false) {
if ($thing == "roll") {
$roll=$val;
} else if ($thing == "pitch") {
$pitch=$val;
} else if ($thing == "yaw") {
$yaw=$val;
} else if ($thing == "detail") {
$detail=$val;
} else if ($thing == "detail2") {
$detail2=$val;
} else if ($thing == "width") {
$width=$val;
} else if ($thing == "height") {
$height=$val;
} else if ($thing == "light") {
$light=$val;
} else if ($thing == "light1x") {
$xlight1=$val;
} else if ($thing == "light1y") {
$ylight1=$val;
} else if ($thing == "light1z") {
$zlight1=$val;
} else if ($thing == "light2x") {
$xlight2=$val;
} else if ($thing == "light2y") {
$ylight2=$val;
} else if ($thing == "light2z") {
$zlight2=$val;
} else if ($thing == "scalex") {
$xscale=$val;
} else if ($thing == "scaley") {
$yscale=$val;
} else if ($thing == "scalez") {
$zscale=$val;
} else if ($thing == "movex") {
$xmove=$val;
} else if ($thing == "movey") {
$ymove=$val;
} else if ($thing == "movez") {
$zmove=$val;
} else if ($thing == "radius") {
$radius=$val;
} else if ($thing == "radiusouter") {
$radiusouter=$val;
} else if ($thing == "light1" && strpos($name, "_") === false) {
$alight1=$val;
} else if ($thing == "light2" && strpos($name, "_") === false) {
$alight2=$val;
} else if ($thing == "bcol") {
$bgrd=$val;
rgb_via_hex($bgrd);
$bgrdr=$r;
$bgrdg=$g;
$bgrdb=$b;
} else if ($thing == "mcolvalue") {
$mval=$val;
} else if ($thing == "scol") {
$scol=$val;
rgb_via_hex($scol);
$sgrdr=$r;
$sgrdg=$g;
$sgrdb=$b;
} else if ($thing == "mcol") {
$mcol=$val;
rgb_via_hex($mcol);
$mgrdr=$r;
$mgrdg=$g;
$mgrdb=$b;
} else if ($thing == "light1" && strpos($name, "_") !== false) {
$blight1=$val;
rgb_via_hex($blight1);
$blight1r=$r;
$blight1g=$g;
$blight1b=$b;
} else if ($thing == "light2" && strpos($name, "_") !== false) {
$blight2=$val;
rgb_via_hex($blight2);
$blight2r=$r;
$blight2g=$g;
$blight2b=$b;
}
} else if ($thing == "perspective") {
$pspect=$val;
$isget=true;
$bsg="";
} else if ($thing == "driver") {
$driver=$val;
$ext=str_replace("gd", ".png", str_replace("svg", ".svg", $driver));
if ($driver == "gd") {
$hi="";
} else {
$preh1=file_get_contents('object' . $shape . $ext);
if (strpos($preh1, "") !== false) {
$posth1=explode("", $preh1);
} else {
$posth1=explode("/>", $preh1);
}
$xposth1=str_replace('#ffffff', strtoupper($bgrd), $posth1[0]);
$xposth2=str_replace('stroke: none', 'stroke: NONE', $xposth1);
$posth=str_replace($posth1[0],$xposth2,$preh1);
$hi=str_replace("