Changeset 18482


Ignore:
Timestamp:
Oct 5, 2012, 9:17:19 PM (12 years ago)
Author:
Eric
Message:

Rollback branch 2.40 to r17809 - The new activ branch is 2.41
Branch 2.40 is no more supported

Location:
extensions/UserAdvManager/branches/2.40
Files:
1 deleted
21 edited

Legend:

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

    r18160 r18482  
    3939  {
    4040    $status = true;
     41   
    4142    log_user($userid, false);
    42     if (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')
    43     {
    44       validation_mail($userid);
    45     }
     43
    4644// We have to get the user's language in database
    4745// ----------------------------------------------
     
    121119      'REDIRECT'             => $redirect,
    122120      'STATUS'               => $status,
    123                                 'CONFIRM_MAIL_MESSAGE' => $custom_text,
     121                  'CONFIRM_MAIL_MESSAGE' => $custom_text,
    124122    )
    125123  );
  • extensions/UserAdvManager/branches/2.40/admin/UAM_admin.php

    r18160 r18482  
    4646        $page['tab'] = 'global';
    4747else
    48  $page['tab'] = $_GET['tab'];
     48  $page['tab'] = $_GET['tab'];
    4949
    5050$tabsheet = new tabsheet();
     
    5252               l10n('UAM_Tab_Global'),
    5353               $my_base_url.'&tab=global');
    54 $tabsheet->add('userlist',
    55                l10n('UAM_Tracking registered users'),
    56                $my_base_url.'&tab=userlist');
     54  $tabsheet->add('userlist',
     55                 l10n('UAM_Tracking registered users'),
     56                 $my_base_url.'&tab=userlist');
    5757$tabsheet->add('usermanager',
    5858               l10n('UAM_Tracking confirmations'),
     
    8383if (function_exists('set_fckeditor_instance'))
    8484{
    85                 $fcke_config = unserialize($conf['FCKEditor']);
     85  $fcke_config = unserialize($conf['FCKEditor']);
    8686  foreach($areas as $area)
    8787  {
    88                                 if (!isset($fcke_config[$area]))
     88    if (!isset($fcke_config[$area]))
    8989    {
    9090      $fcke_config[$area] = false;
    9191    }
    9292  }
    93                 $conf['FCKEditor'] = serialize($fcke_config);
    94 
    95                 set_fckeditor_instance($areas, $toolbar, $width, $height);
     93  $conf['FCKEditor'] = serialize($fcke_config);
     94
     95  set_fckeditor_instance($areas, $toolbar, $width, $height);
    9696}
    9797
     
    108108// +-----------------------------------------------------------------------+
    109109// *************************************************************************
    110                 case 'global':
    111 
    112                 if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_PwdReset']) and isset($_POST['UAM_RejectConnexion']))
    113                 {
     110  case 'global':
     111
     112        if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_PwdReset']) and isset($_POST['UAM_RejectConnexion']))
     113  {
    114114
    115115    // Render email contents fields
    116116    // ----------------------------
    117                                 $_POST['UAM_MailInfo_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_MailInfo_Text'])));
    118 
    119                                 $_POST['UAM_ConfirmMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Text'])));
    120 
    121                                 $_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText'])));
    122 
    123                                 $_POST['UAM_GTAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
    124 
    125                                 $_POST['UAM_GTAutoMailText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMailText'])));
    126 
    127                                 $_POST['UAM_AdminValidationMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Text'])));
    128 
    129                                 $_POST['UAM_CustomPasswRetr_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomPasswRetr_Text'])));
    130 
    131                                 $_POST['UAM_USRAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
    132 
    133                                 $_POST['UAM_CustomRejectConnexion_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomRejectConnexion_Text'])));
    134 
    135                                 // Render email subjects fields
     117                $_POST['UAM_MailInfo_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_MailInfo_Text'])));
     118
     119    $_POST['UAM_ConfirmMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Text'])));
     120
     121    $_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText'])));
     122
     123    $_POST['UAM_GTAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
     124
     125    $_POST['UAM_GTAutoMailText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMailText'])));
     126
     127    $_POST['UAM_AdminValidationMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Text'])));
     128
     129    $_POST['UAM_CustomPasswRetr_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomPasswRetr_Text'])));
     130
     131    $_POST['UAM_USRAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
     132
     133    $_POST['UAM_CustomRejectConnexion_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomRejectConnexion_Text'])));
     134
     135    // Render email subjects fields
    136136    // ---------------------------
    137                                 $_POST['UAM_ConfirmMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Subject'])));
    138 
    139                                 $_POST['UAM_ConfirmMail_Remail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Remail_Subject'])));
    140 
    141                                 $_POST['UAM_InfoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_InfoMail_Subject'])));
    142 
    143                                 $_POST['UAM_GTAutoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMail_Subject'])));
    144 
    145                                 $_POST['UAM_GTReminder_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTReminder_Subject'])));
    146 
    147                                 $_POST['UAM_AdminValidationMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Subject'])));
    148 
    149 
    150                                 // Check if emails are mandatory for registrations (needed for email exclusion option)
    151                                 // -----------------------------------------------------------------------------------
    152                                 if ($conf['obligatory_user_mail_address'])
    153                                 {
    154                                                         // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them
    155                 // --------------------------------------------------------------------------------------
    156                 if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List']))
    157                 {
    158                 array_push($page['errors'], l10n('UAM_mail_exclusionlist_error'));
    159                 $UAM_Exclusionlist_Error = true;
    160                 }
    161                 }
    162                 elseif (!$conf['obligatory_user_mail_address'])
    163                 {
    164                 $_POST['UAM_MailExclusion_List'] = '';
    165                 }
     137    $_POST['UAM_ConfirmMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Subject'])));
     138
     139    $_POST['UAM_ConfirmMail_Remail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Remail_Subject'])));
     140
     141  $_POST['UAM_InfoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_InfoMail_Subject'])));
     142
     143  $_POST['UAM_GTAutoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMail_Subject'])));
     144
     145  $_POST['UAM_GTReminder_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTReminder_Subject'])));
     146
     147  $_POST['UAM_AdminValidationMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Subject'])));
     148
     149
     150  // Check if emails are mandatory for registrations (needed for email exclusion option)
     151  // -----------------------------------------------------------------------------------
     152  if ($conf['obligatory_user_mail_address'])
     153  {
     154    // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them
     155    // --------------------------------------------------------------------------------------
     156    if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List']))
     157    {
     158      array_push($page['errors'], l10n('UAM_mail_exclusionlist_error'));
     159      $UAM_Exclusionlist_Error = true;
     160    }
     161  }
     162  elseif (!$conf['obligatory_user_mail_address'])
     163  {
     164    $_POST['UAM_MailExclusion_List'] = '';
     165  }
    166166
    167167    // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled
     
    172172    if (((isset($conf_UAM['1']) and ($conf_UAM['1'] == 'false' or $conf_UAM['1'] == 'local')) or ($_POST['UAM_Confirm_Mail'] == 'false' or $_POST['UAM_Confirm_Mail'] == 'local')) and $_POST['UAM_GTAutoMail'] == 'true')
    173173    {
    174                 $newvalue = 'false';
     174      $newvalue = 'false';
    175175      $_POST['UAM_GTAutoMail'] = $newvalue;
    176176      array_push($page['errors'], l10n('UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'));
     
    187187    // Save global UAM configuration
    188188    // -----------------------------
    189                                 $newconf_UAM = array(
    190                 $_POST['UAM_Mail_Info'],
     189                $newconf_UAM = array(
     190      $_POST['UAM_Mail_Info'],
    191191      $_POST['UAM_Confirm_Mail'],
    192192      (isset($_POST['UAM_No_Confirm_Group'])?$_POST['UAM_No_Confirm_Group']:''),
     
    246246
    247247    $_POST['UAM_ConfirmMail_ReMail_Txt2'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_ReMail_Txt2'])));
    248 
     248   
    249249    $_POST['UAM_ConfirmMail_Custom_Txt1'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Custom_Txt1'])));
    250 
     250   
    251251    $_POST['UAM_ConfirmMail_Custom_Txt2'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Custom_Txt2'])));
    252252
     
    266266    // Save ConfirmMail settings
    267267    // -------------------------
    268                 $newconf_UAM_ConfirmMail = array (
     268          $newconf_UAM_ConfirmMail = array (
    269269      $_POST['UAM_ConfirmMail_TimeOut'],
    270270      $_POST['UAM_ConfirmMail_Delay'],
     
    279279    conf_update_param('UserAdvManager_ConfirmMail', pwg_db_real_escape_string($conf['UserAdvManager_ConfirmMail']));
    280280
    281                                 array_push($page['infos'], l10n('UAM_save_config'));
     281                array_push($page['infos'], l10n('UAM_save_config'));
    282282  }
    283283
     
    352352  $query = '
    353353SELECT id, name
    354                 FROM '.GROUPS_TABLE.'
     354FROM '.GROUPS_TABLE.'
    355355ORDER BY name ASC
    356356;';
     
    364364    if (isset($conf_UAM[2]) and $conf_UAM[2] == $row['id'])
    365365    {
    366                                 $No_Valid = $row['id'];
    367                                 }
     366                $No_Valid = $row['id'];
     367                }
    368368    //configuration value for validated users
    369369    if (isset($conf_UAM[3]) and $conf_UAM[3] == $row['id'])
    370                                 {
    371                                 $Valid = $row['id'];
    372                                 }
     370                {
     371                $Valid = $row['id'];
     372                }
    373373    //configuration value for downgrade users
    374374    if (isset($conf_UAM[25]) and $conf_UAM[25] == $row['id'])
    375                                 {
    376                                 $Downgrade = $row['id'];
    377                                 }
     375                {
     376                $Downgrade = $row['id'];
     377                }
    378378  }
    379379       
     
    381381  // ---------------------------------------------------
    382382  $template->assign(
    383                 'No_Confirm_Group',
    384                         array(
    385                                 'group_options'=> $groups,
    386                                 'group_selected' => $No_Valid
    387                                         )
     383    'No_Confirm_Group',
     384        array(
     385                'group_options'=> $groups,
     386                'group_selected' => $No_Valid
     387                        )
    388388                );
    389389
     
    391391  // -------------------------------------------------
    392392  $template->assign(
    393                 'Validated_Group',
    394                                                 array(
    395                 'group_options'=> $groups,
    396                 'group_selected' => $Valid
    397                                         )
     393    'Validated_Group',
     394                array(
     395      'group_options'=> $groups,
     396      'group_selected' => $Valid
     397                        )
    398398        );
    399399
     
    402402  $template->assign(
    403403    'Downgrade_Group',
    404                                                 array(
    405                 'group_options'=> $groups,
    406                 'group_selected' => $Downgrade
    407                                         )
     404                array(
     405      'group_options'=> $groups,
     406      'group_selected' => $Downgrade
     407                        )
    408408        );
    409409       
     
    428428    // ----------------------------------------------------
    429429    $template->assign(
    430                 'No_Confirm_Status',
    431                                 array(
    432                         'Status_options' => $status_options,
    433                         'Status_selected' => $No_Valid_Status
    434                                                         )
    435                         );
     430      'No_Confirm_Status',
     431      array(
     432        'Status_options' => $status_options,
     433        'Status_selected' => $No_Valid_Status
     434                        )
     435          );
    436436  }
    437437 
     
    439439  // --------------------------
    440440  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
     441  {
     442          $status_options[$status] = l10n('user_status_'.$status);
     443          if (isset($conf_UAM[4]) and $conf_UAM[4] == $status)
    441444                {
    442                                 $status_options[$status] = l10n('user_status_'.$status);
    443                                 if (isset($conf_UAM[4]) and $conf_UAM[4] == $status)
    444                                 {
    445                                 $Valid_Status = $status;
    446                                 }
     445                  $Valid_Status = $status;
     446                }
    447447               
    448448    // Template initialization for validated users status
    449449    // --------------------------------------------------
    450450    $template->assign(
    451                                                 'Confirm_Status',
    452                                                 array(
    453                                                                 'Status_options' => $status_options,
    454                                                                 'Status_selected' => $Valid_Status
    455                                                 )
    456                                 );
    457                 }
     451          'Confirm_Status',
     452          array(
     453                  'Status_options' => $status_options,
     454                  'Status_selected' => $Valid_Status
     455                  )
     456          );
     457        }
    458458
    459459  // Get downgrade status values
     
    461461  foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
    462462  {
    463                                 $status_options[$status] = l10n('user_status_'.$status);
    464                                 if (isset($conf_UAM[26]) and $conf_UAM[26] == $status)
    465                                 {
    466                                 $Downgrade_Status = $status;
    467                                 }
     463          $status_options[$status] = l10n('user_status_'.$status);
     464          if (isset($conf_UAM[26]) and $conf_UAM[26] == $status)
     465                {
     466                  $Downgrade_Status = $status;
     467                }
    468468               
    469469    // Template initialization for validated users status
    470470    // --------------------------------------------------
    471471    $template->assign(
    472                                                 'Downgrade_Status',
    473                                                                 array(
    474                                                                                 'Status_options' => $status_options,
    475                                                                                 'Status_selected' => $Downgrade_Status
    476                                                                 )
    477                                 );
    478                 }
     472          'Downgrade_Status',
     473          array(
     474                  'Status_options' => $status_options,
     475                  'Status_selected' => $Downgrade_Status
     476                  )
     477          );
     478        }
    479479
    480480
     
    490490  foreach ($conf['available_permission_levels'] as $level)
    491491  {
    492                                 $level_options[$level] = l10n(sprintf('Level %d', $level));
    493                                 if (isset($conf_UAM[35]) and $conf_UAM[35] == $level)
    494                                 {
    495                                                 $No_Valid_Level = $level;
    496                                 }
     492    $level_options[$level] = l10n(sprintf('Level %d', $level));
     493          if (isset($conf_UAM[35]) and $conf_UAM[35] == $level)
     494          {
     495            $No_Valid_Level = $level;
     496          }
    497497
    498498    // Template initialization for unvalidated users level
    499499    // ---------------------------------------------------
    500500    $template->assign(
    501                                                 'No_Valid_Level',
    502                                                                 array(
    503                                                                                 'Level_options' => $level_options,
    504                                                                                 'Level_selected' => $No_Valid_Level
    505                                                                 )
    506                                 );
     501      'No_Valid_Level',
     502      array(
     503        'Level_options' => $level_options,
     504        'Level_selected' => $No_Valid_Level
     505                        )
     506          );
    507507  }
    508508
     
    511511  foreach ($conf['available_permission_levels'] as $level)
    512512  {
    513                                 $level_options[$level] = l10n(sprintf('Level %d', $level));
    514                                 if (isset($conf_UAM[36]) and $conf_UAM[36] == $level)
    515                                 {
    516                                                 $Valid_Level = $level;
    517                                 }
     513    $level_options[$level] = l10n(sprintf('Level %d', $level));
     514          if (isset($conf_UAM[36]) and $conf_UAM[36] == $level)
     515          {
     516            $Valid_Level = $level;
     517          }
    518518
    519519    // Template initialization for unvalidated users level
    520520    // ---------------------------------------------------
    521521    $template->assign(
    522                                                 'Valid_Level',
    523                                                                 array(
    524                                                                                 'Level_options' => $level_options,
    525                                                                                 'Level_selected' => $Valid_Level
    526                                                                 )
    527                                 );
     522      'Valid_Level',
     523      array(
     524        'Level_options' => $level_options,
     525        'Level_selected' => $Valid_Level
     526                        )
     527          );
    528528  }
    529529
     
    532532  foreach ($conf['available_permission_levels'] as $level)
    533533  {
    534                                 $level_options[$level] = l10n(sprintf('Level %d', $level));
    535                                 if (isset($conf_UAM[37]) and $conf_UAM[37] == $level)
    536                                 {
    537                                                 $Downgrade_Level = $level;
    538                                 }
     534    $level_options[$level] = l10n(sprintf('Level %d', $level));
     535          if (isset($conf_UAM[37]) and $conf_UAM[37] == $level)
     536          {
     537            $Downgrade_Level = $level;
     538          }
    539539
    540540    // Template initialization for unvalidated users level
    541541    // ---------------------------------------------------
    542542    $template->assign(
    543                                                 'Downgrade_Level',
    544                                                                 array(
    545                                                                                 'Level_options' => $level_options,
    546                                                                                 'Level_selected' => $Downgrade_Level
    547                                                                 )
    548                                 );
     543      'Downgrade_Level',
     544      array(
     545        'Level_options' => $level_options,
     546        'Level_selected' => $Downgrade_Level
     547                        )
     548          );
    549549  }
    550550
     
    570570
    571571  $template->assign(
    572                                 array(
    573                                                 'nb_para'                           => $nb_para,
    574                 'nb_para2'                          => $nb_para2,
    575                 'UAM_VERSION'                       => $version,
    576                 'UAM_PATH'                          => UAM_PATH,
    577                 'UAM_DUMP_DOWNLOAD'                 => $dump_download,
    578                 'UAM_THEME'                         => $UAM_theme,
    579                                                 'UAM_MAIL_INFO_TRUE'                => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
    580                                                 'UAM_MAIL_INFO_FALSE'               => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
    581                                                 'UAM_MAILINFO_TEXT'                 => $conf_UAM[8],
    582                                                 'UAM_USERNAME_CHAR_TRUE'            => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
    583                                                 'UAM_USERNAME_CHAR_FALSE'           => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
    584                                                 'UAM_USERNAME_CHAR_LIST'            => $conf_UAM[6],
    585                                                 'UAM_CONFIRM_MAIL_TRUE'             => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
    586                                                 'UAM_CONFIRM_MAIL_FALSE'            => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
    587                         'UAM_CONFIRM_MAIL_LOCAL'            => $conf_UAM[1]=='local' ?  'checked="checked"' : '' ,
    588                                                 'UAM_CONFIRMMAIL_TEXT'              => $conf_UAM[9],
    589                                                 'UAM_No_Confirm_Group'              => $conf_UAM[2],
    590                                                 'UAM_Validated_Group'               => $conf_UAM[3],
    591                                                 'UAM_No_Confirm_Status'             => $conf_UAM[7],
    592                                                 'UAM_Validated_Status'              => $conf_UAM[4],
    593                                                 'UAM_MAILEXCLUSION_TRUE'            => $conf_UAM[10]=='true' ?  'checked="checked"' : '' ,
    594                                                 'UAM_MAILEXCLUSION_FALSE'           => $conf_UAM[10]=='false' ?  'checked="checked"' : '' ,
    595                                                 'UAM_MAILEXCLUSION_LIST'            => $conf_UAM[11],
    596                                                 'UAM_PASSWORDENF_TRUE'              => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
    597                                                 'UAM_PASSWORDENF_FALSE'             => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
    598                                                 'UAM_PASSWORD_SCORE'                => $conf_UAM[13],
    599                         'UAM_ADMINPASSWENF_TRUE'            => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
    600                                                 'UAM_ADMINPASSWENF_FALSE'           => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
    601                 'UAM_GHOSTRACKER_TRUE'              => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
    602                                                 'UAM_GHOSTRACKER_FALSE'             => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
    603                 'UAM_GHOSTRACKER_DAYLIMIT'          => $conf_UAM[16],
    604                 'UAM_GHOSTRACKER_REMINDERTEXT'      => $conf_UAM[17],
    605                 'UAM_ADDLASTVISIT_TRUE'             => $conf_UAM[18]=='true' ?  'checked="checked"' : '' ,
    606                 'UAM_ADDLASTVISIT_FALSE'            => $conf_UAM[18]=='false' ?  'checked="checked"' : '' ,
    607                 'UAM_ADMINCONFMAIL_TRUE'            => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
    608                 'UAM_ADMINCONFMAIL_FALSE'           => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
    609                 'UAM_REDIRTOPROFILE_TRUE'           => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
    610                 'UAM_REDIRTOPROFILE_FALSE'          => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
    611                 'UAM_GTAUTO_TRUE'                   => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
    612                 'UAM_GTAUTO_FALSE'                  => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
    613                 'UAM_GTAUTOMAIL_TRUE'               => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
    614                 'UAM_GTAUTOMAIL_FALSE'              => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
    615                 'UAM_GTAUTODEL_TEXT'                => $conf_UAM[23],
    616                 'UAM_GTAUTOMAILTEXT'                => $conf_UAM[24],
    617                                                 'UAM_Downgrade_Group'               => $conf_UAM[25],
    618                                                 'UAM_Downgrade_Status'              => $conf_UAM[26],
    619                 'UAM_ADMINVALIDATIONMAIL_TEXT'      => $conf_UAM[27],
    620                 'UAM_CUSTOMPASSWRETR_TRUE'          => $conf_UAM[28]=='true' ?  'checked="checked"' : '' ,
    621                 'UAM_CUSTOMPASSWRETR_FALSE'         => $conf_UAM[28]=='false' ?  'checked="checked"' : '' ,
    622                 'UAM_CUSTOMPASSWRETR_TEXT'          => $conf_UAM[29],
    623                 'UAM_USRAUTO_TRUE'                  => $conf_UAM[30]=='true' ?  'checked="checked"' : '' ,
    624                 'UAM_USRAUTO_FALSE'                 => $conf_UAM[30]=='false' ?  'checked="checked"' : '' ,
    625                 'UAM_USRAUTODEL_TEXT'               => $conf_UAM[31],
    626                 'UAM_USRAUTOMAIL_TRUE'              => $conf_UAM[32]=='true' ?  'checked="checked"' : '' ,
    627                 'UAM_USRAUTOMAIL_FALSE'             => $conf_UAM[32]=='false' ?  'checked="checked"' : '' ,
    628                 'UAM_STUFFS_TRUE'                   => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
    629                 'UAM_STUFFS_FALSE'                  => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
    630                 'UAM_HIDEPASSW_TRUE'                => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
    631                 'UAM_HIDEPASSW_FALSE'               => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
    632                                                 'UAM_NO_VALID_LEVEL'                => $conf_UAM[35],
    633                                                 'UAM_VALID_LEVEL'                   => $conf_UAM[36],
    634                 'UAM_DOWNGRADE_LEVEL'               => $conf_UAM[37],
    635                 'UAM_PWDRESET_TRUE'                 => $conf_UAM[38]=='true' ?  'checked="checked"' : '' ,
    636                 'UAM_PWDRESET_FALSE'                => $conf_UAM[38]=='false' ?  'checked="checked"' : '' ,
    637                 'UAM_REJECTCONNECT_TRUE'            => $conf_UAM[39]=='true' ?  'checked="checked"' : '' ,
    638                 'UAM_REJECTCONNECT_FALSE'           => $conf_UAM[39]=='false' ?  'checked="checked"' : '' ,
    639                 'UAM_REJECTCONNECT_TEXT'            => $conf_UAM[40],
    640                 'UAM_CONFIRMMAIL_SUBJECT'           => $conf_UAM[41],
    641                 'UAM_CONFIRMMAIL_REMAIL_SUBJECT'    => $conf_UAM[42],
    642                 'UAM_INFOMAIL_SUBJECT'              => $conf_UAM[43],
    643                 'UAM_GTAUTOMAIL_SUBJECT'            => $conf_UAM[44],
    644                 'UAM_GTREMINDER_SUBJECT'            => $conf_UAM[45],
    645                 'UAM_ADMINVALIDATIONMAIL_SUBJECT'   => $conf_UAM[46],
    646                                                 'UAM_PASSWORD_TEST_SCORE'           => $UAM_Password_Test_Score,
    647                 'UAM_ERROR_REPORTS1'                => $UAM_Exclusionlist_Error,
    648                 'UAM_ERROR_REPORTS2'                => $UAM_Illegal_Flag_Error1,
    649                 'UAM_ERROR_REPORTS3'                => $UAM_Illegal_Flag_Error2,
    650                 'UAM_ERROR_REPORTS4'                => $UAM_Illegal_Flag_Error3,
    651                 'UAM_EMAIL_MANDATORY'               => $UAM_Email_Mandatory_Check,
    652                                                 'UAM_CONFIRMMAIL_TIMEOUT_TRUE'          => $conf_UAM_ConfirmMail[0]=='true' ?  'checked="checked"' : '' ,
    653                                                 'UAM_CONFIRMMAIL_TIMEOUT_FALSE'     => $conf_UAM_ConfirmMail[0]=='false' ?  'checked="checked"' : '' ,
    654                                                 'UAM_CONFIRMMAIL_DELAY'                                                                                                 => $conf_UAM_ConfirmMail[1],
    655                 'UAM_CONFIRMMAIL_REMAIL_TRUE'       => $conf_UAM_ConfirmMail[3]=='true' ? 'checked="checked"' : '',
    656                 'UAM_CONFIRMMAIL_REMAIL_FALSE'      => $conf_UAM_ConfirmMail[3]=='false' ? 'checked="checked"' : '',
    657                 'UAM_CONFIRMMAIL_REMAIL_TXT1'       => $conf_UAM_ConfirmMail[2],
    658                 'UAM_CONFIRMMAIL_REMAIL_TXT2'       => $conf_UAM_ConfirmMail[4],
    659                 'UAM_CONFIRMMAIL_CUSTOM_TXT1'       => $conf_UAM_ConfirmMail[5],
    660                 'UAM_CONFIRMMAIL_CUSTOM_TXT2'       => $conf_UAM_ConfirmMail[6],
     572    array(
     573    'nb_para'                           => $nb_para,
     574    'nb_para2'                          => $nb_para2,
     575    'UAM_VERSION'                       => $version,
     576    'UAM_PATH'                          => UAM_PATH,
     577    'UAM_DUMP_DOWNLOAD'                 => $dump_download,
     578    'UAM_THEME'                         => $UAM_theme,
     579                'UAM_MAIL_INFO_TRUE'                => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
     580                'UAM_MAIL_INFO_FALSE'               => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
     581                'UAM_MAILINFO_TEXT'                 => $conf_UAM[8],
     582                'UAM_USERNAME_CHAR_TRUE'            => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
     583                'UAM_USERNAME_CHAR_FALSE'           => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
     584                'UAM_USERNAME_CHAR_LIST'            => $conf_UAM[6],
     585                'UAM_CONFIRM_MAIL_TRUE'             => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
     586                'UAM_CONFIRM_MAIL_FALSE'            => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
     587    'UAM_CONFIRM_MAIL_LOCAL'            => $conf_UAM[1]=='local' ?  'checked="checked"' : '' ,
     588                'UAM_CONFIRMMAIL_TEXT'              => $conf_UAM[9],
     589                'UAM_No_Confirm_Group'              => $conf_UAM[2],
     590                'UAM_Validated_Group'               => $conf_UAM[3],
     591                'UAM_No_Confirm_Status'             => $conf_UAM[7],
     592                'UAM_Validated_Status'              => $conf_UAM[4],
     593                'UAM_MAILEXCLUSION_TRUE'            => $conf_UAM[10]=='true' ?  'checked="checked"' : '' ,
     594                'UAM_MAILEXCLUSION_FALSE'           => $conf_UAM[10]=='false' ?  'checked="checked"' : '' ,
     595                'UAM_MAILEXCLUSION_LIST'            => $conf_UAM[11],
     596                'UAM_PASSWORDENF_TRUE'              => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
     597                'UAM_PASSWORDENF_FALSE'             => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
     598                'UAM_PASSWORD_SCORE'                => $conf_UAM[13],
     599    'UAM_ADMINPASSWENF_TRUE'            => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
     600                'UAM_ADMINPASSWENF_FALSE'           => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
     601    'UAM_GHOSTRACKER_TRUE'              => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
     602                'UAM_GHOSTRACKER_FALSE'             => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
     603    'UAM_GHOSTRACKER_DAYLIMIT'          => $conf_UAM[16],
     604    'UAM_GHOSTRACKER_REMINDERTEXT'      => $conf_UAM[17],
     605    'UAM_ADDLASTVISIT_TRUE'             => $conf_UAM[18]=='true' ?  'checked="checked"' : '' ,
     606    'UAM_ADDLASTVISIT_FALSE'            => $conf_UAM[18]=='false' ?  'checked="checked"' : '' ,
     607    'UAM_ADMINCONFMAIL_TRUE'            => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
     608    'UAM_ADMINCONFMAIL_FALSE'           => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
     609    'UAM_REDIRTOPROFILE_TRUE'           => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
     610    'UAM_REDIRTOPROFILE_FALSE'          => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
     611    'UAM_GTAUTO_TRUE'                   => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
     612    'UAM_GTAUTO_FALSE'                  => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
     613    'UAM_GTAUTOMAIL_TRUE'               => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
     614    'UAM_GTAUTOMAIL_FALSE'              => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
     615    'UAM_GTAUTODEL_TEXT'                => $conf_UAM[23],
     616    'UAM_GTAUTOMAILTEXT'                => $conf_UAM[24],
     617                'UAM_Downgrade_Group'               => $conf_UAM[25],
     618                'UAM_Downgrade_Status'              => $conf_UAM[26],
     619    'UAM_ADMINVALIDATIONMAIL_TEXT'      => $conf_UAM[27],
     620    'UAM_CUSTOMPASSWRETR_TRUE'          => $conf_UAM[28]=='true' ?  'checked="checked"' : '' ,
     621    'UAM_CUSTOMPASSWRETR_FALSE'         => $conf_UAM[28]=='false' ?  'checked="checked"' : '' ,
     622    'UAM_CUSTOMPASSWRETR_TEXT'          => $conf_UAM[29],
     623    'UAM_USRAUTO_TRUE'                  => $conf_UAM[30]=='true' ?  'checked="checked"' : '' ,
     624    'UAM_USRAUTO_FALSE'                 => $conf_UAM[30]=='false' ?  'checked="checked"' : '' ,
     625    'UAM_USRAUTODEL_TEXT'               => $conf_UAM[31],
     626    'UAM_USRAUTOMAIL_TRUE'              => $conf_UAM[32]=='true' ?  'checked="checked"' : '' ,
     627    'UAM_USRAUTOMAIL_FALSE'             => $conf_UAM[32]=='false' ?  'checked="checked"' : '' ,
     628    'UAM_STUFFS_TRUE'                   => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
     629    'UAM_STUFFS_FALSE'                  => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
     630    'UAM_HIDEPASSW_TRUE'                => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
     631    'UAM_HIDEPASSW_FALSE'               => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
     632                'UAM_NO_VALID_LEVEL'                => $conf_UAM[35],
     633                'UAM_VALID_LEVEL'                   => $conf_UAM[36],
     634    'UAM_DOWNGRADE_LEVEL'               => $conf_UAM[37],
     635    'UAM_PWDRESET_TRUE'                 => $conf_UAM[38]=='true' ?  'checked="checked"' : '' ,
     636    'UAM_PWDRESET_FALSE'                => $conf_UAM[38]=='false' ?  'checked="checked"' : '' ,
     637    'UAM_REJECTCONNECT_TRUE'            => $conf_UAM[39]=='true' ?  'checked="checked"' : '' ,
     638    'UAM_REJECTCONNECT_FALSE'           => $conf_UAM[39]=='false' ?  'checked="checked"' : '' ,
     639    'UAM_REJECTCONNECT_TEXT'            => $conf_UAM[40],
     640    'UAM_CONFIRMMAIL_SUBJECT'           => $conf_UAM[41],
     641    'UAM_CONFIRMMAIL_REMAIL_SUBJECT'    => $conf_UAM[42],
     642    'UAM_INFOMAIL_SUBJECT'              => $conf_UAM[43],
     643    'UAM_GTAUTOMAIL_SUBJECT'            => $conf_UAM[44],
     644    'UAM_GTREMINDER_SUBJECT'            => $conf_UAM[45],
     645    'UAM_ADMINVALIDATIONMAIL_SUBJECT'   => $conf_UAM[46],
     646                'UAM_PASSWORD_TEST_SCORE'           => $UAM_Password_Test_Score,
     647    'UAM_ERROR_REPORTS1'                => $UAM_Exclusionlist_Error,
     648    'UAM_ERROR_REPORTS2'                => $UAM_Illegal_Flag_Error1,
     649    'UAM_ERROR_REPORTS3'                => $UAM_Illegal_Flag_Error2,
     650    'UAM_ERROR_REPORTS4'                => $UAM_Illegal_Flag_Error3,
     651    'UAM_EMAIL_MANDATORY'               => $UAM_Email_Mandatory_Check,
     652                'UAM_CONFIRMMAIL_TIMEOUT_TRUE'      => $conf_UAM_ConfirmMail[0]=='true' ?  'checked="checked"' : '' ,
     653                'UAM_CONFIRMMAIL_TIMEOUT_FALSE'     => $conf_UAM_ConfirmMail[0]=='false' ?  'checked="checked"' : '' ,
     654                'UAM_CONFIRMMAIL_DELAY'                                     => $conf_UAM_ConfirmMail[1],
     655    'UAM_CONFIRMMAIL_REMAIL_TRUE'       => $conf_UAM_ConfirmMail[3]=='true' ? 'checked="checked"' : '',
     656    'UAM_CONFIRMMAIL_REMAIL_FALSE'      => $conf_UAM_ConfirmMail[3]=='false' ? 'checked="checked"' : '',
     657    'UAM_CONFIRMMAIL_REMAIL_TXT1'       => $conf_UAM_ConfirmMail[2],
     658    'UAM_CONFIRMMAIL_REMAIL_TXT2'       => $conf_UAM_ConfirmMail[4],
     659    'UAM_CONFIRMMAIL_CUSTOM_TXT1'       => $conf_UAM_ConfirmMail[5],
     660    'UAM_CONFIRMMAIL_CUSTOM_TXT2'       => $conf_UAM_ConfirmMail[6],
    661661    )
    662662  );
    663663
    664664  if (isset($_POST['audit']))
    665                 {
    666                                 $msg_error1 = '';
     665        {
     666                $msg_error1 = '';
    667667               
    668668    // Username without forbidden keys
    669669    // -------------------------------
    670670    if ( isset($conf_UAM[5]) and $conf_UAM[5] == 'true' )
    671                 {
    672                                                 $query = '
    673 SELECT '.$conf['user_fields']['username'].', '.$conf['user_fields']['email'].'
    674                 FROM '.USERS_TABLE.'
    675 ;';
     671          {
     672                        $query = "
     673SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
     674  FROM ".USERS_TABLE."
     675;";
    676676                         
    677                                                 $result = pwg_query($query);
     677                        $result = pwg_query($query);
    678678                       
    679                                                 while($row = pwg_db_fetch_assoc($result))
    680                                                 {
    681                                                                 if (!ValidateUsername(stripslashes($row['username'])))
    682                                                                                 $msg_error1 .= (($msg_error1 <> '') ? '<br>' : '').l10n('UAM_Err_audit_username_char').stripslashes($row['username']);
    683                                                 }
    684                                 }
    685 
    686                                 $msg_error2 = '';
     679                        while($row = pwg_db_fetch_assoc($result))
     680                        {
     681                                if (!ValidateUsername(stripslashes($row['username'])))
     682                                        $msg_error1 .= (($msg_error1 <> '') ? '<br>' : '').l10n('UAM_Err_audit_username_char').stripslashes($row['username']);
     683                        }
     684                }
     685
     686                $msg_error2 = '';
    687687               
    688688    // Email without forbidden domain
    689689    // ------------------------------
    690690    if ( isset($conf_UAM[10]) and $conf_UAM[10] == 'true' )
    691                                                 {
    692                                                                 $query = '
    693 SELECT '.$conf['user_fields']['username'].', '.$conf['user_fields']['email'].'
    694   FROM '.USERS_TABLE.'
    695 ;';
     691          {
     692                        $query = "
     693SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']."
     694  FROM ".USERS_TABLE."
     695;";
    696696                         
    697                                                 $result = pwg_query($query);
     697                  $result = pwg_query($query);
    698698                       
    699                                                 while($row = pwg_db_fetch_assoc($result))
    700                                                 {
    701                                                                 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
    702                                                                 for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
    703                                                                 {
    704                                                                                                 $pattern = '/'.$conf_MailExclusion[$i].'/';
    705                                                                                 if (preg_match($pattern, $row['mail_address']))
    706                                                                                 {
    707                                                                                                                 $msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '').l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
    708                                                                                                 }
    709                                                                                 }
    710                                                                 }
    711                                                 }
     699                  while($row = pwg_db_fetch_assoc($result))
     700                  {
     701                          $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
     702                          for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
     703                          {
     704                                        $pattern = '/'.$conf_MailExclusion[$i].'/';
     705                                  if (preg_match($pattern, $row['mail_address']))
     706                                  {
     707                                                $msg_error2 .=  (($msg_error2 <> '') ? '<br>' : '').l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
     708                                        }
     709                                }
     710                        }
     711                }
    712712               
    713                 if ($msg_error1 <> '')
    714                                                                 $errors[] = $msg_error1.'<br><br>';
     713    if ($msg_error1 <> '')
     714                        $errors[] = $msg_error1.'<br><br>';
    715715               
    716                                                 if ($msg_error2 <> '')
    717                                                                 $errors[] = $msg_error2.'<br><br>';
     716                if ($msg_error2 <> '')
     717                        $errors[] = $msg_error2.'<br><br>';
    718718               
    719                                                 if ($msg_error1 <> '' or $msg_error2 <> '')
    720                                                 array_push($page['errors'], l10n('UAM_Err_audit_advise'));
    721                                                 else
    722                                 array_push($page['infos'], l10n('UAM_audit_ok'));
    723   }
     719                if ($msg_error1 <> '' or $msg_error2 <> '')
     720                array_push($page['errors'], l10n('UAM_Err_audit_advise'));
     721                else
     722        array_push($page['infos'], l10n('UAM_audit_ok'));
     723        }
    724724
    725725
     
    727727// |                             errors display                            |
    728728// +-----------------------------------------------------------------------+
    729                 if (isset ($errors) and count($errors) != 0)
    730   {
    731                                 $template->assign('errors',array());
    732                 foreach ($errors as $error)
    733                 {
    734                                 array_push($page['errors'], $error);
    735                                 }
    736                
     729  if (isset ($errors) and count($errors) != 0)
     730  {
     731          $template->assign('errors',array());
     732          foreach ($errors as $error)
     733          {
     734                  array_push($page['errors'], $error);
     735                }
     736       
    737737
    738738// +-----------------------------------------------------------------------+
     
    760760// +-----------------------------------------------------------------------+
    761761
    762                                 if (!defined('PHPWG_ROOT_PATH'))
    763                 {
    764                                 die('Hacking attempt!');
    765                 }
     762                if (!defined('PHPWG_ROOT_PATH'))
     763    {
     764        die('Hacking attempt!');
     765    }
    766766         
    767                 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
     767    include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    768768
    769769// +-----------------------------------------------------------------------+
    770770// | Check Access and exit when user status is not ok                      |
    771771// +-----------------------------------------------------------------------+
    772                                 check_status(ACCESS_ADMINISTRATOR);
     772                check_status(ACCESS_ADMINISTRATOR);
    773773
    774774
     
    777777// +-----------------------------------------------------------------------+
    778778
    779                                 $page['filtered_users'] = get_user_list();
     779                $page['filtered_users'] = get_user_list();
    780780
    781781// +-----------------------------------------------------------------------+
     
    783783// +-----------------------------------------------------------------------+
    784784
    785                                 $visible_user_list = array();
    786                 foreach ($page['filtered_users'] as $num => $local_user)
    787                 {
    788                                 $visible_user_list[] = $local_user;
    789                                 }
    790 
    791                                 foreach ($visible_user_list as $local_user)
    792         {
    793                                 // dates formating and compare
    794                 // ---------------------------
    795                 $today = date("d-m-Y"); // Get today's date
    796                 list($day, $month, $year) = explode('-', $today); // explode date of today                                               
    797                 $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
    798 
    799                 list($regdate, $regtime) = explode(' ', $local_user['lastvisit']); // Explode date and time from registration date
    800                 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
    801                 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
    802 
    803                                                 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps     
    804                 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
    805  
    806                                                 if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and $conf_UAM[16] <> '')
    807                 {
    808                                 if ($deltadays <= ($conf_UAM[16]/2))
    809                 {
    810                                 $display = 'green';
    811                 }
    812 
    813                                                                 if (($deltadays > ($conf_UAM[16]/2)) and ($deltadays < $conf_UAM[16]))
    814                 {
    815                                 $display = 'orange';
    816                 }
    817 
    818                 if ($deltadays >= $conf_UAM[16])
    819                 {
    820                                 $display = 'red';
    821                         }
    822                                                 }
    823                 else $display = '';
    824 
    825                 // Template initialization
    826                 // -----------------------
    827                         $template->append(
    828                                 'users',
    829                                 array(
    830                                         'ID'          => $local_user['id'],
    831                                 'USERNAME'    => stripslashes($local_user['username']),
    832                                                                                                 'EMAIL'       => get_email_address_as_display_text($local_user['email']),
    833                         'LASTVISIT'   => $local_user['lastvisit'],
    834                         'DAYS'        => $deltadays,
    835                         'DISPLAY'     => $display,
    836                                                                                 )
    837                                                 );
    838                                 }
    839 
    840                                 // Plugin version inserted
    841                 // -----------------------
    842                 $template->assign(
    843                                 array(
    844                                 'UAM_VERSION'  => $version,
    845                 'UAM_PATH'     => UAM_PATH,
    846                 )
    847                 );
    848    
     785    $visible_user_list = array();
     786    foreach ($page['filtered_users'] as $num => $local_user)
     787    {
     788      $visible_user_list[] = $local_user;
     789                }
     790
     791                foreach ($visible_user_list as $local_user)
     792    {
     793      // dates formating and compare
     794      // ---------------------------
     795      $today = date("d-m-Y"); // Get today's date
     796      list($day, $month, $year) = explode('-', $today); // explode date of today                                                 
     797      $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
     798               
     799      list($regdate, $regtime) = explode(' ', $local_user['lastvisit']); // Explode date and time from registration date
     800      list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
     801      $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
     802                       
     803      $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps       
     804      $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
     805     
     806      if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and $conf_UAM[16] <> '')
     807      {
     808        if ($deltadays <= ($conf_UAM[16]/2))
     809        {
     810          $display = 'green';
     811        }
     812       
     813        if (($deltadays > ($conf_UAM[16]/2)) and ($deltadays < $conf_UAM[16]))
     814        {
     815          $display = 'orange';
     816        }
     817       
     818        if ($deltadays >= $conf_UAM[16])
     819        {
     820          $display = 'red';
     821        }
     822      }
     823      else $display = '';
     824
     825      // Template initialization
     826      // -----------------------
     827                $template->append(
     828                'users',
     829        array(
     830                'ID'          => $local_user['id'],
     831                'USERNAME'    => stripslashes($local_user['username']),
     832                                        'EMAIL'       => get_email_address_as_display_text($local_user['email']),
     833          'LASTVISIT'   => $local_user['lastvisit'],
     834          'DAYS'        => $deltadays,
     835          'DISPLAY'     => $display,
     836                                )
     837                        );
     838                }
     839    // Plugin version inserted
     840    // -----------------------
     841    $template->assign(
     842      array(
     843        'UAM_VERSION'  => $version,
     844        'UAM_PATH'     => UAM_PATH,
     845      )
     846    );   
    849847// +-----------------------------------------------------------------------+
    850848// |                             errors display                            |
    851849// +-----------------------------------------------------------------------+
    852                                 if ( isset ($errors) and count($errors) != 0)
    853                                 {
    854                                                 $template->assign('errors',array());
    855                                                 foreach ($errors as $error)
    856                                 {
    857                                                                 array_push($page['errors'], $error);
    858                                 }
    859                                 } 
     850                if ( isset ($errors) and count($errors) != 0)
     851                {
     852                $template->assign('errors',array());
     853                        foreach ($errors as $error)
     854                {
     855                                array_push($page['errors'], $error);
     856                }
     857                } 
    860858
    861859// +-----------------------------------------------------------------------+
    862860// |                           templates display                           |
    863861// +-----------------------------------------------------------------------+
    864                                 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/userlist.tpl');
    865                 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');             
    866                 }
    867                 else
    868                 {
    869                                 array_push($page['errors'], l10n('UAM_Err_Userlist_Settings'));
    870                 }
    871 
    872 break;
     862                $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/userlist.tpl');
     863    $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');         
     864  }
     865  else
     866  {
     867                array_push($page['errors'], l10n('UAM_Err_Userlist_Settings'));
     868  }
     869  break;
    873870
    874871
     
    884881  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
    885882       
    886   if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local'))
     883  if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local') and ((isset($conf_UAM[2]) and $conf_UAM[2] <> '-1') or (isset($conf_UAM[7]) and $conf_UAM[7] <> '-1')))
    887884  {
    888885// +-----------------------------------------------------------------------+
     
    890887// +-----------------------------------------------------------------------+
    891888
    892                                 if (!defined('PHPWG_ROOT_PATH'))
    893     {
    894                 die('Hacking attempt!');
     889                if (!defined('PHPWG_ROOT_PATH'))
     890    {
     891        die('Hacking attempt!');
    895892    }
    896893
     
    900897// | Check Access and exit when user status is not ok                      |
    901898// +-----------------------------------------------------------------------+
    902                                 check_status(ACCESS_ADMINISTRATOR);
     899                check_status(ACCESS_ADMINISTRATOR);
    903900
    904901// +-----------------------------------------------------------------------+
     
    906903// +-----------------------------------------------------------------------+
    907904
     905                $page['filtered_users'] = get_unvalid_user_list();
     906
     907// +-----------------------------------------------------------------------+
     908// |                            selected users                             |
     909// +-----------------------------------------------------------------------+
     910                if (isset($_POST['Del_Selected']))
     911                {
     912                $collection = array();
     913
     914                        switch ($_POST['target'])
     915        {
     916                case 'all' :
     917        {
     918                foreach($page['filtered_users'] as $local_user)
     919                {
     920                        array_push($collection, $local_user['id']);
     921                }
     922                                        break;
     923                                }
     924        case 'selection' :
     925        {
     926                if (isset($_POST['selection']))
     927                {
     928                        $collection = $_POST['selection'];
     929                }
     930                break;
     931        }
     932                        }
     933
     934                        if (count($collection) == 0)
     935        {
     936                array_push($page['errors'], l10n('Select at least one user'));
     937                }
     938                }
     939
     940// +-----------------------------------------------------------------------+
     941// |                             delete users                              |
     942// +-----------------------------------------------------------------------+
     943                if (isset($_POST['Del_Selected']) and count($collection) > 0)
     944        {
     945                if (in_array($conf['guest_id'], $collection))
     946                {
     947                array_push($page['errors'], l10n('Guest cannot be deleted'));
     948        }
     949        if (($conf['guest_id'] != $conf['default_user_id']) and
     950                in_array($conf['default_user_id'], $collection))
     951        {
     952                array_push($page['errors'], l10n('Default user cannot be deleted'));
     953        }
     954        if (in_array($conf['webmaster_id'], $collection))
     955        {
     956                array_push($page['errors'], l10n('Webmaster cannot be deleted'));
     957        }
     958        if (in_array($user['id'], $collection))
     959        {
     960                array_push($page['errors'], l10n('You cannot delete your account'));
     961        }
     962
     963                        if (count($page['errors']) == 0)
     964        {
     965                foreach ($collection as $user_id)
     966        {
     967                delete_user($user_id);
     968        }
     969                array_push(
     970                $page['infos'],
     971                l10n_dec(
     972                '%d user deleted', '%d users deleted',
     973                count($collection)
     974                )
     975        );
     976
     977        foreach ($page['filtered_users'] as $filter_key => $filter_user)
     978        {
     979                if (in_array($filter_user['id'], $collection))
     980                {
     981                        unset($page['filtered_users'][$filter_key]);
     982                }
     983                }
     984                        }
     985                }
     986
     987// +-----------------------------------------------------------------------+
     988// |                 Resend new validation key to users                    |
     989// +-----------------------------------------------------------------------+
     990// +-----------------------------------------------------------------------+
     991// |                            selected users                             |
     992// +-----------------------------------------------------------------------+
     993                if (isset($_POST['Mail_With_Key']))
     994                {
     995                $collection = array();
     996
     997                        switch ($_POST['target'])
     998        {
     999                case 'all' :
     1000        {
     1001                foreach($page['filtered_users'] as $local_user)
     1002                {
     1003                        array_push($collection, $local_user['id']);
     1004                }
     1005                break;
     1006                                }
     1007        case 'selection' :
     1008        {
     1009                if (isset($_POST['selection']))
     1010                {
     1011                        $collection = $_POST['selection'];
     1012                }
     1013                break;
     1014        }
     1015                        }
     1016
     1017        if (count($collection) == 0)
     1018        {
     1019                array_push($page['errors'], l10n('Select at least one user'));
     1020        }
     1021                }
     1022// +-----------------------------------------------------------------------+
     1023// |                 Resend new validation key to users                    |
     1024// +-----------------------------------------------------------------------+
     1025                if (isset($_POST['Mail_With_Key']) and count($collection) > 0)
     1026                {
     1027                        if (in_array($conf['guest_id'], $collection))
     1028                {
     1029                array_push($page['errors'], l10n('UAM_No_validation_for_Guest'));
     1030        }
     1031        if (($conf['guest_id'] != $conf['default_user_id']) and
     1032                in_array($conf['default_user_id'], $collection))
     1033        {
     1034                array_push($page['errors'], l10n('UAM_No_validation_for_default_user'));
     1035        }
     1036                if (in_array($conf['webmaster_id'], $collection))
     1037        {
     1038                array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
     1039        }
     1040        if (in_array($user['id'], $collection))
     1041        {
     1042                array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
     1043        }
     1044
     1045        if (count($page['errors']) == 0)
     1046        {
     1047                foreach ($collection as $user_id)
     1048        {       
     1049                $typemail = 1;
     1050                                  $query = "
     1051SELECT id, username, mail_address
     1052  FROM ".USERS_TABLE."
     1053WHERE id = '".$user_id."'
     1054;";
     1055                                        $data = pwg_db_fetch_assoc(pwg_query($query));
     1056                               
     1057                ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],true);
     1058        }
     1059        array_push(
     1060                $page['infos'],
     1061                l10n_dec(
     1062                        'UAM_%d_Mail_With_Key', 'UAM_%d_Mails_With_Key',
     1063                count($collection)
     1064                )
     1065        );
     1066       
    9081067                                $page['filtered_users'] = get_unvalid_user_list();
    909 
     1068                        }
     1069                }
     1070
     1071// +-----------------------------------------------------------------------+
     1072// |             Send reminder without new key to users                    |
     1073// +-----------------------------------------------------------------------+
    9101074// +-----------------------------------------------------------------------+
    9111075// |                            selected users                             |
    9121076// +-----------------------------------------------------------------------+
    913                                 if (isset($_POST['Del_Selected']))
    914                                 {
    915                                 $collection = array();
    916 
    917                                                 switch ($_POST['target'])
    918                                                 {
    919                                                 case 'all' :
    920                 {
    921                                         foreach($page['filtered_users'] as $local_user)
    922                         {
    923                                         array_push($collection, $local_user['id']);
    924                         }
    925                                                                 break;
    926                                                                 }
    927                 case 'selection' :
    928                 {
    929                                 if (isset($_POST['selection']))
    930                         {
    931                                         $collection = $_POST['selection'];
    932                         }
    933                 break;
    934                 }
    935                                                 }
    936 
    937                                                 if (count($collection) == 0)
    938                 {
    939                                 array_push($page['errors'], l10n('Select at least one user'));
    940                         }
     1077                if (isset($_POST['Mail_Without_Key']))
     1078                {
     1079                $collection = array();
     1080
     1081                        switch ($_POST['target'])
     1082        {
     1083                case 'all' :
     1084        {
     1085                foreach($page['filtered_users'] as $local_user)
     1086                {
     1087                        array_push($collection, $local_user['id']);
     1088                }
     1089                break;
    9411090                                }
    942 
    943 // +-----------------------------------------------------------------------+
    944 // |                             delete users                              |
    945 // +-----------------------------------------------------------------------+
    946                                 if (isset($_POST['Del_Selected']) and count($collection) > 0)
    947                 {
    948                                         if (in_array($conf['guest_id'], $collection))
    949                         {
    950                                 array_push($page['errors'], l10n('Guest cannot be deleted'));
    951                 }
    952                         if (($conf['guest_id'] != $conf['default_user_id']) and
    953                                 in_array($conf['default_user_id'], $collection))
    954                 {
    955                                 array_push($page['errors'], l10n('Default user cannot be deleted'));
    956                 }
    957                 if (in_array($conf['webmaster_id'], $collection))
    958                 {
    959                                 array_push($page['errors'], l10n('Webmaster cannot be deleted'));
    960                 }
    961                 if (in_array($user['id'], $collection))
    962                 {
    963                                 array_push($page['errors'], l10n('You cannot delete your account'));
    964                 }
    965 
    966                                                 if (count($page['errors']) == 0)
    967                 {
    968                                         foreach ($collection as $user_id)
    969                 {
    970                                 delete_user($user_id);
    971                         }
    972                                                                 array_push(
    973                                 $page['infos'],
    974                         l10n_dec(
    975                                         '%d user deleted', '%d users deleted',
    976                         count($collection)
    977                         )
    978                 );
    979 
    980                 foreach ($page['filtered_users'] as $filter_key => $filter_user)
    981                 {
    982                                         if (in_array($filter_user['id'], $collection))
    983                         {
    984                                         unset($page['filtered_users'][$filter_key]);
    985                         }
    986                         }
    987                                                 }
     1091        case 'selection' :
     1092        {
     1093                if (isset($_POST['selection']))
     1094                {
     1095                        $collection = $_POST['selection'];
     1096                }
     1097                break;
     1098        }
     1099                        }
     1100
     1101        if (count($collection) == 0)
     1102        {
     1103                array_push($page['errors'], l10n('Select at least one user'));
     1104        }
     1105                }
     1106// +-----------------------------------------------------------------------+
     1107// |             Send reminder without new key to users                    |
     1108// +-----------------------------------------------------------------------+
     1109                if (isset($_POST['Mail_Without_Key']) and count($collection) > 0)
     1110                {
     1111                        if (in_array($conf['guest_id'], $collection))
     1112                {
     1113                array_push($page['errors'], l10n('UAM_No_validation_for_Guest'));
     1114        }
     1115        if (($conf['guest_id'] != $conf['default_user_id']) and
     1116                in_array($conf['default_user_id'], $collection))
     1117        {
     1118                array_push($page['errors'], l10n('UAM_No_validation_for_default_user'));
     1119        }
     1120                if (in_array($conf['webmaster_id'], $collection))
     1121        {
     1122                array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
     1123        }
     1124        if (in_array($user['id'], $collection))
     1125        {
     1126                array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
     1127        }
     1128
     1129        if (count($page['errors']) == 0)
     1130        {
     1131                foreach ($collection as $user_id)
     1132        {
     1133                $typemail = 2;
     1134                                  $query = "
     1135SELECT id, username, mail_address
     1136  FROM ".USERS_TABLE."
     1137WHERE id = '".$user_id."'
     1138;";
     1139                                       
     1140                                        $data = pwg_db_fetch_assoc(pwg_query($query));
     1141                               
     1142                ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],false);                               
     1143        }
     1144        array_push(
     1145                $page['infos'],
     1146                l10n_dec(
     1147                        'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
     1148                count($collection)
     1149                )
     1150        );
     1151       
     1152                                $page['filtered_users'] = get_unvalid_user_list();
     1153                        }
     1154                }
     1155
     1156// +-----------------------------------------------------------------------+
     1157// |                                                                            Force validation                                                         |
     1158// +-----------------------------------------------------------------------+
     1159// +-----------------------------------------------------------------------+
     1160// |                            selected users                             |
     1161// +-----------------------------------------------------------------------+
     1162                if (isset($_POST['Force_Validation']))
     1163                {
     1164                $collection = array();
     1165
     1166                        switch ($_POST['target'])
     1167        {
     1168                case 'all' :
     1169        {
     1170                foreach($page['filtered_users'] as $local_user)
     1171                {
     1172                        array_push($collection, $local_user['id']);
     1173                }
     1174                break;
    9881175                                }
    989 
    990 // +-----------------------------------------------------------------------+
    991 // |                 Resend new validation key to users                    |
    992 // +-----------------------------------------------------------------------+
    993 // +-----------------------------------------------------------------------+
    994 // |                            selected users                             |
    995 // +-----------------------------------------------------------------------+
    996                                 if (isset($_POST['Mail_With_Key']))
    997                                 {
    998                                 $collection = array();
    999 
    1000                                                 switch ($_POST['target'])
    1001                 {
    1002                                 case 'all' :
    1003                 {
    1004                                 foreach($page['filtered_users'] as $local_user)
    1005                         {
    1006                                         array_push($collection, $local_user['id']);
    1007                         }
    1008                 break;
    1009                                                                 }
    1010                 case 'selection' :
    1011                 {
    1012                                 if (isset($_POST['selection']))
    1013                         {
    1014                                         $collection = $_POST['selection'];
    1015                         }
    1016         break;
    1017                 }
    1018                                                 }
    1019 
    1020                 if (count($collection) == 0)
    1021                 {
    1022                                 array_push($page['errors'], l10n('Select at least one user'));
    1023                 }
    1024                                 }
    1025 // +-----------------------------------------------------------------------+
    1026 // |                 Resend new validation key to users                    |
    1027 // +-----------------------------------------------------------------------+
    1028                                 if (isset($_POST['Mail_With_Key']) and count($collection) > 0)
    1029                                 {
    1030                                                 if (in_array($conf['guest_id'], $collection))
    1031                         {
    1032                                 array_push($page['errors'], l10n('UAM_No_validation_for_Guest'));
    1033                         }
    1034                 if (($conf['guest_id'] != $conf['default_user_id']) and
    1035                                 in_array($conf['default_user_id'], $collection))
    1036                 {
    1037                                 array_push($page['errors'], l10n('UAM_No_validation_for_default_user'));
    1038                         }
    1039                         if (in_array($conf['webmaster_id'], $collection))
    1040                 {
    1041                                 array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
    1042                 }
    1043                 if (in_array($user['id'], $collection))
    1044                 {
    1045                                 array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
    1046                 }
    1047 
    1048                 if (count($page['errors']) == 0)
    1049                 {
    1050                                 foreach ($collection as $user_id)
    1051                 {       
    1052                                 $typemail = 1;
    1053                                                                 $query = '
    1054 SELECT id, username, mail_address
    1055   FROM '.USERS_TABLE.'
    1056 WHERE id = '.$user_id.'
    1057 ;';
    1058                                                                                 $data = pwg_db_fetch_assoc(pwg_query($query));
    1059                                
    1060                                 ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],true);
    1061                 }
    1062                 array_push(
    1063                                 $page['infos'],
    1064                                         l10n_dec(
    1065                                         'UAM_%d_Mail_With_Key', 'UAM_%d_Mails_With_Key',
    1066                                         count($collection)
    1067                                         )
    1068                                 );
    1069        
    1070                                                                 $page['filtered_users'] = get_unvalid_user_list();
    1071                                                 }
    1072                                 }
    1073 
    1074 // +-----------------------------------------------------------------------+
    1075 // |             Send reminder without new key to users                    |
    1076 // +-----------------------------------------------------------------------+
    1077 // +-----------------------------------------------------------------------+
    1078 // |                            selected users                             |
    1079 // +-----------------------------------------------------------------------+
    1080                                 if (isset($_POST['Mail_Without_Key']))
    1081                                 {
    1082                                 $collection = array();
    1083 
    1084                                                 switch ($_POST['target'])
    1085                 {
    1086                                 case 'all' :
    1087                 {
    1088                                 foreach($page['filtered_users'] as $local_user)
    1089                         {
    1090                                         array_push($collection, $local_user['id']);
    1091                         }
    1092         break;
    1093                                                                 }
    1094                 case 'selection' :
    1095                 {
    1096                                         if (isset($_POST['selection']))
    1097                         {
    1098                                         $collection = $_POST['selection'];
    1099                         }
    1100         break;
    1101                 }
    1102                                                 }
    1103 
    1104                 if (count($collection) == 0)
    1105                 {
    1106                                 array_push($page['errors'], l10n('Select at least one user'));
    1107                         }
    1108                                 }
    1109 // +-----------------------------------------------------------------------+
    1110 // |             Send reminder without new key to users                    |
    1111 // +-----------------------------------------------------------------------+
    1112                                 if (isset($_POST['Mail_Without_Key']) and count($collection) > 0)
    1113                                 {
    1114                                                 if (in_array($conf['guest_id'], $collection))
    1115                         {
    1116                                 array_push($page['errors'], l10n('UAM_No_validation_for_Guest'));
    1117                 }
    1118                 if (($conf['guest_id'] != $conf['default_user_id']) and
    1119                                 in_array($conf['default_user_id'], $collection))
    1120                 {
    1121                                 array_push($page['errors'], l10n('UAM_No_validation_for_default_user'));
    1122                 }
    1123                         if (in_array($conf['webmaster_id'], $collection))
    1124                 {
    1125                                 array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
    1126                 }
    1127                 if (in_array($user['id'], $collection))
    1128                 {
    1129                                 array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
    1130                 }
    1131 
    1132                 if (count($page['errors']) == 0)
    1133                 {
    1134                                 foreach ($collection as $user_id)
    1135                 {
    1136                                 $typemail = 2;
    1137                                                                 $query = '
    1138 SELECT id, username, mail_address
    1139   FROM '.USERS_TABLE.'
    1140 WHERE id = '.$user_id.'
    1141 ;';
    1142                                        
    1143                                                                                 $data = pwg_db_fetch_assoc(pwg_query($query));
    1144                                
    1145                                 ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],false);                               
    1146                 }
    1147                 array_push(
    1148                                 $page['infos'],
    1149                         l10n_dec(
    1150                         'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
    1151                         count($collection)
    1152                         )
    1153                 );
    1154        
    1155                                                                 $page['filtered_users'] = get_unvalid_user_list();
    1156                                                 }
    1157                                 }
    1158 
    1159 // +-----------------------------------------------------------------------+
    1160 // |                                                                             Manual validation      by admins                                                |
    1161 // +-----------------------------------------------------------------------+
    1162 // +-----------------------------------------------------------------------+
    1163 // |                            selected users                             |
    1164 // +-----------------------------------------------------------------------+
    1165                                 if (isset($_POST['Manual_Validation']))
    1166                                 {
    1167                                 $collection = array();
    1168 
    1169                                                 switch ($_POST['target'])
    1170                 {
    1171                                 case 'all' :
    1172                 {
    1173                                 foreach($page['filtered_users'] as $local_user)
    1174                         {
    1175                                         array_push($collection, $local_user['id']);
    1176                         }
    1177         break;
    1178                                                                 }
    1179                 case 'selection' :
    1180                 {
    1181                                 if (isset($_POST['selection']))
    1182                         {
    1183                                         $collection = $_POST['selection'];
    1184                         }
    1185                 break;
    1186                 }
    1187                                                 }
    1188 
    1189                                                 if (count($collection) == 0)
    1190                 {
    1191                                 array_push($page['errors'], l10n('Select at least one user'));
    1192                 }
    1193                                 }
     1176        case 'selection' :
     1177        {
     1178                if (isset($_POST['selection']))
     1179                {
     1180                        $collection = $_POST['selection'];
     1181                }
     1182                break;
     1183        }
     1184                        }
     1185
     1186        if (count($collection) == 0)
     1187        {
     1188                array_push($page['errors'], l10n('Select at least one user'));
     1189        }
     1190                }
    11941191// +-----------------------------------------------------------------------+
    11951192// |                                                                            Force validation                                                         |
    11961193// +-----------------------------------------------------------------------+
    1197                                 if (isset($_POST['Manual_Validation']) and count($collection) > 0)
    1198                                 {
    1199                                                 if (in_array($conf['guest_id'], $collection))
    1200                         {
    1201                                 array_push($page['errors'], l10n('UAM_No_validation_for_Guest'));
    1202                 }
    1203                 if (($conf['guest_id'] != $conf['default_user_id']) and
    1204                                 in_array($conf['default_user_id'], $collection))
    1205                 {
    1206                                 array_push($page['errors'], l10n('UAM_No_validation_for_default_user'));
    1207                 }
    1208                                 if (in_array($conf['webmaster_id'], $collection))
    1209                 {
    1210                                 array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
    1211                 }
    1212                 if (in_array($user['id'], $collection))
    1213                 {
    1214                                 array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
    1215                 }
    1216 
    1217                 if (count($page['errors']) == 0)
    1218                 {
    1219                                 foreach ($collection as $user_id)
    1220                 {
    1221                         ManualValidation($user_id);
     1194                if (isset($_POST['Force_Validation']) and count($collection) > 0)
     1195                {
     1196                        if (in_array($conf['guest_id'], $collection))
     1197                {
     1198                array_push($page['errors'], l10n('UAM_No_validation_for_Guest'));
     1199        }
     1200        if (($conf['guest_id'] != $conf['default_user_id']) and
     1201                in_array($conf['default_user_id'], $collection))
     1202        {
     1203                array_push($page['errors'], l10n('UAM_No_validation_for_default_user'));
     1204        }
     1205                if (in_array($conf['webmaster_id'], $collection))
     1206        {
     1207                array_push($page['errors'], l10n('UAM_No_validation_for_Webmaster'));
     1208        }
     1209        if (in_array($user['id'], $collection))
     1210        {
     1211                array_push($page['errors'], l10n('UAM_No_validation_for_your_account'));
     1212        }
     1213
     1214        if (count($page['errors']) == 0)
     1215        {
     1216                foreach ($collection as $user_id)
     1217        {
     1218          ForceValidation($user_id);
    12221219          validation_mail($user_id);
    1223                 }
    1224                 array_push(
    1225                                 $page['infos'],
    1226                         l10n_dec(
     1220        }
     1221        array_push(
     1222                $page['infos'],
     1223                l10n_dec(
    12271224                        'UAM_%d_Validated_User', 'UAM_%d_Validated_Users',
    1228                         count($collection)
    1229                         )
    1230                 );
    1231 
    1232                                                                 $page['filtered_users'] = get_unvalid_user_list();
    1233                                                 }
    1234                                 }
     1225                count($collection)
     1226                )
     1227        );
     1228
     1229                                $page['filtered_users'] = get_unvalid_user_list();
     1230                        }
     1231                }
    12351232               
    12361233
     
    12391236// +-----------------------------------------------------------------------+
    12401237
    1241                                 $groups[-1] = '------------';
     1238                $groups[-1] = '------------';
    12421239
    12431240    $query = '
     
    12471244;';
    12481245
    1249                                 $result = pwg_query($query);
     1246                $result = pwg_query($query);
    12501247         
    12511248    while ($row = pwg_db_fetch_assoc($result))
    12521249    {
    1253                 $groups[$row['id']] = $row['name'];
     1250      $groups[$row['id']] = $row['name'];
    12541251    }
    12551252
     
    12581255// +-----------------------------------------------------------------------+
    12591256
    1260                                 $profile_url = get_root_url().'admin.php?page=profile&amp;user_id=';
    1261                                 $perm_url = get_root_url().'admin.php?page=user_perm&amp;user_id=';
     1257                $profile_url = get_root_url().'admin.php?page=profile&amp;user_id=';
     1258                $perm_url = get_root_url().'admin.php?page=user_perm&amp;user_id=';
    12621259
    12631260    $visible_user_list = array();
    12641261    foreach ($page['filtered_users'] as $num => $local_user)
    12651262    {
    1266                 $visible_user_list[] = $local_user;
    1267                                 }
    1268 
    1269                                 foreach ($visible_user_list as $local_user)
    1270     {
    1271                 $groups_string = preg_replace(
    1272                 '/(\d+)/e',
     1263      $visible_user_list[] = $local_user;
     1264                }
     1265
     1266                foreach ($visible_user_list as $local_user)
     1267    {
     1268      $groups_string = preg_replace(
     1269        '/(\d+)/e',
    12731270        "\$groups['$1']",
    12741271        implode(
     
    12761273            $local_user['groups']
    12771274         )
    1278                                                 );
     1275                        );
    12791276
    12801277      $query = '
     
    12971294
    12981295
    1299                                 if (isset($_POST['pref_submit'])
    1300                                 and isset($_POST['selection'])
    1301                         and in_array($local_user['id'], $_POST['selection']))
    1302                                 {
    1303                                                                 $checked = 'checked="checked"';
    1304                                 }
    1305                                                 else
    1306                 {
    1307                                 $checked = '';
    1308                         }
    1309 
    1310                 $properties = array();
    1311                 if ( $local_user['level'] != 0 )
    1312                                                 {
    1313                                 $properties[] = l10n( sprintf('Level %d', $local_user['level']) );
    1314                                                 }
    1315                 $properties[] =
    1316                                 (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
    1317                                 ? l10n('is_high_enabled') : l10n('is_high_disabled');
    1318 
    1319                                                 $expiration = expiration($local_user['id']);
     1296                if (isset($_POST['pref_submit'])
     1297                and isset($_POST['selection'])
     1298        and in_array($local_user['id'], $_POST['selection']))
     1299                {
     1300                                $checked = 'checked="checked"';
     1301                }
     1302                        else
     1303        {
     1304                $checked = '';
     1305        }
     1306
     1307        $properties = array();
     1308        if ( $local_user['level'] != 0 )
     1309                        {
     1310                $properties[] = l10n( sprintf('Level %d', $local_user['level']) );
     1311                        }
     1312        $properties[] =
     1313                (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
     1314                ? l10n('is_high_enabled') : l10n('is_high_disabled');
     1315
     1316                        $expiration = expiration($local_user['id']);
    13201317
    13211318      // Template initialization
    13221319      // -----------------------
    1323                         $template->append(
    1324                         'users',
    1325                         array(
    1326                                                 'ID'               => $local_user['id'],
    1327                                 'CHECKED'          => $checked,
    1328                                 'U_PROFILE'        => $profile_url.$local_user['id'],
    1329                                 'U_PERM'           => $perm_url.$local_user['id'],
    1330                                 'USERNAME'         => stripslashes($local_user['username'])
     1320                $template->append(
     1321                'users',
     1322        array(
     1323                'ID'               => $local_user['id'],
     1324                'CHECKED'          => $checked,
     1325                'U_PROFILE'        => $profile_url.$local_user['id'],
     1326                'U_PERM'           => $perm_url.$local_user['id'],
     1327                'USERNAME'         => stripslashes($local_user['username'])
    13311328                                  .($local_user['id'] == $conf['guest_id']
    13321329                                  ? '<BR>['.l10n('is_the_guest').']' : '')
     
    13351332                                  'STATUS' => l10n('user_status_'
    13361333                                  .$local_user['status']),
    1337                                                                                                 'EMAIL'            => get_email_address_as_display_text($local_user['email']),
    1338                                 'GROUPS'           => $groups_string,
    1339                                 'REGISTRATION'     => $local_user['registration_date'],
    1340                         'REMINDER'         => $reminder,   
    1341                                 'EXPIRATION'       => $expiration,
    1342                                                                                 )
    1343                                                 );
    1344                                 }   
     1334                                        'EMAIL'            => get_email_address_as_display_text($local_user['email']),
     1335                'GROUPS'           => $groups_string,
     1336                'REGISTRATION'     => $local_user['registration_date'],
     1337          'REMINDER'         => $reminder,   
     1338                'EXPIRATION'       => $expiration,
     1339                                )
     1340                        );
     1341                }   
    13451342
    13461343    // Check if validation of register is made by admin or visitor
     
    13611358    // -----------------------
    13621359    $template->assign(
    1363                 array(
     1360      array(
    13641361        'CONFIRM_LOCAL'=> $Confirm_Local,
    13651362        'UAM_VERSION'  => $version,
     
    13711368// |                             errors display                            |
    13721369// +-----------------------------------------------------------------------+
    1373                                 if ( isset ($errors) and count($errors) != 0)
    1374                                 {
    1375                                 $template->assign('errors',array());
    1376                                                 foreach ($errors as $error)
    1377                                 {
    1378                                                                 array_push($page['errors'], $error);
    1379                                 }
    1380                                
     1370                if ( isset ($errors) and count($errors) != 0)
     1371                {
     1372                $template->assign('errors',array());
     1373                        foreach ($errors as $error)
     1374                {
     1375                                array_push($page['errors'], $error);
     1376                }
     1377               
    13811378
    13821379// +-----------------------------------------------------------------------+
    13831380// |                           templates display                           |
    13841381// +-----------------------------------------------------------------------+
    1385                                 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/usermanager.tpl');
    1386                 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');             
    1387                 }
     1382                $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/usermanager.tpl');
     1383    $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');         
     1384        }
    13881385  else
    13891386  {
    1390                                 array_push($page['errors'], l10n('UAM_Err_UserManager_Settings'));
     1387                array_push($page['errors'], l10n('UAM_Err_UserManager_Settings'));
    13911388  }
    13921389  break;
     
    13981395// +-----------------------------------------------------------------------+
    13991396// *************************************************************************
    1400                 case 'ghosttracker':
     1397  case 'ghosttracker':
    14011398
    14021399  $conf_UAM = unserialize($conf['UserAdvManager']);
     
    14081405// +-----------------------------------------------------------------------+
    14091406
    1410                                 if (!defined('PHPWG_ROOT_PATH'))
    1411                 {
    1412                                 die('Hacking attempt!');
    1413                 }
     1407                if (!defined('PHPWG_ROOT_PATH'))
     1408    {
     1409        die('Hacking attempt!');
     1410    }
    14141411         
    1415                 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
     1412    include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    14161413
    14171414// +-----------------------------------------------------------------------+
    14181415// | Check Access and exit when user status is not ok                      |
    14191416// +-----------------------------------------------------------------------+
    1420                                 check_status(ACCESS_ADMINISTRATOR);
     1417                check_status(ACCESS_ADMINISTRATOR);
    14211418
    14221419// +-----------------------------------------------------------------------+
     
    14241421// +-----------------------------------------------------------------------+
    14251422
     1423                $page['filtered_users'] = get_ghost_user_list();
     1424
     1425// +-----------------------------------------------------------------------+
     1426// |                            selected users                             |
     1427// +-----------------------------------------------------------------------+
     1428                if (isset($_POST['Del_Selected']))
     1429                {
     1430                $collection = array();
     1431
     1432                        switch ($_POST['target'])
     1433        {
     1434                case 'all' :
     1435        {
     1436                foreach($page['filtered_users'] as $local_user)
     1437                {
     1438                        array_push($collection, $local_user['id']);
     1439                }
     1440                                        break;
     1441                                }
     1442        case 'selection' :
     1443        {
     1444                if (isset($_POST['selection']))
     1445                {
     1446                        $collection = $_POST['selection'];
     1447                }
     1448                break;
     1449        }
     1450                        }
     1451
     1452                        if (count($collection) == 0)
     1453        {
     1454                array_push($page['errors'], l10n('Select at least one user'));
     1455                }
     1456                }
     1457
     1458// +-----------------------------------------------------------------------+
     1459// |                             delete users                              |
     1460// +-----------------------------------------------------------------------+
     1461                if (isset($_POST['Del_Selected']) and count($collection) > 0)
     1462        {
     1463                if (in_array($conf['guest_id'], $collection))
     1464                {
     1465                array_push($page['errors'], l10n('Guest cannot be deleted'));
     1466        }
     1467        if (($conf['guest_id'] != $conf['default_user_id']) and
     1468                in_array($conf['default_user_id'], $collection))
     1469        {
     1470                array_push($page['errors'], l10n('Default user cannot be deleted'));
     1471        }
     1472        if (in_array($conf['webmaster_id'], $collection))
     1473        {
     1474                array_push($page['errors'], l10n('Webmaster cannot be deleted'));
     1475        }
     1476        if (in_array($user['id'], $collection))
     1477        {
     1478                array_push($page['errors'], l10n('You cannot delete your account'));
     1479        }
     1480
     1481                        if (count($page['errors']) == 0)
     1482        {
     1483                foreach ($collection as $user_id)
     1484        {
     1485                delete_user($user_id);
     1486        }
     1487                array_push(
     1488                $page['infos'],
     1489                l10n_dec(
     1490                '%d user deleted', '%d users deleted',
     1491                count($collection)
     1492                )
     1493        );
     1494
     1495        foreach ($page['filtered_users'] as $filter_key => $filter_user)
     1496        {
     1497                if (in_array($filter_user['id'], $collection))
     1498                {
     1499                        unset($page['filtered_users'][$filter_key]);
     1500                }
     1501                }
     1502                        }
     1503                }
     1504
     1505// +-----------------------------------------------------------------------+
     1506// |                          Send ghost reminder                          |
     1507// +-----------------------------------------------------------------------+
     1508// +-----------------------------------------------------------------------+
     1509// |                            selected users                             |
     1510// +-----------------------------------------------------------------------+
     1511                if (isset($_POST['Reminder_Email']))
     1512                {
     1513                $collection = array();
     1514
     1515                        switch ($_POST['target'])
     1516        {
     1517                case 'all' :
     1518        {
     1519                foreach($page['filtered_users'] as $local_user)
     1520                {
     1521                        array_push($collection, $local_user['id']);
     1522                }
     1523                break;
     1524                                }
     1525        case 'selection' :
     1526        {
     1527                if (isset($_POST['selection']))
     1528                {
     1529                        $collection = $_POST['selection'];
     1530                }
     1531                break;
     1532        }
     1533                        }
     1534
     1535        if (count($collection) == 0)
     1536        {
     1537                array_push($page['errors'], l10n('Select at least one user'));
     1538        }
     1539                }
     1540// +-----------------------------------------------------------------------+
     1541// |                         Send ghost reminder                           |
     1542// +-----------------------------------------------------------------------+
     1543                if (isset($_POST['Reminder_Email']) and count($collection) > 0)
     1544                {
     1545                        if (in_array($conf['guest_id'], $collection))
     1546                {
     1547                array_push($page['errors'], l10n('UAM_No_reminder_for_Guest'));
     1548        }
     1549        if (($conf['guest_id'] != $conf['default_user_id']) and
     1550                in_array($conf['default_user_id'], $collection))
     1551        {
     1552                array_push($page['errors'], l10n('UAM_No_reminder_for_default_user'));
     1553        }
     1554                if (in_array($conf['webmaster_id'], $collection))
     1555        {
     1556                array_push($page['errors'], l10n('UAM_No_reminder_for_Webmaster'));
     1557        }
     1558        if (in_array($user['id'], $collection))
     1559        {
     1560                array_push($page['errors'], l10n('UAM_No_reminder_for_your_account'));
     1561        }
     1562
     1563        if (count($page['errors']) == 0)
     1564        {
     1565                foreach ($collection as $user_id)
     1566        {
     1567                                  $query = "
     1568SELECT id, username, mail_address
     1569  FROM ".USERS_TABLE."
     1570WHERE id = '".$user_id."'
     1571;";
     1572                                       
     1573                                        $data = pwg_db_fetch_assoc(pwg_query($query));
     1574                               
     1575                ghostreminder($user_id,stripslashes($data['username']),$data['mail_address']);                         
     1576        }
     1577        array_push(
     1578                $page['infos'],
     1579                l10n_dec(
     1580                        'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
     1581                count($collection)
     1582                )
     1583        );
     1584       
    14261585                                $page['filtered_users'] = get_ghost_user_list();
    1427 
    1428 // +-----------------------------------------------------------------------+
    1429 // |                            selected users                             |
    1430 // +-----------------------------------------------------------------------+
    1431                                 if (isset($_POST['Del_Selected']))
    1432                                 {
    1433                                 $collection = array();
    1434 
    1435                                                 switch ($_POST['target'])
    1436                 {
    1437                                 case 'all' :
    1438                 {
    1439                                 foreach($page['filtered_users'] as $local_user)
    1440                                 {
    1441                                         array_push($collection, $local_user['id']);
    1442                         }
    1443                                                                 break;
    1444                                                                 }
    1445                 case 'selection' :
    1446                 {
    1447                                 if (isset($_POST['selection']))
    1448                         {
    1449                                         $collection = $_POST['selection'];
    1450                         }
    1451                 break;
    1452                 }
    1453                                                 }
    1454 
    1455                                                 if (count($collection) == 0)
    1456                 {
    1457                                 array_push($page['errors'], l10n('Select at least one user'));
    1458                         }
    1459                                 }
    1460 
    1461 // +-----------------------------------------------------------------------+
    1462 // |                             delete users                              |
    1463 // +-----------------------------------------------------------------------+
    1464                                 if (isset($_POST['Del_Selected']) and count($collection) > 0)
    1465                 {
    1466                                 if (in_array($conf['guest_id'], $collection))
    1467                         {
    1468                                 array_push($page['errors'], l10n('Guest cannot be deleted'));
    1469                 }
    1470                 if (($conf['guest_id'] != $conf['default_user_id']) and
    1471                                 in_array($conf['default_user_id'], $collection))
    1472                 {
    1473                                 array_push($page['errors'], l10n('Default user cannot be deleted'));
    1474                 }
    1475                 if (in_array($conf['webmaster_id'], $collection))
    1476                 {
    1477                                 array_push($page['errors'], l10n('Webmaster cannot be deleted'));
    1478                 }
    1479                 if (in_array($user['id'], $collection))
    1480                 {
    1481                                 array_push($page['errors'], l10n('You cannot delete your account'));
    1482                 }
    1483 
    1484                                                 if (count($page['errors']) == 0)
    1485                 {
    1486                                 foreach ($collection as $user_id)
    1487                 {
    1488                                 delete_user($user_id);
    1489                 }
    1490                         array_push(
    1491                                 $page['infos'],
    1492                         l10n_dec(
    1493                         '%d user deleted', '%d users deleted',
    1494                         count($collection)
    1495                         )
    1496                 );
    1497 
    1498                 foreach ($page['filtered_users'] as $filter_key => $filter_user)
    1499                 {
    1500                                 if (in_array($filter_user['id'], $collection))
    1501                         {
    1502                                         unset($page['filtered_users'][$filter_key]);
    1503                         }
    1504                         }
    1505                                                 }
    1506                                 }
    1507 
    1508 // +-----------------------------------------------------------------------+
    1509 // |                          Send ghost reminder                          |
    1510 // +-----------------------------------------------------------------------+
    1511 // +-----------------------------------------------------------------------+
    1512 // |                            selected users                             |
    1513 // +-----------------------------------------------------------------------+
    1514                                 if (isset($_POST['Reminder_Email']))
    1515                                 {
    1516                                 $collection = array();
    1517 
    1518                                                 switch ($_POST['target'])
    1519                 {
    1520                                 case 'all' :
    1521                 {
    1522                                 foreach($page['filtered_users'] as $local_user)
    1523                         {
    1524                                         array_push($collection, $local_user['id']);
    1525                         }
    1526         break;
    1527                                                                 }
    1528                 case 'selection' :
    1529                 {
    1530                                 if (isset($_POST['selection']))
    1531                         {
    1532                                         $collection = $_POST['selection'];
    1533                         }
    1534                 break;
    1535                 }
    1536                                                 }
    1537 
    1538                 if (count($collection) == 0)
    1539                 {
    1540                                 array_push($page['errors'], l10n('Select at least one user'));
    1541                 }
    1542                                 }
    1543 // +-----------------------------------------------------------------------+
    1544 // |                         Send ghost reminder                           |
    1545 // +-----------------------------------------------------------------------+
    1546                                 if (isset($_POST['Reminder_Email']) and count($collection) > 0)
    1547                                 {
    1548                                                 if (in_array($conf['guest_id'], $collection))
    1549                         {
    1550                                 array_push($page['errors'], l10n('UAM_No_reminder_for_Guest'));
    1551                         }
    1552                 if (($conf['guest_id'] != $conf['default_user_id']) and
    1553                                 in_array($conf['default_user_id'], $collection))
    1554                 {
    1555                                 array_push($page['errors'], l10n('UAM_No_reminder_for_default_user'));
    1556                 }
    1557                         if (in_array($conf['webmaster_id'], $collection))
    1558                 {
    1559                                 array_push($page['errors'], l10n('UAM_No_reminder_for_Webmaster'));
    1560                 }
    1561                 if (in_array($user['id'], $collection))
    1562                 {
    1563                                 array_push($page['errors'], l10n('UAM_No_reminder_for_your_account'));
    1564                         }
    1565 
    1566                 if (count($page['errors']) == 0)
    1567                 {
    1568                                 foreach ($collection as $user_id)
    1569                 {
    1570                                                                 $query = '
    1571 SELECT id, username, mail_address
    1572   FROM '.USERS_TABLE.'
    1573 WHERE id = '.$user_id.'
    1574 ;';
    1575                                        
    1576                                                                                 $data = pwg_db_fetch_assoc(pwg_query($query));
    1577                                
    1578                                 ghostreminder($user_id,stripslashes($data['username']),$data['mail_address']);                         
    1579                 }
    1580                 array_push(
    1581                                 $page['infos'],
    1582                         l10n_dec(
    1583                         'UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent',
    1584                         count($collection)
    1585                         )
    1586                 );
    1587 
    1588                                                                 $page['filtered_users'] = get_ghost_user_list();
    1589                                                 }
    1590                                 }
     1586                        }
     1587                }
    15911588   
    15921589    if (isset($_POST['GhostTracker_Init']) and is_admin()) //Reset is only allowed for admins !
    15931590    {
    1594                 $query1 = '
     1591      $query1 = '
    15951592SELECT *
    15961593  FROM '.USER_LASTVISIT_TABLE.';';
     
    16001597      if ($count <> 0)
    16011598      {
    1602                 $query = '
     1599        $query = '
    16031600SELECT DISTINCT u.id,
    16041601                ui.status AS status
     
    16191616          list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    16201617           
    1621           $query = '
    1622 INSERT INTO '.USER_LASTVISIT_TABLE.'
    1623                                 (user_id, lastvisit, reminder)
    1624 VALUES ('.$row['id'].',"'.$dbnow.'","false")
    1625 ;';
     1618          $query = "
     1619INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
     1620VALUES ('".$row['id']."','".$dbnow."','false')
     1621;";
    16261622          pwg_query($query);
    16271623        }
     
    16471643          list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    16481644           
    1649           $query = '
    1650 INSERT INTO '.USER_LASTVISIT_TABLE.'
    1651     (user_id, lastvisit, reminder)
    1652 VALUES ('.$row['id'].',"'.$dbnow.'","false")
    1653 ;';
     1645          $query = "
     1646INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
     1647VALUES ('".$row['id']."','".$dbnow."','false')
     1648;";
    16541649          pwg_query($query);
    16551650        }
     
    16671662    {
    16681663      $visible_user_list[] = $local_user;
    1669                                 }
     1664                }
    16701665   
    1671                                 foreach ($visible_user_list as $local_user)
    1672         {
    1673                 $reminder = '';
     1666                foreach ($visible_user_list as $local_user)
     1667    {
     1668      $reminder = '';
    16741669   
    16751670      if (isset($local_user['reminder']) and $local_user['reminder'] == 'true')
     
    16831678   
    16841679      if (isset($_POST['pref_submit']) and isset($_POST['selection']) and in_array($local_user['id'], $_POST['selection']))
    1685                                 {
    1686                                                                 $checked = 'checked="checked"';
    1687                                 }
    1688                                                 else
    1689                 {
    1690                                 $checked = '';
    1691                         }
     1680                {
     1681                                $checked = 'checked="checked"';
     1682                }
     1683                        else
     1684        {
     1685                $checked = '';
     1686        }
    16921687
    16931688      // Template initialization
     
    16961691          'users',
    16971692        array(
    1698                         'ID'          => $local_user['id'],
     1693                'ID'          => $local_user['id'],
    16991694                'CHECKED'     => $checked,
    17001695                'USERNAME'    => stripslashes($local_user['username']),
    1701                                                                                 'EMAIL'       => get_email_address_as_display_text($local_user['email']),
     1696                                        'EMAIL'       => get_email_address_as_display_text($local_user['email']),
    17021697          'LASTVISIT'   => $local_user['lastvisit'],
    17031698          'REMINDER'    => $reminder,
    1704                                                                 )
    1705                                                 );
    1706                                 }
     1699                                )
     1700                        );
     1701                }
    17071702
    17081703    // Plugin version inserted
     
    17181713// |                             errors display                            |
    17191714// +-----------------------------------------------------------------------+
    1720                                 if ( isset ($errors) and count($errors) != 0)
    1721                                 {
    1722                                 $template->assign('errors',array());
    1723                                                 foreach ($errors as $error)
    1724                                 {
    1725                                                                 array_push($page['errors'], $error);
    1726                                 }
    1727                                
     1715                if ( isset ($errors) and count($errors) != 0)
     1716                {
     1717                $template->assign('errors',array());
     1718                        foreach ($errors as $error)
     1719                {
     1720                                array_push($page['errors'], $error);
     1721                }
     1722               
    17281723
    17291724// +-----------------------------------------------------------------------+
    17301725// |                           templates display                           |
    17311726// +-----------------------------------------------------------------------+
    1732                                 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/ghosttracker.tpl');
     1727                $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/ghosttracker.tpl');
    17331728    $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');         
    1734                 }
     1729        }
    17351730  else
    17361731  {
    1737                                 array_push($page['errors'], l10n('UAM_Err_GhostTracker_Settings'));
     1732                array_push($page['errors'], l10n('UAM_Err_GhostTracker_Settings'));
    17381733  }
    17391734
  • extensions/UserAdvManager/branches/2.40/admin/template/global.tpl

    r18160 r18482  
    77{if $UAM_THEME=='default'}{combine_css path= $UAM_PATH|@cat:'admin/template/themes/default/theme.css'}{/if}
    88
    9 
    10 <script type="text/javascript">
     9{footer_script}{literal}
    1110jQuery().ready(function()
    12 {ldelim}
     11{
     12  jQuery("#UAM_Confirm_Mail_true, #UAM_Confirm_Mail_local").click(function() {
     13    jQuery("#UAM_CONFIRM_MAIL__").show("slow");
     14  });
     15  jQuery("#UAM_Confirm_Mail_false").click(function() {
     16    jQuery("#UAM_CONFIRM_MAIL__").hide("slow");
     17  });
     18  jQuery("#UAM_ConfirmMail_Remail_true, #UAM_ConfirmMail_TimeOut_true").click(function() {
     19    jQuery("#UAM_ConfirmMail_field").show("slow");
     20  });
     21  jQuery("#UAM_ConfirmMail_TimeOut_false").click(function() {
     22    if ($("input[name='UAM_ConfirmMail_Remail']:checked").val()=="false" )
     23    {
     24      jQuery("#UAM_ConfirmMail_field").hide("slow");
     25    }
     26  });
     27  jQuery("#UAM_ConfirmMail_Remail_false").click(function() {
     28    if ( $("input[name='UAM_ConfirmMail_TimeOut']:checked").val()=="false" )
     29    {
     30      jQuery("#UAM_ConfirmMail_field").hide("slow");
     31    }
     32  });
     33  jQuery("#UAM_RejectConnexion_true").click(function() {
     34    jQuery("#UAM_REJECTLOGIN").show("slow");
     35  });
     36  jQuery("#UAM_RejectConnexion_false").click(function() {
     37    jQuery("#UAM_REJECTLOGIN").hide("slow");
     38  });
     39 
     40  jQuery("#UAM_GhostUser_Tracker_true").click(function() {
     41    jQuery("#UAM_GHOSTRACKER_OPT").show("slow");
     42  });
     43  jQuery("#UAM_GhostUser_Tracker_false").click(function() {
     44    jQuery("#UAM_GHOSTRACKER_OPT").hide("slow");
     45  });
     46  jQuery("#UAM_GTAuto_true").click(function() {
     47    jQuery("#UAM_GTAUTO").show("slow");
     48  });
     49  jQuery("#UAM_GTAuto_false").click(function() {
     50    jQuery("#UAM_GTAUTO").hide("slow");
     51  });
     52  jQuery("#UAM_Mail_Info_true").click(function() {
     53    jQuery("#UAM_MAIL_INFO").show("slow");
     54  });
     55  jQuery("#UAM_Mail_Info_false").click(function() {
     56    jQuery("#UAM_MAIL_INFO").hide("slow");
     57  });
     58 
     59  jQuery("#show_UAM_AdminValidation").click(function() {
     60    jQuery("#UAM_AdminValidation").show("slow");
     61    jQuery("#hide_UAM_AdminValidation").show("slow");
     62    jQuery(this).hide("slow");
     63    return false;
     64  });
     65  jQuery("#hide_UAM_AdminValidation").click(function() {
     66    jQuery("#show_UAM_AdminValidation").show("slow");
     67    jQuery("#UAM_AdminValidation").hide("slow");
     68    jQuery(this).hide("slow");
     69    return false;
     70  });
     71  jQuery("#show_UAM_ConfirmMail").click(function() {
     72    jQuery("#UAM_ConfirmMail").show("slow");
     73    jQuery("#hide_UAM_ConfirmMail").show("slow");
     74    jQuery(this).hide("slow");
     75    return false;
     76  });
     77  jQuery("#hide_UAM_ConfirmMail").click(function() {
     78    jQuery("#show_UAM_ConfirmMail").show("slow");
     79    jQuery("#UAM_ConfirmMail").hide("slow");
     80    jQuery(this).hide("slow");
     81    return false;
     82  });
     83  jQuery("#show_UAM_Change").click(function() {
     84    jQuery("#UAM_Change").show("slow");
     85    jQuery("#hide_UAM_Change").show("slow");
     86    jQuery(this).hide("slow");
     87    return false;
     88  });
     89  jQuery("#hide_UAM_Change").click(function() {
     90    jQuery("#show_UAM_Change").show("slow");
     91    jQuery("#UAM_Change").hide("slow");
     92    jQuery(this).hide("slow");
     93    return false;
     94  });
     95  jQuery("#show_UAM_GTReminder").click(function() {
     96    jQuery("#UAM_GTReminder").show("slow");
     97    jQuery("#hide_UAM_GTReminder").show("slow");
     98    jQuery(this).hide("slow");
     99    return false;
     100  });
     101  jQuery("#hide_UAM_GTReminder").click(function() {
     102    jQuery("#show_UAM_GTReminder").show("slow");
     103    jQuery("#UAM_GTReminder").hide("slow");
     104    jQuery(this).hide("slow");
     105    return false;
     106  });
    13107  jQuery('.cluetip').cluetip(
    14   {ldelim}
     108  {
    15109    width: 550,
    16110    splitTitle: '|'
    17   {rdelim});
    18 {rdelim});
     111  });
     112});
    19113
    20114function blockToggleDisplay(headerId, contentId)
    21 {ldelim}
     115{
    22116  var revHeader = document.getElementById(headerId);
    23117  var revContent = document.getElementById(contentId);
    24118
    25119  if (revContent.style.display == 'none')
    26   {ldelim}
     120  {
    27121    revContent.style.display = 'block';
    28122    revHeader.className = 'instructionBlockHeaderExpanded';
    29   {rdelim}
     123  }
    30124  else
    31   {ldelim}
     125  {
    32126    revContent.style.display = 'none';
    33127    revHeader.className = 'instructionBlockHeaderCollapsed';
    34   {rdelim}
    35 {rdelim}
     128  }
     129}
    36130
    37131function uam_blockToggleDisplay( headerId, contentId )
    38 {ldelim}
     132{
    39133  if (typeof(headerId)=='string')
    40   {ldelim}
     134  {
    41135   if (headerId.length > 1)
    42136       blockToggleDisplay(headerId, contentId) ;
    43137      document.getElementById("nb_para").value =headerId ;
    44138      document.getElementById("nb_para2").value =contentId;
    45   {rdelim}
    46 {rdelim}
    47 </script>
     139  }
     140}
     141{/literal}{/footer_script}
    48142
    49143<div class="titrePage">
     
    57151      &nbsp;
    58152    <input class="submit" type="submit" value="{'UAM_audit'|@translate}" name="audit">
     153    <input name="nb_para" id="nb_para" type="text" value="{$nb_para}" style="display:none">
     154    <input name="nb_para2" id="nb_para2" type="text" value="{$nb_para2}" style="display:none">
    59155  </p>
    60156
    61   <input name="nb_para" id="nb_para" type="text" value="{$nb_para}" style="display:none">
    62   <input name="nb_para2" id="nb_para2" type="text" value="{$nb_para2}" style="display:none">
    63157
    64158  <div id="instructionConfig1" class="instructionBlock" >
     
    71165
    72166    <div id="Config1" class="instructionBlockContent" style="display:none">
    73       <fieldset>
    74167        <ul>
    75168          <li>
     
    77170              {'UAM_Username_Char'|@translate}
    78171            </label>
    79           <br><br>
    80             <input type="radio" value="false" {$UAM_USERNAME_CHAR_FALSE} name="UAM_Username_Char">
     172            <label for="UAM_Username_Char_false"><input id="UAM_Username_Char_false" type="radio" value="false" {$UAM_USERNAME_CHAR_FALSE} name="UAM_Username_Char">
    81173              {'UAM_Username_Char_false'|@translate}<br>
    82             <input type="radio" value="true" {$UAM_USERNAME_CHAR_TRUE} name="UAM_Username_Char">
     174            </label>
     175            <label for="UAM_Username_Char_true"><input id="UAM_Username_Char_true" type="radio" value="true" {$UAM_USERNAME_CHAR_TRUE} name="UAM_Username_Char">
    83176              {'UAM_Username_Char_true'|@translate}
    84             <div id="uam_leftmargin">
     177            <div class="uam_leftmargin">
    85178              <input type="text" name="UAM_Username_List" value="{$UAM_USERNAME_CHAR_LIST}" size="20" style="text-align: center;">
    86179            </div>
    87           <br><br>
     180            </label>
    88181          </li>
    89      
    90182          <li>
    91183            <label class="cluetip" title="{'UAM_Password_Enforced'|translate}|{'UAM_passwTitle_d'|translate}">
    92184              {'UAM_Password_Enforced'|@translate}
    93185            </label>
    94           <br><br>
    95             <input type="radio" value="false" {$UAM_PASSWORDENF_FALSE} name="UAM_Password_Enforced">
    96               {'UAM_Disable'|@translate}<br>
    97             <input type="radio" value="true" {$UAM_PASSWORDENF_TRUE} name="UAM_Password_Enforced">
     186         
     187            <label for="UAM_Password_Enforced_false"><input id="UAM_Password_Enforced_false" type="radio" value="false" {$UAM_PASSWORDENF_FALSE} name="UAM_Password_Enforced">
     188              {'UAM_Disable'|@translate}
     189            </label>
     190            <label for="UAM_Password_Enforced_true"><input id="UAM_Password_Enforced_true" type="radio" value="true" {$UAM_PASSWORDENF_TRUE} name="UAM_Password_Enforced">
    98191              {'UAM_Password_Enforced_true'|@translate}&nbsp;
    99192            <input type="text" name="UAM_Password_Score" value="{$UAM_PASSWORD_SCORE}" size="5" style="text-align: center;">
    100           <br><br>
     193            </label>
    101194            {'UAM_PasswordTest'|@translate}
    102195              <input class="cluetip" title="{'UAM_passwtestTitle'|translate}|{'UAM_passwtestTitle_d'|translate}" type="text" name="UAM_Password_Test" value="{$UAM_PASSWORD_TEST}" size="50" style="text-align: left;">
     
    104197              <input class="submit" type="submit" value="{'UAM_PasswordTest'|@translate}" name="PasswordTest">
    105198              &nbsp;&nbsp;&nbsp;{'UAM_ScoreTest'|@translate}{$UAM_PASSWORD_TEST_SCORE}
    106             <br><br>
     199           
    107200          </li>
    108 
    109201          <ul>
    110202            <li>
     
    112204                {'UAM_AdminPassword_Enforced'|@translate}
    113205              </label>
    114             <br><br>
    115               <input type="radio" value="false" {$UAM_ADMINPASSWENF_FALSE} name="UAM_AdminPassword_Enforced">
     206           
     207              <label for="UAM_AdminPassword_Enforced_false"><input id="UAM_AdminPassword_Enforced_false" value="false" {$UAM_ADMINPASSWENF_FALSE} name="UAM_AdminPassword_Enforced" type="radio">
    116208                {'UAM_Disable'|@translate}
    117             <br>       
    118               <input type="radio" value="true" {$UAM_ADMINPASSWENF_TRUE} name="UAM_AdminPassword_Enforced">
     209              </label>
     210              <label for="UAM_AdminPassword_Enforced_true"><input id="UAM_AdminPassword_Enforced_true" value="true" {$UAM_ADMINPASSWENF_TRUE} name="UAM_AdminPassword_Enforced" type="radio">
    119211                {'UAM_Enable'|@translate}
    120             <br><br>
     212              </label>
     213           
    121214            </li>
    122215          </ul>
     
    129222
    130223            <div class="uam_hide">
    131             <br><br>
    132               <input type="radio" value="false" {$UAM_MAILEXCLUSION_FALSE} name="UAM_MailExclusion">
     224           
     225              <label for="UAM_MailExclusion_false"><input id="UAM_MailExclusion_false" value="false" {$UAM_MAILEXCLUSION_FALSE} name="UAM_MailExclusion" type="radio">
    133226                {'UAM_Disable'|@translate}
    134             <br>
    135               <input type="radio" value="true" {$UAM_MAILEXCLUSION_TRUE} name="UAM_MailExclusion">
     227              </label>
     228              <label for="UAM_MailExclusion_true"><input id="UAM_MailExclusion_true" value="true" {$UAM_MAILEXCLUSION_TRUE} name="UAM_MailExclusion" type="radio">
    136229                {'UAM_MailExclusion_true'|@translate}
    137             <br><br>
     230              </label>
     231           
    138232            </div>
    139233          {else}
     
    142236            </label>
    143237
    144             <br><br>
    145               <input type="radio" value="false" {$UAM_MAILEXCLUSION_FALSE} name="UAM_MailExclusion">
     238           
     239              <label for="UAM_MailExclusion_false"><input id="UAM_MailExclusion_false" value="false" {$UAM_MAILEXCLUSION_FALSE} name="UAM_MailExclusion" type="radio">
    146240                {'UAM_Disable'|@translate}
    147             <br>
    148               <input type="radio" value="true" {$UAM_MAILEXCLUSION_TRUE} name="UAM_MailExclusion">
     241              </label>
     242              <label for="UAM_MailExclusion_true"><input id="UAM_MailExclusion_true" value="true" {$UAM_MAILEXCLUSION_TRUE} name="UAM_MailExclusion" type="radio">
    149243                {'UAM_MailExclusion_true'|@translate}
    150             <br><br>
     244              </label>
     245           
    151246
    152247          {if $UAM_ERROR_REPORTS1}     
    153             <div id="uam_leftmargin">
     248            <div class="uam_leftmargin">
    154249              <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
    155250            </div>
    156             <br><br>
     251           
    157252          {else}
    158             <div id="uam_leftmargin">
     253            <div class="uam_leftmargin">
    159254              <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
    160255            </div>
    161             <br><br>
     256           
    162257          {/if}
    163258          {/if}
    164259          </li>
    165260        </ul>
    166       </fieldset>
    167261    </div>
    168262  </div>
     
    180274 
    181275    <div id="Config2" class="instructionBlockContent" style="display:none">
    182       <fieldset>
    183276        <ul>
    184277                <li>
     
    186279              {'UAM_Confirm_Mail'|@translate}
    187280            </label>
    188           <br><br>
    189             <input type="radio" value="false" {$UAM_CONFIRM_MAIL_FALSE} name="UAM_Confirm_Mail">
    190               {'UAM_Disable'|@translate}
    191           <br>
    192             <input type="radio" value="true" {$UAM_CONFIRM_MAIL_TRUE} name="UAM_Confirm_Mail">
    193               {'UAM_Confirm_Mail_true'|@translate}
    194           <br>
    195             <input type="radio" value="local" {$UAM_CONFIRM_MAIL_LOCAL} name="UAM_Confirm_Mail">
    196               {'UAM_Confirm_Mail_local'|@translate}
    197           <br><br>
     281            <label for="UAM_Confirm_Mail_false"><input type="radio" id="UAM_Confirm_Mail_false" value="false" {$UAM_CONFIRM_MAIL_FALSE} name="UAM_Confirm_Mail">
     282              {'UAM_Disable'|@translate}</label>
     283            <label for="UAM_Confirm_Mail_true"><input type="radio" id="UAM_Confirm_Mail_true" value="true" {$UAM_CONFIRM_MAIL_TRUE} name="UAM_Confirm_Mail">
     284              {'UAM_Confirm_Mail_true'|@translate}</label>
     285            <label for="UAM_Confirm_Mail_local"><input type="radio" id="UAM_Confirm_Mail_local" value="local" {$UAM_CONFIRM_MAIL_LOCAL} name="UAM_Confirm_Mail">
     286              {'UAM_Confirm_Mail_local'|@translate}</label>
    198287          </li>
    199          
    200         {if $UAM_CONFIRM_MAIL_FALSE}
    201           <div class="uam_hide">
    202         {/if}
     288        </ul>
     289          <div id="UAM_CONFIRM_MAIL__" {if $UAM_CONFIRM_MAIL_FALSE}style="display:none"{/if}>
    203290            <ul>
    204291                    <li>
     
    206293                  {'UAM_Stuffs'|@translate}
    207294                </label>
    208               <br><br>
    209                 <input type="radio" value="false" {$UAM_STUFFS_FALSE} name="UAM_Stuffs">
     295             
     296                <label for="UAM_Stuffs_false"><input id="UAM_Stuffs_false" value="false" {$UAM_STUFFS_FALSE} name="UAM_Stuffs" type="radio">
    210297                  {'UAM_Disable'|@translate}
    211               <br>
    212                 <input type="radio" value="true" {$UAM_STUFFS_TRUE} name="UAM_Stuffs">
     298                </label>
     299                <label for="UAM_Stuffs_true"><input id="UAM_Stuffs_true" value="true" {$UAM_STUFFS_TRUE} name="UAM_Stuffs" type="radio">
    213300                  {'UAM_Enable'|@translate}
    214               <br><br>
     301                </label>
     302             
    215303              </li>
    216304
     
    219307                  {'UAM_AdminConfMail'|@translate}
    220308                </label>
    221               <br><br>
    222                 <input type="radio" value="false" {$UAM_ADMINCONFMAIL_FALSE} name="UAM_Admin_ConfMail">
     309                <label for="UAM_Admin_ConfMail_false"><input id="UAM_Admin_ConfMail_false" value="false" {$UAM_ADMINCONFMAIL_FALSE} name="UAM_Admin_ConfMail" type="radio">
    223310                  {'UAM_Disable'|@translate}
    224               <br>
    225                 <input type="radio" value="true" {$UAM_ADMINCONFMAIL_TRUE} name="UAM_Admin_ConfMail">
     311                </label>
     312                <label for="UAM_Admin_ConfMail_true"><input id="UAM_Admin_ConfMail_true" value="true" {$UAM_ADMINCONFMAIL_TRUE} name="UAM_Admin_ConfMail" type="radio">
    226313                  {'UAM_Enable'|@translate}
    227               <br><br>
     314                </label>
     315             
    228316              </li>
    229317            </ul>
    230 
    231           <fieldset>
     318            <a id="show_UAM_AdminValidation" >{'UAM_Customize_messagesandmails'|translate}</a>
     319            <a id="hide_UAM_AdminValidation" style="display: none">{'hide details'|translate}</a>
     320          <fieldset id="UAM_AdminValidation" style="display: none">
    232321          <ul>
    233             <li>
     322            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
     323            <li>
     324            <div class="uam_new">
    234325              <label class="cluetip" title="{'UAM_AdminValidationMail_Subject'|translate}|{'UAM_AdminValidationMail_Subject_d'|translate}">
    235326                {'UAM_AdminValidationMail_Subject'|@translate}
    236327              </label>
    237             <br><br>
    238328              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_AdminValidationMail_Subject" id="UAM_AdminValidationMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_ADMINVALIDATIONMAIL_SUBJECT}</textarea>
    239             <br><br>
    240             </li>
    241 
     329            </div>
     330            </li>
    242331            <ul>
    243332              <li>
     
    245334                  {'UAM_AdminValidationMail_Text'|@translate}
    246335                </label>
    247               <br><br>
    248336                <textarea class="uam_textfields" name="UAM_AdminValidationMail_Text" id="UAM_AdminValidationMail_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_ADMINVALIDATIONMAIL_TEXT}</textarea>
    249               <br><br>
    250337              </li>
    251338            </ul>
    252339          </ul>
    253 
    254340          <ul>
    255             <li>
     341            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
     342            <li>
     343            <div class="uam_new">
    256344              <label class="cluetip" title="{'UAM_ConfirmMail_Subject'|translate}|{'UAM_ConfirmMail_Subject_d'|translate}">
    257345                {'UAM_ConfirmMail_Subject'|@translate}
    258346              </label>
    259             <br><br>
    260347              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_ConfirmMail_Subject" id="UAM_ConfirmMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_SUBJECT}</textarea>
    261             <br><br>
    262             </li>
    263 
     348            </div>
     349            </li>
    264350            <ul>
    265351              <li>
     
    267353                  {'UAM_ConfirmMail_Text'|@translate}
    268354                </label>
    269               <br><br>
    270355              {if $UAM_ERROR_REPORTS2}
    271356                  <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
     
    273358                  <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
    274359              {/if}
    275               <br><br>
    276360              </li>
    277361            </ul>
     
    288372                {'UAM_confirmmail_custom_Txt1'|@translate}
    289373              </label>
    290             <br><br>
    291374                <textarea class="uam_textfields" name="UAM_ConfirmMail_Custom_Txt1" id="UAM_ConfirmMail_Custom_Txt1" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT1}</textarea>
    292             <br><br>
    293375            </li>
    294376            {if 'FCK_PATH'|@defined}
     
    297379              </div>
    298380            {/if}
    299 
    300381            <li>
    301382              <label class="cluetip" title="{'UAM_confirmmail_custom_Txt2'|translate}|{'UAM_confirmmail_custom2_d'|translate}">
    302383                {'UAM_confirmmail_custom_Txt2'|@translate}
    303384              </label>
    304             <br><br>
    305385                <textarea class="uam_textfields" name="UAM_ConfirmMail_Custom_Txt2" id="UAM_ConfirmMail_Custom_Txt2" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT2}</textarea>
    306             <br><br>
    307386            </li>
    308387            {if 'FCK_PATH'|@defined}
     
    313392          </ul>
    314393          </fieldset>
    315 
    316           <fieldset>
     394          <br><hr><br>
    317395            <ul>
    318396                    <li>
     
    320398                  {'UAM_RejectConnexion'|@translate}
    321399                </label>
    322             <br><br>
    323                 <input type="radio" value="false" {$UAM_REJECTCONNECT_FALSE} name="UAM_RejectConnexion">
     400           
     401                <label for="UAM_RejectConnexion_false"><input id="UAM_RejectConnexion_false" type="radio" value="false" {$UAM_REJECTCONNECT_FALSE} name="UAM_RejectConnexion">
    324402                  {'UAM_Disable'|@translate}
    325             <br>
    326                 <input type="radio" value="true" {$UAM_REJECTCONNECT_TRUE} name="UAM_RejectConnexion">
    327                   {'UAM_Enable'|@translate}
    328             <br><br>
    329               </li>
    330             {if $UAM_REJECTLOGIN_FALSE}
    331               <div class="uam_hide">
    332             {/if}
    333               <li>
     403                </label>
     404                <label for="UAM_RejectConnexion_true"><input id="UAM_RejectConnexion_true" type="radio" value="true" {$UAM_REJECTCONNECT_TRUE} name="UAM_RejectConnexion">
     405                  {'UAM_Enable'|@translate}</label>
     406                </label>
     407              </li>
     408              <li id="UAM_REJECTLOGIN" {if $UAM_REJECTCONNECT_FALSE}style="display: none"{/if}>
    334409                <label class="cluetip" title="{'UAM_RejectConnexion_Custom_Txt'|translate}|{'UAM_RejectConnexion_Custom_Txt_d'|translate}">
    335410                  {'UAM_RejectConnexion_Custom_Txt'|@translate}
    336411                </label>
    337             <br><br>
    338412                <textarea class="uam_textfields" name="UAM_CustomRejectConnexion_Text" id="UAM_CustomRejectConnexion_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_REJECTCONNECT_TEXT}</textarea>
    339             <br><br>
    340               </li>
    341413            {if 'FCK_PATH'|@defined}
    342414              <div style="text-align:right;">
     
    344416              </div>
    345417            {/if}
    346             {if $UAM_REJECTLOGIN_FALSE}
    347               </div>
    348             {/if}
     418              </li>
    349419            </ul>
    350 
    351420          <br><hr><br>
    352 
    353           <ul>
     421          <a id="show_UAM_Change" >{'UAM_Change'|translate}</a>
     422          <a id="hide_UAM_Change" style="display: none">{'hide details'|translate}</a>
     423          <ul id="UAM_Change" style="display: none">
    354424            <div id="uam_notice">{'UAM_Confirm_grpstat_notice'|@translate}</div>
    355425              <br>
     
    358428                  {'UAM_Confirm_Group'|@translate}
    359429                </label>
    360               <br><br>
    361               </li>
    362 
     430              </li>
    363431              <ul>
    364432                <li>
     
    366434                    {'UAM_No_Confirm_Group'|@translate}
    367435                  </label>
    368                 <br>
    369                   <div id="uam_leftmargin">
     436                  <div class="uam_leftmargin">
    370437                    {html_options name="UAM_No_Confirm_Group" options=$No_Confirm_Group.group_options selected=$No_Confirm_Group.group_selected}
    371438                  </div>
    372                 <br><br>
    373439                </li>
    374 
    375440                <li>
    376441                  <label>
    377442                    {'UAM_Validated_Group'|@translate}
    378443                  </label>
    379                 <br>
    380                   <div id="uam_leftmargin">
     444                  <div class="uam_leftmargin">
    381445                    {html_options name="UAM_Validated_Group" options=$Validated_Group.group_options selected=$Validated_Group.group_selected}
    382446                  </div>
    383                 <br><br>
    384447                </li>
    385448              </ul>
    386 
    387449              <li>
    388450                <label class="cluetip" title="{'UAM_confirmstatTitle'|translate}|{'UAM_confirmstatTitle_d'|translate}">
    389451                  {'UAM_Confirm_Status'|@translate}
    390452                </label>
    391               <br><br>
    392               </li>
    393 
     453              </li>
    394454              <ul>
    395455                <li>
     
    397457                    {'UAM_No_Confirm_Status'|@translate}
    398458                  </label>
    399                 <br>
    400                   <div id="uam_leftmargin">
     459                  <div class="uam_leftmargin">
    401460                    {html_options name="UAM_No_Confirm_Status" options=$No_Confirm_Status.Status_options selected=$No_Confirm_Status.Status_selected}
    402461                  </div>
    403                 <br><br>
    404462                </li>
    405 
    406463                <li>
    407464                  <label>
    408465                    {'UAM_Validated_Status'|@translate}
    409466                  </label>
    410                 <br>
    411                   <div id="uam_leftmargin">
     467                  <div class="uam_leftmargin">
    412468                    {html_options name="UAM_Validated_Status" options=$Confirm_Status.Status_options selected=$Confirm_Status.Status_selected}
    413469                  </div>
    414                 <br><br>
    415470                </li>
    416471              </ul>
    417 
    418472              <li>
    419473                <label class="cluetip" title="{'UAM_confirmlevelTitle'|translate}|{'UAM_confirmlevelTitle_d'|translate}">
    420474                  {'UAM_Confirm_Level'|@translate}
    421475                </label>
    422               <br><br>
    423               </li>
    424              
     476              </li>
    425477              <ul>
    426478                <li>
     
    428480                    {'UAM_No_Valid_Level'|@translate}
    429481                  </label>
    430                 <br>
    431                   <div id="uam_leftmargin">
     482                  <div class="uam_leftmargin">
    432483                    {html_options name="UAM_No_Valid_Level" options=$No_Valid_Level.Level_options selected=$No_Valid_Level.Level_selected}
    433484                  </div>
    434                 <br><br>
    435485                </li>
    436 
    437486                <li>
    438487                  <label>
    439488                    {'UAM_Valid_Level'|@translate}
    440489                  </label>
    441                 <br>
    442                   <div id="uam_leftmargin">
     490                  <div class="uam_leftmargin">
    443491                    {html_options name="UAM_Valid_Level" options=$Valid_Level.Level_options selected=$Valid_Level.Level_selected}
    444492                  </div>
    445                 <br><br>
    446493                </li>
    447494              </ul>
    448495            </ul>
    449             </fieldset>
    450 
    451             <fieldset>
     496          <br><hr><br>
    452497            <ul>
    453498              <li>
     
    455500                  {'UAM_ValidationLimit_Info'|@translate}
    456501                </label>
    457               <br><br>
    458                 <input type="radio" value="false" {$UAM_CONFIRMMAIL_TIMEOUT_FALSE} name="UAM_ConfirmMail_TimeOut">
    459                   {'UAM_Disable'|@translate}
    460               <br>
    461                 <input type="radio" value="true" {$UAM_CONFIRMMAIL_TIMEOUT_TRUE} name="UAM_ConfirmMail_TimeOut">
     502                <label for="UAM_ConfirmMail_TimeOut_false" ><input id="UAM_ConfirmMail_TimeOut_false" type="radio" value="false" {$UAM_CONFIRMMAIL_TIMEOUT_FALSE} name="UAM_ConfirmMail_TimeOut">
     503                  {'UAM_Disable'|@translate}</label>
     504                <label for="UAM_ConfirmMail_TimeOut_true" ><input id="UAM_ConfirmMail_TimeOut_true" type="radio" value="true" {$UAM_CONFIRMMAIL_TIMEOUT_TRUE} name="UAM_ConfirmMail_TimeOut">
    462505                  {'UAM_ConfirmMail_TimeOut_true'|@translate}
    463506                <input type="text" name="UAM_ConfirmMail_Delay" value="{$UAM_CONFIRMMAIL_DELAY}" size="5" style="text-align: center;">
    464               <br><br>
    465               </li>
    466 
     507                </label>
     508              </li>
    467509              <li>
    468510                <label class="cluetip" title="{'UAM_ConfirmMail_Remail'|translate}|{'UAM_remailTitle_d'|translate}">
    469511                  {'UAM_ConfirmMail_Remail'|@translate}
    470512                </label>
    471               <br><br>
    472                 <input type="radio" value="false" {$UAM_CONFIRMMAIL_REMAIL_FALSE} name="UAM_ConfirmMail_Remail">
    473                   {'UAM_Disable'|@translate}
    474               <br>
    475                 <input type="radio" value="true" {$UAM_CONFIRMMAIL_REMAIL_TRUE} name="UAM_ConfirmMail_Remail">
    476                   {'UAM_Enable'|@translate}
    477               <br><br>
    478               </li>
    479 
    480               <ul>
     513                <label for="UAM_ConfirmMail_Remail_false" ><input id="UAM_ConfirmMail_Remail_false" type="radio" value="false" {$UAM_CONFIRMMAIL_REMAIL_FALSE} name="UAM_ConfirmMail_Remail">
     514                  {'UAM_Disable'|@translate}</label>
     515                <label for="UAM_ConfirmMail_Remail_true" ><input id="UAM_ConfirmMail_Remail_true" type="radio" value="true" {$UAM_CONFIRMMAIL_REMAIL_TRUE} name="UAM_ConfirmMail_Remail">
     516                  {'UAM_Enable'|@translate}</label>
     517              </li>
     518            <a id="show_UAM_ConfirmMail" >{'UAM_Customize_messagesandmails'|translate}</a>
     519            <a id="hide_UAM_ConfirmMail" style="display: none">{'hide details'|translate}</a>
     520              <ul id="UAM_ConfirmMail" style="display: none">
     521                <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
    481522                <li>
     523                <div class="uam_new">
    482524                  <label class="cluetip" title="{'UAM_ConfirmMail_ReMail_Subject'|translate}|{'UAM_ConfirmMail_ReMail_Subject_d'|translate}">
    483525                    {'UAM_ConfirmMail_ReMail_Subject'|@translate}
    484526                  </label>
    485                 <br><br>
    486527                  &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_ConfirmMail_Remail_Subject" id="UAM_ConfirmMail_Remail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_SUBJECT}</textarea>
    487                 <br><br>
     528                </div>
    488529                </li>
    489 
    490530                <ul>
    491531                  <li>
     
    493533                      {'UAM_ConfirmMail_ReMail_Txt1'|@translate}
    494534                    </label>
    495                   <br><br>
    496535                  {if $UAM_ERROR_REPORTS3}
    497536                    <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
     
    499538                    <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
    500539                  {/if}
    501                   <br><br>
    502540                  </li>
    503541<!--
     
    508546                {* /if *}
    509547-->
    510 
    511548                  <li>
    512549                    <label class="cluetip" title="{'UAM_remailtxt2Title'|translate}|{'UAM_remailtxt2Title_d'|translate}">
    513550                      {'UAM_ConfirmMail_ReMail_Txt2'|@translate}
    514551                    </label>
    515                   <br><br>
    516552                  {if $UAM_ERROR_REPORTS4}
    517553                    <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea>
     
    532568              </ul>
    533569            </ul>
    534             </fieldset>
    535 
    536           {if $UAM_CONFIRMMAIL_TIMEOUT_FALSE and $UAM_CONFIRMMAIL_REMAIL_FALSE}
    537             <div class="uam_hide">
    538           {/if}
    539 
    540           <fieldset>
     570          <fieldset id="UAM_ConfirmMail_field" {if $UAM_CONFIRMMAIL_TIMEOUT_FALSE and $UAM_CONFIRMMAIL_REMAIL_FALSE}style="display:none"{/if}>
    541571          <ul>
    542572            <li>
     
    544574                {'UAM_USRAuto'|@translate}
    545575              </label>
    546             <br><br>
    547               <input type="radio" value="false" {$UAM_USRAUTO_FALSE} name="UAM_USRAuto">
     576           
     577              <label for="UAM_USRAuto_false"><input id="UAM_USRAuto_false" value="false" {$UAM_USRAUTO_FALSE} name="UAM_USRAuto" type="radio">
    548578                {'UAM_Disable'|@translate}
    549             <br>
    550               <input type="radio" value="true" {$UAM_USRAUTO_TRUE} name="UAM_USRAuto">
     579              </label>
     580              <label for="UAM_USRAuto_true"><input id="UAM_USRAuto_true" value="true" {$UAM_USRAUTO_TRUE} name="UAM_USRAuto" type="radio">
    551581                {'UAM_Enable'|@translate}
    552             <br><br>
    553             </li>
    554 
     582              </label>
     583            </li>
    555584            <ul>
    556585              <li>
     
    558587                  {'UAM_USRAutoDel'|@translate}
    559588                </label>
    560               <br><br>
    561589                <textarea class="uam_textfields" name="UAM_USRAutoDelText" id="UAM_USRAutoDelText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_USRAUTODEL_TEXT}</textarea>
    562               <br><br>
    563590              {if 'FCK_PATH'|@defined}
    564591                <div style="text-align:right;">
     
    567594              {/if}
    568595              </li>
    569 
    570596              <li>
    571597                <label class="cluetip" title="{'UAM_USRAutoMail'|translate}|{'UAM_USRAutoMailTitle_d'|translate}">
    572598                  {'UAM_USRAutoMail'|@translate}
    573599                </label>
    574               <br><br>
    575                 <input type="radio" value="false" {$UAM_USRAUTOMAIL_FALSE} name="UAM_USRAutoMail">
     600                <label for="UAM_USRAutoMail_false"><input id="UAM_USRAutoMail_false" value="false" {$UAM_USRAUTOMAIL_FALSE} name="UAM_USRAutoMail" type="radio">
    576601                  {'UAM_Disable'|@translate}
    577               <br>
    578                 <input type="radio" value="true" {$UAM_USRAUTOMAIL_TRUE} name="UAM_USRAutoMail">
     602                </label>
     603                <label for="UAM_USRAutoMail_true"><input id="UAM_USRAutoMail_true" value="true" {$UAM_USRAUTOMAIL_TRUE} name="UAM_USRAutoMail" type="radio">
    579604                  {'UAM_Enable'|@translate}
    580               <br><br><br>
     605                </label>
    581606              </li>
    582607            </ul>
    583608          </ul>
    584609          </fieldset>
    585 
    586           {if $UAM_CONFIRMMAIL_TIMEOUT_FALSE and $UAM_CONFIRMMAIL_REMAIL_FALSE}
    587             </div>
    588           {/if}
    589 
    590         {if $UAM_CONFIRM_MAIL_FALSE}
    591610          </div>
    592         {/if}
    593 
    594         </ul>
    595       </fieldset>
    596611    </div>
    597612  </div>
    598 
    599613
    600614  <div id="instructionConfig3" class="instructionBlock" >
     
    605619 
    606620    <div id="Config3" class="instructionBlockContent" style="display:none">
    607       <fieldset>
    608621        <ul>
    609622          <li>
     
    611624              {'UAM_GhostTracker'|@translate}
    612625            </label>
    613           <br><br>
    614             <input type="radio" value="false" {$UAM_GHOSTRACKER_FALSE} name="UAM_GhostUser_Tracker">
     626            <label for"UAM_GhostUser_Tracker_false">
     627              <input id="UAM_GhostUser_Tracker_false" type="radio" value="false" {$UAM_GHOSTRACKER_FALSE} name="UAM_GhostUser_Tracker">
    615628              {'UAM_Disable'|@translate}
    616           <br>
    617             <input type="radio" value="true" {$UAM_GHOSTRACKER_TRUE} name="UAM_GhostUser_Tracker">
     629            </label>
     630            <label for"UAM_GhostUser_Tracker_true">
     631              <input id="UAM_GhostUser_Tracker_true" type="radio" value="true" {$UAM_GHOSTRACKER_TRUE} name="UAM_GhostUser_Tracker">
    618632              {'UAM_GhostTracker_true'|@translate}
    619633            <input type="text" name="UAM_GhostTracker_DayLimit" value="{$UAM_GHOSTRACKER_DAYLIMIT}" size="5" style="text-align: center;">
    620           <br><br>
     634            </label>
     635         
    621636          </li>
    622 
    623           <fieldset>
    624           <ul>
    625             <li>
     637        </ul>
     638        <div id="UAM_GHOSTRACKER_OPT" {if $UAM_GHOSTRACKER_FALSE}style="display: none"{/if}>
     639          <a id="show_UAM_GTReminder" >{'UAM_Customize_messagesandmails'|translate}</a>
     640          <a id="hide_UAM_GTReminder" style="display: none">{'hide details'|translate}</a>
     641          <ul id="UAM_GTReminder" style="display: none">
     642            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
     643            <li>
     644            <div class="uam_new">
    626645              <label class="cluetip" title="{'UAM_GTReminder_Subject'|translate}|{'UAM_GTReminder_Subject_d'|translate}">
    627646                {'UAM_GTReminder_Subject'|@translate}
    628647              </label>
    629             <br><br>
     648           
    630649              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_GTReminder_Subject" id="UAM_GTReminder_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_GTREMINDER_SUBJECT}</textarea>
    631             <br><br>
    632             </li>
    633 
    634             <ul>
    635               <li>
    636                 <label class="cluetip" title="{'UAM_GhostTracker_ReminderText'|translate}|{'UAM_gttextTitle_d'|translate}">
    637                   {'UAM_GhostTracker_ReminderText'|@translate}
    638                 </label>
    639               <br><br>
    640                 <textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea>
    641               <br><br>
    642               </li>
    643             </ul>
    644 <!--
     650           
     651            </div>
     652            </li>
     653            <li>
     654              <label class="cluetip" title="{'UAM_GhostTracker_ReminderText'|translate}|{'UAM_gttextTitle_d'|translate}">
     655                {'UAM_GhostTracker_ReminderText'|@translate}
     656              </label>
     657           
     658              <textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea>
     659           
     660            </li>
     661  <!--
    645662            {* if 'FCK_PATH'|@defined *}
    646663              <div style="text-align:right;">
     
    648665              </div>
    649666            {* /if *}
    650 -->
    651 
     667  -->
     668 
     669          </ul>
     670          <br><hr><br>
     671          <ul>
    652672            <li>
    653673              <label class="cluetip" title="{'UAM_GTAuto'|translate}|{'UAM_GTAutoTitle_d'|translate}">
    654674                {'UAM_GTAuto'|@translate}
    655675              </label>
    656             <br><br>
    657               <input type="radio" value="false" {$UAM_GTAUTO_FALSE} name="UAM_GTAuto">
     676           
     677              <label for="UAM_GTAuto_false"><input id="UAM_GTAuto_false" type="radio" value="false" {$UAM_GTAUTO_FALSE} name="UAM_GTAuto">
    658678                {'UAM_Disable'|@translate}
    659             <br>
    660               <input type="radio" value="true" {$UAM_GTAUTO_TRUE} name="UAM_GTAuto">
     679             
     680              <label for="UAM_GTAuto_true"><input id="UAM_GTAuto_true" type="radio" value="true" {$UAM_GTAUTO_TRUE} name="UAM_GTAuto">
    661681                {'UAM_Enable'|@translate}
    662             <br><br>
    663             </li>
    664            
    665             {if $UAM_GTAUTO_FALSE}
    666               <div class="uam_hide">
    667             {/if}
    668                 <ul>
    669                   <li>
    670                     <label class="cluetip" title="{'UAM_GTAutoDelTitle'|translate}|{'UAM_GTAutoDelTitle_d'|translate}">
    671                       {'UAM_GTAutoDel'|@translate}
    672                     </label>
    673                   <br><br>
    674                       <textarea class="uam_textfields" name="UAM_GTAutoDelText" id="UAM_GTAutoDelText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTODEL_TEXT}</textarea>
    675                   <br><br>
     682              </label>
     683           
     684            </li>
     685              <ul id="UAM_GTAUTO" {if $UAM_GTAUTO_FALSE}style="display: none"{/if}>
     686                <li>
     687                  <label class="cluetip" title="{'UAM_GTAutoDelTitle'|translate}|{'UAM_GTAutoDelTitle_d'|translate}">
     688                    {'UAM_GTAutoDel'|@translate}
     689                  </label>
     690               
     691                    <textarea class="uam_textfields" name="UAM_GTAutoDelText" id="UAM_GTAutoDelText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTODEL_TEXT}</textarea>
     692               
     693                   
     694                {if 'FCK_PATH'|@defined}
     695                  <div style="text-align:right;">
     696                    <a href="#" onClick="toogleEditor('UAM_GTAutoDelText'); return false;">FCK Editor On/Off</a>
     697                  </div>
     698                {/if}
     699                </li>
     700 
     701                <li>
     702                  <label class="cluetip" title="{'UAM_GTAutoGp'|translate}|{'UAM_GTAutoGpTitle_d'|translate}">
     703                    {'UAM_GTAutoGp'|@translate}
     704                  </label>
     705               
     706                  <ul>
     707                    <li>
     708                      <label>
     709                        {'UAM_Expired_Group'|@translate}
     710                      </label>
     711                        <div class="uam_leftmargin">
     712                          {html_options name="UAM_Downgrade_Group" options=$Downgrade_Group.group_options selected=$Downgrade_Group.group_selected}
     713                        </div>
     714                   
     715                    </li>
     716 
     717                    <li>
     718                      <label>
     719                        {'UAM_Expired_Status'|@translate}
     720                      </label>
     721                      <div class="uam_leftmargin">
     722                        {html_options name="UAM_Downgrade_Status" options=$Downgrade_Status.Status_options selected=$Downgrade_Status.Status_selected}
     723                      </div>
     724                   
     725                    </li>
     726 
     727                    <li>
     728                      <label>
     729                        {'UAM_Expired_Level'|@translate}
     730                      </label>
     731                      <div class="uam_leftmargin">
     732                        {html_options name="UAM_Downgrade_Level" options=$Downgrade_Level.Level_options selected=$Downgrade_Level.Level_selected}
     733                      </div>
     734                   
     735                    </li>
     736                  </ul>
     737 
     738                  <ul>
     739                    <li>
     740                      <label class="cluetip" title="{'UAM_GTAutoMail'|translate}|{'UAM_GTAutoMailTitle_d'|translate}">
     741                        {'UAM_GTAutoMail'|@translate}
     742                      </label>
     743                   
     744                      <label for="UAM_GTAutoMail_false"><input id="UAM_GTAutoMail_false" value="false" {$UAM_GTAUTOMAIL_FALSE} name="UAM_GTAutoMail" type="radio">
     745                        {'UAM_Disable'|@translate}
     746                      </label>
     747                      <label for="UAM_GTAutoMail_true"><input id="UAM_GTAutoMail_true" value="true" {$UAM_GTAUTOMAIL_TRUE} name="UAM_GTAutoMail" type="radio">
     748                        {'UAM_Enable'|@translate}
     749                      </label>
     750                   
     751                      <li>
     752                        <label class="cluetip" title="{'UAM_GTAutomail_Subject'|translate}|{'UAM_GTAutomail_Subject_d'|translate}">
     753                          {'UAM_GTAutomail_Subject'|@translate}
     754                        </label>
    676755                     
    677                   {if 'FCK_PATH'|@defined}
    678                     <div style="text-align:right;">
    679                       <a href="#" onClick="toogleEditor('UAM_GTAutoDelText'); return false;">FCK Editor On/Off</a>
    680                     </div>
    681                   {/if}
    682                   </li>
    683 
    684                   <li>
    685                     <label class="cluetip" title="{'UAM_GTAutoGp'|translate}|{'UAM_GTAutoGpTitle_d'|translate}">
    686                       {'UAM_GTAutoGp'|@translate}
    687                     </label>
    688                   <br><br>
    689                     <ul>
    690                       <li>
    691                         <label>
    692                           {'UAM_Expired_Group'|@translate}
    693                         </label>
    694                         <br>
    695                           <div id="uam_leftmargin">
    696                             {html_options name="UAM_Downgrade_Group" options=$Downgrade_Group.group_options selected=$Downgrade_Group.group_selected}
    697                           </div>
    698                       <br><br>
     756                        &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_GTAutoMail_Subject" id="UAM_GTAutoMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAIL_SUBJECT}</textarea>
     757                     
    699758                      </li>
    700 
    701                       <li>
    702                         <label>
    703                           {'UAM_Expired_Status'|@translate}
    704                         </label>
    705                       <br>
    706                         <div id="uam_leftmargin">
    707                           {html_options name="UAM_Downgrade_Status" options=$Downgrade_Status.Status_options selected=$Downgrade_Status.Status_selected}
    708                         </div>
    709                       <br><br>
    710                       </li>
    711 
    712                       <li>
    713                         <label>
    714                           {'UAM_Expired_Level'|@translate}
    715                         </label>
    716                       <br>
    717                         <div id="uam_leftmargin">
    718                           {html_options name="UAM_Downgrade_Level" options=$Downgrade_Level.Level_options selected=$Downgrade_Level.Level_selected}
    719                         </div>
    720                       <br><br>
    721                       </li>
    722                     </ul>
    723 
    724                     <ul>
    725                       <li>
    726                         <label class="cluetip" title="{'UAM_GTAutoMail'|translate}|{'UAM_GTAutoMailTitle_d'|translate}">
    727                           {'UAM_GTAutoMail'|@translate}
    728                         </label>
    729                       <br><br>
    730                         <input type="radio" value="false" {$UAM_GTAUTOMAIL_FALSE} name="UAM_GTAutoMail">
    731                           {'UAM_Disable'|@translate}
    732                       <br>
    733                         <input type="radio" value="true" {$UAM_GTAUTOMAIL_TRUE} name="UAM_GTAutoMail">
    734                           {'UAM_Enable'|@translate}
    735                       <br><br>
     759 
     760                      <ul>
     761                        <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
    736762                        <li>
     763                        <div class="uam_new">
    737764                          <label class="cluetip" title="{'UAM_GTAutomail_Subject'|translate}|{'UAM_GTAutomail_Subject_d'|translate}">
    738765                            {'UAM_GTAutomail_Subject'|@translate}
    739766                          </label>
    740                         <br><br>
    741                           &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_GTAutoMail_Subject" id="UAM_GTAutoMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAIL_SUBJECT}</textarea>
    742                         <br><br>
     767                       
     768                          <textarea class="uam_textfields" name="UAM_GTAutoMailText" id="UAM_GTAutoMailText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAILTEXT}</textarea>
     769                       
     770                        </div>
    743771                        </li>
    744 
    745                         <ul>
    746                           <li>
    747                             <label class="cluetip" title="{'UAM_GTAutomail_Text'|translate}|{'UAM_GTAutomail_Text_d'|translate}">
    748                               {'UAM_GTAutomail_Text'|@translate}
    749                             </label>
    750                           <br><br>
    751                             <textarea class="uam_textfields" name="UAM_GTAutoMailText" id="UAM_GTAutoMailText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAILTEXT}</textarea>
    752                           <br><br>
    753                           </li>
    754                         </ul>
    755                       </li>
    756                     </ul>
    757                   </li>
    758                 </ul>
    759             {if $UAM_GTAUTO_FALSE}
    760               </div>
    761             {/if}
     772                      </ul>
     773                    </li>
     774                  </ul>
     775                </li>
     776              </ul>
     777            </ul>
    762778          </ul>
    763           </fieldset>
    764         </ul>
    765       </fieldset>
     779        </div>
    766780    </div>
    767781  </div>
     
    774788 
    775789    <div id="Config5" class="instructionBlockContent" style="display:none">
    776       <fieldset>
    777790        <ul>
    778791          <li>
     
    780793              {'UAM_Mail_Info'|@translate}
    781794            </label>
    782           <br><br>
    783             <input type="radio" value="false" {$UAM_MAIL_INFO_FALSE} name="UAM_Mail_Info">
     795         
     796            <label for="UAM_Mail_Info_false"><input id="UAM_Mail_Info_false" type="radio" value="false" {$UAM_MAIL_INFO_FALSE} name="UAM_Mail_Info">
    784797              {'UAM_Disable'|@translate}
    785           <br>
    786             <input type="radio" value="true" {$UAM_MAIL_INFO_TRUE} name="UAM_Mail_Info">
     798            </label>
     799            <label for="UAM_Mail_Info_true"><input id="UAM_Mail_Info_true" type="radio" value="true" {$UAM_MAIL_INFO_TRUE} name="UAM_Mail_Info">
    787800              {'UAM_Enable'|@translate}
    788           <br><br>
     801            </label>
     802         
    789803          </li>
    790804        </ul>
    791       {if $UAM_MAIL_INFO_FALSE}
    792         <div class="uam_hide">
    793       {/if}
    794 
    795         <fieldset>
     805        <fieldset id="UAM_MAIL_INFO" {if $UAM_MAIL_INFO_FALSE}style="display:none"{/if}>
    796806          <ul>
    797807            <li>
     
    799809                {'UAM_HidePassw'|@translate}
    800810              </label>
    801             <br><br>
    802               <input type="radio" value="false" {$UAM_HIDEPASSW_FALSE} name="UAM_HidePassw">
     811              <label for="UAM_HidePassw_false"><input id="UAM_HidePassw_false" value="false" {$UAM_HIDEPASSW_FALSE} name="UAM_HidePassw" type="radio">
    803812                {'UAM_Disable'|@translate}
    804             <br>
    805               <input type="radio" value="true" {$UAM_HIDEPASSW_TRUE} name="UAM_HidePassw">
     813              </label>
     814              <label for="UAM_HidePassw_true"><input id="UAM_HidePassw_true" value="true" {$UAM_HIDEPASSW_TRUE} name="UAM_HidePassw" type="radio">
    806815                {'UAM_Enable'|@translate}
    807             <br><br>
    808             </li>
    809            
    810             <li>
     816              </label>
     817            </li>
     818            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
     819            <li>
     820            <div class="uam_new">
    811821              <label class="cluetip" title="{'UAM_MailInfo_Subject'|translate}|{'UAM_MailInfo_Subject_d'|translate}">
    812822                {'UAM_MailInfo_Subject'|@translate}
    813823              </label>
    814             <br><br>
     824           
    815825              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_InfoMail_Subject" id="UAM_InfoMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_INFOMAIL_SUBJECT}</textarea>
    816             <br><br>
     826           
     827            </div>
    817828            </li>
    818829
     
    822833                  {'UAM_MailInfo_Text'|@translate}
    823834                </label>
    824               <br><br>
     835             
    825836                <textarea class="uam_textfields" name="UAM_MailInfo_Text" id="UAM_MailInfo_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_MAILINFO_TEXT}</textarea>
    826               <br><br>
     837             
    827838              </li>
    828839            </ul>
     
    836847          </ul>
    837848        </fieldset>
    838 
    839       {if $UAM_MAIL_INFO_FALSE}
    840         </div>
    841       {/if}
    842       </fieldset>
    843 
    844       <fieldset>
    845849        <ul>
    846850          <li>
     
    848852              {'UAM_Tracking registered users'|@translate}
    849853            </label>
    850           <br><br>
    851             <input type="radio" value="false" {$UAM_ADDLASTVISIT_FALSE} name="UAM_Add_LastVisit_Column">
     854         
     855            <label for="UAM_Add_LastVisit_Column_false"><input id="UAM_Add_LastVisit_Column_false" value="false" {$UAM_ADDLASTVISIT_FALSE} name="UAM_Add_LastVisit_Column" type="radio">
    852856              {'UAM_Disable'|@translate}
    853           <br>
    854             <input type="radio" value="true" {$UAM_ADDLASTVISIT_TRUE} name="UAM_Add_LastVisit_Column">
     857            </label>
     858            <label for="UAM_Add_LastVisit_Column_true"><input id="UAM_Add_LastVisit_Column_true" value="true" {$UAM_ADDLASTVISIT_TRUE} name="UAM_Add_LastVisit_Column" type="radio">
    855859              {'UAM_Enable'|@translate}
    856           <br><br>
     860          </label>
    857861          </li>
    858 
    859862          <li>
    860863            <label class="cluetip" title="{'UAM_RedirToProfile'|translate}|{'UAM_RedirTitle_d'|translate}">
    861864              {'UAM_RedirToProfile'|@translate}
    862865            </label>
    863           <br><br>
    864             <input type="radio" value="false" {$UAM_REDIRTOPROFILE_FALSE} name="UAM_RedirToProfile">
     866         
     867            <label for="UAM_RedirToProfile_false"><input id="UAM_RedirToProfile_false" value="false" {$UAM_REDIRTOPROFILE_FALSE} name="UAM_RedirToProfile" type="radio">
    865868              {'UAM_Disable'|@translate}
    866           <br>
    867             <input type="radio" value="true" {$UAM_REDIRTOPROFILE_TRUE} name="UAM_RedirToProfile">
     869            </label>
     870            <label for="UAM_RedirToProfile_true"><input id="UAM_RedirToProfile_true" value="true" {$UAM_REDIRTOPROFILE_TRUE} name="UAM_RedirToProfile" type="radio">
    868871              {'UAM_Enable'|@translate}
    869           <br><br>
     872            </label>
     873         
    870874          </li>
    871875
     
    874878              {'UAM_PwdReset'|@translate}
    875879            </label>
    876           <br><br>
    877             <input type="radio" value="false" {$UAM_PWDRESET_FALSE} name="UAM_PwdReset">
     880         
     881            <label for="UAM_PwdReset_false"><input id="UAM_PwdReset_false" value="false" {$UAM_PWDRESET_FALSE} name="UAM_PwdReset" type="radio">
    878882              {'UAM_Disable'|@translate}
    879           <br>
    880             <input type="radio" value="true" {$UAM_PWDRESET_TRUE} name="UAM_PwdReset">
     883            </label>
     884            <label for="UAM_PwdReset_true"><input id="UAM_PwdReset_true" value="true" {$UAM_PWDRESET_TRUE} name="UAM_PwdReset" type="radio">
    881885              {'UAM_Enable'|@translate}
    882           <br><br>
     886            </label>
     887         
    883888          </li>
    884889        </ul>
    885       </fieldset>
    886 
    887       <fieldset>
    888890        <ul>
    889891          <li>
     
    891893              {'UAM_CustomPasswRetr'|@translate}
    892894            </label>
    893           <br><br>
    894             <input type="radio" value="false" {$UAM_CUSTOMPASSWRETR_FALSE} name="UAM_CustomPasswRetr">
     895         
     896            <label for="UAM_CustomPasswRetr_false"><input id="UAM_CustomPasswRetr_false" value="false" {$UAM_CUSTOMPASSWRETR_FALSE} name="UAM_CustomPasswRetr" type="radio">
    895897              {'UAM_Disable'|@translate}
    896           <br>
    897             <input type="radio" value="true" {$UAM_CUSTOMPASSWRETR_TRUE} name="UAM_CustomPasswRetr">
     898</label>
     899            <label for="UAM_CustomPasswRetr_true"><input id="UAM_CustomPasswRetr_true" value="true" {$UAM_CUSTOMPASSWRETR_TRUE} name="UAM_CustomPasswRetr" type="radio">
    898900              {'UAM_Enable'|@translate}
    899           <br><br><br>
     901</label>
    900902            <textarea class="uam_textfields" name="UAM_CustomPasswRetr_Text" id="UAM_CustomPasswRetr_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CUSTOMPASSWRETR_TEXT}</textarea>
    901           <br><br>
     903         
    902904          </li>
    903905        </ul>
    904       </fieldset>
    905906    </div>
    906907  </div>
     
    923924    {'UAM_Dump_Download'|@translate}&nbsp;
    924925      <input type="checkbox" name="dump_download" value="true" {$UAM_DUMP_DOWNLOAD}>
    925   <br><br>
     926 
    926927      <input class="submit" type="submit" value="{'UAM_Save'|@translate}" name="save" {$TAG_INPUT_ENABLED}>
    927928  </p>
     
    931932<form method="post" action="" class="general">
    932933  <p>
    933     {'UAM_Restore'|@translate}<br><br>
     934    {'UAM_Restore'|@translate}
    934935      <input class="submit" type="submit" value="{'UAM_Restore_File'|@translate}" name="restore" {$TAG_INPUT_ENABLED}>
    935936  </p>
     
    977978</fieldset>
    978979
    979 <script type="text/javascript">
     980{footer_script}{literal}
    980981  var n1=document.getElementById("nb_para").value;
    981982  var n2=document.getElementById("nb_para2").value;
    982983   uam_blockToggleDisplay(n1,n2);
    983 </script>
     984{/literal}{/footer_script}
    984985
    985986{html_head}
  • extensions/UserAdvManager/branches/2.40/admin/template/uam.css

    r12661 r18482  
    11/* UAM instructions */
    2 #uam_leftmargin
     2li {
     3  margin-bottom: 15px;
     4}
     5
     6label {
     7    cursor: pointer;
     8    display: list-item;
     9    list-style: none outside none;
     10}
     11.uam_leftmargin
    312{
    413  margin-left: 2em
     
    3948label.cluetip
    4049{
    41   font-weight:bold;
     50  display: block;
     51  font-weight: bold;
     52  margin-bottom: 5px;
    4253}
    4354
  • extensions/UserAdvManager/branches/2.40/admin/template/usermanager.tpl

    r18160 r18482  
    9696{if $CONFIRM_LOCAL == "local"}
    9797  <input class="submit" type="submit" value="{'UAM_Delete_selected'|@translate}" name="Del_Selected">
    98   <input class="submit" type="submit" value="{'UAM_Manual_Validation'|@translate}" name="Manual_Validation">
     98  <input class="submit" type="submit" value="{'UAM_Force_Validation'|@translate}" name="Force_Validation">
    9999{else}
    100100  <input class="submit" type="submit" value="{'UAM_Delete_selected'|@translate}" name="Del_Selected">
    101101  <input class="submit" type="submit" value="{'UAM_Mail_without_key'|@translate}" name="Mail_Without_Key">
    102102  <input class="submit" type="submit" value="{'UAM_Mail_with_key'|@translate}" name="Mail_With_Key">
    103   <input class="submit" type="submit" value="{'UAM_Manual_Validation'|@translate}" name="Manual_Validation">
     103  <input class="submit" type="submit" value="{'UAM_Force_Validation'|@translate}" name="Force_Validation">
    104104{/if}
    105105</p>
  • extensions/UserAdvManager/branches/2.40/changelog.txt.php

    r18160 r18482  
    300300            Bug 2740 fixed - Loggin rejection on unvalidated user connection does not work
    301301
    302 -- 2.30.9 : Bug 2744 fixed - User connexion rejection does not work if no group/status/privacy is set
    303 
    304302**************************************************************
    305303***** Plugin history (branch 2.40 - Piwigo 2.4 compliant)*****
     
    339337            Update es_ES, thanks to : jpr928
    340338            Update it_IT, thanks to : Ericnet and virgigiole
    341 
    342 -- 2.40.6 : Bug 2744 fixed - User connexion rejection does not work if no group/status/privacy is set
    343                                                       Bug 2749 fixed - regex meta-characters are usable in character exclusion in usernames
    344             New unvalidated user controls more efficient
    345             Get admins emails instead of webmaster's for sending validation email
    346             TODO - New simplifed administration panel
    347339*/
    348340?>
  • extensions/UserAdvManager/branches/2.40/include/functions.inc.php

    r18160 r18482  
    1919  array_push($menu,
    2020    array(
    21                 'NAME' => $name,
    22                 'URL' => get_root_url().'admin.php?page=plugin-'.basename(UAM_PATH)
     21      'NAME' => $name,
     22      'URL' => get_root_url().'admin.php?page=plugin-'.basename(UAM_PATH)
    2323    )
    2424  );
     
    3636{
    3737  global $conf, $page;
    38  
    39   $conf_UAM = unserialize($conf['UserAdvManager']);
    4038 
    4139  // Check mandatory email address for email exclusion
     40  $conf_UAM = unserialize($conf['UserAdvManager']);
    4241  if (!$conf['obligatory_user_mail_address'] and $conf_UAM[10] = 'true')
    4342  {
     
    5251 * Initiating GhostTracker - Perform user logout after registration if not validated
    5352 */
    54 function UAM_Init()
     53function UAM_GhostTracker()
    5554{
    5655  global $conf, $user;
     
    6766    {
    6867
    69                                                 $userid = get_userid($user['username']);
     68      $userid = get_userid($user['username']);
    7069         
    7170      // Looking for existing entry in last visit table
     
    102101      }
    103102    }
    104 
    105     // Perform user logout after registration if not validated
    106     if ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster() )
    107     {
    108       invalidate_user_cache();
    109       logout_user();
    110       if ( $conf['guest_access'] )
    111       {
    112         redirect( make_index_url().'?UAM_msg=rejected', 0);
    113       }
    114       else
    115       {
    116         redirect( get_root_url().'identification.php?UAM_msg=rejected' , 0);
    117       }
    118     }
     103  }
     104
     105  // Perform user logout after registration if not validated
     106  if ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']))
     107  {
     108    invalidate_user_cache();
     109    logout_user();
     110    redirect(UAM_PATH.'rejected.php');
    119111  }
    120112}
     
    143135      // ----------------------------------------------------------------------------------------------
    144136      SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation
    145      
    146       // This is to set UAM_validated field to false in #_users table - Usefull if no "waiting" group or status is set
    147       // -------------------------------------------------------------------------------------------------------------
    148       SetUnvalidated($register_user['id']);
    149 
    150       // This is to send the validation key by email to admins for their manual validation without having to connect the gallery
    151       // -----------------------------------------------------------------------------------------------------------------------
    152       SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true);
    153137    }
    154138    // Sending registration confirmation by email
     
    277261      $user_idsOK[] = $user['id'];
    278262
    279       $query = '
    280 UPDATE '.CONFIG_TABLE.'
    281 SET value = "'.implode(',', $user_idsOK).'"
    282 WHERE param = "UserAdvManager_Redir";';
     263      $query = "
     264UPDATE ".CONFIG_TABLE."
     265SET value = \"".implode(',', $user_idsOK)."\"
     266WHERE param = 'UserAdvManager_Redir';";
    283267         
    284268      pwg_query($query);
     
    333317    if (!empty($_POST['use_new_pwd']))
    334318    {
    335       $typemail = 2; // Confirmation email on user profile update - With information email
     319      $typemail = 2; // Confirmation email on user profile update - With information email if checked
    336320
    337321      // Password enforcement control
     
    372356        {
    373357          SetPermission($user['id']);// Set to "waiting" group or status until user validation
    374           SetUnvalidated($user['id']); // Set UAM_validated field to false in #_users table
    375358          $confirm_mail_need = true;
    376359        }
     
    381364        {
    382365          SetPermission($user['id']);// Set to "waiting" group or status until admin validation
    383           SetUnvalidated($user['id']); // Set UAM_validated field to false in #_users table
    384366          $confirm_mail_need = false;
    385367        }       
     
    473455    }
    474456  }
    475   elseif ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster())
     457  elseif ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']))
    476458  {
    477459    // Logged-in user cleanup, session destruction and redirected to custom page
     
    479461    invalidate_user_cache();
    480462    logout_user();
    481     if ( $conf['guest_access'] )
    482     {
    483       redirect( make_index_url().'?UAM_msg=rejected', 0);
    484     }
    485     else
    486     {
    487       redirect( get_root_url().'identification.php?UAM_msg=rejected' , 0);
    488     }
     463    redirect(UAM_PATH.'rejected.php');
    489464  }
    490465}
     
    537512  }
    538513
    539   // Auto group, status or privacy level downgrade and autodeletion if user already reminded
    540   // ---------------------------------------------------------------------------------------
     514  // GhostTracker auto group, status or privacy level downgrade with or without information email sending and autodeletion if user already reminded
     515  // ----------------------------------------------------------------------------------------------------------------------------------------------
    541516  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)))
    542517  {
    543518    if (count($collection) > 0)
    544          {
     519        {
    545520      // Process if a non-admin nor webmaster user is logged
    546521      // ---------------------------------------------------
    547522      if (in_array($user['id'], $collection))
    548                         {
     523        {
    549524        // Check lastvisit reminder state
    550525        // ------------------------------
     
    577552          invalidate_user_cache();
    578553          logout_user();
    579           redirect(UAM_PATH.'GT_del_account.php');
    580         }
    581                 }
     554          redirect(make_index_url().'?UAM_msg=deleted', 0);
     555        }
     556        }
    582557      else // Process if an admin or webmaster user is logged
    583558      {
     
    610585            list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    611586
    612                         $query = '
    613 UPDATE '.USER_LASTVISIT_TABLE.'
    614 SET lastvisit="'.$dbnow.'"
    615 WHERE user_id = '.$user_id.'
    616 ;';
     587                        $query = "
     588UPDATE ".USER_LASTVISIT_TABLE."
     589SET lastvisit='".$dbnow."'
     590WHERE user_id = '".$user_id."'
     591;";
    617592            pwg_query($query);
    618593
     
    621596            // Delete user from all groups
    622597            // ---------------------------
    623             if ($conf_UAM[2] <> -1 and $conf_UAM[3] <> -1)
    624             {
    625                         $query = '
    626 DELETE FROM '.USER_GROUP_TABLE.'
    627 WHERE user_id = '.$user_id.'
     598            $query = "
     599DELETE FROM ".USER_GROUP_TABLE."
     600WHERE user_id = '".$user_id."'
    628601  AND (
    629     group_id = '.$conf_UAM[2].'
     602    group_id = '".$conf_UAM[2]."'
    630603  OR
    631     group_id = '.$conf_UAM[3].'
     604    group_id = '".$conf_UAM[3]."'
    632605  )
    633 ;';
    634                         pwg_query($query);
    635                                                                                                 }
     606;";
     607            pwg_query($query);
    636608
    637609            // Change user status
     
    639611            if ($conf_UAM[26] <> -1)
    640612            {
    641               $query = '
    642 UPDATE '.USER_INFOS_TABLE.'
    643 SET status = "'.$conf_UAM[26].'"
    644 WHERE user_id = '.$user_id.'
    645 ;';
     613              $query = "
     614UPDATE ".USER_INFOS_TABLE."
     615SET status = '".$conf_UAM[26]."'
     616WHERE user_id = '".$user_id."'
     617;";
    646618              pwg_query($query);
    647619            }
     
    651623            if ($conf_UAM[25] <> -1)
    652624            {
    653               $query = '
    654 INSERT INTO '.USER_GROUP_TABLE.'
     625              $query = "
     626INSERT INTO ".USER_GROUP_TABLE."
    655627  (user_id, group_id)
    656628VALUES
    657   ('.$user_id.', "'.$conf_UAM[25].'")
    658 ;';
     629  ('".$user_id."', '".$conf_UAM[25]."')
     630;";
    659631              pwg_query($query);
    660632            }
     
    664636            if ($conf_UAM[37] <> -1)
    665637            {
    666               $query = '
    667 UPDATE '.USER_INFOS_TABLE.'
    668 SET level = "'.$conf_UAM[37].'"
    669 WHERE user_id = '.$user_id.'
    670 ;';
     638              $query = "
     639UPDATE ".USER_INFOS_TABLE."
     640SET level = '".$conf_UAM[37]."'
     641WHERE user_id = '".$user_id."'
     642;";
    671643              pwg_query($query);
    672644            }
     
    678650              // Set reminder true
    679651              // -----------------
    680               $query = '
    681 UPDATE '.USER_LASTVISIT_TABLE.'
    682 SET reminder = "true"
    683 WHERE user_id = '.$user_id.'
    684 ;';
     652              $query = "
     653UPDATE ".USER_LASTVISIT_TABLE."
     654SET reminder = 'true'
     655WHERE user_id = '".$user_id."'
     656;";
    685657              pwg_query($query);
    686658           
    687659              // Reset confirmed user status to unvalidated
    688660              // ------------------------------------------
    689                                                                                                 $query = '
     661                                                  $query = '
    690662UPDATE '.USER_CONFIRM_MAIL_TABLE.'
    691663SET date_check = NULL
    692 WHERE user_id = '.$user_id.'
     664WHERE user_id = "'.$user_id.'"
    693665;';
    694                                                                                                 pwg_query($query);
     666                                                  pwg_query($query);
    695667
    696668              // Get users information for email notification
    697669              // --------------------------------------------
    698                                                                                                 $query = '
     670                                                  $query = '
    699671SELECT id, username, mail_address
    700672FROM '.USERS_TABLE.'
    701673WHERE id = '.$user_id.'
    702674;';
    703                                                                                                 $data = pwg_db_fetch_assoc(pwg_query($query));
     675                                                  $data = pwg_db_fetch_assoc(pwg_query($query));
    704676           
    705677              demotion_mail($user_id, $data['username'], $data['mail_address']);
     
    753725  {
    754726    if (count($collection) > 0)
    755                 {
     727        {
    756728      // Process if a non-admin nor webmaster user is logged
    757729      // ---------------------------------------------------
    758730      if (in_array($user['id'], $collection))
    759                 {
     731        {
    760732        // Check ConfirmMail reminder state
    761733        // --------------------------------
     
    780752        if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true')
    781753        {
    782                         $typemail = 1;
     754                  $typemail = 1;
    783755         
    784           // Get current user informations
    785           // -----------------------------
    786           $query = '
     756          // Get current user information
     757          // ----------------------------
     758          $query = "
    787759SELECT id, username, mail_address
    788 FROM '.USERS_TABLE.'
    789 WHERE id = '.$user['id'].'
    790 ;';
     760FROM ".USERS_TABLE."
     761WHERE id = '".$user['id']."'
     762;";
    791763          $data = pwg_db_fetch_assoc(pwg_query($query));
    792764
     
    805777          invalidate_user_cache();
    806778          logout_user();
    807           redirect(UAM_PATH.'USR_del_account.php');
    808         }
    809                 }
     779          redirect(make_index_url().'?UAM_msg=deleted', 0);
     780        }
     781        }
    810782      else // Process if an admin or webmaster user is logged
    811783      {
     
    836808            $typemail = 1;
    837809         
    838             // Get current user informations
    839             // -----------------------------
    840             $query = '
     810            // Get current user information
     811            // ----------------------------
     812            $query = "
    841813SELECT id, username, mail_address
    842 FROM '.USERS_TABLE.'
    843 WHERE id = '.$user_id.'
    844 ;';
     814FROM ".USERS_TABLE."
     815WHERE id = '".$user_id."'
     816;";
    845817            $data = pwg_db_fetch_assoc(pwg_query($query));
    846818
     
    887859    }
    888860  }
     861  if( isset($_GET['UAM_msg']))
     862  {
     863    UAM_DisplayMsg();
     864  }
     865  elseif (isset($_GET['key']) and isset($_GET['userid']))
     866  {
     867    UAM_ConfirmMail();
     868  }
     869
    889870}
    890871
     
    892873 * Triggered on init
    893874 *
    894  * Display a message according to $_GET['UAM_msg']
    895  */
    896 function UAM_DisplayMsg()
    897 {
    898   if( isset($_GET['UAM_msg']))
    899   {
     875 * Check the key and display a message
     876 */
     877function UAM_ConfirmMail()
     878{
     879
     880  if (isset($_GET['key']) and isset($_GET['userid']))
     881  {
     882 
    900883    global $user, $lang, $conf, $page;
     884   
     885    $key = $_GET['key'];
     886    $userid = $_GET['userid'];
     887   
     888    $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
    901889    $conf_UAM = unserialize($conf['UserAdvManager']);
    902    
    903     if (isset($conf_UAM[40]) and $conf_UAM[40] <> '' and $_GET['UAM_msg']="rejected")
    904     {
    905       // Management of Extension flags ([mygallery], [myurl])
    906       // ---------------------------------------------------
    907       $patterns[] = '#\[mygallery\]#i';
    908       $replacements[] = $conf['gallery_title'];
    909       $patterns[] = '#\[myurl\]#i';
    910       $replacements[] = get_gallery_home_url();
    911    
    912       if (function_exists('get_user_language_desc'))
    913       {
    914         $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[40]));
    915       }
    916       else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[40]));
    917       $page["errors"][]=$custom_text;
    918     }
    919   }
    920 }
    921 
     890 
     891    $query = '
     892  SELECT '.USERS_TABLE.'.username
     893  FROM '.USERS_TABLE.'
     894  WHERE ('.USERS_TABLE.'.id ='.$userid.')
     895  ;';
     896    $result = pwg_db_fetch_assoc(pwg_query($query));
     897 
     898    if (VerifyConfirmMail($key))
     899    {
     900      if (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')
     901      {
     902        validation_mail($userid);
     903      }
     904  // We have to get the user's language in database
     905  // ----------------------------------------------
     906      $query = '
     907  SELECT language
     908  FROM '.USER_INFOS_TABLE.'
     909  WHERE '.USER_INFOS_TABLE.'.user_id ='.$userid.'
     910  ;';
     911      $data = pwg_db_fetch_assoc(pwg_query($query));
     912 
     913  // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language
     914  // -------------------------------------------------------------------------------------------------------------------------------
     915      if (empty($data))
     916      {
     917  // And switch gallery to this language before using personalized and multilangual contents
     918  // ---------------------------------------------------------------------------------------
     919        $language = pwg_get_session_var('lang_switch', $user['language']);
     920        switch_lang_to($language);
     921      }
     922      else
     923      {
     924  // And switch gallery to this language before using personalized and multilangual contents
     925  // ---------------------------------------------------------------------------------------
     926        switch_lang_to($data['language']);
     927        load_language('plugin.lang', UAM_PATH);
     928      }
     929 
     930      if (isset($conf_UAM_ConfirmMail[5]) and !empty($conf_UAM_ConfirmMail[5]))
     931      {
     932        // Management of Extension flags ([username], [mygallery], [myurl])
     933        // ----------------------------------------------------------------
     934        $patterns[] = '#\[username\]#i';
     935        $replacements[] = $result['username'];
     936        $patterns[] = '#\[mygallery\]#i';
     937        $replacements[] = $conf['gallery_title'];
     938        $patterns[] = '#\[myurl\]#i';
     939        $replacements[] = get_gallery_home_url();
     940 
     941        if (function_exists('get_user_language_desc'))
     942        {
     943          $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[5]));
     944        }
     945        else
     946        {
     947          $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[5]));
     948        }
     949        $page['infos'][]=$custom_text;
     950        //print_r($custom_text);
     951      }
     952      //log_user($userid, true);
     953    } 
     954    else
     955    {
     956      if (isset($conf_UAM_ConfirmMail[6]) and !empty($conf_UAM_ConfirmMail[6]))
     957      {
     958        // Management of Extension flags ([username], [mygallery], [myurl])
     959        // ----------------------------------------------------------------
     960        $patterns[] = '#\[username\]#i';
     961        $replacements[] = $result['username'];
     962        $patterns[] = '#\[mygallery\]#i';
     963        $replacements[] = $conf['gallery_title'];
     964        $patterns[] = '#\[myurl\]#i';
     965        $replacements[] = get_gallery_home_url();
     966     
     967        if (function_exists('get_user_language_desc'))
     968        {
     969          $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[6]));
     970        }
     971        else
     972        {
     973          $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[6]));
     974        }
     975       
     976        $page['errors'][]=$custom_text;
     977      }
     978    }
     979  }
     980}
    922981/**
    923982 * Triggered on render_lost_password_mail_content
     
    9641023
    9651024  $conf_UAM = unserialize($conf['UserAdvManager']);
    966 
    967                 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    968 
    969                 $infos1_perso = "";
     1025 
     1026        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     1027 
     1028        $infos1_perso = "";
    9701029  $infos2_perso = "";
    9711030  $subject = "";
     
    10011060  {
    10021061    case 1: // Confirmation email on user registration - Without information email (already managed by Piwigo)
    1003       if (isset($conf_UAM[41]) and $conf_UAM[41] <> '')
     1062      if (isset($conf_UAM[41]) and !empty($conf_UAM[41]))
    10041063      {
    10051064        // Management of Extension flags ([username], [mygallery])
     
    10191078      break;
    10201079     
    1021     case 2: // Confirmation email on user profile update - With information email if modification done in user profile
    1022       if (isset($conf_UAM[41]) and $conf_UAM[41] <> '')
     1080    case 2: // Confirmation email on user profile update - With information email if checked
     1081      if (isset($conf_UAM[41]) and !empty($conf_UAM[41]))
    10231082      {
    10241083        // Management of Extension flags ([username], [mygallery])
     
    10361095      }
    10371096
    1038       $password = $password <> '' ? $password : l10n('UAM_empty_pwd');
    1039 
    1040       if (isset($conf_UAM[8]) and $conf_UAM[8] <> '')
     1097      $password = !empty($password) ? $password : l10n('UAM_empty_pwd');
     1098
     1099      if (isset($conf_UAM[8]) and !empty($conf_UAM[8]))
    10411100      {
    10421101        // Management of Extension flags ([username], [mygallery], [myurl])
     
    10821141       
    10831142    case 3: // Only information email send to user if checked
    1084       if (isset($conf_UAM[43]) and $conf_UAM[43] <> '')
     1143      if (isset($conf_UAM[43]) and !empty($conf_UAM[43]))
    10851144      {
    10861145        // Management of Extension flags ([username], [mygallery])
     
    10981157      }
    10991158
    1100       $password = $password <> '' ? $password : l10n('UAM_no_update_pwd');
    1101 
    1102       if (isset($conf_UAM[8]) and $conf_UAM[8] <> '')
     1159      $password = !empty($password) ? $password : l10n('UAM_no_update_pwd');
     1160
     1161      if (isset($conf_UAM[8]) and !empty($conf_UAM[8]))
    11031162      {
    11041163        // Management of Extension flags ([username], [mygallery], [myurl])
     
    11441203  }
    11451204
    1146   if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and $confirm) // Add confirmation link ?
     1205  if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) // Add confirmation link ?
    11471206  {
    11481207    $infos2 = array
     
    11521211    );
    11531212
    1154     if (isset($conf_UAM[9]) and $conf_UAM[9] <> '') // Add personal text in confirmation email ?
     1213    if (isset($conf_UAM[9]) and !empty($conf_UAM[9])) // Add personal text in confirmation email ?
    11551214    {
    11561215      // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
     
    11791238// Sending the email with subject and contents
    11801239// -------------------------------------------
    1181                 if (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')
    1182                 {
    1183                 switch_lang_to(get_default_language());
    1184                
    1185                 load_language('plugin.lang', UAM_PATH);
    1186                 $subject = get_l10n_args('UAM_Subject admin validation for %s',$username);
    1187 
    1188                   $content = array(
    1189                 get_l10n_args('UAM_Manual_validation_needed_for %s', stripslashes($username)),
    1190     get_l10n_args('', ''),
    1191     get_l10n_args('UAM_Link: %s', AddConfirmMail($id, $email)),
    1192     );
    1193 
    1194     UAM_mail_notification_admins($subject, $content);
    1195                 }
    1196                 else
    1197                 {
    1198                 pwg_mail($email, array(
    1199                 'subject' => $subject,
    1200                 'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
    1201                 ));
    1202                 }
     1240  pwg_mail($email, array(
     1241    'subject' => $subject,
     1242    'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
     1243  ));
     1244
    12031245// Switching back to default language
    12041246// ----------------------------------
     
    12081250
    12091251/**
    1210  * Function called from SendMail2User in functions.inc.php to notify admins on user registration validation with validation key
    1211  *
    1212  * @param:
    1213  *   - keyargs_subject: mail subject on l10n_args format
    1214  *   - keyargs_content: mail content on l10n_args format
    1215  *
    1216  * @return boolean (Ok or not)
    1217  */
    1218 function UAM_mail_notification_admins($keyargs_subject, $keyargs_content)
    1219 {
    1220   global $conf, $user;
    1221  
    1222   // Check arguments
    1223   if (empty($keyargs_subject) or empty($keyargs_content))
    1224   {
    1225     return false;
    1226   }
    1227 
    1228   $return = true;
    1229 
    1230   $admins = array();
    1231 
    1232   $query = '
    1233 SELECT
    1234     u.'.$conf['user_fields']['username'].' AS username,
    1235     u.'.$conf['user_fields']['email'].' AS mail_address
    1236   FROM '.USERS_TABLE.' AS u
    1237     JOIN '.USER_INFOS_TABLE.' AS i ON i.user_id =  u.'.$conf['user_fields']['id'].'
    1238   WHERE i.status in (\'webmaster\',  \'admin\')
    1239     AND '.$conf['user_fields']['email'].' IS NOT NULL
    1240     AND i.user_id <> '.$user['id'].'
    1241   ORDER BY username
    1242 ;';
    1243 
    1244   $datas = pwg_query($query);
    1245   if (!empty($datas))
    1246   {
    1247     while ($admin = pwg_db_fetch_assoc($datas))
    1248     {
    1249       if (!empty($admin['mail_address']))
    1250       {
    1251         array_push($admins, format_email($admin['username'], $admin['mail_address']));
    1252       }
    1253     }
    1254   }
    1255 
    1256   if (count($admins) > 0)
    1257   {
    1258     $content = l10n_args($keyargs_content)."\n";
    1259 
    1260     $return = pwg_mail(
    1261       implode(', ', $admins),
    1262       array(
    1263         'subject' => '['.$conf['gallery_title'].'] '.l10n_args($keyargs_subject),
    1264         'content' => $content,
    1265         'content_format' => 'text/plain',
    1266         'email_format' => 'text/plain',
    1267         )
    1268       );
    1269   }
    1270 
    1271   return $return;
    1272 }
    1273 
    1274 
    1275 /**
    12761252 * Function called from UAM_admin.php to resend validation email with or without new validation key
    12771253 *
     
    12891265  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
    12901266 
    1291                 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     1267        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    12921268 
    12931269// We have to get the user's language in database
     
    13101286  {
    13111287    case 1: //Generating email content for remind with a new key
    1312       if (isset($conf_UAM[42]) and $conf_UAM[42] <> '')
     1288      if (isset($conf_UAM[42]) and !empty($conf_UAM[42]))
    13131289      {
    13141290        // Management of Extension flags ([username], [mygallery])
     
    13261302      }
    13271303     
    1328       if (isset($conf_UAM_ConfirmMail[2]) and $conf_UAM_ConfirmMail[2] <> '' and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm)
    1329       {
    1330                 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
     1304      if (isset($conf_UAM_ConfirmMail[2]) and !empty($conf_UAM_ConfirmMail[2]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm)
     1305      {
     1306        // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
    13311307        // -------------------------------------------------------------------------
    13321308        $patterns[] = '#\[username\]#i';
     
    13541330          get_l10n_args('', ''),
    13551331        );       
    1356                                                 }
     1332                        }
    13571333
    13581334// Set reminder true
    13591335// -----------------     
    1360       $query = '
    1361 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
    1362 SET reminder = "true"
    1363 WHERE user_id = '.$user_id.'
    1364 ;';
     1336      $query = "
     1337UPDATE ".USER_CONFIRM_MAIL_TABLE."
     1338SET reminder = 'true'
     1339WHERE user_id = '".$user_id."'
     1340;";
    13651341      pwg_query($query);
    13661342     
    1367                                 break;
     1343                break;
    13681344     
    13691345    case 2: //Generating email content for remind without a new key
    1370       if (isset($conf_UAM[42]) and $conf_UAM[42] <> '')
     1346      if (isset($conf_UAM[42]) and !empty($conf_UAM[42]))
    13711347      {
    13721348        // Management of Extension flags ([username], [mygallery])
     
    13841360      }
    13851361     
    1386       if (isset($conf_UAM_ConfirmMail[4]) and $conf_UAM_ConfirmMail[4] <> '' and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and !$confirm)
     1362      if (isset($conf_UAM_ConfirmMail[4]) and !empty($conf_UAM_ConfirmMail[4]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and !$confirm)
    13871363      {
    13881364        // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
     
    14101386// Set reminder true
    14111387// -----------------
    1412       $query = '
    1413 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
    1414 SET reminder = "true"
    1415 WHERE user_id = '.$user_id.'
    1416 ;';
     1388      $query = "
     1389UPDATE ".USER_CONFIRM_MAIL_TABLE."
     1390SET reminder = 'true'
     1391WHERE user_id = '".$user_id."'
     1392;";
    14171393      pwg_query($query);
    14181394     
     
    14251401  ));
    14261402
    1427                 // Switching back to default language
    1428                 // ----------------------------------
    1429                 switch_lang_back();
     1403// Switching back to default language
     1404// ----------------------------------
     1405switch_lang_back();
    14301406}
    14311407
     
    14441420  $subject = "";
    14451421 
    1446                 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     1422        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    14471423
    14481424// We have to get the user's language in database
     
    14621438  load_language('plugin.lang', UAM_PATH);
    14631439
    1464   if (isset($conf_UAM[45]) and $conf_UAM[45] <> '')
     1440  if (isset($conf_UAM[45]) and !empty($conf_UAM[45]))
    14651441  {
    14661442    // Management of Extension flags ([username], [mygallery])
     
    14781454  }
    14791455
    1480   if (isset($conf_UAM[17]) and $conf_UAM[17] <> '' and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')
     1456  if (isset($conf_UAM[17]) and !empty($conf_UAM[17]) and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')
    14811457  {
    14821458    // Management of Extension flags ([username], [mygallery], [myurl], [days])
     
    15081484  ));
    15091485
    1510                 // Switching back to default language
    1511                 // ----------------------------------
    1512                 switch_lang_back();
     1486// Switching back to default language
     1487// ----------------------------------
     1488switch_lang_back();
    15131489}
    15141490
     
    15261502  $conf_UAM = unserialize($conf['UserAdvManager']);
    15271503 
    1528                 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    1529  
    1530                 $custom_txt = "";
    1531                 $subject = "";
     1504        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     1505 
     1506        $custom_txt = "";
     1507  $subject = "";
    15321508
    15331509// We have to get the user's language in database
    15341510// ----------------------------------------------
    1535   $query = '
     1511  $query ='
    15361512SELECT user_id, language
    15371513FROM '.USER_INFOS_TABLE.'
     
    15581534  }
    15591535
    1560   if (isset($conf_UAM[44]) and $conf_UAM[44] <> '')
     1536  if (isset($conf_UAM[44]) and !empty($conf_UAM[44]))
    15611537  {
    15621538    // Management of Extension flags ([username], [mygallery])
     
    15741550  }
    15751551     
    1576   if (isset($conf_UAM[24]) and $conf_UAM[24] <> '')
     1552  if (isset($conf_UAM[24]) and !empty($conf_UAM[24]))
    15771553  {
    15781554    // Management of Extension flags ([username], [mygallery], [myurl])
     
    16131589  ));
    16141590
    1615                 // Switching back to default language
    1616                 // ----------------------------------
    1617                 switch_lang_back();
     1591// Switching back to default language
     1592// ----------------------------------
     1593switch_lang_back();
    16181594}
    16191595
     
    16311607  $conf_UAM = unserialize($conf['UserAdvManager']);
    16321608 
    1633                 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    1634  
    1635                 $custom_txt = "";
     1609        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     1610 
     1611        $custom_txt = "";
    16361612  $subject = "";
    16371613
     
    16721648  $result = pwg_db_fetch_assoc(pwg_query($query));
    16731649
    1674   if (isset($conf_UAM[46]) and $conf_UAM[46] <> '')
     1650  if (isset($conf_UAM[46]) and !empty($conf_UAM[46]))
    16751651  {
    16761652    // Management of Extension flags ([username], [mygallery])
     
    16851661      $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[46]))."\n\n";
    16861662    }
    1687     else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[46]))."\n\n";
     1663    else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[46]))."\n\n"; 
    16881664  }
    16891665     
    1690   if (isset($conf_UAM[27]) and $conf_UAM[27] <> '')
     1666  if (isset($conf_UAM[27]) and !empty($conf_UAM[27]))
    16911667  {
    16921668    // Management of Extension flags ([username], [mygallery], [myurl])
     
    16981674    $patterns[] = '#\[myurl\]#i';
    16991675    $replacements[] = get_gallery_home_url();
     1676
    17001677    if (function_exists('get_user_language_desc'))
    17011678    {
    17021679      $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[27]))."\n\n";
    17031680    }
    1704     else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[27]))."\n\n";
     1681    else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[27]))."\n\n"; 
    17051682  }
    17061683
     
    17181695  ));
    17191696
    1720                 // Switching back to default language
    1721                 // ----------------------------------
    1722                 switch_lang_back();
     1697// Switching back to default language
     1698// ----------------------------------
     1699switch_lang_back();
    17231700}
    17241701
     
    17351712  {
    17361713    $id = generate_key(16);
    1737     $query = '
     1714    $query = "
    17381715SELECT COUNT(*)
    1739   FROM '.USER_CONFIRM_MAIL_TABLE.'
    1740 WHERE id = "'.$id.'"
    1741 ;';
     1716  FROM ".USER_CONFIRM_MAIL_TABLE."
     1717WHERE id = '".$id."'
     1718;";
    17421719    list($count) = pwg_db_fetch_row(pwg_query($query));
    17431720
     
    17671744  if (isset($Confirm_Mail_ID))
    17681745  {
    1769     $query = '
     1746    $query = "
    17701747SELECT status
    1771   FROM '.USER_INFOS_TABLE.'
    1772 WHERE user_id = '.$user_id.'
    1773 ;';
     1748  FROM ".USER_INFOS_TABLE."
     1749WHERE user_id = '".$user_id."'
     1750;";
    17741751    list($status) = pwg_db_fetch_row(pwg_query($query));
    17751752   
    1776     $query = '
    1777 INSERT INTO '.USER_CONFIRM_MAIL_TABLE.'
     1753    $query = "
     1754INSERT INTO ".USER_CONFIRM_MAIL_TABLE."
    17781755  (id, user_id, mail_address, status, date_check)
    17791756VALUES
    1780   ("'.$Confirm_Mail_ID.'", '.$user_id.', "'.$email.'", "'.$status.'", null)
    1781 ;';
     1757  ('".$Confirm_Mail_ID."', '".$user_id."', '".$email."', '".$status."', null)
     1758;";
    17821759    pwg_query($query);
    17831760
    17841761    // Delete user from all groups
    17851762    // ---------------------------
    1786     $query = '
    1787 DELETE FROM '.USER_GROUP_TABLE.'
    1788 WHERE user_id = '.$user_id.'
     1763    $query = "
     1764DELETE FROM ".USER_GROUP_TABLE."
     1765WHERE user_id = '".$user_id."'
    17891766  AND (
    1790     group_id = '.$conf_UAM[2].'
     1767    group_id = '".$conf_UAM[2]."'
    17911768  OR
    1792     group_id = '.$conf_UAM[3].'
     1769    group_id = '".$conf_UAM[3]."'
    17931770  )
    1794 ;';
     1771;";
    17951772    pwg_query($query);
    17961773
     
    17991776    if (!is_admin() and $conf_UAM[7] <> -1)
    18001777    {
    1801       $query = '
    1802 UPDATE '.USER_INFOS_TABLE.'
    1803 SET status = "'.$conf_UAM[7].'"
    1804 WHERE user_id = '.$user_id.'
    1805 ;';
     1778      $query = "
     1779UPDATE ".USER_INFOS_TABLE."
     1780SET status = '".$conf_UAM[7]."'
     1781WHERE user_id = '".$user_id."'
     1782;";
    18061783      pwg_query($query);
    18071784    }
     
    18111788    if (!is_admin() and $conf_UAM[2] <> -1)
    18121789    {
    1813       $query = '
    1814 INSERT INTO '.USER_GROUP_TABLE.'
     1790      $query = "
     1791INSERT INTO ".USER_GROUP_TABLE."
    18151792  (user_id, group_id)
    18161793VALUES
    1817   ('.$user_id.', '.$conf_UAM[2].')
    1818 ;';
     1794  ('".$user_id."', '".$conf_UAM[2]."')
     1795;";
    18191796      pwg_query($query);
    18201797    }
     
    18241801    if (!is_admin() and $conf_UAM[35] <> -1)
    18251802    {
    1826       $query = '
    1827 UPDATE '.USER_INFOS_TABLE.'
    1828 SET level = "'.$conf_UAM[35].'"
    1829 WHERE user_id = '.$user_id.'
    1830 ;';
     1803      $query = "
     1804UPDATE ".USER_INFOS_TABLE."
     1805SET level = '".$conf_UAM[35]."'
     1806WHERE user_id = '".$user_id."'
     1807;";
    18311808      pwg_query($query);
    18321809    }
    18331810   
    1834     // Set UAM_validated field to false in #_users table
    1835     // -------------------------------------------------
    1836     SetUnvalidated($user_id);
    1837    
    1838     return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID.'&userid='.$user_id;
     1811    if ( $conf['guest_access'] )
     1812    {
     1813      return( get_absolute_root_url().'?key='.$Confirm_Mail_ID.'&userid='.$user_id);
     1814    }
     1815    else
     1816    {
     1817      return( get_absolute_root_url().'identification.php?key='.$Confirm_Mail_ID.'&userid='.$user_id);
     1818    }
    18391819  }
    18401820}
     
    18561836// Groups cleanup
    18571837// --------------
    1858   $query = '
    1859 DELETE FROM '.USER_GROUP_TABLE.'
    1860 WHERE user_id = '.$user_id.'
     1838  $query = "
     1839DELETE FROM ".USER_GROUP_TABLE."
     1840WHERE user_id = '".$user_id."'
    18611841  AND (
    1862     group_id = '.$conf_UAM[2].'
     1842    group_id = '".$conf_UAM[2]."'
    18631843  OR
    1864     group_id = '.$conf_UAM[3].'
     1844    group_id = '".$conf_UAM[3]."'
    18651845  )
    1866 ;';
     1846;";
    18671847  pwg_query($query);
    18681848
    18691849  if (!is_admin() and $conf_UAM[7] <> -1) // Set status
    18701850  {
    1871     $query = '
    1872 UPDATE '.USER_INFOS_TABLE.'
    1873 SET status = "'.$conf_UAM[7].'"
    1874 WHERE user_id = '.$user_id.'
    1875 ;';
     1851    $query = "
     1852UPDATE ".USER_INFOS_TABLE."
     1853SET status = '".$conf_UAM[7]."'
     1854WHERE user_id = '".$user_id."'
     1855;";
    18761856    pwg_query($query);
    18771857  }
     
    18791859  if (!is_admin() and $conf_UAM[2] <> -1) // Set group
    18801860  {
    1881     $query = '
    1882 INSERT INTO '.USER_GROUP_TABLE.'
     1861    $query = "
     1862INSERT INTO ".USER_GROUP_TABLE."
    18831863  (user_id, group_id)
    18841864VALUES
    1885   ('.$user_id.', '.$conf_UAM[2].')
    1886 ;';
     1865  ('".$user_id."', '".$conf_UAM[2]."')
     1866;";
    18871867    pwg_query($query);
    18881868  }
     
    18901870  if (!is_admin() and $conf_UAM[35] <> -1) // Set privacy level
    18911871  {
    1892     $query = '
    1893 INSERT INTO '.USER_INFOS_TABLE.'
     1872    $query = "
     1873INSERT INTO ".USER_INFOS_TABLE."
    18941874  (user_id, level)
    18951875VALUES
    1896   ('.$user_id.', "'.$conf_UAM[35].'")
    1897 ;';
     1876  ('".$user_id."', '".$conf_UAM[35]."')
     1877;";
    18981878    pwg_query($query);
    18991879  }
     
    19191899  if (isset($Confirm_Mail_ID))
    19201900  {
    1921     $query = '
    1922 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
    1923 SET id = "'.$Confirm_Mail_ID.'"
    1924 WHERE user_id = '.$user_id.'
    1925 ;';
     1901    $query = "
     1902UPDATE ".USER_CONFIRM_MAIL_TABLE."
     1903SET id = '".$Confirm_Mail_ID."'
     1904WHERE user_id = '".$user_id."'
     1905;";
    19261906    pwg_query($query);
    19271907
    1928                                 $query = '
    1929 UPDATE '.USER_INFOS_TABLE.'
    1930 SET registration_date = "'.$dbnow.'"
    1931 WHERE user_id = '.$user_id.'
    1932 ;';
    1933                                 pwg_query($query);
     1908                $query = "
     1909UPDATE ".USER_INFOS_TABLE."
     1910SET registration_date = '".$dbnow."'
     1911WHERE user_id = '".$user_id."'
     1912;";
     1913                pwg_query($query);
    19341914   
    1935     return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID.'&userid='.$user_id;
     1915    if ( $conf['guest_access'] )
     1916    {
     1917      return( get_absolute_root_url().'?key='.$Confirm_Mail_ID.'&userid='.$user_id);
     1918    }
     1919    else
     1920    {
     1921      return( get_absolute_root_url().'identification.php?key='.$Confirm_Mail_ID.'&userid='.$user_id);
     1922    }
    19361923  }
    19371924}
     
    19501937  list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    19511938
    1952   $query = '
    1953 UPDATE '.USER_LASTVISIT_TABLE.'
    1954 SET lastvisit = "'.$dbnow.'", reminder = "true"
    1955 WHERE user_id = '.$user_id.'
    1956 ;';
     1939  $query = "
     1940UPDATE ".USER_LASTVISIT_TABLE."
     1941SET lastvisit = '".$dbnow."', reminder = 'true'
     1942WHERE user_id = '".$user_id."'
     1943;";
    19571944  pwg_query($query);
    19581945}
     
    19651952function DeleteConfirmMail($user_id)
    19661953{
    1967   $query = '
    1968 DELETE FROM '.USER_CONFIRM_MAIL_TABLE.'
    1969 WHERE user_id = '.$user_id.'
    1970 ;';
     1954  $query = "
     1955DELETE FROM ".USER_CONFIRM_MAIL_TABLE."
     1956WHERE user_id = '".$user_id."'
     1957;";
    19711958  pwg_query($query);
    19721959}
     
    19781965function DeleteLastVisit($user_id)
    19791966{
    1980   $query = '
    1981 DELETE FROM '.USER_LASTVISIT_TABLE.'
    1982 WHERE user_id = '.$user_id.'
    1983 ;';
     1967  $query = "
     1968DELETE FROM ".USER_LASTVISIT_TABLE."
     1969WHERE user_id = '".$user_id."'
     1970;";
    19841971  pwg_query($query);
    19851972}
     
    20081995  unset($values[array_search($user_id, $values)]);
    20091996     
    2010   $query = '
    2011 UPDATE '.CONFIG_TABLE.'
    2012 SET value = "'.implode(',', $values).'"
    2013 WHERE param = "UserAdvManager_Redir";';
     1997  $query = "
     1998UPDATE ".CONFIG_TABLE."
     1999SET value = \"".implode(',', $values)."\"
     2000WHERE param = 'UserAdvManager_Redir';";
    20142001
    20152002  pwg_query($query);
     
    20362023  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
    20372024
    2038   $query = '
     2025  $query = "
    20392026SELECT COUNT(*)
    2040 FROM '.USER_CONFIRM_MAIL_TABLE.'
    2041 WHERE id = "'.$id.'"
    2042 ;';
     2027FROM ".USER_CONFIRM_MAIL_TABLE."
     2028WHERE id = '".$id."'
     2029;";
    20432030  list($count) = pwg_db_fetch_row(pwg_query($query));
    20442031
    20452032  if ($count == 1)
    20462033  {
    2047     $query = '
     2034    $query = "
    20482035SELECT user_id, status, date_check
    2049 FROM '.USER_CONFIRM_MAIL_TABLE.'
    2050 WHERE id = "'.$id.'"
    2051 ;';
     2036FROM ".USER_CONFIRM_MAIL_TABLE."
     2037WHERE id = '".$id."'
     2038;";
    20522039    $data = pwg_db_fetch_assoc(pwg_query($query));
    20532040
    20542041    if (!empty($data) and isset($data['user_id']) and is_null($data['date_check']))
    20552042    {
    2056       $query = '
     2043      $query = "
    20572044SELECT registration_date
    2058 FROM '.USER_INFOS_TABLE.'
    2059 WHERE user_id = '.$data['user_id'].'
    2060 ;';
     2045FROM ".USER_INFOS_TABLE."
     2046WHERE user_id = '".$data['user_id']."'
     2047;";
    20612048      list($registration_date) = pwg_db_fetch_row(pwg_query($query));
    20622049
     
    20652052      if (!empty($registration_date))
    20662053      {
    2067                                                                 // Verify Confirmmail with time limit ON
    2068                                 // -------------------------------------
    2069                                                                 if (isset ($conf_UAM_ConfirmMail[1]))
    2070                                                                 {
    2071                                                                                 // Dates formating and compare
    2072                                         // ---------------------------
    2073                                                                                 $today = date("d-m-Y"); // Get today's date
    2074                                                                                 list($day, $month, $year) = explode('-', $today); // explode date of today                                               
    2075                                                                         $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
    2076 
    2077                                                                 list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
    2078                                                                                 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
    2079                                                                                 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
    2080 
    2081                                                                                 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps     
    2082                                                                                 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
    2083 
    2084                                                                                 // Condition with the value set for time limit
    2085                                         // -------------------------------------------
    2086                                                                                 if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set
    2087                                                                                 {
    2088                                                                                                 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    2089 
    2090                                         // Update ConfirmMail table
    2091                                         // ------------------------
    2092                                                                                                 $query = '
     2054                                // Verify Confirmmail with time limit ON
     2055        // -------------------------------------
     2056                                if (isset ($conf_UAM_ConfirmMail[1]))
     2057                                {
     2058                                        // Dates formating and compare
     2059          // ---------------------------
     2060                                        $today = date("d-m-Y"); // Get today's date
     2061                                        list($day, $month, $year) = explode('-', $today); // explode date of today                                               
     2062                                        $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
     2063                       
     2064                                list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
     2065                                        list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
     2066                                        $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
     2067                       
     2068                                        $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps     
     2069                                        $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
     2070
     2071                                        // Condition with the value set for time limit
     2072          // -------------------------------------------
     2073                                        if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set
     2074                                        {
     2075                                                list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
     2076
     2077            // Update ConfirmMail table
     2078            // ------------------------
     2079                                                $query = '
    20932080UPDATE '.USER_CONFIRM_MAIL_TABLE.'
    20942081SET date_check="'.$dbnow.'", reminder="false"
    20952082WHERE id = "'.$id.'"
    20962083;';
    2097                                                                                                 pwg_query($query);
    2098 
    2099                                         // Update LastVisit table - Force reminder field to false
    2100                                         // Usefull when a user has been automatically downgraded and revalidate its registration
    2101                                         // -------------------------------------------------------------------------------------
    2102                                                                                                 $query = '
     2084                                                pwg_query($query);
     2085
     2086            // Update LastVisit table - Force reminder field to false
     2087            // Usefull when a user has been automatically downgraded and revalidate its registration
     2088            // -------------------------------------------------------------------------------------
     2089                                                $query = '
    21032090UPDATE '.USER_LASTVISIT_TABLE.'
    21042091SET reminder="false"
    21052092WHERE user_id = "'.$data['user_id'].'"
    21062093;';
    2107                                                                                                 pwg_query($query);
     2094                                                pwg_query($query);
    21082095     
    2109                                                                                                 if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group
    2110                                                                                                 {
    2111                                                                                                                 $query = '
    2112 DELETE FROM '.USER_GROUP_TABLE.'
    2113 WHERE user_id = '.$data['user_id'].'
    2114   AND group_id = '.$conf_UAM[2].'
    2115 ;';
    2116                                                                                                                 pwg_query($query);
    2117                                                                                                 }
    2118 
    2119                                                                                                 if ($conf_UAM[3] <> -1) // Add user to validated users group
    2120                                                                                                 {
    2121                                                                                                                 $query = '
    2122 INSERT INTO '.USER_GROUP_TABLE.'
     2096                                                if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group
     2097                                                {
     2098                                                        $query = "
     2099DELETE FROM ".USER_GROUP_TABLE."
     2100WHERE user_id = '".$data['user_id']."'
     2101  AND group_id = '".$conf_UAM[2]."'
     2102;";
     2103                                                        pwg_query($query);
     2104                                                }
     2105           
     2106                                                if ($conf_UAM[3] <> -1) // Add user to validated users group
     2107                                                {
     2108                                                        $query = "
     2109INSERT INTO ".USER_GROUP_TABLE."
    21232110  (user_id, group_id)
    21242111VALUES
    2125   ('.$data['user_id'].', '.$conf_UAM[3].')
    2126 ;';
    2127                                                                                                                 pwg_query($query);
    2128                                                                                                 }
    2129 
    2130                                                                                                 if ($conf_UAM[4] <> -1) // Change user's status
    2131                                                                                                 {
    2132                                                                                                                 $query = '
    2133 UPDATE '.USER_INFOS_TABLE.'
    2134 SET status = "'.$conf_UAM[4].'"
    2135 WHERE user_id = '.$data['user_id'].'
    2136 ;';
    2137                                                                                                                 pwg_query($query);
    2138                                                                                                 }
    2139 
    2140                                                                                                 if ($conf_UAM[36] <> -1) // Change user's privacy level
    2141                                                                                                 {
    2142                                                                                                                 $query = '
    2143 UPDATE '.USER_INFOS_TABLE.'
    2144 SET level = "'.$conf_UAM[36].'"
    2145 WHERE user_id = '.$data['user_id'].'
    2146 ;';
    2147                                                                                                                 pwg_query($query);
    2148                                                                                                 }
    2149 
    2150                                                                                                 // Set UAM_validated field to True in #_users table
    2151                                                                                                 $query = '
    2152 UPDATE '.USERS_TABLE.'
    2153 SET UAM_validated = "true"
    2154 WHERE id = '.$data['user_id'].'
    2155 ;';
    2156                                                                                                 pwg_query($query);
    2157 
    2158                                                                                                 // Refresh user's category cache
    2159                                                 // -----------------------------
    2160                                                                                                 invalidate_user_cache();
    2161 
    2162                                                                                                 return true;
    2163                                                                                 }
    2164                                                                                 elseif ($deltadays > $conf_UAM_ConfirmMail[1]) // If timelimit exeeds
    2165                                                                                 {
    2166                                                                                                 return false;
    2167                                                                                 }
    2168                                                                 }
    2169                                                                 // Verify Confirmmail with time limit OFF
    2170                                 // --------------------------------------
    2171                                                                 else
    2172                                                                 {
    2173                                                                                 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    2174 
    2175                                 // Update ConfirmMail table
    2176                                 // ------------------------
    2177                                                                                 $query = '
     2112  ('".$data['user_id']."', '".$conf_UAM[3]."')
     2113;";
     2114                                                        pwg_query($query);
     2115                                                }
     2116
     2117                                                if (($conf_UAM[4] <> -1 or isset($data['status']))) // Change user's status
     2118                                                {
     2119                                                        $query = "
     2120UPDATE ".USER_INFOS_TABLE."
     2121SET status = '".(isset($data['status']) ? $data['status'] : $conf_UAM[4])."'
     2122WHERE user_id = '".$data['user_id']."'
     2123;";
     2124                                                        pwg_query($query);
     2125                                                }
     2126
     2127                                                if (($conf_UAM[36] <> -1 or isset($data['level']))) // Change user's privacy level
     2128                                                {
     2129                                                        $query = "
     2130UPDATE ".USER_INFOS_TABLE."
     2131SET level = '".(isset($data['level']) ? $data['level'] : $conf_UAM[36])."'
     2132WHERE user_id = '".$data['user_id']."'
     2133;";
     2134                                                        pwg_query($query);
     2135                                                }
     2136
     2137                                                // Refresh user's category cache
     2138            // -----------------------------
     2139                                                invalidate_user_cache();
     2140 
     2141                                                return true;
     2142                                        }
     2143                                        elseif ($deltadays > $conf_UAM_ConfirmMail[1]) // If timelimit exeeds
     2144                                        {
     2145                                                return false;
     2146                                        }
     2147                                }
     2148                                // Verify Confirmmail with time limit OFF
     2149        // --------------------------------------
     2150                                else
     2151                                {
     2152                                        list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
     2153
     2154          // Update ConfirmMail table
     2155          // ------------------------
     2156                                        $query = '
    21782157UPDATE '.USER_CONFIRM_MAIL_TABLE.'
    21792158SET date_check="'.$dbnow.'"
    21802159WHERE id = "'.$id.'"
    21812160;';
    2182                                                                                 pwg_query($query);
    2183 
    2184                                 // Update LastVisit table - Force reminder field to false
    2185                                 // Usefull when a user has been automatically downgraded and revalidate its registration
    2186                                 // -------------------------------------------------------------------------------------
    2187                                                                                 $query = '
     2161                                        pwg_query($query);
     2162
     2163          // Update LastVisit table - Force reminder field to false
     2164          // Usefull when a user has been automatically downgraded and revalidate its registration
     2165          // -------------------------------------------------------------------------------------
     2166                                        $query = '
    21882167UPDATE '.USER_LASTVISIT_TABLE.'
    21892168SET reminder="false"
    21902169WHERE user_id = "'.$data['user_id'].'"
    21912170;';
    2192                                 pwg_query($query);
    2193 
    2194                                                                                 if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group
    2195                                                                                 {
    2196                                                                                                 $query = '
    2197 DELETE FROM '.USER_GROUP_TABLE.'
    2198 WHERE user_id = '.$data['user_id'].'
    2199 AND group_id = '.$conf_UAM[2].'
    2200 ;';
    2201                                                                                                 pwg_query($query);
    2202                                                                                 }
    2203 
    2204                                                                                 if ($conf_UAM[3] <> -1)
    2205                                                                                 {
    2206                                                                                                 $query = '
    2207 DELETE FROM '.USER_GROUP_TABLE.'
    2208 WHERE user_id = '.$data['user_id'].'
    2209 AND group_id = '.$conf_UAM[3].'
    2210 ;';
    2211                                                                                                 pwg_query($query);
    2212 
    2213                                                                                                 $query = '
    2214 INSERT INTO '.USER_GROUP_TABLE.'
     2171          pwg_query($query);
     2172     
     2173                                        if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group
     2174                                        {
     2175                                                $query = "
     2176DELETE FROM ".USER_GROUP_TABLE."
     2177WHERE user_id = '".$data['user_id']."'
     2178AND group_id = '".$conf_UAM[2]."'
     2179;";
     2180                                                pwg_query($query);
     2181                                        }
     2182   
     2183                                        if ($conf_UAM[3] <> -1)
     2184                                        {
     2185                                                $query = "
     2186DELETE FROM ".USER_GROUP_TABLE."
     2187WHERE user_id = '".$data['user_id']."'
     2188AND group_id = '".$conf_UAM[3]."'
     2189;";
     2190                                                pwg_query($query);
     2191
     2192                                                $query = "
     2193INSERT INTO ".USER_GROUP_TABLE."
    22152194  (user_id, group_id)
    22162195VALUES
    2217   ('.$data['user_id'].', '.$conf_UAM[3].')
    2218 ;';
    2219                                                                                                 pwg_query($query);
    2220                                                                                 }
    2221 
    2222                                                                                 if ($conf_UAM[4] <> -1) // Change user's status
    2223                                                                                 {
    2224                                                                                                 $query = '
    2225 UPDATE '.USER_INFOS_TABLE.'
    2226 SET status = "'.$conf_UAM[4].'"
    2227 WHERE user_id = '.$data['user_id'].'
    2228 ;';
    2229                                                                                                 pwg_query($query);
    2230                                                                                 }
    2231 
    2232                                                                                 if ($conf_UAM[36] <> -1) // Change user's privacy level
    2233                                                                                 {
    2234                                                                                                 $query = '
    2235 UPDATE '.USER_INFOS_TABLE.'
    2236 SET level = "'.$conf_UAM[36].'"
    2237 WHERE user_id = '.$data['user_id'].'
    2238 ;';
    2239                                                                                                 pwg_query($query);
    2240                                                                                 }
    2241 
    2242                                                                                 // Set UAM_validated field to True in #_users table
    2243                                                                                 $query = '
    2244 UPDATE '.USERS_TABLE.'
    2245 SET UAM_validated = "true"
    2246 WHERE id = '.$data['user_id'].'
    2247 ;';
    2248                                                                                 pwg_query($query);
    2249 
    2250                                                                                 // Refresh user's category cache
    2251                                 // -----------------------------
    2252                                                                                 invalidate_user_cache();
    2253 
    2254                                                                                 return true;
    2255                                                                 }
    2256                                                 }
     2196  ('".$data['user_id']."', '".$conf_UAM[3]."')
     2197;";
     2198                                                pwg_query($query);
     2199                                        }
     2200
     2201                                        if (($conf_UAM[4] <> -1 or isset($data['status']))) // Change user's status
     2202                                        {
     2203                                                $query = "
     2204UPDATE ".USER_INFOS_TABLE."
     2205SET status = '".(isset($data['status']) ? $data['status'] : $conf_UAM[4])."'
     2206WHERE user_id = '".$data['user_id']."'
     2207;";
     2208                                                pwg_query($query);
     2209                                        }
     2210
     2211                                        if (($conf_UAM[36] <> -1 or isset($data['level']))) // Change user's privacy level
     2212                                        {
     2213                                                $query = "
     2214UPDATE ".USER_INFOS_TABLE."
     2215SET level = '".(isset($data['level']) ? $data['level'] : $conf_UAM[36])."'
     2216WHERE user_id = '".$data['user_id']."'
     2217;";
     2218                                                pwg_query($query);
     2219                                        }
     2220
     2221                                        // Refresh user's category cache
     2222          // -----------------------------
     2223                                        invalidate_user_cache();
     2224 
     2225                                        return true;
    22572226                                }
     2227                        }
     2228                }
    22582229    else if (!empty($data) and !is_null($data['date_check']))
    22592230    {
    22602231      return false;
    22612232    }
    2262                 }
     2233        }
    22632234  else
    22642235    return false;
     
    22672238
    22682239/**
    2269  * Function called from UAM_admin.php for manual validation by admin
     2240 * Function called from UAM_admin.php to force users validation by admin
    22702241 *
    22712242 * @param : User id
    22722243 *
    22732244 */
    2274 function ManualValidation($id)
    2275 {
    2276                 global $conf;
    2277 
    2278                 $conf_UAM = unserialize($conf['UserAdvManager']);
    2279 
    2280                 if (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') // Set date of validation
     2245function ForceValidation($id)
     2246{
     2247  global $conf;
     2248
     2249  $conf_UAM = unserialize($conf['UserAdvManager']);
     2250
     2251  if (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')
     2252  {
     2253    list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
     2254
     2255                $query = "
     2256UPDATE ".USER_CONFIRM_MAIL_TABLE."
     2257SET date_check='".$dbnow."'
     2258WHERE user_id = '".$id."'
     2259;";
     2260    pwg_query($query);
     2261             
     2262                if ($conf_UAM[2] <> -1)
    22812263                {
    2282                                 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    2283 
    2284                                 $query = '
    2285 UPDATE '.USER_CONFIRM_MAIL_TABLE.'
    2286 SET date_check="'.$dbnow.'"
    2287 WHERE user_id = '.$id.'
    2288 ;';
    2289                                 pwg_query($query);
     2264                        $query = "
     2265DELETE FROM ".USER_GROUP_TABLE."
     2266WHERE user_id = '".$id."'
     2267  AND group_id = '".$conf_UAM[2]."'
     2268;";
     2269                        pwg_query($query);
    22902270                }
    2291 
    2292                 if ($conf_UAM[2] <> -1) // Delete user from waiting group
     2271 
     2272                if ($conf_UAM[3] <> -1) // Change user's group
    22932273                {
    2294                                 $query = '
    2295 DELETE FROM '.USER_GROUP_TABLE.'
    2296 WHERE user_id = '.$id.'
    2297                 AND group_id = '.$conf_UAM[2].'
    2298 ;';
    2299                                 pwg_query($query);
     2274                        $query = "
     2275DELETE FROM ".USER_GROUP_TABLE."
     2276WHERE user_id = '".$id."'
     2277  AND group_id = '".$conf_UAM[3]."'
     2278;";
     2279      pwg_query($query);
     2280       
     2281                        $query = "
     2282INSERT INTO ".USER_GROUP_TABLE."
     2283  (user_id, group_id)
     2284VALUES
     2285  ('".$id."', '".$conf_UAM[3]."')
     2286;";
     2287                        pwg_query($query);
     2288    }
     2289
     2290                if ($conf_UAM[4] <> -1) // Change user's status
     2291                {
     2292                        $query = "
     2293UPDATE ".USER_INFOS_TABLE."
     2294SET status = '".$conf_UAM[4]."'
     2295WHERE user_id = '".$id."'
     2296;";
     2297                        pwg_query($query);
    23002298                }
    2301  
    2302                 if ($conf_UAM[3] <> -1) // Set user's valid group
     2299
     2300                if ($conf_UAM[36] <> -1) // Change user's privacy level
    23032301                {
    2304                                 $query = '
    2305 DELETE FROM '.USER_GROUP_TABLE.'
    2306 WHERE user_id = '.$id.'
    2307                 AND group_id = '.$conf_UAM[3].'
    2308 ;';
    2309                                 pwg_query($query);
     2302                        $query = "
     2303UPDATE ".USER_INFOS_TABLE."
     2304SET level = '".$conf_UAM[36]."'
     2305WHERE user_id = '".$id."'
     2306;";
     2307                        pwg_query($query);
     2308                }
     2309  }
     2310  elseif (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')
     2311  {
     2312    list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
     2313
     2314    if ($conf_UAM[2] <> -1) // Delete user's from waiting group
     2315    {
     2316                  $query = "
     2317DELETE FROM ".USER_GROUP_TABLE."
     2318WHERE user_id = '".$id."'
     2319  AND group_id = '".$conf_UAM[2]."'
     2320;";
     2321                  pwg_query($query);
     2322    }
     2323
     2324    if ($conf_UAM[3] <> -1) // Change user's group
     2325    {
     2326      $query = "
     2327DELETE FROM ".USER_GROUP_TABLE."
     2328WHERE user_id = '".$id."'
     2329  AND group_id = '".$conf_UAM[3]."'
     2330;";
     2331      pwg_query($query);
    23102332       
    2311                                 $query = '
    2312 INSERT INTO '.USER_GROUP_TABLE.'
    2313                 (user_id, group_id)
     2333                  $query = "
     2334INSERT INTO ".USER_GROUP_TABLE."
     2335  (user_id, group_id)
    23142336VALUES
    2315                 ('.$id.', '.$conf_UAM[3].')
    2316 ;';
    2317                                 pwg_query($query);
    2318                 }
    2319 
    2320                 if ($conf_UAM[4] <> -1) // Set user's valid status
    2321                 {
    2322                                 $query = '
    2323 UPDATE '.USER_INFOS_TABLE.'
    2324 SET status = "'.$conf_UAM[4].'"
    2325 WHERE user_id = '.$id.'
    2326 ;';
    2327                                 pwg_query($query);
    2328                 }
    2329 
    2330                 if ($conf_UAM[36] <> -1) // Set user's valid privacy level
    2331                 {
    2332                                 $query = '
    2333 UPDATE '.USER_INFOS_TABLE.'
    2334 SET level = "'.$conf_UAM[36].'"
    2335 WHERE user_id = '.$id.'
    2336 ;';
    2337                                 pwg_query($query);
    2338                 }
    2339 
    2340                 // Set UAM_validated field to True in #_users table
    2341                 $query = '
    2342 UPDATE '.USERS_TABLE.'
    2343 SET UAM_validated = "true"
    2344 WHERE id = '.$id.'
    2345 ;';
    2346                 pwg_query($query);
    2347 }
    2348 
    2349 
    2350 /**
    2351  * Function called from functions.inc.php - Check if username matches forbidden characters
     2337  ('".$id."', '".$conf_UAM[3]."')
     2338;";
     2339                  pwg_query($query);
     2340    }
     2341
     2342    if ($conf_UAM[4] <> -1) // Change user's status
     2343    {
     2344                  $query = "
     2345UPDATE ".USER_INFOS_TABLE."
     2346SET status = '".$conf_UAM[4]."'
     2347WHERE user_id = '".$id."'
     2348;";
     2349      pwg_query($query);
     2350    }
     2351
     2352    if ($conf_UAM[36] <> -1) // Change user's privacy level
     2353    {
     2354                  $query = "
     2355UPDATE ".USER_INFOS_TABLE."
     2356SET level = '".$conf_UAM[36]."'
     2357WHERE user_id = '".$id."'
     2358;";
     2359      pwg_query($query);
     2360    }
     2361  }
     2362}
     2363
     2364
     2365/**
     2366 * Function called from functions.inc.php - Check if username matches forbidden caracters
    23522367 *
    23532368 * @param : User login
     
    23622377  $conf_UAM = unserialize($conf['UserAdvManager']);
    23632378
    2364   if (isset($login) and isset($conf_UAM[6]) and $conf_UAM[6] <> '')
     2379  if (isset($login) and isset($conf_UAM[6]) and !empty($conf_UAM[6]))
    23652380  {
    23662381    $conf_CharExclusion = preg_split("/,/",$conf_UAM[6]);
    23672382    for ($i = 0 ; $i < count($conf_CharExclusion) ; $i++)
    23682383    {
    2369       //Detect meta-characters (# ! ^ $ ( ) [ ] { } ? + * . \ -) for special pattern
    2370       if ($conf_CharExclusion[$i] == "#"
    2371        or $conf_CharExclusion[$i] == "$"
    2372        or $conf_CharExclusion[$i] == "!"
    2373        or $conf_CharExclusion[$i] == "^"
    2374        or $conf_CharExclusion[$i] == "*"
    2375        or $conf_CharExclusion[$i] == "?"
    2376        or $conf_CharExclusion[$i] == "+"
    2377        or $conf_CharExclusion[$i] == "."
    2378        or $conf_CharExclusion[$i] == "\\"
    2379        or $conf_CharExclusion[$i] == "|"
    2380        or $conf_CharExclusion[$i] == "["
    2381        or $conf_CharExclusion[$i] == "]"
    2382        or $conf_CharExclusion[$i] == "("
    2383        or $conf_CharExclusion[$i] == ")"
    2384        or $conf_CharExclusion[$i] == "{"
    2385        or $conf_CharExclusion[$i] == "}"
    2386        or $conf_CharExclusion[$i] == "-")
    2387       {
    2388         $pattern = '/[][^$.\*+?(){}#|-]/i';
    2389       }
    2390       else
    2391       {
    2392         $pattern = '/'.$conf_CharExclusion[$i].'/i';
    2393       }
    2394 
     2384      $pattern = '/'.$conf_CharExclusion[$i].'/i';
    23952385      if (preg_match($pattern, $login))
    23962386      {
     
    24212411  $conf_UAM = unserialize($conf['UserAdvManager']);
    24222412 
    2423                 if (isset($email) and isset($conf_UAM[11]) and $conf_UAM[11] <> '')
     2413        if (isset($email) and isset($conf_UAM[11]) and $conf_UAM[11] <> '')
     2414        {
     2415                $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
     2416                for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
    24242417                {
    2425                                 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
    2426                                 for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
    2427                                 {
    2428                                                 $pattern = '/'.$conf_MailExclusion[$i].'/i';
    2429                                                 if (preg_match($pattern, $email))
    2430       {
    2431                 return true;
    2432       }
    2433                                 }
     2418                        $pattern = '/'.$conf_MailExclusion[$i].'/i';
     2419                        if (preg_match($pattern, $email))
     2420      {
     2421                        return true;
     2422      }
    24342423                }
     2424        }
    24352425  else
    24362426  {
     
    24482438function get_unvalid_user_list()
    24492439{
    2450                 global $conf, $page;
     2440        global $conf, $page;
    24512441         
    2452                 // Get ConfirmMail configuration
     2442        // Get ConfirmMail configuration
    24532443  // -----------------------------
    24542444  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
     
    24592449  $users = array();
    24602450
    2461                 // Search users depending expiration date
     2451        // Search users depending expiration date
    24622452  // --------------------------------------
    24632453  $query = '
     
    24762466WHERE u.'.$conf['user_fields']['id'].' >= 3
    24772467  AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail[1].'"
    2478   OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_UAM_ConfirmMail[1].'")
    2479                 AND u.UAM_validated = "false"
     2468  OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_UAM_ConfirmMail[1].'")';
     2469
     2470        if ($conf_UAM[2] <> '-1' and $conf_UAM[7] == '-1')
     2471  {
     2472    $query.= '
     2473  AND ug.group_id = '.$conf_UAM[2];
     2474  }
     2475  if ($conf_UAM[2] == '-1' and $conf_UAM[7] <> '-1')
     2476  {
     2477    $query.= '
     2478  AND ui.status = \''.$conf_UAM[7]."'";
     2479  }
     2480  if ($conf_UAM[2] <> '-1' and $conf_UAM[7] <> '-1')
     2481  {
     2482    $query.= '
     2483  AND ug.group_id = \''.$conf_UAM[2]."'";
     2484  }
     2485  $query.= '
    24802486ORDER BY ui.registration_date ASC
    24812487;';
    24822488
    2483                 $result = pwg_query($query);
     2489        $result = pwg_query($query);
    24842490     
    24852491  while ($row = pwg_db_fetch_assoc($result))
    24862492  {
    2487                 $user = $row;
     2493        $user = $row;
    24882494    $user['groups'] = array();
    24892495
    24902496    array_push($users, $user);
    2491                 }
    2492 
    2493                 // Add groups list
     2497        }
     2498
     2499        // Add groups list
    24942500  // ---------------
    24952501  $user_ids = array();
    24962502  foreach ($users as $i => $user)
    24972503  {
    2498                 $user_ids[$i] = $user['id'];
    2499                 }
    2500 
    2501                 $user_nums = array_flip($user_ids);
     2504        $user_ids[$i] = $user['id'];
     2505        }
     2506       
     2507        $user_nums = array_flip($user_ids);
    25022508
    25032509  if (count($user_ids) > 0)
    25042510  {
    2505                 $query = '
     2511        $query = '
    25062512SELECT user_id, group_id
    25072513  FROM '.USER_GROUP_TABLE.'
     
    25092515;';
    25102516       
    2511                                 $result = pwg_query($query);
     2517                $result = pwg_query($query);
    25122518       
    25132519    while ($row = pwg_db_fetch_assoc($result))
    25142520    {
    2515                 array_push(
    2516                 $users[$user_nums[$row['user_id']]]['groups'],
     2521        array_push(
     2522        $users[$user_nums[$row['user_id']]]['groups'],
    25172523        $row['group_id']
    2518                                                 );
    2519                                 }
     2524                        );
    25202525                }
    2521 
    2522                 return $users;
     2526        }
     2527
     2528        return $users;
    25232529}
    25242530
     
    25332539function get_unvalid_user_autotasks()
    25342540{
    2535                 global $conf, $page;
     2541        global $conf, $page;
    25362542         
    2537                 // Get ConfirmMail configuration
     2543        // Get ConfirmMail configuration
    25382544  // -----------------------------
    25392545  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
     
    25412547  $users = array();
    25422548
    2543                 // search users depending expiration date
     2549        // search users depending expiration date
    25442550  // --------------------------------------
    25452551  $query = '
     
    25532559ORDER BY ui.registration_date ASC;';
    25542560
    2555                 $result = pwg_query($query);
    2556 
     2561        $result = pwg_query($query);
     2562     
    25572563  while ($row = pwg_db_fetch_assoc($result))
    25582564  {
    25592565    array_push($users, $row);
    2560                 }
    2561 
    2562                 return $users;
     2566        }
     2567
     2568        return $users;
    25632569}
    25642570
     
    25722578function get_ghost_user_list()
    25732579{
    2574                 global $conf, $page;
     2580        global $conf, $page;
    25752581
    25762582  $conf_UAM = unserialize($conf['UserAdvManager']);
    2577 
     2583 
    25782584  $users = array();
    25792585
    2580                 // Search users depending expiration date
     2586        // Search users depending expiration date
    25812587  // --------------------------------------
    25822588  $query = '
     
    25922598ORDER BY lv.lastvisit ASC;';
    25932599
    2594                 $result = pwg_query($query);
     2600        $result = pwg_query($query);
    25952601     
    25962602  while ($row = pwg_db_fetch_assoc($result))
    25972603  {
    2598                 $user = $row;
     2604        $user = $row;
    25992605    $user['groups'] = array();
    26002606
    26012607    array_push($users, $user);
    2602                 }
    2603 
    2604                 // Add groups list
     2608        }
     2609
     2610        // Add groups list
    26052611  // ---------------
    26062612  $user_ids = array();
     
    26082614  {
    26092615        $user_ids[$i] = $user['id'];
    2610                 }
    2611 
    2612                 return $users;
     2616        }
     2617
     2618        return $users;
    26132619}
    26142620
     
    26222628function get_ghosts_autotasks()
    26232629{
    2624                 global $conf, $page;
     2630        global $conf, $page;
    26252631
    26262632  $conf_UAM = unserialize($conf['UserAdvManager']);
     
    26282634  $users = array();
    26292635 
    2630                 // Search users depending expiration date and reminder sent
     2636        // Search users depending expiration date and reminder sent
    26312637  // --------------------------------------------------------
    26322638  $query = '
     
    26392645ORDER BY lv.lastvisit ASC;';
    26402646
    2641                 $result = pwg_query($query);
     2647        $result = pwg_query($query);
    26422648     
    2643                 while ($row = pwg_db_fetch_assoc($result))
     2649  while ($row = pwg_db_fetch_assoc($result))
    26442650  {
    26452651    array_push($users, $row);
    2646                 }
    2647  
    2648                 return $users;
     2652        }
     2653 
     2654        return $users;
    26492655}
    26502656
     
    26582664function get_user_list()
    26592665{
    2660                 global $conf, $page;
     2666        global $conf, $page;
    26612667 
    26622668  $users = array();
    26632669
    2664                 // Search users depending expiration date with exclusion of Adult_Content generic users
     2670        // Search users depending expiration date with exclusion of Adult_Content generic users
    26652671  // ------------------------------------------------------------------------------------
    26662672  $query = '
     
    26782684;';
    26792685
    2680                 $result = pwg_query($query);
     2686        $result = pwg_query($query);
    26812687     
    26822688  while ($row = pwg_db_fetch_assoc($result))
    26832689  {
    2684                 $user = $row;
     2690        $user = $row;
    26852691    $user['groups'] = array();
    26862692
    26872693    array_push($users, $user);
    2688                 }
    2689 
    2690                 // Add groups list
     2694        }
     2695
     2696        // Add groups list
    26912697  // ---------------
    26922698  $user_ids = array();
    26932699  foreach ($users as $i => $user)
    26942700  {
    2695                         $user_ids[$i] = $user['id'];
    2696                 }
    2697 
    2698                 return $users;
     2701        $user_ids[$i] = $user['id'];
     2702        }
     2703
     2704        return $users;
    26992705}
    27002706
     
    27122718        global $conf, $page;
    27132719         
    2714                 // Get ConfirmMail configuration
     2720        // Get ConfirmMail configuration
    27152721  // -----------------------------
    27162722  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
    27172723         
    2718                 // Get UAM configuration
     2724        // Get UAM configuration
    27192725  // ---------------------
    27202726  $conf_UAM = unserialize($conf['UserAdvManager']);
    27212727       
    2722                 $query = '
     2728        $query = "
    27232729SELECT registration_date
    2724   FROM '.USER_INFOS_TABLE.'
    2725 WHERE user_id = '.$id.'
    2726 ;';
    2727                 list($registration_date) = pwg_db_fetch_row(pwg_query($query));
     2730  FROM ".USER_INFOS_TABLE."
     2731WHERE user_id = '".$id."'
     2732;";
     2733        list($registration_date) = pwg_db_fetch_row(pwg_query($query));
    27282734
    27292735//              Time limit process             
    27302736// ******************************************** 
    2731                 if (!empty($registration_date))
    2732   {
    2733                                 // Dates formating and compare
    2734                 // ---------------------------
    2735                                 $today = date("d-m-Y"); // Get today's date
    2736                                 list($day, $month, $year) = explode('-', $today); // explode date of today                                               
    2737                         $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
     2737        if (!empty($registration_date))
     2738  {
     2739                // Dates formating and compare
     2740    // ---------------------------
     2741                $today = date("d-m-Y"); // Get today's date
     2742                list($day, $month, $year) = explode('-', $today); // explode date of today                                               
     2743                $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp
    27382744               
    2739                 list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
    2740                                 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
    2741                                 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
     2745          list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date
     2746                list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date
     2747                $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp
    27422748                       
    2743                                 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps     
    2744                                 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
    2745 
    2746                                 // Condition with the value set for time limit
     2749                $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps     
     2750                $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
     2751
     2752                // Condition with the value set for time limit
    27472753    // -------------------------------------------
    2748                                 if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set
    2749                                 {
    2750                                                 return false;
    2751                                 }
    2752                                 else
    2753                                 {
    2754                                                 return true;
    2755                                 }
     2754                if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set
     2755                {
     2756                        return false;
    27562757                }
     2758                else
     2759                {
     2760                        return true;
     2761                }
     2762        }
    27572763}
    27582764
     
    27672773 * Thanx to MathieuGut from http://m-gut.developpez.com
    27682774 */
    2769 function testpassword($password) // $password given by user
    2770 {
    2771 
    2772   // Variables initiation
    2773   // --------------------
     2775function testpassword($password) // Le mot de passe passé en paramètre - $password given by user
     2776{
     2777
     2778  // Initialisation des variables - Variables initiation
     2779  // ---------------------------------------------------
    27742780  $points = 0;
    27752781  $point_lowercase = 0;
     
    27782784  $point_characters = 0;
    27792785
    2780   // Getting password lengh
    2781   // ----------------------
     2786  // On récupère la longueur du mot de passe - Getting password lengh
     2787  // ----------------------------------------------------------------
    27822788  $length = strlen($password);
    2783 
    2784   // Loop to read password characters
     2789 
     2790  // On fait une boucle pour lire chaque lettre - Loop to read password characters
    27852791  for($i = 0; $i < $length; $i++)
    27862792  {
    2787     // Select each letters
    2788     // $i is 0 at first turn
    2789     // ---------------------
     2793    // On sélectionne une à une chaque lettre - Select each letters
     2794    // $i étant à 0 lors du premier passage de la boucle - $i is 0 at first turn
     2795    // -------------------------------------------------------------------------
    27902796    $letters = $password[$i];
    27912797
    27922798    if ($letters>='a' && $letters<='z')
    27932799    {
    2794       // Adding 1 point to score for a lowercase
    2795       // ---------------------------------------
    2796                                 $points = $points + 1;
    2797 
    2798                                 // Adding bonus points for lowercase
    2799       // ---------------------------------
     2800      // On ajoute 1 point pour une minuscule - Adding 1 point to score for a lowercase
     2801      // ------------------------------------------------------------------------------
     2802                  $points = $points + 1;
     2803
     2804                  // On rajoute le bonus pour une minuscule - Adding bonus points for lowercase
     2805      // --------------------------------------------------------------------------
    28002806                  $point_lowercase = 1;
    28012807    }
    28022808    else if ($letters>='A' && $letters <='Z')
    28032809    {
    2804       // Adding 2 points to score for uppercase
    2805       // --------------------------------------
     2810      // On ajoute 2 points pour une majuscule - Adding 2 points to score for uppercase
     2811      // ------------------------------------------------------------------------------
    28062812      $points = $points + 2;
    28072813               
    2808       // Adding bonus points for uppercase
    2809       // ---------------------------------
     2814      // On rajoute le bonus pour une majuscule - Adding bonus points for uppercase
     2815      // --------------------------------------------------------------------------
    28102816      $point_uppercase = 2;
    28112817    }
    28122818    else if ($letters>='0' && $letters<='9')
    28132819    {
    2814       // Adding 3 points to score for numbers
    2815       // ------------------------------------
     2820      // On ajoute 3 points pour un chiffre - Adding 3 points to score for numbers
     2821      // -------------------------------------------------------------------------
    28162822      $points = $points + 3;
    28172823               
    2818       // Adding bonus points for numbers
    2819       // -------------------------------
     2824      // On rajoute le bonus pour un chiffre - Adding bonus points for numbers
     2825      // ---------------------------------------------------------------------
    28202826      $point_numbers = 3;
    28212827    }
    28222828    else
    28232829    {
    2824       // Adding 5 points to score for special characters
    2825       // -----------------------------------------------
     2830      // On ajoute 5 points pour un caractère autre - Adding 5 points to score for special characters
     2831      // --------------------------------------------------------------------------------------------
    28262832      $points = $points + 5;
    28272833               
    2828       // Adding bonus points for special characters
    2829       // ------------------------------------------
     2834      // On rajoute le bonus pour un caractère autre - Adding bonus points for special characters
     2835      // ----------------------------------------------------------------------------------------
    28302836      $point_characters = 5;
    28312837    }
    28322838  }
    28332839
    2834   // Calculating the coefficient points/length
    2835   // -----------------------------------------
     2840  // Calcul du coefficient points/longueur - calculating the coefficient points/length
     2841  // ---------------------------------------------------------------------------------
    28362842  $step1 = $points / $length;
    28372843
    2838   // Calculation of the diversity of character types...
    2839   // --------------------------------------------------
     2844  // Calcul du coefficient de la diversité des types de caractères... - Calculation of the diversity of character types...
     2845  // ---------------------------------------------------------------------------------------------------------------------
    28402846  $step2 = $point_lowercase + $point_uppercase + $point_numbers + $point_characters;
    28412847
    2842   // Multiplying the coefficient of diversity with that of the length
    2843   // ----------------------------------------------------------------
     2848  // Multiplication du coefficient de diversité avec celui de la longueur - Multiplying the coefficient of diversity with that of the length
     2849  // --------------------------------------------------------------------------------------------------------------------------------------------
    28442850  $score = $step1 * $step2;
    28452851
    2846   // Multiplying the result by the length of the string
    2847   // --------------------------------------------------
     2852  // Multiplication du resultat par la longueur de la chaine - Multiplying the result by the length of the string
     2853  // ------------------------------------------------------------------------------------------------------------
    28482854  $finalscore = $score * $length;
    28492855
     
    29242930  global $conf;
    29252931
     2932        // Get UAM configuration
     2933  // ---------------------
     2934  $conf_UAM = unserialize($conf['UserAdvManager']);
     2935
    29262936  $query = '
    2927 SELECT UAM_validated
    2928 FROM '.USERS_TABLE.'
    2929 WHERE id='.$user_id.'
     2937SELECT group_id
     2938  FROM '.USER_GROUP_TABLE.'
     2939WHERE user_id = '.$user_id.'
     2940  AND group_id = '.$conf_UAM[2].'
    29302941;';
    29312942
    2932   $result = pwg_db_fetch_assoc(pwg_query($query));
    2933 
    2934   if($result['UAM_validated'] == 'true')
    2935   {
    2936     return true;
    2937   }
    2938   else return false;
    2939 }
    2940 
    2941 
    2942 /**
    2943  * SetUnvalidated
    2944  * Set UAM_validated field to false in #_users table
    2945  *
    2946  **/
    2947 function SetUnvalidated($user_id)
    2948 {
    2949   $query ='
    2950 UPDATE '.USERS_TABLE.'
    2951 SET UAM_validated = "false"
    2952 WHERE id = '.$user_id.'
    2953 LIMIT 1
    2954 ;';
    2955 
    2956   pwg_query($query);
     2943  $count = pwg_db_num_rows(pwg_query($query));
     2944 
     2945  if ($count == 0)
     2946  {
     2947    return true; // User is not in a "Waiting" group
     2948  }
     2949  else
     2950  {
     2951    return false; // User is still in a "Waiting" group
     2952  }
    29572953}
    29582954
     
    29952991  $user_nums = array_flip($user_ids);
    29962992
    2997   // Query to get informations in database
    2998   // -------------------------------------
     2993  // Query to get information in database
     2994  // ------------------------------------
    29992995  if (!empty($user_ids))
    30002996  {
     
    30563052  $ListTables = array(USER_CONFIRM_MAIL_TABLE, USER_LASTVISIT_TABLE);
    30573053  $j=0;
    3058 
     3054 
    30593055  while($j < count($ListTables))
    30603056  {
     
    33653361   fclose($fo) ;
    33663362}
    3367 
    33683363?>
  • extensions/UserAdvManager/branches/2.40/include/upgradedb.inc.php

    r18160 r18482  
    137137  // Create missing table
    138138  // --------------------
    139   $query = '
    140 ALTER TABLE '.USER_CONFIRM_MAIL_TABLE.'
    141 ADD reminder ENUM("true", "false") NULL DEFAULT NULL
    142 ;';
     139  $query = "
     140ALTER TABLE ".USER_CONFIRM_MAIL_TABLE."
     141ADD reminder ENUM('true', 'false') NULL DEFAULT NULL
     142;";
    143143 
    144144  pwg_query($query);
     
    623623  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
    624624}
    625 
    626 
    627 /* upgrade from 2.40.x to 2.40.6 */
    628 /* ***************************** */
    629 function upgrade_2400_2406()
    630 {
    631   global $conf;
    632   $conf_UAM = unserialize($conf['UserAdvManager']);
    633  
    634   // Piwigo's native tables modifications for validation status - Add UAM_validated column
    635   // -------------------------------------------------------------------------------------
    636   $query = '
    637 SHOW COLUMNS FROM '.USERS_TABLE.'
    638 LIKE "UAM_validated"
    639 ;';
    640  
    641   $result = pwg_query($query);
    642 
    643   if(!pwg_db_fetch_row($result))
    644   {
    645     $q = '
    646 ALTER TABLE '.USERS_TABLE.'
    647 ADD UAM_validated enum("true","false")
    648 ;';
    649     pwg_query($q);
    650   }
    651 
    652   // Fill UAM_validated column with correct information for registered and validated  users
    653   // --------------------------------------------------------------------------------------
    654                
    655                 // It goes for everybody registered in the gallery except for Guest and AC users (16 and 18)
    656   $query = '
    657 SELECT DISTINCT u.id AS id, u.username AS username
    658 FROM '.USERS_TABLE.' AS u
    659                 INNER JOIN '.USER_INFOS_TABLE.' AS ui
    660                                 ON u.id = ui.user_id
    661                 LEFT JOIN '.USER_GROUP_TABLE.' AS ug
    662                                 ON u.id = ug.user_id
    663 WHERE u.id != 2
    664                 AND u.username != \'16\'
    665                 AND u.username != \'18\'';
    666 
    667                 if ($conf_UAM[3] <> '-1' and $conf_UAM[4] == '-1')
    668                 {
    669                                 $query.= '
    670 AND ug.group_id = '.$conf_UAM[3];
    671                 }
    672                 if ($conf_UAM[3] == '-1' and $conf_UAM[4] <> '-1')
    673                 {
    674                                 $query.= '
    675 AND ui.status = \''.$conf_UAM[4]."'";
    676                 }
    677                 if ($conf_UAM[3] <> '-1' and $conf_UAM[4] <> '-1')
    678                 {
    679                                 $query.= '
    680 AND ug.group_id = '.$conf_UAM[3];
    681                 }
    682                 $query.= ';';
    683 
    684                 $result = pwg_query($query);
    685 
    686                 while($row = mysql_fetch_array($result))
    687                 {
    688                                 $query = '
    689 UPDATE '.USERS_TABLE.'
    690 SET UAM_validated=true
    691 WHERE id = '.$row['id'].'
    692 ;';
    693                                 pwg_query($query);
    694                 }
    695 
    696                 // It goes to Webmaster too
    697                 $query = '
    698 UPDATE '.USERS_TABLE.'
    699 SET UAM_validated=true
    700 WHERE id = 1
    701 ;';
    702                 pwg_query($query);
    703 }
    704625?>
  • extensions/UserAdvManager/branches/2.40/language/de_DE/plugin.lang.php

    r18160 r18482  
    1515$lang['UAM_Password: %s'] = 'Passwort: %s';
    1616$lang['UAM_Link: %s'] = 'Klicken Sie bitte auf diesen Link bestätigen Sie Ihre Anmeldung: %s';
    17 
    18 
    19 /* Email confirmation page */
    20 $lang['UAM_title_confirm_mail'] = 'Überprüfen Sie Ihre Registrierung';
    21 $lang['UAM_confirm_mail_page_title'] = 'Überprüfen Sie Ihre Registrierung';
    2217
    2318
     
    182177
    183178// --------- Starting below: New or revised $lang ---- from version 2.15.4
    184 $lang['UAM_Manual_Validation'] = 'Handbuch Validierung';
     179$lang['UAM_Force_Validation'] = 'Handbuch Validierung';
    185180$lang['UAM_Confirm_Mail_true'] = ' Aktivieren - Validation von Benutzer';
    186 $lang['UAM_Confirm_Mail_local'] = ' Aktivieren - Validation von admin';
     181$lang['UAM_Confirm_Mail_local'] = ' Aktivieren - Validation von admin (keine Validierung Key gesendet)';
    187182// --------- End: New or revised $lang ---- from version 2.15.4
    188183
     
    193188$lang['UAM_GTAuto'] = 'Automatische Verwaltung von Geist Benutzern';
    194189$lang['UAM_GTAutoDel'] = 'Automatisches Löschen von Konten';
    195 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Zugriff verweigert - Account zerstört!';
    196 $lang['UAM_title_redir_page'] = 'Zugriff verweigert sich für ein Konto zerstört!';
    197190$lang['UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'] = 'Konsistenz-Fehler in der Konfiguration gewählt:<br><br>
    198191"Einstellen der Registrierung durchgeführt und andere Optionen > Geist Besucher-Management (Geist Tracker) > Automatische Verwaltung von Geist Benutzern > Automatisches Versenden einer E-Mail beim Wechsel Gruppe / Status" kann nicht aktiviert werden, wenn "Einstellen Bestätigungen und Validierungen der Registrierung > Bestätigung der Anmeldung - Validation von Benutzer" ist zunächst nicht aktiviert.<br><br>
     
    364357$lang['UAM_RejectConnexion'] = 'Ablehnen Benutzer-Verbindung, bis die Registrierung bestätigt wird,';
    365358$lang['UAM_RejectConnexion_Custom_Txt'] = 'Passen Ablehnung Text';
    366 $lang['UAM_Reject_Page_Title'] = 'Connexion nicht erlaubt!';
    367359$lang['UAM_Restoration_NOK'] = 'Fehler beim Wiederherstellen der Konfiguration. Bitte pr';
    368360$lang['UAM_Restoration_OK'] = 'Wiederherstellen der Konfiguration wurde erfolgreich abgeschlossen! Bitte laden UAM-Administration, um die wiederhergestellten Einstellungen anzuzeigen.';
     
    403395Bitte reaktivieren Sie die Piwigo Option "e-Mail-Adresse ist obligatorisch für alle Benutzer" um dann die UAM Option "Ausschluss von Mail-Domänen" zu deaktivieren, wenn Sie das so wollen. <br> <br>
    404396Hinweis: Diese Meldung verschwindet, nachdem Sie die notwendige Korrektur vorgenommen haben und die Admin Seite neu geladen wurde. <br> <br>';
     397$lang['UAM_Manual_validation_needed_for %s'] = 'Der Benutzer% s registriert hat und wartet auf ein Admin-Handbuch Validierung.';
     398$lang['UAM_Subject admin validation for %s'] = 'Registrierung von% s wartet auf Validierung';
     399$lang['UAM_Change'] = 'Ändere die Gruppe/den Status/die Privatsphäre des Benutzers der bestätigt wurde';
     400$lang['UAM_Customize_messagesandmails'] = 'Personalisiere die Nachricht und Email';
    405401?>
  • extensions/UserAdvManager/branches/2.40/language/el_GR/plugin.lang.php

    r18160 r18482  
    2525$lang['UAM_Confirm_Status'] = 'Κατάσταση<br>(αφήστε ------- να διατηρηθεί το προεπιλεγμένο του Piwigo)';
    2626$lang['UAM_Confirm_Mail_true'] = 'Ενεργοποίηση. Επιβεβαίωση από τον χρήστη';
    27 $lang['UAM_Confirm_Mail_local'] = 'Ενεργοποίηση. Επιβεβαίωση από admin';
     27$lang['UAM_Confirm_Mail_local'] = 'Ενεργοποίηση. Επιβεβαίωση από admin (δεν στέλνετε κλειδί επιβεβαίωσης)';
    2828$lang['UAM_Confirm_Mail'] = 'Επιβεβαίωση της εγγραφής:';
    2929$lang['UAM_Confirm_Level'] = 'Επίπεδο προστασίας<br>(αφήστε------- να διατηρηθεί το προεπιλεγμένο του Piwigo)';
     
    8585$lang['UAM_Disable'] = 'Απενεργοποίηση (προεπιλογή)';
    8686$lang['UAM_Demotion of %s'] = 'Υποβιβασμός του %s';
    87 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Δεν επιτρέπεται η πρόσβαση - Λογαριασμός καταργήθηκε!';
    8887$lang['UAM_Delete_selected'] = 'Διαγραφή';
    8988$lang['UAM_Default_ValidationTimeout_Txt'] = 'Λυπούμαστε, ο λογαριασμός σας έχει διαγραφεί επειδή δεν έχετε επιβεβαιώσει την εγγραφή σας στο ζητούμενο χρόνο ([Kdays] ημέρες). Παρακαλώ, δοκιμάστε ξανά εγγραφή με ένα έγκυρο και όχι μπλοκαρισμένο λογαριασμό email.';
     
    116115$lang['UAM_GTAutoDel'] = 'Αυτόματη διαγραφή των λογαριασμών';
    117116$lang['UAM_GTAuto'] = 'Αυτόματη διαχείριση των ghosts users';
    118 $lang['UAM_Manual_Validation'] = 'Χειροκίνητη επιβεβαίωση';
     117$lang['UAM_Force_Validation'] = 'Χειροκίνητη επιβεβαίωση';
    119118$lang['UAM_Expired_Status'] = '<b>Η Κατάσταση</b> για την εγγραφή του χρήστη έχει λήξει<br>';
    120119$lang['UAM_Expired_Level'] = '<b>Το επίπεδο προστασίας</b> για την εγγραφή του χρήστη έχει λήξει<br>';
     
    283282$lang['UAM_RejectConnexion_Custom_Txt'] = 'Προσαρμογή του κειμένου απόρριψης';
    284283$lang['UAM_Reminder'] = 'Αποστολή υπενθύμισης';
    285 $lang['UAM_Reject_Page_Title'] = 'Η σύνδεση δεν επιτρέπεται!';
    286284$lang['UAM_RejectConnexion'] = 'Απόρριψη σύνδεσης στο χρήστη μέχρι καταχώριση επιβεβαίωσης';
    287285$lang['UAM_Registration_Date'] = 'Ημερομηνία εγγραφής';
     
    297295$lang['UAM_Password: %s'] = 'Κωδικός: %s';
    298296$lang['UAM_Password reset selected users'] = 'Αίτηση ανανέωσης κωδικού πρόσβασης για επιλεγμένους χρήστες';
    299 $lang['UAM_title_redir_page'] = 'Δεν επιτρέπεται η πρόσβαση έχοντας ένα λογαριασμό που καταργήθηκε!';
    300 $lang['UAM_title_confirm_mail'] = 'Επιβεβαιώστε την εγγραφή σας';
    301297$lang['UAM_submit'] = 'Υποβολή ρυθμίσεων';
    302298$lang['UAM_save_config'] = 'Η Διαμόρφωση αποθηκεύτηκε.';
     
    315311$lang['UAM_confirmmail_custom_Txt2'] = 'Κείμενο της σελίδας επιβεβαίωσης - Επιβεβαίωση μη αποδεκτή';
    316312$lang['UAM_confirmmail_custom_Txt1'] = 'Κείμενο της σελίδας επιβεβαίωσης - Επιβεβαίωση αποδεκτή';
    317 $lang['UAM_confirm_mail_page_title'] = 'Επιβεβαιώστε την εγγραφή σας';
    318313$lang['UAM_audit_ok'] = 'Παρακολούθηση ΟΚ';
    319314$lang['UAM_audit'] = 'Ρυθμίσεις Παρακολούθησης';
     
    336331Παρακαλούμε, Επανενεργοποιήσατε την επιλογή του Piwigo "Η διεύθυνση email είναι υποχρεωτική για όλους τους χρήστες" για να είσαστε σε θέση στη συνέχεια να απενεργοποιήσετε την επιλογή του UAM "Αποκλεισμός τομέων email" αν είναι αυτό που θέλετε. <br><br>
    337332Σημείωση: Αυτό το μήνυμα θα εξαφανιστεί αφού έχετε κάνει την απαραίτητη διόρθωση και την επαναφόρτωση της σελίδας του διαχειριστή.<br><br>';
    338 $lang['UAM_Subject admin validation for %s'] = 'Η καταχώρηση των %s αναμένει επικύρωση';
    339 $lang['UAM_Manual_validation_needed_for %s'] = 'Ο χρήστης % καταχωρήθηκε και περιμένει χειροκίνητη επικύρωση από τον διαχειριστή';
    340333?>
  • extensions/UserAdvManager/branches/2.40/language/en_UK/help.lang.php

    r18160 r18482  
    219219<br><br>
    220220<b>Table Sorting Function</b>: You can sort the data displayed by clicking on the column headers. Hold the SHIFT key to sort up to 4 simultaneous columns.';
    221 $lang['UAM_confirmmailTitle_d'] = 'This option allows a user to either confirm registration by clicking on a link received in an email sent upon registration or administrators to manually activate the registration.
    222 <br><br>
    223 In first case, the e-mail is composed of a customizable part to introduce a little welcome note and a fixed part containing the activation link that is generated from a random key that can possibly regenerate through the &quot;Tracking confirmations&quot; tab.
    224 <br><br>
    225 In second case, the validation link is send to the gallery administrators. Visitors have to wait until an administrator confirm them himself by using the validation link or in &quot;confirmation tracking&quot; tab.
     221$lang['UAM_confirmmailTitle_d'] = 'This option allows a user to either confirm registration by clicking on a link received in an email sent upon registration or the administrator to manually activate the registration.<br><br>
     222In first case, the e-mail is composed of a customizable part to introduce a little welcome note and a fixed part containing the activation link that is generated from a random key that can possibly regenerate through the &quot;Tracking confirmations&quot; tab.<br><br>
     223In second case, <b><u>there is no confirmation key send by email!</u></b>. Visitors have to wait until an administrator confirm them himself in &quot;confirmation tracking&quot; tab. It\s recommanded to activate the Piwigo\'s option &quot;Email admins when a new user registers&quot; (see in Piwigo\'s configuration options) and to use the &quot;Information email to user&quot; to warn new registers to wait on their account activation.
    226224<br>
    227225<b style=&quot;color: red;&quot;>NB: Options &quot;Deadline for confirmation of registration limited&quot; and &quot;Remind unconfirmed users  &quot; have to be set to off when admin\'s manual confirmation is enabled.</b>
  • extensions/UserAdvManager/branches/2.40/language/en_UK/plugin.lang.php

    r18160 r18482  
    1414$lang['UAM_User: %s'] = 'User : %s';
    1515$lang['UAM_Password: %s'] = 'Password: %s';
    16 $lang['UAM_Link: %s'] = 'Please, click on this link to confirm the registration : %s';
     16$lang['UAM_Link: %s'] = 'Please, click on this link to confirm your registration : %s';
    1717
    1818
     
    155155
    156156// --------- Starting below: New or revised $lang ---- from version 2.15.4
    157 $lang['UAM_Manual_Validation'] = 'Manual confirmation';
     157$lang['UAM_Force_Validation'] = 'Manual confirmation';
    158158$lang['UAM_Confirm_Mail_true'] = ' Enable - Confirmation by user';
    159 $lang['UAM_Confirm_Mail_local'] = ' Enable - Confirmation by admin';
     159$lang['UAM_Confirm_Mail_local'] = ' Enable - Confirmation by admin (no confirmation key sent)';
    160160// --------- End: New or revised $lang ---- from version 2.15.4
    161161
     
    166166$lang['UAM_GTAuto'] = 'Automatic management of ghosts users';
    167167$lang['UAM_GTAutoDel'] = 'Automatic deletion of accounts';
    168 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Access denied - Account destroyed!';
    169 $lang['UAM_title_redir_page'] = 'Access denied for having an account destroyed!';
    170168$lang['UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'] = 'Consistency error in the chosen configuration:
    171169<br><br>
     
    252250$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.';
    253251$lang['UAM_Default_PwdRequest_Txt'] = 'You have requested a password reset on our gallery. Please, find below your new connection settings.';
    254 $lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Welcome [username]! You have confirmed that you are human and may now use [mygallery]!';
     252$lang['UAM_Default_CfmMail_Custom_Txt1'] = '[username] account successfully validated!';
    255253$lang['UAM_DumpTxt'] = 'Backup and restore your configuration';
    256254$lang['UAM_Restore'] = 'To restore the backup file of your configuration. Only the saved file on the server is taken into account.
     
    278276$lang['UAM_NewFeature'] = 'New feature !';
    279277$lang['UAM_RejectConnexion_Custom_Txt'] = 'Customize rejection text';
    280 $lang['UAM_Reject_Page_Title'] = 'Connexion not allowed !';
    281278// --------- End: New or revised $lang ---- from version 2.30.2
    282279
     
    289286$lang['UAM_Stuffs_Desc'] = 'Adds an information block for unconfirmed users';
    290287/* Email confirmation page */
    291 $lang['UAM_title_confirm_mail'] = 'Confirm your registration';
    292 $lang['UAM_confirm_mail_page_title'] = 'Confirm your registration';
    293288$lang['UAM_%d_Validated_User'] = '%d User confirmed manually';
    294289$lang['UAM_%d_Validated_Users'] = '%d Users confirmed manually';
     
    397392
    398393Note: After this period, your account will be permanently deleted.';
    399 $lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Your activation key is incorrect or expired or you have already confirmed your account, please contact the webmaster to fix this problem.';
     394$lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Incorrect / expired activation key or account already validated.';
    400395$lang['UAM_RejectConnexion'] = 'Reject user\'s connexion until registration is confirmed';
    401 $lang['UAM_Default_RejectConnexion_Txt'] = 'Sorry, you don\'t have confirmed your registration yet, so you can\'t connect the gallery now. Please check your email box. You should find an email sent by the gallery, containing a link to perform your confirmation. If not, please contact the webmaster.';
     396$lang['UAM_Default_RejectConnexion_Txt'] = 'Sorry, your registration is not validated yet, so you can\'t connect the gallery now.';
    402397$lang['UAM_Tracking registered users'] = 'Tracking registered users';
    403398$lang['UAM_Tracking confirmations'] = 'Tracking confirmations';
     
    427422Note: This message will disappear after you have made the necessary correction and reloaded the admin page.<br><br>';
    428423// --------- End: New or revised $lang ---- from version 2.40.4 and 2.30.7
    429 
    430 
    431 // --------- Starting below: New or revised $lang ---- from version 2.41.0
    432 $lang['UAM_Subject admin validation for %s'] = 'Registration of %s waits for validation';
    433 $lang['UAM_Manual_validation_needed_for %s'] = 'The user %s has registered and awaits for manual validation by an admin.';
    434 // --------- End: New or revised $lang ---- from version 2.41.0
    435424?>
  • extensions/UserAdvManager/branches/2.40/language/es_ES/plugin.lang.php

    r18160 r18482  
    1515$lang['UAM_Password: %s'] = 'Contraseña: %s';
    1616$lang['UAM_Link: %s'] = 'Por favor, haga clic en este enlace para confirmar su registro: %s';
    17 
    18 
    19 /* Email confirmation page */
    20 $lang['UAM_title_confirm_mail'] = 'Validar su inscripción';
    21 $lang['UAM_confirm_mail_page_title'] = 'Validar su inscripción';
    2217
    2318
     
    215210
    216211// --------- Starting below: New or revised $lang ---- from version 2.15.4
    217 $lang['UAM_Manual_Validation'] = 'Validación manual';
     212$lang['UAM_Force_Validation'] = 'Validación manual';
    218213$lang['UAM_Confirm_Mail_true'] = ' Activar - La validación por el usuario';
    219 $lang['UAM_Confirm_Mail_local'] = ' Activar - La validación por el administrador';
     214$lang['UAM_Confirm_Mail_local'] = ' Activar - La validación por el administrador (sin clave de validación enviado)';
    220215// --------- End: New or revised $lang ---- from version 2.15.4
    221216
     
    226221$lang['UAM_GTAuto'] = 'Gestión automática de los Espíritus usuarios';
    227222$lang['UAM_GTAutoDel'] = 'Borrado automático de las cuentas';
    228 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Acceso denegado - Cuenta destruido!';
    229 $lang['UAM_title_redir_page'] = 'Acceso denegado por haber destruido una cuenta!';
    230223$lang['UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'] = 'Error de coherencia en la configuración elegida:<br><br>
    231224"Configuración de los registros seguidos y otras opciones > Gestión de Espíritu visitantes (Tracker Ghost) > Gestión automática de los Espíritus usuarios > Automáticamente el envío de un correo electrónico cuando se cambia de grupo / estado" no se puede activar si "Configuración de las confirmaciones y validaciones de registro > Confirmación de registro - La validación por el usuario" no está habilitada en un principio.<br><br>
     
    326319$lang['UAM_Restoration_OK'] = 'Restauración de la configuración completada con éxito! Vuelve a cargar la página de administración UAM para ver la configuración restaurada.';
    327320$lang['UAM_Restoration_NOK'] = 'Se produjo un error mientras se restaura la configuración. Por favor, compruebe la validez de su archivo de copia de seguridad.';
    328 $lang['UAM_Reject_Page_Title'] = 'Conexión no permitida !';
    329321$lang['UAM_RejectConnexion_Custom_Txt'] = 'Personalización del texto de rechazo';
    330322$lang['UAM_RejectConnexion'] = 'Rechazar conexión del usuario hasta que el registro se confirma';
     
    398390
    399391Para completar el proceso y ser capaz de navegar a través de las imágenes, confirme por favor su registro haciendo clic en el vínculo de este mensaje.';
     392$lang['UAM_Manual_validation_needed_for %s'] = 'El usuario %s se ha registrado y espera para la validación manual por un administrador.';
     393$lang['UAM_Subject admin validation for %s'] = 'El registro de %s espera para la validación';
    400394?>
  • extensions/UserAdvManager/branches/2.40/language/fr_FR/help.lang.php

    r18160 r18482  
    249249Dans le premier cas, le message envoyé comprend une partie fixe, avec le lien d\'activation généré à partir d\'une clef aléatoire (cette clé peut éventuellement être régénérée via l\'onglet &quot;Suivi des confirmations&quot;), et une partie personnalisable par un texte d\'accueil.
    250250<br><br>
    251 Dans le second cas, l\'email avec lien de validation est envoyé aux administrateurs de la galerie. Les visiteurs doivent patienter qu\'un administrateur valide lui même leur inscription soit par ce lien, soit par l\'onglet &quot;Suivi des confirmations&quot;.
     251Dans le second cas, <b><u>il n\'y a pas d\'envoi de clé de confirmation par email</u></b>. Les visiteurs doivent patienter que l\'administrateur valide lui même leur inscription via l\'onglet &quot;Suivi des confirmations&quot;. Il est conseillé d\'activer la notification des administrateurs lors des inscriptions (voir la configuration des options de Piwigo) et d\'utiliser la fonction &quot;Email d\'information à l\'utilisateur&quot; pour avertir les nouveaux inscrits de la nécessité de patienter avant activation de leur compte.
    252252<br>
    253253<b style=&quot;color: red;&quot;>NB: Les options &quot;Limitation du délai de confirmation d\'inscription&quot; et &quot;Mail de rappel aux inscrits non confirmés&quot; doivent être désactivées lorsque la confirmation manuelle est active.</b>
  • extensions/UserAdvManager/branches/2.40/language/fr_FR/plugin.lang.php

    r18160 r18482  
    1414$lang['UAM_User: %s'] = 'Utilisateur : %s';
    1515$lang['UAM_Password: %s'] = 'Mot de passe: %s';
    16 $lang['UAM_Link: %s'] = 'Cliquez sur le lien suivant pour confirmer l\'inscription : %s';
    17 
    18 
    19 /* Email confirmation page */
    20 $lang['UAM_title_confirm_mail'] = 'Confirmation de votre inscription';
    21 $lang['UAM_confirm_mail_page_title'] = 'Confirmation d\'inscription';
     16$lang['UAM_Link: %s'] = 'Cliquez sur le lien suivant pour confirmer votre inscription : %s';
    2217
    2318
     
    167162
    168163// --------- Starting below: New or revised $lang ---- from version 2.15.4
    169 $lang['UAM_Manual_Validation'] = 'Confirmation manuelle';
     164$lang['UAM_Force_Validation'] = 'Confirmation manuelle';
    170165$lang['UAM_Confirm_Mail_true'] = ' Activer - Confirmation par le visiteur';
    171 $lang['UAM_Confirm_Mail_local'] = ' Activer - Confirmation par l\'administrateur';
     166$lang['UAM_Confirm_Mail_local'] = ' Activer - Confirmation par l\'administrateur (pas d\'envoi de clé de confirmation)';
    172167// --------- End: New or revised $lang ---- from version 2.15.4
    173168
     
    178173$lang['UAM_GTAuto'] = 'Gestion automatique des utilisateurs fantomes';
    179174$lang['UAM_GTAutoDel'] = 'Suppressions automatiques des comptes';
    180 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Accès refusé - Compte détruit !';
    181 $lang['UAM_title_redir_page'] = 'Accès refusé pour cause de compte détruit !';
    182175$lang['UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'] = 'Erreur de cohérence dans la configuration choisie :
    183176<br><br>
     
    262255$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.';
    263256$lang['UAM_Default_PwdRequest_Txt'] = 'Vous avez demandé le renouvellement de votre mot de passe. Veuillez trouver ci-dessous vos nouvelles informations de connexion.';
    264 $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]!';
     257$lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Le compte de [username] a été validé avec succès !';
    265258$lang['UAM_DumpTxt'] = 'Sauvegarde et restauration de votre configuration';
    266259$lang['UAM_Restore'] = 'Pour restaurer le fichier de sauvegarde de votre configuration. Seul le fichier sauvegardé sur le serveur est pris en compte.
     
    287280$lang['UAM_NewFeature'] = 'Nouvelle option !';
    288281$lang['UAM_RejectConnexion_Custom_Txt'] = 'Personnaliser le texte de la page de rejet de la connexion';
    289 $lang['UAM_Reject_Page_Title'] = 'Connexion refusée !';
    290282// --------- End: New or revised $lang ---- from version 2.30.2
    291283
     
    397389
    398390Note: A l\'issue de cette période sans confirmation, votre compte sera définitivement supprimé.';
    399 $lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Votre clé d\'activation est incorrecte ou expirée ou vous avez déjà confirmé votre inscription. Merci de contacter le webmestre de la galerie pour résoudre le problème.';
     391$lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Clé d\'activation incorrecte / expirée ou inscription déjà validée.';
    400392$lang['UAM_RejectConnexion'] = 'Rejeter les connexions des utilisateurs non confirmés';
    401393$lang['UAM_Default_CfmMail_Remail_Txt1'] = 'Bonjour [username].
     
    404396
    405397Note: A l\'issue de cette période sans confirmation, votre compte sera définitivement supprimé.';
    406 $lang['UAM_Default_RejectConnexion_Txt'] = 'Désolé, vous n\'avez pas encore confirmé votre inscription et vous ne pouvez pas vous connecter maintenant. Merci de vérifier votre boite aux lettres. Vous devriez y trouver un message comportant un lien pour confirmer votre inscription. Si ce n\'est pas le cas, merci de contacter l\'administrateur de la galerie.';
     398$lang['UAM_Default_RejectConnexion_Txt'] = 'Désolé, votre inscription n\'est pas encore validée et vous ne pouvez pas vous connecter maintenant.';
    407399$lang['UAM_Tracking registered users'] = 'Suivi des utilisateurs inscrits';
    408400$lang['UAM_Tracking confirmations'] = 'Suivi des confirmations';
     
    432424Note : Ce message disparaitra après que vous ayez effectué la correction nécessaire et rechargé la page d\'administration.<br><br>';
    433425// --------- End: New or revised $lang ---- from version 2.40.4 and 2.30.7
    434 
    435 // --------- Starting below: New or revised $lang ---- from version 2.41.0
    436 $lang['UAM_Subject admin validation for %s'] = 'Inscription de %s à valider';
    437 $lang['UAM_Manual_validation_needed_for %s'] = 'L\'utilisateur %s s\'est inscrit et demande une validation manuelle par un administrateur.';
    438 // --------- End: New or revised $lang ---- from version 2.41.0
    439426?>
  • extensions/UserAdvManager/branches/2.40/language/hu_HU/plugin.lang.php

    r18160 r18482  
    1515$lang['UAM_Password: %s'] = 'Jelszó: %s';
    1616$lang['UAM_Link: %s'] = 'Kérlek, klikkelj ide a regisztrációd érvényesítéséhez : %s';
    17 
    18 
    19 /* Email confirmation page */
    20 $lang['UAM_title_confirm_mail'] = 'Érvényesítsd a regisztrációdat';
    21 $lang['UAM_confirm_mail_page_title'] = 'Érvényesítsd a regisztrációdat';
    2217
    2318
     
    176171
    177172// --------- Starting below: New or revised $lang ---- from version 2.15.4
    178 $lang['UAM_Manual_Validation'] = 'Kézi érvényesítés';
     173$lang['UAM_Force_Validation'] = 'Kézi érvényesítés';
    179174$lang['UAM_Confirm_Mail_true'] = ' Bekapcsolva - Érvényesítés a felhasználó által';
    180 $lang['UAM_Confirm_Mail_local'] = ' Bekapcsolva - Érvényesítés az adminisztrátor által';
     175$lang['UAM_Confirm_Mail_local'] = ' Bekapcsolva - Érvényesítés az adminisztrátor által (nincs érvényesítő kulcs küldés)';
    181176// --------- End: New or revised $lang ---- from version 2.15.4
    182177
     
    187182$lang['UAM_GTAuto'] = 'Szellem-felhasználók automatikus követése';
    188183$lang['UAM_GTAutoDel'] = 'Azonosítók automatikus törlése';
    189 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Hozzáférés megtagadva - Azonosító megsemmisítve!';
    190 $lang['UAM_title_redir_page'] = 'Hozzáférés megtagadva azonosító megsemmisítése miatt!';
    191184$lang['UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'] = 'Következetlenség a választott konfigurációban:
    192185<br><br>
  • extensions/UserAdvManager/branches/2.40/language/it_IT/plugin.lang.php

    r18160 r18482  
    1515$lang['UAM_Password: %s'] = 'Password: %s';
    1616$lang['UAM_Link: %s'] = 'Cliccare su questo link per confermare la vostra iscrizione: %s';
    17 
    18 
    19 /* Email confirmation page */
    20 $lang['UAM_title_confirm_mail'] = 'Conferma la tua iscrizione';
    21 $lang['UAM_confirm_mail_page_title'] = 'Conferma la tua iscrizione';
    2217
    2318
     
    175170
    176171// --------- Starting below: New or revised $lang ---- from version 2.15.4
    177 $lang['UAM_Manual_Validation'] = 'Conferma manuale';
     172$lang['UAM_Force_Validation'] = 'Conferma manuale';
    178173$lang['UAM_Confirm_Mail_true'] = ' Attivare - Validazione da parte dell\'utente';
    179 $lang['UAM_Confirm_Mail_local'] = ' Attivare - Validazione da parte di un amministratore';
     174$lang['UAM_Confirm_Mail_local'] = ' Attivare - Validazione da parte di un amministratore (nessuna chiave di validazione inviata)';
    180175// --------- End: New or revised $lang ---- from version 2.15.4
    181176
     
    186181$lang['UAM_GTAuto'] = 'Gestione automatica degli utenti fantasma';
    187182$lang['UAM_GTAutoDel'] = 'Cancellazione automatica degli account';
    188 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Accesso negato - Account eliminato!';
    189 $lang['UAM_title_redir_page'] = 'Accesso negato per aver cancellato l\'account!';
    190183$lang['UAM_Error_GTAutoMail_cannot_be_set_without_ConfirmMail'] = 'Errore di coerenza nella configurazione prescelta :
    191184<br><br>
     
    351344
    352345Distinti saluti,
    353 L\'amministratore della galleria [mygallery] - [myurl]';
     346L\'amministratore della galleria [mygallery] - [myurl]
    354347Alla ricezione di questo messaggio e non ricevendo altre visite entro [days] giorni, saremo obbligati a cancellare l\'account.
    355348
     
    360353Sono state apportate modifiche significative nel tuo profilo sul gallery [mygallery]. Ti prego di trovare di seguito le nuove impostazioni:';
    361354
    362 Sono state apportate modifiche significative nel tuo profilo sul gallery [mygallery]. Per favore, di seguito troverete le nuove impostazioni:';
    363355$lang['UAM_Default_PwdRequest_Txt'] = 'Hai richiesto il rinnovo della password. Qui sotto trovi i nuovi dati di connessione';
    364356$lang['UAM_Default_RejectConnexion_Txt'] = 'Siamo spiacenti, non hai ancora confermato la registrazione, perciò non ti puoi connettere ora alla galleria. Controlla la tua casella mail. Dovresti trovare una mail inviata dalla galleria, contenente un link per eseguire la conferma. Se non la trovi, contatta il webmaster.';
     
    381373$lang['UAM_RejectConnexion'] = 'Rifiuta connessione dell\'utente finchè non è confermata la registrazione';
    382374$lang['UAM_RejectConnexion_Custom_Txt'] = 'Personalizza testo di rifiuto';
    383 $lang['UAM_Reject_Page_Title'] = 'Connessione non permessa!';
    384375$lang['UAM_Restoration_NOK'] = 'E\' avvenuto un errore durante il ripristino della configurazione. Controlla la validità del file di backup.';
    385376$lang['UAM_Restoration_OK'] = 'Il ripristino della configurazione è stato completato con successo! Ricarica la pagina di amministrazione di UAM per vedere la configurazione ripristinata.';
     
    411402Si prega di riabilitare in Piwigo "L\'indirizzo email è obbligatorio per tutti gli utenti", al fine di disattivare poi l\'opzione UAM "esclusione domini di posta" se è quello che vuoi.<br><br>
    412403Nota: Questo messaggio scompare dopo aver effettuato la correzione necessaria e ricaricato la pagina di amministrazione <br>';
     404$lang['UAM_Manual_validation_needed_for %s'] = 'L\'utente %s si è registrato ed è in attesa dell\'approvazione manuale da parte dell\'amministratore.';
     405$lang['UAM_Subject admin validation for %s'] = 'La registrazione di %s è in attesa di approvazione';
    413406?>
  • extensions/UserAdvManager/branches/2.40/language/lv_LV/help.lang.php

    r14366 r18482  
    4343
    4444// --------- Starting below: New or revised $lang ---- from version 2.15.2
    45 $lang['UAM_casenTitle_d'] = 'Pēc noklusējuma Piwigo ir reģistrjutīgs:
    46 Lielie un mazie burti, veidojot vārdus pie reģistrācijas, tiek uztverti kā atsevišķas rakstzīmes. Tādējādi, &quot;Foo&quot;,
    47 &quot;foo&quot; un &quot;FOO&quot; var būt 3 atšķirīgi lietotāji.<br><br>
    48 Šīs opcijas iespējošana ļauj izanalizēt visas iespējas &quot;foo&quot; kā viena lietotāja gadījumā. Ja &quot;foo&quot; jau eksistē, jauna lietotāja &quot;Foo&quot; izveidošana tiks noraidīta.<br><br>
    49 <b style=&quot;color: red;&quot;>Uzmanību: Šī opcija neattiecas uz lietotājvārdiem, kas izveidoti pirms šīs opcijas aktivēšanas.</b>';
    5045// --------- End: New or revised $lang ---- from version 2.15.2
    5146
     
    139134<br><br>Šis automātiskais process tiek iedarbināts lietotājiem (jebkuram lietotājam!) pieslēdzoties galerijai.';
    140135$lang['UAM_GTAutoDelTitle'] = 'Pielāgots ziņojums par dzēstu kontu';
    141 $lang['UAM_GTAutoGpTitle'] = 'Grupas/stausa automātiskā nomaiņa';
    142136$lang['UAM_GTAutoGpTitle_d'] = 'Automātiska konta grupas vai statusa maiņa ir ekvivalenta kontu, kas ir iesaistīti un darbojas uz vieniem un tiem pašiem principiem kā validācijas grupas, funkcionalitātes pazemināšanai (skatīt &quot;Setting confirmations and validations of registration&quot;).
    143137Tādējādi jānosaka mainīto (pazemināto) grupu un/vai statusa piekļuves tiesības galerijai. Ja tas jau izdarītslietojot reģistrācijas apstiprināšanas funkciju, varat lietot to pašu grupu vai statusu.<br><br>
    144138<b style=&quot;color: red;&quot;>Important note :</b> Ja no slēptā ghost lietotāja pēc termiņa limita, neskatoties uz informēšanu ar e-pastu (ja iespējots), nav nekādas ziņas, viņš automātiski tie dzēsts no datu bāzes';
    145139// --------- End: New or revised $lang ---- from version 2.16.0
     140$lang['UAM_StuffsTitle_d'] = 'Šis iespējo papildus UAM bloku PWG Stuff spraudnī (ja instalēts), lai informētu apmeklētājus, kas kādu iemslu dēļ nav apstiprinājuši savu reģistrāciju.
     141<br><br>
     142Lūdzu pēc detaļām griezties <b>Tips and Examples of Use</b> šīs lapas apakšā. ';
     143$lang['UAM_HidePasswTitle_d'] = 'Izvēlieties šeit, ja gribat, lai apmeklētāja parole tiktu ietverta informatīvajā e-pastā. Ja iespējojat šo opciju, tad parole tiek atainota atklātā tekstā. Ja to neiespējojat, tad parole netiek rādīta vispār.';
     144$lang['UAM_GT_MainTitle_d'] = '-Automātiska vai manuāla slēpto lietotāju pārvaldība<br>
     145-E-pasta sūtīšana<br>';
     146$lang['UAM_confirmlevelTitle_d'] = '<b style=&quot;color: red;&quot;>UZMANĪBU: Privātuma līmeņa lietošana prasa, lai jūs lietotu to kopā ar savām bildēm. Detalizētāka informācija Piwigo documentācijā.</b><br><br>
     147Privātuma līmenis ir validēts lietošanai saistībā ar &quot;Reģistrācijas apstiprināšanu&quot;';
     148$lang['UAM_confirmlevelTitle'] = 'Privātuma līmenis';
     149$lang['UAM_USRAutoMailTitle_d'] = 'Kad aktivizēta, šī funkcija automātiski izsūta personificēta satura informāciju &quot;Atgādinājuma e-pastā ar no jauna izveidotu atslēgu&quot; apmeklētājiem, kuri atbilst kritērijiem.';
     150$lang['UAM_Tracking registered users_d'] = 'Šis aktivizē tabulu &quot;Izsekošanā reģistrētie lietotāji&quot; saraksts, kur piefiksēti galeriju apmeklējušie reģistrētie lietotāji, pēdējā apmeklējuma datums un apmeklējuma ilgums (dienās) kopš viņu pēdējā apmeklējuma. Monitorings ir tīri informatīva rakstura, domāts galerijas administratora vajadzībām.';
     151$lang['UAM_RejectConnexion_Custom_Txt_d'] = 'Pielāgojiet šeit savu paskaidrojuma teskstu neapstiprinātajiem lietotājiem, ka viņi nevarēs tikt galerijā, kamēr nebūs apstiprinājuši savu reģistrāciju.
     152<br><br>
     153Šis lauks ir savietojams ar FCK Redaktoru un, lai lietotu daudzvalodu režīmu, var izmantot Paplašinātā apraksta spraudņa, ja tas ir aktivizēts, [lang] iezīmes (tags).  ';
     154$lang['UAM_RejectConnexion_d'] = 'Ja aktivizēts, no jauna reģistrētie lietotāji, kas nav apstiprinājuši savu reģistrāciju, nevarēs piekļūt galerijai. Tie tiks pārsūtīti uz speciālu lapu, kur tiks informēti par radušos situāciju.
     155<br><br>
     156<b style=&quot;color: red;&quot;>Uzmanību - Šī funkcija darbojas tikai sasaistē ar apstiprinājuma grupām! Skatīt zemā, lai iestatītu grupas kā tas pieprasīts.</b>';
     157$lang['UAM_infotxtTitle_d'] = 'Ievadiet ievadtekstu, ko vēlaties atspoguļot informējošajā e-pastā.
     158<br><br>
     159Tālāk pielāgojiet saturu, izmantojot speciālos tegus (iezīmes):<br>
     160- <b style=&quot;color: red;&quot;>[username]</b> lai automātiski ievietotu galējā e-pasta lietotāja vārdu.<br>
     161- <b style=&quot;color: red;&quot;>[mygallery]</b> lai ievietotu jūsu galerijas nosaukumu.<br>
     162- <b style=&quot;color: red;&quot;>[myurl]</b> lai ievietotu jūsu galerijas URL, ja tas iestatīts Piwigo konfigurācijā.
     163<br><br>
     164Lai izmantotu daudzvalodu režīmu, varat lietot Paplašinātā apraksta spraudņa iezīmes, gadījumā, ja spraudnis aktivizēts. ';
     165$lang['UAM_infomailTitle_d'] = 'Šī opcija ļauj lietotājam, kad viņš savā profilā izmaina savu paroli vai e-pasta adresi, automātiski nosūtīt informējošu e-pasta vēstuli.<br><br>
     166Nosūtās informācijas teksts sastāv no pielāgojamas ievaddaļas un fiksētās daļas, kas atspoguļo lietotāja lietotājvārdu, paroli un e-pasta adresi.  ';
     167$lang['UAM_confirmtxtTitle_d'] = 'Ievadiet ievadtekstu, ko vēlaties redzēt reģistrāciju apstiprinošajā e-pastā.<br><br>
     168Tālāk pielāgojiet saturu ar speciāli ievietojamiem tegiem(iezīmēm):<br>
     169- <b style=&quot;color: red;&quot;>[username]</b> lai automātiski ievietotu e-pasta gala lietotāja vārdu.<br>
     170- <b style=&quot;color: red;&quot;>[mygallery]</b> lai ievietotu jūsu galerijas nosaukumu.<br>
     171- <b style=&quot;color: red;&quot;>[myurl]</b> lai ievietotu jūsu galerijas URL, ja tas izvēlēts Piwigo konfigurācijas iestatījumos.<br>
     172- <b style=&quot;color: red;&quot;>[Kdays]</b> lai ievietotu astiprināšanai atvēlēto dienu limitu (&quot;Reģistrācijas apstiprināšanas termiņam;&quot; jābūt iestatītam).
     173<br><br>
     174';
     175$lang['UAM_CustomPasswRetrTitle_d'] = 'Pēc noklusēšanas, kad lietotājs ir pazaudējis savu paroli un izvēlas tās atjaunošanas iespēju, viņš ar e-pastu saņem tikai savu lietotājvārdu un jauno paroli.
     176<br><br>
     177Šeit, <b><u>pirms</u></b> standartziņojuma, ir iespēja ievadīt tekstu pēc jūsu ieskatiem.
     178<br><br>
     179Tālāk pielāgojiet ziņojuma saturu ar speciāli ievietojamajiem tegiem (iezīmēm):<br>
     180- <b style=&quot;color: red;&quot;>[mygallery]</b> lai ievadītu jūsu galerijas nosaukumu.<br>
     181- <b style=&quot;color: red;&quot;>[myurl]</b> Lai ievadītu jūsu galerijas URL, ja tas iestatīts Piwigo konfigurācijā.
     182<br><br>
     183Lai lietotu vairākas valodas, ja aktivēts, varat izmantot Paplašinātā apraksta spraudņa tegus.';
    146184?>
  • extensions/UserAdvManager/branches/2.40/language/lv_LV/plugin.lang.php

    r18160 r18482  
    1515$lang['UAM_Password: %s'] = 'Parole: %s';
    1616$lang['UAM_Link: %s'] = 'Lūdzu, uzklikšķiniet uz šīs saites, lai apstiprinātu savu reģistrāciju : %s';
    17 
    18 
    19 /* Email confirmation page */
    20 $lang['UAM_title_confirm_mail'] = 'Apstipriniet savu reģistrāciju';
    21 $lang['UAM_confirm_mail_page_title'] = 'Apstipriniet savu reģistrāciju';
    2217
    2318
     
    213208
    214209// --------- Starting below: New or revised $lang ---- from version 2.15.4
    215 $lang['UAM_Manual_Validation'] = 'Manuālā apstiprināšana';
     210$lang['UAM_Force_Validation'] = 'Manuālā apstiprināšana';
    216211$lang['UAM_Confirm_Mail_true'] = ' Iespējot – Apstiprinājis lietotājs';
    217 $lang['UAM_Confirm_Mail_local'] = ' Iespējot – Apstiprinājis administrators';
     212$lang['UAM_Confirm_Mail_local'] = ' Iespējot – Apstiprinājis administrators (netika nosūtīta apstiprināšanas atslēga)';
    218213// --------- End: New or revised $lang ---- from version 2.15.4
    219214
     
    238233$lang['UAM_RejectConnexion_Custom_Txt'] = 'Pielāgot noraidījuma tekstu';
    239234$lang['UAM_RejectConnexion'] = 'Noraidīt lietotāja konekciju, kamēr reģistrācija nav apstiprināta';
    240 $lang['UAM_Reject_Page_Title'] = 'Konekcija nav atļauta!';
    241235$lang['UAM_Admins cannot be pwdreset'] = 'Paroles atjaunošanu nevar veikt admins kontam!';
    242236$lang['UAM_Confirm_Level'] = 'Konfidencialitātes līmenis (atstāt ------- lai paturētu Piwigo pēc noklusējuma)';
     
    254248$lang['UAM_Default_ConfirmMail_Remail_Subject'] = 'Atgādinājums - [username] reģistrācijas apstiprināšana galerijā [mygallery]';
    255249$lang['UAM_Default_GTReminder_Subject'] = '[username] - Pagājis ilgs laiks kopš pēdējo reizi apmeklēta galerija [mygallery]';
    256 $lang['UAM_Deleted_Account_Redirection_Page'] = 'Piekļuve liegta - Konts iznīcināts!';
    257250$lang['UAM_Demotion of %s'] = '%s pazemināšana';
    258251$lang['UAM_DumpTxt'] = 'Izveidot jūsu configurācijas rezerves kopiju un atjaunot konfigurāciju';
     
    294287$lang['UAM_You cannot pwdreset your account'] = 'Paroles atjaunošanu nevar iestatīt jūsu paša(as) kontam!';
    295288$lang['UAM_You need to confirm pwdreset'] = 'Jums jāapstiprina paroles atjaunošana (atzīmēt rūtiņā)!';
    296 $lang['UAM_title_redir_page'] = 'Piekļuve liegta konta iznīcināšanas dēļ!';
    297289$lang['UAM_GTAutoGp'] = 'Grupas statusa/konfidencialitātes līmeņa automātiska nomaiņa';
    298290$lang['UAM_No_Userlist'] = 'Uz doto momentu nav lietotāju ko attēlot ';
     
    394386Lūdzu, reaktivējiet Piwigo opciju "e-pasta adrese obligāta visiem lietotājiem", lai tā ir iespējota, tad atspējojiet UAM opciju "E-pasta domēnu izslēgšana", ja tas ir tas, ko vēlaties.<br><br>
    395387Piezīme: Šis paziņojums pazudīs līdz būsiet veicis nepieciešamās korekcijas un par jaunu atvēris administratora lapu.<br><br>  ';
     388$lang['UAM_Manual_validation_needed_for %s'] = 'Lietotājs %s ir reģistrējies un gaida administratora apstiprinājumu. ';
     389$lang['UAM_Subject admin validation for %s'] = '%s reģistrācija gaida apstiprinājumu';
    396390?>
  • extensions/UserAdvManager/branches/2.40/main.inc.php

    r18160 r18482  
    3333add_event_handler('get_admin_plugin_menu_links', 'UAM_admin_menu');
    3434
    35 // Features and controls on user connexion
    36 // ---------------------------------------
    37 add_event_handler('loc_begin_index', 'UAM_Init');
     35// Lastvisit table feed for Ghost Tracker
     36// --------------------------------------
     37add_event_handler('loc_begin_index', 'UAM_GhostTracker');
    3838
    3939// User creation
     
    6565// ----------------------------------------------------------------------------------------------------
    6666add_event_handler('init', 'UAM_InitPage');
    67 
    68 // Display messages about Login rejected, etc
    69 // ---------------------------
    70 add_event_handler('init','UAM_DisplayMsg');
    71 add_event_handler('identification','UAM_DisplayMsg');
    7267
    7368// PWG_Stuffs module
  • extensions/UserAdvManager/branches/2.40/maintain.inc.php

    r18160 r18482  
    214214  }
    215215
    216   // Piwigo's native tables modifications for validation status
    217   // ----------------------------------------------------------
    218   $query = '
    219 SHOW COLUMNS FROM '.USERS_TABLE.'
    220 LIKE "UAM_validated"
    221 ;';
    222  
    223   $result = pwg_query($query);
    224 
    225   if(!pwg_db_fetch_row($result))
    226   {
    227     $q = '
    228 ALTER TABLE '.USERS_TABLE.'
    229 ADD UAM_validated enum("true","false")
    230 ;';
    231     pwg_query($q);
    232   }
    233 
    234216/* *************************************************************************** */
    235217/* **************** END - Database actions and initialization **************** */
     
    397379      upgrade_2300_2400();
    398380    }
    399 
    400     if (version_compare($conf['UserAdvManager_Version'], '2.40.6') < 0)
    401     {
    402     /* upgrade from version 2.40.x to 2.40.6 */
    403     /* ************************************* */
    404       upgrade_2400_2406();
    405     }
    406381  }
    407382
     
    473448;';
    474449  pwg_query($q);
    475 
    476   $q = '
    477 ALTER TABLE '.USERS_TABLE.'
    478 DROP UAM_validated
    479 ;';
    480   pwg_query($q);
    481450}
    482451?>
Note: See TracChangeset for help on using the changeset viewer.