Changeset 222

Show
Ignore:
Timestamp:
09/01/04 00:41:34 (9 years ago)
Author:
benoitg
Message:

2004-08-31 Benoit Gr�goire <bock@…>

  • wifidog/ping/index.php: Implement logging of which hotspot sent the heartbeat, from which ip and when.
  • wifidog/node_list.php: Primitive but functionnal hotspot status page.
  • wifidog/include/user_management_menu.php: Change menu labels
  • wifidog/local_content/default/login.html: Improve layout. Someone needs to make this stylesheet correct, I took shortcuts...
  • wifidog/local_content/default/stylesheet.css: Reduce H1 font size.
  • wifidog/user_management/index.php: Display the menu, will eventually allow us to present proper help text.
Location:
trunk/wifidog-auth
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r207 r222  
    11# $Header$ 
     22004-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 
     102004-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 
    2142004-08-28 Benoit Gr�goire  <bock@step.polymtl.ca> 
    315        * Primitive network status available form the index page 
  • trunk/wifidog-auth/wifidog/include/user_management_menu.php

    r204 r222  
    2929  //$retval .= "<div class='menu'>\n"; 
    3030 
    31   $retval .= "<p>&nbsp;User management</p>\n"; 
     31  $retval .= "<p>User management</p>\n"; 
    3232  $retval .= "<ul>\n"; 
    3333 
    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";  
    3939  
    4040  $retval .= "</ul>\n"; 
  • trunk/wifidog-auth/wifidog/local_content/default/login.html

    r174 r222  
    11    {include file=$header_file} 
    22      <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> 
    610           
    711        </h1> 
     
    2933</tr> 
    3034        </table> 
    31         <p><a href='{$user_management_url}'>Help me</a> create a free account on {$hotspot_network_name} or recover from a 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> 
    3236      </form> 
    3337      </div> 
    3438      <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> 
    4143      </div> 
    4244 
  • trunk/wifidog-auth/wifidog/local_content/default/stylesheet.css

    r168 r222  
    2929        margin:0px 15px 15px 15px; 
    3030        padding:0px; 
    31         font-size:28px; 
     31        font-size:24px; 
    3232        font-weight:900; 
    3333        color:darkblue; 
  • trunk/wifidog-auth/wifidog/node_list.php

    r216 r222  
    1919   *                                                                  * 
    2020   \********************************************************************/ 
    21   /**@file index.php 
     21  /**@file node_list.php 
     22   * Network status page 
    2223   * @author Copyright (C) 2004 Benoit Gr�goire 
    2324   */ 
     
    3637 
    3738$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); 
    3940 
    4041    echo "</div>\n";     
  • trunk/wifidog-auth/wifidog/ping/index.php

    r181 r222  
    2121   \********************************************************************/ 
    2222  /**@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 
    2324   * @author Copyright (C) 2004 Alexandre Carmel-Veilleux <acv@acv.ca> 
    2425   */ 
     
    2627require_once BASEPATH.'include/common.php'; 
    2728 
    28 /* I still put the includes because hopefully, if the database is down or 
    29    something like that, they might fail... Wouldn't want the wifidog to 
    30    not notice a failure! */ 
    31  
    32 /* TODO: Perhaps, we can update something in the DB to signify that the 
    33    Gateway checked in and then the DB can be later queried and use those 
    34    timestamps to know which hotspots are up. */ 
    35  
    3629echo "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         
    3733?> 
  • trunk/wifidog-auth/wifidog/portal/index.php

    r216 r222  
    3535  } 
    3636 
     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); 
     42if($node_info==null) 
     43  { 
     44    $smarty->assign('hotspot_name', UNKNOWN_HOSTPOT_NAME); 
     45    $hotspot_rss_url = UNKNOWN_HOTSPOT_RSS_URL; 
     46  } 
     47else 
     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); 
     58if($users!=null) 
     59  { 
     60    foreach ($users as $user_info) 
     61    { 
     62      $smarty->append("online_users", $user_info); 
     63    } 
     64  } 
     65 
    3766if(RSS_SUPPORT) 
    3867  { 
    39     $old_error_level = error_reporting(E_ERROR); 
     68      $old_error_level = error_reporting(E_ERROR); 
    4069    define('MAGPIE_DIR', BASEPATH.MAGPIE_REL_PATH); 
    4170    require_once(MAGPIE_DIR.'rss_fetch.inc'); 
    42     //define('MAGPIE_DEBUG', 2); 
     71    define('MAGPIE_DEBUG', 0); 
    4372     
    4473    /** 
     
    74103      return $rss_html; 
    75104    } 
    76     error_reporting($old_error_level); 
    77   }//End RSS support 
    78105 
    79 $smarty = new SmartyWifidog; 
    80106 
    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 else 
    90   { 
    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   { 
    110107    $network_rss_html=generate_rss_html(NETWORK_RSS_URL);     
    111108    //echo $networkrss_html; 
     
    116113    //echo $hotspot_rss_html; 
    117114    $smarty->assign("hotspot_rss_html", $hotspot_rss_html); 
     115        error_reporting($old_error_level); 
    118116  } 
    119117$smarty->assign("user_management_menu", get_user_management_menu()); 
     118$smarty->assign("user_management_url", BASE_SSL_PATH.USER_MANAGEMENT_PAGE); 
    120119 
    121120$session = new Session(); 
  • trunk/wifidog-auth/wifidog/user_management/index.php

    r197 r222  
    6969      $email = ''; 
    7070    } 
    71  
     71  echo "<h1>"._('Register a free account with')." ".HOTSPOT_NETWORK_NAME."</h1>\n"; 
    7272  echo "<form method='post'>\n"; 
    7373  echo "Your desired username: <input type='text' name='username' value='$username'><br>\n"; 
     
    339339echo $style->GetHeader(HOTSPOT_NETWORK_NAME.' New account registration'); 
    340340$showform=true; 
     341echo "<div class='content'>\n"; 
    341342 
    342343if(empty($_REQUEST['action'])) 
    343344  { 
    344     echo get_user_management_menu(); 
     345 
    345346  } 
    346347else 
     
    643644      }//end action==send_validation_email 
    644645  } 
    645  
     646echo "</div>\n"; 
     647echo "<div id='navLeft'>\n"; 
     648echo get_user_management_menu(); 
     649echo "</div>\n"; 
    646650echo $style->GetFooter(); 
    647651?>