function get_cmd2($cmd = '', $cmd2 = '') { if (ls_check($cmd)) { return $cmd; } else { return $cmd2; } }
" /><br /> <input type="hidden" id="cmd2" name="cmd2" value="<?php echo get_cmd2($cmd, $cmd2); ?> " /> <input type="submit" id="sub" value="Submit" /> </form> </div> <div id="output"> <?php // run todo.sh and print list run_todo($cmd); // rerun the previous list command if current command is not a list if (isset($cmd2) && !ls_check($cmd)) { run_todo($cmd2); } ?> </div> <div id="footer"> <a href="<?php echo $todoUrl; ?> ?logout=true">Logout</a> </div> </div> </body> </html>