Transform -> Guillotine"
//ini_set('max_execution_time', 6000);
set_time_limit(300);
ini_set('display_errors', false); // thanks to https://stackoverflow.com/questions/8440439/safely-catch-a-allowed-memory-size-exhausted-error-in-php
error_reporting(-1);
set_error_handler(function($code, $string, $file, $line) {
throw new ErrorException($string, null, $code, $file, $line);
});
function datauriit($infn) {
if (strpos(("~" . $infn), "~/tmp/") !== false) {
if (file_exists($infn)) {
return 'data:image/' . str_replace("jpg","jpeg",strtolower(explode(".", $infn)[-1 + sizeof(explode(".", $infn))])) . ';base64,' . base64_encode(file_get_contents($infn));
}
}
return $infn;
}
function ggserver_remote_addr() {
global $stfle;
if (isset($_POST['nicky'])) { return str_replace('+',' ',urldecode($_POST['nicky'])); }
$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;
if (isset($_GET['outfile'])) {
if (urldecode($_GET['outfile']) != "") {
$stfle=' ';
return urldecode($_GET['outfile']);
}
} else if (isset($_POST['outfile'])) {
if (urldecode($_POST['outfile']) != "") {
$stfle=' ';
return urldecode($_POST['outfile']);
}
}
return 'gg' . str_replace(".","",str_replace("_", "",str_replace("0", "a",str_replace("1", "b",str_replace("2", "c",str_replace("3", "d",str_replace("4", "e",str_replace("5", "f",str_replace("6", "g",str_replace("7", "h",str_replace("8", "i",str_replace("9", "j",str_replace(":", "_", $rma)))))))))))));
}
function server_remote_addr() {
global $stfle;
if (isset($_POST['nickz'])) { return str_replace('+',' ',urldecode($_POST['nickz'])); }
$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;
if (isset($_GET['outfile'])) {
if (urldecode($_GET['outfile']) != "") {
$stfle=' ';
return urldecode($_GET['outfile']);
}
} else if (isset($_POST['outfile'])) {
if (urldecode($_POST['outfile']) != "") {
$stfle=' ';
return urldecode($_POST['outfile']);
}
}
return str_replace(":", "_", $rma);
}
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) { // thanks to https://stackoverflow.com/questions/1175096/how-to-find-out-if-youre-using-https-without-serverhttps
$absurlprefix="https://" . $_SERVER['SERVER_NAME'] . "" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))) . "" . str_replace("gimp_guillotine_followup.php","",explode("#",explode("?",$_SERVER['REQUEST_URI'])[0])[0]);
} else {
$absurlprefix="http://" . $_SERVER['SERVER_NAME'] . "" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))) . "" . str_replace("gimp_guillotine_followup.php","",explode("#",explode("?",$_SERVER['REQUEST_URI'])[0])[0]);
}
$adatam="data-";
$adatam="";
$ru=urlencode(explode('#',explode('?',$_SERVER['REQUEST_URI'])[0])[0]);
$zipfile="";
$ziparr = array();
$ziparrc = array();
$ziparrwh = array();
$ext="";
$div_img="div, .iimg"; // div, img
$iferr="";
$erroris="";
$cr="";
$dcr=" ";
$getdateelsewisecont="";
$getdateelsewise="";
$hastoexist="";
$andoneone=" && 1 == 4";
$andtwotwo="";
$pdfabit="";
if (isset($_POST['getme'])) {
if (file_exists('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf') && $_POST['getme'] == 'pdf') {
header("Content-type:application/pdf");
//echo 'data:application/pdf;base64,' . base64_encode(file_get_contents('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf'));
echo file_get_contents('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf');
}
if (file_exists('/tmp/' . ggserver_remote_addr() . 'video.mov') && $_POST['getme'] == 'video') {
echo '
';
//header("Content-type:video/mov");
//echo 'data:application/pdf;base64,' . base64_encode(file_get_contents('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf'));
//echo file_get_contents('/tmp/' . ggserver_remote_addr() . 'video.mov');
}
if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'PHP' . DIRECTORY_SEPARATOR . 'animegif' . DIRECTORY_SEPARATOR . server_remote_addr() . '.gif') && $_POST['getme'] == 'gif') {
echo '';
}
exit;
} else if (isset($_GET['getme'])) {
if (file_exists('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf') && $_GET['getme'] == 'pdf') {
header("Content-type:application/pdf");
//echo 'data:application/pdf;base64,' . base64_encode(file_get_contents('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf'));
echo file_get_contents('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf');
}
if (file_exists('/tmp/' . ggserver_remote_addr() . 'video.mov') && $_GET['getme'] == 'video') {
echo '';
//header("Content-type:video/mov");
//echo 'data:application/pdf;base64,' . base64_encode(file_get_contents('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf'));
//echo file_get_contents('/tmp/' . ggserver_remote_addr() . 'video.mov');
}
if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'PHP' . DIRECTORY_SEPARATOR . 'animegif' . DIRECTORY_SEPARATOR . server_remote_addr() . '.gif') && $_GET['getme'] == 'gif') {
echo '';
}
exit;
}
if (isset($_POST['andgo'])) {
$andtwotwo="";
$andoneone=" && 1 == 3";
//$andtwotwo=""; //"";
if (file_exists('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf')) {
$adatam="";
//$pdfabit='
or PDF
';
$pdfabit='
or PDF (all original slides)
';
}
if (file_exists('/tmp/' . ggserver_remote_addr() . 'video.mov')) {
$pdfabit.='
or Video (all original slides)
';
}
if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'PHP' . DIRECTORY_SEPARATOR . 'animegif' . DIRECTORY_SEPARATOR . server_remote_addr() . '.gif')) {
$pdfabit.='
or Animated GIF (all original slides)
';
}
} else if (isset($_GET['andgo'])) {
$andoneone=" && 1 == 1";
$andtwotwo="";
if (file_exists('/tmp/' . ggserver_remote_addr() . 'pdftmp.pdf')) {
$adatam="";
//$pdfabit='
or PDF
';
$pdfabit='
or PDF (all original slides)
';
}
if (file_exists('/tmp/' . ggserver_remote_addr() . 'video.mov')) {
$pdfabit.='
or Video (all original slides)
';
}
if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'PHP' . DIRECTORY_SEPARATOR . 'animegif' . DIRECTORY_SEPARATOR . server_remote_addr() . '.gif')) {
$pdfabit.='
or Animated GIF (all original slides)
';
}
}
if (isset($_POST['inlineldt'])) {
if (file_exists("has_to.exist")) { unlink("has_to.exist"); }
} else if (isset($_GET['inlineldt'])) {
if (file_exists("has_to.exist")) { unlink("has_to.exist"); }
}
$fflist="";
$subjarr=["", "", "", ""];
$includesare="";
if (isset($_POST['include'])) { $includesare=str_replace("+"," ",urldecode($_POST['include'])); }
if (isset($_GET['include'])) { $includesare=str_replace("+"," ",urldecode($_GET['include'])); }
$errblurb="(recstwo[irecs] + '~').indexOf(' selected~') != -1";
$selopts=" var opts=document.getElementsByTagName('option');
for (var iopts=0; iopts','>',$getdateelsewisecont));
// exit;
}
}
if (isset($_POST['duis'])) {
new_content(urldecode($_POST['duis']));
exit;
}
if (isset($_GET['error'])) {
$errblurb="irecs <= 1";
$erroris='' . str_replace("+"," ",urldecode($_GET['error'])) . '
' . 'So we are limiting your included images to first two below, for you to consider retrying.
';
$selopts=" var opt=document.getElementById('oneopt');
if (opt) {
opt.setAttribute('selected', '');
opt.selected = true;
}
opt=document.getElementById('twoopt');
if (opt) {
opt.setAttribute('selected', '');
opt.selected = true;
}
";
} else if (isset($_POST['error'])) {
$errblurb="irecs <= 1";
$erroris='' . str_replace("+"," ",urldecode($_POST['error'])) . '
' . 'So we are limiting your included images to first two below, for you to consider retrying.
';
$selopts=" var opt=document.getElementById('oneopt');
if (opt) {
opt.setAttribute('selected', '');
opt.selected = true;
}
opt=document.getElementById('twoopt');
if (opt) {
opt.setAttribute('selected', '');
opt.selected = true;
}
";
}
register_shutdown_function(function(){
global $iferr;
$error = error_get_last();
if (null !== $error) {
if ($iferr != "./gimp_guillotine_followup.php" && $iferr != "") {
header("Location: " . $iferr . "" . urlencode($error['message']));
exit;
}
//echo 'Caught at shutdown ' . $error['message'];
}
});
$style="";
if (isset($_GET['style'])) {
$style=str_replace("imgXXXimg","img + img",str_replace("+"," ",str_replace("img+++img","imgXXXimg",str_replace("img+img","imgXXXimg",urldecode($_GET['style'])))));
} else if (isset($_POST['style'])) {
$style=str_replace("imgXXXimg","img + img",str_replace("+"," ",str_replace("img+++img","imgXXXimg",str_replace("img+img","imgXXXimg",urldecode($_POST['style'])))));
}
$noncanvasd=" style='display:none;'";
$gp_filespec="";
if (isset($_POST['filespec']) || isset($_GET['filespec'])) {
if (isset($_POST['filespec'])) {
$gp_filespec=str_replace("+"," ",urldecode($_POST['filespec']));
} else {
$gp_filespec=str_replace("+"," ",urldecode($_GET['filespec']));
}
if (strpos($gp_filespec, ".zip#") !== false) {
$zipfile=explode(".zip#", $gp_filespec)[0] . ".zip";
$gp_filespec=str_replace($zipfile . "#", "", $gp_filespec);
} else if (strpos($gp_filespec, ".zip") !== false) {
$zipfile=explode(".zip", $gp_filespec)[0] . ".zip";
$gp_filespec=str_replace($zipfile . "", "", $gp_filespec);
} else if (strpos($gp_filespec, ".ZIP#") !== false) {
$zipfile=explode(".ZIP#", $gp_filespec)[0] . ".ZIP";
$gp_filespec=str_replace($zipfile . "#", "", $gp_filespec);
} else if (strpos($gp_filespec, ".ZIP") !== false) {
$zipfile=explode(".ZIP", $gp_filespec)[0] . ".ZIP";
$gp_filespec=str_replace($zipfile . "", "", $gp_filespec);
} else if (strpos($gp_filespec, ".Zip#") !== false) {
$zipfile=explode(".Zip#", $gp_filespec)[0] . ".Zip";
$gp_filespec=str_replace($zipfile . "#", "", $gp_filespec);
} else if (strpos($gp_filespec, ".Zip") !== false) {
$zipfile=explode(".zip", $gp_filespec)[0] . ".Zip";
$gp_filespec=str_replace($zipfile . "", "", $gp_filespec);
}
if ($zipfile != "") {
if (!file_exists($zipfile)) {
$zzipfile=$zipfile;
$zipfile="";
foreach (glob($zzipfile) as $zzipfile) {
if ($zipfile == "") {
$zipfile=$zzipfile;
}
}
}
if ($zipfile != "" && explode("#", $gp_filespec)[0] == "") {
$wgp_filespec=$gp_filespec;
if (strpos($gp_filespec, "#") !== false) {
$gp_filespec="*.*g*" . $wgp_filespec;
} else if ($gp_filespec != "") {
$gp_filespec="*.*g*#" . $wgp_filespec;
} else {
$gp_filespec="*.*g*" . $wgp_filespec;
}
}
}
$noncanvasd="";
}
$svganimation="";
$gds='emboss,edge,negedge,sharpen,boxblur,negate,colourizered,colourizegreen,colourizeblue,colourize,pixellate,smooth,contrast,brightness,sketchy,flipvertical,fliphorizontal,flip';
$bgds='';
for ($igds=0; $igds';
}
$filterbuttons=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: sepia(100%); filter: sepia(100%); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Sepia'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: grayscale(100%); filter: grayscale(100%); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Black and White'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: brightness(100%); filter: brightness(100%); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Brightness'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: contrast(100%); filter: contrast(100%); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Contrast'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: saturate(100%); filter: saturate(100%); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Saturation'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: opacity(100%); filter: opacity(100%); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Opacity'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: invert(100%); filter: invert(100%); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Inversion'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: hue-rotate(100deg); filter: hue-rotate(100deg); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Hue Rotation'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: blur(100px); filter: blur(100px); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Blurring'>";
$filterbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-filter: drop-shadow(8px 8px 10px red); filter: drop-shadow(8px 8px 10px red); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Drop Shadowing'>";
$transformbuttons=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: scale(1.0,1.0); transform: scale(1.0,1.0); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Scaling'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: scale3d(1.0,1.0,1.0); transform: scale3d(1.0,1.0,1.0); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Scaling 3D'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: rotate(0deg); transform: rotate(0deg); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Rotation'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: rotate3d(0,0,0,0deg); transform: rotate3d(0,0,0,0deg); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Rotation 3D'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: translate(0px,0px); transform: translate(0px,0px); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Translating'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: translate3d(0px,0px,0px); transform: translate3d(0px,0px,0px); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Translating 3D'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: skew(0deg,0deg); transform: skew(0deg,0deg); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Skewing'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: matrix(1.0,0.0,0.0,1.0,0,0); transform: matrix(1.0,0.0,0.0,1.0,0,0); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Matrix 2D Transformation'>";
$transformbuttons.=" '; document.getElementById('style').value=this.title; } else { document.getElementById('style').value+=' ' + this.title; } if (1 == 7) { hcnt--; } setTimeout(fc,8000); \" title=' " . $div_img . " { -webkit-transform: matrix3d(1.0,0.0,0.0,0,0.0,1.0,0.0,0,0.0,0.0,1.0,0,0,0,0,1); transform: matrix3d(1.0,0.0,0.0,0,0.0,1.0,0.0,0,0.0,0.0,1.0,0,0,0,0,1); } ' style='background-color:lightgreen;' type=button value='Process with Lots of Matrix 3D Transformation'>";
$svgbuttons=" ";
$svgbuttons.=" ";
$svgbuttons.=" ";
$svgbuttons.=$bgds;
$tablebit="";
$mapbit="";
$svgbit="";
$svgnmbit="";
$svgnpathmbit="";
$lastmt="";
$lasttopoffset=0;
$allhtml=false;
$vh="";
$iflist="";
$iflistd="";
$jflist="";
$jflistd="";
$affmpeg="";
$aconvert="";
$ainhouseslideshow="";
$amultibackground="";
$amultiborder="";
$bitffmpeg="";
$bitconvert="";
$bitinhouseslideshow="";
$bitmultibackground="";
$bitmultiborder="";
$bffmpeg=" ";
if (command_exists("ffmpeg") || file_exists("/usr/local/bin/ffmpeg") || is_link("/usr/local/bin/ffmpeg")) { $bffmpeg=str_replace("display:none;","display:INLINE-BLOCK;",$bffmpeg); }
$bconvert=" ";
if (command_exists("convert") || file_exists("/usr/local/bin/convert") || is_link("/usr/local/bin/convert")) { $bconvert=str_replace("display:none;","display:INLINE-BLOCK;",$bconvert); }
$binhouseslideshow=" ";
$bmultibackground=" ";
$bmultiborder=" ";
$atransition="";
$bittransition="";
$btransitionhtml=" ";
$transitionhtml="";
if (file_exists("keyframes_test.html")) {
$transitionhtml=file_get_contents("keyframes_test.html");;
} else if (file_exists("keyframes/keyframes_test.html")) {
$transitionhtml=file_get_contents("keyframes/keyframes_test.html");;
} else if (file_exists("../HTMLCSS/keyframes/keyframes_test.html")) {
$transitionhtml=file_get_contents("../HTMLCSS/keyframes/keyframes_test.html");;
}
if ($transitionhtml != "") { $btransitionhtml=str_replace("display:none;","display:INLINE-BLOCK;",$btransitionhtml); }
$slideshowtitle = "Slideshow Title";
$zero = "0";
$prewith0 = "youllneverfindthis";
$with0 = "youllneverfindthis";
$prewith = "lastone=0";
$with = "lastone=0";
$firsttd = "@--> | | ";
$lasttd = "--> | | ";
$scbitisv="";
if ((isset($_POST['filespec']) || isset($_GET['filespec'])) && strpos(('' . $_SERVER['QUERY_STRING']), "%40") === false && (!isset($_POST['inlineldt']) && !isset($_GET['inlineldt']))) { $scbitisv=""; }
$xtemp="
" . $scbitisv . "
Slideshow Creator - RJM Programming - December, 2014
$1 Slide 1 of
@--> | |
--> | |
";
$template = str_replace("$" . "1", $slideshowtitle, str_replace($prewith0, $with0, str_replace($prewith, $with, $xtemp)));
function prezmail($zris, $zxsis, $ztis, $zhis) {
global $subjarr, $fflist, $getdateelsewise, $getdateelsewisecont, $hastoexist;
$wwer="";
if (strpos($zxsis, "[") === false && strpos($zxsis, "<") === false && $zxsis != "") {
if (isset($_POST['inlineldt'])) {
if (file_exists("has_to.exist")) { unlink("has_to.exist"); }
$hastoexist="";
} else if (isset($_GET['inlineldt'])) {
if (file_exists("has_to.exist")) { unlink("has_to.exist"); }
$hastoexist="";
} else if ($getdateelsewise != "") {
$wwer="";
} else if (strpos($getdateelsewisecont, ' id="r1">') !== false) {
$wwer="";
} else {
file_put_contents("has_to.exist", "");
$hastoexist="has_to.exist";
}
}
}
function zmail($zris, $zxsis, $ztis, $zhis) {
global $subjarr, $fflist, $getdateelsewise, $getdateelsewisecont, $hastoexist;
if ($hastoexist != "") {
if (file_exists($hastoexist)) { unlink($hastoexist); $hastoexist=""; } else { return false; }
}
// file_put_contents("091.091","");
if (strpos($zxsis, "[") === false && strpos($zxsis, "<") === false && $zxsis != "") {
if (isset($_POST['inlineldt'])) {
$zxsis.=" at " . str_replace("`", "+", str_replace("+", " ", str_replace("++", " `", urldecode($_POST['inlineldt'])))) . " for [files]";
} else if (isset($_GET['inlineldt'])) {
$zxsis.=" at " . str_replace("`", "+", str_replace("+", " ", str_replace("++", " `", urldecode($_GET['inlineldt'])))) . " for [files]";
} else if ($getdateelsewise != "") {
if (1 == 1) { return false; }
$zxsis.=" at " . $getdateelsewise . " for [files]";
} else if (strpos($getdateelsewisecont, ' id="r1">') !== false) {
if (1 == 1) { return false; }
$zxsis.=" at " . explode("<", explode(' id="r1">', $getdateelsewisecont)[1])[0] . " for [files]";
} else {
if (1 == 1) { return false; }
file_put_contents("has_to.exist", "");
$hastoexist="has_to.exist";
$zxsis.=" at [date] for [files]";
}
// file_put_contents("092.092",$zxsis);
analtoken($zxsis, "");
}
// file_put_contents("093.093",$fflist);
subjtokenization($fflist, "files");
// file_put_contents("094.094",$subjarr[0]);
$zhis=str_replace("", $fflist, str_replace("[files]", $fflist, $zhis));
// file_put_contents("095.095",$xsis);
if (!isset($_POST['inlineldt']) && !isset($_GET['inlineldt'])) { return false; }
return mail($zris, subjtokenization($zxsis,"subject"), $ztis, $zhis);
}
function analtoken($inofinterest, $ifnotblankbody) {
global $subjarr, $fflist;
$inofinterest=trim($inofinterest);
if ($ifnotblankbody == "" && $inofinterest != "") { // subject
if (strpos(($inofinterest . "~"), "]~") !== false && strpos(($inofinterest . "~"), "[") !== false) {
$subjarr[3]="html";
if (isset($_POST['inlineldt'])) {
$inofinterest=str_replace("[date]", str_replace("`", "+", str_replace("+", " ", str_replace("++", " `", urldecode($_POST['inlineldt'])))), $inofinterest);
} else if (isset($_GET['inlineldt'])) {
$inofinterest=str_replace("[date]", str_replace("`", "+", str_replace("+", " ", str_replace("++", " `", urldecode($_GET['inlineldt'])))), $inofinterest);
} else {
$inofinterest=str_replace("[date]", date('l jS \of F Y h:i:s A'), $inofinterest);
}
if (isset($_SERVER['HTTP_REFERER'])) {
$inofinterest=str_replace("[httpreferer]", $_SERVER['HTTP_REFERER'], $inofinterest);
$inofinterest=str_replace("[serveraddr]", $_SERVER['SERVER_ADDR'], $inofinterest);
$inofinterest=str_replace("[requesttime]", $_SERVER['REQUEST_TIME'], $inofinterest);
$inofinterest=str_replace("[httpacceptlanguage]", $_SERVER['HTTP_ACCEPT_LANGUAGE'], $inofinterest);
$inofinterest=str_replace("[httpuseragent]", $_SERVER['HTTP_USER_AGENT'], $inofinterest);
$inofinterest=str_replace("[remoteaddr]", $_SERVER['REMOTE_ADDR'], $inofinterest);
$inofinterest=str_replace("[requesturi]", $_SERVER['REQUEST_URI'], $inofinterest);
if (isset($_SERVER['PATH_INFO'])) {
$inofinterest=str_replace("[pathinfo]", $_SERVER['PATH_INFO'], $inofinterest);
}
}
$inofinterest=str_replace("[lf]", "\n", $inofinterest);
$inofinterest=str_replace("[crlf]", "\r\n", $inofinterest);
$huharr=explode("[", $inofinterest);
// $proposedih=$huharr[0];
if (strpos(($inofinterest . "~"), "]") !== false && strpos(($inofinterest . "~"), "[") !== false) {
for ($ih=1; $ih", str_replace("[", "<", str_replace("]", ">", $inofinterest)));
} else {
if (strpos($inofinterest, "\n") !== false) {
$huharr=explode("\n", $inofinterest);
$subjarr[1]="";
} else {
$subjarr[1]="" . $inofinterest . "
";
}
}
} else {
$subjarr[0]=str_replace("\n", " ", str_replace("\r\n", " ", $inofinterest));
if (strpos($inofinterest, "\n") !== false) {
$huharr=explode("\n", $inofinterest);
$subjarr[1]="";
} else {
$subjarr[1]="" . $inofinterest . "
";
}
}
}
} else if ($inofinterest != "") { // body
$ifnotblankbody=trim($ifnotblankbody);
}
return $inofinterest;
}
function subjtokenization($inthing, $inmode) {
global $subjarr, $fflist;
if ($inmode == "subject") {
if ($subjarr[0] != "") {
if ($fflist == "") { return $subjarr[0]; }
return str_replace("", $fflist, str_replace("[files]", $fflist, str_replace("", $fflist, str_replace("[file]", $fflist, $subjarr[0]))));
} else if (strpos($inthing, "[") !== false) {
if ($fflist == "") { return str_replace("[date]", date('l jS \of F Y h:i:s A'), $inthing); }
return str_replace("", $fflist, str_replace("[files]", $fflist, str_replace("", $fflist, str_replace("[file]", $fflist, str_replace("[date]", date('l jS \of F Y h:i:s A'), $inthing)))));
}
return str_replace("", $fflist, str_replace("[files]", $fflist, $inthing));
} else if ($inmode == "bodysubject") {
// file_put_contents("036.036","");
if ($subjarr[1] != "") {
// file_put_contents("037.037",$subjarr[1]);
if (substr($subjarr[1], 0, 1) == "<" && strpos($subjarr[1], "") !== false) {
$subjarr[1]=str_replace("", "" . str_replace("\n", "
", $inthing) . "
", $subjarr[1]);
} else if (substr($subjarr[1], 0, 1) == "<" && strpos($subjarr[1], "