Changeset 222
- Timestamp:
- 09/01/04 00:41:34 (9 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 8 modified
-
ChangeLog (modified) (1 diff)
-
wifidog/include/user_management_menu.php (modified) (1 diff)
-
wifidog/local_content/default/login.html (modified) (2 diffs)
-
wifidog/local_content/default/stylesheet.css (modified) (1 diff)
-
wifidog/node_list.php (modified) (2 diffs)
-
wifidog/ping/index.php (modified) (2 diffs)
-
wifidog/portal/index.php (modified) (3 diffs)
-
wifidog/user_management/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/ChangeLog
r207 r222 1 1 # $Header$ 2 2004-08-31 Benoit Gr�goire <bock@step.polymtl.ca> 3 * wifidog/ping/index.php: Implement logging of which hotspot sent the heartbeat, from which ip and when. 4 * wifidog/node_list.php: Primitive but functionnal hotspot status page. 5 * wifidog/include/user_management_menu.php: Change menu labels 6 * wifidog/local_content/default/login.html: Improve layout. Someone needs to make this stylesheet correct, I took shortcuts... 7 * wifidog/local_content/default/stylesheet.css: Reduce H1 font size. 8 * wifidog/user_management/index.php: Display the menu, will eventually allow us to present proper help text. 9 10 2004-08-30 Benoit Gr�goire <bock@step.polymtl.ca> 11 * Add link to original requested site. 12 * wifidog/node_list.php: New file. Will become the main node status page. 13 2 14 2004-08-28 Benoit Gr�goire <bock@step.polymtl.ca> 3 15 * Primitive network status available form the index page -
trunk/wifidog-auth/wifidog/include/user_management_menu.php
r204 r222 29 29 //$retval .= "<div class='menu'>\n"; 30 30 31 $retval .= "<p> User management</p>\n";31 $retval .= "<p>User management</p>\n"; 32 32 $retval .= "<ul>\n"; 33 33 34 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action= validation_email_form'>"._('Send validation email again')."</a></li>\n";35 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action= lost_username_form'>"._('Lost my username')."</a></li>\n";36 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action=lost_ password_form'>"._('Lost my password')."</a></li>\n";37 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action= change_password_form'>"._('Change my password')."</a></li>\n";38 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action= register_new_account_form'>"._('Register a new user')."</a></li>\n";34 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action=register_new_account_form'>"._('Create new account')."</a></li>\n"; 35 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action=validation_email_form'>"._('Re-send validation email')."</a></li>\n"; 36 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action=lost_username_form'>"._('Lost username')."</a></li>\n"; 37 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action=lost_password_form'>"._('Lost password')."</a></li>\n"; 38 $retval .= "<li><a href='".BASE_SSL_PATH."".USER_MANAGEMENT_PAGE."?action=change_password_form'>"._('Change password')."</a></li>\n"; 39 39 40 40 $retval .= "</ul>\n"; -
trunk/wifidog-auth/wifidog/local_content/default/login.html
r174 r222 1 1 {include file=$header_file} 2 2 <div class='content'> 3 <h1>Greetings! Welcome to<br clear=all> 4 <img src='{$hotspot_logo_url}' alt='{$hotspot_name} logo'><br clear=all> 5 {$hotspot_name} 3 <h1>Greetings! Welcome to {$hotspot_name}, a {$hotspot_network_name} free HotSpot<br clear=all> 4 <table width=100%> 5 <tr> 6 <th align=center><img src='{$hotspot_logo_url}' alt='{$hotspot_name} logo'></th> 7 <th align=center><img src='{$network_logo_url}' alt='{$hotspot_network_name} logo'></th> 8 </tr> 9 </table> 6 10 7 11 </h1> … … 29 33 </tr> 30 34 </table> 31 <p> <a href='{$user_management_url}'>Help me</a> create a free account on {$hotspot_network_name} or recover froma lost username or password.</p>35 <p>Accounts on {$hotspot_network_name} are <emp>totally free</emp>, use the left menu to create a new one or recover a lost username or password.</p> 32 36 </form> 33 37 </div> 34 38 <div class='content'> 35 <h2>{$hotspot_name} is part of <br clear=all> 36 <img src='{$network_logo_url}' alt='{$hotspot_network_name} logo'><br clear=all> 37 <a href='{$hotspot_network_url}'>{$hotspot_network_name}</a> 38 39 </h2> 40 39 <h2>Announcements</h2> 40 <dl> 41 <dt>31/9/2004: {$hotspot_network_name} is currently transitioning from NoCat to the brand new Wifidog captive portal. Please note that your previous username and password should still work.</dt> 42 </dl> 41 43 </div> 42 44 -
trunk/wifidog-auth/wifidog/local_content/default/stylesheet.css
r168 r222 29 29 margin:0px 15px 15px 15px; 30 30 padding:0px; 31 font-size:2 8px;31 font-size:24px; 32 32 font-weight:900; 33 33 color:darkblue; -
trunk/wifidog-auth/wifidog/node_list.php
r216 r222 19 19 * * 20 20 \********************************************************************/ 21 /**@file index.php 21 /**@file node_list.php 22 * Network status page 22 23 * @author Copyright (C) 2004 Benoit Gr�goire 23 24 */ … … 36 37 37 38 $row = null; 38 $db->ExecSqlUniqueRes("SELECT *FROM nodes ORDER BY node_id",$row, true);39 $db->ExecSqlUniqueRes("SELECT node_id, name, NOW()-last_heartbeat_timestamp AS last_heartbeat, last_heartbeat_ip FROM nodes ORDER BY node_id",$row, true); 39 40 40 41 echo "</div>\n"; -
trunk/wifidog-auth/wifidog/ping/index.php
r181 r222 21 21 \********************************************************************/ 22 22 /**@file 23 * This will respond to the gateway to tell them that the gateway is still up, and also log the gateway checking in for network monitoring 23 24 * @author Copyright (C) 2004 Alexandre Carmel-Veilleux <acv@acv.ca> 24 25 */ … … 26 27 require_once BASEPATH.'include/common.php'; 27 28 28 /* I still put the includes because hopefully, if the database is down or29 something like that, they might fail... Wouldn't want the wifidog to30 not notice a failure! */31 32 /* TODO: Perhaps, we can update something in the DB to signify that the33 Gateway checked in and then the DB can be later queried and use those34 timestamps to know which hotspots are up. */35 36 29 echo "Pong"; 30 $node_id = $db->EscapeString($_REQUEST['gw_id']); 31 $db->ExecSqlUpdate("UPDATE nodes SET last_heartbeat_ip='$_SERVER[REMOTE_ADDR]', last_heartbeat_timestamp=NOW() WHERE node_id='$node_id'"); 32 37 33 ?> -
trunk/wifidog-auth/wifidog/portal/index.php
r216 r222 35 35 } 36 36 37 $smarty = new SmartyWifidog; 38 39 $portal_template = $_REQUEST['gw_id'] . ".html"; 40 41 $db->ExecSqlUniqueRes("SELECT * FROM nodes WHERE node_id='". $db->EscapeString($_REQUEST['gw_id'])."'", $node_info); 42 if($node_info==null) 43 { 44 $smarty->assign('hotspot_name', UNKNOWN_HOSTPOT_NAME); 45 $hotspot_rss_url = UNKNOWN_HOTSPOT_RSS_URL; 46 } 47 else 48 { 49 $smarty->assign('hotspot_name', $node_info['name']); 50 $hotspot_rss_url = $node_info['rss_url']; 51 } 52 53 /* Find out who is online */ 54 $db->ExecSql("SELECT users.user_id FROM users,connections " . 55 "WHERE connections.token_status='" . TOKEN_INUSE . "' " . 56 "AND users.user_id=connections.user_id " 57 ,$users, false); 58 if($users!=null) 59 { 60 foreach ($users as $user_info) 61 { 62 $smarty->append("online_users", $user_info); 63 } 64 } 65 37 66 if(RSS_SUPPORT) 38 67 { 39 $old_error_level = error_reporting(E_ERROR);68 $old_error_level = error_reporting(E_ERROR); 40 69 define('MAGPIE_DIR', BASEPATH.MAGPIE_REL_PATH); 41 70 require_once(MAGPIE_DIR.'rss_fetch.inc'); 42 //define('MAGPIE_DEBUG', 2);71 define('MAGPIE_DEBUG', 0); 43 72 44 73 /** … … 74 103 return $rss_html; 75 104 } 76 error_reporting($old_error_level);77 }//End RSS support78 105 79 $smarty = new SmartyWifidog;80 106 81 $portal_template = $_REQUEST['gw_id'] . ".html";82 83 $db->ExecSqlUniqueRes("SELECT * FROM nodes WHERE node_id='". $db->EscapeString($_REQUEST['gw_id'])."'", $node_info);84 if($node_info==null)85 {86 $smarty->assign('hotspot_name', UNKNOWN_HOSTPOT_NAME);87 $hotspot_rss_url = UNKNOWN_HOTSPOT_RSS_URL;88 }89 else90 {91 $smarty->assign('hotspot_name', $node_info['name']);92 $hotspot_rss_url = $node_info['rss_url'];93 }94 95 /* Find out who is online */96 $db->ExecSql("SELECT users.user_id FROM users,connections " .97 "WHERE connections.token_status='" . TOKEN_INUSE . "' " .98 "AND users.user_id=connections.user_id "99 ,$users, false);100 if($users!=null)101 {102 foreach ($users as $user_info)103 {104 $smarty->append("online_users", $user_info);105 }106 }107 108 if(RSS_SUPPORT)109 {110 107 $network_rss_html=generate_rss_html(NETWORK_RSS_URL); 111 108 //echo $networkrss_html; … … 116 113 //echo $hotspot_rss_html; 117 114 $smarty->assign("hotspot_rss_html", $hotspot_rss_html); 115 error_reporting($old_error_level); 118 116 } 119 117 $smarty->assign("user_management_menu", get_user_management_menu()); 118 $smarty->assign("user_management_url", BASE_SSL_PATH.USER_MANAGEMENT_PAGE); 120 119 121 120 $session = new Session(); -
trunk/wifidog-auth/wifidog/user_management/index.php
r197 r222 69 69 $email = ''; 70 70 } 71 71 echo "<h1>"._('Register a free account with')." ".HOTSPOT_NETWORK_NAME."</h1>\n"; 72 72 echo "<form method='post'>\n"; 73 73 echo "Your desired username: <input type='text' name='username' value='$username'><br>\n"; … … 339 339 echo $style->GetHeader(HOTSPOT_NETWORK_NAME.' New account registration'); 340 340 $showform=true; 341 echo "<div class='content'>\n"; 341 342 342 343 if(empty($_REQUEST['action'])) 343 344 { 344 echo get_user_management_menu(); 345 345 346 } 346 347 else … … 643 644 }//end action==send_validation_email 644 645 } 645 646 echo "</div>\n"; 647 echo "<div id='navLeft'>\n"; 648 echo get_user_management_menu(); 649 echo "</div>\n"; 646 650 echo $style->GetFooter(); 647 651 ?>
