Logout

Terminate your session on the server and quit the shell.

Command line interface

Syntax

  1. $ logout

Arguments

This command takes no arguments.

Example

logout.php

  1. <?
  2. require("../plugin.php");
  3. if (is_ajax()) {
  4. if ($_POST["action"] == 'logout') {
  5. $_SESSION = array();
  6. die("Logout");
  7. }
  8. exit;
  9. }
  10. ?>
  11. /**
  12. * Logout, Exit and Quit
  13. **/
  14. TinyShell.plugins.logout = new Class({
  15. description: "Terminate session",
  16. run : function(terminal) {
  17. this.t = terminal;
  18. terminal.ajax_request(this.print, "<?php echo $_AJAX_URL?>", "action=logout");
  19. },
  20. print : function(r) {
  21. this.t.print("logout");
  22. }
  23. });
  24. // define shortcuts to this function:
  25. TinyShell.plugins.exit = TinyShell.plugins.logout;
  26. TinyShell.plugins.quit = TinyShell.plugins.logout;

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>