Changeset 254

Show
Ignore:
Timestamp:
10/28/04 21:17:27 (9 years ago)
Author:
benoitg
Message:

2004-10-28 Benoit Gr�goire <bock@…>

  • sql/wifidog-postgres-schema.sql: Add constraints to avoid empty string in email or user_id.
  • Some statistics fixes
Location:
trunk/wifidog-auth
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r236 r254  
    11# $Header$ 
     22004-10-28 Benoit Gr�goire  <bock@step.polymtl.ca> 
     3        * sql/wifidog-postgres-schema.sql:  Add constraints to avoid empty string in email or user_id. 
     4        * Some statistics fixes 
    25 
    362004-09-29 Alexandre Carmel-Veilleux <acv@acv.ca> 
  • trunk/wifidog-auth/sql/wifidog-postgres-schema.sql

    r232 r254  
    6868    last_heartbeat_ip character varying(16), 
    6969    last_heartbeat_timestamp timestamp without time zone DEFAULT now(), 
    70     creation_date date DEFAULT now() 
     70    creation_date date DEFAULT now(), 
     71    home_page_url text 
    7172); 
    7273 
     
    8384    account_status integer, 
    8485    validation_token character varying(64) DEFAULT ''::character varying NOT NULL, 
    85     reg_date timestamp without time zone DEFAULT now() NOT NULL 
     86    reg_date timestamp without time zone DEFAULT now() NOT NULL, 
     87    CONSTRAINT check_email_not_empty CHECK (((email)::text <> ''::text)), 
     88    CONSTRAINT check_user_not_empty CHECK (((user_id)::text <> ''::text)) 
    8689); 
    8790 
  • trunk/wifidog-auth/wifidog/admin/import_user_database.php

    r227 r254  
    108108                } 
    109109               
    110               echo "<p class=info>Generating temporary user from:  $original_username; Checking internal duplicates</p>\n"; 
     110              echo "<p class=info>Generating temporary user from:  $original_username; Checking internal duplicates (duplicate usernames in the imported file)</p>\n"; 
    111111              $username_modified_because_of=null; 
    112112              $username=$original_username; 
  • trunk/wifidog-auth/wifidog/admin/templates/user_stats.html

    r194 r254  
    5757{foreach from=$connections item=connection} 
    5858<tr> 
    59         <td>{$connection.timestamp_in|date_format:"%Y/%m/%d %H:%M:%S"}</td> 
    60         <td>{$connection.timestamp_out|date_format:"%Y/%m/%d %H:%M:%S"}</td> 
     59        <td>{$connection.timestamp_in}</td> 
     60        <td>{$connection.timestamp_out}</td> 
    6161        <td>{$connection.token_status_description}</td> 
    6262        <td>{$connection.user_mac}</td> 
    6363        <td>{$connection.user_ip}</td> 
    64         <td>{$connection.hotspot_id}</td> 
    65         <td>{$connection.hotspot_ip}</td> 
     64        <td>{$connection.node_id}</td> 
     65        <td>{$connection.node_ip}</td> 
    6666        <td align="right">{$connection.incoming}</td> 
    6767        <td align="right">{$connection.outgoing}</td> 
  • trunk/wifidog-auth/wifidog/local_content/README

    r174 r254  
    1111A few notes about Smarty templates: 
    1212 
    13 You can see the variables available to the template by adding {$debug} at the top of the html file. 
     13You can see the variables available to the template by adding {debug} at the top of the html file. 
  • trunk/wifidog-auth/wifidog/login/index.php

    r226 r254  
    4242  } 
    4343 
    44 if (isset($_REQUEST['user']) && isset($_REQUEST['pass']))  
     44if (!empty($_REQUEST['user']) && !empty($_REQUEST['pass']))  
    4545  { 
    4646    $security = new Security(); 
  • trunk/wifidog-auth/wifidog/user_management/index.php

    r227 r254  
    6969      $email = ''; 
    7070    } 
    71   echo "<h1>"._('Register a free account with')." ".HOTSPOT_NETWORK_NAME."</h1>\n"; 
     71  echo "<h3>"._('Register a free account with')." ".HOTSPOT_NETWORK_NAME."</h3>\n"; 
    7272  echo "<form method='post'>\n"; 
    73   echo "Your desired username: <input type='text' name='username' value='$username'><br>\n"; 
    74   echo "Your email address: <input type='text' name='email' value='$email'><br>\n"; 
    75   echo "Your password: <input type='password' name='pass' value='$pass'><br>\n"; 
    76   echo "Your password(again): <input type='password' name='pass_again' value='$pass_again'><br>\n"; 
    77   echo "<input type='hidden' name='action' value='create_new_account'><br>\n"; 
    78   echo "<input type='submit'>\n"; 
     73  echo "<p>Your desired username: <input type='text' name='username' value='$username'></p>\n"; 
     74  echo "<p>Your email address: <input type='text' name='email' value='$email'> The email MUST be valid.  You will have to click on the link you will receive by email before your account is validated.</p>\n"; 
     75  echo "<p>Your password: <input type='password' name='pass' value='$pass'></p>\n"; 
     76  echo "<p>Your password(again): <input type='password' name='pass_again' value='$pass_again'></p>\n"; 
     77  echo "<p><input type='hidden' name='action' value='create_new_account'>\n"; 
     78  echo "<input type='submit'></p>\n"; 
    7979  echo "</form>\n"; 
    8080} 
     
    9090      $username = ''; 
    9191    } 
    92   echo "<h1>"._('Re-send validation email')."</h1>\n"; 
     92  echo "<h3>"._('Re-send validation email')."</h3>\n"; 
    9393  echo "<form method='post'>\n"; 
    9494  echo "Your username: <input type='text' name='username' value='$username'><br>\n"; 
     
    180180      $new_pass_again = ''; 
    181181    } 
    182   echo "<h1>"._('Change password')."</h1>\n"; 
     182  echo "<h3>"._('Change password')."</h3>\n"; 
    183183  echo "<form method='post'>\n"; 
    184184  echo "Your username: <input type='text' name='username' value='$username'><br>\n"; 
     
    201201      $email = ''; 
    202202    } 
    203   echo "<h1>"._('Lost username')."</h1>\n"; 
     203  echo "<h3>"._('Lost username')."</h3>\n"; 
    204204  echo "<form method='post'>\n"; 
    205205  echo "<p>"._('Please enter your email address:')." <input type='text' name='email' value='$email'></p>\n"; 
     
    258258    } 
    259259 
    260   echo "<h1>"._('Lost password')."</h1>\n"; 
     260  echo "<h3>"._('Lost password')."</h3>\n"; 
    261261  echo "<form method='post'>\n"; 
    262262  echo "<p>"._('Please enter either your username or your email:')."</p>\n"; 
     
    322322 Password: $new_passord 
    323323 
    324  To protect your account, it is recommended that you change your password immediately. 
    325  
    326  Thank you, 
     324 Have a nice day, 
    327325 
    328326 The Team"; 
     
    330328 
    331329      mail($email, $subject, $body, $from); 
    332             echo "<p>"._('Your password has been mailed to you.')."</p>\n"; 
     330            echo "<p>"._('A new password has been mailed to you.')."</p>\n"; 
    333331    } 
    334332} 
     
    337335 
    338336$style = new Style(); 
    339 echo $style->GetHeader(HOTSPOT_NETWORK_NAME.' New account registration'); 
     337echo $style->GetHeader(HOTSPOT_NETWORK_NAME.' user management'); 
    340338$showform=true; 
     339echo "<div id='head'><h1>".HOTSPOT_NETWORK_NAME." user management</h1></div>\n"; 
    341340echo "<div id='navLeft'>\n"; 
    342341echo get_user_management_menu(); 
     
    346345if(empty($_REQUEST['action'])) 
    347346  { 
    348  
     347echo _("<h3>Inscription</h3> 
     348<p>Pour vous connecter aux points d'acc�s ".HOTSPOT_NETWORK_NAME.", vous devez utiliser un nom d'utilisateur et un mot de passe.</p> 
     349<p>Les comptes sont totalement gratuits pour tous ceux qui en font la demande.</p> 
     350<p>Pour faire la demande d'un compte gratuit, veuillez choisir 'Create new account' dans le menu de gauche.</p> 
     351<h3>Sign up</h3> 
     352<p>".HOTSPOT_NETWORK_NAME." hotspots require you have a login and a password to utilize them.</p> 
     353<p>Accounts are given absolutely free to anyone who requests them.</p> 
     354<p>To request a free account, please choose 'Create new account' in the left menu.</p>"); 
    349355  } 
    350356else