<?php
// one_line_find.php
// Find files webpage wise all in one inline arranged horizontal line
// RJM Programming
// February, 2026
// One line ls -clt https://www.rjmprogramming.com.au/*.txt via find $_SERVER['DOCUMENT_ROOT'] -type d -name '*' 
// convert @list.txt output.pdf
// pandoc presentation.md -o presentation.pptx
//![Image 1 description](image1.jpg)
//
//---
//
//![Image 2 description](image2.png)
//
//---
//
//![Image 3 description](path/to/image3.jpg)
// pandoc word via application/vnd.openxmlformats-officedocument.wordprocessingml.document
// convert -delay 1000 -loop 0 *.png animation.gif
// ffmpeg -f concat -safe 0 -i list.txt -r 25 -pix_fmt yuv420p output.mp4
//file 'slide1.jpg'
//duration 10
//file 'slide2.jpg'
//duration 10
//file 'slide3.jpg'
  ini_set('max_execution_time', 60000);

$thingtoattendto='';
$commentaries=[];
$afterobject='';

$sofarval='';
$sofarmime='';
$needten="0";
$offdr="";
$extbit="";
$anyway="";
$qs="";

if (isset($_GET['sofarval'])) { $sofarval=str_replace('+',' ',urldecode($_GET['sofarval'])); if ($qs == '') { $qs="?sofarval=" . $_GET['sofarval'];  } else {   $qs.="&sofarval=" . $_GET['sofarval'];  } }
if (isset($_GET['sofarmime'])) { $sofarval=str_replace('+',' ',urldecode($_GET['sofarmime'])); if ($qs == '') { $qs="?sofarmime=" . $_GET['sofarmime'];  } else {   $qs.="&sofarmime=" . $_GET['sofarmime'];  }  }
if (isset($_GET['needten'])) { $sofarval=str_replace('+',' ',urldecode($_GET['needten'])); if ($qs == '') { $qs="?needten=" . $_GET['needten'];  } else {   $qs.="&needten=" . $_GET['needten'];  }  }


function shutdown() {
    global $thingtoattendto;
    // This is our shutdown function, in 
    // here we can do any last operations
    // before the script is complete.

    if ($thingtoattendto != '') {
     sleep(145);
     unlink($thingtoattendto);
    }
}

