| 1 | <?php |
|---|
| 2 | /********************************************************************\ |
|---|
| 3 | * This program is free software; you can redistribute it and/or * |
|---|
| 4 | * modify it under the terms of the GNU General Public License as * |
|---|
| 5 | * published by the Free Software Foundation; either version 2 of * |
|---|
| 6 | * the License, or (at your option) any later version. * |
|---|
| 7 | * * |
|---|
| 8 | * This program is distributed in the hope that it will be useful, * |
|---|
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
|---|
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
|---|
| 11 | * GNU General Public License for more details. * |
|---|
| 12 | * * |
|---|
| 13 | * You should have received a copy of the GNU General Public License* |
|---|
| 14 | * along with this program; if not, contact: * |
|---|
| 15 | * * |
|---|
| 16 | * Free Software Foundation Voice: +1-617-542-5942 * |
|---|
| 17 | * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * |
|---|
| 18 | * Boston, MA 02111-1307, USA gnu@gnu.org * |
|---|
| 19 | * * |
|---|
| 20 | \********************************************************************/ |
|---|
| 21 | /**@file index.php |
|---|
| 22 | * Authserver home page |
|---|
| 23 | * @author Copyright (C) 2004 Benoit Gr�goire |
|---|
| 24 | */ |
|---|
| 25 | |
|---|
| 26 | define('BASEPATH', './'); |
|---|
| 27 | require_once BASEPATH.'include/common.php'; |
|---|
| 28 | require_once BASEPATH.'classes/MainUI.php'; |
|---|
| 29 | require_once BASEPATH.'include/common_interface.php'; |
|---|
| 30 | require_once BASEPATH.'classes/Node.php'; |
|---|
| 31 | |
|---|
| 32 | $num_valid_users = $stats->getNumValidUsers(); |
|---|
| 33 | $num_online_users = $stats->getNumOnlineUsers($node_id = null); |
|---|
| 34 | |
|---|
| 35 | $tool_html = '<ul>'."\n"; |
|---|
| 36 | $tool_html .= '<li><a href="'.BASE_SSL_PATH.'change_password.php">'._("Change password").'</a><br>'."\n"; |
|---|
| 37 | $tool_html .= '<li><a href="'.BASE_SSL_PATH.'faq.php">'._("I have trouble connecting and I would like some help").'</a><br>'."\n"; |
|---|
| 38 | $tool_html .= '</ul>'."\n"; |
|---|
| 39 | |
|---|
| 40 | $body_html = "<p>"._("The network currently has")." {$num_valid_users} "._("valid users")." {$num_online_users} "._("user(s) are currently online")."</p>"; |
|---|
| 41 | $body_html .= "<ul>\n"; |
|---|
| 42 | if(defined('GMAPS_HOTSPOTS_MAP_ENABLED') && GMAPS_HOTSPOTS_MAP_ENABLED == true) |
|---|
| 43 | $body_html .= "<li><a href='".BASE_NON_SSL_PATH."hotspots_map.php'>"._('Deployed HotSpots map')."</a></li>"; |
|---|
| 44 | $body_html .= "<li><a href='hotspot_status.php'>"._('Deployed HotSpots status with coordinates')."</a></li>"; |
|---|
| 45 | $body_html .= "<li><a href='node_list.php'>"._("Full node technical status (includes non-deployed nodes)")."</a></li>"; |
|---|
| 46 | $body_html .= "<li><a href='".BASE_SSL_PATH."admin/index.php'>"._("Administration")."</a></li>"; |
|---|
| 47 | $body_html .= "</ul>\n"; |
|---|
| 48 | |
|---|
| 49 | $ui=new MainUI(); |
|---|
| 50 | $ui->setToolContent($tool_html); |
|---|
| 51 | $smarty->assign("title", _("authentication server")); |
|---|
| 52 | $ui->setMainContent($body_html); |
|---|
| 53 | $ui->display(); |
|---|
| 54 | |
|---|
| 55 | ?> |
|---|