Keep Image Files ";
}
$inputask="
";
if (isset($_GET['ispec']) && (isset($_GET['outext']) || $outeis != '')) {
if (isset($_GET['quality'])) { $quality=explode('.',str_replace('%','',str_replace('+',' ',urldecode($_GET['quality']))))[0]; }
if (isset($_GET['outext'])) { if (strlen($_GET['outext']) > 0) { $outeis=str_replace('+',' ',urldecode($_GET['outext'])); } }
ourglob(str_replace('+',' ',urldecode($_GET['ispec'])), $outeis);
} else if (isset($_POST['ispec']) && (isset($_POST['outext']) || $outeis != '')) {
if (isset($_POST['quality'])) { $quality=explode('.',str_replace('%','',str_replace('+',' ',urldecode($_POST['quality']))))[0]; }
if (isset($_POST['outext'])) { if (strlen($_POST['outext']) > 0) { $outeis=str_replace('+',' ',urldecode($_POST['outext'])); } }
ourglob(str_replace('+',' ',urldecode($_POST['ispec'])), $outeis);
}
function ourglob($ofwhat, $inext) {
global $inputask, $erroris, $zipfile, $ziparrwh, $ziparrc, $ziparr, $fspec, $ext, $width, $height, $iferr, $includesare, $cr, $crd, $dcr, $quality, $tablerows;
$image=null;
$lastname="";
//file_put_contents('xpp.xpp', $includesare);
$concernyourself=0;
if ($zipfile == "") {
if ($erroris == "") {
return glob($ofwhat);
} else {
foreach (glob($ofwhat) as $ourfilename) {
if (strpos($inputask, " function onl() { document.getElementById('deta').innerHTML='+'; document.getElementById('myh1').innerHTML=' Image Conversions'; } setTimeout(onl, 3000); ";
}
$ext="." . explode(".", $ourfilename)[-1 + sizeof(explode(".", $ourfilename))];
$new_file=str_replace($ext, strtolower(str_replace('..','.',"." . $inext)), $ourfilename);
//echo $ofwhat . "
" . $ourfilename . "
" . $ext . "
" . $inext . "
" . $new_file;
if (file_exists($new_file)) {
$new_file=str_replace($ext, strtoupper(str_replace('..','.',"." . $inext)), $ourfilename);
}
if (file_exists($new_file)) {
$new_file=str_replace($ext, strtolower(str_replace('..','.',"." . $inext)), $ourfilename);
while (file_exists($new_file)) {
$new_file=str_replace(strtolower(str_replace('..','.',"." . $inext)), "0" . strtolower(str_replace('..','.',"." . $inext)), $new_file);
}
}
array_push($ziparr, $new_file); //$ourfilename);
$im_php = imagecreatefromstring(file_get_contents($ourfilename));
$width = imagesx($im_php);
$height = imagesy($im_php);
switch ($inext) {
case '.jpg':
case '.jpeg':
$image = imagejpeg($im_php, $new_file, $quality);
break;
case '.gif':
$image = imagegif($im_php, $new_file);
break;
case '.png':
$image = imagepng($im_php, $new_file);
break;
}
imagedestroy($im_php);
//array_push($ziparrwh, '' . $width . ',' . $height);
//array_push($ziparrc, file_get_contents($new_file));
//if (!file_exists($new_file)) { echo "
oops RE " . $new_file . "
"; }
$tablerows.="" . basename($new_file) . " |
---|
\n \n \n |
";
if (strpos(strtolower($_SERVER['SERVER_NAME']), 'rjmprogramming.com.au') === false) {
imagedestroy($image);
if (isset($_GET['delfile']) || isset($_POST['delfile'])) {
unlink($new_file);
}
} else {
unlink($new_file);
}
}
$zipfile=" ";
return $ziparr;
}
} else {
$zip = zip_open($zipfile);
if ($zip) {
while ($zip_entry = zip_read($zip)) {
$ourfilename=zip_entry_name($zip_entry);
if (strpos($includesare, $ourfilename) !== false || $includesare == '') {
$regexpok=0;
if (strpos($ourfilename, "_MACOSX/") === false) {
$regexp="/^[\S]" . str_replace('[\s\S]?','[\s\S]*',str_replace('*','[\s\S]?',str_replace('?',',',str_replace('%',',',str_replace('.','[.]',$ofwhat))))) . "$/";
$regexpok=preg_match($regexp, explode("/",$ourfilename)[-1 + sizeof(explode("/",$ourfilename))]);
if ($regexpok !== 0) {
if ($ext == "") $ext="." . explode(".", $ourfilename)[-1 + sizeof(explode(".", $ourfilename))];
if ($iferr != "" && strpos($iferr, "&include=&") !== false) {
$iferr=str_replace("&include=&", "&include=" . urlencode($ourfilename) . "&", $iferr);
$lastname=$ourfilename;
$concernyourself++;
$cr.=$crd . $ourfilename; // . " selected";
if ($dcr != " ") { $dcr.=$crd . "" . basename($ourfilename) . ""; }
$crd="\n";
} else if ($iferr != "" && $concernyourself == 1) {
$iferr=str_replace("&include=" . urlencode($lastname) . "&", "&include=" . urlencode($lastname . "," . $ourfilename) . "&", $iferr);
$concernyourself++;
$cr.=$crd . $ourfilename; // . " selected";
if ($dcr != " ") { $dcr.=$crd . "" . basename($ourfilename) . ""; }
$crd="\n";
} else {
$cr.=$crd . $ourfilename;
if ($dcr != " ") { $dcr.=$crd . "" . basename($ourfilename) . ""; }
$crd="\n";
}
array_push($ziparr, $ourfilename);
$isc=zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
$im_php = imagecreatefromstring($isc);
$width = imagesx($im_php);
$height = imagesy($im_php);
imagedestroy($im_php);
array_push($ziparrwh, '' . $width . ',' . $height);
array_push($ziparrc, $isc);
}
}
} else { // reject this one
if (strpos($ourfilename, "_MACOSX/") === false) {
$regexp="/^[\S]" . str_replace('[\s\S]?','[\s\S]*',str_replace('*','[\s\S]?',str_replace('?',',',str_replace('%',',',str_replace('.','[.]',$ofwhat))))) . "$/";
$regexpok=preg_match($regexp, explode("/",$ourfilename)[-1 + sizeof(explode("/",$ourfilename))]);
if ($regexpok !== 0) {
$cr.=$crd . $ourfilename;
if ($dcr != " ") { $dcr.=$crd . "" . basename($ourfilename) . ""; }
$crd="\n";
}
}
}
}
zip_close($zip);
$includesare="";
}
//echo $zhuha;
//exit;
return $ziparr;
}
}
echo "
var cura=0;
var aaas=[];
function checkca() {
if (aaas.length == 0) { aaas=document.getElementsByTagName('a'); }
for (var ias=0; ias 10) { alert(aaas[ias].title); }
aaas[ias].click();
cura++;
setTimeout(checkca, 5000);
} else if (ias == cura) {
cura++;
setTimeout(checkca, 200);
}
}
}
function closeall() {
var aas=document.getElementsByTagName('details');
for (var ias=0; ias
Image Conversions
RJM Programming - October, 2022
" . $inputask . "
";
?>