X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=project%2FNokia61%2FNokia61.php;fp=project%2FNokia61%2FNokia61.php;h=937631e705619a7b909410e667514ae040ab365d;hb=f40e75167a045d189c3027a0b112a20c635d3e48;hp=ef694fd8fc19b13c3132318583e1890ca1f822b8;hpb=ef80d25b0a0307ee222d0a94eaae8abf1e9df31c;p=www.jankratochvil.net.git diff --git a/project/Nokia61/Nokia61.php b/project/Nokia61/Nokia61.php index ef694fd..937631e 100644 --- a/project/Nokia61/Nokia61.php +++ b/project/Nokia61/Nokia61.php @@ -1,5 +1,7 @@ @@ -18,7 +20,9 @@ function table($array,$rw=0) { global $tables,$bgcolor_head,$bgcolor_body,$HTTP_GET_VARS; - print "
\n"; + print "
\n"; print "
"; if ($rw) print "Input:"; @@ -63,6 +67,11 @@ global $tables,$bgcolor_head,$bgcolor_body,$HTTP_GET_VARS; $used[$x]=1; $filled++; } + // Both popen() and proc_open() require: /bin/sh + if ($filled==9 && !is_executable("/bin/sh")) { + print "

Current installation environment forbids the execution!

\n"; + $filled=0; + } if ($filled==9) { print ""; $cmd="echo -n -e '"; @@ -79,7 +88,7 @@ global $tables,$bgcolor_head,$bgcolor_body,$HTTP_GET_VARS; $idx=0; $output=array(); while (!feof($cmd)) { - if (3!=fscanf($cmd,"\n %d%d%d",&$output[$idx+0],&$output[$idx+1],&$output[$idx+2])) + if (3!=fscanf($cmd,"\n %d%d%d",$output[$idx+0],$output[$idx+1],$output[$idx+2])) continue; $idx+=3; if ($idx<9) @@ -98,7 +107,7 @@ global $tables,$bgcolor_head,$bgcolor_body,$HTTP_GET_VARS; } table($input,1); - if (!$HTTP_GET_VARS["nohtml"]) { + if (!isset($HTTP_GET_VARS["nohtml"])) { ?>