Changeset 12272


Ignore:
Timestamp:
09/30/11 13:51:10 (8 years ago)
Author:
Eric
Message:

Merge r12271 from trunk to branch 2.30

Location:
extensions/UserAdvManager/branches/2.30
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/branches/2.30/ConfirmMail.php

    r12227 r12272  
    4242    log_user($userid, false); 
    4343 
    44 /* We have to get the user's language in database */ 
     44// We have to get the user's language in database 
     45// ---------------------------------------------- 
    4546    $query = ' 
    4647SELECT language 
     
    5051    $data = pwg_db_fetch_assoc(pwg_query($query)); 
    5152 
    52 /* Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language */ 
     53// Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 
     54// ------------------------------------------------------------------------------------------------------------------------------- 
    5355    if (empty($data)) 
    5456    { 
    55 /* And switch gallery to this language before using personalized and multilangual contents */ 
     57// And switch gallery to this language before using personalized and multilangual contents 
     58// --------------------------------------------------------------------------------------- 
    5659      $language = pwg_get_session_var('lang_switch', $user['language']); 
    5760      switch_lang_to($language); 
     
    5962    else 
    6063    { 
    61 /* And switch gallery to this language before using personalized and multilangual contents */ 
     64// And switch gallery to this language before using personalized and multilangual contents 
     65// --------------------------------------------------------------------------------------- 
    6266      switch_lang_to($data['language']); 
    6367      load_language('plugin.lang', UAM_PATH); 
     
    6771    { 
    6872      // Management of Extension flags ([username], [mygallery], [myurl]) 
     73      // ---------------------------------------------------------------- 
    6974      $patterns[] = '#\[username\]#i'; 
    7075      $replacements[] = $result['username']; 
     
    99104    { 
    100105      // Management of Extension flags ([username], [mygallery], [myurl]) 
     106      // ---------------------------------------------------------------- 
    101107      $patterns[] = '#\[username\]#i'; 
    102108      $replacements[] = $result['username']; 
  • extensions/UserAdvManager/branches/2.30/GT_del_account.php

    r11018 r12272  
    2424{ 
    2525  // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here 
     26  // ----------------------------------------------------------------------------------------- 
    2627  $patterns[] = '#\[mygallery\]#i'; 
    2728  $replacements[] = $conf['gallery_title']; 
  • extensions/UserAdvManager/branches/2.30/USR_del_account.php

    r11018 r12272  
    2424{ 
    2525  // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here 
     26  // ----------------------------------------------------------------------------------------- 
    2627  $patterns[] = '#\[mygallery\]#i'; 
    2728  $replacements[] = $conf['gallery_title']; 
  • extensions/UserAdvManager/branches/2.30/admin/UAM_admin.php

    r12239 r12272  
    112112  { 
    113113 
    114     //General configuration settings 
     114    // Render free text fields 
     115    // ----------------------- 
    115116                $_POST['UAM_MailInfo_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_MailInfo_Text']))); 
    116117 
    117                 $_POST['UAM_ConfirmMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Text']))); 
     118    $_POST['UAM_ConfirmMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Text']))); 
    118119 
    119120    $_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText']))); 
     
    130131 
    131132    // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them 
     133    // -------------------------------------------------------------------------------------- 
    132134    if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List'])) 
    133135    { 
     
    137139 
    138140    // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled 
     141    // --------------------------------------------------------------------------------------------------------- 
    139142    $conf_UAM = unserialize($conf['UserAdvManager']); 
    140143    $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
     
    148151 
    149152    // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set) 
     153    // ---------------------------------------------------------------------------------- 
    150154    if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_Text']) != 0) 
    151155    { 
     
    155159 
    156160    // Save global UAM configuration 
     161    // ----------------------------- 
    157162                $newconf_UAM = array( 
    158163      $_POST['UAM_Mail_Info'], 
     
    201206    conf_update_param('UserAdvManager', pwg_db_real_escape_string($conf['UserAdvManager'])); 
    202207 
    203     //Email confirmation settings 
     208    // Email confirmation settings 
     209    // -------------------------- 
    204210    $_POST['UAM_ConfirmMail_ReMail_Txt1'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_ReMail_Txt1']))); 
    205211 
     
    211217 
    212218    // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set) 
     219    // ---------------------------------------------------------------------------------- 
    213220    if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_ReMail_Txt1']) == 1) 
    214221    { 
     
    223230 
    224231    // Save ConfirmMail settings 
     232    // ------------------------- 
    225233          $newconf_UAM_ConfirmMail = array ( 
    226234      $_POST['UAM_ConfirmMail_TimeOut'], 
     
    240248 
    241249  // Saving UAM tables and configuration settings 
     250  // -------------------------------------------- 
    242251  if (isset($_POST['save'])) 
    243252  { 
     
    254263  } 
    255264 
    256   //Testing password enforcement 
     265  // Testing password enforcement 
     266  // ---------------------------- 
    257267  if (isset($_POST['PasswordTest']) and isset($_POST['UAM_Password_Test']) and !empty($_POST['UAM_Password_Test'])) 
    258268  { 
     
    266276  $conf_UAM = unserialize($conf['UserAdvManager']); 
    267277 
    268   //Group setting for unvalidated, validated users and downgrade group 
     278  // Group setting for unvalidated, validated users and downgrade group 
     279  // ------------------------------------------------------------------ 
    269280  $groups[-1] = '---------'; 
    270281  $No_Valid = -1; 
     
    272283  $Downgrade = -1; 
    273284         
    274   //Get groups list in database  
     285  // Get groups list in database 
     286  // --------------------------- 
    275287  $query = ' 
    276288SELECT id, name 
     
    301313  } 
    302314         
    303   //Template initialization for unvalidated users group 
     315  // Template initialization for unvalidated users group 
     316  // --------------------------------------------------- 
    304317  $template->assign( 
    305318    'No_Confirm_Group', 
     
    309322                        ) 
    310323                ); 
    311   //Template initialization for validated users group 
     324 
     325  // Template initialization for validated users group 
     326  // ------------------------------------------------- 
    312327  $template->assign( 
    313328    'Validated_Group', 
     
    317332                        ) 
    318333        ); 
    319   //Template initialization for downgrade group 
     334 
     335  // Template initialization for downgrade group 
     336  // ------------------------------------------- 
    320337  $template->assign( 
    321338    'Downgrade_Group', 
     
    326343        ); 
    327344         
    328   //Status setting for unvalidated, validated users and downgrade status 
     345  // Status setting for unvalidated, validated users and downgrade status 
     346  // -------------------------------------------------------------------- 
    329347  $status_options[-1] = '------------'; 
    330348  $No_Valid_Status = -1; 
     
    332350  $Downgrade_Status = -1; 
    333351         
    334   //Get unvalidate status values 
     352  // Get unvalidate status values 
     353  // ---------------------------- 
    335354  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 
    336355  { 
     
    341360          } 
    342361           
    343       //Template initialization for unvalidated users status 
    344       $template->assign( 
    345         'No_Confirm_Status', 
    346         array( 
    347                                         'Status_options' => $status_options, 
    348                                 'Status_selected' => $No_Valid_Status 
    349                                         ) 
    350                         ); 
     362    // Template initialization for unvalidated users status 
     363    // ---------------------------------------------------- 
     364    $template->assign( 
     365      'No_Confirm_Status', 
     366      array( 
     367        'Status_options' => $status_options, 
     368        'Status_selected' => $No_Valid_Status 
     369                        ) 
     370          ); 
    351371  } 
    352372   
    353   //Get validate status values 
     373  // Get validate status values 
     374  // -------------------------- 
    354375  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 
    355376  { 
     
    360381                } 
    361382                 
    362       //Template initialization for validated users status 
    363       $template->assign( 
    364             'Confirm_Status', 
    365             array( 
    366                     'Status_options' => $status_options, 
    367                     'Status_selected' => $Valid_Status 
    368                     ) 
    369             ); 
     383    // Template initialization for validated users status 
     384    // -------------------------------------------------- 
     385    $template->assign( 
     386          'Confirm_Status', 
     387          array( 
     388                  'Status_options' => $status_options, 
     389                  'Status_selected' => $Valid_Status 
     390                  ) 
     391          ); 
    370392        } 
    371393 
    372   //Get downgrade status values 
     394  // Get downgrade status values 
     395  // --------------------------- 
    373396  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 
    374397  { 
     
    379402                } 
    380403                 
    381       //Template initialization for validated users status 
    382       $template->assign( 
    383             'Downgrade_Status', 
    384             array( 
    385                     'Status_options' => $status_options, 
    386                     'Status_selected' => $Downgrade_Status 
    387                     ) 
    388             ); 
     404    // Template initialization for validated users status 
     405    // -------------------------------------------------- 
     406    $template->assign( 
     407          'Downgrade_Status', 
     408          array( 
     409                  'Status_options' => $status_options, 
     410                  'Status_selected' => $Downgrade_Status 
     411                  ) 
     412          ); 
    389413        } 
    390414 
    391415 
    392   //Level setting for unvalidated, validated users and downgrade level 
     416  // Level setting for unvalidated, validated users and downgrade level 
     417  // ------------------------------------------------------------------ 
    393418  $level_options[-1] = '------------'; 
    394419  $No_Valid_Level = -1; 
     
    397422 
    398423  // Get unvalidated privacy levels values 
     424  // ------------------------------------- 
    399425  foreach ($conf['available_permission_levels'] as $level) 
    400426  { 
     
    404430            $No_Valid_Level = $level; 
    405431          } 
    406       //Template initialization for unvalidated users level 
    407       $template->assign( 
    408         'No_Valid_Level', 
    409         array( 
    410                                         'Level_options' => $level_options, 
    411                                 'Level_selected' => $No_Valid_Level 
    412                                         ) 
    413                         ); 
     432 
     433    // Template initialization for unvalidated users level 
     434    // --------------------------------------------------- 
     435    $template->assign( 
     436      'No_Valid_Level', 
     437      array( 
     438        'Level_options' => $level_options, 
     439        'Level_selected' => $No_Valid_Level 
     440                        ) 
     441          ); 
    414442  } 
    415443 
    416444  // Get validated privacy levels values 
     445  // ----------------------------------- 
    417446  foreach ($conf['available_permission_levels'] as $level) 
    418447  { 
     
    422451            $Valid_Level = $level; 
    423452          } 
    424       //Template initialization for unvalidated users level 
    425       $template->assign( 
    426         'Valid_Level', 
    427         array( 
    428                                         'Level_options' => $level_options, 
    429                                 'Level_selected' => $Valid_Level 
    430                                         ) 
    431                         ); 
     453 
     454    // Template initialization for unvalidated users level 
     455    // --------------------------------------------------- 
     456    $template->assign( 
     457      'Valid_Level', 
     458      array( 
     459        'Level_options' => $level_options, 
     460        'Level_selected' => $Valid_Level 
     461                        ) 
     462          ); 
    432463  } 
    433464 
    434465  // Get downgrade privacy levels values 
     466  // ----------------------------------- 
    435467  foreach ($conf['available_permission_levels'] as $level) 
    436468  { 
     
    440472            $Downgrade_Level = $level; 
    441473          } 
    442       //Template initialization for unvalidated users level 
    443       $template->assign( 
    444         'Downgrade_Level', 
    445         array( 
    446                                         'Level_options' => $level_options, 
    447                                 'Level_selected' => $Downgrade_Level 
    448                                         ) 
    449                         ); 
     474 
     475    // Template initialization for unvalidated users level 
     476    // --------------------------------------------------- 
     477    $template->assign( 
     478      'Downgrade_Level', 
     479      array( 
     480        'Level_options' => $level_options, 
     481        'Level_selected' => $Downgrade_Level 
     482                        ) 
     483          ); 
    450484  } 
    451485 
    452   //Save last opened paragraph in configuration tab 
     486  // Save last opened paragraph in configuration tab 
     487  // ----------------------------------------------- 
    453488  $nb_para=(isset($_POST["nb_para"])) ? $_POST["nb_para"]:""; 
    454489  $nb_para2=(isset($_POST["nb_para2"])) ? $_POST["nb_para2"]:""; 
     
    456491  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    457492 
     493  // ------------------------------------------ 
    458494  // Template initialization for forms and data 
    459  
     495  // ------------------------------------------ 
    460496  $themeconf=$template->get_template_vars('themeconf'); 
    461497  $UAM_theme=$themeconf['id']; 
     
    548584                $msg_error1 = ''; 
    549585                 
    550     //Username without forbidden keys 
     586    // Username without forbidden keys 
     587    // ------------------------------- 
    551588    if ( isset($conf_UAM[5]) and $conf_UAM[5] == 'true' ) 
    552589          { 
     
    561598                        { 
    562599                                if (!ValidateUsername(stripslashes($row['username']))) 
    563                                         $msg_error1 .= (($msg_error1 <> '') ? '<br>' : '') . l10n('UAM_Err_audit_username_char').stripslashes($row['username']); 
     600                                        $msg_error1 .= (($msg_error1 <> '') ? '<br>' : '').l10n('UAM_Err_audit_username_char').stripslashes($row['username']); 
    564601                        } 
    565602                } 
     
    567604                $msg_error2 = ''; 
    568605                 
    569     //Email without forbidden domain 
     606    // Email without forbidden domain 
     607    // ------------------------------ 
    570608    if ( isset($conf_UAM[10]) and $conf_UAM[10] == 'true' ) 
    571609          { 
     
    585623                                  if (preg_match($pattern, $row['mail_address'])) 
    586624                                  { 
    587                                                 $msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '') . l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')'; 
     625                                                $msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '').l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')'; 
    588626                                        } 
    589627                                } 
     
    672710    { 
    673711      // dates formating and compare 
     712      // --------------------------- 
    674713      $today = date("d-m-Y"); // Get today's date 
    675714      list($day, $month, $year) = explode('-', $today); // explode date of today                                                  
     
    702741      else $display = ''; 
    703742 
     743      // Template initialization 
     744      // ----------------------- 
    704745                $template->append( 
    705746                'users', 
     
    714755                        ); 
    715756                } 
    716     //Plugin version inserted 
     757    // Plugin version inserted 
     758    // ----------------------- 
    717759    $template->assign( 
    718760      array( 
     
    11911233 
    11921234                        $expiration = expiration($local_user['id']); 
    1193        
     1235 
     1236      // Template initialization 
     1237      // ----------------------- 
    11941238                $template->append( 
    11951239                'users', 
     
    12171261    // Check if validation of register is made by admin or visitor  
    12181262    // If visitor, $Confirm_Local is used to mask useless buttons 
     1263    // ----------------------------------------------------------- 
    12191264    $Confirm_Local = ""; 
    12201265     
     
    12281273    }  
    12291274     
    1230     //Plugin version inserted 
     1275    // Plugin version inserted 
     1276    // ----------------------- 
    12311277    $template->assign( 
    12321278      array( 
     
    15581604        } 
    15591605 
     1606      // Template initialization 
     1607      // ----------------------- 
    15601608      $template->append( 
    15611609          'users', 
     
    15711619                } 
    15721620 
    1573     //Plugin version inserted 
     1621    // Plugin version inserted 
     1622    // ----------------------- 
    15741623    $template->assign( 
    15751624      array( 
  • extensions/UserAdvManager/branches/2.30/admin/template/ghosttracker.tpl

    r12250 r12272  
    113113  jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}'); 
    114114        jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 
    115         jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);  
     115        //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);  
    116116}); 
    117117</script> 
  • extensions/UserAdvManager/branches/2.30/admin/template/global.tpl

    r12250 r12272  
    857857  jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}'); 
    858858        jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 
    859         jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);  
     859        //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);  
    860860}); 
    861861</script> 
  • extensions/UserAdvManager/branches/2.30/admin/template/usermanager.tpl

    r12250 r12272  
    117117  jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}'); 
    118118        jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 
    119         jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);  
     119        //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);  
    120120}); 
    121121</script> 
  • extensions/UserAdvManager/branches/2.30/changelog.txt.php

    r12239 r12272  
    266266            Bug 2437 fixed - New feature : Request password renewal for selected users in Piwigo's users management panel. 
    267267            Bug 2445 fixed - Duplicate key MySql error when a user tries to validate his registration twice. 
     268            Bug 2447 fixed - Only for installation from scratch, all text fields pre-filled and given as examples are translated into the language of the webmaster (if the language is supported by the plugin). The default language remains English in case of any failure. 
    268269            Help files remaned and relocated in the language root directory (no more "help" subdirectory) for compliance with the new online translation tool. 
    269270*/ 
  • extensions/UserAdvManager/branches/2.30/include/functions.inc.php

    r12239 r12272  
    4040 
    4141  // Admins, Guests and Adult_Content users are not tracked for Ghost Tracker or Users Tracker 
     42  // ----------------------------------------------------------------------------------------- 
    4243  if (!is_admin() and !is_a_guest() and $user['username'] != "16" and $user['username'] != "18") 
    4344  { 
     
    4849           
    4950      // Looking for existing entry in last visit table 
     51      // ---------------------------------------------- 
    5052      $query = ' 
    5153SELECT * 
     
    5961      { 
    6062        // If not, data are inserted in table 
     63        // ---------------------------------- 
    6164        $query = ' 
    6265INSERT INTO '.USER_LASTVISIT_TABLE.' (user_id, lastvisit, reminder) 
     
    6871      { 
    6972        // If yes, data are updated in table 
     73        // --------------------------------- 
    7074        $query = ' 
    7175UPDATE '.USER_LASTVISIT_TABLE.' 
     
    9397 
    9498  // Exclusion of Adult_Content users 
     99  // -------------------------------- 
    95100  if ($register_user['username'] != "16" and $register_user['username'] != "18") 
    96101  { 
     
    98103    { 
    99104      // This is to send an information email and set user to "waiting" group or status until admin validation 
     105      // ----------------------------------------------------------------------------------------------------- 
    100106      $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
    101107      SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
     
    105111    { 
    106112      // This is to set user to "waiting" group or status until admin validation 
     113      // ----------------------------------------------------------------------- 
    107114      SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation 
    108115    } 
     
    110117    { 
    111118      // This is to send an information email without validation key 
     119      // ----------------------------------------------------------- 
    112120      $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
    113121      SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
    114122    } 
    115123    // Sending registration confirmation by email 
     124    // ------------------------------------------ 
    116125    elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true' or $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
    117126    { 
     
    144153{ 
    145154  // Cleanup for ConfirmMail table 
     155  // ----------------------------- 
    146156  DeleteConfirmMail($user_id); 
    147157  // Cleanup for LastVisit table 
     158  // --------------------------- 
    148159  DeleteLastVisit($user_id); 
    149160  // Cleanup Redirection settings 
     161  // ---------------------------- 
    150162  DeleteRedir($user_id); 
    151163} 
     
    162174 
    163175  // Exclusion of Adult_Content users 
     176  // -------------------------------- 
    164177  if ($user['username'] != "16" and $user['username'] != "18") 
    165178  { 
     
    171184 
    172185    // Password enforcement control 
     186    // ---------------------------- 
    173187    if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13])) 
    174188    { 
     
    198212 
    199213    // Username without forbidden keys 
     214    // ------------------------------- 
    200215    if (isset($conf_UAM[5]) and $conf_UAM[5] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin()) 
    201216    { 
     
    205220 
    206221    // Email without forbidden domains 
     222    // ------------------------------- 
    207223    if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin()) 
    208224    { 
     
    225241 
    226242  // Update first redirection parameter 
     243  // ---------------------------------- 
    227244  if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true')) 
    228245  { 
     
    242259 
    243260  // Special message display for password reset 
     261  // ------------------------------------------ 
    244262  if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true')) 
    245263  { 
     
    251269 
    252270  // Controls on profile page submission 
     271  // ----------------------------------- 
    253272  if (isset($_POST['validate']) and !is_admin()) 
    254273  { 
    255274    // Email without forbidden domains 
     275    // ------------------------------- 
    256276    if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['mail_address'])) 
    257277    { 
     
    264284 
    265285    // Password reset control 
     286    // ---------------------- 
    266287    if (isset($conf_UAM[38]) and $conf_UAM[38] == 'true' and UAM_check_pwgreset($user['id'])) 
    267288    { 
    268289      // if password not changed then pwdreset filed = true else pwdreset field = false 
     290      // ------------------------------------------------------------------------------ 
    269291      if (!empty($_POST['use_new_pwd'])) 
    270292      { 
     
    286308 
    287309      // Password enforcement control 
     310      // ---------------------------- 
    288311      if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13])) 
    289312      { 
     
    301324 
    302325    // Sending registration confirmation by email 
     326    // ------------------------------------------ 
    303327    if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    304328    { 
     
    316340 
    317341        // This is to send a new validation key 
     342        // ------------------------------------ 
    318343        if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
    319344         
     
    321346 
    322347        // This is to set the user to "waiting" group or status until admin validation 
     348        // --------------------------------------------------------------------------- 
    323349        if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    324350         
     
    357383   
    358384  // Performing GhostTracker scheduled tasks 
     385  // --------------------------------------- 
    359386  if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true')) 
    360387  { 
     
    363390 
    364391  // Performing User validation scheduled tasks 
     392  // ------------------------------------------ 
    365393  if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true')) 
    366394  { 
     
    369397 
    370398  // Performing redirection to profile page on first login 
     399  // ----------------------------------------------------- 
    371400  if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true')) 
    372401  {   
     
    387416 
    388417  // Performing redirection to profile page for password reset 
     418  // --------------------------------------------------------- 
    389419  if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true')) 
    390420  { 
     
    453483  } 
    454484 
    455   // Ghost accounts auto group, status or privacy level downgrade with or without information email sending and autodeletion if user already reminded 
     485  // GhostTracker auto group, status or privacy level downgrade with or without information email sending and autodeletion if user already reminded 
     486  // ---------------------------------------------------------------------------------------------------------------------------------------------- 
    456487  if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true') and ((isset($conf_UAM[25]) and $conf_UAM[25] <> -1) or (isset($conf_UAM[26]) and $conf_UAM[26] <> -1) or (isset($conf_UAM[37]) and $conf_UAM[37] <> -1))) 
    457488  { 
     
    459490        { 
    460491      // Process if a non-admin nor webmaster user is logged 
     492      // --------------------------------------------------- 
    461493      if (in_array($user['id'], $collection)) 
    462494        { 
    463495        // Check lastvisit reminder state 
     496        // ------------------------------ 
    464497        $query = ' 
    465498SELECT reminder 
     
    479512 
    480513        // If user already reminded for ghost account 
     514        // ------------------------------------------ 
    481515        if ($reminder) 
    482516        { 
    483           // delete account 
     517          // Delete account 
     518          // -------------- 
    484519          delete_user($user['id']); 
    485520 
    486521          // Logged-in user cleanup, session destruction and redirected to custom page 
     522          // ------------------------------------------------------------------------- 
    487523          invalidate_user_cache(); 
    488524          logout_user(); 
     
    495531        { 
    496532          // Check lastvisit reminder state 
     533          // ------------------------------ 
    497534          $query = ' 
    498535SELECT reminder 
     
    512549 
    513550          // If never reminded before 
     551          // ------------------------ 
    514552          if (!$reminder) 
    515553          { 
    516             // Reset of lastvisit date  
     554            // Reset of lastvisit date 
     555            // ----------------------- 
    517556            list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 
    518557 
     
    525564 
    526565          // Auto change group and / or status 
     566          // --------------------------------- 
    527567            // Delete user from all groups 
     568            // --------------------------- 
    528569            $query = " 
    529570DELETE FROM ".USER_GROUP_TABLE." 
     
    538579 
    539580            // Change user status 
     581            // ------------------ 
    540582            if ($conf_UAM[26] <> -1) 
    541583            { 
     
    549591 
    550592            // Change user group 
     593            // ----------------- 
    551594            if ($conf_UAM[25] <> -1) 
    552595            { 
     
    561604 
    562605            // Change user privacy level 
     606            // ------------------------- 
    563607            if ($conf_UAM[37] <> -1) 
    564608            { 
     
    572616 
    573617            // Auto send email notification on group / status downgrade 
     618            // -------------------------------------------------------- 
    574619            if (isset($conf_UAM[22]) and $conf_UAM[22] == 'true') 
    575620            { 
    576621              // Set reminder true 
     622              // ----------------- 
    577623              $query = " 
    578624UPDATE ".USER_LASTVISIT_TABLE." 
     
    583629             
    584630              // Reset confirmed user status to unvalidated 
     631              // ------------------------------------------ 
    585632                                                  $query = ' 
    586633UPDATE '.USER_CONFIRM_MAIL_TABLE.' 
     
    591638 
    592639              // Get users information for email notification 
     640              // -------------------------------------------- 
    593641                                                  $query = ' 
    594642SELECT id, username, mail_address 
     
    603651          elseif ($reminder) // If user already reminded for ghost account 
    604652          { 
    605             // delete account 
     653            // Delete account 
     654            // -------------- 
    606655            delete_user($user_id); 
    607656          } 
     
    643692 
    644693  // Unvalidated accounts auto email sending and autodeletion if user already reminded 
     694  // --------------------------------------------------------------------------------- 
    645695  if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true')) 
    646696  { 
     
    648698        { 
    649699      // Process if a non-admin nor webmaster user is logged 
     700      // --------------------------------------------------- 
    650701      if (in_array($user['id'], $collection)) 
    651702        { 
    652703        // Check ConfirmMail reminder state 
     704        // -------------------------------- 
    653705        $query = ' 
    654706SELECT reminder 
     
    668720 
    669721        // If never reminded before, send reminder and set reminder True 
     722        // ------------------------------------------------------------- 
    670723        if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true') 
    671724        { 
     
    673726           
    674727          // Get current user informations 
     728          // ----------------------------- 
    675729          $query = " 
    676730SELECT id, username, mail_address 
     
    684738 
    685739        // If already reminded before, delete user 
     740        // --------------------------------------- 
    686741        if ($reminder) 
    687742        { 
     
    690745 
    691746          // Logged-in user cleanup, session destruction and redirected to custom page 
     747          // ------------------------------------------------------------------------- 
    692748          invalidate_user_cache(); 
    693749          logout_user(); 
     
    700756        { 
    701757          // Check reminder state 
     758          // -------------------- 
    702759          $query = ' 
    703760SELECT reminder 
     
    717774 
    718775          // If never reminded before, send reminder and set reminder True 
     776          // ------------------------------------------------------------- 
    719777          if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true') 
    720778          { 
     
    722780           
    723781            // Get current user informations 
     782            // ----------------------------- 
    724783            $query = " 
    725784SELECT id, username, mail_address 
     
    733792          elseif ($reminder) // If user already reminded for account validation 
    734793          { 
    735             // delete account 
     794            // Delete account 
     795            // -------------- 
    736796            delete_user($user_id); 
    737797          } 
     
    756816 
    757817// Admin user management 
     818// --------------------- 
    758819  if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list') 
    759820  { 
     
    761822    { 
    762823      // Email without forbidden domains 
     824      // ------------------------------- 
    763825      if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email'])) 
    764826      { 
     
    824886 
    825887// We have to get the user's language in database 
     888// ---------------------------------------------- 
    826889  $query =' 
    827890SELECT user_id, language 
     
    832895 
    833896// Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 
     897// ------------------------------------------------------------------------------------------------------------------------------- 
    834898  if (empty($data)) 
    835899  { 
    836900// And switch gallery to this language before using personalized and multilangual contents 
     901// --------------------------------------------------------------------------------------- 
    837902    $language = pwg_get_session_var( 'lang_switch', $user['language'] ); 
    838903    switch_lang_to($language); 
     
    841906  { 
    842907// And switch gallery to this language before using personalized and multilangual contents 
    843     $language = $data['language']; // Usefull for debugging 
     908// --------------------------------------------------------------------------------------- 
     909    //$language = $data['language']; // Usefull for debugging 
    844910    switch_lang_to($data['language']); 
    845911    load_language('plugin.lang', UAM_PATH); 
     
    855921      { 
    856922        // Management of Extension flags ([username], [mygallery], [myurl]) 
     923        // ---------------------------------------------------------------- 
    857924        $patterns[] = '#\[username\]#i'; 
    858925        $replacements[] = $username; 
     
    907974  } 
    908975 
    909   if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) 
     976  if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) // Add confirmation link ? 
    910977  { 
    911978    $infos2 = array 
     
    915982    ); 
    916983 
    917     if (isset($conf_UAM[9]) and $conf_UAM[9] <> '') 
     984    if (isset($conf_UAM[9]) and $conf_UAM[9] <> '') // Add personal text in confirmation email ? 
    918985    { 
    919986      // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 
     987      // ------------------------------------------------------------------------- 
    920988      $patterns[] = '#\[username\]#i'; 
    921989      $replacements[] = $username; 
     
    9651033 
    9661034// Sending the email with subject and contents 
     1035// ------------------------------------------- 
    9671036  pwg_mail($email, array( 
    9681037    'subject' => $subject, 
     
    9711040 
    9721041// Switching back to default language 
     1042// ---------------------------------- 
    9731043switch_lang_back(); 
    9741044} 
     
    9921062   
    9931063// We have to get the user's language in database 
     1064// ---------------------------------------------- 
    9941065  $query =' 
    9951066SELECT user_id, language 
     
    10011072   
    10021073// And switch gallery to this language before using personalized and multilangual contents 
     1074// --------------------------------------------------------------------------------------- 
    10031075  switch_lang_to($data['language']); 
    10041076    
     
    10131085      { 
    10141086        // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 
     1087        // ------------------------------------------------------------------------- 
    10151088        $patterns[] = '#\[username\]#i'; 
    10161089        $replacements[] = $username; 
     
    10391112                        } 
    10401113 
    1041 // Set reminder true       
     1114// Set reminder true  
     1115// -----------------      
    10421116      $query = " 
    10431117UPDATE ".USER_CONFIRM_MAIL_TABLE." 
     
    10551129      { 
    10561130        // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 
     1131        // ------------------------------------------------------------------------- 
    10571132        $patterns[] = '#\[username\]#i'; 
    10581133        $replacements[] = $username; 
     
    10751150      } 
    10761151       
    1077 // Set reminder true       
     1152// Set reminder true 
     1153// ----------------- 
    10781154      $query = " 
    10791155UPDATE ".USER_CONFIRM_MAIL_TABLE." 
     
    10921168 
    10931169// Switching back to default language 
     1170// ---------------------------------- 
    10941171switch_lang_back(); 
    10951172} 
     
    11131190 
    11141191// We have to get the user's language in database 
     1192// ---------------------------------------------- 
    11151193  $query =' 
    11161194SELECT user_id, language 
     
    11221200 
    11231201// And switch gallery to this language before using personalized and multilangual contents 
     1202// --------------------------------------------------------------------------------------- 
    11241203  switch_lang_to($data['language']); 
    11251204    
     
    11311210  { 
    11321211    // Management of Extension flags ([username], [mygallery], [myurl], [days]) 
     1212    // ------------------------------------------------------------------------ 
    11331213    $patterns[] = '#\[username\]#i'; 
    11341214    $replacements[] = $username; 
     
    11581238 
    11591239// Switching back to default language 
     1240// ---------------------------------- 
    11601241switch_lang_back(); 
    11611242} 
     
    11791260 
    11801261// We have to get the user's language in database 
     1262// ---------------------------------------------- 
    11811263  $query =' 
    11821264SELECT user_id, language 
     
    11871269 
    11881270// Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 
     1271// ------------------------------------------------------------------------------------------------------------------------------- 
    11891272  if (empty($data)) 
    11901273  { 
    11911274// And switch gallery to this language before using personalized and multilangual contents 
     1275// --------------------------------------------------------------------------------------- 
    11921276    $language = pwg_get_session_var( 'lang_switch', $user['language'] ); 
    11931277    switch_lang_to($language); 
     
    11961280  { 
    11971281// And switch gallery to this language before using personalized and multilangual contents 
     1282// --------------------------------------------------------------------------------------- 
    11981283    $language = $data['language']; // Usefull for debugging 
    11991284    switch_lang_to($data['language']); 
     
    12061291  { 
    12071292    // Management of Extension flags ([username], [mygallery], [myurl]) 
     1293    // ---------------------------------------------------------------- 
    12081294    $patterns[] = '#\[username\]#i'; 
    12091295    $replacements[] = stripslashes($username); 
     
    12351321 
    12361322// Sending the email with subject and contents 
     1323// ------------------------------------------- 
    12371324  pwg_mail($email, array( 
    12381325    'subject' => $subject, 
     
    12411328 
    12421329// Switching back to default language 
     1330// ---------------------------------- 
    12431331switch_lang_back(); 
    12441332} 
     
    12621350 
    12631351// We have to get the user's language in database 
     1352// ---------------------------------------------- 
    12641353  $query =' 
    12651354SELECT user_id, language 
     
    12701359 
    12711360// Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 
     1361// ------------------------------------------------------------------------------------------------------------------------------- 
    12721362  if (empty($data)) 
    12731363  { 
    12741364// And switch gallery to this language before using personalized and multilangual contents 
     1365// --------------------------------------------------------------------------------------- 
    12751366    $language = pwg_get_session_var( 'lang_switch', $user['language'] ); 
    12761367    switch_lang_to($language); 
     
    12791370  { 
    12801371// And switch gallery to this language before using personalized and multilangual contents 
     1372// --------------------------------------------------------------------------------------- 
    12811373    $language = $data['language']; // Usefull for debugging 
    12821374    switch_lang_to($data['language']); 
     
    12851377 
    12861378// Retreive users email and user name from id 
     1379// ------------------------------------------ 
    12871380  $query =' 
    12881381SELECT id, username, mail_address 
     
    12971390  { 
    12981391    // Management of Extension flags ([username], [mygallery], [myurl]) 
     1392    // ---------------------------------------------------------------- 
    12991393    $patterns[] = '#\[username\]#i'; 
    13001394    $replacements[] = $result['username']; 
     
    13181412 
    13191413// Sending the email with subject and contents 
     1414// ------------------------------------------- 
    13201415  pwg_mail($result['mail_address'], array( 
    13211416    'subject' => $subject, 
     
    13241419 
    13251420// Switching back to default language 
     1421// ---------------------------------- 
    13261422switch_lang_back(); 
    13271423} 
     
    13871483 
    13881484    // Delete user from all groups 
     1485    // --------------------------- 
    13891486    $query = " 
    13901487DELETE FROM ".USER_GROUP_TABLE." 
     
    13991496 
    14001497    // Set user unvalidated status 
     1498    // --------------------------- 
    14011499    if (!is_admin() and $conf_UAM[7] <> -1) 
    14021500    { 
     
    14101508 
    14111509    // Set user unvalidated group 
     1510    // -------------------------- 
    14121511    if (!is_admin() and $conf_UAM[2] <> -1) 
    14131512    { 
     
    14221521 
    14231522    // Set user unvalidated privacy level 
     1523    // ---------------------------------- 
    14241524    if (!is_admin() and $conf_UAM[35] <> -1) 
    14251525    { 
     
    14511551 
    14521552// Groups cleanup 
     1553// -------------- 
    14531554  $query = " 
    14541555DELETE FROM ".USER_GROUP_TABLE." 
     
    16611762      { 
    16621763                                // Verify Confirmmail with time limit ON 
     1764        // ------------------------------------- 
    16631765                                if (isset ($conf_UAM_ConfirmMail[1])) 
    16641766                                { 
    1665                                         // dates formating and compare 
     1767                                        // Dates formating and compare 
     1768          // --------------------------- 
    16661769                                        $today = date("d-m-Y"); // Get today's date 
    16671770                                        list($day, $month, $year) = explode('-', $today); // explode date of today                                                
     
    16761779 
    16771780                                        // Condition with the value set for time limit 
     1781          // ------------------------------------------- 
    16781782                                        if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set 
    16791783                                        { 
    16801784                                                list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 
    16811785 
    1682             // Update ConfirmMail table  
     1786            // Update ConfirmMail table 
     1787            // ------------------------ 
    16831788                                                $query = ' 
    16841789UPDATE '.USER_CONFIRM_MAIL_TABLE.' 
     
    16891794 
    16901795            // Update LastVisit table - Force reminder field to false 
    1691             // Usefull when a user has been automatically downgraded and revalidate its registration   
     1796            // Usefull when a user has been automatically downgraded and revalidate its registration 
     1797            // ------------------------------------------------------------------------------------- 
    16921798                                                $query = ' 
    16931799UPDATE '.USER_LASTVISIT_TABLE.' 
     
    17391845 
    17401846                                                // Refresh user's category cache 
     1847            // ----------------------------- 
    17411848                                                invalidate_user_cache(); 
    17421849   
     
    17491856                                } 
    17501857                                // Verify Confirmmail with time limit OFF 
     1858        // -------------------------------------- 
    17511859                                else 
    17521860                                { 
    17531861                                        list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 
    17541862 
    1755           // Update ConfirmMail table  
     1863          // Update ConfirmMail table 
     1864          // ------------------------ 
    17561865                                        $query = ' 
    17571866UPDATE '.USER_CONFIRM_MAIL_TABLE.' 
     
    17621871 
    17631872          // Update LastVisit table - Force reminder field to false 
    1764           // Usefull when a user has been automatically downgraded and revalidate its registration   
     1873          // Usefull when a user has been automatically downgraded and revalidate its registration 
     1874          // ------------------------------------------------------------------------------------- 
    17651875                                        $query = ' 
    17661876UPDATE '.USER_LASTVISIT_TABLE.' 
     
    18191929 
    18201930                                        // Refresh user's category cache 
     1931          // ----------------------------- 
    18211932                                        invalidate_user_cache(); 
    18221933   
     
    20392150           
    20402151        // Get ConfirmMail configuration 
     2152  // ----------------------------- 
    20412153  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    20422154  // Get UAM configuration 
     2155  // --------------------- 
    20432156  $conf_UAM = unserialize($conf['UserAdvManager']); 
    20442157   
    20452158  $users = array(); 
    20462159 
    2047         // search users depending expiration date 
     2160        // Search users depending expiration date 
     2161  // -------------------------------------- 
    20482162  $query = ' 
    20492163SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 
     
    20922206        } 
    20932207 
    2094         // add group lists 
     2208        // Add groups list 
     2209  // --------------- 
    20952210  $user_ids = array(); 
    20962211  foreach ($users as $i => $user) 
     
    21362251           
    21372252        // Get ConfirmMail configuration 
     2253  // ----------------------------- 
    21382254  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    21392255   
     
    21412257 
    21422258        // search users depending expiration date 
     2259  // -------------------------------------- 
    21432260  $query = ' 
    21442261SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 
     
    21762293  $users = array(); 
    21772294 
    2178         // search users depending expiration date 
     2295        // Search users depending expiration date 
     2296  // -------------------------------------- 
    21792297  $query = ' 
    21802298SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 
     
    21992317        } 
    22002318 
    2201         // add group lists 
     2319        // Add groups list 
     2320  // --------------- 
    22022321  $user_ids = array(); 
    22032322  foreach ($users as $i => $user) 
     
    22242343  $users = array(); 
    22252344   
    2226         // search users depending expiration date and reminder sent 
     2345        // Search users depending expiration date and reminder sent 
     2346  // -------------------------------------------------------- 
    22272347  $query = ' 
    22282348SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 
     
    22572377  $users = array(); 
    22582378 
    2259         // search users depending expiration date 
     2379        // Search users depending expiration date 
     2380  // -------------------------------------- 
    22602381  $query = ' 
    22612382SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 
     
    22802401        } 
    22812402 
    2282         // add group lists 
     2403        // Add groups list 
     2404  // --------------- 
    22832405  $user_ids = array(); 
    22842406  foreach ($users as $i => $user) 
     
    23042426           
    23052427        // Get ConfirmMail configuration 
     2428  // ----------------------------- 
    23062429  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    23072430           
    23082431        // Get UAM configuration 
     2432  // --------------------- 
    23092433  $conf_UAM = unserialize($conf['UserAdvManager']); 
    23102434         
     
    23202444        if (!empty($registration_date)) 
    23212445  { 
    2322                 // dates formating and compare 
     2446                // Dates formating and compare 
     2447    // --------------------------- 
    23232448                $today = date("d-m-Y"); // Get today's date 
    23242449                list($day, $month, $year) = explode('-', $today); // explode date of today                                                
     
    23332458 
    23342459                // Condition with the value set for time limit 
     2460    // ------------------------------------------- 
    23352461                if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set 
    23362462                { 
     
    23582484 
    23592485  // Initialisation des variables - Variables initiation 
     2486  // --------------------------------------------------- 
    23602487  $points = 0; 
    23612488  $point_lowercase = 0; 
     
    23642491  $point_characters = 0; 
    23652492 
    2366   // On récupère la longueur du mot de passe - Getting password lengh    
     2493  // On récupère la longueur du mot de passe - Getting password lengh 
     2494  // ---------------------------------------------------------------- 
    23672495  $length = strlen($password); 
    23682496   
     
    23722500    // On sélectionne une à une chaque lettre - Select each letters 
    23732501    // $i étant à 0 lors du premier passage de la boucle - $i is 0 at first turn 
     2502    // ------------------------------------------------------------------------- 
    23742503    $letters = $password[$i]; 
    23752504 
     
    23772506    { 
    23782507      // On ajoute 1 point pour une minuscule - Adding 1 point to score for a lowercase 
     2508      // ------------------------------------------------------------------------------ 
    23792509                  $points = $points + 1; 
    23802510 
    23812511                  // On rajoute le bonus pour une minuscule - Adding bonus points for lowercase 
     2512      // -------------------------------------------------------------------------- 
    23822513                  $point_lowercase = 1; 
    23832514    } 
     
    23852516    { 
    23862517      // On ajoute 2 points pour une majuscule - Adding 2 points to score for uppercase 
     2518      // ------------------------------------------------------------------------------ 
    23872519      $points = $points + 2; 
    23882520                 
    23892521      // On rajoute le bonus pour une majuscule - Adding bonus points for uppercase 
     2522      // -------------------------------------------------------------------------- 
    23902523      $point_uppercase = 2; 
    23912524    } 
     
    23932526    { 
    23942527      // On ajoute 3 points pour un chiffre - Adding 3 points to score for numbers 
     2528      // ------------------------------------------------------------------------- 
    23952529      $points = $points + 3; 
    23962530                 
    23972531      // On rajoute le bonus pour un chiffre - Adding bonus points for numbers 
     2532      // --------------------------------------------------------------------- 
    23982533      $point_numbers = 3; 
    23992534    } 
     
    24012536    { 
    24022537      // On ajoute 5 points pour un caractère autre - Adding 5 points to score for special characters 
     2538      // -------------------------------------------------------------------------------------------- 
    24032539      $points = $points + 5; 
    24042540                 
    24052541      // On rajoute le bonus pour un caractère autre - Adding bonus points for special characters 
     2542      // ---------------------------------------------------------------------------------------- 
    24062543      $point_characters = 5; 
    24072544    } 
     
    24092546 
    24102547  // Calcul du coefficient points/longueur - calculating the coefficient points/length 
     2548  // --------------------------------------------------------------------------------- 
    24112549  $step1 = $points / $length; 
    24122550 
    24132551  // Calcul du coefficient de la diversité des types de caractères... - Calculation of the diversity of character types... 
     2552  // --------------------------------------------------------------------------------------------------------------------- 
    24142553  $step2 = $point_lowercase + $point_uppercase + $point_numbers + $point_characters; 
    24152554 
    24162555  // Multiplication du coefficient de diversité avec celui de la longueur - Multiplying the coefficient of diversity with that of the length 
     2556  // -------------------------------------------------------------------------------------------------------------------------------------------- 
    24172557  $score = $step1 * $step2; 
    24182558 
    24192559  // Multiplication du resultat par la longueur de la chaine - Multiplying the result by the length of the string 
     2560  // ------------------------------------------------------------------------------------------------------------ 
    24202561  $finalscore = $score * $length; 
    24212562 
     
    24862627  } 
    24872628// IMPORTANT SECURITY ! 
     2629// -------------------- 
    24882630  $plugin = array_map('htmlspecialchars', $plugin); 
    24892631 
     
    26192761 
    26202762  // Query to get informations in database 
     2763  // ------------------------------------- 
    26212764  if (!empty($user_ids)) 
    26222765  { 
     
    26592802   
    26602803  // Initial backup folder creation and file initialisation 
     2804  // ------------------------------------------------------ 
    26612805  if (!is_dir(UAM_PATH.'/include/backup')) 
    26622806    mkdir(UAM_PATH.'/include/backup'); 
     
    26682812 
    26692813  // Saving UAM specific tables 
     2814  // -------------------------- 
    26702815  $ListTables = array(USER_CONFIRM_MAIL_TABLE, USER_LASTVISIT_TABLE); 
    26712816  $j=0; 
     
    27082853   
    27092854  // Saving UAM configuration 
     2855  // ------------------------ 
    27102856  $insertions = "-- -------------------------------------------------------\n"; 
    27112857  $insertions .= "-- Insert UAM configuration in ".CONFIG_TABLE."\n"; 
     
    27342880 
    27352881  // Download generated dump file 
     2882  // ---------------------------- 
    27362883  if ($download == 'true') 
    27372884  { 
  • extensions/UserAdvManager/branches/2.30/include/upgradedb.inc.php

    r12248 r12272  
    2929 
    3030  // Get current plugin version 
     31  // -------------------------- 
    3132  $plugin =  PluginInfos(UAM_PATH); 
    3233  $version = $plugin['version']; 
    3334 
    3435  // Update plugin version in #_config table 
     36  // --------------------------------------- 
    3537  $query = ' 
    3638UPDATE '.CONFIG_TABLE.' 
     
    4547// Check #_plugin table consistency 
    4648// Only useful if a previous version upgrade has not worked correctly (rare case) 
     49// ------------------------------------------------------------------------------ 
    4750  $query = ' 
    4851SELECT version 
     
    133136{ 
    134137  // Create missing table 
     138  // -------------------- 
    135139  $query = " 
    136140ALTER TABLE ".USER_CONFIRM_MAIL_TABLE." 
     
    141145 
    142146  // Upgrade plugin configuration 
     147  // ---------------------------- 
    143148        global $conf; 
    144149 
     
    191196 
    192197  // Changing parameter name 
     198  // ----------------------- 
    193199  $q = ' 
    194200UPDATE '.CONFIG_TABLE.' 
     
    206212 
    207213  // Upgrading ConfirmMail options 
     214  // ----------------------------- 
    208215  $query = ' 
    209216SELECT value 
     
    235242 
    236243  // Upgrading options 
     244  // ----------------- 
    237245  $query = ' 
    238246SELECT value 
     
    289297 
    290298  // Upgrading options 
     299  // ----------------- 
    291300  $query = ' 
    292301SELECT value 
     
    313322 
    314323  // Insert a new config entry for futur plugin's version check 
     324  // ---------------------------------------------------------- 
    315325  $query = ' 
    316326INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 
     
    329339 
    330340  // Upgrading options 
     341  // ----------------- 
    331342  $query = ' 
    332343SELECT value 
     
    352363 
    353364  // Create new UAM entry in plugins table 
     365  // ------------------------------------- 
    354366  $uam_new_version = "2.20.0"; 
    355367 
     
    361373  pwg_query($query); 
    362374 
    363   // Delete old plugin entry in plugins table  
     375  // Delete old plugin entry in plugins table 
     376  // ---------------------------------------- 
    364377  $query = ' 
    365378DELETE FROM '.PLUGINS_TABLE.' 
     
    370383  pwg_query($query); 
    371384 
    372   // rename directory 
     385  // Rename directory 
     386  // ---------------- 
    373387  if (!rename(PHPWG_PLUGINS_PATH.'NBC_UserAdvManager', PHPWG_PLUGINS_PATH.'UserAdvManager')) 
    374388  { 
     
    384398 
    385399  // Upgrading options 
     400  // ----------------- 
    386401  $query = ' 
    387402SELECT value 
     
    409424 
    410425  // Upgrading options 
     426  // ----------------- 
    411427  $query = ' 
    412428SELECT value 
     
    435451 
    436452  // Upgrading options 
     453  // ----------------- 
    437454  $query = ' 
    438455SELECT value 
     
    447464 
    448465  // Refactoring all configuration options 
     466  // ------------------------------------- 
    449467  $Newconf_UAM[0] = $Newconf_UAM[0]; 
    450468  $Newconf_UAM[1] = $Newconf_UAM[1]; 
     
    484502   
    485503  // unset obsolete conf 
     504  // ------------------- 
    486505  unset ($Newconf_UAM[35]); 
    487506  unset ($Newconf_UAM[36]); 
     
    501520 
    502521  // Upgrading options 
     522  // ----------------- 
    503523  $query = ' 
    504524SELECT value 
     
    522542 
    523543  // Piwigo's native tables modifications for password reset function - Add pwdreset column 
     544  // -------------------------------------------------------------------------------------- 
    524545  $query = ' 
    525546SHOW COLUMNS FROM '.USERS_TABLE.' 
  • extensions/UserAdvManager/branches/2.30/language/en_UK/help.lang.php

    r12239 r12272  
    331331... 
    332332'; 
    333 $lang['UAM_miscTitle'] = 'Other miscellaneous options'; 
     333$lang['UAM_miscTitle'] = 'Miscellaneous options'; 
    334334$lang['UAM_miscTitle_d'] = ' 
    335335- Registered users monitoring<br> 
  • extensions/UserAdvManager/branches/2.30/language/en_UK/plugin.lang.php

    r12239 r12272  
    343343$lang['UAM_MiscOptions'] = 'Other miscellaneous options'; 
    344344$lang['UAM_Title3'] = 'Ghost users management'; 
    345 $lang['UAM_Title5'] = 'Other miscellaneous options'; 
     345$lang['UAM_Title5'] = 'Miscellaneous options'; 
    346346$lang['UAM_Password_Reset_Msg'] = 'Please, change your password!'; 
    347347$lang['UAM_PwdReset'] = 'Password renewal'; 
     
    357357$lang['UAM %d user pwdreseted'] = 'Password renewal required for %d user'; 
    358358$lang['UAM %d users pwdreseted'] = 'Password renewal required for %d users'; 
     359$lang['UAM_Error_Using_illegal_Kdays'] = 'Using the [Kdays] tag is allowed only if the deadline for registration validation limited is active. Refer to the text field in red to correct the problem.'; 
     360$lang['UAM_Default_InfoMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery]. 
     361 
     362Please, find find below your connexion information.'; 
     363$lang['UAM_Default_ConfirmMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery]. 
     364 
     365To complete the procedure and be able to browse through the pictures, thank you kindly confirm your registration by clicking on the link in this message.'; 
     366$lang['UAM_Default_GhstReminder_Txt'] = 'Hello [username]. 
     367         
     368This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 
     369 
     370On receipt of this message and no new visit within [days] days, we would be obliged to automatically delete your account. 
     371 
     372Best regards, 
     373 
     374The admin of the gallery [mygallery] - [myurl]'; 
     375$lang['UAM_Default_GhstDeletion_Txt'] = 'Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery]. Please register again.'; 
     376$lang['UAM_Default_GhstDemotion_Txt'] = 'Sorry [username], your account has been deprecated due to a too long time passed since your last visit at [mygallery]. Please, use the following link to revalidate your account:'; 
     377$lang['UAM_Default_AdminValidation_Txt'] = 'Hello [username]! Thank you for registering and welcome to [mygallery]. 
     378 
     379Your account has been manually validated by the webmaster of [mygallery]. You may now log in at [myurl] and make any appropriate changes to your profile.'; 
     380$lang['UAM_Default_PwdRequest_Txt'] = 'You have requested a password reset on our gallery. Please, find below your new connection settings.'; 
     381$lang['UAM_Default_ValidationTimeout_Txt'] = 'Sorry, your account has been deleted because you have not validated your registration in requested time ([Kdays] days). Please, retry registration with a valid and non blocked email account.'; 
     382$lang['UAM_Default_CfmMail_Remail_Txt1'] = 'Hello [username]. 
     383                 
     384This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again x days to validate your registration. 
     385 
     386Note: After this period, your account will be permanently deleted.'; 
     387$lang['UAM_Default_CfmMail_Remail_Txt2'] = 'Hello [username]. 
     388 
     389This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have x days to confirm your registration by clicking on the link in the message you should have received when you registered. 
     390 
     391Note: After this period, your account will be permanently deleted.'; 
     392$lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Welcome [username]! You have confirmed that you are human and may now use [mygallery]!'; 
     393$lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.'; 
    359394// --------- End: New or revised $lang ---- from version 2.30.0 
    360395?> 
  • extensions/UserAdvManager/branches/2.30/language/fr_FR/help.lang.php

    r12239 r12272  
    327327... 
    328328'; 
    329 $lang['UAM_miscTitle'] = 'Autres options diverses'; 
     329$lang['UAM_miscTitle'] = 'Autres options'; 
    330330$lang['UAM_miscTitle_d'] = ' 
    331331- Suivi des visiteurs inscrits<br> 
  • extensions/UserAdvManager/branches/2.30/language/fr_FR/plugin.lang.php

    r12239 r12272  
    340340$lang['UAM_MiscOptions'] = 'Autres options'; 
    341341$lang['UAM_Title3'] = 'Gestion des utilisateurs fantômes'; 
    342 $lang['UAM_Title5'] = 'Autres options diverses'; 
     342$lang['UAM_Title5'] = 'Autres options'; 
    343343$lang['UAM_Password_Reset_Msg'] = 'Veuillez modifier votre mot de passe !'; 
    344344$lang['UAM_PwdReset'] = 'Renouvellement du mot de passe'; 
     
    354354$lang['UAM %d user pwdreseted'] = 'Renouvellement de mot de passe demandé pour %d utilisateur'; 
    355355$lang['UAM %d users pwdreseted'] = 'Renouvellement de mot de passe demandé pour %d utilisateurs'; 
     356$lang['UAM_Error_Using_illegal_Kdays'] = 'L\'utilisation de la balise [Kdays] n\'est autorisée que si la limitation du délai de validation d\'inscription est active. Reportez vous au champ de texte en rouge pour corriger le problème.'; 
     357$lang['UAM_Default_InfoMail_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery]. 
     358 
     359Vous trouverez ci-dessous vos informations de connexion sur la galerie.'; 
     360$lang['UAM_Default_ConfirmMail_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery]. 
     361 
     362Pour terminer la procédure et pouvoir parcourir l\'ensemble des photos, merci de bien vouloir valider votre inscription en cliquant sur le lien dans ce message.'; 
     363$lang['UAM_Default_GhstReminder_Txt'] = 'Bonjour [username]. 
     364         
     365Ceci est un message de rappel car cela fait longtemps que vous n\'êtes pas revenu visiter la galerie [mygallery]. Si vous ne souhaitez plus utiliser votre compte d\'accès, merci de bien vouloir nous le faire savoir en répondant à ce message. Votre compte sera alors immédiatement détruit. 
     366 
     367A la réception de ce présent message et sans nouvelle visite de votre part sous [days] jours, nous serions dans l\'obligation de supprimer automatiquement votre compte. 
     368 
     369Cordialement, 
     370 
     371L\'administrateur de la galerie [mygallery] - [myurl]'; 
     372$lang['UAM_Default_GhstDeletion_Txt'] = 'Désolé [username], votre compte a été supprimé automatiquement pour cause de délai dépassé depuis votre dernière visite à [mygallery]. Veuillez vous réinscrire.'; 
     373$lang['UAM_Default_GhstDemotion_Txt'] = 'Désolé [username], votre compte a été rétrogradé pour cause de dépassement de délai depuis votre dernière visite à [mygallery]. Veuillez revalider votre inscription en cliquant sur le lien suivant :'; 
     374$lang['UAM_Default_AdminValidation_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery]. 
     375 
     376Votre inscription a été validée manuellement par l\'administrateur de [mygallery]. Vous pouvez maintenant vous connecter à [myurl] et modifier vos informations de profil.'; 
     377$lang['UAM_Default_PwdRequest_Txt'] = 'Vous avez demandé le renouvellement de votre mot de passe. Veuillez trouver ci-dessous vos nouvelles informations de connexion.'; 
     378$lang['UAM_Default_ValidationTimeout_Txt'] = 'Désolé, votre accès a été supprimé car vous n\'avez pas validé votre inscription dans le temps imparti ([Kdays] jours). Merci de vous réinscrire en prenant garde d\'utiliser une adresse de messagerie valide et accessible.'; 
     379$lang['UAM_Default_CfmMail_Remail_Txt1'] = 'Bonjour [username]. 
     380                 
     381Ceci est un message de rappel car vous n\'avez pas validé votre inscription sur [mygallery] et votre clé de validation a expiré. Pour vous permettre d\'accéder à notre galerie, votre période de validation a été réinitialisée. Vous avez donc un nouveau délai de x jours pour valider votre inscription. 
     382 
     383Note: A l\'issue de cette période sans validation, votre compte sera définitivement supprimé.'; 
     384$lang['UAM_Default_CfmMail_Remail_Txt2'] = 'Bonjour [username]. 
     385 
     386Ceci est un message de rappel car vous vous êtes inscrit sur notre galerie [mygallery] mais vous n\'avez pas encore validé cette inscription et le délai va bientôt expirer. Un délai supplémentaire de x jours vous est accordé. Veuillez cliquer sur le lien de confirmation que vous avez reçu lors de votre inscription. 
     387 
     388Note: A l\'issue de cette période sans validation, votre compte sera définitivement supprimé.'; 
     389$lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Bienvenue [username]! Vous avez confirmé que vous étiez bien un humain et non une machine. Vous pouvez maintenant profiter pleinement de [mygallery]!'; 
     390$lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Votre clé d\'activation est incorrecte ou expirée ou vous avez déjà validé votre inscription. Merci de contacter le webmestre de la galerie pour résoudre le problème.'; 
    356391// --------- End: New or revised $lang ---- from version 2.30.0 
    357392?> 
  • extensions/UserAdvManager/branches/2.30/main.inc.php

    r12248 r12272  
    2929 
    3030// Plugin administration panel 
     31// --------------------------- 
    3132add_event_handler('get_admin_plugin_menu_links', 'UAM_admin_menu'); 
    3233 
    33 /* Lastvisit table feed for Ghost Tracker */ 
     34// Lastvisit table feed for Ghost Tracker 
     35// -------------------------------------- 
    3436add_event_handler('loc_begin_index', 'UAM_GhostTracker'); 
    3537 
    3638// User creation 
     39// ------------- 
    3740add_event_handler('register_user', 'UAM_Adduser'); 
    3841 
    3942// User deletion 
     43// ------------- 
    4044add_event_handler('delete_user', 'UAM_Deluser'); 
    4145 
    4246// Check users registration 
     47// ------------------------ 
    4348add_event_handler('register_user_check', 'UAM_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    4449 
     
    4954 
    5055// Redirection to profile page 
     56// --------------------------- 
    5157add_event_handler('login_success', 'UAM_LoginTasks'); 
    5258 
    5359// Adding customized text to lost password email 
     60// --------------------------------------------- 
    5461add_event_handler('render_lost_password_mail_content', 'UAM_lost_password_mail_content'); 
    5562 
    5663// *** Important ! This is necessary to make email exclusion work in admin's users management panel *** 
     64// ---------------------------------------------------------------------------------------------------- 
    5765add_event_handler('init', 'UAM_InitPage'); 
    5866 
    5967// PWG_Stuffs module 
     68// ----------------- 
    6069if ((isset($conf_UAM[33]) and $conf_UAM[33] == 'true')) 
    6170{ 
     
    6473 
    6574// Add new feature in user_list - Password Reset 
     75// --------------------------------------------- 
    6676if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true')) 
    6777{ 
    68   // add new column on user_list 
     78  // Add new column on user_list 
     79  // --------------------------- 
    6980  add_event_handler('loc_visible_user_list', 'UAM_loc_visible_user_list'); 
    7081 
    71   //add prefilter on user_list 
     82  // Add prefilter on user_list 
     83  // -------------------------- 
    7284  add_event_handler('loc_begin_admin', 'UAM_PwdReset_Action',60); 
    73    
     85 
     86  /** 
     87   * UAM_PwdReset_Action - Triggered on UAM_PwdReset_Action 
     88   * Handle passord reset action in user_list.php 
     89   */ 
    7490  function UAM_PwdReset_Action() 
    7591  { 
     
    170186  } 
    171187 
     188  /** 
     189   * UAM_PwdReset_Prefilter 
     190   * Adds action field for password reset in user_list.tpl 
     191   */ 
    172192  function UAM_PwdReset_Prefilter($content, &$smarty) 
    173193  { 
  • extensions/UserAdvManager/branches/2.30/maintain.inc.php

    r12248 r12272  
    99include_once (UAM_PATH.'include/functions.inc.php'); 
    1010 
     11load_language('plugin.lang', UAM_PATH); 
     12 
    1113 
    1214function plugin_install() 
     
    1820/* ****************************************************************** */ 
    1921 
     22  $defaultUAM = array(); 
     23  $defaultConfirmMail = array(); 
     24 
    2025  // Default global parameters for UserAdvManager conf 
    21   $default1 = array('false','false',-1,-1,-1,'false','',-1,'','','false','','false',100,'false','false',10,'Hello [username]. 
    22          
    23 This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 
    24  
    25 On receipt of this message and no new visit within 15 days, we would be obliged to automatically delete your account. 
    26  
    27 Best regards, 
    28  
    29 The admin of the gallery.','false','false','false','false','false','Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery].','Sorry [username], your account has been deprecated due to a too long time passed since your last visit at [mygallery]. Please, use the following link to revalidate your account.',-1,-1,'Thank you for registering at [mygallery]. Your account has been manually validated by _admin_. You may now log in at _link_to_site_ and make any appropriate changes to your profile. Welcome to _name_of_site_!','false','You have requested a password reset on our gallery. Please, find below your new connection settings.','false','Sorry, your account has been deleted because you have not validated your registration in requested time. Please, try registration with a valid and non blocked email account.','false','false','false',-1,-1,-1,'false'); 
    30  
     26  // ------------------------------------------------- 
     27  $defaultUAM[0] = 'false';                                   // UAM_MAIL_INFO_TRUE/FALSE 
     28  $defaultUAM[1] = 'false';                                   // UAM_CONFIRM_MAIL_TRUE/FALSE 
     29  $defaultUAM[2] = '-1';                                      // UAM_No_Confirm_Group 
     30  $defaultUAM[3] = '-1';                                      // UAM_Validated_Group 
     31  $defaultUAM[4] = '-1';                                      // UAM_Validated_Status 
     32  $defaultUAM[5] = 'false';                                   // UAM_USERNAME_CHAR_TRUE 
     33  $defaultUAM[6] = '';                                        // UAM_USERNAME_CHAR_LIST 
     34  $defaultUAM[7] = '-1';                                      // UAM_No_Confirm_Status 
     35  $defaultUAM[8] = l10n('UAM_Default_InfoMail_Txt');          // UAM_MAILINFO_TEXT 
     36  $defaultUAM[9] = l10n('UAM_Default_ConfirmMail_Txt');       // UAM_CONFIRMMAIL_TEXT 
     37  $defaultUAM[10] = 'false';                                  // UAM_MAILEXCLUSION_TRUE/FALSE 
     38  $defaultUAM[11] = '';                                       // UAM_MAILEXCLUSION_LIST 
     39  $defaultUAM[12] = 'false';                                  // UAM_PASSWORDENF_TRUE/FALSE 
     40  $defaultUAM[13] = '100';                                    // UAM_PASSWORD_SCORE 
     41  $defaultUAM[14] = 'false';                                  // UAM_ADMINPASSWENF_TRUE/FALSE 
     42  $defaultUAM[15] = 'false';                                  // UAM_GHOSTRACKER_TRUE/FALSE 
     43  $defaultUAM[16] = '10';                                     // UAM_GHOSTRACKER_DAYLIMIT 
     44  $defaultUAM[17] = l10n('UAM_Default_GhstReminder_Txt');     // UAM_GHOSTRACKER_REMINDERTEXT 
     45  $defaultUAM[18] = 'false';                                  // UAM_ADDLASTVISIT_TRUE/FALSE 
     46  $defaultUAM[19] = 'false';                                  // UAM_ADMINCONFMAIL_TRUE/FALSE 
     47  $defaultUAM[20] = 'false';                                  // UAM_REDIRTOPROFILE_TRUE/FALSE 
     48  $defaultUAM[21] = 'false';                                  // UAM_GTAUTO_TRUE/FALSE 
     49  $defaultUAM[22] = 'false';                                  // UAM_GTAUTOMAIL_TRUE/FALSE 
     50  $defaultUAM[23] = l10n('UAM_Default_GhstDeletion_Txt');     // UAM_GTAUTODEL_TEXT 
     51  $defaultUAM[24] = l10n('UAM_Default_GhstDemotion_Txt');     // UAM_GTAUTOMAILTEXT 
     52  $defaultUAM[25] = '-1';                                     // UAM_Downgrade_Group 
     53  $defaultUAM[26] = '-1';                                     // UAM_Downgrade_Status 
     54  $defaultUAM[27] = l10n('UAM_Default_AdminValidation_Txt');  // UAM_ADMINVALIDATIONMAIL_TEXT 
     55  $defaultUAM[28] = 'false';                                  // UAM_CUSTOMPASSWRETR_TRUE/FALSE 
     56  $defaultUAM[29] = l10n('UAM_Default_PwdRequest_Txt');       // UAM_CUSTOMPASSWRETR_TEXT 
     57  $defaultUAM[30] = 'false';                                  // UAM_USRAUTO_TRUE/FALSE 
     58  $defaultUAM[31] = l10n('UAM_Default_ValidationTimeout_Txt');// UAM_USRAUTODEL_TEXT 
     59  $defaultUAM[32] = 'false';                                  // UAM_USRAUTOMAIL_TRUE/FALSE 
     60  $defaultUAM[33] = 'false';                                  // UAM_STUFFS_TRUE/FALSE 
     61  $defaultUAM[34] = 'false';                                  // UAM_HIDEPASSW_TRUE/FALSE 
     62  $defaultUAM[35] = '-1';                                     // UAM_NO_VALID_LEVEL 
     63  $defaultUAM[36] = '-1';                                     // UAM_VALID_LEVEL 
     64  $defaultUAM[37] = '-1';                                     // UAM_DOWNGRADE_LEVEL 
     65  $defaultUAM[38] = 'false';                                  // UAM_PWDRESET_TRUE/FALSE 
     66   
    3167  // Default specific parameters for UserAdvManager ConfirmMail conf 
    32   $default2 = array('false',5,'Hello [username]. 
    33                  
    34 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration. 
    35  
    36 Note: After this period, your account will be permanently deleted.','false','Hello [username]. 
    37  
    38 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered. 
    39  
    40 Note: After this period, your account will be permanently deleted.','You have confirmed that you are human and may now use [mygallery]! Welcome [username]!','Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.'); 
    41  
     68  // --------------------------------------------------------------- 
     69  $defaultConfirmMail[0] = 'false';                                 // UAM_CONFIRMMAIL_TIMEOUT_TRUE/FALSE 
     70  $defaultConfirmMail[1] = '5';                                     // UAM_CONFIRMMAIL_DELAY 
     71  $defaultConfirmMail[2] = l10n('UAM_Default_CfmMail_Remail_Txt1'); // UAM_CONFIRMMAIL_REMAIL_TXT1 
     72  $defaultConfirmMail[3] = 'false';                                 // UAM_CONFIRMMAIL_REMAIL_TRUE/FALSE 
     73  $defaultConfirmMail[4] = l10n('UAM_Default_CfmMail_Remail_Txt2'); // UAM_CONFIRMMAIL_REMAIL_TXT2 
     74  $defaultConfirmMail[5] = l10n('UAM_Default_CfmMail_Custom_Txt1'); // UAM_CONFIRMMAIL_CUSTOM_TXT1 
     75  $defaultConfirmMail[6] = l10n('UAM_Default_CfmMail_Custom_Txt2'); // UAM_CONFIRMMAIL_CUSTOM_TXT2 
     76   
    4277  // Set current plugin version in config table 
     78  // ------------------------------------------ 
    4379  $plugin =  PluginInfos(UAM_PATH); 
    4480  $version = $plugin['version']; 
     
    5490 
    5591  // Create UserAdvManager conf if not already exists 
     92  // ------------------------------------------------ 
    5693        $query = ' 
    5794SELECT param 
     
    65102    $q = ' 
    66103INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 
    67 VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($default1)).'","UAM parameters") 
     104VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($defaultUAM)).'","UAM parameters") 
    68105  ;'; 
    69106    pwg_query($q); 
     
    71108 
    72109  // Create UserAdvManager_ConfirmMail conf if not already exists 
     110  // ------------------------------------------------------------ 
    73111        $query = ' 
    74112SELECT param 
     
    82120    $q = ' 
    83121INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 
    84 VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($default2)).'","UAM ConfirmMail parameters") 
     122VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($defaultConfirmMail)).'","UAM ConfirmMail parameters") 
    85123  ;'; 
    86124    pwg_query($q); 
     
    88126 
    89127  // Create UserAdvManager_Redir conf if not already exists 
     128  // ------------------------------------------------------ 
    90129        $query = ' 
    91130SELECT param 
     
    105144 
    106145  // Create UserAdvManager_Version conf if not already exists 
     146  // -------------------------------------------------------- 
    107147        $query = ' 
    108148SELECT param 
     
    122162 
    123163  // Create USER_CONFIRM_MAIL_TABLE 
     164  // ------------------------------ 
    124165        $q = " 
    125166CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." ( 
     
    136177 
    137178  // Create USER_LASTVISIT_TABLE 
     179  // --------------------------- 
    138180        $q = " 
    139181CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." ( 
     
    147189 
    148190  // Piwigo's native tables modifications for password reset function - Add pwdreset column if not already exists 
     191  // ------------------------------------------------------------------------------------------------------------ 
    149192  $query = ' 
    150193SHOW COLUMNS FROM '.USERS_TABLE.' 
     
    277320 
    278321/* Check database upgrade since version 2.16.0 */ 
     322/* ******************************************* */ 
    279323  if (isset($conf['UserAdvManager_Version'])) 
    280324  { 
     
    316360 
    317361  // Update plugin version number in #_config table and check consistency of #_plugins table 
     362  // --------------------------------------------------------------------------------------- 
    318363  UAM_version_update(); 
    319364 
  • extensions/UserAdvManager/branches/2.30/stuffs_module/config.inc.php

    r9908 r12272  
    55if (!isset($datas)) $datas = ''; 
    66 
    7 // Enregistrement de la configuration 
     7// set configuration 
     8// ----------------- 
    89if (isset($_POST['submit']) and !is_adviser()) { 
    910  $datas = stripslashes($_POST['personal_content']); 
    1011} 
    1112 
    12 // Parametrage du template 
     13// Template init 
     14// ------------- 
    1315$template->assign('cat_style', array()); 
    1416$template->assign(array('PERSONAL_CONTENT' => $datas)); 
  • extensions/UserAdvManager/branches/2.30/stuffs_module/main.inc.php

    r9908 r12272  
    66 
    77// Extended description 
     8// -------------------- 
    89if (function_exists('get_extended_desc')) 
    910{ 
Note: See TracChangeset for help on using the changeset viewer.