Changeset 402 for trunk/wifidog-auth/wifidog/portal/index.php
- Timestamp:
- 01/26/05 15:43:34 (8 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog-auth/wifidog/portal/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/portal/index.php
r368 r402 26 26 define('BASEPATH','../'); 27 27 require_once BASEPATH.'include/common.php'; 28 require_once BASEPATH.' classes/SmartyWifidog.php';29 require_once BASEPATH.'classes/ Session.php';28 require_once BASEPATH.'include/common_interface.php'; 29 require_once BASEPATH.'classes/Node.php'; 30 30 31 31 if (CONF_USE_CRON_FOR_DB_CLEANUP == false) { … … 33 33 } 34 34 35 $smarty = new SmartyWifidog; 36 $session = new Session;37 38 include BASEPATH.'include/language.php'; 35 if (!isset($_REQUEST['gw_id'])) { 36 $smarty->display("templates/message_unknown_hotspot.html"); 37 exit; 38 } 39 39 40 40 $portal_template = $_REQUEST['gw_id'] . ".html"; 41 41 $node_id = $db->EscapeString($_REQUEST['gw_id']); 42 $db->ExecSqlUniqueRes("SELECT * FROM nodes WHERE node_id='$node_id'", $node_info); 43 if ($node_info == null) { 44 $smarty->assign('hotspot_name', UNKNOWN_HOSTPOT_NAME); 45 $hotspot_rss_url = UNKNOWN_HOTSPOT_RSS_URL; 46 } else { 47 $smarty->assign('hotspot_name', $node_info['name']); 48 $hotspot_rss_url = $node_info['rss_url']; 42 43 $node = Node::getObject($node_id); 44 if ($node == null) { 45 $smarty->assign("gw_id", $_REQUEST['gw_id']); 46 $smarty->display("templates/message_unknown_hotspot.html"); 47 exit; 49 48 } 50 49 50 $smarty->assign('hotspot_name', $node->getName()); 51 $hotspot_rss_url = $node->getRSSURL(); 52 51 53 /* Find out who is online */ 52 $db->ExecSql("SELECT users.user_id FROM users,connections WHERE connections.token_status='" . TOKEN_INUSE . "' AND users.user_id=connections.user_id AND connections.node_id='$node_id'", $users, false); 53 if ($users != null) { 54 $smarty->assign("online_users", $users); 55 } 54 $smarty->assign("online_users", $node->getOnlineUsers()); 56 55 57 56 if (RSS_SUPPORT) {
