+
+
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/include/constants.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/include/constants.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/include/constants.php (revision 4167)
@@ -0,0 +1,5 @@
+
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/include/functions_UserAdvManager.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/include/functions_UserAdvManager.inc.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/include/functions_UserAdvManager.inc.php (revision 4167)
@@ -0,0 +1,905 @@
+ '' ? $password : l10n('UserAdvManager_empty_pwd');
+
+ if ( function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[10]) and $conf_nbc_UserAdvManager[10] <> '' )
+ $infos1_perso = get_user_language_desc($conf_nbc_UserAdvManager[10])."\n\n";
+
+ break;
+
+ case 2:
+ $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', $username));
+ $password = $password <> '' ? $password : l10n('UserAdvManager_empty_pwd');
+
+ break;
+
+ case 3:
+ $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', $username));
+ $password = $password <> '' ? $password : l10n('UserAdvManager_no_update_pwd');
+
+ break;
+ }
+
+ if ( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true' )
+ {
+ $infos1 = array(
+ get_l10n_args('infos_mail %s', $username),
+ get_l10n_args('User: %s', $username),
+ get_l10n_args('Password: %s', $password),
+ get_l10n_args('Email: %s', $email),
+ get_l10n_args('', ''),
+ );
+ }
+
+
+ if ( isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true' and $confirm)
+ {
+ $infos2 = array
+ (
+ get_l10n_args('Link: %s', AddConfirmMail($id, $email)),
+ get_l10n_args('', ''),
+ );
+
+ if ( function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '' )
+ $infos2_perso = get_user_language_desc($conf_nbc_UserAdvManager[11])."\n\n";
+ }
+
+ pwg_mail($email, array(
+ 'subject' => $subject,
+ 'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
+ ));
+
+/* ********************** */
+/* Email sending debugger */
+/* This is only to trace */
+/* the send of emails for */
+/* debugging */
+/* ********************** */
+// MailLog($email,$subject);
+/* ********************** */
+}
+
+
+/* Email sending debugger function */
+//function MailLog ($to, $subject)
+//{
+// $fo=fopen (NBC_UserAdvManager_PATH.'admin/maillog.txt','a') ;
+// fwrite($fo,"======================\n") ;
+// fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n");
+// fwrite($fo,$to . "\n" . $subject . "\r\n") ;
+// fclose($fo) ;
+ //return mail ($to,$subject) ;
+//}
+
+
+/* Function called from UserAdvManager_admin.php to resend validation email with or without new validation key */
+function ResendMail2User($typemail, $user_id, $username, $email, $confirm)
+{
+ global $conf;
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+ $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
+
+ include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+
+ $infos1_perso = "";
+ $infos2_perso = "";
+
+ switch($typemail)
+ {
+ case 1:
+ $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_with_key_of_%s', $username));
+
+ if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and $confirm)
+ {
+ $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
+
+ $infos2 = array
+ (
+ get_l10n_args('Link: %s', ResetConfirmMail($user_id)),
+ get_l10n_args('', ''),
+ );
+ }
+ break;
+
+ case 2:
+ $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_without_key_of_%s', $username));
+
+ if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and !$confirm)
+ {
+ $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
+ }
+ break;
+ }
+ pwg_mail($email, array(
+ 'subject' => $subject,
+ 'content' => ($infos1."\n\n").(isset($infos2) ? l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
+ ));
+
+/* ********************** */
+/* Email sending debugger */
+/* This is only to trace */
+/* the send of emails for */
+/* debugging */
+/* ********************** */
+// MailLog($email,$subject);
+/* ********************** */
+}
+
+
+/* Function called from UserAdvManager_admin.php to send a reminder mail for ghost users */
+function ghostreminder($user_id, $username, $email)
+{
+ global $conf;
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+
+ $infos1_perso = "";
+
+ $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Ghost_remainder_of_%s', $username));
+
+ if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[19]) and $conf_nbc_UserAdvManager[19] <> '' and isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true')
+ {
+ $infos1 = get_user_language_desc($conf_nbc_UserAdvManager[19])."\n\n";
+ resetlastvisit($user_id);
+ }
+
+ pwg_mail($email, array(
+ 'subject' => $subject,
+ 'content' => $infos1.get_absolute_root_url(),
+ ));
+
+/* ********************** */
+/* Email sending debugger */
+/* This is only to trace */
+/* the send of emails for */
+/* debugging */
+/* ********************** */
+// MailLog($email,$subject);
+/* ********************** */
+}
+
+
+/* Function called from functions AddConfirmMail and ResetConfirmMail for validation key generation */
+function FindAvailableConfirmMailID()
+{
+ while (true)
+ {
+ $id = generate_key(16);
+ $query = "
+SELECT COUNT(*)
+ FROM ".USER_CONFIRM_MAIL_TABLE."
+WHERE id = '".$id."'
+;";
+ list($count) = mysql_fetch_row(pwg_query($query));
+
+ if ($count == 0)
+ return $id;
+ }
+}
+
+
+/* Function called from functions SendMail2User to process unvalidated users and generate validation key link */
+function AddConfirmMail($user_id, $email)
+{
+ global $conf;
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+ $Confirm_Mail_ID = FindAvailableConfirmMailID();
+
+ list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+ if (isset($Confirm_Mail_ID))
+ {
+ $query = "
+SELECT status
+ FROM ".USER_INFOS_TABLE."
+WHERE user_id = '".$user_id."'
+;";
+ list($status) = mysql_fetch_row(pwg_query($query));
+
+ $query = "
+INSERT INTO ".USER_CONFIRM_MAIL_TABLE."
+ (id, user_id, mail_address, status, date_check)
+VALUES
+ ('".$Confirm_Mail_ID."', '".$user_id."', '".$email."', '".$status."', null)
+;";
+ pwg_query($query);
+
+ $query = "
+DELETE FROM ".USER_GROUP_TABLE."
+WHERE user_id = '".$user_id."'
+ AND (
+ group_id = '".$conf_nbc_UserAdvManager[3]."'
+ OR
+ group_id = '".$conf_nbc_UserAdvManager[4]."'
+ )
+;";
+ pwg_query($query);
+
+ if (!is_admin() and $conf_nbc_UserAdvManager[9] <> -1)
+ {
+ $query = "
+UPDATE ".USER_INFOS_TABLE."
+SET status = '".$conf_nbc_UserAdvManager[9]."'
+WHERE user_id = '".$user_id."'
+;";
+ pwg_query($query);
+ }
+
+ if ( $conf_nbc_UserAdvManager[3] <> -1 )
+ {
+ $query = "
+INSERT INTO ".USER_GROUP_TABLE."
+ (user_id, group_id)
+VALUES
+ ('".$user_id."', '".$conf_nbc_UserAdvManager[3]."')
+;";
+ pwg_query($query);
+ }
+
+ return get_absolute_root_url().NBC_UserAdvManager_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID;
+ }
+}
+
+
+/* Function called from UserAdvManager_admin.php to reset validation key */
+function ResetConfirmMail($user_id)
+{
+ global $conf;
+
+ $Confirm_Mail_ID = FindAvailableConfirmMailID();
+
+ list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+ if (isset($Confirm_Mail_ID))
+ {
+ $query = "
+UPDATE ".USER_CONFIRM_MAIL_TABLE."
+SET id = '".$Confirm_Mail_ID."'
+WHERE user_id = '".$user_id."'
+;";
+ pwg_query($query);
+
+ $query = "
+UPDATE ".USER_INFOS_TABLE."
+SET registration_date = '".$dbnow."'
+WHERE user_id = '".$user_id."'
+;";
+ pwg_query($query);
+
+ return get_absolute_root_url().NBC_UserAdvManager_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID;
+ }
+}
+
+
+/* Function called from function_UserAdvManager.inc.php to reset last visit date after sending a reminder */
+function resetlastvisit($user_id)
+{
+ global $conf;
+
+ list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+ $query = "
+UPDATE ".USER_LASTVISIT_TABLE."
+SET lastvisit = '".$dbnow."', reminder = 'true'
+WHERE user_id = '".$user_id."'
+;";
+ pwg_query($query);
+}
+
+
+/* Function called from main.inc.php - Triggered on user deletion */
+function DeleteConfirmMail($user_id)
+{
+ $query = "
+DELETE FROM ".USER_CONFIRM_MAIL_TABLE."
+WHERE user_id = '".$user_id."'
+;";
+ pwg_query($query);
+}
+
+/* Function called from main.inc.php - Triggered on user deletion */
+function DeleteLastVisit($user_id)
+{
+ $query = "
+DELETE FROM ".USER_LASTVISIT_TABLE."
+WHERE user_id = '".$user_id."'
+;";
+ pwg_query($query);
+}
+
+/* Function called from ConfirmMail.php to verify validation key used by user according time limit */
+function VerifyConfirmMail($id)
+{
+ global $conf;
+
+ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+ $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
+
+ $query = "
+SELECT COUNT(*)
+FROM ".USER_CONFIRM_MAIL_TABLE."
+WHERE id = '".$id."'
+;";
+ list($count) = mysql_fetch_row(pwg_query($query));
+
+ if ($count == 1)
+ {
+ $query = "
+SELECT user_id, status, date_check
+FROM ".USER_CONFIRM_MAIL_TABLE."
+WHERE id = '".$id."'
+;";
+ $data = mysql_fetch_array(pwg_query($query));
+
+ if (!empty($data) and isset($data['user_id']) and !isset($data['date_check']))
+ {
+ $query = "
+SELECT registration_date
+FROM ".USER_INFOS_TABLE."
+WHERE user_id = '".$data['user_id']."'
+;";
+ list($registration_date) = mysql_fetch_row(pwg_query($query));
+
+/* Time limit process */
+/* ****************** begin ******************* */
+ if (!empty($registration_date))
+ {
+ // Verify Confirmmail with time limit ON
+ if (isset ($conf_nbc_UserAdvManager_ConfirmMail[1]))
+ {
+ // dates formating and compare
+ $today = date("d-m-Y"); // Get today's date
+ list($day, $month, $year) = explode('-', $today); // explode date of today
+ $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
+
+ list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
+ list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
+ $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
+
+ $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps
+ $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
+
+ // Condition with the value set for time limit
+ if ($deltadays <= $conf_nbc_UserAdvManager_ConfirmMail[1]) // If Nb of days is less than the limit set
+ {
+ list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+ $query = '
+UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+SET date_check="'.$dbnow.'"
+WHERE id = "'.$id.'"
+;';
+ pwg_query($query);
+
+ if ($conf_nbc_UserAdvManager[3] <> -1) // Delete user from unvalidated users group
+ {
+ $query = "
+DELETE FROM ".USER_GROUP_TABLE."
+WHERE user_id = '".$data['user_id']."'
+ AND group_id = '".$conf_nbc_UserAdvManager[3]."'
+;";
+ pwg_query($query);
+ }
+
+ if ($conf_nbc_UserAdvManager[4] <> -1) // Add user to validated users group
+ {
+ $query = "
+INSERT INTO ".USER_GROUP_TABLE."
+ (user_id, group_id)
+VALUES
+ ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')
+;";
+ pwg_query($query);
+ }
+
+ if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']))) // Change user's status
+ {
+ $query = "
+UPDATE ".USER_INFOS_TABLE."
+SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'
+WHERE user_id = '".$data['user_id']."'
+;";
+ pwg_query($query);
+ }
+ // Refresh user's category cache
+ invalidate_user_cache();
+
+ return true;
+ }
+ elseif ($deltadays > $conf_nbc_UserAdvManager_ConfirmMail[1]) // If timelimit exeeds
+ {
+ return false;
+ }
+ }
+ // Verify Confirmmail with time limit OFF
+ else
+ {
+ list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+ $query = '
+UPDATE '.USER_CONFIRM_MAIL_TABLE.'
+SET date_check="'.$dbnow.'"
+WHERE id = "'.$id.'"
+;';
+ pwg_query($query);
+
+ if ($conf_nbc_UserAdvManager[3] <> -1)
+ {
+ $query = "
+DELETE FROM ".USER_GROUP_TABLE."
+WHERE user_id = '".$data['user_id']."'
+AND group_id = '".$conf_nbc_UserAdvManager[3]."'
+;";
+ pwg_query($query);
+ }
+
+ if ($conf_nbc_UserAdvManager[4] <> -1)
+ {
+ $query = "
+DELETE FROM ".USER_GROUP_TABLE."
+WHERE user_id = '".$data['user_id']."'
+AND group_id = '".$conf_nbc_UserAdvManager[4]."'
+;";
+ pwg_query($query);
+
+ $query = "
+INSERT INTO ".USER_GROUP_TABLE."
+ (user_id, group_id)
+VALUES
+ ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')
+;";
+ pwg_query($query);
+ }
+
+ if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status'])))
+ {
+ $query = "
+UPDATE ".USER_INFOS_TABLE."
+SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'
+WHERE user_id = '".$data['user_id']."'
+;";
+ pwg_query($query);
+ }
+ // Refresh user's category cache
+ invalidate_user_cache();
+
+ return true;
+ }
+ }
+ }
+ }
+ else
+ return false;
+}
+
+/* Function called from UserAdvManager_admin.php to force users validation by admin */
+function ForceValidation($id)
+{
+ global $conf;
+
+ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ $query = "
+SELECT COUNT(*)
+ FROM ".USER_CONFIRM_MAIL_TABLE."
+WHERE user_id = '".$id."'
+;";
+ list($count) = mysql_fetch_row(pwg_query($query));
+
+ if ($count == 1)
+ {
+ $query = "
+SELECT user_id, status, date_check
+ FROM ".USER_CONFIRM_MAIL_TABLE."
+WHERE user_id = '".$id."'
+;";
+ $data = mysql_fetch_array(pwg_query($query));
+
+ if (!empty($data) and isset($data['user_id']) and !isset($data['date_check']))
+ {
+ list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+
+ $query = "
+UPDATE ".USER_CONFIRM_MAIL_TABLE."
+SET date_check='".$dbnow."'
+WHERE user_id = '".$data['user_id']."'
+;";
+ pwg_query($query);
+
+ if ($conf_nbc_UserAdvManager[3] <> -1)
+ {
+ $query = "
+DELETE FROM ".USER_GROUP_TABLE."
+WHERE user_id = '".$data['user_id']."'
+ AND group_id = '".$conf_nbc_UserAdvManager[3]."'
+;";
+ pwg_query($query);
+ }
+
+ if ($conf_nbc_UserAdvManager[4] <> -1)
+ {
+ $query = "
+DELETE FROM ".USER_GROUP_TABLE."
+WHERE user_id = '".$data['user_id']."'
+ AND group_id = '".$conf_nbc_UserAdvManager[4]."'
+ ;";
+ pwg_query($query);
+
+ $query = "
+INSERT INTO ".USER_GROUP_TABLE."
+ (user_id, group_id)
+VALUES
+ ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')
+;";
+ pwg_query($query);
+ }
+
+ if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status'])))
+ {
+ $query = "
+UPDATE ".USER_INFOS_TABLE."
+SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'
+WHERE user_id = '".$data['user_id']."'
+;";
+ pwg_query($query);
+ }
+ // Refresh user's category cache
+ invalidate_user_cache();
+ return true;
+ }
+ }
+}
+
+/* Function called from main.inc.php - Get username case insensitive */
+function NotSensibleSearchUsername($username)
+{
+ global $conf;
+
+ if (isset($username))
+ {
+ $query = "
+SELECT ".$conf['user_fields']['username']."
+ FROM ".USERS_TABLE."
+WHERE LOWER(".$conf['user_fields']['username'].") = '".strtolower($username)."'
+;";
+ list($username) = mysql_fetch_row(pwg_query($query));
+
+ return isset($username) ? $username : '';
+ }
+}
+
+
+/* Function called from main.inc.php - Check if username matches forbidden caracters */
+function ValidateUsername($login)
+{
+ global $conf;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ if (isset($login) and isset($conf_nbc_UserAdvManager[8]) and $conf_nbc_UserAdvManager[8] <> '')
+ {
+ $pattern = '/'.$conf_nbc_UserAdvManager[8].'/';
+ if ( preg_match($pattern, $login) )
+ return false;
+ else
+ return true;
+ }
+ else
+ {
+ return true;
+ }
+}
+
+
+/* Function called from main.inc.php - Check if user's email is in excluded email providers list */
+function ValidateEmailProvider($email)
+{
+ global $conf;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+ if (isset($conf_nbc_UserAdvManager[12]))
+ {
+ $ncsemail = strtolower($email);
+ $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);
+ for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)
+ {
+ $pattern = '/'.$conf_nbc_MailExclusion[$i].'/';
+ if (preg_match($pattern, $ncsemail))
+ return false;
+ else
+ return true;
+ }
+ }
+}
+
+
+/* Function called from UserAdvManager.php - Get unvalidated users according time limit */
+function get_unvalid_user_list()
+{
+ global $conf, $page;
+
+ /* Get ConfirmMail configuration */
+ $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
+
+ /* Get UserAdvManager configuration */
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ $users = array();
+
+ /* search users depending expiration date */
+ $query = '
+SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
+ u.'.$conf['user_fields']['username'].' AS username,
+ u.'.$conf['user_fields']['email'].' AS email,
+ ui.status,
+ ui.adviser,
+ ui.enabled_high,
+ ui.level,
+ ui.registration_date
+FROM '.USERS_TABLE.' AS u
+ INNER JOIN '.USER_INFOS_TABLE.' AS ui
+ ON u.'.$conf['user_fields']['id'].' = ui.user_id
+ LEFT JOIN '.USER_GROUP_TABLE.' AS ug
+ ON u.'.$conf['user_fields']['id'].' = ug.user_id
+WHERE u.'.$conf['user_fields']['id'].' >= 3
+ AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'"
+ OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'")';
+
+ if ($conf_nbc_UserAdvManager[3] <> '-1' and $conf_nbc_UserAdvManager[9] == '-1')
+ {
+ $query.= '
+ AND ug.group_id = '.$conf_nbc_UserAdvManager[3];
+ }
+ if ($conf_nbc_UserAdvManager[3] == '-1' and $conf_nbc_UserAdvManager[9] <> '-1')
+ {
+ $query.= '
+ AND ui.status = \''.$conf_nbc_UserAdvManager[9]."'";
+ }
+ if ($conf_nbc_UserAdvManager[3] <> '-1' and $conf_nbc_UserAdvManager[9] <> '-1')
+ {
+ $query.= '
+ AND ug.group_id = \''.$conf_nbc_UserAdvManager[3]."'";
+ }
+ $query.= '
+ORDER BY id ASC
+;';
+
+ $result = pwg_query($query);
+
+ while ($row = mysql_fetch_array($result))
+ {
+ $user = $row;
+ $user['groups'] = array();
+
+ array_push($users, $user);
+ }
+
+ /* add group lists */
+ $user_ids = array();
+ foreach ($users as $i => $user)
+ {
+ $user_ids[$i] = $user['id'];
+ }
+
+ $user_nums = array_flip($user_ids);
+
+ if (count($user_ids) > 0)
+ {
+ $query = '
+SELECT user_id, group_id
+ FROM '.USER_GROUP_TABLE.'
+WHERE user_id IN ('.implode(',', $user_ids).')
+;';
+
+ $result = pwg_query($query);
+
+ while ($row = mysql_fetch_array($result))
+ {
+ array_push(
+ $users[$user_nums[$row['user_id']]]['groups'],
+ $row['group_id']
+ );
+ }
+ }
+
+ return $users;
+}
+
+
+/* Function called from UserAdvManager.php - Get ghost users */
+function get_ghost_user_list()
+{
+ global $conf, $page;
+
+ /* Get UserAdvManager configuration */
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ $users = array();
+
+ /* search users depending expiration date */
+ $query = '
+SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
+ u.'.$conf['user_fields']['username'].' AS username,
+ u.'.$conf['user_fields']['email'].' AS email,
+ lv.lastvisit,
+ lv.reminder
+FROM '.USERS_TABLE.' AS u
+ INNER JOIN '.USER_LASTVISIT_TABLE.' AS lv
+ ON u.'.$conf['user_fields']['id'].' = lv.user_id
+WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_nbc_UserAdvManager[18].'")
+ORDER BY id ASC;';
+
+ $result = pwg_query($query);
+
+ while ($row = mysql_fetch_array($result))
+ {
+ $user = $row;
+ $user['groups'] = array();
+
+ array_push($users, $user);
+ }
+
+ /* add group lists */
+ $user_ids = array();
+ foreach ($users as $i => $user)
+ {
+ $user_ids[$i] = $user['id'];
+ }
+
+ return $users;
+}
+
+
+/* Function called from UserAdvManager.php - to determine who is expired or not and giving a different display color */
+function expiration($id)
+{
+ global $conf, $page;
+
+ /* Get ConfirmMail configuration */
+ $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
+
+ /* Get UserAdvManager configuration */
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ $query = "
+SELECT registration_date
+ FROM ".USER_INFOS_TABLE."
+WHERE user_id = '".$id."'
+;";
+ list($registration_date) = mysql_fetch_row(pwg_query($query));
+
+/* Time limit process */
+/* ****************** begin ******************* */
+ if (!empty($registration_date))
+ {
+ // dates formating and compare
+ $today = date("d-m-Y"); // Get today's date
+ list($day, $month, $year) = explode('-', $today); // explode date of today
+ $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
+
+ list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
+ list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
+ $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
+
+ $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps
+ $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
+
+ // Condition with the value set for time limit
+ if ($deltadays <= $conf_nbc_UserAdvManager_ConfirmMail[1]) // If Nb of days is less than the limit set
+ {
+ return false;
+ }
+ else
+ {
+ return True;
+ }
+ }
+}
+
+
+/**
+ * Returns a password's score for password complexity check
+ *
+ * @param password filled by user
+ *
+ * Thanx to MathieuGut from http://m-gut.developpez.com
+ */
+function testpassword($password) // Le mot de passe passé en paramètre - $password given by user
+{
+
+ // Initialisation des variables - Variables initiation
+ $points = 0;
+ $point_lowercase = 0;
+ $point_uppercase = 0;
+ $point_numbers = 0;
+ $point_characters = 0;
+
+ // On récupère la longueur du mot de passe - Getting password lengh
+ $length = strlen($password);
+
+ // On fait une boucle pour lire chaque lettre - Loop to read password characters
+ for($i = 0; $i < $length; $i++)
+ {
+ // On sélectionne une à une chaque lettre - Select each letters
+ // $i étant à 0 lors du premier passage de la boucle - $i is 0 at first turn
+ $letters = $password[$i];
+
+ if ($letters>='a' && $letters<='z')
+ {
+ // On ajoute 1 point pour une minuscule - Adding 1 point to score for a lowercase
+ $points = $points + 1;
+
+ // On rajoute le bonus pour une minuscule - Adding bonus points for lowercase
+ $point_lowercase = 1;
+ }
+ else if ($letters>='A' && $letters <='Z')
+ {
+ // On ajoute 2 points pour une majuscule - Adding 2 points to score for uppercase
+ $points = $points + 2;
+
+ // On rajoute le bonus pour une majuscule - Adding bonus points for uppercase
+ $point_uppercase = 2;
+ }
+ else if ($letters>='0' && $letters<='9')
+ {
+ // On ajoute 3 points pour un chiffre - Adding 3 points to score for numbers
+ $points = $points + 3;
+
+ // On rajoute le bonus pour un chiffre - Adding bonus points for numbers
+ $point_numbers = 3;
+ }
+ else
+ {
+ // On ajoute 5 points pour un caractère autre - Adding 5 points to score for special characters
+ $points = $points + 5;
+
+ // On rajoute le bonus pour un caractère autre - Adding bonus points for special characters
+ $point_characters = 5;
+ }
+ }
+
+ // Calcul du coefficient points/longueur - calculating the coefficient points / length
+ $step1 = $points / $length;
+
+ // Calcul du coefficient de la diversité des types de caractères... - Calculation of the diversity of character types...
+ $step2 = $point_lowercase + $point_uppercase + $point_numbers + $point_characters;
+
+ // Multiplication du coefficient de diversité avec celui de la longueur - Multiplying the coefficient of diversity with that of the length
+ $score = $step1 * $step2;
+
+ // Multiplication du résultat par la longueur de la chaîne - Multiplying the result by the length of the chain
+ $finalscore = $score * $length;
+
+ return $finalscore;
+}
+
+/* Function called from maintain.inc.php - to check if database upgrade is needed */
+function table_exist($table)
+{
+ $query = 'DESC '.$table.';';
+ return (bool)($res=mysql_query($query));
+}
+?>
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/include/index.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/include/index.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/include/index.php (revision 4167)
@@ -0,0 +1,33 @@
+
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/index.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/index.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/index.php (revision 4167)
@@ -0,0 +1,33 @@
+
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/language/en_UK/index.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/language/en_UK/index.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/language/en_UK/index.php (revision 4167)
@@ -0,0 +1,33 @@
+
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/language/en_UK/plugin.lang.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/language/en_UK/plugin.lang.php (revision 4167)
@@ -0,0 +1,196 @@
+(!!! WARNING !Text modification is available ONLY if Mail information user is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+$lang['UserAdvManager_No_Casse'] = ' User insensitive';
+$lang['UserAdvManager_No_Casse_true'] = ' Make the user account insensitive at the registration and the identification step';
+$lang['UserAdvManager_No_Casse_false'] = ' Let the user-sensitive. (default)';
+$lang['UserAdvManager_Username_Char'] = ' Limited charset for unsername';
+$lang['UserAdvManager_Username_Char_true'] = ' The following characters will be forbidden for username choice';
+$lang['UserAdvManager_Username_Char_false'] = ' Use the default username charset control. (default)';
+$lang['UserAdvManager_Confirm_Mail'] = 'Email address confirmation:';
+$lang['UserAdvManager_Confirm_Mail_true'] = ' Send an email to user to allow him to validate his email and his registration.';
+$lang['UserAdvManager_Confirm_Mail_false'] = ' Use the default Piwigo registration system (without registration validation). (default)';
+$lang['UserAdvManager_ConfirmMail_Text'] = ' Text used to introduce the email sent to user to allow him to validate his email address (!!! WARNING !Text modification is available ONLY if Email address confirmation is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+$lang['UserAdvManager_Confirm_Group_Notice'] = 'WARNING : Using validation groups requires that you have created at least one user group and is defined "by default" in Piwigo\'s user groups management.';
+$lang['UserAdvManager_No_Confirm_Group'] = 'Group to use for the users who haven\'t validated their email address.';
+$lang['UserAdvManager_Validated_Group'] = 'Group to use for the users who have validated their email address.';
+$lang['UserAdvManager_Confirm_Status_Notice'] = 'WARNING : The use of status validation requires that you have kept the "Guest" user with default setting (as user template) for new registered. Note you can set any other user as a template for new registered. Please refer to the Piwigo\'s documentation for more details.';
+$lang['UserAdvManager_No_Confirm_Status'] = 'Status to use for the users who haven\'t validated their email address.';
+$lang['UserAdvManager_Validated_Status'] = 'Status to use for the users who have validated their email address. Let ------- for using default Piwigo values';
+$lang['UserAdvManager_No_Comment_Anonymous'] = 'Nickname are mandatory for comments';
+$lang['UserAdvManager_No_Comment_Anonymous_true'] = ' The author field have to be filled to send a comment.';
+$lang['UserAdvManager_No_Comment_Anonymous_false'] = ' Use the default Piwigo settings on comments sending. (default)';
+$lang['UserAdvManager_MailExclusion'] = 'Email provider exclusion:';
+$lang['UserAdvManager_MailExclusion_true'] = ' Set the email provider exclusion ON (i.e. : @hotmail.* or @msn.*)';
+$lang['UserAdvManager_MailExclusion_false'] = ' Set the email provider exclusion OFF. (default)';
+$lang['UserAdvManager_MailExclusion_List'] = ' If email provider exclusion is set to ON, fill the email domains to exclude below. You have to use the following format : @[domaine_name].[domaine_extension] - Example : @hotmail.com Seperate the different domains with a comma (,) ';
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+$lang['UserAdvManager_Title1'] = 'Users registration management';
+$lang['UserAdvManager_Title2'] = 'Registration validation and groups / status management';
+$lang['UserAdvManager_Password_Enforced'] = 'Strengthening passwords - Enabling this option makes the seizure of the password required for visitors registration. Also, the password entered by the visitor will meet with a score of complexity (activate and save settings to display more informations).';
+$lang['UserAdvManager_Password_Enforced_Info'] = 'Explanations:A password score is calculated on the basic parameters: length, type of characters used (letters, digits, uppercase, lowercase, special characters). If the password of the user does not score, the score reached is displayed with the minimal score to reach and an indication to increase the value of this score. To give you an idea, a score below 100 is considered "low complexity". Between 100 and 500, the complexity is increased and average. Beyond 500, that\'s Fort Knox! ;-) You can do your passwords complexity tests by using the field below. This will allow you to get an idea of the score to define a custom complexity.';
+$lang['UserAdvManager_PasswordTest'] = 'Passowrd to test : ';
+$lang['UserAdvManager_ScoreTest'] = 'Score : ';
+$lang['PasswordTest'] = 'Score calculation';
+$lang['UserAdvManager_Password_Enforced_true'] = ' Strong password required - Enter the minimum score (floor value) of passwords complexity == ';
+$lang['UserAdvManager_Password_Enforced_false'] = ' Do not strengthen passwords. (default)';
+$lang['UserAdvManager_AdminPassword_Enforced'] = 'Apply also the passwords complexity control when an administrator create a user? Note: If the created user wishes to change his password and strengthening passwords for users is active, he will be subject to the rules set.';
+$lang['UserAdvManager_AdminPassword_Enforced_true'] = 'Enable strengthening passwords for admins.';
+$lang['UserAdvManager_AdminPassword_Enforced_false'] = 'Disable strengthening passwords for admins. (default)';
+$lang['UserAdvManager_GhostTracker'] = 'Ghost Tracker - Allows to manage registered users according their last visit date :';
+$lang['UserAdvManager_GhostTracker_true'] = ' Enable Ghost Tracker.';
+$lang['UserAdvManager_GhostTracker_false'] = ' Disable Ghost Tracker. (Default)';
+$lang['UserAdvManager_GhostTracker_DayLimit'] = ' Type in here the maximum limit, in days, between two visits of a visitor. When this limit is reached, this visitor will appear in the table on "Ghost Tracker" tab.';
+$lang['UserAdvManager_GhostTracker_ReminderText'] = ' Text used in the email reminder sent to encourage visitors to come back to the gallery (NB: The text pre-filled at the plugin installation is given as an example). (!!! WARNING !Text modification is available ONLY if Ghost Tracker is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['UserAdvManager_GhostTracker_Notice'] = 'When the Ghost Tracker feature is enabled, you can manage your visitors depending on the frequency of their visits. IMPORTANT : If you enable this feature for the first time or you have reactivated after a long period off during which new visitors are registered, visit the Ghost Tracker tab and follow the instructions for Ghost Tracker initialization.';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+
+
+/* ConfirmMail Configuration Tab */
+$lang['ConfirmMail_Title'] = 'Advanced management and settings of register confirmation by mail';
+$lang['Title_Tab2'] = 'UserAdvManager - ConfirmMail Settings';
+$lang['Tab_ConfirmMail'] = 'ConfirmMail Settings';
+$lang['UserAdvManager_ConfirmMail_Info'] = 'Time limitation for validation of registration : If you enable this option, select the desired time (x) )in the field below. Visitors who register will then have x days to validate their registration. After this period the validation link they have received by mail will be expired. ';
+$lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Enable limiting the registration deadline.';
+$lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Disable limiting the registration deadline. (Default)';
+$lang['UserAdvManager_ConfirmMail_TimeOut'] = 'Validation delay :';
+$lang['UserAdvManager_ConfirmMail_Delay_Info'] = 'Enter the number of days before expiry of the registration validation : ';
+$lang['UserAdvManager_ConfirmMail_Remail'] = 'Enable or disable email reminder of unvalidated registers :';
+$lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Enable email reminder';
+$lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Disable email reminder. (Default)';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Custom content of the reminder message with regeneration of validation key. If left blank, the reminder email will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled at the plugin installation is given as an example)
(!!! WARNING !Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Custom content of the reminder message without regeneration of validation key. If left blank, the reminder email will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled at the plugin installation is given as an example)
(!!! WARNING !Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';
+
+
+/* UserManager Tab */
+$lang['UserManager_Title'] = 'Advanced settings of unvalidated registered users';
+$lang['Title_Tab3'] = 'UserAdvManager - Visitors management';
+$lang['Tab_UserManager'] = 'Visitors management';
+$lang['UserAdvManager_ConfirmMail_User_List'] = 'When limiting the deadline for registration is enabled, you will find below the list of users awaiting validation, whether or not they are in time to validate.
In this view, you can:
+
+- Manually delete accounts (manual drain)
+
+- Generate email reminder without generating a new key. Warning: Send an email reminder to targeted visitors. This function does not reset the date of registration of targeted visitors and the timeout is still valid.
+
+- Generate email reminder with generating a new key. Warning : Send an email reminder to targeted visitors. This function also resets the date of registration of targeted visitors which equates to extend the deadline for validation.
+- Submit a registration awaiting validation manually even if the expiry date has passed (forcing validation).
+ ';
+$lang['Registration_Date'] = 'Registration date';
+
+
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+/* Ghost Tracker Tab */
+$lang['GhostTracker_Title'] = 'Advanced ghost visitors management';
+$lang['Title_Tab4'] = 'UserAdvManager - Ghost Tracker';
+$lang['Tab_GhostTracker'] = 'Ghost Tracker';
+$lang['LastVisit_Date'] = 'Last visit';
+$lang['Ghost_Reminder'] = 'Email reminder';
+$lang['Reminder_Sent_OK'] = 'YES';
+$lang['Reminder_Sent_NOK'] = 'NO';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['UserAdvManager_GhostTracker_Init'] = 'If you enable this feature for the first time or you have reactivated after a long period off during which new visitors are registered, you must initialize or reset the Ghost Tracker. This action is done only after activation or reactivation of the option. Please click once the reset button below.';
+$lang['UserAdvManager_GhostTracker_User_List'] = 'When Ghost Tracker is enabled and initialized, you will find below the list of registered visitors who have not returned since x days. "x" is the number of days configured in the General Setup tab. In addition, you will find a column indicating whether an email reminder has been sent to targeted visitors. So, you can see at a glance and treat visitors who have not taken account of the reminder.
In this view, you can:
+
+- Manually delete accounts (manual drain)
+
+- Generate email reminder with resetting the last visit date. This allows to give a wildcard to targeted visitors. If the visitor has already received a reminder, nothing prevents to resent a new mail which will reset again, in fact, the last visit date.
+ ';
+// --------- End: New or revised $lang ---- from version 2.12.2
+
+
+/* Mailing */
+$lang['infos_mail %s'] = '%s, please find here your information to login the gallery :';
+$lang['User: %s'] = 'User : %s';
+$lang['Password: %s'] = 'Password: %s';
+$lang['Add of %s'] = 'Add of %s';
+$lang['Update of %s'] = 'Update of %s';
+$lang['Link: %s'] = 'Please, click on this link to confirm your regsitration : %s';
+$lang['Reminder_with_key_of_%s'] = '%s, your validation key has been renewed';
+$lang['Reminder_without_key_of_%s'] = '%s, your validation key will expire';
+$lang['Ghost_remainder_of_%s'] = '%s, this is a reminder email';
+
+
+/* Email confirmation page */
+$lang['title_confirm_mail'] = 'Validate your registration';
+$lang['confirm_mail_page_title'] = 'Validate your registration';
+$lang['confirm_mail_ok'] = '
Thank you to have confirmed your email address and your registration on the gallery. Have fun !
';
+$lang['confirm_mail_bad'] = '
Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.
';
+
+
+/* Errors and Warnings */
+$lang['UserAdvManager_audit_ok'] = 'Audit OK';
+$lang['Err_audit_no_casse'] = 'These accounts are identical to the case closely : ';
+$lang['Err_audit_username_char'] = 'This account uses one or more forbidden characters : ';
+$lang['Err_audit_email_forbidden'] = 'This account uses a forbidden email provider : ';
+$lang['Err_audit_advise'] = 'you have to perform corrections to comply with new rules that you have activated. Use a database management utility to correct user accounts directly in the table ### _USERS';
+$lang['UserAdvManager_Empty Author'] = 'The author field have to be filled to send a comment.';
+if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' )
+ $lang['reg_err_login5'] = 'Username already exist, WARNING name is case insensitive (Shift = Tiny).';
+$lang['reg_err_login6'] = 'Username does not match the following characters: ';
+$lang['reg_err_login7'] = 'Your email provider is banned for registration. Banned email providers are: ';
+$lang['UserAdvManager_empty_pwd'] = '[empty password]';
+$lang['UserAdvManager_no_update_pwd'] = '[profile updated without password changed]';
+$lang['invalid_pwd'] = 'Invalid username or password !';
+$lang['Err_ConfirmMail_Settings'] = 'This page will be available only if "Email address confirmation" is activated in "General Setup" tab.';
+$lang['Err_UserManager_Settings'] = 'This page is available only if "Enable limiting the registration deadline" is active in the "ConfirmMail Settings" tab and an unvalidated users group is set in "General Setup" tab.';
+$lang['No_validation_for_Guest'] = 'The "Guest" account is not subject to validation';
+$lang['No_validation_for_default_user'] = 'The default account is not subject to validation';
+$lang['No_validation_for_Webmaster'] = 'The "Webmaster" account is not subject to validation';
+$lang['No_validation_for_your_account'] = 'You personnal admin account is not subject to validation';
+$lang['Database_Error'] = 'Warning! Critical integrity error in your database.
Please check the integrity of the #_user_confirm_mail table.';
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+$lang['UserAdvManager_save_config'] ='Configuration saved.';
+$lang['reg_err_login3'] = 'Security : Password is mandatory !';
+$lang['reg_err_login4_%s'] = 'Security : A control system calculates a score on the chosen passwords complexity. The complexity of your password is too low (score = %s). Please, choose a new password more secure by following these rules:
+- Use letters and numbers
+- Use lowercase and uppercase
+- Increase its length (number of characters)
+The minimum passwords score required by the administrator is: ';
+$lang['No_reminder_for_Guest'] = 'The "Guest" account is not subject to receive reminders from GhostTracker';
+$lang['No_reminder_for_default_user'] = 'The default account is not subject to receive reminders from GhostTracker';
+$lang['No_reminder_for_Webmaster'] = 'The "Webmaster" account is not subject to receive reminders from GhostTracker';
+$lang['No_reminder_for_your_account'] = 'You personnal admin account is not subject to receive reminders from GhostTracker';
+$lang['Err_GhostTracker_Settings'] = 'This page is available only if "Ghost Tracker" is active in the "General Setup" tab.';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['GhostTracker_Init_OK'] = 'Ghost Tracker reset done !';
+// --------- End: New or revised $lang ---- from version 2.12.2
+
+
+/* Processing messages */
+$lang['%d_Mail_With_Key'] = '%d message with key renewal was sent';
+$lang['%d_Mails_With_Key'] = '%d messages with key renewal were sent';
+$lang['%d_Reminder_Sent'] = '%d reminder message was sent';
+$lang['%d_Reminders_Sent'] = '%d reminder messages were sent';
+$lang['%d_Validated_User'] = '%d User validated manually';
+$lang['%d_Validated_Users'] = '%d Users validated manually';
+
+
+/* Action button names */
+$lang['Delete_selected'] = 'Delete';
+$lang['Mail_without_key'] = 'Reminder without key';
+$lang['Mail_with_key'] = 'Reminder with key';
+$lang['Force_Validation'] = 'Forced validation';
+$lang['Reminder_Email'] = 'Email reminder';
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+$lang['audit'] = 'Audit settings';
+$lang['submit'] = 'Save settings';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['GT_Reset'] = 'Reset Ghost Tracker.';
+// --------- End: New or revised $lang ---- from version 2.12.2
+?>
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/language/fr_FR/index.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/language/fr_FR/index.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/language/fr_FR/index.php (revision 4167)
@@ -0,0 +1,33 @@
+
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/language/fr_FR/plugin.lang.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/language/fr_FR/plugin.lang.php (revision 4167)
@@ -0,0 +1,195 @@
+(!!! ATTENTION !La modification du texte n\'est possible QUE si le mail d\'information à l\'utilisateur est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
+$lang['UserAdvManager_No_Casse'] = 'Utilisateur insensible à la casse';
+$lang['UserAdvManager_No_Casse_true'] = ' Rendre le compte utilisateur insensible à la casse, lors de l\'inscription et l\identification.';
+$lang['UserAdvManager_No_Casse_false'] = ' Laisser les utilisateur sensible à la casse. (valeur par défaut)';
+$lang['UserAdvManager_Username_Char'] = 'Caractères limités pour le nom d\'utilisateur';
+$lang['UserAdvManager_Username_Char_true'] = ' Interdire les caractères saisis dans le champs ci-après pour le nom d\'utilisateur lors de l\'inscription == ';
+$lang['UserAdvManager_Username_Char_false'] = ' Laisser le contrôle par défaut du nom d\'utilisateur. (valeur par défaut)';
+$lang['UserAdvManager_Confirm_Mail'] = 'Confirmation de l\'adresse email :';
+$lang['UserAdvManager_Confirm_Mail_true'] = ' Envoyer un mail permettant a l\'utilisateur de confirmer son adresse email et donc son compte utilisateur.';
+$lang['UserAdvManager_Confirm_Mail_false'] = ' Système d\'inscription et de mise à jour standard sans confirmation de l\'adresse email. (valeur par défaut)';
+$lang['UserAdvManager_ConfirmMail_Text'] = ' Texte utilisé pour l\'introduction du mail envoyé à l\'utilisateur pour confirmer son adresse mail (!!! ATTENTION !La modification du texte n\'est possible QUE si la confirmation de l\'adresse email est activée. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
+$lang['UserAdvManager_Confirm_Group_Notice'] = 'ATTENTION : L\'utilisation des groupes de validation nécessite que vous ayez créé au moins un groupe d\'utilisateurs et qu\'il soit défini "par défaut" dans la gestion des groupes d\'utilisateurs de Piwigo.';
+$lang['UserAdvManager_No_Confirm_Group'] = 'Groupe à utiliser pour les utilisateurs qui n\'ont pas encore confirmé leur adresse email';
+$lang['UserAdvManager_Validated_Group'] = 'Groupe à utiliser pour les utilisateurs qui ont validé leur adresse email';
+$lang['UserAdvManager_Confirm_Status_Notice'] = 'ATTENTION : L\'utilisation des status de validation nécessite que vous ayez conservé l\'utilisateur "Guest" pour le paramétrage par défaut (modèle) pour les nouveaux inscrits. A noter : Vous pouvez définir n\'importe quel autre utilisateur comme modèle pour les nouveaux inscrits. Reportez-vous à la documentation de Piwigo pour plus de détails.';
+$lang['UserAdvManager_No_Confirm_Status'] = 'Status utilisateur à utiliser pour les utilisateurs qui n\'ont pas encore confirmé leur adresse email';
+$lang['UserAdvManager_Validated_Status'] = 'Status utilisateur à utiliser pour les utilisateurs qui ont validé leur adresse email, laissez ------- pour garder la valuer par défaut de PWG';
+$lang['UserAdvManager_No_Comment_Anonymous'] = 'Pseudo obligatoire sur commentaire';
+$lang['UserAdvManager_No_Comment_Anonymous_true'] = ' Le champs auteur doit être renseigné pour enregistrer un commentaire.';
+$lang['UserAdvManager_No_Comment_Anonymous_false'] = ' Laisser le fonctionnement par défaut pour enregistrer un commentaire. (valeur par défaut)';
+$lang['UserAdvManager_MailExclusion'] = 'Exclusion des domaines de messagerie:';
+$lang['UserAdvManager_MailExclusion_true'] = ' Activer l\'exclusion des domaines de messagerie (par exemple @hotmail.* ou @msn.*)';
+$lang['UserAdvManager_MailExclusion_false'] = ' Désactiver l\'exclusion des domaines de messagerie. (valeur par défaut)';
+$lang['UserAdvManager_MailExclusion_List'] = ' Si l\'exclusion de domaines de messagerie est activée, saisissez les domaines à exclure ici. Il faut respecter le format suivant : @[nom_du_domaine].[extension_du_domaine] - Exemple : @hotmail.com
Séparez les domaines par une virgule ';
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+$lang['UserAdvManager_Title1'] = 'Gestion de l\'inscription des utilisateurs';
+$lang['UserAdvManager_Title2'] = 'Validation d\'inscription et gestion de groupes / statuts';
+$lang['UserAdvManager_Password_Enforced'] = 'Renforcement des mots de passe - Activer cette option rend la saisie du mot de passe obligatoire à l\'inscription des visiteurs. De plus, le mot de passe saisi par le visiteur devra répondre à un score de complexité (activez puis sauvegardez les paramètres pour afficher plus d\'infos).';
+$lang['UserAdvManager_Password_Enforced_Info'] = 'Explications :Le score d\'un mot de passe est calculé en fonction des paramètres de base : longueur, types de caractères utilisés(lettres, chiffres, majuscules, minuscules, caractères spéciaux). Si le mot de passe de l\'utilisateur ne répond pas au score, le score réalisé est affiché ainsi que le score minimum à atteindre et une indication pour augmenter la valeur de ce score. Pour donner un ordre d\'idée, un score inférieur à 100 est considéré comme faible. Entre 100 et 500, la complexité est renforcée et dans la moyenne. Au dela de 500, c\'est Fort Knox !! ;-) Vous pouvez faire vos essais de complexité d\'un mot de passe en utilisant le champ ci-dessous. Cela vous permettra de vous faire une idée du score à définir pour une complexité personnalisée.';
+$lang['UserAdvManager_PasswordTest'] = 'Mot de passe à tester : ';
+$lang['UserAdvManager_ScoreTest'] = 'Score obtenu : ';
+$lang['PasswordTest'] = 'Calcul du score';
+$lang['UserAdvManager_Password_Enforced_true'] = ' Mot de passe renforcé obligatoire - Saisir le score minimum (valeur plancher) de complexité du mots de passe == ';
+$lang['UserAdvManager_Password_Enforced_false'] = ' Ne pas renforcer les mots de passe. (valeur par défaut)';
+$lang['UserAdvManager_AdminPassword_Enforced'] = 'Appliquer également le contrôle du renforcement de mots de passe lorsqu\'un administrateur créé un utilisateur? A noter : Si l\'utilisateur ainsi créé désire changer de mot de passe et que le renforcement des mots de passe pour les utilisateurs est actif, il sera soumis à la règle configurée.';
+$lang['UserAdvManager_AdminPassword_Enforced_true'] = 'Activer le renforcement des mots de passe pour les admins.';
+$lang['UserAdvManager_AdminPassword_Enforced_false'] = 'Désactiver le renforcement des mots de passe pour les admins. (valeur par défaut)';
+$lang['UserAdvManager_GhostTracker'] = 'Gestion des visiteurs fantômes - Permet de gérer les inscrits en fonction de leur date de dernière visite:';
+$lang['UserAdvManager_GhostTracker_true'] = ' Activer la gestion des visiteurs fantômes.';
+$lang['UserAdvManager_GhostTracker_false'] = ' Désactiver la gestion des visiteurs fantômes. (valeur par défaut)';
+$lang['UserAdvManager_GhostTracker_DayLimit'] = ' Saisissez ici le délai maximum, en jours, entre deux visites d\'un visiteur. Lorsque ce délai est atteind, le visiteur en question apparaitra dans le tableau de l\'onglet "Ghost Tracker".';
+$lang['UserAdvManager_GhostTracker_ReminderText'] = ' Texte utilisé dans le mail de rappel envoyé à l\'utilisateur pour l\'inciter à revenir visiter la galerie (NB: Le texte pré-renseigné à l\'installation du plugin est donné à titre d\'exemple). (!!! ATTENTION !La modification du texte n\'est possible QUE si la gestion des visiteurs fantômes est activée. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['UserAdvManager_GhostTracker_Notice'] = 'Lorsque la fonction Ghost Tracker est activée, il vous est possible de gérer vos visiteurs en fonction de la fréquence de leurs visites. IMPORTANT : Si vous avez activé cette fonction pour la première fois ou que vous l\'avez réactivée après une longue période de désactivation pendant laquelle de nouveaux visiteurs se sont inscrits, rendez-vous sur l\'onglet Ghost Tracker et suivez les instructions relatives à l\'initialisation de Ghost Tracker.';
+// --------- End: New or revised $lang ---- from version 2.12.2
+
+
+/* ConfirmMail Configuration Tab */
+$lang['ConfirmMail_Title'] = 'Configuration et gestion avancée de la confirmation par mail';
+$lang['Title_Tab2'] = 'UserAdvManager - Configuration de ConfirmMail';
+$lang['Tab_ConfirmMail'] = 'Configuration de ConfirmMail';
+$lang['UserAdvManager_ConfirmMail_Info'] = 'Limitation du délai de validation de l\'inscription : Si vous activez cette option, sélectionnez le délai (x) )souhaité dans la liste qui suit. Les visiteurs qui s\'inscriront alors auront x jours de délais pour valider leur inscription. Passé ce délai, le lien de validation qu\'ils auront reçu par mail sera expiré. ';
+$lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Activer la limitation du délai d\'inscription.';
+$lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Désactiver la limitation du délai d\'inscription. (valeur par défaut)';
+$lang['UserAdvManager_ConfirmMail_TimeOut'] = 'Délai d\activation :';
+$lang['UserAdvManager_ConfirmMail_Delay_Info'] = 'Saisissez ici le nombre de jours avant expiration de la validation d\'inscription : ';
+$lang['UserAdvManager_ConfirmMail_Remail'] = 'Activer ou désactiver la fonctionnalité de rappel des inscrits non validés : ';
+$lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Activer le rappel par mail.';
+$lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Désactiver le rappel par mail. (valeur par défaut)';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de rappel avec regénération de clé de validation. Si laissé vide, le mail de rappel ne comportera que le lien de validation. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré-renseigné à l\'installation du plugin est donné en exemple)
(!!! ATTENTION !La modification du texte n\'est possible QUE si le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
+$lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de rappel sans regénération de clé de validation. Si laissé vide, le mail de rappel sera vide. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré-renseigné à l\'installation du plugin est donné en exemple)
(!!! ATTENTION !La modification du texte n\'est possible QUE si le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';
+
+
+/* UserManager Tab */
+$lang['UserManager_Title'] = 'Gestion avancée des inscrits non validés';
+$lang['Title_Tab3'] = 'UserAdvManager - Gestion des visiteurs';
+$lang['Tab_UserManager'] = 'Gestion des visiteurs';
+$lang['UserAdvManager_ConfirmMail_User_List'] = 'Lorsque la limitation du délai d\'inscription est activée, vous trouverez ci-dessous la liste des utilisateurs en attente de validation d\'inscription qu\'ils soient ou pas dans les délais pour la valider.
Dans cette vue, vous pouvez :
+
+- Supprimer manuellement les comptes (purge manuelle)
+
+- Générer l\'email de rappel sans génération d\'une nouvelle clef. Rappel : Cette fonction ne réinitialise pas la date d\'inscription du visiteur ciblé et le délai d\'expiration est toujours d\'actualité.
+
+- Générer l\'email de rappel avec génération d\'une nouvelle clef. Rappel : Cette fonction réinitialise également la date d\'inscription du visiteur ciblé ce qui équivaut à prolonger le délai de validation.
+- Valider manuellement une inscription en attente de validation même si la date d\'expiration est révolue (forçage de la validation).
+ ';
+$lang['Registration_Date'] = 'Date d\'enregistrement';
+
+
+/* Ghost Tracker Tab */
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+$lang['GhostTracker_Title'] = 'Gestion avancée des visiteurs fantômes';
+$lang['Title_Tab4'] = 'UserAdvManager - Ghost Tracker';
+$lang['Tab_GhostTracker'] = 'Ghost Tracker';
+$lang['LastVisit_Date'] = 'Date de dernière visite';
+$lang['Ghost_Reminder'] = 'Email de rappel';
+$lang['Reminder_Sent_OK'] = 'OUI';
+$lang['Reminder_Sent_NOK'] = 'NON';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['UserAdvManager_GhostTracker_Init'] = 'Si vous avez activé cette fonction pour la première fois ou que vous l\'avez réactivée après une longue période de désactivation pendant laquelle de nouveaux visiteurs se sont inscrits, il faut initialiser ou réinitialiser le Ghost Tracker. Cette action n\'est à faire qu\'une seule après activation ou réactivation de l\'option. Veuillez cliquer une seule fois sur le bouton d\'initialisation ci-dessous.';
+$lang['UserAdvManager_GhostTracker_User_List'] = 'Lorsque la gestion des visiteurs fantômes est activée et initialisée, vous trouverez ci-dessous la liste des visiteurs inscrits sur votre galerie et qui ne sont pas revenus depuis x jours. "x" étant le nombre de jours paramétrés dans l\'onglet de configuration générale. De plus, vous trouverez une colonne précisant si un mail de rappel a déjà été envoyé aux visiteurs ciblés, vous permettant de visualiser d\'un coup d\'oeil et traiter les visiteurs qui n\'auraient pas tenu compte du rappel.
Dans cette vue, vous pouvez :
+
+- Supprimer manuellement les comptes (purge manuelle)
+
+- Générer l\'email de rappel avec réinitialisation de la date de dernière visite. Ce qui permet de donner un "joker" au visiteur ciblé. Si le visiteur a déjà bénéficié d\'un mail de rappel, rien n\'empêche de renvoyer un nouveau mail qui réinitialisera, de fait, la date de dernière visite.
+ ';
+// --------- End: New or revised $lang ---- from version 2.12.2
+
+
+/* Mailing */
+$lang['infos_mail %s'] = '%s, voici vos informations pour vous identifier sur la galerie :';
+$lang['User: %s'] = 'Utilisateur : %s';
+$lang['Password: %s'] = 'Mot de passe: %s';
+$lang['Add of %s'] = 'Création de %s';
+$lang['Update of %s'] = 'Mise à jour de %s';
+$lang['Link: %s'] = 'Cliquez sur le lien suivant pour confirmer votre inscription : %s';
+$lang['Reminder_with_key_of_%s'] = '%s, votre clé de confirmation a été renouvelée';
+$lang['Reminder_without_key_of_%s'] = '%s, votre clé de confirmation va expirer';
+
+
+/* Email confirmation page */
+$lang['title_confirm_mail'] = 'Confirmation de votre inscription';
+$lang['confirm_mail_page_title'] = 'Confirmation d\'inscription';
+$lang['confirm_mail_ok'] = '
Merci d\'avoir confirmé votre mail et aussi et surtout votre inscription sur le site, profitez bien des photos ...
';
+$lang['confirm_mail_bad'] = '
Votre clef d\'activation unique est érronée ou expirée ou vous avez déjà validé votre compte, veuillez contacter le webmaster pour régler ce problème.
';
+
+
+/* Errors and Warnings */
+$lang['UserAdvManager_audit_ok'] = 'Audit OK';
+$lang['Err_audit_no_casse'] = 'Ces comptes sont identiques à la casse près : ';
+$lang['Err_audit_username_char'] = 'Ce compte contient un ou des caractères interdits : ';
+$lang['Err_audit_email_forbidden'] = 'Ce compte contient des domaines de messagerie interdit : ';
+$lang['Err_audit_advise'] = 'Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activées. Utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.
';
+$lang['UserAdvManager_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.';
+if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' )
+ $lang['reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).';
+$lang['reg_err_login6'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : ';
+$lang['reg_err_login7'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : ';
+$lang['UserAdvManager_empty_pwd'] = '[mot de passe vide]';
+$lang['UserAdvManager_no_update_pwd'] = '[mise à jour du profil sans changement du mot de passe]';
+$lang['invalid_pwd'] = 'Nom utilisateur ou Mot de passe invalide !';
+$lang['Err_ConfirmMail_Settings'] = 'Cette page n\'est accessible que si "Confirmation de l\'adresse email" est actif dans l\'onglet "Configuration Générale".';
+$lang['Err_UserManager_Settings'] = 'Cette page n\'est accessible que si "Délai de validation d\'inscription" est actif dans l\'onglet "Configuration de ConfirmMail" et si un groupe de visiteurs non validés est configuré dans l\'onglet "Configuration Générale".';
+$lang['No_validation_for_Guest'] = 'Le compte Guest n\'est pas soumis à validation';
+$lang['No_validation_for_default_user'] = 'Le compte par défaut n\'est pas soumis à validation';
+$lang['No_validation_for_Webmaster'] = 'Le compte du Webmaster n\'est pas soumis à validation';
+$lang['No_validation_for_your_account'] = 'Votre compte d\'admin n\'est pas soumis à validation';
+$lang['Database_Error'] = 'Attention ! Erreur critique d\'intégrité dans votre base de données.
Veuillez contrôler l\'intégrité de la table #_user_confirm_mail.';
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+$lang['UserAdvManager_save_config'] ='Configuration enregistrée.';
+$lang['reg_err_login3'] = 'Sécurité : Le mot de passe est obligatoire !';
+$lang['reg_err_login4_%s'] = 'Sécurité : Un système de contrôle calcule un score de complexité sur les mots de passe choisis. La complexité de votre mot de passe est trop faible (score = %s). Veuillez choisir un nouveau mot de passe plus sûre en respectant les règles suivantes :
+- Utiliser des lettres et des chiffres
+- Utiliser des minuscules et des majuscules
+- Augmenter sa longueur (nombre de caractères)
+Le score minimal des mots de passe imposé par l\'administrateur est de : ';
+$lang['No_reminder_for_Guest'] = 'Le compte Guest n\'est pas soumis à recevoir des rappels du GhostTracker';
+$lang['No_reminder_for_default_user'] = 'Le compte par défaut n\'est pas soumis à recevoir des rappels du GhostTracker';
+$lang['No_reminder_for_Webmaster'] = 'Le compte du Webmaster n\'est pas soumis à recevoir des rappels du GhostTracker';
+$lang['No_reminder_for_your_account'] = 'Votre compte d\'admin n\'est pas soumis à recevoir des rappels du GhostTracker';
+$lang['Err_GhostTracker_Settings'] = 'Cette page n\'est accessible que si "Gestion des visiteurs fantômes" est actif dans l\'onglet "Configuration Générale".';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['GhostTracker_Init_OK'] = 'Initialisation Ghost Tracker effectuée !';
+// --------- End: New or revised $lang ---- from version 2.12.2
+
+
+/* Processing messages */
+$lang['%d_Mail_With_Key'] = '%d message avec renouvellement de clé a été envoyé';
+$lang['%d_Mails_With_Key'] = '%d messages avec renouvellement de clé ont été envoyés';
+$lang['%d_Reminder_Sent'] = '%d message de rappel a été envoyé';
+$lang['%d_Reminders_Sent'] = '%d messages de rappel ont été envoyés';
+$lang['%d_Validated_User'] = '%d Utilisateur validé manuellement';
+$lang['%d_Validated_Users'] = '%d Utilisateurs validés manuellement';
+
+
+/* Action button names */
+$lang['Delete_selected'] = 'Supprimer';
+$lang['Mail_without_key'] = 'Rappel sans clé';
+$lang['Mail_with_key'] = 'Rappel avec clé';
+$lang['Force_Validation'] = 'Validation forcée';
+// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1
+$lang['audit'] = 'Auditer les paramètres';
+$lang['submit'] = 'Sauvegarder les paramètres';
+$lang['Reminder_Email'] = 'Email de rappel';
+// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1
+// --------- Starting below: New or revised $lang ---- from version 2.12.2
+$lang['GT_Reset'] = 'Initialisation Ghost Tracker';
+// --------- End: New or revised $lang ---- from version 2.12.2
+?>
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/language/index.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/language/index.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/language/index.php (revision 4167)
@@ -0,0 +1,33 @@
+
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/main.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/main.inc.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/main.inc.php (revision 4167)
@@ -0,0 +1,442 @@
+ Known bug : This feature doesn't work on user profile page. So, already registered users can change their email address to a forbiden one.
+
+-- 2.10.9a : Email provider exclusion is no longer case sensitive
+
+-- 2.10.9b : Bug fixed - Home icon wasn't linked to gallery url in ConfirmMail page. If GALLERY_URL is not set, Home icon gets the pwg root path.
+
+-- 2.10.9c : Bug fixed - If Email provider exclusion is set off, new registered user will have a PHP notice on "Undefined variable: ncsemail"
+
+-- 2.10.9d : Code simplification - need no more ""template"" sub-directory in plugin directory for enhance "back link" icon in ConfirMail.tpl
+
+-- 2.10.9e : Compatibility improvement with PHP 5.3 - Some old functions will be deprecated like :
+ ereg replaced by preg_match
+ eregi replace by preg_match with "i" moderator
+ split replace by preg_split
+
+-- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin
+
+-- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Renew validation key, list unvalidated users,...)
+ Beautify plugin's main admin panel
+
+-- 2.11.1 : Bug fixed with install and upgrade functions
+ Language files correction
+
+-- 2.11.2 : Bug fixed on bad query for unvalidated users display in unvalidated users list
+ Bug fixed : Sql syntax error on plugin activation
+
+-- 2.11.3 : On Patricia's request (french forum and bug 1173), the unvalidated users management tab shows users according with the settings of unvalidated group and / or unvalidated status.
+ Feature 1172 added : Email providers exclusion list can be set with CR/LF between each entry. The comma seperator (,) is still mandatory.
+ Bug 1175 fixed : Bad translation tag in french language file.
+ Improvement of unvalidated users management tab (feature 1174)- Expired users are displayed in red color text.
+
+-- 2.11.4 : Bug 1177 fixed : Width of excluded email providers list reset to ancient value (80 col)
+ Bug 1179 fixed : Adding a notice in plugin inline documentation for use of validation groups and status. A default group must be set in Piwigo's groups settings and the "Guest" (or another user) must be set as default for status values.
+ Bug 1182 fixed : Language tag missing in confirmation email generation
+
+-- 2.11.5 : Bug 1195 fixed : Registration displays the good title
+
+-- 2.12.0 : Bug 1206 fixed : All plugin functionnalities work in user's profile page
+ Plugin's core code and admin panel refactoring
+ Password control and enforcement : A complexity score is computed on user registration. If this score is less than the goal set by admin, the password choosen is rejected.
+ Feature 1194 "Ghost Tracker" added : New plugin tab displays users who don't comes back to the gallery since x days. Ability to send email reminders and to delete reminded but "dead" users. It's the reason why this feature is called "Ghost Tracker".
+
+-- 2.12.1 : Rollback on admin panel improvement (it was a bad idea)
+
+-- 2.12.2 : Bug 1221 fixed - Adding of a new funtion to populate the lastvisit table on Ghost Tracker activation
+ Bug 1224 fixed - Error in database after plugin activation
+ Bug 1225 fixed - "Reminder" status don't change from "false" to "true" after the sent of a reminder email
+ Some code beautify (SQL requests and HTML 4 strict for tpl)
+
+-- 2.12.3 : Bug 1226 fixed - "duplicate key error" when lastvisit table is not empty and on using Ghost Tracker init function
+*/
+
+/*
+
+ ***** TODO List *****
+++ No validation needed for admins users comments (new trigger needed in comments.php ?)
+
+++ No single email check for admins (new trigger needed in functions_user.inc.php ?)
+
+++ Password control and enforcement
+ ?? Can not be the same as username -> Could password score control be sufficient ?
+
+++ Security : Blocking brut-force attacks !
+ -> Way to do that : Count the number of failed attempts to connect and lock the targetted account after x attempts. Where x will be settable by admin.
+ To unlock the locked account :
+ -> A new table in admin's plugin panel which would display the locked accounts.
+ -> Sending an email to account owner to inform him his account is blocked due to multiple failed connexions attempts. This email could have a link with a security key to unlock the account.
+ -> Both of above solutions ?
+
+++ Opportunity to copy a registered user for new user creation
+ ++ new copied user will (or not) belong to the same groups
+ ++ new copied user will (or not) get the same status (visitor, admin, webmaster, guest (??))
+ ++ new copied user will (or not) get the same properties
+ ++ new copied user will (or not) get the same language
+ ... and so on
+
+*/
+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+ die('Hacking attempt!');
+}
+
+define('NBC_UserAdvManager_DIR' , basename(dirname(__FILE__)));
+define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+
+include_once (NBC_UserAdvManager_PATH.'include/constants.php');
+include_once (NBC_UserAdvManager_PATH.'include/functions_UserAdvManager.inc.php');
+
+load_language('plugin.lang', NBC_UserAdvManager_PATH);
+
+
+/* Plugin admin */
+add_event_handler('get_admin_plugin_menu_links', 'nbc_UserAdvManager_admin_menu');
+
+function nbc_UserAdvManager_admin_menu($menu)
+{
+ array_push($menu,
+ array(
+ 'NAME' => 'UserAdvManager',
+ 'URL' => get_admin_plugin_menu_link(NBC_UserAdvManager_PATH.'/admin/UserAdvManager_admin.php')
+ )
+ );
+
+ return $menu;
+}
+
+
+add_event_handler('loc_begin_index', 'UserAdvManager_GhostTracker');
+
+function UserAdvManager_GhostTracker()
+{
+ global $conf, $user;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ if (isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true' and !is_admin() and !is_a_guest())
+ {
+
+ $userid = get_userid($user['username']);
+
+ /* Looking for existing entry in last visit table */
+ $query = '
+SELECT *
+ FROM '.USER_LASTVISIT_TABLE.'
+WHERE user_id = '.$userid.'
+;';
+
+ $count = mysql_num_rows(pwg_query($query));
+
+ if ($count == 0)
+ {
+ /* If not, data are inserted in table */
+ $query = '
+INSERT INTO '.USER_LASTVISIT_TABLE.' (user_id, lastvisit, reminder)
+VALUES ('.$userid.', now(), "false")
+;';
+ pwg_query($query);
+ }
+ else if ($count > 0)
+ {
+ /* If yes, data are updated in table */
+ $query = '
+UPDATE '.USER_LASTVISIT_TABLE.'
+SET lastvisit = now(), reminder = "false"
+WHERE user_id = '.$userid.'
+LIMIT 1
+;';
+ pwg_query($query);
+ }
+ }
+}
+
+
+/* User creation */
+add_event_handler('register_user', 'UserAdvManager_Adduser');
+
+function UserAdvManager_Adduser($register_user)
+{
+ global $conf;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ /* Sending registration confirmation by email */
+ if ((isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true'))
+ {
+ SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true);
+ }
+}
+
+
+
+/* User deletion */
+add_event_handler('delete_user', 'UserAdvManager_Deluser');
+
+function UserAdvManager_Deluser($user_id)
+{
+ /* Cleanup for ConfirmMail table */
+ DeleteConfirmMail($user_id);
+ /* Cleanup for LastVisit table */
+ DeleteLastVisit($user_id);
+}
+
+
+/* Check users registration */
+add_event_handler('register_user_check', 'UserAdvManager_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+
+function UserAdvManager_RegistrationCheck($err, $user)
+{
+ global $errors, $conf;
+
+ $PasswordCheck = 0;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ /* Password enforcement control */
+ if (isset($conf_nbc_UserAdvManager[14]) and $conf_nbc_UserAdvManager[14] == 'true' and !empty($conf_nbc_UserAdvManager[15]))
+ {
+ if (!empty($user['password']) and !is_admin())
+ {
+ $PasswordCheck = testpassword($user['password']);
+
+ if ($PasswordCheck < $conf_nbc_UserAdvManager[15])
+ {
+ $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck);
+ return($lang['reg_err_pass'] = l10n_args($message).$conf_nbc_UserAdvManager[15]);
+ }
+ }
+ else if (!empty($user['password']) and is_admin() and isset($conf_nbc_UserAdvManager[16]) and $conf_nbc_UserAdvManager[16] == 'true')
+ {
+ $PasswordCheck = testpassword($user['password']);
+
+ if ($PasswordCheck < $conf_nbc_UserAdvManager[15])
+ {
+ $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck);
+ return($lang['reg_err_pass'] = l10n_args($message).$conf_nbc_UserAdvManager[15]);
+ }
+ }
+ }
+
+ /* Username non case sensitive */
+ if (isset($conf_nbc_UserAdvManager[1]) and $conf_nbc_UserAdvManager[1] == 'true')
+ {
+ $new_username = NotSensibleSearchUsername($_POST['login']);
+ $_POST['login'] = $new_username == '' ? $_POST['login'] : $new_username;
+ }
+
+ /* Username without forbidden keys */
+ if (isset($conf_nbc_UserAdvManager[7]) and $conf_nbc_UserAdvManager[7] == 'true' and !empty($_POST['login']) and !ValidateUsername($_POST['login']))
+ {
+ $_POST['login'] = '';
+ return($lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_nbc_UserAdvManager[8]."'");
+ }
+
+ /* Email without forbidden domains */
+ if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']) and !ValidateEmailProvider($_POST['mail_address']))
+ {
+ $_POST['login'] = '';
+ return($lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'");
+ }
+}
+
+
+if (script_basename() == 'profile')
+{
+ add_event_handler('loc_begin_profile', 'UserAdvManager_Profile_Init');
+
+ function UserAdvManager_Profile_Init()
+ {
+ global $conf, $user, $template;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ if (isset($_POST['validate']))
+ {
+ /* Email without forbidden domains */
+ if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))
+ {
+ if (!ValidateEmailProvider($_POST['mail_address']))
+ {
+ $template->append('errors', l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'");
+ unset($_POST['validate']);
+ }
+ }
+
+ $typemail = 3;
+
+ if (!empty($_POST['use_new_pwd']))
+ {
+ $typemail = 2;
+
+ /* Password enforcement control */
+ if (isset($conf_nbc_UserAdvManager[14]) and $conf_nbc_UserAdvManager[14] == 'true' and !empty($conf_nbc_UserAdvManager[15]))
+ {
+ $PasswordCheck = testpassword($_POST['use_new_pwd']);
+
+ if ($PasswordCheck < $conf_nbc_UserAdvManager[15])
+ {
+ $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck);
+ $template->append('errors', l10n_args($message).$conf_nbc_UserAdvManager[15]);
+ unset($_POST['use_new_pwd']);
+ unset($_POST['validate']);
+ }
+ }
+ }
+
+ /* Sending registration confirmation by email */
+ if (( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or ( isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true'))
+ {
+ $confirm_mail_need = false;
+
+ if (!empty($_POST['mail_address']) and ValidateEmailProvider($_POST['mail_address']))
+ {
+ $query = '
+SELECT '.$conf['user_fields']['email'].' AS email
+FROM '.USERS_TABLE.'
+WHERE '.$conf['user_fields']['id'].' = \''.$user['id'].'\'
+;';
+
+ list($current_email) = mysql_fetch_row(pwg_query($query));
+
+ if ( $_POST['mail_address'] != $current_email and ( isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true') )
+
+ $confirm_mail_need = true;
+ }
+
+ if ((!empty($_POST['use_new_pwd']) and ( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or $confirm_mail_need) )
+ {
+ $query = '
+SELECT '.$conf['user_fields']['username'].'
+FROM '.USERS_TABLE.'
+WHERE '.$conf['user_fields']['id'].' = \''.$user['id'].'\'
+;';
+
+ list($username) = mysql_fetch_row(pwg_query($query));
+
+ SendMail2User($typemail, $user['id'], $username, $_POST['use_new_pwd'], $_POST['mail_address'], $confirm_mail_need);
+ }
+ }
+ }
+ }
+}
+
+
+add_event_handler('init', 'UserAdvManager_InitPage');
+
+function UserAdvManager_InitPage()
+{
+ load_language('plugin.lang', NBC_UserAdvManager_PATH);
+ global $conf, $template, $page, $lang, $errors;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+ /* Username non case sensitive */
+ if (isset($conf_nbc_UserAdvManager[1]) and $conf_nbc_UserAdvManager[1] == 'true')
+ {
+ $lang['reg_err_login5'] = l10n('reg_err_login5');
+ }
+
+
+
+/* User identification */
+ if (script_basename() == 'identification')
+ {
+ if (isset($_POST['login']))
+ {
+ /* User non case sensitive */
+ if (isset($conf_nbc_UserAdvManager[1]) and $conf_nbc_UserAdvManager[1] == 'true' )
+ {
+ $new_username = NotSensibleSearchUsername($_POST['username']);
+ $_POST['username'] = $new_username == '' ? $_POST['username'] : $new_username;
+ }
+ }
+ }
+
+
+/* Admin user management */
+ if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list')
+ {
+ if (isset($_POST['submit_add']))
+ {
+ /* User non case sensitive */
+ if (isset($conf_nbc_UserAdvManager[1]) and $conf_nbc_UserAdvManager[1] == 'true' )
+ {
+ $new_username = NotSensibleSearchUsername($_POST['login']);
+ $_POST['login'] = $new_username == '' ? $_POST['login'] : $new_username;
+ }
+
+ /* Username without forbidden keys */
+ if (isset($conf_nbc_UserAdvManager[7]) and $conf_nbc_UserAdvManager[7] == 'true' and !empty($_POST['login']) and !ValidateUsername($_POST['login']))
+ {
+ $template->append('errors', l10n('reg_err_login6')."'".$conf_nbc_UserAdvManager[8]."'");
+ unset($_POST['submit_add']);
+ }
+
+ /* Email without forbidden domains */
+ if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['email']) and !ValidateEmailProvider($_POST['email']))
+ {
+ $template->append('errors', l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'");
+ unset($_POST['submit_add']);
+ }
+ }
+ }
+}
+
+
+add_event_handler('user_comment_check', 'UserAdvManager_CheckEmptyCommentAuthor', 50, 2);
+
+function UserAdvManager_CheckEmptyCommentAuthor($comment_action, $comm)
+{
+ load_language('plugin.lang', NBC_UserAdvManager_PATH);
+ global $infos, $conf, $template;
+
+ $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
+
+/* User creation OR update */
+ if (isset($conf_nbc_UserAdvManager[6]) and $conf_nbc_UserAdvManager[6] == 'true' and $conf['comments_forall'] == 'true' and $comm['author'] == 'guest')
+ {
+ $comment_action = 'reject';
+
+ array_push($infos, l10n('UserAdvManager_Empty Author'));
+ }
+
+ return $comment_action;
+}
+
+?>
Index: /extensions/NBC_UserAdvManager/tags/2.12.3/maintain.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/tags/2.12.3/maintain.inc.php (revision 4167)
+++ /extensions/NBC_UserAdvManager/tags/2.12.3/maintain.inc.php (revision 4167)
@@ -0,0 +1,182 @@
+