File: 1.10.2a/server/web/index.php (View as Code)

1: 2: /* ------------------------------------------------------------- 3: This file is part of FreeNATS 4: 5: FreeNATS is (C) Copyright 2008-2010 PurplePixie Systems 6: 7: FreeNATS is free software: you can redistribute it and/or modify 8: it under the terms of the GNU General Public License as published by 9: the Free Software Foundation, either version 3 of the License, or 10: (at your option) any later version. 11: 12: FreeNATS is distributed in the hope that it will be useful, 13: but WITHOUT ANY WARRANTY; without even the implied warranty of 14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15: GNU General Public License for more details. 16: 17: You should have received a copy of the GNU General Public License 18: along with FreeNATS. If not, see www.gnu.org/licenses 19: 20: For more information see www.purplepixie.org/freenats 21: -------------------------------------------------------------- */ 22: ob_start(); 23: require("include.php"); 24: $NATS->Start(); 25: $session=$NATS_Session->Check($NATS->DB); 26: if ($session) 27: { 28: header("Location: main.php"); 29: exit(); 30: } 31: Screen_Header($NATS->Lang->Item("welcome"),3); 32: ob_end_flush(); 33: ?> 34:
35: 36: //if (isset($_REQUEST['login_msg'])) echo "".$_REQUEST['login_msg']."

";
37: $mesg=array( 38: 0 => "msg.logout", 39: 1 => "msg.session", 40: 2 => "msg.loginfailed" ); 41: if (isset($_REQUEST['msg'])) $msg=$_REQUEST['msg']; 42: else if (isset($_REQUEST['login_msg'])) // legacy support 43: { 44: if ($_REQUEST['login_msg']=="Invalid Or Expired Session") $msg=1; 45: } 46: 47: if (isset($msg) && isset($mesg[$msg])) 48: { 49: echo "".$NATS->Lang->Item($mesg[$msg])."

";
50: } 51: else echo "".$NATS->Lang->Item("welcome")."

";
52: 53: $t="Login..."; 54: Start_Round($NATS->Lang->Item("auth"),300); 55: ?>

56: 57:
58: 59: if (isset($_REQUEST['url'])) echo ""; 60: ?> 61: 63: 64: 65: 75:
62: Lang->Item("username"); ?>:
Lang->Item("password"); ?>:
Lang->Item("language"); ?>:

76: 77: echo "Lang->Item("login")."\" style=\"font-size: 11pt;\">\n"; 78: ?> 79: 80: 81:

82: 83: 84: End_Round(); 85: ?> 86:

87:
88: 89: Screen_Footer(); 90: ?> 91: