<?php
// recipe_helper.php
// RJM Programming
// September, 2024
error_reporting(E_ERROR | E_PARSE);

$hashurl=explode('#',explode('?', 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'])[0])[0] . '?rand=' . rand(6754,786754546);
$hashurld="";
$sharestr='';
$vertif='</tr><tr>';

function server_remote_addr() {
    $rma = $_SERVER['REMOTE_ADDR'];
    if (1 == 2) {
    $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 str_replace(":", "_", $rma);
}

function oururldecode($inth) {
  return str_replace(".+Z",". \nZ",str_replace(". Z",". \nZ",str_replace(".+Y",". \nY",str_replace(". Y",". \nY",str_replace(".+X",". \nX",str_replace(". X",". \nX",str_replace(".+W",". \nW",str_replace(". W",". \nW",str_replace(".+V",". \nV",str_replace(". V",". \nV",str_replace(".+U",". \nU",str_replace(". U",". \nU",str_replace(".+T",". \nT",str_replace(". T",". \nT",str_replace(".+S",". \nS",str_replace(". S",". \nS",str_replace(".+R",". \nR",str_replace(". R",". \nR",str_replace(".+Q",". \nQ",str_replace(". Q",". \nQ",str_replace(".+P",". \nP",str_replace(". P",". \nP",str_replace(".+O",". \nO",str_replace(". O",". \nO",str_replace(".+N",". \nN",str_replace(". N",". \nN",str_replace(".+M",". \nM",str_replace(". M",". \nM",str_replace(".+L",". \nL",str_replace(". L",". \nL",str_replace(".+K",". \nK",str_replace(". K",". \nK",str_replace(".+J",". \nJ",str_replace(". J",". \nJ",str_replace(".+I",". \nI",str_replace(". I",". \nI",str_replace(".+H",". \nH",str_replace(". H",". \nH",str_replace(".+G",". \nG",str_replace(". G",". \nG",str_replace(".+F",". \nF",str_replace(". F",". \nF",str_replace(".+E",". \nE",str_replace(". E",". \nE",str_replace(".+D",". \nD",str_replace(". D",". \nD",str_replace(".+C",". \nC",str_replace(". C",". \nC",str_replace(".+B",". \nB",str_replace(". B",". \nB",str_replace(".+A",". \nA",str_replace(". A",". \nA",str_replace('>','" . chr(62) . "',str_replace('<','" . chr(60) . "',   str_replace("$",'" . chr(36) . "',str_replace("\n",'" . chr(10) . "',str_replace('"','" . chr(34) . "',urldecode($inth))))   )))) ))))))))))))))))))))))))))))))))))))))))))))))))));
}

$dttmid='';
$downloaddefname='';
$results='';
$interimtitle='My Steps';
$dtitle="Overall instructions, perhaps incorporating a title='[Iframe Save As downloading default name basis]' and first URL can be a node with a link, can be typed here after you double click on border to clear the contents.";
$origdt=$dtitle;
if (isset($_POST['dtitle']) || isset($_GET['dtitle'])) {
  $dtitle=(isset($_POST['dtitle']) ? str_replace('+',' ',urldecode($_POST['dtitle'])) : '') . (isset($_GET['dtitle']) ? str_replace('+',' ',urldecode($_GET['dtitle'])) : '');
  if (isset($_POST['dtitle'])) {
   $hashurld.='#dtitle=' . $_POST['dtitle'];
  } else if (isset($_GET['dtitle'])) {
   $hashurld.='#dtitle=' . $_GET['dtitle'];
  }
  $dtt="\n/* " . str_replace("\n","~~",str_replace('*/','  ',str_replace('/*','  ',$dtitle))) . " */\n";
  if (strpos($dtt, 'title="') !== false) {
  $interimtitle=explode('"',explode('title="', $dtt)[1])[0];
  if (strpos($dtitle, 'http') !== false) {
  $dttmid="\n\$attr = array(
     'URL' => 'http" . str_replace("\r","",str_replace("\n","",explode("~~",explode("\\n",explode("\n",explode('"',explode("'",explode('>',explode(' ',explode('http', $dtitle)[1])[0])[0])[0])[0])[0])[0])[0])) . "',
     'shape' => 'box'
);\n\n\$gv->addNode('" . str_replace("'","`",$interimtitle) . "' , \$attr); \n\n";
  } else if (strpos($dtitle, 'HTTP') !== false) {
  $dttmid="\n\$attr = array(
     'URL' => 'HTTP" . str_replace("\r","",str_replace("\n","",explode("~~",explode("\\n",explode("\n",explode('"',explode("'",explode('>',explode(' ',explode('HTTP', $dtitle)[1])[0])[0])[0])[0])[0])[0])[0])) . "',
     'shape' => 'box'
);\n\n\$gv->addNode('" . str_replace("'","`",$interimtitle) . "' , \$attr); \n\n";
  }
  $downloaddefname=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "recipe_helper_" . str_replace(' ','_',explode('"',explode('title="', $dtt)[1])[0]) . '.php';
  if (file_exists($downloaddefname)) {
    $downloaddefname='';
  }
  
  } else if (strpos($dtt, "title='") !== false) {
  $interimtitle=explode("'",explode("title='", $dtt)[1])[0];
  if (strpos($dtitle, 'http') !== false) {
  $dttmid="\n\$attr = array(
     'URL' => 'http" . str_replace("\r","",str_replace("\n","",explode("~~",explode("\\n",explode("\n",explode('"',explode("'",explode('>',explode(' ',explode('http', $dtitle)[1])[0])[0])[0])[0])[0])[0])[0])) . "',
     'shape' => 'box'
);\n\n\$gv->addNode('" . str_replace("'","`",$interimtitle) . "' , \$attr); \n\n";
  } else if (strpos($dtitle, 'HTTP') !== false) {
  $dttmid="\n\$attr = array(
     'URL' => 'HTTP" . str_replace("\r","",str_replace("\n","",explode("~~",explode("\\n",explode("\n",explode('"',explode("'",explode('>',explode(' ',explode('HTTP', $dtitle)[1])[0])[0])[0])[0])[0])[0])[0])) . "',
     'shape' => 'box'
);\n\n\$gv->addNode('" . str_replace("'","`",$interimtitle) . "' , \$attr); \n\n";
  }
  $downloaddefname=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "recipe_helper_" . str_replace(' ','_',explode("'",explode("title='", $dtt)[1])[0]) . '.php';
  if (file_exists($downloaddefname)) {
    $downloaddefname='';
  }
  } else if (strpos($dtt, "title=") !== false) {
  $interimtitle=explode(">",explode(" ",explode("title=", $dtt)[1])[0])[0];
  if (strpos($dtitle, 'http') !== false) {
  $dttmid="\n\$attr = array(
     'URL' => 'http" . str_replace("\r","",str_replace("\n","",explode("~~",explode("\\n",explode("\n",explode('"',explode("'",explode('>',explode(' ',explode('http', $dtitle)[1])[0])[0])[0])[0])[0])[0])[0])) . "',
     'shape' => 'box'
);\n\n\$gv->addNode('" . str_replace("'","`",$interimtitle) . "' , \$attr); \n\n";
  } else if (strpos($dtitle, 'HTTP') !== false) {
  $dttmid="\n\$attr = array(
     'URL' => 'HTTP" . str_replace("\r","",str_replace("\n","",explode("~~",explode("\\n",explode("\n",explode('"',explode("'",explode('>',explode(' ',explode('HTTP', $dtitle)[1])[0])[0])[0])[0])[0])[0])[0])) . "',
     'shape' => 'box'
);\n\n\$gv->addNode('" . str_replace("'","`",$interimtitle) . "' , \$attr); \n\n";
  }
  $downloaddefname=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "recipe_helper_" . str_replace(' ','_',explode(">",explode(" ",explode("title=", $dtt)[1])[0])[0]) . '.php';
  if (file_exists($downloaddefname)) {
    $downloaddefname='';
  }
  }


}

$base_recipe="";
$morerecs="";
$newedge="\$gv->addEdge(array(\"\" => \"\")); \n";
$tmpphpname='/tmp/recipe_' . server_remote_addr() . ".php";

if (isset($_POST['step1'])) {
$base_recipe="
<?php
require_once 'Image/GraphViz.php';
error_reporting(E_ERROR | E_PARSE); " . $dtt . "

\$gv = new Image_GraphViz(); " . $dttmid . "
\$gv->addEdge(array(\"" . (isset($_POST['step1']) ? str_replace('+',' ',oururldecode($_POST['step1'])) : '') . "\" => \"" . (isset($_POST['step2']) ? str_replace('+',' ',oururldecode($_POST['step2'])) : '') . "\"));\n" . $morerecs . "\n
\$gv->image();
?>";
  $hashurl.='#step1=' . $_POST['step1'];
  if (isset($_POST['step2'])) {
   $hashurl.='#step2=' . $_POST['step2'];
  } 
} else if (isset($_GET['step1'])) {
$base_recipe="
<?php
require_once 'Image/GraphViz.php';
error_reporting(E_ERROR | E_PARSE); " . $dtt . "

\$gv = new Image_GraphViz(); " . $dttmid . "
\$gv->addEdge(array(\"" . (isset($_GET['step1']) ? str_replace('+',' ',oururldecode($_GET['step1'])) : '') . "\" => \"" . (isset($_GET['step2']) ? str_replace('+',' ',oururldecode($_GET['step2'])) : '') . "\"));\n" . $morerecs . "\n
\$gv->image();
?>";
  $hashurl.='#step1=' . $_GET['step1'];
  if (isset($_GET['step2'])) {
   $hashurl.='#step2=' . $_GET['step2'];
  }
}

$three=3;
while (isset($_POST['step' . $three])) {
 $hashurl.='#step' . $three . '=' . $_POST['step' . $three];
 if (strlen(trim( (isset($_POST['step' . (-1 + $three)]) ? str_replace('+',' ',oururldecode($_POST['step' . (0 + $three)])) : '') )) > 0) {
 $amore="\$gv->addEdge(array(\"" . (isset($_POST['step' . (-1 + $three)]) ? str_replace('+',' ',oururldecode($_POST['step' . (-1 + $three)])) : '') . "\" => \"" . (isset($_POST['step' . (0 + $three)]) ? str_replace('+',' ',oururldecode($_POST['step' . (0 + $three)])) : '') . "\"));\n";
 if (strpos($amore, '""') === false) {
 $morerecs.=$amore;
 }
 $base_recipe="
<?php
require_once 'Image/GraphViz.php';
error_reporting(E_ERROR | E_PARSE); " . $dtt . "

\$gv = new Image_GraphViz(); " . $dttmid . "
\$gv->addEdge(array(\"" . (isset($_POST['step1']) ? str_replace('+',' ',oururldecode($_POST['step1'])) : '') . "\" => \"" . (isset($_POST['step2']) ? str_replace('+',' ',oururldecode($_POST['step2'])) : '') . "\"));\n" . $morerecs . "\n
\$gv->image();
?>";
 }
 $three++;
}
$three=3;
while (isset($_GET['step' . $three])) {
 $hashurl.='#step' . $three . '=' . $_GET['step' . $three];
 if (strlen(trim( (isset($_GET['step' . (-1 + $three)]) ? str_replace('+',' ',oururldecode($_GET['step' . (0 + $three)])) : '') )) > 0) {
 $amore="\$gv->addEdge(array(\"" . (isset($_GET['step' . (-1 + $three)]) ? str_replace('+',' ',oururldecode($_GET['step' . (-1 + $three)])) : '') . "\" => \"" . (isset($_GET['step' . (0 + $three)]) ? str_replace('+',' ',oururldecode($_GET['step' . (0 + $three)])) : '') . "\"));\n";
 if (strpos($amore, '""') === false) {
 $morerecs.=$amore;
 }
 $base_recipe="
<?php
require_once 'Image/GraphViz.php';
error_reporting(E_ERROR | E_PARSE); " . $dtt . "

\$gv = new Image_GraphViz(); " . $dttmid . "
\$gv->addEdge(array(\"" . (isset($_GET['step1']) ? str_replace('+',' ',oururldecode($_GET['step1'])) : '') . "\" => \"" . (isset($_GET['step2']) ? str_replace('+',' ',oururldecode($_GET['step2'])) : '') . "\"));\n" . $morerecs . "\n
\$gv->image();
?>";
 }
 $three++;
}

if ($base_recipe != '') {

if (file_exists($tmpphpname)) {
  exec('rm -f ' . $tmpphpname);
  if (file_exists($tmpphpname)) {
  unlink($tmpphpname);
  }
}
file_put_contents($tmpphpname, $base_recipe);
exec('chmod 777 ' . $tmpphpname . ' ; chgrp rjmprogr ' . $tmpphpname . ' ; chown rjmprogr ' . $tmpphpname);
if (!file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . basename($tmpphpname))) {
  exec('ln -s ' . $tmpphpname . ' ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . basename($tmpphpname));
}

if (1 == 1) {
if ($downloaddefname != '') {
  exec('ln -s ' . $tmpphpname . ' ' . $downloaddefname);
  if (file_exists($downloaddefname)) {
    $results='<iframe style=width:100%;height:100%; src="/' . basename($downloaddefname) . '"></iframe>';
  } else {
    $results='<iframe style=width:100%;height:100%; src="/' . basename($tmpphpname) . '"></iframe>';
  }
} else {
  $results='<iframe style=width:100%;height:100%; src="/' . basename($tmpphpname) . '"></iframe>';
}
} else {
header('Location: /' . basename($tmpphpname));
exit;
}
}

if ($results == '') {
  if (file_exists('/tmp/' . basename($tmpphpname))) {
    $phpcont=file_get_contents('/tmp/' . basename($tmpphpname));
    if (strpos($phpcont, "\n/* ") !== false && $origdt == $dtitle) {
      $dtitle=str_replace("~~","\n",explode("\n", explode(" */", explode("\n/* ", $phpcont)[1])[0])[0]);
    } else if (strpos($phpcont, "\n// ") !== false && $origdt == $dtitle) {
      $dtitle=str_replace("~~","\n",explode("\n", explode("\n// ", $phpcont)[1])[0]);
    } 
    $results='<iframe title="' . $dtitle . '" style=width:100%;height:100%; src="/' . basename($tmpphpname) . '"></iframe>';
  } else {
    $results='<iframe title="' . $dtitle . '" style=width:100%;height:100%; src="/simple_recipe.php"></iframe>';
  }
}


echo "<html>
<head>
<title>My Recipe Steps - RJM Programming - September, 2024</title>
<style>
  th { vertical-align: top; }
  #results {  border-left:3px solid yellow; border-top:3px solid yellow;  border-bottom:3px solid yellow; overflow: scroll; text-align: left;  }
</style>
<scr" . "ipt type=text/javascript>
  var templtd='';
  var thesteps=[];
  var anyhashes='';
  var aone=1;
  var tdc=0;

function emailit() {
   var em=prompt('Please enter Email address to share with.', '');
   if (em == null) { em=''; }
   if (em.trim() != '') {
     if (em.trim() != '') {
     em+='?subject=Steps&body=' + encodeURIComponent(\"" . $hashurl . $hashurld . "\" + anyhashes);
     document.getElementById('dimap').innerHTML=\"<a style=display:none; id=theaemail target=_blank href='mailto:\" + em + \"'>Email</a>\";
     document.getElementById('theaemail').click();
     }
   }
   return false;

}


function smsit() {
   var em=prompt('Please enter SMS number to share with.', '');
   if (em == null) { em=''; }
   if (em.trim() != '') {
     if (em.trim() != '') {
     em+='&body=' + encodeURIComponent(\"" . $hashurl . $hashurld . "\" + anyhashes);
     document.getElementById('dimap').innerHTML=\"<a style=display:none; id=theasms target=_blank href='sms:\" + em + \"'>SMS</a>\";
     document.getElementById('theasms').click();
     }
   }
   return false;
}

  function danalyze(dio) {
    if (dio.innerHTML.indexOf('<iframe') != 0) {
    document.getElementById('therest').name='dtitle';
    document.getElementById('therest').value='' + dio.innerText; //(dio.innerText | dio.contentWindow | dio.contentDocument);
    anyhashes=anyhashes.replace('dtitle=', 'dtiOLDtle=') + '#dtitle=' + encodeURIComponent(dio.innerText);
    }
  }

  function obl(tdio, viahash) {
    var ij=0;
    var thisi=eval(('' + tdio.id).replace('tdi',''));
    var arrtd=document.getElementsByTagName('input');
    arrtd=document.getElementsByTagName('textarea');
    var tarrtd=document.getElementsByTagName('td');
    tdc=eval('' + tarrtd.length);
    if (tdio.value.trim() == '') {  return ''; }
    if (!viahash) {
    //alert('anyhashes=' + anyhashes + ' will become ' + anyhashes.replace('step' + thisi + '=', 'steOLDp' + thisi + '=') + '#step' + thisi + '=' + encodeURIComponent(tdio.value));
    anyhashes=anyhashes.replace('step' + thisi + '=', 'steOLDp' + thisi + '=') + '#step' + thisi + '=' + encodeURIComponent(tdio.value);
    }
    //alert(tdio.value.indexOf(String.fromCharCode(10)));
    thesteps=[];
    for (ij=0; ij<tarrtd.length; ij++) {
      thesteps.push('' + arrtd[ij].value);
      //console.log(thesteps);
    }
    //if (thisi != tdc && thisi > 1) { alert('thisi=' + thisi + ' and tdc=' + tdc); } 
    if (thisi == tdc) {
    //if (thisi == tdc && thisi > 1) { alert('thisI=' + thisi + ' and tdC=' + tdc); } 
      //document.getElementById('myrec').innerHTML+=templtd.replace(/td1/g, 'td' + eval(1 + tdc)).replace(/tdi1/g, 'tdi' + eval(1 + tdc)).replace(/tep1/g, 'tep' + eval(1 + tdc)) + '" . $vertif . "';
      document.getElementById('mytable').innerHTML+=templtd.replace(/td1/g, 'td' + eval(1 + tdc)).replace(/tdi1/g, 'tdi' + eval(1 + tdc)).replace(/tep1/g, 'tep' + eval(1 + tdc)) + '" . $vertif . "';
      //alert('templtd=' + templtd + ' ' + document.getElementById('myrec').innerHTML);
      for (ij=1; ij<=tarrtd.length; ij++) {
        //alert('ij=' + ij + ' and thesteps[eval(-1 + ij)]=' + thesteps[eval(-1 + ij)]);
        if (eval(-1 + ij) < thesteps.length) {
          document.getElementById('tdi' + ij).value=('' + thesteps[eval(-1 + ij)]).replace(/^undefined/g, '');
        }
      }
      if (!viahash) {
      setTimeout(function() {
      if ( document.getElementById('tdi' + eval(1 + tdc))) {
      document.getElementById('tdi' + eval(1 + tdc)).focus();
      } else {
      document.getElementById('tdi' + eval(0 + tdc)).focus();
      }
      }, 3000);
      } else {
      if ( document.getElementById('tdi' + eval(1 + tdc))) {
      document.getElementById('tdi' + eval(1 + tdc)).focus();
      } else {
      document.getElementById('tdi' + eval(0 + tdc)).focus();
      }
      }
    }
    return true;
  }
  
  function checkforlh() {
    aone=1;
    if (('' + location.hash.indexOf('dtitle')) != -1) {
    if (('' + location.hash.indexOf('dtitle=')) != -1) {
      document.getElementById('therest').value=decodeURIComponent(('' + location.hash).split('dtitle=')[1].split('#')[0].split(encodeURIComponent('#'))[0]);
      document.getElementById('therest').name='dtitle';
    } else if (('' + location.hash.indexOf('dtitle' + encodeURIComponent('='))) != -1) {
      document.getElementById('therest').value=decodeURIComponent(('' + location.hash).split('dtitle' + encodeURIComponent('='))[1].split('#')[0].split(encodeURIComponent('#'))[0]);
      document.getElementById('therest').name='dtitle';
    }
    }
    var retv='';
    while (('' + location.hash.indexOf('step' + aone)) != -1) {
    if (('' + location.hash.indexOf('step' + aone + '=')) != -1) {
    if (aone <= 1) {
    document.getElementById('tdi' + aone).value=decodeURIComponent(('' + location.hash).split('step' + aone + '=')[1].split('#')[0].split(encodeURIComponent('#'))[0]);
    } else {
    document.getElementById('tdi' + aone).value=decodeURIComponent(('' + location.hash).split('step' + aone + '=')[1].split('#')[0].split(encodeURIComponent('#'))[0]);
    obl(document.getElementById('tdi' + aone), true); //document.getElementById('tdi' + aone).blur();
    if ( document.getElementById('tdi' + eval(1 + aone))) {
      document.getElementById('tdi' + eval(1 + aone)).focus();
    } 
    }
    } else if (('' + location.hash.indexOf('step' + aone + encodeURIComponent('='))) != -1) {
    if (aone <= 1) {
    document.getElementById('tdi' + aone).value=decodeURIComponent(('' + location.hash).split('step' + aone + encodeURIComponent('='))[1].split('#')[0].split(encodeURIComponent('#'))[0]);
    } else {
    document.getElementById('tdi' + aone).value=decodeURIComponent(('' + location.hash).split('step' + aone + encodeURIComponent('='))[1].split('#')[0].split(encodeURIComponent('#'))[0]);
    obl(document.getElementById('tdi' + aone), true); //document.getElementById('tdi' + aone).blur();
    if ( document.getElementById('tdi' + eval(1 + aone))) {
      document.getElementById('tdi' + eval(1 + aone)).focus();
    } 
    }
    }
    aone++;
    }
    if (aone > 1 || document.getElementById('therest').value != '') { anyhashes=('' + location.hash).replace(/\%23/g,'#'); setTimeout(function(){ if (confirm('Draw now (versus add more yourself)?') == true) { document.getElementById('mysub').click(); } }, 8000); }
  }
  

</scr" . "ipt>
</head>
<body title=\"" . $dtitle . "\" onload=\" templtd=document.getElementById('td1').outerHTML; checkforlh();  if (window.parent == window.self) { document.getElementById('tdi' + aone).focus(); }   \">
<h1>My Recipe Steps <a id=pemail title='Email now or later'  class=share  onclick='return emailit();' style='text-decoration:none;cursor:pointer;'>&#128231;</a>&nbsp;<a id=psms title='SMS now or later'  class=share  onclick='return smsit();' style='text-decoration:none;cursor:pointer;'>&#128223;</a></h1>
<h3>RJM Programming - September, 2024</h3><br>
<table style=width:100%;height:80%;><tr><th style=width:80%;>
<div ondblclick=\"this.innerHTML='';\" onblur=danalyze(this); contenteditable=true title=\"" . $dtitle . "\" style=\"display:block;width:100%;height:100%;\" id=results>" . $results . "</div><br></th><th style='background-color:rgb(240,240,240);'><br>
<form id=myform method=POST action='./recipe_helper.php'>
<button onmousedown=\" document.getElementById('mysub').click(); \" ontouchdown=\" document.getElementById('mysub').click(); \" data-value=Draw style=background-color:pink;>Draw</button>
<table cellpadding=3 cellspacing=3 style=width:100%;height:100%; id=mytable>
<tr id=myrec><td id=td1><textarea tabindex=0 onblur=obl(this,false); data-type=text value='' id=tdi1 name=step1 placeholder='Step1'></textarea></td>" . $vertif . "<td id=td2><textarea tabindex=0 onblur=obl(this,false); data-type=text value='' id=tdi2 name=step2 placeholder='Step2'></textarea></td>" . $vertif . "</tr>
</table><input type=hidden id=therest value=''></input><input type=submit value=Draw id=mysub style=display:none;></input></form><br><br></th></tr></table><br><br>
<div id=dimap style=display:none;></div>
</body>
</html>";



?>
