Changeset 349

Show
Ignore:
Timestamp:
01/18/05 16:45:31 (8 years ago)
Author:
aprilp
Message:

Smarty'ized

Location:
trunk/wifidog-auth/wifidog
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/include/language.php

    r320 r349  
    11<?php 
     2if (!empty($_REQUEST['lang'])) { 
     3    $session->set('SESS_LANGUAGE_VAR', $_REQUEST['lang']); 
     4} 
     5 
     6if ($session->get('SESS_LANGUAGE_VAR')) { 
     7    setlocale(LC_ALL, $session->get('SESS_LANGUAGE_VAR')); 
     8} 
     9 
    210if (GETTEXT_AVAILABLE) { 
    311        $current_locale = setlocale(LC_ALL, DEFAULT_LANG); 
  • trunk/wifidog-auth/wifidog/locale/fr/LC_MESSAGES/messages.po

    r343 r349  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: \n" 
    11 "POT-Creation-Date: 2005-01-15 00:23-0500\n" 
     11"POT-Creation-Date: 2005-01-18 10:30-0500\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    6464 
    6565#: smarty.txt:6 smarty.txt:24 smarty.txt:37 smarty.txt:38 smarty.txt:39 
     66#: smarty.txt:33 
    6667msgid "Re-send validation email" 
    6768msgstr "Renvoyez-moi le courriel de validation" 
     
    222223 
    223224#: smarty.txt:31 smarty.txt:35 smarty.txt:34 smarty.txt:44 smarty.txt:45 
    224 #: smarty.txt:46 smarty.txt:53 smarty.txt:54 
     225#: smarty.txt:46 smarty.txt:53 smarty.txt:54 smarty.txt:59 
    225226msgid "Online at this hotspot" 
    226227msgstr "En ligne &agrave; ce point d'acc&egrave;s sans-fil" 
    227228 
    228229#: smarty.txt:32 smarty.txt:36 smarty.txt:35 smarty.txt:45 smarty.txt:46 
    229 #: smarty.txt:47 smarty.txt:54 smarty.txt:55 
     230#: smarty.txt:47 smarty.txt:54 smarty.txt:55 smarty.txt:60 
    230231msgid "Go to the site I originally requested" 
    231232msgstr "Aller au site web que j'ai demand&eacute;" 
     
    240241 
    241242#: smarty.txt:33 smarty.txt:32 smarty.txt:42 smarty.txt:34 smarty.txt:43 
    242 #: smarty.txt:44 smarty.txt:36 smarty.txt:51 smarty.txt:52 
     243#: smarty.txt:44 smarty.txt:36 smarty.txt:51 smarty.txt:52 smarty.txt:41 
     244#: smarty.txt:57 
    243245msgid "Username (or email)" 
    244246msgstr "Usager (ou courriel)" 
     
    246248#: smarty.txt:34 smarty.txt:33 smarty.txt:43 smarty.txt:35 smarty.txt:44 
    247249#: smarty.txt:45 smarty.txt:37 smarty.txt:47 smarty.txt:52 smarty.txt:53 
     250#: smarty.txt:42 smarty.txt:58 
    248251msgid "Password" 
    249252msgstr "Mot de passe" 
     
    257260msgstr "Mot de passe incorrect (CAPS LOCK &agrave; actif?)" 
    258261 
    259 #: ../portal/index.php:117 
     262#: ../portal/index.php:117 ../portal/index.php:116 
    260263msgid "Error: " 
    261264msgstr "Erreur: " 
    262265 
    263 #: ../hotspot_status.php:68 
     266#: ../hotspot_status.php:68 ../hotspot_status.php:67 
    264267msgid "Newest" 
    265268msgstr "Plus r&eacute;cent" 
    266269 
    267 #: ../hotspot_status.php:68 
     270#: ../hotspot_status.php:68 ../hotspot_status.php:67 
    268271msgid "Hotspots" 
    269272msgstr "Noeuds sans-fil" 
    270273 
    271 #: ../hotspot_status.php:80 
     274#: ../hotspot_status.php:80 ../hotspot_status.php:79 
    272275msgid "WiFiDog list of the most recent HotSpots opened by " 
    273276msgstr "" 
    274277 
    275 #: ../hotspot_status.php:94 
     278#: ../hotspot_status.php:94 ../hotspot_status.php:93 
    276279msgid "Copyright " 
    277280msgstr "" 
    278281 
    279 #: ../hotspot_status.php:235 
     282#: ../hotspot_status.php:235 ../hotspot_status.php:234 
    280283msgid "Address:" 
    281284msgstr "Adresse:" 
    282285 
    283 #: ../hotspot_status.php:239 
     286#: ../hotspot_status.php:239 ../hotspot_status.php:238 
    284287msgid "Mass transit:" 
    285288msgstr "Transport en commun:" 
     
    319322msgstr "Noeud sans-fil" 
    320323 
    321 #: smarty.txt:35 smarty.txt:36 smarty.txt:38 
     324#: smarty.txt:35 smarty.txt:36 smarty.txt:38 smarty.txt:43 
    322325msgid "Login" 
    323326msgstr "Ouvrir une session" 
     
    355358msgstr "Ou encore" 
    356359 
    357 #: smarty.txt:32 smarty.txt:43 smarty.txt:51 
     360#: smarty.txt:32 smarty.txt:43 smarty.txt:51 smarty.txt:37 smarty.txt:48 
     361#: smarty.txt:56 
    358362msgid "FREE WIRELESS INTERNET" 
    359363msgstr "INTERNET SANS-FIL GRATUIT" 
    360364 
    361 #: smarty.txt:33 
     365#: smarty.txt:33 smarty.txt:38 
    362366msgid "Welcome to" 
    363367msgstr "Bienvenue chez" 
    364368 
    365 #: smarty.txt:34 
     369#: smarty.txt:34 smarty.txt:39 
    366370msgid "Please log-in or" 
    367371msgstr "Ouvrez une session ou" 
    368372 
    369 #: smarty.txt:35 
     373#: smarty.txt:35 smarty.txt:40 
    370374msgid "Sign-up, it's free!" 
    371375msgstr "Inscrivez-vous, c'est gratuit!" 
    372376 
    373 #: smarty.txt:39 
     377#: smarty.txt:39 smarty.txt:44 
    374378msgid "I already have an account, but" 
    375379msgstr "J'ai d&eacute;j&agrave; un usager, mais" 
    376380 
    377 #: smarty.txt:40 
     381#: smarty.txt:40 smarty.txt:45 
    378382msgid "I Forgot my username" 
    379383msgstr "J'ai oubli&eacute; mon nom d'usager" 
    380384 
    381 #: smarty.txt:41 
     385#: smarty.txt:41 smarty.txt:46 
    382386msgid "I Forgot my password" 
    383387msgstr "J'ai oubli&eacute; mon mot de passe" 
    384388 
    385 #: smarty.txt:42 
     389#: smarty.txt:42 smarty.txt:47 
    386390msgid "Re-send the validation email" 
    387391msgstr "Renvoyez-moi le courriel de validation" 
    388392 
    389 #: smarty.txt:44 
     393#: smarty.txt:44 smarty.txt:49 
    390394msgid "Register a free account with" 
    391395msgstr "" 
    392396 
    393 #: smarty.txt:45 
     397#: smarty.txt:45 smarty.txt:50 
    394398msgid "Username desired" 
    395399msgstr "Nom d'usager d&eacute;sir&eacute;" 
    396400 
    397 #: smarty.txt:46 
     401#: smarty.txt:46 smarty.txt:51 
    398402msgid "Your email address" 
    399403msgstr "Votre courriel" 
    400404 
    401 #: smarty.txt:48 
     405#: smarty.txt:48 smarty.txt:53 
    402406msgid "Password (again)" 
    403407msgstr "Mot de passe (encore)" 
    404408 
    405 #: smarty.txt:49 
     409#: smarty.txt:49 smarty.txt:54 
    406410msgid "Sign-up" 
    407411msgstr "Souscrire" 
    408412 
    409 #: smarty.txt:50 
     413#: smarty.txt:50 smarty.txt:55 
    410414msgid "" 
    411415"Your email address must be valid in order for your account to be activated" 
     
    414418"puisse &ecirc;tre activ&eacute;" 
    415419 
    416 #: ../signup.php:43 
     420#: ../signup.php:43 ../include/validation.php:9 
    417421msgid "Unable to locate " 
    418422msgstr "Impossible de trouver " 
    419423 
    420 #: ../signup.php:43 
     424#: ../signup.php:43 ../include/validation.php:9 
    421425msgid " in the database." 
    422426msgstr " dans la base de donn&eacute;e." 
    423427 
    424 #: ../signup.php:47 
     428#: ../signup.php:47 ../include/validation.php:13 
    425429msgid "The user is not in validation period." 
    426430msgstr "L'usager n'est pas en p&eacute;riode de validation." 
    427431 
    428 #: ../signup.php:50 
     432#: ../signup.php:50 ../include/validation.php:16 
    429433msgid "The validation token is empty." 
    430434msgstr "Le jeton de validation est vide." 
    431435 
    432 #: ../signup.php:66 
     436#: ../signup.php:66 ../include/validation.php:32 
    433437msgid "" 
    434438"An email with confirmation instructions was sent to your email address.  " 
     
    438442msgstr "" 
    439443"Un courriel incluant les instructions pour confirmer votre compte &agrave; " 
    440 "&eacute;t&eacute; envoy&eacute; &agrave; votre adresse courriel. Votre compte &agrave; " 
    441 "&eacute;t&eacute; accord&eacute; 15 minutes d'acc&egrave;s afin que vous " 
    442 "puissiez allez lire vos courriels et valider votre compte. Veuillez " 
    443 "maintenant aller &agrave; une adresse Internet distante afin d'obtenir une " 
    444 "page de saisie de mot de passe." 
    445  
    446 #: ../signup.php:80 
     444"&eacute;t&eacute; envoy&eacute; &agrave; votre adresse courriel. Votre " 
     445"compte &agrave; &eacute;t&eacute; accord&eacute; 15 minutes d'acc&egrave;s " 
     446"afin que vous puissiez allez lire vos courriels et valider votre compte. " 
     447"Veuillez maintenant aller &agrave; une adresse Internet distante afin " 
     448"d'obtenir une page de saisie de mot de passe." 
     449 
     450#: ../signup.php:80 ../signup.php:43 
    447451msgid "Username is required." 
    448452msgstr "Le nom d'utilisateur est requit." 
    449453 
    450 #: ../signup.php:82 
     454#: ../signup.php:82 ../signup.php:45 
    451455msgid "Username contains invalid characters." 
    452456msgstr "Le nom d'utilisateur contient des caract&egrave;res invalides." 
    453457 
    454 #: ../signup.php:84 
     458#: ../signup.php:84 ../signup.php:47 
    455459msgid "A valid email address is required." 
    456460msgstr "Une adresse courriel est requise." 
    457461 
    458 #: ../signup.php:86 
     462#: ../signup.php:86 ../signup.php:49 
    459463msgid "The email address must be of the form user@domain.com." 
    460 msgstr "" 
    461 "L'adresse courriel doit &ecirc;tre de la forme usager@domaine.com." 
    462  
    463 #: ../signup.php:88 
     464msgstr "L'adresse courriel doit &ecirc;tre de la forme usager@domaine.com." 
     465 
     466#: ../signup.php:88 ../signup.php:51 
    464467msgid "A password of at least 6 characters is required." 
    465468msgstr "Un mot de passe d'au moins 6 caract&egrave;res est requis." 
    466469 
    467 #: ../signup.php:90 
     470#: ../signup.php:90 ../signup.php:53 
    468471msgid "Password contains invalid characters." 
    469472msgstr "Le mot de passe contient des caract&egrave;res invalides." 
    470473 
    471 #: ../signup.php:92 
     474#: ../signup.php:92 ../signup.php:55 
    472475msgid "You must type your password twice." 
    473476msgstr "Vous devez entrer votre mot de passe deux fois pour le confirmer." 
    474477 
    475 #: ../signup.php:94 
     478#: ../signup.php:94 ../signup.php:57 
    476479msgid "Passwords do not match." 
    477480msgstr "Les mots de passe ne sont pas identiques." 
    478481 
    479 #: ../signup.php:96 
     482#: ../signup.php:96 ../signup.php:59 
    480483msgid "Password is too short, it must be 6 characters minimum." 
    481484msgstr "Mot de passe trop court, il doit contenir 6 caract&egrave;res minimum." 
    482485 
    483 #: ../signup.php:105 
     486#: ../signup.php:105 ../signup.php:68 
    484487msgid "" 
    485488"Sorry, a user account is already associated to this username. Pick another " 
     
    489492"&agrave; ce nom d'utilisateur. Choisissez en un autre." 
    490493 
    491 #: ../signup.php:107 
     494#: ../signup.php:107 ../signup.php:70 
    492495msgid "Sorry, this email address is already registered." 
    493496msgstr "" 
     
    495498"enregistr&eacute;e." 
    496499 
    497 #: ../signup.php:109 
     500#: ../signup.php:109 ../signup.php:72 
    498501msgid "Email me my username" 
    499502msgstr "Envoyez moi mon nom d'usager" 
    500503 
    501 #: ../signup.php:121 
     504#: ../signup.php:121 ../signup.php:84 
    502505msgid "An internal error occured, please contact us." 
    503506msgstr "Une erreur interne est survenue, veuillez nous contacter." 
     
    543546#: ../validate.php:55 ../validate.php:56 
    544547msgid "Sorry, your validation token is not valid!" 
    545 msgstr "D&eacute;sol&eacute;, votre jeton de validation n'est pas accept&eacute;!" 
     548msgstr "" 
     549"D&eacute;sol&eacute;, votre jeton de validation n'est pas accept&eacute;!" 
     550 
     551#: ../resend_validation.php:39 
     552msgid "Please specify a username" 
     553msgstr "" 
     554 
     555#: ../resend_validation.php:44 
     556msgid "Unable to find " 
     557msgstr "" 
     558 
     559#: ../resend_validation.php:44 
     560msgid " in the database" 
     561msgstr "" 
     562 
     563#: smarty.txt:34 
     564msgid "Your username" 
     565msgstr "" 
     566 
     567#: smarty.txt:35 
     568msgid "Re-send" 
     569msgstr "" 
     570 
     571#: smarty.txt:36 
     572msgid "" 
     573"Please enter your username and the validation email will be resent to your " 
     574"email address" 
     575msgstr "" 
  • trunk/wifidog-auth/wifidog/signup.php

    r332 r349  
    3333 
    3434include BASEPATH.'include/language.php'; 
    35  
    36 function send_validation_email($email) { 
    37     global $db; 
    38     global $smarty; 
    39  
    40     $user_info = null; 
    41     $db->ExecSqlUniqueRes("SELECT * FROM users WHERE email='$email'", $user_info, false); 
    42     if ($user_info == null) { 
    43         $smarty->assign("error", _("Unable to locate ") . $_REQUEST["email"] . _(" in the database.")); 
    44     } else { 
    45         if ($user_info['account_status'] != ACCOUNT_STATUS_VALIDATION) { 
    46             /* Note:  Do not display the username here, for privacy reasons */ 
    47             $smarty->assign("error", _("The user is not in validation period.")); 
    48             } else { 
    49             if (empty($user_info['validation_token'])) { 
    50                 $smarty->assign("error", _("The validation token is empty.")); 
    51             } else { 
    52                 $subject = VALIDATION_EMAIL_SUBJECT; 
    53                 $url = "http://" . $_SERVER["HTTP_HOST"] . "/validate.php?username=" . $_REQUEST["username"] . "&token=" . $user_info["validation_token"]; 
    54                 $body = "Hello! 
    55  
    56 Please follow the link below to validate your account. 
    57  
    58 $url 
    59  
    60 Thank you, 
    61  
    62 The Team"; 
    63                 $from = "From: " . VALIDATION_EMAIL_FROM_ADDRESS; 
    64  
    65                 mail($email, $subject, $body, $from); 
    66                 $smarty->append("message", _("An email with confirmation instructions was sent to your email address.  Your account has been granted 15 minutes of access to retrieve your email and validate your account.  You may now open a browser window and go to any remote Internet address to obtain the login page.")); 
    67                 $smarty->display("templates/validate.html"); 
    68                 exit; 
    69             } 
    70         } 
    71     } 
    72 } 
     35include BASEPATH.'include/mgmt_helpers.php'; 
    7336 
    7437if (isset($_REQUEST["submit"])) { 
     
    11780            $update_successful = $db->ExecSqlUpdate("INSERT INTO users (user_id,email,pass,account_status,validation_token,reg_date) VALUES ('{$_REQUEST["username"]}','{$_REQUEST["email"]}','$password_hash','{$status}','{$token}',NOW())"); 
    11881            if ($update_successful) { 
    119                 send_validation_email($_REQUEST["email"], $smarty); 
     82                send_validation_email($_REQUEST["email"]); 
    12083            } else { 
    12184                $smarty->assign("error", _("An internal error occured, please contact us.")); 
  • trunk/wifidog-auth/wifidog/templates/main.html

    r316 r349  
    44<li><a href='hotspot_status.php'>{"Deployed HotSpots status with coordinates"|_}</a></li> 
    55<li><a href='node_list.php'>{"Full node technical status (includes non-deployed nodes)"|_}</a></li> 
    6 <li><a href='user_management/index.php'>{"Personal user management"|_}</a></li> 
    76<li><a href='{$smarty.const.BASE_SSL_PATH}admin/index.php'>{"Administration"|_}</a></li> 
    87</ul> 
  • trunk/wifidog-auth/wifidog/templates/user_management_menu.html

    r337 r349  
    77<ul> 
    88    <li><a href='{$smarty.const.BASE_SSL_PATH}signup.php'>{"Create new account"|_}</a></li> 
    9     <li><a href='{$smarty.const.BASE_SSL_PATH}{$smarty.const.USER_MANAGEMENT_PAGE}?action=validation_email_form'>{"Re-send validation email"|_}</a></li> 
    10     <li><a href='{$smarty.const.BASE_SSL_PATH}{$smarty.const.USER_MANAGEMENT_PAGE}?action=lost_username_form'>{"Lost username"|_}</a></li> 
    11     <li><a href='{$smarty.const.BASE_SSL_PATH}{$smarty.const.USER_MANAGEMENT_PAGE}?action=lost_password_form'>{"Lost password"|_}</a></li> 
    12     <li><a href='{$smarty.const.BASE_SSL_PATH}{$smarty.const.USER_MANAGEMENT_PAGE}?action=change_password_form'>{"Change password"|_}</a></li> 
     9    <li><a href='{$smarty.const.BASE_SSL_PATH}resend_validation.php'>{"Re-send validation email"|_}</a></li> 
     10    <li><a href='{$smarty.const.BASE_SSL_PATH}lost_username.php'>{"Lost username"|_}</a></li> 
     11    <li><a href='{$smarty.const.BASE_SSL_PATH}lost_password.php'>{"Lost password"|_}</a></li> 
     12    <li><a href='{$smarty.const.BASE_SSL_PATH}change_password.php'>{"Change password"|_}</a></li> 
    1313</ul> 
    1414