^^ onchange="scrollit()" >"; echo " "; echo " "; echo ""; } else { if ($confirm=="yes") $direct = $action; $action = ""; } } else if ($shortcut) $direct = $shortcut; if ($action==""): if ($direct!="") { $rewrite = array( "restart" => "exit\n", "kill"=>"\3", "quit"=>"\34", "xoff"=>"\21", "xon"=>"\23", "eof"=>"\4", "esc"=>"\33", "escesc"=>"\33\33", "(return)"=>"", ); $ok = 1; $send = $direct; if (isset($rewrite[$direct])) $send = $rewrite[$direct]; } if ($port=="") $stat = "illegal sock port"; else if ($send=="" && !$ok) $stat = "running $port"; else if ($fd=fsockopen("sock/$port", 0)) { $stat = "sent: ".htmlentities(addcslashes($send, "\0..\37\177..\237")); fwrite($fd, "$send\n"); fflush($fd); flush(); sleep(1); fclose($fd); } else $stat = "cannot open sock ".htmlentities($port); ?>