function server_remote_addr() {
    $rma = $_SERVER['REMOTE_ADDR'];
    if (isset($_SERVER['HTTP_USER_AGENT'])) {
    $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 oururlencode($instis) {
  global $commentaries, $afterobject;
  $interim=urldecode($instis);
  $origim=str_replace('+',' ',$interim);
  $intcs=explode(',', $interim);
  $found=false;
  for ($j=0; $j<sizeof($intcs); $j++) {
   if ($j == 0) { 
     if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(explode('#',$intcs[$j])[0]) . '_et-al_0' . sizeof($intcs) . '.cba')) {
       $xinstis=file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(explode('#',$intcs[$j])[0]) . '_et-al_0' . sizeof($intcs) . '.cba');
       $xinterim=urldecode($xinstis);
       $xorigim=str_replace('+',' ',$xinterim);
       if (substr(($xorigim . ' '),0,1) == '<' && substr((' ' . $xorigim),-1,1) == '>') {
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(explode('#',$intcs[$j])[0]) . '_et-al_0' . sizeof($intcs) . '.cba');
         if (4 == 4) {
         $afterobject=$xorigim;
         } else {
         echo "<html><body onload=\"var woowoo=window.open('','_blank','top=200,left=200,width=500,height=500'); woowoo.document.write('<html><body>" . $xorigm . "</body></html>');\"></body></html>";
         exit;
         }
       }
     }
     if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(explode('#',$intcs[$j])[0]) . '_et-al_' . sizeof($intcs) . '.abc')) {
       $instis=file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(explode('#',$intcs[$j])[0]) . '_et-al_' . sizeof($intcs) . '.abc');
       $interim=urldecode($instis);
       $origim=str_replace('+',' ',$interim);
       if (substr(($origim . ' '),0,1) == '<' && substr((' ' . $origim),-1,1) == '>') {
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['anidn'])));
         echo "<html><body onload=\"var woowoo=window.open('','_blank','top=200,left=200,width=500,height=500'); woowoo.document.write('<html><body>" . $origm . "</body></html>');\"></body></html>";
         exit;
       }
       $intcs=explode(',', $interim);
     }
   }
   array_push($commentaries, '');
  }
  for ($j=0; $j<sizeof($intcs); $j++) {
    $found=false;
    if (strpos($intcs[$j], '#') !== false) {
      $oneword=explode(' ',trim(explode('#', $intcs[$j])[1]))[0];
      if ($oneword != '' && strpos($oneword, '.') !== false && substr($oneword . ' ',0,1) == '/') {
        if (strpos($origim, $oneword) != '') {
          $found=true;
        }
      }
      if ($found) {
        $commentaries[$j].=' ' . str_replace("~~",chr(92) . chr(10),substr(trim(explode('#', $intcs[$j])[1]),strlen($oneword)));  // fix perhaps
      }
    }
  }
  for ($j=0; $j<sizeof($intcs); $j++) {
    $jj=0;
    while ($commentaries[$jj] != '') {
      $jj++;
    }
    $found=false;
    if (strpos($intcs[$j], '#') !== false) {
      $oneword=explode(' ',trim(explode('#', $intcs[$j])[1]))[0];
      if ($oneword != '' && strpos($oneword, '.') !== false && substr($oneword . ' ',0,1) == '/') {
        if (strpos($origim, $oneword) != '') {
          $found=true;
        }
      }
      if (!$found) {
        $commentaries[$jj].=' ' . str_replace("~~",chr(92) . chr(10),explode('#', $intcs[$j])[1]);  // fix perhaps
      }
      $interim=str_replace($intcs[$j],explode('#', $intcs[$j])[0],$interim);
    }
  }
  return urlencode($interim);
  }

  $fconvprefix='/bin/';
  if (file_exists('/usr/local/bin/ffmpeg')) {
    $fconvprefix='/usr/local/bin/';
  } else if (!file_exists('/bin/ffmpeg')) {
    $fconvprefix='';
  }

  $pconvprefix='/bin/';
  if (file_exists('/usr/local/bin/pandoc')) {
    $pconvprefix='/usr/local/bin/';
  } else if (!file_exists('/bin/pandoc')) {
    $pconvprefix='';
  }

  $convprefix='/bin/';
  if (file_exists('/usr/local/bin/convert')) {
    $convprefix='/usr/local/bin/';
  } else if (!file_exists('/bin/convert')) {
    $convprefix='';
  }
   
  if (isset($_GET['nonims']) && isset($_GET['nonimsname'])) {
     $alltxt='';
     $jscr='';
     $std=false;
     $onl='';
     if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg")) {
       if (explode('&',file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg"))[1] == explode('&',$_SERVER['QUERY_STRING'])[1]) {
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", '');
         sleep(35);
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_GET['nonimsname'])))))) {
           $std=true;
           //$onl="<html><body onload=\"parent.document.getElementById('mysource').src='data:video/mp4;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))))) . "';\"></body></html>";
           unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp3",str_replace('+',' ',urldecode($_GET['nonimsname'])))))) {
           $std=true;
           unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp3",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".gif",str_replace('+',' ',urldecode($_GET['nonimsname'])))))) {
           $std=true;
           unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".gif",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         }
         if ($std) { 
          if ($onl != '') {
             echo $onl;
          }
          exit; 
         } else {  
          file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", $_SERVER['QUERY_STRING']);  
         }
       } else {
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", $_SERVER['QUERY_STRING']);
       }
     } else {
       file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", $_SERVER['QUERY_STRING']);
     }
     $htmlassembly='';
     $vsuff='';
     $asuff='';
     $vis='';
     $tis='';
     $mis='';
     $sis='';
     $zis='';
     $iis='';
     $listis=str_replace('+',' ',urldecode($_GET['nonims']));
     $olistis=$listis;
     $hashis='';
     $numv=sizeof(explode('#video/', $listis));
     if (strpos($listis, '#') !== false) {
       if ($numv > 2) {
         $listsare=explode('#video/',$listis);
         $lesslistis=explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))];
         for ($jl=1; $jl<(-1 + sizeof($listsare)); $jl++) {
           $lesslistis.=',' . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))];
         }
         $themd=str_replace(",","'\nfile '" . $_SERVER['DOCUMENT_ROOT'], "file '" . $_SERVER['DOCUMENT_ROOT'] . $lesslistis) . "'";
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname'])))), $themd);
         //file_put_contents('xxz.xxz',$listis . "\n" . $fconvprefix . 'ffmpeg -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname'])))) . ' -c copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         exec($fconvprefix . 'ffmpeg -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname'])))) . ' -c copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         //file_put_contents('xxy.xxy',file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname']))))));
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         $_GET['nonims']=urlencode('/tmp/') . str_replace(urlencode(".cba"),urlencode(".mp4"),$_GET['nonimsname']) . urlencode('#video/mp4,') . urlencode(str_replace('#video/','#none/',$_GET['nonims']));
         $listis=str_replace('+',' ',urldecode($_GET['nonims']));  
         $vis=' ';     
       }
       if (sizeof(explode('#audio/', $listis)) > 2) {
         $listsare=explode('#audio/',$listis);
         $lesslistis=explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))];
         for ($jl=1; $jl<(-1 + sizeof($listsare)); $jl++) {
           $lesslistis.=',' . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))];
         }
         $themd=str_replace(",","'\nfile '" . $_SERVER['DOCUMENT_ROOT'], "file '" . $_SERVER['DOCUMENT_ROOT'] . $lesslistis) . "'";
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname'])))), $themd);
         exec($fconvprefix . 'ffmpeg -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname'])))) . ' -c copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp3",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         $_GET['nonims']=urlencode('/tmp/') . str_replace(urlencode(".cba"),urlencode(".mp3"),$_GET['nonimsname']) . urlencode('#audio/mp3,') . urlencode(str_replace('#audio/','#none/',$_GET['nonims']));
         $listis=str_replace('+',' ',urldecode($_GET['nonims']));       
         $vis='audio';     
       }
       if (sizeof(explode('#text/', $listis)) > 2) {
         $alltxt=''; //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".txt",str_replace('+',' ',urldecode($_GET['nonimsname'])))), '');
         $listsare=explode('#text/',$listis);
         $alltxt.="https://www.rjmprogramming.com.au" . explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))] . "#Text 1 of " . (-1 + sizeof($listsare)) . " ...\n" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))]);
         for ($jl=1; $jl<(-1 + sizeof($listsare)); $jl++) {
           $alltxt.="\n" . "https://www.rjmprogramming.com.au" . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))] . "#Text " . $jl . " of " . (-1 + sizeof($listsare)) . " ...\n" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))]);
         }
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".txt",str_replace('+',' ',urldecode($_GET['nonimsname'])))), $alltxt);
         $_GET['nonims']=urlencode('/tmp/') . str_replace(urlencode(".cba"),urlencode(".txt"),$_GET['nonimsname']) . urlencode('#text/plain,') . urlencode(str_replace('#text/','#none/',$_GET['nonims']));
         $listis=str_replace('+',' ',urldecode($_GET['nonims']));       
       }
       if (strpos(str_replace('#none/','',str_replace('#audio/','',str_replace('#video/','',$listis))), '#') === false && strpos($olistis,'#audio/') !== false && strpos($olistis,'#video/') !== false) {
         if ($numv > 2) {
          $_GET['nonimsname']=str_replace(urlencode('_et-al_'),urlencode('_et-al_0'),$_GET['nonimsname']);
         }
         // ffmpeg -i video.mp4 -i audio.aac -c:v copy -c:a copy output.mp4
         $vis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         $ais=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#audio/', $listis)[0])[-1 + sizeof( explode(',', explode('#audio/', $listis)[0]))];         
         //file_put_contents('xx.xx',$fconvprefix . 'ffmpeg -i ' . $vis . ' -i ' . $ais . ' -c:v copy -c:a copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         //exec($fconvprefix . 'ffmpeg -i ' . $vis . ' -i ' . $ais . ' -c:v copy -c:a copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))) . ' 2> ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "x.err" . ' > ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "x.ok");
         exec($fconvprefix . 'ffmpeg -i ' . $vis . ' -i ' . $ais . ' -c:v copy -c:a copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
       } else if (strpos(str_replace('#none/','',str_replace('#text/','',str_replace('#image/','',$listis))), '#') === false && strpos($olistis,'#image/') !== false && strpos($olistis,'#text/') !== false) {
         $vis='';
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $tis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#text/', $listis)[0])[-1 + sizeof( explode(',', explode('#text/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }       
       } else if (strpos(str_replace('#none/','',str_replace('#text/','',str_replace('#video/','',str_replace('#image/','',$listis)))), '#') === false && strpos($olistis,'#video/') !== false && strpos($olistis,'#image/') !== false && strpos($olistis,'#text/') !== false) {
         $vis='';
         $sparevis=explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         $sparemis=str_replace('jpg','jpeg',explode(',',explode('#video/', $listis)[1])[0]);
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $tis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#text/', $listis)[0])[-1 + sizeof( explode(',', explode('#text/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }  
         $vsuff='<video style=width:80%;z-index:8;position:absolute;top:0px;left:0px;opacity:0.6; controls><source type=video/' . $sparemis . ' src="' . $sparevis . '"></source></video>';    
       } else if (strpos(str_replace('#none/','',str_replace('#text/','',str_replace('#audio/','',str_replace('#image/','',$listis)))), '#') === false && strpos($olistis,'#audio/') !== false && strpos($olistis,'#image/') !== false && strpos($olistis,'#text/') !== false) {
         $vis='';
         $spareais=explode(',', explode('#audio/', $listis)[0])[-1 + sizeof( explode(',', explode('#audio/', $listis)[0]))];
         $sparemis=str_replace('jpg','jpeg',explode(',',explode('#audio/', $listis)[1])[0]);
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $tis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#text/', $listis)[0])[-1 + sizeof( explode(',', explode('#text/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }  
         $asuff='<audio style=z-index:9;position:absolute;top:0px;left:0px;opacity:0.6; controls><source type=audio/' . $sparemis . ' src="' . $spareais . '"></source></audio>';    
       } else if (strpos(str_replace('#none/','',str_replace('#audio/','',str_replace('#image/','',$listis))), '#') === false && strpos($olistis,'#image/') !== false && strpos($olistis,'#audio/') !== false) {
         $vis='';
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $ais=str_replace('jpg','jpeg',explode(',',explode('#audio/', $listis)[1])[0]);
         $sis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#audio/', $listis)[0])[-1 + sizeof( explode(',', explode('#audio/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
       } 
       if (strpos(str_replace('#none/','',str_replace('#video/','',str_replace('#image/','',$listis))), '#') === false && strpos($olistis,'#image/') !== false && strpos($olistis,'#video/') !== false) {
         if ($numv > 2 && $vis != '') {
          $listis=str_replace('+',' ',urldecode($_GET['nonims']));
          $vis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         }
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $ais=str_replace('jpg','jpeg',explode(',',explode('#video/', $listis)[1])[0]);
         $zis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];  
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }       
       }
     }
     $origname=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['nonimsname']));
     //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['nonimsname'])), $htmlassembly);
     //if (strpos(('' . $origname . '~'), '.cba~') !== false && $origname != $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['nonimsname']))) {
     //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['nonimsname'])));
     //}
     if ($zis != '') {
         if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody style="background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right top;"><video style=opacity:0.7;width:80%; controls><source type=video/' . $ais . ' src="data:video/' . $ais . ';base64,' . base64_encode(file_get_contents($zis)) . '"></source></video></body></html>';
         } else {
         //echo "zis " . $olistis . ' vs ' . $listis . " ... " . str_replace('>','&gt;',str_replace('<','&lt;','<html>' . $jscr . '<body id=xbody style="background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right top;"><iframe id=myif style=display:none; src=/About_Us.html></iframe><video oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" style=opacity:0.7;width:80%; controls><source type=video/' . $ais . ' src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$zis) . '"></source></video></body></html>'));
         //exit;
         echo '<html>' . $jscr . '<body id=xbody style="background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right top;"><iframe id=myif style=display:none; src=/About_Us.html></iframe><video oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" style=opacity:0.7;width:80%; controls><source type=video/' . $ais . ' src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$zis) . '"></source></video></body></html>';
         exit;
         }
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         if ($numv > 2 && $vis != '') {
          unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',str_replace('_et-al_0','_et-al_',basename(str_replace('+',' ',urldecode($_GET['nonimsname']))))));
         }
     } else if ($sis != '') {
         if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody style="background:url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right bottom;"><audio controls><source type=audio/' . $ais . ' src="data:audio/' . $ais . ';base64,' . base64_encode(file_get_contents($sis)) . '"></source></audio></body></html>';
         } else {
         //echo "sis " . $olistis . ' vs ' . $listis;
         //exit;
         echo '<html>' . $jscr . '<body id=xbody style="background:url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right bottom;"><iframe id=myif style=display:none; src=/About_Us.html></iframe><audio oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" controls><source type=audio/' . $ais . ' src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$sis) . '"></source></audio></body></html>';
         exit;
         }
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
     } else if ($tis != '') {
         echo '<html>' . $jscr . '<body id=xbody><textarea style="text-shadow:-1px 1px 1px #ff2d95;background-color:transparent;width:99%;height:99%;' . ($jscr != '' ? '' : 'background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;') . '">' . file_get_contents($tis) . '</textarea>' . $vsuff . $asuff . '</body></html>';
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
     } else if ($vis != '') {
         if (531 == 53) {
         echo '<html>' . $jscr . '<body id=xbody><video style=width:80%; controls><source type=video/mp4 src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname']))))) . '"></source></video></body></html>';
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         } else if (5 == 5) {
         if ($vis == "audio") {
         if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody><audio style=width:80%; controls><source type=audio/mp3 src="data:audio/mp3;base64,' . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp3',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))))) . '"></source></audio></body></html>';
         } else {
         //echo "avis " . $olistis . ' vs ' . $listis;
         //exit;
         echo '<html>' . $jscr . '<body id=xbody><iframe id=myif style=display:none; src=/About_Us.html></iframe><audio oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" controls><source id=mysource type=audio/mp3 src="data:audio/mp3;base64,' . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp3',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))))) . '"></source></audio></body></html>';
         exit;
         }
         } else if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody><video style=width:80%; controls><source type=video/mp4 src="data:video/mp4;base64,' . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))))) . '"></source></video></body></html>';
         } else {
         //$thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname']))));
         //register_shutdown_function('shutdown');
         //echo "vvis " . $olistis . ' vs ' . $listis;
         //exit;
         echo '<html>' . $jscr . '<body id=xbody><iframe id=myif style=display:none; src=/About_Us.html></iframe><video oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" style=width:80%; controls><source id=mysource type=video/mp4 src="' . ((DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))))) . '"></source></video></body></html>';
         exit;
         }
         //sleep(10);
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
         } else if (1 == 1) {
         //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['nonimsname'])), $htmlassembly);

// header video/mp4
    header('Content-Type: video/mp4');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname']))))));
    header("Content-Disposition: inline; filename=" . basename($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname']))))));
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_GET['nonimsname'])))));
    exit;

         } else {
         echo "<html><body onload=\"var woowoo=window.open('','_blank','top=200,left=200,width=500,height=500'); woowoo.document.write('<html><body>" . $htmlassembly . "</body></html>');\"></body></html>";
         }
     }
     exit;
  }
    
  if (isset($_POST['nonims']) && isset($_POST['nonimsname'])) {
     $alltxt='';
     $jscr='';
     $std=false;
     $onl='';
     if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg")) {
       if (explode('&',file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg"))[1] == explode('&',$_SERVER['QUERY_STRING'])[1]) {
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", '');
         sleep(35);
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_POST['nonimsname'])))))) {
           $std=true;
           //$onl="<html><body onload=\"parent.document.getElementById('mysource').src='data:video/mp4;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))))) . "';\"></body></html>";
           unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp3",str_replace('+',' ',urldecode($_POST['nonimsname'])))))) {
           $std=true;
           unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp3",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".gif",str_replace('+',' ',urldecode($_POST['nonimsname'])))))) {
           $std=true;
           unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".gif",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         }
         if ($std) { 
          if ($onl != '') {
             echo $onl;
          }
          exit; 
         } else {  
          file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", $_SERVER['QUERY_STRING']);  
         }
       } else {
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", $_SERVER['QUERY_STRING']);
       }
     } else {
       file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "last.ggg", $_SERVER['QUERY_STRING']);
     }
     $htmlassembly='';
     $vsuff='';
     $asuff='';
     $vis='';
     $tis='';
     $mis='';
     $sis='';
     $zis='';
     $iis='';
     $listis=str_replace('+',' ',urldecode($_POST['nonims']));
     $olistis=$listis;
     $hashis='';
     $numv=sizeof(explode('#video/', $listis));
     if (strpos($listis, '#') !== false) {
       if ($numv > 2) {
         $listsare=explode('#video/',$listis);
         $lesslistis=explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))];
         for ($jl=1; $jl<(-1 + sizeof($listsare)); $jl++) {
           $lesslistis.=',' . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))];
         }
         $themd=str_replace(",","'\nfile '" . $_SERVER['DOCUMENT_ROOT'], "file '" . $_SERVER['DOCUMENT_ROOT'] . $lesslistis) . "'";
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname'])))), $themd);
         //file_put_contents('xxz.xxz',$listis . "\n" . $fconvprefix . 'ffmpeg -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname'])))) . ' -c copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         exec($fconvprefix . 'ffmpeg -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname'])))) . ' -c copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp4",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         //file_put_contents('xxy.xxy',file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname']))))));
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         $_POST['nonims']=urlencode('/tmp/') . str_replace(urlencode(".cba"),urlencode(".mp4"),$_POST['nonimsname']) . urlencode('#video/mp4,') . urlencode(str_replace('#video/','#none/',$_POST['nonims']));
         $listis=str_replace('+',' ',urldecode($_POST['nonims']));  
         $vis=' ';     
       }
       if (sizeof(explode('#audio/', $listis)) > 2) {
         $listsare=explode('#audio/',$listis);
         $lesslistis=explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))];
         for ($jl=1; $jl<(-1 + sizeof($listsare)); $jl++) {
           $lesslistis.=',' . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))];
         }
         $themd=str_replace(",","'\nfile '" . $_SERVER['DOCUMENT_ROOT'], "file '" . $_SERVER['DOCUMENT_ROOT'] . $lesslistis) . "'";
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname'])))), $themd);
         exec($fconvprefix . 'ffmpeg -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname'])))) . ' -c copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".mp3",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".vvv",str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         $_POST['nonims']=urlencode('/tmp/') . str_replace(urlencode(".cba"),urlencode(".mp3"),$_POST['nonimsname']) . urlencode('#audio/mp3,') . urlencode(str_replace('#audio/','#none/',$_POST['nonims']));
         $listis=str_replace('+',' ',urldecode($_POST['nonims']));       
         $vis='audio';     
       }
       if (sizeof(explode('#text/', $listis)) > 2) {
         $alltxt=''; //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".txt",str_replace('+',' ',urldecode($_POST['nonimsname'])))), '');
         $listsare=explode('#text/',$listis);
         $alltxt.="https://www.rjmprogramming.com.au" . explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))] . "#Text 1 of " . (-1 + sizeof($listsare)) . " ...\n" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . explode(',',$listsare[0])[-1 + sizeof(explode(',',$listsare[0]))]);
         for ($jl=1; $jl<(-1 + sizeof($listsare)); $jl++) {
           $alltxt.="\n" . "https://www.rjmprogramming.com.au" . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))] . "#Text " . $jl . " of " . (-1 + sizeof($listsare)) . " ...\n" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . explode(',',$listsare[$jl])[-1 + sizeof(explode(',',$listsare[$jl]))]);
         }
         file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".cba",".txt",str_replace('+',' ',urldecode($_POST['nonimsname'])))), $alltxt);
         $_POST['nonims']=urlencode('/tmp/') . str_replace(urlencode(".cba"),urlencode(".txt"),$_POST['nonimsname']) . urlencode('#text/plain,') . urlencode(str_replace('#text/','#none/',$_POST['nonims']));
         $listis=str_replace('+',' ',urldecode($_POST['nonims']));       
       }
       if (strpos(str_replace('#none/','',str_replace('#audio/','',str_replace('#video/','',$listis))), '#') === false && strpos($olistis,'#audio/') !== false && strpos($olistis,'#video/') !== false) {
         if ($numv > 2) {
          $_POST['nonimsname']=str_replace(urlencode('_et-al_'),urlencode('_et-al_0'),$_POST['nonimsname']);
         }
         // ffmpeg -i video.mp4 -i audio.aac -c:v copy -c:a copy output.mp4
         $vis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         $ais=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#audio/', $listis)[0])[-1 + sizeof( explode(',', explode('#audio/', $listis)[0]))];         
         //file_put_contents('xx.xx',$fconvprefix . 'ffmpeg -i ' . $vis . ' -i ' . $ais . ' -c:v copy -c:a copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         //exec($fconvprefix . 'ffmpeg -i ' . $vis . ' -i ' . $ais . ' -c:v copy -c:a copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))) . ' 2> ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "x.err" . ' > ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . "x.ok");
         exec($fconvprefix . 'ffmpeg -i ' . $vis . ' -i ' . $ais . ' -c:v copy -c:a copy ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
       } else if (strpos(str_replace('#none/','',str_replace('#text/','',str_replace('#image/','',$listis))), '#') === false && strpos($olistis,'#image/') !== false && strpos($olistis,'#text/') !== false) {
         $vis='';
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $tis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#text/', $listis)[0])[-1 + sizeof( explode(',', explode('#text/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }       
       } else if (strpos(str_replace('#none/','',str_replace('#text/','',str_replace('#video/','',str_replace('#image/','',$listis)))), '#') === false && strpos($olistis,'#video/') !== false && strpos($olistis,'#image/') !== false && strpos($olistis,'#text/') !== false) {
         $vis='';
         $sparevis=explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         $sparemis=str_replace('jpg','jpeg',explode(',',explode('#video/', $listis)[1])[0]);
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $tis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#text/', $listis)[0])[-1 + sizeof( explode(',', explode('#text/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }  
         $vsuff='<video style=width:80%;z-index:8;position:absolute;top:0px;left:0px;opacity:0.6; controls><source type=video/' . $sparemis . ' src="' . $sparevis . '"></source></video>';    
       } else if (strpos(str_replace('#none/','',str_replace('#text/','',str_replace('#audio/','',str_replace('#image/','',$listis)))), '#') === false && strpos($olistis,'#audio/') !== false && strpos($olistis,'#image/') !== false && strpos($olistis,'#text/') !== false) {
         $vis='';
         $spareais=explode(',', explode('#audio/', $listis)[0])[-1 + sizeof( explode(',', explode('#audio/', $listis)[0]))];
         $sparemis=str_replace('jpg','jpeg',explode(',',explode('#audio/', $listis)[1])[0]);
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $tis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#text/', $listis)[0])[-1 + sizeof( explode(',', explode('#text/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }  
         $asuff='<audio style=z-index:9;position:absolute;top:0px;left:0px;opacity:0.6; controls><source type=audio/' . $sparemis . ' src="' . $spareais . '"></source></audio>';    
       } else if (strpos(str_replace('#none/','',str_replace('#audio/','',str_replace('#image/','',$listis))), '#') === false && strpos($olistis,'#image/') !== false && strpos($olistis,'#audio/') !== false) {
         $vis='';
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $ais=str_replace('jpg','jpeg',explode(',',explode('#audio/', $listis)[1])[0]);
         $sis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#audio/', $listis)[0])[-1 + sizeof( explode(',', explode('#audio/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];         
       } 
       if (strpos(str_replace('#none/','',str_replace('#video/','',str_replace('#image/','',$listis))), '#') === false && strpos($olistis,'#image/') !== false && strpos($olistis,'#video/') !== false) {
         if ($numv > 2 && $vis != '') {
          $listis=str_replace('+',' ',urldecode($_POST['nonims']));
          $vis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         }
         $mis=str_replace('jpg','jpeg',explode(',',explode('#image/', $listis)[1])[0]);
         $ais=str_replace('jpg','jpeg',explode(',',explode('#video/', $listis)[1])[0]);
         $zis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#video/', $listis)[0])[-1 + sizeof( explode(',', explode('#video/', $listis)[0]))];
         $iis=$_SERVER['DOCUMENT_ROOT'] . explode(',', explode('#image/', $listis)[0])[-1 + sizeof( explode(',', explode('#image/', $listis)[0]))];  
         if (sizeof(explode('#image/', $olistis)) > 2) {
           $zincsv=str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[0])[-1 + sizeof(explode(',',explode('#image/', $olistis)[0]))]);
           for ($ib=1; $ib<(-1 + sizeof(explode('#image/', $olistis))); $ib++) {
             $zincsv.=',' . str_replace($_SERVER['DOCUMENT_ROOT'],'',explode(',',explode('#image/', $olistis)[$ib])[-1 + sizeof(explode(',',explode('#image/', $olistis)[$ib]))]);
           }
           $jscr='<he' . 'ad><scr' . 'ipt type=text/javascript> var jimg=0, imgs=("' . $zincsv . '").split(String.fromCharCode(44)), kimg=eval("" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' . "'url(' + imgs[jimg] + ')'" . '; document.title=imgs[jimg]; document.body.style.backgroundRepeat="no-repeat"; document.body.style.backgroundSize="contain";  } setInterval(startit,4000); </scri' . 'pt></head>';
         }       
       }
     }
     $origname=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['nonimsname']));
     //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['nonimsname'])), $htmlassembly);
     //if (strpos(('' . $origname . '~'), '.cba~') !== false && $origname != $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['nonimsname']))) {
     //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['nonimsname'])));
     //}
     if ($zis != '') {
         if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody style="background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right top;"><video style=opacity:0.7;width:80%; controls><source type=video/' . $ais . ' src="data:video/' . $ais . ';base64,' . base64_encode(file_get_contents($zis)) . '"></source></video></body></html>';
         } else {
         //echo "zis " . $olistis . ' vs ' . $listis . " ... " . str_replace('>','&gt;',str_replace('<','&lt;','<html>' . $jscr . '<body id=xbody style="background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right top;"><iframe id=myif style=display:none; src=/About_Us.html></iframe><video oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" style=opacity:0.7;width:80%; controls><source type=video/' . $ais . ' src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$zis) . '"></source></video></body></html>'));
         //exit;
         echo '<html>' . $jscr . '<body id=xbody style="background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right top;"><iframe id=myif style=display:none; src=/About_Us.html></iframe><video oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" style=opacity:0.7;width:80%; controls><source type=video/' . $ais . ' src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$zis) . '"></source></video></body></html>';
         exit;
         }
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         if ($numv > 2 && $vis != '') {
          unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',str_replace('_et-al_0','_et-al_',basename(str_replace('+',' ',urldecode($_POST['nonimsname']))))));
         }
     } else if ($sis != '') {
         if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody style="background:url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right bottom;"><audio controls><source type=audio/' . $ais . ' src="data:audio/' . $ais . ';base64,' . base64_encode(file_get_contents($sis)) . '"></source></audio></body></html>';
         } else {
         //echo "sis " . $olistis . ' vs ' . $listis;
         //exit;
         echo '<html>' . $jscr . '<body id=xbody style="background:url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;background-position:right bottom;"><iframe id=myif style=display:none; src=/About_Us.html></iframe><audio oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" controls><source type=audio/' . $ais . ' src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$sis) . '"></source></audio></body></html>';
         exit;
         }
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
     } else if ($tis != '') {
         echo '<html>' . $jscr . '<body id=xbody><textarea style="text-shadow:-1px 1px 1px #ff2d95;background-color:transparent;width:99%;height:99%;' . ($jscr != '' ? '' : 'background:linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.6)),url(data:image/' . $mis . ';base64,' . base64_encode(file_get_contents($iis)) . ');background-repeat:no-repeat;background-size:contain;') . '">' . file_get_contents($tis) . '</textarea>' . $vsuff . $asuff . '</body></html>';
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
     } else if ($vis != '') {
         if (531 == 53) {
         echo '<html>' . $jscr . '<body id=xbody><video style=width:80%; controls><source type=video/mp4 src="' . str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname']))))) . '"></source></video></body></html>';
         //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         } else if (5 == 5) {
         if ($vis == "audio") {
         if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody><audio style=width:80%; controls><source type=audio/mp3 src="data:audio/mp3;base64,' . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp3',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))))) . '"></source></audio></body></html>';
         } else {
         //echo "avis " . $olistis . ' vs ' . $listis;
         //exit;
         echo '<html>' . $jscr . '<body id=xbody><iframe id=myif style=display:none; src=/About_Us.html></iframe><audio oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" controls><source id=mysource type=audio/mp3 src="data:audio/mp3;base64,' . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp3',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))))) . '"></source></audio></body></html>';
         exit;
         }
         } else if ('oksmall' != 'oksmall') {
         echo '<html>' . $jscr . '<body id=xbody><video style=width:80%; controls><source type=video/mp4 src="data:video/mp4;base64,' . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))))) . '"></source></video></body></html>';
         } else {
         //$thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname']))));
         //register_shutdown_function('shutdown');
         //echo "vvis " . $olistis . ' vs ' . $listis;
         //exit;
         echo '<html>' . $jscr . '<body id=xbody><iframe id=myif style=display:none; src=/About_Us.html></iframe><video oncanplaythrough="document.getElementById(' . "'myif').src='./one_line_find.php?" . $_SERVER['QUERY_STRING'] . "';" . '" style=width:80%; controls><source id=mysource type=video/mp4 src="' . ((DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))))) . '"></source></video></body></html>';
         exit;
         }
         //sleep(10);
         unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
         } else if (1 == 1) {
         //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['nonimsname'])), $htmlassembly);

// header video/mp4
    header('Content-Type: video/mp4');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname']))))));
    header("Content-Disposition: inline; filename=" . basename($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname']))))));
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('.cba','.mp4',basename(str_replace('+',' ',urldecode($_POST['nonimsname'])))));
    exit;

         } else {
         echo "<html><body onload=\"var woowoo=window.open('','_blank','top=200,left=200,width=500,height=500'); woowoo.document.write('<html><body>" . $htmlassembly . "</body></html>');\"></body></html>";
         }
     }
     exit;
  }
 
  if (isset($_POST['anidnlist']) && isset($_POST['anidn'])) {
     file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['anidn'])), str_replace('+',' ',urldecode($_POST['anidnlist'])));
     sleep(60);
     if (strpos(('' . str_replace('+',' ',urldecode($_POST['anidn'])) . '~'), '.abc~') !== false) {
     unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['anidn'])));
     }
     exit;
  }

  if (isset($_GET['amslist']) && isset($_GET['amsname'])) {
    $dname="input.docx";
    $_GET['amslist']=oururlencode($_GET['amslist']);
    $themd=str_replace(",","\n" . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_GET['amslist'])));
    $thelines=explode("\n", $themd);
    $themd="";
    for ($i=0; $i<sizeof($thelines); $i++) {
      $thelines[$i]=explode('#', $thelines[$i])[0];
      if ($i == 0) {
        $dname=explode('.', basename($thelines[$i]))[0] . '_et-al_' . sizeof($thelines) . '.docx';
      }
      if ($i == (-1 + sizeof($thelines))) {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~",chr(92) . chr(10),$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")";
      } else {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~",chr(92) . chr(10),$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")\n\n---\n\n";
      }
    }
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".docx",".yyy",str_replace('+',' ',urldecode($_GET['amsname'])))), $themd);
    exec($pconvprefix . 'pandoc ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".docx",".yyy",str_replace('+',' ',urldecode($_GET['amsname'])))) . ' -o ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['amsname']))));
    $hsofar="<html><body><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_GET['amsname']))) . "\" type=\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" data-base=data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['amsname']))))) . "></object>" . $afterobject . "</body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".docx",".yyy",str_replace('+',' ',urldecode($_GET['amsname'])))));
    if (4 == 4) {
    header('Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['amsname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['amsname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['amsname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['amsname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['amsname']))));
    shutdown() and exit;
    }
  }

  if (isset($_POST['amslist']) && isset($_POST['amsname'])) {
    $dname="input.docx";
    $_POST['amslist']=oururlencode($_POST['amslist']);
    $themd=str_replace(",","\n" . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_POST['amslist'])));
    $thelines=explode("\n", $themd);
    $themd="";
    for ($i=0; $i<sizeof($thelines); $i++) {
      $thelines[$i]=explode('#', $thelines[$i])[0];
      if ($i == 0) {
        $dname=explode('.', basename($thelines[$i]))[0] . '_et-al_' . sizeof($thelines) . '.docx';
      }
      if ($i == (-1 + sizeof($thelines))) {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~",chr(92) . chr(10),$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")";
      } else {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~",chr(92) . chr(10),$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")\n\n---\n\n";
      }
    }
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".docx",".yyy",str_replace('+',' ',urldecode($_POST['amsname'])))), $themd);
    exec($pconvprefix . 'pandoc ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".docx",".yyy",str_replace('+',' ',urldecode($_POST['amsname'])))) . ' -o ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['amsname']))));
    $hsofar="<html><body><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_POST['amsname']))) . "\" type=\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" data-base=data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['amsname']))))) . "></object>" . $afterobject . "</body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".docx",".yyy",str_replace('+',' ',urldecode($_POST['amsname'])))));
    if (4 == 4) {
    header('Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['amsname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['amsname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['amsname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['amsname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['amsname']))));
    shutdown() and exit;
    }
  }


  if (isset($_GET['applist']) && isset($_GET['appname'])) {
    $dname="input.pptx";
    $_GET['applist']=oururlencode($_GET['applist']);
    $themd=str_replace(",","\n" . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_GET['applist'])));
    $thelines=explode("\n", $themd);
    $themd="";
    for ($i=0; $i<sizeof($thelines); $i++) {
      $thelines[$i]=explode('#', $thelines[$i])[0];
      if ($i == 0) {
        $dname=explode('.', basename($thelines[$i]))[0] . '_et-al_' . sizeof($thelines) . '.pptx';
      }
      if ($i == (-1 + sizeof($thelines))) {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~",chr(92) . chr(10),$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")";
      } else {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~",chr(92) . chr(10),$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")\n\n---\n\n";
      }
    }
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pptx",".zzz",str_replace('+',' ',urldecode($_GET['appname'])))), $themd);
    exec($pconvprefix . 'pandoc ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pptx",".zzz",str_replace('+',' ',urldecode($_GET['appname'])))) . ' -o ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['appname']))));
    $hsofar="<html><body><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_GET['appname']))) . "\" type=\"application/pptx\" data-base=data:application/pptx;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['appname']))))) . "></object>" . $afterobject . "</body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pptx",".zzz",str_replace('+',' ',urldecode($_GET['appname'])))));
    if (4 == 4) {
    header('Content-Type: application/pptx');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['appname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['appname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['appname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['appname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['appname']))));
    shutdown() and exit;
    }
  }

  if (isset($_POST['applist']) && isset($_POST['appname'])) {
    $dname="input.pptx";
    $_POST['applist']=oururlencode($_POST['applist']);
    $themd=str_replace(",","\n" . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_POST['applist'])));
    $thelines=explode("\n", $themd);
    $themd="";
    for ($i=0; $i<sizeof($thelines); $i++) {
      $thelines[$i]=explode('#', $thelines[$i])[0];
      if ($i == 0) {
        $dname=explode('.', basename($thelines[$i]))[0] . '_et-al_' . sizeof($thelines) . '.pptx';
      }
      if ($i == (-1 + sizeof($thelines))) {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~","\\\n",$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")";
      } else {
        $themd.='![' . ($commentaries[$i] != '' ? trim(str_replace("~~","\\\n",$commentaries[$i])) : basename($thelines[$i])) . "](" . $thelines[$i] . ")\n\n---\n\n";
      }
    }
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pptx",".zzz",str_replace('+',' ',urldecode($_POST['appname'])))), $themd);
    exec($pconvprefix . 'pandoc ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pptx",".zzz",str_replace('+',' ',urldecode($_POST['appname'])))) . ' -o ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['appname']))));
    $hsofar="<html><body><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_POST['appname']))) . "\" type=\"application/pptx\" data-base=data:application/pptx;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['appname']))))) . "></object>" . $afterobject . "</body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pptx",".zzz",str_replace('+',' ',urldecode($_POST['appname'])))));
    if (4 == 4) {
    header('Content-Type: application/pptx');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['appname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['appname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['appname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['appname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['appname']))));
    shutdown() and exit;
    }
  }

  if (isset($_GET['apdflist']) && isset($_GET['apdfname'])) {
    $dname="input.pdf";
    $_GET['apdflist']=oururlencode($_GET['apdflist']);
    $dname=explode('.', basename(explode(',', str_replace('+',' ',urldecode($_GET['apdflist'])))[0]))[0] . '_et-al_' . sizeof(explode(',',str_replace('+',' ',urldecode($_GET['apdflist'])))) . '.pdf';
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pdf",".xxx",str_replace('+',' ',urldecode($_GET['apdfname'])))), str_replace(",","\n" . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_GET['apdflist']))));
    exec($convprefix . 'convert @' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pdf",".xxx",str_replace('+',' ',urldecode($_GET['apdfname'])))) . ' ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['apdfname']))));
    $hsofar="<html><body><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_GET['apdfname']))) . "\" type=\"application/pdf\" data-base=data:application/pdf;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['apdfname']))))) . "></object>" . $afterobject . "</body></html>";
    $hsofar.="></object>" . $afterobject . "</body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pdf",".xxx",str_replace('+',' ',urldecode($_GET['apdfname'])))));
    if (4 == 4) {
    header('Content-Type: application/pdf');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['apdfname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['apdfname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['apdfname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['apdfname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['apdfname']))));
    shutdown() and exit;
    }
  }

  if (isset($_POST['apdflist']) && isset($_POST['apdfname'])) {
    $dname="input.pdf";
    $_POST['apdflist']=oururlencode($_POST['apdflist']);
    //$dname=explode('.', basename(str_replace('+',' ',urldecode($_POST['apdflist']))))[0] . '_et-al_' . sizeof(explode(',',str_replace('+',' ',urldecode($_POST['apdflist'])))) . '.pdf';
    $dname=explode('.', basename(explode(',', str_replace('+',' ',urldecode($_POST['apdflist'])))[0]))[0] . '_et-al_' . sizeof(explode(',',str_replace('+',' ',urldecode($_POST['apdflist'])))) . '.pdf';
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pdf",".xxx",str_replace('+',' ',urldecode($_POST['apdfname'])))), str_replace(",","\n" . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_POST['apdflist']))));
    exec($convprefix . 'convert @' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pdf",".xxx",str_replace('+',' ',urldecode($_POST['apdfname'])))) . ' ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname']))));
    $hsofar="<html><body onload=\"top.window.open('" . "/tmp/" . basename(str_replace('+',' ',urldecode($_POST['apdfname']))) . "','_blank','top=45,left=45,width=800,height=800');\"><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_POST['apdfname']))) . "\" type=\"application/pdf\"";
    // $hsofar.=" data-base=data:application/pdf;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname'])))));
    $hsofar.="></object>" . $afterobject . "</body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".pdf",".xxx",str_replace('+',' ',urldecode($_POST['apdfname'])))));
    if (4 == 4) {
    header('Content-Type: application/pdf');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname']))));
    exit;
    } else {
    echo $hsofar; //"<html><body><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_POST['apdfname']))) . "\" type=\"application/pdf\" data-base=data:application/pdf;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname']))))) . "></object></body></html>";
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['apdfname']))));
    shutdown() and exit;
    }
  }

  if (isset($_GET['agiflist']) && isset($_GET['agifname'])) {
    $dname="input.gif";
    $_GET['agiflist']=oururlencode($_GET['agiflist']);
    $dname=explode('.', basename(explode(',', str_replace('+',' ',urldecode($_GET['agiflist'])))[0]))[0] . '_et-al_' . sizeof(explode(',',str_replace('+',' ',urldecode($_GET['agiflist'])))) . '.gif';
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".gif",".uuu",str_replace('+',' ',urldecode($_GET['agifname'])))), str_replace(","," " . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_GET['agiflist']))));
    exec($convprefix . 'convert -delay 1000 -loop 0 ' . file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".gif",".uuu",str_replace('+',' ',urldecode($_GET['agifname']))))) . ' ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['agifname']))));
    $hsofar="<html><body><img src=\"/tmp/" . basename(str_replace('+',' ',urldecode($_GET['agifname']))) . "\" data-base=data:image/gif;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['agifname']))))) . "></img></body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".gif",".uuu",str_replace('+',' ',urldecode($_GET['agifname'])))));
    if (4 == 4) {
    header('Content-Type: image/gif');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['agifname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['agifname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['agifname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['agifname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['agifname']))));
    shutdown() and exit;
    }
  }

  if (isset($_POST['agiflist']) && isset($_POST['agifname'])) {
    $dname="input.gif";
    $_POST['agiflist']=oururlencode($_POST['agiflist']);
    //$dname=explode('.', basename(str_replace('+',' ',urldecode($_POST['agiflist']))))[0] . '_et-al_' . sizeof(explode(',',str_replace('+',' ',urldecode($_POST['agiflist'])))) . '.gif';
    $dname=explode('.', basename(explode(',', str_replace('+',' ',urldecode($_POST['agiflist'])))[0]))[0] . '_et-al_' . sizeof(explode(',',str_replace('+',' ',urldecode($_POST['agiflist'])))) . '.gif';
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".gif",".uuu",str_replace('+',' ',urldecode($_POST['agifname'])))), str_replace(","," " . $_SERVER['DOCUMENT_ROOT'], $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_POST['agiflist']))));
    exec($convprefix . 'convert -delay 1000 -loop 0 ' . file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".gif",".uuu",str_replace('+',' ',urldecode($_POST['agifname']))))) . ' ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname']))));
    $hsofar="<html><body onload=\"top.window.open('" . "/tmp/" . basename(str_replace('+',' ',urldecode($_POST['agifname']))) . "','_blank','top=45,left=45,width=800,height=800');\"><img src=\"/tmp/" . basename(str_replace('+',' ',urldecode($_POST['agifname']))) . "\"";
    // $hsofar.=" data-base=data:image/gif;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname'])))));
    $hsofar.="></img></body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".gif",".uuu",str_replace('+',' ',urldecode($_POST['agifname'])))));
    if (4 == 4) {
    header('Content-Type: image/gif');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname']))));
    exit;
    } else {
    echo $hsofar; //"<html><body><object data=\"/tmp/" . basename(str_replace('+',' ',urldecode($_POST['agifname']))) . "\" type=\"image/gif\" data-base=data:image/gif;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname']))))) . "></object></body></html>";
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['agifname']))));
    shutdown() and exit;
    }
  }

  if (isset($_GET['avideolist']) && isset($_GET['avideoname'])) {
    $dname="input.mp4";
    $_GET['avideolist']=oururlencode($_GET['avideolist']);
    $themd=str_replace(",","'\nduration 10\nfile '" . $_SERVER['DOCUMENT_ROOT'], "file '" . $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_GET['avideolist']))) . "'";
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".mp4",".vvv",str_replace('+',' ',urldecode($_GET['avideoname'])))), $themd);
    exec($fconvprefix . 'ffmpeg  -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".mp4",".vvv",str_replace('+',' ',urldecode($_GET['avideoname'])))) . ' -r 25 -pix_fmt yuv420p ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['avideoname']))));
    $hsofar="<html><body><video controls><source src=\"/tmp/" . basename(str_replace('+',' ',urldecode($_GET['avideoname']))) . "\" type=\"video/mp4\" data-base=data:video/mp4;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['avideoname']))))) . "></source></video></body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".mp4",".vvv",str_replace('+',' ',urldecode($_GET['avideoname'])))));
    if (4 == 4) {
    header('Content-Type: video/mp4');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['avideoname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['avideoname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['avideoname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['avideoname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['avideoname']))));
    shutdown() and exit;
    }
  }

  if (isset($_POST['avideolist']) && isset($_POST['avideoname'])) {
    $dname="input.mp4";
    $_POST['avideolist']=oururlencode($_POST['avideolist']);
    $themd=str_replace(",","'\nduration 10\nfile '" . $_SERVER['DOCUMENT_ROOT'], "file '" . $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_POST['avideolist']))) . "'";
    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".mp4",".vvv",str_replace('+',' ',urldecode($_POST['avideoname'])))), $themd);
    exec($fconvprefix . 'ffmpeg  -f concat -safe 0 -i ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".mp4",".vvv",str_replace('+',' ',urldecode($_POST['avideoname'])))) . ' -r 25 -pix_fmt yuv420p ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['avideoname']))));
    $hsofar="<html><body><video controls><source src=\"/tmp/" . basename(str_replace('+',' ',urldecode($_POST['avideoname']))) . "\" type=\"video/mp4\" data-base=data:video/mp4;base64," . base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['avideoname']))))) . "></source></video></body></html>";
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace(".mp4",".vvv",str_replace('+',' ',urldecode($_POST['avideoname'])))));
    if (4 == 4) {
    header('Content-Type: video/mp4');
    header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
    header('Pragma: public');
    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Length: ' . strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['avideoname']))))));
    header("Content-Disposition: inline; filename=" . $dname);
    echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['avideoname']))));
    unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['avideoname']))));
    exit;
    } else {
    echo $hsofar;
    $thingtoattendto=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['avideoname'])));
    register_shutdown_function('shutdown');
    //sleep(45);
    //unlink($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_POST['avideoname']))));
    shutdown() and exit;
    }
  }


  if (isset($_POST['ajaxurl']) && isset($_POST['ajaxid'])) {
    echo "<html><body><span>" . $_POST['ajaxid'] . '</span><p>' . str_replace($_SERVER['DOCUMENT_ROOT'],'',shell_exec('file "' . $_SERVER['DOCUMENT_ROOT'] . str_replace('+',' ',urldecode($_POST['ajaxurl'])) . '"')) . "</p></body></html>";
    exit;
  }

  $offdr='';
  $resis='';
  $offdrverbose='';
  $fifteen="15";
  $forty="50"; // 70
  $selbit='';
  $more='';
  if (isset($_GET['fsub'])) { $fifteen=str_replace('+',' ',urldecode($_GET['fsub'])); }
  if (isset($_POST['fsub'])) { $fifteen=str_replace('+',' ',urldecode($_POST['fsub'])); }


  if (isset($_GET['anyway']) || (!isset($_GET['offdr']) && !isset($_POST['offdr']))) {
    $extbit='*.txt';
    if (isset($_GET['extbit'])) { $extbit=str_replace('+',' ',urldecode($_GET['extbit'])); }
    if (isset($_POST['extbit'])) { $extbit=str_replace('+',' ',urldecode($_POST['extbit'])); }
     $extbit='*.[tjpmwagc][xpnopaids][etgvf34]*'; // *.[tjpmwagc][xpnopaids][etgvf34]*
    if (isset($_GET['offdr'])) {
     $offdr=str_replace('+',' ',urldecode($_GET['offdr']));
     $extbit='*.txt';
     if (isset($_GET['extbit'])) { $extbit=str_replace('+',' ',urldecode($_GET['extbit'])); }
     $extbit='*.[tjpmwagc][xpnopaids][etgvf34]*';
     $more=" document.getElementById('offdr').value='" . $offdr . "';  document.getElementById('offdr').style.width='" . $fifteen . "px'; document.getElementById('fsub').name='fsub'; document.getElementById('fsub').click(); ";
    }
    $resis=str_replace($_SERVER['DOCUMENT_ROOT'],'',shell_exec('ls -lhgo ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $offdr . $extbit));
    if ($resis == '') {  $forty="15"; }
    if (file_exists('save_time.xxx')) {
        $offdrverbose=file_get_contents('save_time.xxx');
    } else {
        $offdrverbose=shell_exec("find " . $_SERVER['DOCUMENT_ROOT'] . " -type d -name '*'");
        file_put_contents('save_time.xxx', $offdrverbose);
    }
    $offds=explode("\n", $offdrverbose);
    $selbit="<select style=display:inline-block;background-color:#f0f0f0; onchange=document.getElementById(getfsub()).click(); id=offdr name=offdr></select>";
    for ($i=0; $i<sizeof($offds); $i++) {
      if (substr($offds[$i] . ' ',0,2) == '. ' || $i == 0) {
      if (strpos($offds[$i], $_SERVER['DOCUMENT_ROOT']) === false) {
        $offds[$i].=DIRECTORY_SEPARATOR;
      }
      $selbit=str_replace("</select>","<option value='" . str_replace($_SERVER['DOCUMENT_ROOT'],'',substr($offds[$i],0)) . "'>" . str_replace($_SERVER['DOCUMENT_ROOT'],'',substr($offds[$i],0)) . "</option></select>", $selbit);
      if ($i == 0) { sort($offds);  }
     } else if ($offds[$i] == $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR || $offds[$i] == $_SERVER['DOCUMENT_ROOT']) {
      $i=$i;
     } else if (substr($offds[$i] . ' ',0,2) == './') {
      $selbit=str_replace("</select>","<option value='" . str_replace($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR,'',substr($offds[$i],2)) . "'>" . str_replace($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR,'',substr($offds[$i],1)) . "</option></select>", $selbit);
     } else {
      $selbit=str_replace("</select>","<option value='" . str_replace($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR,'',substr($offds[$i],0)) . DIRECTORY_SEPARATOR . "'>" . str_replace($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR,'',substr($offds[$i],0)) . DIRECTORY_SEPARATOR . "</option></select>", $selbit);
     }
    }
  
  echo "<html>
<head>
<title>Folder listing relative to Document Root (brought to you by RJM Programming ... February, 2026)</title>
<style>
  #midtd { border-right: 2px dotted blue; border-top: 2px dotted blue;  border-bottom: 2px dotted blue; text-shadow:-1px 1px 1px #ff2d95;  }
  #lefttd { border-top: 2px dotted blue;  border-bottom: 2px dotted blue; text-shadow:-1px 1px 1px #ff2d95; }
  #extbit {  text-shadow:-1px 1px 1px #ff2d95; }
  #djc { overflow: hidden; }
</style>
<scr" . "ipt type=text/javascript>
  var fsub='fsub', wo=null, divelem=null, gtao=null, mytrih='', anyway='&anyway=y', ajaxs=[], zhr=null, zform=null, pptxwoo=null, mswoo=null, videowoo=null;
  var commentary='', sofareurl='', commentaries=[], nonims='', newwoo=null;
  var xtypes = ['image/tif', 'audio/x-m4r','audio/wav','audio/x-wav','audio/x-pn-realaudio','audio/x-mpegurl','audio/x-aiff','audio/mpeg','audio/mid',
      'audio/basic','audio/ogg','video/x-sgi-movie','video/x-msvideo','video/quicktime','audio/mp3','video/mp4','video/mpeg',
      'video/x-la-asf','video/ogg','video/webm','audio/mp4', 'image/jpeg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp', 
      'text/html', 'text/html', 'text/html', 'text/javascript', 'text/css', 'text/plain', 'text/xml', 'text/csv',
      'application/vnd.ms-word', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/x-php', 'application/pdf', 'IMAGE/pdf',
      'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.ms-powerpoint',
      'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'video/mp4'];
  var xexts = ['.tif','.m4r','.wav','.wav','.ram','.m3u','.aiff','.mp3','.rmi',
      '.snd','.ogg','.movie','.avi','.mov','.mp3','.m4v','.mpeg',
      '.lsx','.ogv','.webm','.m4a', '.jpg', '.jpeg', '.png', '.gif', '.bmp', 
      '.htm', '.html', '.htmls', '.js', '.css', '.txt', '.xml', '.csv',
      '.doc', '.docx', '.php', '.pdf', '.pdf',
      '.pptx', '.ppt',
      '.xls', '.xlsx', '.mp4'];

  var myt='mytable', beforeload=true, umore='', hbit=('#' + (document.URL + '#').split('#')[1]).replace(/^\#$/g,'');
  var lastretval='', origprefix='', wesayso=false; 
  var needten=location.search.split('needten=')[1] ? eval(location.search.split('needten=')[1].split('&')[0]) : 0;
  var sofarval=location.search.split('sofarval=')[1] ? decodeURIComponent(location.search.split('sofarval=')[1].split('&')[0]) : '';
  var sofarmime=location.search.split('sofarmime=')[1] ? decodeURIComponent(location.search.split('sofarmime=')[1].split('&')[0]) : '';
  var woo=null;
  var pdfwoo=null, pdfzhr=null, pdfzform=null, gifwoo=null;
  var theblank='_blank';
  var pos='bottom right';
  if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) { anyway-='&anyway=y'; myt='mymediatr'; theblank='theblank'; pos='top left'; }

  var ganidn='', gincv='';
  
  function mmmize(inih) {
    if (inih.indexOf('.') != -1) {
      if (xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)]) != -1) {
        return inih + '\" data-mime=\"' + xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])]; 
      }
    }
    return inih;
  }
  
  function mmize(inih) {
    if (inih.indexOf('.') != -1) {
      if (xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)]) != -1) {
         switch (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])].split('/')[0]) {
           case 'audio':
             return inih + ' ' + String.fromCodePoint(0x1F50A);
             break;
            
           case 'video':
             return inih + ' ' + String.fromCodePoint(0x1F3A5);
             break;
            
           case 'image':
             return inih + ' ' + String.fromCodePoint(0x1F5BC,0xFE0F);
             break;
            
           case 'text':
             if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])] == 'text/csv') {
             return inih + ' ' + String.fromCodePoint(0x1F4C8);
             } else {
             return inih + ' ' + String.fromCodePoint(0x1F4C4);
             }
             break;
            
           case 'application':
             if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])] == 'application/pdf') {
             return inih + ' ' + String.fromCodePoint(0x1F5A8,0xFE0F);
             } else if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])].toLowerCase().indexOf('powerpoint') != -1) {
             return inih + ' ' + String.fromCodePoint(0x1F39E,0xFE0F);
             } else if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])].toLowerCase().indexOf('excel') != -1) {
             return inih + ' ' + String.fromCodePoint(0x1F4C8);
             } else {
             return inih + ' ' + String.fromCodePoint(0x1F4F0);
             }
             break;
             
           default:
             break;
            
         }
      }
    }
    return inih;
  }
  
  function yesh(inval) {
     var outval=inval;
     var outs=inval.split(',');
     for (var ij=0; ij<outs.length; ij++) {
        if (eval('' + commentaries.length) > ij) {
         console.warn('1:' + ij + ' ' + inval);
         console.warn(commentaries);
         if (commentaries[ij] != '') {
          outval=(outval + ' ').replace(outs[ij] + ',', outs[ij] + commentaries[ij] + ',').replace(outs[ij] + ' ', outs[ij] + commentaries[ij] + ' ').replace(/\ $/g,'');
         }
        }
     }
     //alert(outval);
     return outval.trim();
  }
  
  function noh(inval) {
     var outval=inval;
     var outs=inval.split(',');
     for (var ij=0; ij<outs.length; ij++) {
        if (outs[ij].indexOf('#') != -1) {
          outval=outval.replace(outs[ij].substring(outs[ij].indexOf('#')), '');
        }
     }
     return outval;
  }


  function showit(ioi) {
     if (!beforeload) {
     document.getElementById('mymediatr').innerHTML=mytrih;
     if (ioi.outerHTML.indexOf('<span') != -1) {
     outwo(ioi.getAttribute('data-href'));
     } else {
     outwo(ioi.href);
     }
     }
  }

  function hideit(ioi) {
     document.getElementById('mymediatr').innerHTML=mytrih;
  }
  
  function hideitlater(ioi) {
     if (2 == 5) {
     setTimeout(function(){
     document.getElementById('mymediatr').innerHTML=mytrih;
     }, 15000);
     }
  }
   
  function outwo(inchk) {
    for (var iut=0; iut<xexts.length; iut++) {
      if ((inchk).toLowerCase().indexOf(xexts[iut]) != -1) {
        if (xtypes[iut].indexOf('pdf') != -1) {
          document.getElementById('mediatable').style.display='block';
    if (document.getElementById('mymediatr').innerHTML.indexOf((inchk)) == -1) {
          document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
          document.getElementById('mypdf').innerHTML='<object data=\"' + (inchk) + '\" type=\"application/pdf\"></object>';
          }
    }
          return 'application/';
        } else if (xtypes[iut].indexOf('image/') != -1) {
          document.getElementById(myt).style.background='url(' + inchk + ')';
          document.getElementById(myt).style.backgroundSize='contain';
          document.getElementById(myt).style.backgroundRepeat='no-repeat';
          document.getElementById(myt).style.backgroundPosition=pos;
          if (document.getElementById('theblank')) { document.getElementById('mediatable').style.display='block'; document.getElementById('theblank').style.display='block'; document.getElementById('theblank').src=inchk; return 'IMAGE/';  }
          return ' ';
        } else if (xtypes[iut].indexOf('video/') != -1) {
          document.getElementById('mediatable').style.display='block';
    if (document.getElementById('mymediatr').innerHTML.indexOf((inchk)) == -1) {
          document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
          document.getElementById('myvideo').innerHTML='<video controls><source type=\"' + xtypes[iut] + '\" src=\"' + (inchk) + '\"></source></video>';
          }
    }
          return 'video/';
        } else if (xtypes[iut].indexOf('audio/') != -1) {
          document.getElementById('mediatable').style.display='block';
    if (document.getElementById('mymediatr').innerHTML.indexOf((inchk)) == -1) {
          document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
          document.getElementById('myaudio').innerHTML='<audio controls><source type=\"' + xtypes[iut] + '\" src=\"' + (inchk) + '\"></source></audio>';
          }
    }
          return 'audio/';
        }
      }
    } 
          document.getElementById('mediatable').style.display='block';
    document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
    document.getElementById('mytext').innerHTML='<iframe frameborder=0 style=width:100%;height:1600px; src=\"' + (inchk) + '\"></iframe>';
          }
    return '';
  }
  
  function getfsub() {
    document.getElementById('offdr').style.width='' + document.getElementById('fsub').value + 'px';
    return 'fsub';
  }
  
