-'; $minus='-'; $plus='-'; $minus='-'; $yes='n'; $fmt='svg'; $mode='Digraph'; $shape=''; $fsize=''; $bcol='lightblue2'; $bbcol='#aed8e8'; $newt=''; $newablzero='My%20Family%20Tree'; $outfn=''; $gv='.gv.'; $addimg=''; function plusdata($aig) { $outig=$aig; $dlm='"'; $outgs=explode('data:', $aig); if (sizeof($outgs) > 1) { $outig=$outgs[0]; $dlm=substr($outig,-1,1); for ($iop=1; $iopBox Polygon Ellipse Oval Circle Point Egg Triangle Plaintext Plain Diamond Trapezium Parallelogram House Pentagon Hexagon Septagon Octagon Doublecircle Doubleoctagon Tripleoctagon Invtriangle Invtrapezium Invhouse Mdiamond Wsquare Mcircle Rect Rectangle Square Star None Underline Cylinder Note Tab Folder Box3d Component Promoter Cds Terminator Utr Primersite Restrictionsite Fivepoverhang Threepoverhang Noverhang Assembly Signature Insulator Ribosite Rnastab Proteasesite Proteinstab Rpromoter Rarrow Larrow Lpromoter"); $pyprefix=''; $pymidbit=''; $pysuffix=''; function server_remote_addr() { $rma = $_SERVER['REMOTE_ADDR']; return str_replace('.','_',$rma); } if (!isset($_POST['one']) && !isset($_POST['two']) && !isset($_POST['three']) && !isset($_POST['original'])) { $yes='y'; $newabl[1]=''; $newabl[2]=''; $newabl[3]=''; $_POST['one']=$newabl[1]; $_POST['two']=$newabl[2]; $_POST['three']=$newabl[3]; } else { $plus='+'; $minus='-'; } if (isset($_POST['title'])) { $newabl[0]=trim(str_replace('+',' ',urldecode($_POST['title']))); $newablzero=str_replace('+','%20',urlencode($newabl[0])); } else if (!isset($_POST['original'])) { $_POST['title']=$newabl[0]; } if (strpos($newabl[0], 'amily') !== false) { $parts=explode('-',str_replace('_','-',$newabl[0])); $newt=''; for ($iy=0; $iy> " . $prefix . "family_tree.good 2>> " . $prefix . "family_tree.bad \nln -s " . $prefix . "doctest-output" . DIRECTORY_SEPARATOR . $newabl[0] . ".gv.pdf " . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "doctest-output" . DIRECTORY_SEPARATOR . $newabl[0] . ".gv.pdf \nrm -f " . $prefix . "family_tree_" . $suffix . ".py \nrm -f " . $prefix . "family_tree_" . $suffix . ".ksh \nexit"); file_put_contents($prefix . 'family_tree_' . $suffix . '.ksh', "#!/bin/ksh\n/usr/bin/python3 " . $prefix . "family_tree_" . $suffix . ".py >> " . $prefix . "family_tree.good 2>> " . $prefix . "family_tree.bad \nsleep 5\n\n/usr/bin/python3 " . $prefix . "family_tree_" . $suffix . ".py >> " . $prefix . "family_tree.good 2>> " . $prefix . "family_tree.bad \n\nrm -f " . $prefix . "family_tree_" . $suffix . ".py \nrm -f " . $prefix . "family_tree_" . $suffix . ".ksh \nexit"); //file_put_contents($prefix . 'family_tree0_' . $suffix . '.ksh', "#!/bin/ksh\n/usr/bin/python3 " . $prefix . "family_tree_" . $suffix . ".py >> " . $prefix . "family_tree.good 2>> " . $prefix . "family_tree.bad \nsleep(5)\n\n/usr/bin/python3 " . $prefix . "family_tree_" . $suffix . ".py >> " . $prefix . "family_tree.good 2>> " . $prefix . "family_tree.bad \n\n\nrm -f " . $prefix . "family_tree_" . $suffix . ".py \nrm -f " . $prefix . "family_tree_" . $suffix . ".ksh \nexit"); exec('chmod 777 ' . $prefix . 'family_tree_' . $suffix . '.ksh'); exec('chown root ' . $prefix . 'family_tree_' . $suffix . '.ksh'); exec('chgrp root ' . $prefix . 'family_tree_' . $suffix . '.ksh'); while (file_exists($prefix . 'family_tree_' . $suffix . '.ksh')) { sleep(10); } } else { file_put_contents('/tmp/family_tree.py', $pycont); exec('chmod 777 ' . '/tmp/family_tree.py'); exec('chown rjmprogr ' .'/tmp/family_tree.py'); exec('chgrp rjmprogr ' . '/tmp/family_tree.py'); //if (file_exists('doctest-output' . DIRECTORY_SEPARATOR . $newabl[0] . '.gv.pdf')) { //exec('rm -f ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . '.gv.pdf'); //exec('rm -f ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . '.gv'); //unlink('doctest-output' . DIRECTORY_SEPARATOR . $newabl[0] . '.gv.pdf'); //unlink('doctest-output' . DIRECTORY_SEPARATOR . $newabl[0] . '.gv'); //} exec('/usr/bin/python3 /tmp/family_tree.py > family_tree.good 2> family_tree.bad'); sleep(8); //if (file_exists($prefix . 'doctest-output' . DIRECTORY_SEPARATOR . $newabl[0] . '.gv.pdf')) { //exec('ln -s ' . $prefix . 'doctest-output' . DIRECTORY_SEPARATOR . $newabl[0] . '.gv.pdf ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'doctest-output' . DIRECTORY_SEPARATOR . $newabl[0] . '.gv.pdf'); //} } } else { exec('/usr/bin/python3 family_tree.py'); sleep(8); } if (ourfile_exists($prefix . 'doctest-output' . DIRECTORY_SEPARATOR . $newabl[0] . '.gv.' . $fmt)) { exec('chmod 777 ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . $gv . $fmt); exec('chmod 777 ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . '.gv'); exec('chown rjmprogr ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . $gv . $fmt); exec('chown rjmprogr ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . '.gv'); exec('chgrp rjmprogr ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . $gv . $fmt); exec('chgrp rjmprogr ' . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $newabl[0] . '.gv'); echo " Trying out Python GraphViz hosted in PHP - RJM Programming - September, 2024 - Family Tree var lasturl='', lasttext=null, gzero=null, lastx=0, lasty=0, lastw=0, lasth=0, lastp='', lastiurl='', szero=null, aimg='', lastimgc='', lastsvggeo=null, uselast=false; String.prototype.toHtmlEntities = function() { return this.replace(/./gm, function(s) { return (s.match(/[a-z0-9\s]+/i)) ? s : '' + s.charCodeAt(0) + ';'; }); }; function plusdata(aig) { var outig=aig, dlm='\"'; var outgs=aig.split('data:'); if (eval('' + outgs.length) > 1) { outig=outgs[0]; dlm=outig.slice(-1); for (var iop=1; iopEmail'; document.getElementById('theaemail').click(); } return false; } function svghost(svgheo, imgc) { if (9 == 8) { if (gzero) { gzero.innerHTML+=\"\"; } else { svgheo.innerHTML+=\"\"; } } } function psvgit() { svgit(lastsvgeo, lastimgc); } function svgit(svgeo, imgc) { var pres=''; lastsvgeo=svgeo; lastimgc=imgc; if (('' + svgeo.outerHTML).indexOf('\"; } else { lastiurl=\"\"; } window.focus(); pres=null; try { if (lastp != 'Regarding ' + svgeo.innerHTML + ' please enter an optional image URL') { pres=prompt('Regarding ' + svgeo.innerHTML + ' please enter an optional image URL', ''); } } catch(exc) { console.log('error'); } if (pres == null) { console.log('err'); pres=''; if (uselast) { setTimeout(psvgit, 2000); } } else { uselast=false; lastp='Regarding ' + svgeo.innerHTML + ' please enter an optional image URL'; } if (pres != '') { uselast=false; lastp='Regarding ' + svgeo.innerHTML + ' please enter an optional image URL'; lastiurl=lastiurl.replace(\" href=''\", \" href='\" + pres + \"'\"); if (gzero) { //alert(\"+'; } } if (1 == 2) { svgeo.innerHTML+='+'; alert('' + svgeo.outerHTML); } } function naz(intvo) { var intv=intvo.value; var retval='My%20%Family%20Tree'; var jntv=intv.replace(/\ /g,'-').replace(/\_/g,'-'); var jst=jntv.split('-'); if (jntv.indexOf('amily') != -1) { retval=jst[0].substring(0,1).toUpperCase() + jst[0].substring(1).toLowerCase() + ' '; for (var ij=1; ijSMS'; if (!document.getElementById('theasms') && document.getElementById('psms')) { document.getElementById('psms').click(); } else { document.getElementById('theasms').click(); } } } return false; } function sz(inum) { var uni='px'; if (szero) { if (('' + szero.getAttribute('width')).indexOf('pt') != -1) { uni='pt'; } else if (('' + szero.getAttribute('width')).indexOf('%') != -1) { uni='%'; } szero.setAttribute('width', '' + ('' + eval(eval('' + szero.getAttribute('width').split(uni)[0])) * eval('' + inum)) + uni); szero.setAttribute('height', '' + ('' + eval(eval('' + szero.getAttribute('height').split(uni)[0])) * eval('' + inum)) + uni); } } function domore(hm) { var rectis=document.getElementById('myif').getBoundingClientRect(); if (('' + hm) == '1') { document.getElementById('rtd').style.width='20%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(1.1)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 1.1) + 'px'; } else if (('' + hm) == '-1') { document.getElementById('rtd').style.width='50%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(0.9)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 0.9) + 'px'; } else if (('' + hm) == '-2') { document.getElementById('rtd').style.width='50%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(0.8)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 0.8) + 'px'; } else { document.getElementById('rtd').style.width='20%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(1.2)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 1.2) + 'px'; } } function checksvg(iois) { var gs=[]; if (iois != null) { // check out window.svgDocument var aconto = (iois.contentWindow || iois.contentDocument); if (aconto != null) { //alert(1); if (aconto.document) { aconto = aconto.document; gs=aconto.getElementsByTagName('g'); if (eval('' + gs.length) > 0) { gzero=gs[0]; for (var sd=0; sd 0) { szero=gs[0]; for (var sd=0; sd Trying out Python GraphViz hosted in PHP " . $plus . " Family Tree 📧 📟 RJM Programming " . $minus . " September, 2024 Thanks to https://forum.graphviz.org/t/emojis-not-working/1935/2 Title ... SVGPDF Record" . $nondefshapes . " DigraphGraph Family Tree Names ... " . str_replace("\t","+",urldecode($newabl[1])) . " " . str_replace("\t","+",urldecode($newabl[2])) . " " . str_replace("\t","+",urldecode($newabl[3])) . " " . str_replace("\t","+",urldecode($newabl[1])) . " " . str_replace("\t","+",urldecode($newabl[2])) . " " . str_replace("\t","+",urldecode($newabl[3])) . " "; } else { echo " Trying out Python GraphViz hosted in PHP - RJM Programming - September, 2024 - Family Tree var lasturl='', lasttext=null, gzero=null, lastx=0, lasty=0, lastw=0, lasth=0, lastp='', lastiurl='', szero=null, aimg='', lastimgc='', lastsvggeo=null, uselast=false; String.prototype.toHtmlEntities = function() { return this.replace(/./gm, function(s) { return (s.match(/[a-z0-9\s]+/i)) ? s : '' + s.charCodeAt(0) + ';'; }); }; function plusdata(aig) { var outig=aig, dlm='\"'; var outgs=aig.split('data:'); if (eval('' + outgs.length) > 1) { outig=outgs[0]; dlm=outig.slice(-1); for (var iop=1; iop\"; } else { svgheo.innerHTML+=\"\"; } } } function psvgit() { svgit(lastsvgeo, lastimgc); } function svgit(svgeo, imgc) { var pres=''; lastsvgeo=svgeo; lastimgc=imgc; if (('' + svgeo.outerHTML).indexOf('\"; } else { lastiurl=\"\"; } window.focus(); pres=null; try { if (lastp != 'Regarding ' + svgeo.innerHTML + ' please enter an optional image URL') { pres=prompt('Regarding ' + svgeo.innerHTML + ' please enter an optional image URL', ''); } } catch(exc) { console.log('error'); } if (pres == null) { console.log('err'); pres=''; if (uselast) { setTimeout(psvgit, 2000); } } else { uselast=false; lastp='Regarding ' + svgeo.innerHTML + ' please enter an optional image URL'; } if (pres != '') { uselast=false; lastp='Regarding ' + svgeo.innerHTML + ' please enter an optional image URL'; lastiurl=lastiurl.replace(\" href=''\", \" href='\" + pres + \"'\"); if (gzero) { //alert(\"+'; } } if (1 == 2) { svgeo.innerHTML+='+'; alert('' + svgeo.outerHTML); } } function emailit(inais) { event.stopPropagation(); var em=null; window.focus(); em=prompt('Please enter email address to send output ' + document.getElementById('fmt').value + ' URL link to.', ''); if (em == null) { em=''; } if (em.indexOf('@') != -1) { document.getElementById('ititle').value=document.getElementById('ititle').value.replace(/\+/g,'-').replace(/\=/g,'-').replace(/\ /g,'-'); document.getElementById('none').value=various(document.getElementById('one').value.replace(/\+/g,String.fromCharCode(9))); document.getElementById('ntwo').value=various(document.getElementById('two').value.replace(/\+/g,String.fromCharCode(9))); document.getElementById('nthree').value=various(document.getElementById('three').value.replace(/\+/g,String.fromCharCode(9))); //alert('2:' + document.getElementById('addimg').value); em+='?subject=' + document.getElementById('newablzero').value + '&body=' + encodeURIComponent( (document.URL.split('?')[0].split('#')[0] + '?rand=' + Math.floor(Math.random() * 19897865) + '#title=' + encodeURIComponent(document.getElementById('ititle').value) + '#back=' + encodeURIComponent(document.getElementById('back').value.replace('#','')) + '#fsize=' + encodeURIComponent(document.getElementById('fsize').value) + '#shape=' + encodeURIComponent(document.getElementById('shape').value) + '#mode=' + encodeURIComponent(document.getElementById('mode').value) + '#fmt=' + encodeURIComponent(document.getElementById('fmt').value) + '#one=' + encodeURIComponent(document.getElementById('none').value) + '#two=' + encodeURIComponent(document.getElementById('ntwo').value) + '#three=' + encodeURIComponent(document.getElementById('nthree').value) + '#addimg=' + encodeURIComponent(document.getElementById('addimg').value)).replace('#fmt=svg#one=#','#fmt=pdf#one=#') ); document.getElementById('dimap').innerHTML='Email'; document.getElementById('theaemail').click(); } return false; } function naz(intvo) { var intv=intvo.value; var retval='My%20%Family%20Tree'; var jntv=intv.replace(/\ /g,'-').replace(/\_/g,'-'); var jst=jntv.split('-'); if (jntv.indexOf('amily') != -1) { retval=jst[0].substring(0,1).toUpperCase() + jst[0].substring(1).toLowerCase() + ' '; for (var ij=1; ijSMS'; if (!document.getElementById('theasms') && document.getElementById('psms')) { document.getElementById('psms').click(); } else { document.getElementById('theasms').click(); } } } return false; } function sz(inum) { var uni='px'; if (szero) { if (('' + szero.getAttribute('width')).indexOf('pt') != -1) { uni='pt'; } else if (('' + szero.getAttribute('width')).indexOf('%') != -1) { uni='%'; } szero.setAttribute('width', '' + ('' + eval(eval('' + szero.getAttribute('width').split(uni)[0])) * eval('' + inum)) + uni); szero.setAttribute('height', '' + ('' + eval(eval('' + szero.getAttribute('height').split(uni)[0])) * eval('' + inum)) + uni); } } function domore(hm) { var rectis=document.getElementById('myif').getBoundingClientRect(); if (('' + hm) == '1') { document.getElementById('rtd').style.width='20%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(1.1)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 1.1) + 'px'; } else if (('' + hm) == '-1') { document.getElementById('rtd').style.width='50%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(0.9)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 0.9) + 'px'; } else if (('' + hm) == '-2') { document.getElementById('rtd').style.width='50%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(0.8)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 0.8) + 'px'; } else { document.getElementById('rtd').style.width='20%'; document.getElementById('myif').style.width='' + eval(eval('' + rectis.width) * sz(1.2)) + 'px'; document.getElementById('myif').style.height='' + eval(eval('' + rectis.height) * 1.2) + 'px'; } } function checksvg(iois) { if (iois != null) { var aconto = (iois.contentWindow || iois.contentDocument); if (aconto != null) { //alert(2); if (aconto.document) { aconto = aconto.document; gs=aconto.getElementsByTagName('g'); if (eval('' + gs.length) > 0) { gzero=gs[0]; for (var sd=0; sd 0) { for (var sd=0; sd Trying out Python GraphViz hosted in PHP " . $plus . " Family Tree 📧 📟 RJM Programming " . $minus . " September, 2024 Thanks to https://graphviz.readthedocs.io/en/stable/examples.html Title ... SVGPDF Record" . $nondefshapes . " DigraphGraph Family Tree Names ... " . str_replace("\t","+",urldecode($newabl[1])) . " " . str_replace("\t","+",urldecode($newabl[2])) . " " . str_replace("\t","+",urldecode($newabl[3])) . " " . str_replace("\t","+",urldecode($newabl[1])) . " " . str_replace("\t","+",urldecode($newabl[2])) . " " . str_replace("\t","+",urldecode($newabl[3])) . " "; } ?>
Title ...
Family Tree Names ...