Inscription
Pour vous connecter aux points d'accès ".HOTSPOT_NETWORK_NAME.", vous devez utiliser un nom d'utilisateur et un mot de passe.
Les comptes sont totalement gratuits pour tous ceux qui en font la demande.
Pour faire la demande d'un compte gratuit, veuillez choisir 'Create new account' dans le menu de gauche.
Sign up
".HOTSPOT_NETWORK_NAME." hotspots require you have a login and a password to utilize them.
Accounts are given absolutely free to anyone who requests them.
To request a free account, please choose 'Create new account' in the left menu.
"); } else { if(!empty($_REQUEST['username'])) { $username = $db->EscapeString(trim($_REQUEST['username'])); } else { $username = ''; } if(!empty($_REQUEST['email'])) { $email = $email = $db->EscapeString(trim($_REQUEST['email'])); } else { $email = ''; } /* Lost username */ if ($_REQUEST['action']=='lost_username_form') { display_lost_username_form(); }//End action==lost_info_form else if ($_REQUEST['action']=='mail_lost_username') { $user_info=null; if($email) { $db->ExecSqlUniqueRes("SELECT * FROM users WHERE email='$email'", $user_info, false); if($user_info==null) { echo ""._("Unable to find $email in the database.")."
\n"; } } else { echo ""._('You must specify your email address.')."
\n"; } if($user_info==null) { display_lost_username_form(); } else { send_lost_username_email($user_info['email']); } }//End action==mail_lost_username /* Lost password */ else if ($_REQUEST['action']=='lost_password_form') { display_lost_password_form(); }//End action==lost_info_form else if ($_REQUEST['action']=='mail_new_password') { $user_info=null; if(empty($_REQUEST['confirm_new_password']) || $_REQUEST['confirm_new_password']!='true') { echo ""._("This will destroy your previous password, you must confirm this operation.")."
\n"; } else { if($username) { $db->ExecSqlUniqueRes("SELECT * FROM users WHERE user_id='$username'", $user_info, false); if($user_info==null) { echo ""._("Unable to find $username in the database.")."
\n"; } } else if($email) { $db->ExecSqlUniqueRes("SELECT * FROM users WHERE email='$email'", $user_info, false); if($user_info==null) { echo ""._("Unable to find $email in the database.")."
\n"; } } else { echo ""._('Your must specify either your username or your email.')."
\n"; } } if($user_info==null) { display_lost_password_form(); } else { $new_password=randompass(); $password_hash = get_password_hash($new_password); $update_successful = $db->ExecSqlUpdate("UPDATE users SET pass='$password_hash' WHERE user_id='$user_info[user_id]'"); if ($update_successful) { send_lost_password_email($user_info['email'], $new_password); $showform=false; } else { echo ""._('Internal error.')."
\n"; } } }//End action==mail_new_password /* Change password */ else if ($_REQUEST['action']=='change_password_form') { display_change_password_form(); } else if ($_REQUEST['action']=='change_password') { $pass = $db->EscapeString(trim($_REQUEST['pass'])); $new_pass = $db->EscapeString(trim($_REQUEST['new_pass'])); $preconditions_ok = false; $db->ExecSqlUniqueRes("SELECT * FROM users WHERE user_id='$username'", $user_info, false); if($user_info==null) { echo ""._("Unable to find $username in the database.")."
\n"; } else { $user_info=null; $password_hash = get_password_hash($pass); $db->ExecSqlUniqueRes("SELECT * FROM users WHERE user_id='$username' AND pass='$password_hash'", $user_info, false); if($user_info==null) { echo ""._("Wrong password for $username.")."
\n"; } else { if ($_REQUEST['new_pass'] != $_REQUEST['new_pass_again']) { echo ""._('The two passwords do not match.')."
\n"; } else { if (empty($new_pass)) { echo ""._('Sorry, empty passwords are not allowed.')."
\n"; } else { $preconditions_ok = true; } } } } if( $preconditions_ok == true) { $password_hash = get_password_hash($new_pass); $update_successful = $db->ExecSqlUpdate("UPDATE users SET pass='$password_hash' WHERE user_id='$user_info[user_id]'"); if ($update_successful) { echo ""._('Your password was successfully changed.')."
\n"; } else { echo ""._('Internal error.')."
\n"; } } else { display_change_password_form(); } }//End action==change_password /*********** New account and validation ********/ else if ($_REQUEST['action']=='register_new_account_form') { display_register_form(); } else if ($_REQUEST['action']=='create_new_account') { $pass = $db->EscapeString(trim($_REQUEST['pass'])); /* Check for dublicate email in the database */ $preconditions_ok = false; $db->ExecSqlUniqueRes("SELECT * FROM users WHERE user_id='$username'", $user_info_username, false); if($user_info_username!=null) { echo ""._('Sorry, a user account is already associated to this username. You will have to chose another.')."
\n"; } else { $db->ExecSqlUniqueRes("SELECT * FROM users WHERE email='$email'", $user_info_email, false); if($user_info_email!=null) { echo ""._('Sorry, a user account is already associated to the email adress: ')."
\n"; echo ""._('If it really is your email, I can'); echo " " . _('send you your username by email')."\n"; echo _(', or even ')."\n"; echo " " . _('send you a new password by email').""."
\n"; } else { if ($_REQUEST['pass'] != $_REQUEST['pass_again']) { echo ""._('The two passwords do not match.')."
\n"; } else { if (empty($_REQUEST['pass'])) { echo ""._('Sorry, empty passwords are not allowed.')."
\n"; } else { $preconditions_ok = true; } } } } if( $preconditions_ok == true) { $status = ACCOUNT_STATUS_VALIDATION; $token = gentoken(); $password_hash = get_password_hash($pass); $update_successful = $db->ExecSqlUpdate("INSERT INTO users (user_id,email,pass,account_status,validation_token,reg_date) VALUES ('$username','$email','$password_hash','{$status}','{$token}',NOW())"); if ($update_successful) { send_validation_email($email); $showform=false; } else { echo ""._('Internal error.')."
\n"; } } if($showform==true) { //No action was performed successfully display_register_form(); } }//End action==create_new_account elseif ($_REQUEST['action']=='validate') { $validation_token = $db->EscapeString($_REQUEST['validation_token']); $db->ExecSqlUniqueRes("SELECT * FROM users WHERE user_id='$username' AND validation_token='$validation_token'", $user_info); if ($user_info!=null) { if($user_info['account_status']==ACCOUNT_STATUS_ALLOWED) { echo ""._('Your account was already activated.')."
\n"; } else { $status = $db->EscapeString(ACCOUNT_STATUS_ALLOWED); $update_successful = $db->ExecSqlUpdate("UPDATE users SET account_status='{$status}' WHERE user_id='$username' AND validation_token='$validation_token'"); if ($update_successful) { echo ""._('Your account has succesfully activated! Enjoy!')."
\n"; $showform=false; } else { echo ""._('Internal error.')."
\n"; } } } else { echo ""._("Sorry, validation token $validation_token is not valid!")."
\n"; } }//End action==validate else if ($_REQUEST['action']=='validation_email_form') { display_validation_email_form(); }//end action==validation_email_form else if ($_REQUEST['action']=='send_validation_email') { $db->ExecSqlUniqueRes("SELECT * FROM users WHERE user_id='$username'", $user_info, false); if($user_info==null) { echo ""._("Unable to find $username in the database.")."
\n"; } else { send_validation_email($user_info['email']); } }//end action==send_validation_email } echo "