function resizeSelect(sel) { // thanks to https://www.google.com/search?q=make+select+element+width+in+sympathy+with+length+of+its+value&rlz=1C5OZZY_en&oq=make+select+element+width+in+sympathy+with+length+of+its+value&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCTI3MzEzajBqNKgCALACAQ&sourceid=chrome&ie=UTF-8
  // 1. Create a temporary span to measure text width
  var tempSpan = document.createElement('span');
  tempSpan.style.visibility = 'hidden';
  tempSpan.style.position = 'absolute';
  tempSpan.style.whiteSpace = 'pre';
  // 2. Set font styles to match the select box
  tempSpan.style.font = window.getComputedStyle(sel).font;
  // 3. Set content to selected text
  tempSpan.innerText = sel.options[sel.selectedIndex].text;
  document.body.appendChild(tempSpan);
  
  // 4. Update width (with extra space for the dropdown arrow)
  sel.style.width = (tempSpan.offsetWidth + 30) + 'px';
  document.body.removeChild(tempSpan);
}

  function getid(ofw) {
    if (ofw == 'lefttd') {
      return \"<span title='&lt;-- Folder listing relative to Document Root (brought to you by RJM Programming ... February, 2026) of ...' id=prefix>\" + document.URL.substring(0,8).replace(':','<select ontouchstart=\"thismultiple(this);\" onmouseover=\"thismultiple(this);\" onclick=\"thismultiple(this);\" size=1 id=compsel title=\"Animated slideshow or PDF or PowerPoint or Word or Animated GIF or Video via slides possible selecting multiple images here.\" style=display:inline-block;width:28px; data-onblur=process(this); data-multiple><option id=firsttext onclick=addcommentary(); value=\"\">&#58;</option></select>') + document.URL.substring(8).split('/')[0] + \"/</span>\" + document.getElementById(ofw).innerHTML.split('</span>')[1];
    }
    return document.getElementById(ofw).innerHTML;
  }
  
  function wbt(tao) {
    //alert(tao.value);
    if (tao) {
     if (!divelem) {
     gtao=tao;
     //document.getElementById('helpout').style.backgroundColor='yellow';
     //document.getElementById('dcont').style.backgroundColor='yellow';
     if (tao.value.trim() != '') {
     divelem = document.getElementById('djc');
     gtao=tao;
     var recto = tao.getBoundingClientRect();
     if (divelem) { // thanks to ideas off http://stackoverflow.com/questions/12266320/copy-div-content-to-textarea-or-text-with-the-same-font-family-style
      divelem.style.display='block'; //'flex';
    //divelem.style.alignItems='flex-end';
      divelem.style.overflowY='scroll';
      //divelem.style.flexFlow='column nowrap';
      divelem.style.flexDirection='column-reverse';
      divelem.style.fontFamily = 'Courier-New'; //window.getComputedStyle(tao,null).fontFamily || tao.style.fontFamily || tao.currentStyle.getCurrentProperty('font-family');
      divelem.style.fontSize = window.getComputedStyle(tao,null).fontSize || tao.style.fontSize || tao.currentStyle.getCurrentProperty('font-size');
      divelem.style.border = window.getComputedStyle(tao,null).border || tao.style.border || tao.currentStyle.getCurrentProperty('border');
      divelem.style.padding = window.getComputedStyle(tao,null).padding || tao.style.padding || tao.currentStyle.getCurrentProperty('padding');
      divelem.style.margin = window.getComputedStyle(tao,null).margin || tao.style.margin || tao.currentStyle.getCurrentProperty('margin');
      divelem.style.overflowX = 'hidden'; //window.getComputedStyle(tao,null).overflow || tao.style.overflow || tao.currentStyle.getCurrentProperty('overflow');
      divelem.style.position='absolute';
      divelem.style.left='' + recto.left + 'px';
      divelem.style.width='' + eval(-20 + recto.width) + 'px';
      divelem.style.height='' + recto.height + 'px';
      divelem.style.top='' + eval(-4 + recto.top) + 'px';
      //alert('' + recto.top + ' ' + recto.height + ' ' + ' ... ' + 'eval(-4 + recto.top + recto.height)=' + eval(-4 + recto.top + recto.height));
      //divelem.style.bottom='' + eval(-4 + recto.top + recto.height) + 'px';
      divelem.style.zIndex='999';
      //divelem.scrollTop=divelem.scrollHeight;
      //setTimeout(function(){ divelem.scrollTop=divelem.scrollHeight; }, 4000);
      tao.style.color='transparent';
      //var contis=massage(tao.value);
      //alert(contis);
      //while (contis.indexOf(String.fromCharCode(10)) != -1) {
      //  contis=contis.replace(String.fromCharCode(10), '<br>');
      //}
      //alert(contis);
      //divelem.innerHTML=contis;
     }
     }
     var taovalue=tao.value.replace(/</g,'&lt;').replace(/>/g,'&gt;');
     while (taovalue.indexOf(String.fromCharCode(10)) != -1) {
      taovalue=taovalue.replace(String.fromCharCode(10),'<br>');
     }
     document.getElementById('djc').innerHTML='<div id=indiv title=\"Report\" style=\"white-space:pre;text-shadow:-0.5px 0.5px 0.5px #ff0000;background: linear-gradient(to right, #e0eafc, #ffffff);\">' + massage(taovalue) + '</div>';
     var sps=document.getElementsByTagName('span');
     for (var isps=0; isps<sps.length; isps++) {
       if (('' + sps[isps].className) == 'sed') {
         //sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerText.toHtmlEntities()).replace(/\%0A$/g,''));
         if (sps[isps].innerHTML.indexOf('   ') == 0) { 
           sps[isps].innerHTML=sps[isps].innerHTML.replace('   ','&nbsp;&nbsp;&nbsp;'); 
           //sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerText.replace('   ','&nbsp;&nbsp;&nbsp;')).replace(/\%0A$/g,''));
           sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerHTML).replace(/\%0A$/g,''));
         } else {
           sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerText.toHtmlEntities()).replace(/\%0A$/g,''));
         }
       }
     }
     }
    }
    return '';
  }
  
  function onl() {
     if (window.opener) {
     if (typeof window.opener.getid == 'function') {
     document.getElementById('lefttd').innerHTML=window.opener.getid('lefttd');
     document.getElementById('midtd').innerHTML=window.opener.getid('midtd');
     } else {
    document.getElementById('lefttd').innerHTML=\"<span title='&lt;-- Folder listing relative to Document Root (brought to you by RJM Programming ... February, 2026) of ...' id=prefix>\" + document.URL.substring(0,8).replace(':','<select ontouchstart=\"thismultiple(this);\" onmouseover=\"thismultiple(this);\" onclick=\"thismultiple(this);\" size=1 id=compsel title=\"Animated slideshow or PDF or PowerPoint or Word or Animated GIF or Video via slides possible selecting multiple images here.\" style=display:inline-block;width:28px; data-onblur=process(this); data-multiple><option id=firsttext onclick=addcommentary(); value=\"\">&#58;</option></select>') + document.URL.substring(8).split('/')[0] + \"/</span>" . $selbit . "\";
    document.getElementById('midtd').innerHTML=\"<input style=width:210px; type=text id=extbit name=extbit value='" . $extbit . "' readonly disabled></input>\";
     }
     } else {
    document.getElementById('lefttd').innerHTML=\"<span title='&lt;-- Folder listing relative to Document Root (brought to you by RJM Programming ... February, 2026) of ...' id=prefix>\" + document.URL.substring(0,8).replace(':','<select ontouchstart=\"thismultiple(this);\" onmouseover=\"thismultiple(this);\" onclick=\"thismultiple(this);\" size=1 id=compsel title=\"Animated slideshow or PDF or PowerPoint or Word or Animated GIF or Video via slides possible selecting multiple images here.\" style=display:inline-block;width:28px; data-onblur=process(this); data-multiple><option id=firsttext onclick=addcommentary(); value=\"\">&#58;</option></select>') + document.URL.substring(8).split('/')[0] + \"/</span>" . $selbit . "\";
    document.getElementById('midtd').innerHTML=\"<input style=width:210px; type=text id=extbit name=extbit value='" . $extbit . "' readonly disabled></input>\";
     }
    document.getElementById('fsub').value='' + document.getElementById('offdr').getBoundingClientRect().width;
    document.getElementById('fsub').name='fsub';
    document.getElementById('offdr').style.width='15px';
  //  document.getElementById('jc').title=\"" . str_replace("\n","\" + String.fromCharCode(10) + \"",str_replace($_SERVER['DOCUMENT_ROOT'],'',$resis)) . "\"; 
    resizeSelect(document.getElementById('offdr'));
    if (('' + top.document.URL).indexOf('/ITblog') != -1) {
      document.getElementById('myform').target='_top';
      document.getElementById('myform').method='GET';
    }
    if (('' + document.URL).indexOf('#offdr=') != -1 && ('' + document.URL).indexOf('#offdr=&') == -1 && ('' + document.URL).indexOf('&done=') == -1) {
     document.getElementById('offdr').value=decodeURIComponent(('' + document.URL).split('#offdr=')[1].split('&')[0]);
     document.getElementById('offdr').style.width='" . $fifteen . "px';
     document.getElementById('fsub').name='fsub';
     //alert(decodeURIComponent(('' + document.URL).split('#offdr=')[1].split('&')[0]));
     location.hash+='&done=y';
     //alert(needten);
     document.getElementById(getfsub()).click();
    }
    " . $more . "
    wbt(document.getElementById('jc'));  
    setTimeout(function(){ document.getElementById(mobit('mymediatr')).innerHTML=mytrih;   document.getElementById('mypdf').style.display='table-cell';  beforeload=false; }, 20000);  
    if (needten == 10) { if ('" . $offdr . "' != '') {  document.getElementById('fsub').click();  } else {   document.body.style.cursor='progress';  monitorsel(); } }
  }

  function rez(ota) {
     if (divelem && ota == gtao) { // thanks to ideas off http://stackoverflow.com/questions/12266320/copy-div-content-to-textarea-or-text-with-the-same-font-family-style
//alert(1);
      var recto = gtao.getBoundingClientRect();
      var jrecto = document.getElementById('jcont').getBoundingClientRect();
      var drecto = document.getElementById('dcont').getBoundingClientRect();
//alert(12);
//alert(31);
      if (eval('' + recto.width) > eval('' + drecto.width)) {
//alert(31);
        document.getElementById('dcont').style.width='' + eval(30 + eval('' + recto.width)) + 'px';
      }
       if (eval('' + recto.height) > eval('' + drecto.height)) {
//alert(31);
        document.getElementById('dcont').style.height='' + eval(30 + eval('' + recto.height)) + 'px';
      }
      if (eval('' + recto.width) > eval('' + jrecto.width)) {
//alert(41);
        document.getElementById('jcont').style.width='' + eval(20 + eval('' + recto.width)) + 'px';
      }
      if (eval('' + recto.height) > eval('' + jrecto.height)) {
//alert(41);
        document.getElementById('jcont').style.height='' + eval(20 + eval('' + recto.height)) + 'px';
      }
      divelem.style.left='' + recto.left + 'px';
//alert(41);
      divelem.style.width='' + eval(-20 + recto.width) + 'px';
//alert(51);
      divelem.style.height='' + recto.height + 'px';
//alert(61);
      //divelem.style.top='' + eval(-4 + recto.top) + 'px';
      //divelem.style.bottom='' + eval(-4 + recto.top + recto.height) + 'px';
      divelem.style.zIndex='999';
      divelem.sty.e.whitespace='pre';
//alert(71);
      gtao.style.color='transparent';
//alert(81);
     }
  }
  
  function process(osel) {
    if (osel.value != '') {
      //alert('here');
      osel.value='';
    }
  }
  
  function agifit(incsv) {
    hbit=('#' + (document.URL + '#').split('#')[1]).replace(/^\#$/g,'');
    if (incsv == '' && sofarmime.trim() == '') {
      umore='';
    } else if (document.URL.indexOf('?') != -1) {
      umore='&sofarval=' + encodeURIComponent(sofarval) + '&sofarmime=' + encodeURIComponent(sofarmime) + '&needten=10';
    } else {
      umore='?sofarval=' + encodeURIComponent(sofarval) + '&sofarmime=' + encodeURIComponent(sofarmime) + '&needten=10';
    }
    if (incsv == '' && sofarmime.indexOf(',') != -1) {
    ajaxpdfit('');
    if (origprefix != '') {  document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval=''; sofarmime=''; lastretval=''; commentaries=[]; }
    } else if (incsv != '') {
    var myimgs=incsv.split(',');
    if (woo) {
      if (!woo.closed) { woo=woo; } else { woo.close(); woo=null; }
    }
    if (!woo) {
    if (ajaxpdfit(yesh(incsv)) != '') {
    woo=window.open('','_blank','top=50,left=50,width=800,height=800');
    woo.document.write('<ht' + 'ml><he' + 'ad><ti' + 'tle>' + myimgs[0] + '</ti' + 'tle><scr' + 'ipt type=text/javascript> var jimg=0, imgs=(\"' + incsv + '\").split(String.fromCharCode(44)), kimg=eval(\"\" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' + \"'url(' + imgs[jimg] + ')'\" + '; document.title=' + \"'' + imgs[jimg] + ''\" + '; document.body.style.backgroundRepeat=\"no-repeat\"; document.body.style.backgroundSize=\"contain\";  } setInterval(startit,4000); </scri' + 'pt></head><body id=xbody style=background:url(' + myimgs[0] + ');background-repeat:no-repeat;background-size:contain;></body></html>');
    }
    if (origprefix != '') {  document.body.style.cursor='pointer';   document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval=''; sofarmime=''; lastretval=''; commentaries=[]; }
    return woo;
    }
    }
    needten=0;
    return null;
  }
  
  function monitorsel() {
    var yesdo=true, jj=-1, rest='?';
    if (needten > 10) { setTimeout(monitorsel, 2000);  return ''; }
    var osel=document.getElementById('compsel');
    var retval='', delim='';
    if (sofarval != '') { delim=','; retval=sofarval; }
    for (var i=0; i<osel.length; i++) {  
      if (osel.options[i].selected) {  
        if (osel.options[i].value != '') { rest+='x'; jj=i; } 
        if (osel.options[i].value != '' && ('' + osel.options[i].title + 'x').substring(0,1) != ' ') {  
          rest+='^';  
          if ((',' + sofarval + ',').indexOf(',' + osel.options[i].value + ',') == -1) {  
            rest+='#';  
            if (osel.options[i].outerHTML.indexOf(' data-mime=') != -1) {  
              rest+='$';  
              sofarmime+=(sofarmime == '' ? '' : ',') + osel.options[i].getAttribute('data-mime');  
            } else {  
              sofarmime+=(sofarmime == '' ? '' : ',') + '';  
            }  
            rest+='.'; 
            retval+=delim + osel.options[i].value; delim=',';  
            document.getElementById('o' + encodeURIComponent(osel.options[i].value)).text+=' ' + String.fromCodePoint(0x2705) + ' ' + retval.split(',').length;    
          }   
      } 
      }  
    }
    //if (rest != '?') { document.title=sofarval + '=sofarval sofarmime=' + sofarmime + ' ' + (jj == -1 ? '' : rest + osel.options[jj].outerHTML); }
    if (document.getElementById('compsel')) {
      if (retval != '') {
       if (retval != '' && retval.indexOf(',') == -1) {
       needten=0;
       }
       if (lastretval != retval) {
       lastretval=retval;
       sofarval=retval;
       needten=0;
       } else if (needten < 10) {
       needten++;
       } else {
       yesdo=false;
       needten++;
       if (agifit(sofarval)) {
       if (origprefix != '') {  document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval=''; sofarmime=''; lastretval=''; commentaries=[];  }
       }
       }
      } else if (sofarmime.indexOf(',') != -1 && needten < 10) {
       needten++;
      } else if (sofarmime.indexOf(',') != -1 && needten >= 10) {
       yesdo=false;
       needten++;
       if (agifit(sofarval)) {
       if (origprefix != '') {  document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval='';  sofarmime=''; lastretval=''; }
       }
      }
      if (yesdo) { setTimeout(monitorsel, 2000); }
    //} else {
    //  var commadd=prompt('Optionally add to commentary.', '');
    }
  }
  
  function sharemaybe(inrecp) {
    var andmore=''
    if (inrecp.indexOf(' ') == -1 && inrecp.indexOf('@') > 0) {
      if (umore == '' && document.URL.indexOf('?') == -1 && document.getElementById('offdr').value.trim() != '') {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      } else if (document.getElementById('offdr').value.trim() != '' && (document.URL.indexOf('?') != -1 || umore != '')) {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      }
      document.getElementById('aemail').href='mailto:' + inrecp + '?subject=Document%20Root%20Folder%20Listing&body=' + encodeURIComponent(document.URL.split('#')[0] + umore + andmore + hbit);
      document.getElementById('aemail').click();
      return '';    
    } else if (inrecp.indexOf(' ') == -1 && inrecp.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
      if (umore == '' && document.URL.indexOf('?') == -1 && document.getElementById('offdr').value.trim() != '') {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      } else if (document.getElementById('offdr').value.trim() != '' && (document.URL.indexOf('?') != -1 || umore != '')) {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      }
      document.getElementById('asms').href='sms:' + inrecp + '&body=' + encodeURIComponent(document.URL.split('#')[0] + umore + andmore + hbit);
      document.getElementById('asms').click();
      return '';    
    }
    return inrecp;
  }
  
  function addcommentary() {
      needten=1;
      var commadd=null;
      if (document.URL.indexOf('//localhost') == -1) {
      commadd=prompt('Optionally add to commentary or email an email address to share via email or mobile number to share via SMS.  For new lines use ~~ characters.  For multiple entries separate by  ,  (ie. two blanks comma two blanks).', '');
      } else {
      commadd=prompt('Optionally add to commentary.  For new lines use ~~ characters.  For multiple entries separate by  ,  (ie. two blanks comma two blanks).', '');
      }
      if (commadd != null) {
        var coms=sharemaybe(commadd).split('  ,  ');
        for (var ic=0; ic<coms.length; ic++) {
         if (coms[ic].trim() != '') {
          commentaries.push('#' + encodeURIComponent(coms[ic]));
         }
        }
      }
  }
  
  function thismultiple(osel) {
    if (document.getElementById('lefttd').outerHTML.split('>')[0].indexOf('overflow') == -1 || wesayso) {
    wesayso=false;
    document.getElementById('lefttd').style.overflowY='visible';
    if (navigator.userAgent.toUpperCase().indexOf('CHROME') != -1 || navigator.userAgent.toUpperCase().indexOf('CRIOS') != -1) {
      osel.style.height='30px';
      osel.setAttribute('multiple', 'true');
    } else if (navigator.userAgent.toUpperCase().indexOf('SAFARI') != -1 || navigator.userAgent.toUpperCase().indexOf('FIREFOX') != -1) {
      if (2 == 5) { osel.style.height='30px'; }
    } else {
      osel.style.height='30px';
      osel.setAttribute('multiple', 'true');
    }
    if (document.URL.indexOf('//localhost') == -1) {
    document.getElementById('firsttext').innerHTML=\"&#58;   ... can build up commentary or share here\";
    } else {
    document.getElementById('firsttext').innerHTML=\"&#58;   ... can build up commentary here\";
    }
    setTimeout(monitorsel, 2000);
    }
  }
  
  function massage(tv) {
    var tscnt=0, itv=0, ihis='', uids=[], addthese='';
    var tlls=tv.split('<br>');
    ajaxs=[];
    for (itv=eval(-1 + tlls.length); itv>=0; itv--) {
      if (tlls[itv].indexOf(' /') != -1) {
       if (document.getElementById('prefix') && !document.getElementById('compsel')) {
       if (document.getElementById('prefix').innerHTML.replace('p://','s://').indexOf('s://') != -1) {
         document.getElementById('prefix').innerHTML=document.getElementById('prefix').innerHTML.replace(':','<select ontouchstart=\"thismultiple(this);\" onmouseover=\"thismultiple(this);\" onclick=\"thismultiple(this);\" size=1 id=compsel title=\"Animated slideshow or PDF or PowerPoint or Word or Animated GIF or Video via slides possible selecting multiple images here.\" style=display:inline-block;width:28px; data-onblur=process(this); data-multiple><option id=firsttext onclick=addcommentary(); value=\"\">&#58;</option></select>')
       }
       }
       uids=tlls[itv].split(' /');
       ihis=tlls[itv].replace(tlls[itv].split(' /')[0] + ' ','');
       if (eval('' + uids.length) == 3) {
       ajaxs.unshift('/' + uids[2]);
       //alert('0:' + outwo('/' + uids[2]) + ' ... ' + '/' + uids[2]);
       if (outwo('/' + uids[2]).replace(' ','IMAGE/') == 'IMAGE/') {
              addthese='<option id=\"o' + encodeURIComponent('/' + uids[2]) + '\" title=\"/' + uids[2] + '\" value=\"/' + mmmize(uids[2]) + '\">/' + mmize(uids[2]) + '</option>' + addthese; 
       } else {
              addthese='<option id=\"o' + encodeURIComponent('/' + uids[2]) + '\" title=\"/' + uids[2] + '\" value=\"/' + mmmize(uids[2]) + '\">/' + mmize(uids[2]) + '</option>' + addthese; 
       }
       if (outwo('/' + uids[2]) == 'IMAGE/' && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) { 
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<span id=\"' + encodeURIComponent('/' + uids[2]) + '\" title=\"\" style=text-decoration:underline; onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this); href=# data-href=\"/' + uids[2] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</span>');
       } else {
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<a id=\"' + encodeURIComponent('/' + uids[2]) + '\" title=\"\" target=_blank onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this) href=\"/' + uids[2] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</a>');
       }
       } else {
       ajaxs.unshift(ihis.split('%20-')[0].split(' -')[0]);
       //alert('1:' + outwo((ihis.split('%20-')[0].split(' -')[0])) + ' ... ' + (ihis.split('%20-')[0].split(' -')[0]));
       if (outwo(ihis.split('%20-')[0].split(' -')[0]).replace(' ','IMAGE/') == 'IMAGE/') {
              addthese='<option id=\"o' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"' + (ihis.split('%20-')[0].split(' -')[0]) + '\" value=\"' + mmmize((ihis.split('%20-')[0].split(' -')[0])) + '\">' + mmize((ihis.split('%20-')[0].split(' -')[0])) + '</option>' + addthese; 
       } else {
              addthese='<option id=\"o' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"' + (ihis.split('%20-')[0].split(' -')[0]) + '\" value=\"' + mmmize((ihis.split('%20-')[0].split(' -')[0])) + '\">' + mmize((ihis.split('%20-')[0].split(' -')[0])) + '</option>' + addthese; 
       }
       if (outwo(ihis.split('%20-')[0].split(' -')[0]) == 'IMAGE/' && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) {  
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<span id=\"' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"\" style=text-decoration:underline; onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this); href=# data-href=\"' + ihis.split('%20-')[0].split(' -')[0] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</span>');
       } else {
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<a id=\"' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"\" target=_blank onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this); href=\"' + ihis.split('%20-')[0].split(' -')[0] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</a>');
       }
       }
      }
    }
    if (addthese != '') {
      document.getElementById('compsel').innerHTML=document.getElementById('compsel').innerHTML.split('</option>')[0].replace('   ... can build up commentary here','') + '</option>' + addthese;
      origprefix=document.getElementById('prefix').innerHTML; //.replace(' data-multiple', ' multiple data-multiple');
    }
    setInterval(function(){ var onerect=document.getElementById('djc').getBoundingClientRect(), tworect=document.getElementById('jc').getBoundingClientRect();   if (Math.abs(eval(eval(('' + onerect.height) - eval('' + tworect.height)))) > 20) {  document.getElementById('djc').style.height='' + tworect.height + 'px';  document.getElementById('djc').style.width='' + eval(-20 + tworect.width) + 'px'; } }, 6000);
    setTimeout(doajaxs, 1000);
    return tv;
  }
  
 function stateChanged() {
  if (zhr.readyState == 4) {
   if (zhr.status == 200) {
    var rawhtml = zhr.response;
    var spans=rawhtml.split('</span');
    var ps=rawhtml.split('</p');
    if (eval('' + ps.length) == 2 && eval('' + spans.length) == 2) {
      document.getElementById(spans[0].split('>')[eval(-1 + spans[0].split('>').length)]).title+=ps[0].split('>')[eval(-1 + ps[0].split('>').length)];
    }
    setTimeout(doajaxs, 1000);
   }
  }
 }
  
 function statePdfChanged() {
  var lastdodah=String.fromCharCode(34);
  var prefis=' data=';
  if (pdfzhr.readyState == 4) {
   if (pdfzhr.status == 200) {
    var rawhtml = pdfzhr.response;
    //alert('2:' + rawhtml);
    var bsixs=rawhtml.split(' ' + prefis + lastdodah);
    if (eval('' + bsixs.length) == 1) {
      bsixs=rawhtml.split(' ' + prefis + '=');
      lastdodah=String.fromCharCode(62);
    }
    if (eval('' + bsixs.length) >= 2) {
    //alert('0:' + bsixs[1].split(lastdodah)[0]);
    if (pdfwoo) {
      if (!pdfwoo.closed) { pdfwoo=pdfwoo; } else { pdfwoo.close(); pdfwoo=null; }
    }
    if (!pdfwoo) {
    //alert('1:' + bsixs[1].split(lastdodah)[0]);
    pdfwoo=window.open(bsixs[1].split(lastdodah)[0],'_blank','top=50,left=150,width=800,height=800');
    //pdfwoo.document.write('<ht' + 'ml><he' + 'ad><ti' + 'tle>Pdf</ti' + 'tle><body><object title=Pdf tyle=application/pdf data=\"' + bsixs[1].split(lastdodah)[0] + '\"></object>" . $afterobject . "</body></html>');
    }
    }
   }
  }
 }
 
  function weedoutnonims(ncv) {
    var onetim='';
    var outncv=ncv;
    var blanks='                                                    ';
    var sfs=sofarval.split(','), sfm=sofarmime.toLowerCase().split(',');
    while (eval('' + sfs.length) < eval('' + sfm.length)) {
      sfs.push('');
    }
    while (eval('' + sfm.length) < eval('' + sfs.length)) {
      sfm.push('');
    }
    for (var ig=0; ig<sfs.length; ig++) {
      if (ig == 0) { outncv=''; }
      if (sfm[ig].toLowerCase().indexOf('image/') != -1) {
        if (outncv == '') {
         outncv+='' + sfs[ig];
         if (onetim == '' && sfs[ig] != '') { 
           onetim=',' + sfs[ig] + '#' + sfm[ig];  
         }
        } else {
         outncv+=',' + sfs[ig];
         if (onetim != '' && sfs[ig] != '') { 
           onetim+=',' + sfs[ig] + '#' + sfm[ig];  
         }
        }
      } else if (nonims == '' && sfm[ig] != '') {
        nonims+='' + sfs[ig] + '#' + sfm[ig];
      } else if (sfm[ig] != '') {
        nonims+=',' + sfs[ig] + '#' + sfm[ig];
      }
    }
    if (nonims != '') {
      //if (onetim == '' && outncv != '' && outncv.indexOf(',') == -1) { 
      //  onetim=',' + sfs[ig] + '#' + sfm[ig];  
      //}

      if (nonims.indexOf(',') == -1 || 1 == 1) { nonims+=onetim;  }
      document.getElementById('nonims').value=nonims;
      //document.getElementById('nonimssub').click();
    }
    return outncv;
  }
 
  function ourencodeURIComponent(insrt) {
    if (nonims != '') {
      return encodeURIComponent(insrt) + '&nonims=' + encodeURIComponent(nonims);
    }
    return encodeURIComponent(insrt);
  }
 
  function ajaxpdfit(incv) {
        if (4 == 4) {
        nonims='';
        var anidn='' + incv.replace(/\\\\/g,'/').split(',')[0].split('/')[eval(-1 + incv.replace(/\\\\/g,'/').split(',')[0].split('/').length)].split('.')[0] + '_et-al_' + incv.split(',').length; // + '.pdf';
        if (sofarmime.toLowerCase().replace(/image\//g,'').indexOf('/') != -1) {
        incv=weedoutnonims(incv);
        }
     if (nonims != '') {
      document.getElementById('nonimsname').value=anidn.replace('_et-al_','_et-al_0') + '.cba';
      if (4 == 4) {
    if (newwoo) {
      if (!newwoo.closed) {  newwoo.close(); newwoo=null; } else { newwoo.close(); newwoo=null; }
    }
    //alert(document.getElementById('nonims').value + ' ' + document.getElementById('nonimsname').value);
        newwoo=window.open(document.URL.split('?')[0].split('#')[0] + ('?nonims=' + ourencodeURIComponent(document.getElementById('nonims').value)).replace('?nonims=&','?').split('&nonims=')[0] + '&nonimsname=' + encodeURIComponent(document.getElementById('nonimsname').value) + '&ipis=' + encodeURIComponent('" . server_remote_addr() . "'),'_blank','top=20,left=' + eval(-650 + screen.width) + ',width=650,height=700');
        //document.title='incv=' + incv;
        if (incv == '') {  return '';  }
      } else {
      document.getElementById('nonimssub').click();
      }
    }
   if (pdfwoo) {
      if (!pdfwoo.closed) {  pdfwoo.close(); pdfwoo=null; } else { pdfwoo.close(); pdfwoo=null; }
    }
    if (pptxwoo) {
      if (!pptxwoo.closed) {  pptxwoo.close(); pptxwoo=null; } else { pptxwoo.close(); pptxwoo=null; }
    }
    if (mswoo) {
      if (!mswoo.closed) {  mswoo.close(); mswoo=null; } else { mswoo.close(); mswoo=null; }
    }
    if (gifwoo) {
      if (!gifwoo.closed) {  gifwoo.close(); gifwoo=null; } else { gifwoo.close(); gifwoo=null; }
    }
    if (videowoo) {
      if (!videowoo.closed) {  videowoo.close(); videowoo=null; } else { videowoo.close(); videowoo=null; }
    }
        //incv=incv.replace(/\~\~/g, String.fromCharCode(92) + String.fromCharCode(10)); // new idea
        if (('' + document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(incv) + '&apdfname=' + encodeURIComponent(anidn + '.pdf')).length > 800) {
        pdfzhr = new XMLHttpRequest();
        pdfzform = new FormData();
        pdfzform.append('anidnlist', incv);
        pdfzform.append('anidn', anidn + '.abc');
        //pdfzhr.onreadystatechange=noNeedToHangAround; 
        pdfzhr.open('post', './one_line_find.php', true);
        pdfzhr.send(pdfzform);
        ganidn=anidn;
        gincv=noh(incv); // strips out any hashtagged caption data
        setTimeout(function(){
        pdfwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(gincv) + '&apdfname=' + encodeURIComponent(ganidn + '.pdf'),'_blank','top=20,left=' + eval(-700 + screen.width) + ',width=700,height=700');
        pdfwoo.document.title='PDF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        pptxwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?applist=' + ourencodeURIComponent(gincv) + '&appname=' + encodeURIComponent(ganidn + '.pptx'),'_blank','top=' + eval(-600 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        pptxwoo.document.title='PowerPoint (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        mswoo=window.open(document.URL.split('?')[0].split('#')[0] + '?amslist=' + ourencodeURIComponent(gincv) + '&amsname=' + encodeURIComponent(ganidn + '.docx'),'_blank','top=' + eval(-400 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        mswoo.document.title='Word (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        gifwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?agiflist=' + ourencodeURIComponent(gincv) + '&agifname=' + encodeURIComponent(ganidn + '.gif'),'_blank','top=' + eval(-200 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        gifwoo.document.title='Animated GIF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        videowoo=window.open(document.URL.split('?')[0].split('#')[0] + '?avideolist=' + ourencodeURIComponent(gincv) + '&avideoname=' + encodeURIComponent(ganidn + '.mp4'),'_blank','top=' + eval(-400 + screen.height) + ',left=0,width=300,height=400');
        videowoo.document.title='Video (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        }, 5000);
        } else {
        pdfwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(incv) + '&apdfname=' + encodeURIComponent(anidn + '.pdf'),'_blank','top=20,left=' + eval(-700 + screen.width) + ',width=700,height=700');
        pdfwoo.document.title='PDF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        pptxwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?applist=' + ourencodeURIComponent(incv) + '&appname=' + encodeURIComponent(anidn + '.pptx'),'_blank','top=' + eval(-600 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        pptxwoo.document.title='PowerPoint (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        mswoo=window.open(document.URL.split('?')[0].split('#')[0] + '?amslist=' + ourencodeURIComponent(incv) + '&amsname=' + encodeURIComponent(anidn + '.docx'),'_blank','top=' + eval(-400 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        mswoo.document.title='Word (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        gifwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?agiflist=' + ourencodeURIComponent(incv) + '&agifname=' + encodeURIComponent(anidn + '.gif'),'_blank','top=' + eval(-200 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        gifwoo.document.title='Animated GIF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        videowoo=window.open(document.URL.split('?')[0].split('#')[0] + '?avideolist=' + ourencodeURIComponent(incv) + '&avideoname=' + encodeURIComponent(anidn + '.mp4'),'_blank','top=' + eval(-400 + screen.height) + ',left=0,width=300,height=400');
        videowoo.document.title='Video (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        }
        } else if (4 == 46) {
        document.getElementById('apdflist').value=incv;
        document.getElementById('apdfname').value='pdf' + Math.floor(Math.random() * 19897654) + '.pdf';
        document.getElementById('thepdf').style.display='block';
        document.getElementById('pdfsub').click();
        } else if (4 == 47) {
        document.getElementById('thepdf').style.display='block';
        document.getElementById('thepdf').src=document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(incv) + '&apdfname=' + encodeURIComponent('pdf' + Math.floor(Math.random() * 19897654) + '.pdf');
        } else {
        pdfzhr = new XMLHttpRequest();
        pdfzform = new FormData();
        pdfzform.append('apdflist', incv);
        pdfzform.append('apdfname', 'pdf' + Math.floor(Math.random() * 19897654) + '.pdf');
        pdfzhr.onreadystatechange=statePdfChanged; 
        pdfzhr.open('post', './one_line_find.php', true);
        pdfzhr.send(pdfzform);
        }
        return ' ';
  }
  
  function doajaxs() {
    var nexttogo='';
    for (var ii=0; ii<ajaxs.length; ii++) {
      if (nexttogo == '' && ajaxs[ii] != '') {
        nexttogo=ajaxs[ii];
        ajaxs[ii]='';
      }
    }
    if (nexttogo != '') {
        zhr = new XMLHttpRequest();
        zform = new FormData();
        zform.append('ajaxid', encodeURIComponent(nexttogo));
        zform.append('ajaxurl', nexttogo);
        zhr.onreadystatechange=stateChanged; 
        zhr.open('post', './one_line_find.php', true);
        zhr.send(zform);
    }
  }
   
  function mobit(inid) {
    if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) {  
      document.getElementById('myimg').innerHTML='<iframe frameborder=0 name=theblank id=theblank style=display:none;height:1600px; src=/About_Us.html></iframe>';
      myt='mymediatr'; 
      theblank='theblank'; 
    }
    return inid;
  }

</scr" . "ipt>
</head>
<body id=xbody onload=\"  mytrih=document.getElementById(mobit('mymediatr')).innerHTML;   document.getElementById('mypdf').style.display='none'; onl();\" title='Folder listing (brought to you by RJM Programming ... February, 2026)'>
<form id=myform onsubmit=\" if (('' + this.method).toUpperCase() == 'GET') {   wo=window.open(this.action + '?offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway, '_blank', 'top=200,left=0,width=' + screen.width + ',height=150');  document.getElementById('offdr').value='';  document.getElementById('offdr').style.width='15px'; return false;  } else {  document.getElementById('myform').style.display='none'; document.getElementById('myif').style.display='block'; return true; } \" method=POST target=myif action='./one_line_find.php" . $qs . "'>
<table id=mytable style=width:100%;>
<tr id=mytr><td id=righttd style=width:" . $forty . "%;><textarea style=width:100%;background-color:yellow; placeholder='Folder listing of ...' rows=1 cols=120 id=jc>" . $resis . "</textarea><div title='Folder listing of ...' id=djc onmousemove=rez(this);></div></td><td id=lefttd style=text-align:right;vertical-align:top;></td><td id=midtd style=vertical-align:top;></td></tr>
</table>
<input type=submit style=display:none; id=fsub value=" . $fifteen . "></input>
</form>
<iframe scrolling=yes frameborder=0 name=myif id=myif src=/About_Us.html style=display:none;width:100%;height:80px;overflow-y:visible;></iframe>
<table id=mediatable style=width:100%;display:none;height:800px;>
<tr id=mymediatr><td id=myvideo></td><td id=myaudio></td><td id=mypdf></td><td id=mytext></td><td id=myimg></td></tr>
</table>
<form style=display:none; id=pdfform method=POST action=./one_line_find.php target=thepdf><input type=hidden id=apdflist name=apdflist value=''></input><input type=hidden id=apdfname name=apdfname value=''></input><input style=display:none; type=submit value=Submit id=pdfsub></input></form>
<iframe scrolling=yes frameborder=0 name=thepdf id=thepdf src=/About_Us.html style=display:none;width:100%;height:800px;overflow-y:visible;></iframe>
<form style=display:none; id=nonimsform method=POST action=./one_line_find.php target=nonimsif><input type=hidden id=nonims name=nonims value=''></input><input type=hidden id=nonimsname name=nonimsname value=''></input><input style=display:none; type=submit value=Submit id=nonimssub></input></form>
<iframe scrolling=yes frameborder=0 name=nonimsif id=nonimsif src=/About_Us.html style=display:none;width:100%;height:800px;overflow-y:visible;></iframe>
<a target=_top id=aemail style=display:none; href='mailto:?subject=Document%20Root%20Folder%20Listing'>Email</a><a target=_top id=asms style=display:none; href='sms:&body='>SMS</a>
</body>
</html>";
    exit;
  } else if (isset($_GET['offdr'])) {
    $offdr=str_replace('+',' ',urldecode($_GET['offdr']));
    $extbit='*.txt';
    if (isset($_GET['extbit'])) { $extbit=str_replace('+',' ',urldecode($_GET['extbit'])); }
     $extbit='*.[tjpmwagc][xpnopaids][etgvf34]*';
    $resis=str_replace($_SERVER['DOCUMENT_ROOT'],'',shell_exec('ls -lhgo ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $offdr . $extbit));
    if ($resis == '') {  $forty="15"; }
  } else {
    $offdr=str_replace('+',' ',urldecode($_POST['offdr']));
    $extbit='*.txt';
    if (isset($_POST['extbit'])) { $extbit=str_replace('+',' ',urldecode($_POST['extbit'])); }
     $extbit='*.[tjpmwagc][xpnopaids][etgvf34]*';
    $resis=str_replace($_SERVER['DOCUMENT_ROOT'],'',shell_exec('ls -lhgo ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $offdr . $extbit));
    if ($resis == '') {  $forty="15"; }
  }
  
  echo "<html>
<head>
<title>Folder listing Relative to Document Root (brought to you by RJM Programming ... February, 2026)</title>
<style>
  #midtd { border-right: 2px dotted blue; border-top: 2px dotted blue;  border-bottom: 2px dotted blue; text-shadow:-1px 1px 1px #ff2d95;  }
  #lefttd { border-top: 2px dotted blue;  border-bottom: 2px dotted blue; text-shadow:-1px 1px 1px #ff2d95; }
  #extbit {  text-shadow:-1px 1px 1px #ff2d95; }
  #djc { overflow: hidden; }
</style>
<scr" . "ipt type=text/javascript>
  var needten=location.search.split('needten=')[1] ? eval(location.search.split('needten=')[1].split('&')[0]) : 0;
  var sofarval=location.search.split('sofarval=')[1] ? decodeURIComponent(location.search.split('sofarval=')[1].split('&')[0]) : '';
  var sofarmime=location.search.split('sofarmime=')[1] ? decodeURIComponent(location.search.split('sofarmime=')[1].split('&')[0]) : '';
  var fsub='fsub', divelem=null, gtao=null, mytrih='', anyway='&anyway=y', ajaxs=[], zhr=null, zform=null, newwoo=null;
  var pdfwoo=null, pdfzhr=null, pdfzform=null, pptxwoo=null, mswoo=null, gifwoo=null, videowoo=null;
  var commentary='', sofareurl='', commentaries=[], nonims='', beforeload=true, umore='', hbit=('#' + (document.URL + '#').split('#')[1]).replace(/^\#$/g,'');
  var xtypes = ['image/tif', 'audio/x-m4r','audio/wav','audio/x-wav','audio/x-pn-realaudio','audio/x-mpegurl','audio/x-aiff','audio/mpeg','audio/mid',
      'audio/basic','audio/ogg','video/x-sgi-movie','video/x-msvideo','video/quicktime','audio/mp3','video/mp4','video/mpeg',
      'video/x-la-asf','video/ogg','video/webm','audio/mp4', 'image/jpeg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp', 
      'text/html', 'text/html', 'text/html', 'text/javascript', 'text/css', 'text/plain', 'text/xml', 'text/csv',
      'application/vnd.ms-word', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/x-php', 'application/pdf', 'IMAGE/pdf',
      'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.ms-powerpoint',
      'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'video/mp4'];
  var xexts = ['.tif','.m4r','.wav','.wav','.ram','.m3u','.aiff','.mp3','.rmi',
      '.snd','.ogg','.movie','.avi','.mov','.mp3','.m4v','.mpeg',
      '.lsx','.ogv','.webm','.m4a', '.jpg', '.jpeg', '.png', '.gif', '.bmp', 
      '.htm', '.html', '.htmls', '.js', '.css', '.txt', '.xml', '.csv',
      '.doc', '.docx', '.php', '.pdf', '.pdf',
      '.pptx', '.ppt',
      '.xls', '.xlsx', '.mp4'];
  var lastretval='', origprefix='', wesayso=false, woo=null;
  var myt='mytable';
  var theblank='_blank';
  var pos='bottom right';
  if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) {  myt='mymediatr'; theblank='theblank'; pos='top left'; }


  var ganidn='', gincv='';
  
  
  function mmmize(inih) {
    if (inih.indexOf('.') != -1) {
      if (xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)]) != -1) {
        return inih + '\" data-mime=\"' + xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])]; 
      }
    }
    return inih;
  }
  
  function mmize(inih) {
    if (inih.indexOf('.') != -1) {
      if (xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)]) != -1) {
         switch (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])].split('/')[0]) {
           case 'audio':
             return inih + ' ' + String.fromCodePoint(0x1F50A);
             break;
            
           case 'video':
             return inih + ' ' + String.fromCodePoint(0x1F3A5);
             break;
            
           case 'image':
             return inih + ' ' + String.fromCodePoint(0x1F5BC,0xFE0F);
             break;
            
           case 'text':
             if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])] == 'text/csv') {
             return inih + ' ' + String.fromCodePoint(0x1F4C8);
             } else {
             return inih + ' ' + String.fromCodePoint(0x1F4C4);
             }
             break;
            
           case 'application':
             if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])] == 'application/pdf') {
             return inih + ' ' + String.fromCodePoint(0x1F5A8,0xFE0F);
             } else if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])].toLowerCase().indexOf('powerpoint') != -1) {
             return inih + ' ' + String.fromCodePoint(0x1F39E,0xFE0F);
             } else if (xtypes[xexts.indexOf('.' + inih.toLowerCase().split('.')[eval(-1 + inih.toLowerCase().split('.').length)])].toLowerCase().indexOf('excel') != -1) {
             return inih + ' ' + String.fromCodePoint(0x1F4C8);
             } else {
             return inih + ' ' + String.fromCodePoint(0x1F4F0);
             }
             break;
             
           default:
             break;
            
         }
      }
    }
    return inih;
  }
  
  function yesh(inval) {
     var outval=inval;
     var outs=inval.split(',');
     for (var ij=0; ij<outs.length; ij++) {
        if (eval('' + commentaries.length) > ij) {
         console.warn('2:' + ij + ' ' + inval);
         console.warn(commentaries);
         if (commentaries[ij] != '') {
          outval=(outval + ' ').replace(outs[ij] + ',', outs[ij] + commentaries[ij] + ',').replace(outs[ij] + ' ', outs[ij] + commentaries[ij] + ' ').replace(/\ $/g,'');
         }
        }
     }
    return outval.trim();
  }
  
  function noh(inval) {
     var outval=inval;
     var outs=inval.split(',');
     for (var ij=0; ij<outs.length; ij++) {
        if (outs[ij].indexOf('#') != -1) {
          outval=outval.replace(outs[ij].substring(outs[ij].indexOf('#')), '');
        }
     }
     return outval;
  }

  function showit(ioi) {
     if (!beforeload) {
     document.getElementById('mymediatr').innerHTML=mytrih;
     if (ioi.outerHTML.indexOf('<span') != -1) {
     outwo(ioi.getAttribute('data-href'));
     } else {
     outwo(ioi.href);
     }
     }
  }

  function hideit(ioi) {
     document.getElementById('mymediatr').innerHTML=mytrih;
  }
  
  function hideitlater(ioi) {
     if (2 == 5) {
     setTimeout(function(){
     document.getElementById('mymediatr').innerHTML=mytrih;
     }, 15000);
     }
  }
   
   
  function outwo(inchk) {
    for (var iut=0; iut<xexts.length; iut++) {
      if ((inchk).toLowerCase().indexOf(xexts[iut]) != -1) {
        if (xtypes[iut].indexOf('pdf') != -1) {
          document.getElementById('mediatable').style.display='block';
    if (document.getElementById('mymediatr').innerHTML.indexOf((inchk)) == -1) {
          document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
          document.getElementById('mypdf').innerHTML='<object data=\"' + (inchk) + '\" type=\"application/pdf\"></object>';
          }
    }
          return 'application/';
        } else if (xtypes[iut].indexOf('image/') != -1) {
          document.getElementById(myt).style.background='url(' + inchk + ')';
          document.getElementById(myt).style.backgroundSize='contain';
          document.getElementById(myt).style.backgroundRepeat='no-repeat';
          document.getElementById(myt).style.backgroundPosition=pos;
          if (document.getElementById('theblank')) { document.getElementById('mediatable').style.display='block'; document.getElementById('theblank').style.display='block'; document.getElementById('theblank').src=inchk; return 'IMAGE/';  }
          return ' ';
        } else if (xtypes[iut].indexOf('video/') != -1) {
          document.getElementById('mediatable').style.display='block';
    if (document.getElementById('mymediatr').innerHTML.indexOf((inchk)) == -1) {
          document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
          document.getElementById('myvideo').innerHTML='<video controls><source type=\"' + xtypes[iut] + '\" src=\"' + (inchk) + '\"></source></video>';
          }
    }
          return 'video/';
        } else if (xtypes[iut].indexOf('audio/') != -1) {
          document.getElementById('mediatable').style.display='block';
    if (document.getElementById('mymediatr').innerHTML.indexOf((inchk)) == -1) {
          document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
          document.getElementById('myaudio').innerHTML='<audio controls><source type=\"' + xtypes[iut] + '\" src=\"' + (inchk) + '\"></source></audio>';
          }
    }
          return 'audio/';
        }
      }
    } 
          document.getElementById('mediatable').style.display='block';
    document.getElementById('mymediatr').innerHTML=mytrih;
          if (!beforeload) {
    document.getElementById('mytext').innerHTML='<iframe frameborder=0 style=width:100%;height:1600px; src=\"' + (inchk) + '\"></iframe>';
          }
    return '';
  }
  
  function getfsub() {
    document.getElementById('offdr').style.width='300px';
    return 'fsub';
  }

  function getid(ofw) {
    if (ofw == 'lefttd') {
      return \"<span title='&lt;-- Folder listing relative to Document Root (brought to you by RJM Programming ... February, 2026) of ...' id=prefix>\" + document.URL.substring(0,8).replace(':','<select ontouchstart=\"thismultiple(this);\" onmouseover=\"thismultiple(this);\" onclick=\"thismultiple(this);\" size=1 id=compsel title=\"Animated slideshow or PDF or PowerPoint or Word or Animated GIF or Video via slides possible selecting multiple images here.\" style=display:inline-block;width:28px; data-onblur=process(this); data-multiple><option value=\"\">&#58;</option></select>') + document.URL.substring(8).split('/')[0] + \"/</span>\" + document.getElementById(ofw).innerHTML.split('</span>')[1];
    }
    return document.getElementById(ofw).innerHTML;
  }
  
  function wbt(tao) {
    //alert(tao.value);
    if (tao) {
     if (!divelem) {
     gtao=tao;
     //document.getElementById('helpout').style.backgroundColor='yellow';
     //document.getElementById('dcont').style.backgroundColor='yellow';
     if (tao.value.trim() != '') {
     divelem = document.getElementById('djc');
     gtao=tao;
     var recto = tao.getBoundingClientRect();
     if (divelem) { // thanks to ideas off http://stackoverflow.com/questions/12266320/copy-div-content-to-textarea-or-text-with-the-same-font-family-style
      divelem.style.display='block'; //'flex';
    //divelem.style.alignItems='flex-end';
      divelem.style.overflowY='scroll';
      //divelem.style.flexFlow='column nowrap';
      divelem.style.flexDirection='column-reverse';
      divelem.style.fontFamily = 'Courier-New'; //window.getComputedStyle(tao,null).fontFamily || tao.style.fontFamily || tao.currentStyle.getCurrentProperty('font-family');
      divelem.style.fontSize = window.getComputedStyle(tao,null).fontSize || tao.style.fontSize || tao.currentStyle.getCurrentProperty('font-size');
      divelem.style.border = window.getComputedStyle(tao,null).border || tao.style.border || tao.currentStyle.getCurrentProperty('border');
      divelem.style.padding = window.getComputedStyle(tao,null).padding || tao.style.padding || tao.currentStyle.getCurrentProperty('padding');
      divelem.style.margin = window.getComputedStyle(tao,null).margin || tao.style.margin || tao.currentStyle.getCurrentProperty('margin');
      divelem.style.overflowX = 'hidden'; //window.getComputedStyle(tao,null).overflow || tao.style.overflow || tao.currentStyle.getCurrentProperty('overflow');
      divelem.style.position='absolute';
      divelem.style.left='' + recto.left + 'px';
      divelem.style.width='' + eval(-20 + recto.width) + 'px';
      divelem.style.height='' + recto.height + 'px';
      divelem.style.top='' + eval(-4 + recto.top) + 'px';
      //alert('' + recto.top + ' ' + recto.height + ' ' + ' ... ' + 'eval(-4 + recto.top + recto.height)=' + eval(-4 + recto.top + recto.height));
      //divelem.style.bottom='' + eval(-4 + recto.top + recto.height) + 'px';
      divelem.style.zIndex='999';
      divelem.style.whiteSpace='pre';
      //divelem.scrollTop=divelem.scrollHeight;
      //setTimeout(function(){ divelem.scrollTop=divelem.scrollHeight; }, 4000);
      tao.style.color='transparent';
      //var contis=massage(tao.value);
      //alert(contis);
      //while (contis.indexOf(String.fromCharCode(10)) != -1) {
      //  contis=contis.replace(String.fromCharCode(10), '<br>');
      //}
      //alert(contis);
      //divelem.innerHTML=contis;
     }
     }
     var taovalue=tao.value.replace(/</g,'&lt;').replace(/>/g,'&gt;');
     while (taovalue.indexOf(String.fromCharCode(10)) != -1) {
      taovalue=taovalue.replace(String.fromCharCode(10),'<br>');
     }
     document.getElementById('djc').innerHTML='<div id=indiv title=\"Report\" style=\"white-space:pre;text-shadow:-0.5px 0.5px 0.5px #ff0000;background: linear-gradient(to right, #e0eafc, #ffffff);\">' + massage(taovalue) + '</div>';
     var sps=document.getElementsByTagName('span');
     for (var isps=0; isps<sps.length; isps++) {
       if (('' + sps[isps].className) == 'sed') {
         //sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerText.toHtmlEntities()).replace(/\%0A$/g,''));
         if (sps[isps].innerHTML.indexOf('   ') == 0) { 
           sps[isps].innerHTML=sps[isps].innerHTML.replace('   ','&nbsp;&nbsp;&nbsp;'); 
           //sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerText.replace('   ','&nbsp;&nbsp;&nbsp;')).replace(/\%0A$/g,''));
           sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerHTML).replace(/\%0A$/g,''));
         } else {
           sps[isps].setAttribute('data-oit', encodeURIComponent(sps[isps].innerText.toHtmlEntities()).replace(/\%0A$/g,''));
         }
       }
     }
     }
    }
    return '';
  }
  
 
function resizeSelect(sel) { // thanks to https://www.google.com/search?q=make+select+element+width+in+sympathy+with+length+of+its+value&rlz=1C5OZZY_en&oq=make+select+element+width+in+sympathy+with+length+of+its+value&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCTI3MzEzajBqNKgCALACAQ&sourceid=chrome&ie=UTF-8
  // 1. Create a temporary span to measure text width
  var tempSpan = document.createElement('span');
  tempSpan.style.visibility = 'hidden';
  tempSpan.style.position = 'absolute';
  tempSpan.style.whiteSpace = 'pre';
  // 2. Set font styles to match the select box
  tempSpan.style.font = window.getComputedStyle(sel).font;
  // 3. Set content to selected text
  tempSpan.innerText = sel.options[sel.selectedIndex].text;
  document.body.appendChild(tempSpan);
  
  // 4. Update width (with extra space for the dropdown arrow)
  sel.style.width = (tempSpan.offsetWidth + 30) + 'px';
  document.body.removeChild(tempSpan);
}

  function leftize() {
  //alert(8);
     if (window.opener) {
  //alert(84);
  if (typeof window.opener.getid == 'function') {
     document.getElementById('lefttd').innerHTML=window.opener.getid('lefttd');
  //alert(document.getElementById('lefttd').innerHTML);
     document.getElementById('midtd').innerHTML=window.opener.getid('midtd');
  //alert(document.getElementById('midtd').innerHTML);
     } else {
     document.getElementById('lefttd').innerHTML=parent.document.getElementById('lefttd').innerHTML.replace(parent.document.getElementById('compsel').outerHTML,':');
     document.getElementById('midtd').innerHTML=parent.document.getElementById('midtd').innerHTML.replace(parent.document.getElementById('compsel').outerHTML,':');
     }
     } else {
  //alert(80);
     document.getElementById('lefttd').innerHTML=parent.document.getElementById('lefttd').innerHTML.replace(parent.document.getElementById('compsel').outerHTML,':');
     document.getElementById('midtd').innerHTML=parent.document.getElementById('midtd').innerHTML.replace(parent.document.getElementById('compsel').outerHTML,':');
     }
     document.getElementById('offdr').value='" . $offdr . "'; 
     document.getElementById('offdr').style.width='" . $fifteen . "px';
     document.getElementById('fsub').name='fsub';
    if (('' + parent.document.URL).indexOf('#offdr=') != -1 && ('' + parent.document.URL).indexOf('#offdr=&') == -1 && ('' + parent.document.URL).indexOf('&done=') == -1) {
     document.getElementById('offdr').value=decodeURIComponent(('' + parent.document.URL).split('#offdr=')[1].split('&')[0]);
     document.getElementById('offdr').style.width='" . $fifteen . "px';
     document.getElementById('fsub').name='fsub';
    } else if (('' + parent.document.URL).indexOf('#offdr=') != -1 && ('' + parent.document.URL).indexOf('#offdr=&') == -1) {
     parent.location.hash+='e';
     document.getElementById('lefttd').innerHTML=parent.document.getElementById('lefttd').innerHTML.replace(parent.document.getElementById('compsel').outerHTML,':');
     document.getElementById('midtd').innerHTML=parent.document.getElementById('midtd').innerHTML.replace(parent.document.getElementById('compsel').outerHTML,':');
     document.getElementById('offdr').value=decodeURIComponent(('' + parent.document.URL).split('#offdr=')[1].split('&')[0]);
    }
     document.getElementById('jc').title=\"" . str_replace("\n","\" + String.fromCharCode(10) + \"",str_replace($_SERVER['DOCUMENT_ROOT'],'',$resis)) . "\"; 
     resizeSelect(document.getElementById('offdr'));
     " . $more . "
     wbt(document.getElementById('jc'));  
     setTimeout(function(){  document.getElementById(mobit('mymediatr')).innerHTML=mytrih;  document.getElementById('mypdf').style.display='table-cell';    beforeload=false; }, 20000);  
     if (needten == 10) { if ('" . $offdr . "' != '') {  if (('' + parent.document.URL).indexOf('&done=ye') == -1) { document.getElementById('fsub').click(); }  } else {  document.body.style.cursor='progress';   monitorsel(); } }
  }
  
  function rez(ota) {
     if (divelem && ota == gtao) { // thanks to ideas off http://stackoverflow.com/questions/12266320/copy-div-content-to-textarea-or-text-with-the-same-font-family-style
//alert(1);
      var recto = gtao.getBoundingClientRect();
      var jrecto = document.getElementById('jcont').getBoundingClientRect();
      var drecto = document.getElementById('dcont').getBoundingClientRect();
//alert(12);
//alert(31);
      if (eval('' + recto.width) > eval('' + drecto.width)) {
//alert(31);
        document.getElementById('dcont').style.width='' + eval(30 + eval('' + recto.width)) + 'px';
      }
       if (eval('' + recto.height) > eval('' + drecto.height)) {
//alert(31);
        document.getElementById('dcont').style.height='' + eval(30 + eval('' + recto.height)) + 'px';
      }
      if (eval('' + recto.width) > eval('' + jrecto.width)) {
//alert(41);
        document.getElementById('jcont').style.width='' + eval(20 + eval('' + recto.width)) + 'px';
      }
      if (eval('' + recto.height) > eval('' + jrecto.height)) {
//alert(41);
        document.getElementById('jcont').style.height='' + eval(20 + eval('' + recto.height)) + 'px';
      }
      divelem.style.left='' + recto.left + 'px';
//alert(41);
      divelem.style.width='' + eval(-20 + recto.width) + 'px';
//alert(51);
      divelem.style.height='' + recto.height + 'px';
//alert(61);
      //divelem.style.top='' + eval(-4 + recto.top) + 'px';
      //divelem.style.bottom='' + eval(-4 + recto.top + recto.height) + 'px';
      divelem.style.zIndex='999';
      divelem.style.whiteSpace='pre';
//alert(71);
      gtao.style.color='transparent';
//alert(81);
     }
  }
  
  function process(osel) {
    if (osel.value != '') {
      //alert('here');
      osel.value='';
    }
  }
  
  function agifit(incsv) {
    hbit=('#' + (document.URL + '#').split('#')[1]).replace(/^\#$/g,'');
    if (incsv == '' && sofarmime.trim() == '') {
      umore='';
    } else if (document.URL.indexOf('?') != -1) {
      umore='&sofarval=' + encodeURIComponent(sofarval) + '&sofarmime=' + encodeURIComponent(sofarmime) + '&needten=10';
    } else {
      umore='?sofarval=' + encodeURIComponent(sofarval) + '&sofarmime=' + encodeURIComponent(sofarmime) + '&needten=10';
    }
    if (incsv == '' && sofarmime.indexOf(',') != -1) {
    ajaxpdfit('');
    if (origprefix != '') {  document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval=''; sofarmime=''; lastretval=''; commentaries=[]; }
    } else if (incsv != '') {
    var myimgs=incsv.split(',');
    if (woo) {
      if (!woo.closed) { woo=woo; } else { woo.close(); woo=null; }
    }
    if (!woo) {
    if (ajaxpdfit(yesh(incsv)) != '') {
    woo=window.open('','_blank','top=50,left=50,width=800,height=800');
    woo.document.write('<ht' + 'ml><he' + 'ad><ti' + 'tle>' + myimgs[0] + '</ti' + 'tle><scr' + 'ipt type=text/javascript> var jimg=0, imgs=(\"' + incsv + '\").split(String.fromCharCode(44)), kimg=eval(\"\" + imgs.length);  function startit() { jimg++; jimg=eval(jimg % kimg);  document.body.style.background=' + \"'url(' + imgs[jimg] + ')'\" + '; document.title=' + \"'' + imgs[jimg] + ''\" + '; document.body.style.backgroundRepeat=\"no-repeat\"; document.body.style.backgroundSize=\"contain\";  } setInterval(startit,4000); </scri' + 'pt></head><body id=xbody style=background:url(' + myimgs[0] + ');background-repeat:no-repeat;background-size:contain;></body></html>');
    }
    if (origprefix != '') {   document.body.style.cursor='pointer';    document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval=''; sofarmime=''; lastretval=''; }
    return woo;
    }
    }
    needten=0;
    return null;
  }
  
  function monitorsel() {
    var yesdo=true;
    var jj=-1;
    if (needten > 10) { setTimeout(monitorsel, 2000);  return ''; }
    var osel=document.getElementById('compsel');
    var retval='', delim='';
    if (sofarval != '') { delim=','; retval=sofarval; }
    for (var i=0; i<osel.length; i++) {  if (osel.options[i].selected) { jj=i; if (osel.options[i].value != '' && ('' + osel.options[i].title + 'x').substring(0,1) != ' ') {  if ((',' + sofarval + ',').indexOf(',' + osel.options[i].value + ',') == -1) { if (osel.options[i].outerHTML.indexOf(' data-mime=') != -1) { sofarmime+=(sofarmime == '' ? '' : ',') + osel.options[i].getAttribute('data-mime');  } else {  sofarmime+=(sofarmime == '' ? '' : ',') + '';  }  retval+=delim + osel.options[i].value; delim=','; document.getElementById('o' + encodeURIComponent(osel.options[i].value)).text+=' ' + String.fromCodePoint(0x2705) + ' ' + retval.split(',').length;   }   } }  }
    //document.title=sofarval + '=sofarval sofarmime=' + sofarmime + ' ' + (jj == -1 ? '' : '?' + osel.options[jj].outerHTML);
    if (document.getElementById('compsel')) {
      if (retval != '') {
       if (retval != '' && retval.indexOf(',') == -1) {
       needten=0;
       }
       if (lastretval != retval) {
       lastretval=retval;
       sofarval=retval;
       needten=0;
       } else if (needten < 10) {
       needten++;
       } else {
       yesdo=false;
       needten++;
       if (agifit(sofarval)) {
       if (origprefix != '') {  document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval='';  sofarmime=''; lastretval=''; }
       }
       }
      //} else {
       //var commadd=prompt('Optionally add to commentary.', '');
      } else if (sofarmime.indexOf(',') != -1 && needten < 10) {
       needten++;
      } else if (sofarmime.indexOf(',') != -1 && needten >= 10) {
       yesdo=false;
       needten++;
       if (agifit(sofarval)) {
       if (origprefix != '') {  document.getElementById('prefix').innerHTML=origprefix; wesayso=true; needten=0; sofarval='';  sofarmime=''; lastretval=''; }
       }
      }
      if (yesdo) { setTimeout(monitorsel, 2000); }
    }
  }
  
  function sharemaybe(inrecp) {
    var andmore=''
    if (inrecp.indexOf(' ') == -1 && inrecp.indexOf('@') > 0) {
      if (umore == '' && document.URL.indexOf('?') == -1 && document.getElementById('offdr').value.trim() != '') {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      } else if (document.getElementById('offdr').value.trim() != '' && (document.URL.indexOf('?') != -1 || umore != '')) {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      }
      document.getElementById('aemail').href='mailto:' + inrecp + '?subject=Document%20Root%20Folder%20Listing&body=' + encodeURIComponent(document.URL.split('#')[0] + umore + andmore + hbit);
      document.getElementById('aemail').click();
      return '';    
    } else if (inrecp.indexOf(' ') == -1 && inrecp.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
      if (umore == '' && document.URL.indexOf('?') == -1 && document.getElementById('offdr').value.trim() != '') {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      } else if (document.getElementById('offdr').value.trim() != '' && (document.URL.indexOf('?') != -1 || umore != '')) {
      andmore+='#offdr=' + encodeURIComponent(document.getElementById('offdr').value) + '&fsub=' + encodeURIComponent(document.getElementById('fsub').value) + '&extbit=' + encodeURIComponent(document.getElementById('extbit').value) + anyway;
      }
      document.getElementById('asms').href='sms:' + inrecp + '&body=' + encodeURIComponent(document.URL.split('#')[0] + umore + andmore + hbit);
      document.getElementById('asms').click();
      return '';    
    }
    return inrecp;
  }
  
  function addcommentary() {
      needten=1;
      var commadd=null;
      if (document.URL.indexOf('//localhost') == -1) {
      commadd=prompt('Optionally add to commentary or email an email address to share via email or mobile number to share via SMS.  For new lines use ~~ characters.  For multiple entries separate by  ,  (ie. two blanks comma two blanks).', '');
      } else {
      commadd=prompt('Optionally add to commentary.  For new lines use ~~ characters.  For multiple entries separate by  ,  (ie. two blanks comma two blanks).', '');
      }
      if (commadd != null) {
        var coms=sharemaybe(commadd).split('  ,  ');
        for (var ic=0; ic<coms.length; ic++) {
         if (coms[ic].trim() != '') {
          commentaries.push('#' + encodeURIComponent(coms[ic]));
         }
        }
      }
  }
  
  function wasthismultiple(osel) {
    if (document.getElementById('lefttd').outerHTML.split('>')[0].indexOf('overflow') == -1 || wesayso) {
    wesayso=false;
    document.getElementById('lefttd').style.overflowY='visible';
    osel.style.height='30px';
    osel.setAttribute('multiple', 'true');
    if (navigator.userAgent.toUpperCase().indexOf('SAFARI') != -1) {
      osel.size=20;
      osel.style.height='100vh';
    }
    setTimeout(monitorsel, 2000);
    }
  }
  
  function thismultiple(osel) {
    if (document.getElementById('lefttd').outerHTML.split('>')[0].indexOf('overflow') == -1 || wesayso) {
    wesayso=false;
    document.getElementById('lefttd').style.overflowY='visible';
    if (navigator.userAgent.toUpperCase().indexOf('CHROME') != -1 || navigator.userAgent.toUpperCase().indexOf('CRIOS') != -1) {
      osel.style.height='30px';
      osel.setAttribute('multiple', 'true');
    } else if (navigator.userAgent.toUpperCase().indexOf('SAFARI') != -1 || navigator.userAgent.toUpperCase().indexOf('FIREFOX') != -1) {
      if (2 == 5) { osel.style.height='30px'; }
    } else {
      osel.style.height='30px';
      osel.setAttribute('multiple', 'true');
    }
    document.getElementById('firsttext').innerHTML=\"&#58;   ... can build up commentary here\";
    setTimeout(monitorsel, 2000);
    }
  }
    
  function massage(tv) {
    var tscnt=0, itv=0, ihis='', uids=[], addthese='';
    var tlls=tv.split('<br>');
    ajaxs=[];
    for (itv=eval(-1 + tlls.length); itv>=0; itv--) {
      if (tlls[itv].indexOf(' /') != -1) {
       if (document.getElementById('prefix') && !document.getElementById('compsel')) {
       if (document.getElementById('prefix').innerHTML.replace('p://','s://').indexOf('s://') != -1) {
         document.getElementById('prefix').innerHTML=document.getElementById('prefix').innerHTML.replace(':','<select ontouchstart=\"thismultiple(this);\" onmouseover=\"thismultiple(this);\" onclick=\"thismultiple(this);\" size=1 id=compsel title=\"Animated slideshow or PDF or PowerPoint or Word or Animated GIF or Video via slides possible selecting multiple images here.\" style=display:inline-block;width:28px; data-onblur=process(this); data-multiple><option id=firsttext onclick=addcommentary(); value=\"\">&#58;</option></select>')
       }
       }
       uids=tlls[itv].split(' /');
       ihis=tlls[itv].replace(tlls[itv].split(' /')[0] + ' ','');
       if (eval('' + uids.length) == 3) {
       ajaxs.unshift('/' + uids[2]);
       //alert('0:' + outwo('/' + uids[2]) + ' ... ' + '/' + uids[2]);
       if (outwo('/' + uids[2]).replace(' ','IMAGE/') == 'IMAGE/') {
                addthese='<option id=\"o' + encodeURIComponent('/' + uids[2]) + '\" title=\"/' + mmmize(uids[2]) + '\" value=\"/' + uids[2] + '\">/' + mmize(uids[2]) + '</option>' + addthese; 
       } else {
                addthese='<option id=\"o' + encodeURIComponent('/' + uids[2]) + '\" title=\"/' + mmmize(uids[2]) + '\" value=\"/' + uids[2] + '\">/' + mmize(uids[2]) + '</option>' + addthese; 
       }
       if (outwo('/' + uids[2]) == 'IMAGE/' && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) { 
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<span id=\"' + encodeURIComponent('/' + uids[2]) + '\" title=\"\" style=text-decoration:underline; onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this); href=# data-href=\"/' + uids[2] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</span>');
       } else {
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<a id=\"' + encodeURIComponent('/' + uids[2]) + '\" title=\"\" target=_blank onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this) href=\"/' + uids[2] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</a>');
       }
       } else {
       ajaxs.unshift(ihis.split('%20-')[0].split(' -')[0]);
       //alert('1:' + outwo((ihis.split('%20-')[0].split(' -')[0])) + ' ... ' + (ihis.split('%20-')[0].split(' -')[0]));
       if (outwo(ihis.split('%20-')[0].split(' -')[0]).replace(' ','IMAGE/') == 'IMAGE/') {
              addthese='<option id=\"o' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"' + mmmize((ihis.split('%20-')[0].split(' -')[0])) + '\" value=\"' + mmize((ihis.split('%20-')[0].split(' -')[0]) + '\">' + (ihis.split('%20-')[0].split(' -')[0])) + '</option>' + addthese; 
       } else {
              addthese='<option id=\"o' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"' + mmmize((ihis.split('%20-')[0].split(' -')[0])) + '\" value=\"' + mmize((ihis.split('%20-')[0].split(' -')[0]) + '\">' + (ihis.split('%20-')[0].split(' -')[0])) + '</option>' + addthese; 
       }
       if (outwo(ihis.split('%20-')[0].split(' -')[0]) == 'IMAGE/' && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) {  
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<span id=\"' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"\" style=text-decoration:underline; onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this); href=# data-href=\"' + ihis.split('%20-')[0].split(' -')[0] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</span>');
       } else {
              tv=tv.replace(tlls[itv].split(' /')[0] + ' ' + ihis, tlls[itv].split(' /')[0] + '&#9;<a id=\"' + encodeURIComponent(ihis.split('%20-')[0].split(' -')[0]) + '\" title=\"\" target=_blank onmouseover=showit(this); onmouseout=hideit(this); ontouchmove=showit(this); ontouchend=hideitlater(this); href=\"' + ihis.split('%20-')[0].split(' -')[0] + '\">' + ihis.split('%20-')[0].split(' -')[0] + '</a>');
       }
       }
      }
    }
    if (addthese != '') {
      //document.getElementById('compsel').innerHTML+=addthese;
      //document.getElementById('compsel').innerHTML=document.getElementById('compsel').innerHTML.split('</option>')[0] + '</option>' + addthese;
      document.getElementById('compsel').innerHTML=document.getElementById('compsel').innerHTML.split('</option>')[0].replace('   ... can build up commentary here','') + '</option>' + addthese;
      origprefix=document.getElementById('prefix').innerHTML; //.replace(' data-multiple', ' multiple data-multiple');
    }
    setInterval(function(){ var onerect=document.getElementById('djc').getBoundingClientRect(), tworect=document.getElementById('jc').getBoundingClientRect();   if (Math.abs(eval(eval(('' + onerect.height) - eval('' + tworect.height)))) > 20) {  document.getElementById('djc').style.height='' + tworect.height + 'px';  document.getElementById('djc').style.width='' + eval(-20 + tworect.width) + 'px'; } }, 6000);
    setTimeout(doajaxs, 1000);
    return tv;
  }
  
 function stateChanged() {
  if (zhr.readyState == 4) {
   if (zhr.status == 200) {
    var rawhtml = zhr.response;
    var spans=rawhtml.split('</span');
    var ps=rawhtml.split('</p');
    if (eval('' + ps.length) == 2 && eval('' + spans.length) == 2) {
      document.getElementById(spans[0].split('>')[eval(-1 + spans[0].split('>').length)]).title+=ps[0].split('>')[eval(-1 + ps[0].split('>').length)];
    }
    setTimeout(doajaxs, 1000);
   }
  }
 }
 
  
 function statePdfChanged() {
  var lastdodah=String.fromCharCode(34);
  var prefis=' data=';
  if (pdfzhr.readyState == 4) {
   if (pdfzhr.status == 200) {
    var rawhtml = pdfzhr.response;
    //alert('2:' + rawhtml);
    var bsixs=rawhtml.split(' ' + prefis + lastdodah);
    if (eval('' + bsixs.length) == 1) {
      bsixs=rawhtml.split(' ' + prefis + '=');
      lastdodah=String.fromCharCode(62);
    }
    if (eval('' + bsixs.length) >= 2) {
    //alert('2:' + bsixs[1].split(lastdodah)[0]);
    if (pdfwoo) {
      if (!pdfwoo.closed) { pdfwoo=pdfwoo; } else { pdfwoo.close(); pdfwoo=null; }
    }
    if (!pdfwoo) {
    //alert('3:' + bsixs[1].split(lastdodah)[0]);
    pdfwoo=window.open(bsixs[1].split(lastdodah)[0],'_blank','top=50,left=150,width=800,height=800');
    //pdfwoo.document.write('<ht' + 'ml><he' + 'ad><ti' + 'tle>Pdf</ti' + 'tle><body><object title=Pdf tyle=application/pdf data=\"' + bsixs[1].split(lastdodah)[0] + '\"></object>" . $afterobject . "</body></html>');
    }
    }
   }
  }
 }
 
 
  function weedoutnonims(ncv) {
    var onetim='';
    var outncv=ncv;
    var blanks='                                                    ';
    var sfs=sofarval.split(','), sfm=sofarmime.toLowerCase().split(',');
    while (eval('' + sfs.length) < eval('' + sfm.length)) {
      sfs.push('');
    }
    while (eval('' + sfm.length) < eval('' + sfs.length)) {
      sfm.push('');
    }
    for (var ig=0; ig<sfs.length; ig++) {
      if (ig == 0) { outncv=''; }
      if (sfm[ig].toLowerCase().indexOf('image/') != -1) {
        if (outncv == '') {
         outncv+='' + sfs[ig];
         if (onetim == '' && sfs[ig] != '') { 
           onetim=',' + sfs[ig] + '#' + sfm[ig];  
         }
        } else {
         outncv+=',' + sfs[ig];
         if (onetim != '' && sfs[ig] != '') { 
           onetim+=',' + sfs[ig] + '#' + sfm[ig];  
         }
        }
      } else if (nonims == '' && sfm[ig] != '') {
        nonims+='' + sfs[ig] + '#' + sfm[ig];
      } else if (sfm[ig] != '') {
        nonims+=',' + sfs[ig] + '#' + sfm[ig];
      }
    }
    if (nonims != '') {
      //if (onetim == '' && outncv != '' && outncv.indexOf(',') == -1) { 
      //  onetim=',' + sfs[ig] + '#' + sfm[ig];  
      //}

      if (nonims.indexOf(',') == -1 || 1 == 1) { nonims+=onetim;  }
      document.getElementById('nonims').value=nonims;
      //document.getElementById('nonimssub').click();
    }
    return outncv;
  }
 
  function ourencodeURIComponent(insrt) {
    if (nonims != '') {
      return encodeURIComponent(insrt) + '&nonims=' + encodeURIComponent(nonims);
    }
    return encodeURIComponent(insrt);
  }
 
  function ajaxpdfit(incv) {
        if (4 == 4) {
        nonims='';
        var anidn='' + incv.replace(/\\\\/g,'/').split(',')[0].split('/')[eval(-1 + incv.replace(/\\\\/g,'/').split(',')[0].split('/').length)].split('.')[0] + '_et-al_' + incv.split(',').length; // + '.pdf';
        if (sofarmime.toLowerCase().replace(/image\//g,'').indexOf('/') != -1) {
        incv=weedoutnonims(incv);
        }
     if (nonims != '') {
      document.getElementById('nonimsname').value=anidn.replace('_et-al_','_et-al_0') + '.cba';
      if (4 == 4) {
    if (newwoo) {
      if (!newwoo.closed) {  newwoo.close(); newwoo=null; } else { newwoo.close(); newwoo=null; }
    }
    //alert(document.getElementById('nonims').value + ' ' + document.getElementById('nonimsname').value);
        newwoo=window.open(document.URL.split('?')[0].split('#')[0] + ('?nonims=' + ourencodeURIComponent(document.getElementById('nonims').value)).replace('?nonims=&','?').split('&nonims=')[0] + '&nonimsname=' + encodeURIComponent(document.getElementById('nonimsname').value) + '&ipis=' + encodeURIComponent('" . server_remote_addr() . "'),'_blank','top=20,left=' + eval(-650 + screen.width) + ',width=650,height=700');
        //document.title='incv=' + incv;
        if (incv == '') {  return '';  }
      } else {
      document.getElementById('nonimssub').click();
      }
    }
   if (pdfwoo) {
      if (!pdfwoo.closed) {  pdfwoo.close(); pdfwoo=null; } else { pdfwoo.close(); pdfwoo=null; }
    }
    if (pptxwoo) {
      if (!pptxwoo.closed) {  pptxwoo.close(); pptxwoo=null; } else { pptxwoo.close(); pptxwoo=null; }
    }
    if (mswoo) {
      if (!mswoo.closed) {  mswoo.close(); mswoo=null; } else { mswoo.close(); mswoo=null; }
    }
    if (gifwoo) {
      if (!gifwoo.closed) {  gifwoo.close(); gifwoo=null; } else { gifwoo.close(); gifwoo=null; }
    }
    if (videowoo) {
      if (!videowoo.closed) {  videowoo.close(); videowoo=null; } else { videowoo.close(); videowoo=null; }
    }
        //incv=incv.replace(/\~\~/g, String.fromCharCode(92) + String.fromCharCode(10)); // new idea
        if (('' + document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(incv) + '&apdfname=' + encodeURIComponent(anidn + '.pdf')).length > 800) {
        pdfzhr = new XMLHttpRequest();
        pdfzform = new FormData();
        pdfzform.append('anidnlist', incv);
        pdfzform.append('anidn', anidn + '.abc');
        //pdfzhr.onreadystatechange=noNeedToHangAround; 
        pdfzhr.open('post', './one_line_find.php', true);
        pdfzhr.send(pdfzform);
        ganidn=anidn;
        gincv=noh(incv); // strips out any hashtagged caption data
        setTimeout(function(){
        pdfwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(gincv) + '&apdfname=' + encodeURIComponent(ganidn + '.pdf'),'_blank','top=20,left=' + eval(-700 + screen.width) + ',width=700,height=700');
        pdfwoo.document.title='PDF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        pptxwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?applist=' + ourencodeURIComponent(gincv) + '&appname=' + encodeURIComponent(ganidn + '.pptx'),'_blank','top=' + eval(-600 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        pptxwoo.document.title='PowerPoint (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        mswoo=window.open(document.URL.split('?')[0].split('#')[0] + '?amslist=' + ourencodeURIComponent(gincv) + '&amsname=' + encodeURIComponent(ganidn + '.docx'),'_blank','top=' + eval(-400 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        mswoo.document.title='Word (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        gifwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?agiflist=' + ourencodeURIComponent(gincv) + '&agifname=' + encodeURIComponent(ganidn + '.gif'),'_blank','top=' + eval(-200 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        gifwoo.document.title='Animated GIF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        videowoo=window.open(document.URL.split('?')[0].split('#')[0] + '?avideolist=' + ourencodeURIComponent(gincv) + '&avideoname=' + encodeURIComponent(ganidn + '.mp4'),'_blank','top=' + eval(-400 + screen.height) + ',left=0,width=300,height=400');
        videowoo.document.title='Video (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        }, 5000);
        } else {
        pdfwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(incv) + '&apdfname=' + encodeURIComponent(anidn + '.pdf'),'_blank','top=20,left=' + eval(-700 + screen.width) + ',width=700,height=700');
        pdfwoo.document.title='PDF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        pptxwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?applist=' + ourencodeURIComponent(incv) + '&appname=' + encodeURIComponent(anidn + '.pptx'),'_blank','top=' + eval(-600 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        pptxwoo.document.title='PowerPoint (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        mswoo=window.open(document.URL.split('?')[0].split('#')[0] + '?amslist=' + ourencodeURIComponent(incv) + '&amsname=' + encodeURIComponent(anidn + '.docx'),'_blank','top=' + eval(-400 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        mswoo.document.title='Word (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        gifwoo=window.open(document.URL.split('?')[0].split('#')[0] + '?agiflist=' + ourencodeURIComponent(incv) + '&agifname=' + encodeURIComponent(anidn + '.gif'),'_blank','top=' + eval(-200 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=300,height=200');
        gifwoo.document.title='Animated GIF (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        videowoo=window.open(document.URL.split('?')[0].split('#')[0] + '?avideolist=' + ourencodeURIComponent(incv) + '&avideoname=' + encodeURIComponent(anidn + '.mp4'),'_blank','top=' + eval(-400 + screen.height) + ',left=0,width=300,height=400');
        videowoo.document.title='Video (if not appearing try Download icon at top right and try opening via Open As from Downloads folder newest file)';
        }
        } else if (4 == 46) {
        document.getElementById('apdflist').value=incv;
        document.getElementById('apdfname').value='pdf' + Math.floor(Math.random() * 19897654) + '.pdf';
        document.getElementById('thepdf').style.display='block';
        document.getElementById('pdfsub').click();
        } else if (4 == 47) {
        document.getElementById('thepdf').style.display='block';
        document.getElementById('thepdf').src=document.URL.split('?')[0].split('#')[0] + '?apdflist=' + ourencodeURIComponent(incv) + '&apdfname=' + encodeURIComponent('pdf' + Math.floor(Math.random() * 19897654) + '.pdf');
        } else {
        pdfzhr = new XMLHttpRequest();
        pdfzform = new FormData();
        pdfzform.append('apdflist', incv);
        pdfzform.append('apdfname', 'pdf' + Math.floor(Math.random() * 19897654) + '.pdf');
        pdfzhr.onreadystatechange=statePdfChanged; 
        pdfzhr.open('post', './one_line_find.php', true);
        pdfzhr.send(pdfzform);
        }
        return ' ';
  }
  
  function doajaxs() {
    var nexttogo='';
    for (var ii=0; ii<ajaxs.length; ii++) {
      if (nexttogo == '' && ajaxs[ii] != '') {
        nexttogo=ajaxs[ii];
        ajaxs[ii]='';
      }
    }
    if (nexttogo != '') {
        zhr = new XMLHttpRequest();
        zform = new FormData();
        zform.append('ajaxid', encodeURIComponent(nexttogo));
        zform.append('ajaxurl', nexttogo);
        zhr.onreadystatechange=stateChanged; 
        zhr.open('post', './one_line_find.php', true);
        zhr.send(zform);
    }
  }
  
  function mobit(inid) {
    if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && 1 == 1) {  
      document.getElementById('myimg').innerHTML='<iframe frameborder=0 name=theblank id=theblank style=display:none;height:1600px; src=/About_Us.html></iframe>';
      myt='mymediatr'; theblank='theblank'; 
    }
    return inid;
  }

</scr" . "ipt>
</head>
<body id=xbody onload=\" mytrih=document.getElementById(mobit('mymediatr')).innerHTML;  document.getElementById('mypdf').style.display='none'; leftize();\" title='Folder listing relative to Document Root (brought to you by RJM Programming ... February, 2026)'>
<form id=myform onsubmit=\"if ('' + parent.document.URL).indexOf('&done=ye') != -1) { return false; }  document.getElementById('myform').style.display='none'; document.getElementById('myif').style.display='block'; return true; \" method=POST target=myif action='./one_line_find.php" . $qs . "'>
<table id=mytable style=width:100%;>
<tr id=mytr><td id=righttd style=width:" . $forty . "%;><textarea style=width:100%;background-color:yellow; placeholder='Folder listing of ...' rows=1 cols=120 id=jc>" . $resis . "</textarea><div title='Folder listing of ...' id=djc onmousemove=rez(this);></div></td><td id=lefttd style=vertical-align:top;text-align:right;></td><td id=midtd style=vertical-align:top;></td></tr>
</table>
<input type=submit style=display:none; id=fsub value=" . $fifteen . "></input>
</form>
<iframe scrolling=yes frameborder=0 name=myif id=myif src=/About_Us.html style=display:none;width:100%;height:80px;overflow-y:visible;></iframe>
<table id=mediatable style=width:100%;display:none;height:1800px;>
<tr id=mymediatr><td id=myvideo></td><td id=myaudio></td><td id=mypdf></td><td id=mytext></td><td id=myimg></td></tr>
</table>
<form style=display:none; id=pdfform method=POST action=./one_line_find.php target=thepdf><input type=hidden id=apdflist name=apdflist value=''></input><input type=hidden id=apdfname name=apdfname value=''></input><input type=hidden id=dname name=dname value=''></input><input style=display:none; type=submit value=Submit id=pdfsub></input></form>
<iframe scrolling=yes frameborder=0 name=thepdf id=thepdf src=/About_Us.html style=display:none;width:100%;height:800px;overflow-y:visible;></iframe>
<form style=display:none; id=nonimsform method=POST action=./one_line_find.php target=nonimsif><input type=hidden id=nonims name=nonims value=''></input><input type=hidden id=nonimsname name=nonimsname value=''></input><input style=display:none; type=submit value=Submit id=nonimssub></input></form>
<iframe scrolling=yes frameborder=0 name=nonimsif id=nonimsif src=/About_Us.html style=display:none;width:100%;height:800px;overflow-y:visible;></iframe>
<a target=_top id=aemail style=display:none; href='mailto:?subject=Document%20Root%20Folder%20Listing'>Email</a><a target=_top id=asms style=display:none; href='sms:&body='>SMS</a>
</body>
</html>";
?>