Changeset 4143
- Timestamp:
- Oct 29, 2009, 2:25:30 AM (15 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php
r4135 r4143 63 63 $_POST['UserAdvManager_MailInfo_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_MailInfo_Text'])); 64 64 $_POST['UserAdvManager_ConfirmMail_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_ConfirmMail_Text'])); 65 66 $newconf_nbc_UserAdvManager = $_POST['UserAdvManager_Mail_Info'].';'.$_POST['UserAdvManager_No_Casse'].';'.$_POST['UserAdvManager_Confirm_Mail'].';'.(isset($_POST['UserAdvManager_No_Confirm_Group'])?$_POST['UserAdvManager_No_Confirm_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Group'])?$_POST['UserAdvManager_Validated_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Status'])?$_POST['UserAdvManager_Validated_Status']:'').';'.$_POST['UserAdvManager_No_Comment_Anonymous'].';'.$_POST['UserAdvManager_Username_Char'].';'.$_POST['UserAdvManager_Username_List'].';'.(isset($_POST['UserAdvManager_No_Confirm_Status'])?$_POST['UserAdvManager_No_Confirm_Status']:'').';'.$_POST['UserAdvManager_MailInfo_Text'].';'.$_POST['UserAdvManager_ConfirmMail_Text'].';'.$_POST['UserAdvManager_MailExclusion'].';'.$_POST['UserAdvManager_MailExclusion_List'].';'.$_POST['UserAdvManager_Password_Enforced'].';'.$_POST['UserAdvManager_Password_Score'].';'.$_POST['UserAdvManager_AdminPassword_Enforced'].';'.$_POST['UserAdvManager_GhostUser_Tracker']; 65 66 $_POST['UserAdvManager_GhostTracker_ReminderText'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_GhostTracker_ReminderText'])); 67 68 $newconf_nbc_UserAdvManager = $_POST['UserAdvManager_Mail_Info'].';'.$_POST['UserAdvManager_No_Casse'].';'.$_POST['UserAdvManager_Confirm_Mail'].';'.(isset($_POST['UserAdvManager_No_Confirm_Group'])?$_POST['UserAdvManager_No_Confirm_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Group'])?$_POST['UserAdvManager_Validated_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Status'])?$_POST['UserAdvManager_Validated_Status']:'').';'.$_POST['UserAdvManager_No_Comment_Anonymous'].';'.$_POST['UserAdvManager_Username_Char'].';'.$_POST['UserAdvManager_Username_List'].';'.(isset($_POST['UserAdvManager_No_Confirm_Status'])?$_POST['UserAdvManager_No_Confirm_Status']:'').';'.$_POST['UserAdvManager_MailInfo_Text'].';'.$_POST['UserAdvManager_ConfirmMail_Text'].';'.$_POST['UserAdvManager_MailExclusion'].';'.$_POST['UserAdvManager_MailExclusion_List'].';'.$_POST['UserAdvManager_Password_Enforced'].';'.$_POST['UserAdvManager_Password_Score'].';'.$_POST['UserAdvManager_AdminPassword_Enforced'].';'.$_POST['UserAdvManager_GhostUser_Tracker'].';'.$_POST['UserAdvManager_GhostTracker_DayLimit'].';'.$_POST['UserAdvManager_GhostTracker_ReminderText']; 67 69 68 70 $conf['nbc_UserAdvManager'] = $newconf_nbc_UserAdvManager; … … 182 184 $template->assign( 183 185 array( 184 'UserAdvManager_MAIL_INFO_TRUE' => $conf_nbc_UserAdvManager[0]=='true' ? 'checked="checked"' : '' , 185 'UserAdvManager_MAIL_INFO_FALSE' => $conf_nbc_UserAdvManager[0]=='false' ? 'checked="checked"' : '' , 186 'UserAdvManager_MAILINFO_TEXT' => $conf_nbc_UserAdvManager[10], 187 'UserAdvManager_NO_CASSE_TRUE' => $conf_nbc_UserAdvManager[1]=='true' ? 'checked="checked"' : '' , 188 'UserAdvManager_NO_CASSE_FALSE' => $conf_nbc_UserAdvManager[1]=='false' ? 'checked="checked"' : '' , 189 'UserAdvManager_USERNAME_CHAR_TRUE' => $conf_nbc_UserAdvManager[7]=='true' ? 'checked="checked"' : '' , 190 'UserAdvManager_USERNAME_CHAR_FALSE' => $conf_nbc_UserAdvManager[7]=='false' ? 'checked="checked"' : '' , 191 'UserAdvManager_USERNAME_CHAR_LIST' => $conf_nbc_UserAdvManager[8], 192 'UserAdvManager_CONFIRM_MAIL_TRUE' => $conf_nbc_UserAdvManager[2]=='true' ? 'checked="checked"' : '' , 193 'UserAdvManager_CONFIRM_MAIL_FALSE' => $conf_nbc_UserAdvManager[2]=='false' ? 'checked="checked"' : '' , 194 'UserAdvManager_CONFIRMMAIL_TEXT' => $conf_nbc_UserAdvManager[11], 195 'UserAdvManager_No_Confirm_Group' => $conf_nbc_UserAdvManager[3], 196 'UserAdvManager_Validated_Group' => $conf_nbc_UserAdvManager[4], 197 'UserAdvManager_No_Confirm_Status' => $conf_nbc_UserAdvManager[9], 198 'UserAdvManager_Validated_Status' => $conf_nbc_UserAdvManager[5], 199 'UserAdvManager_NO_COMMENT_ANO_TRUE' => $conf_nbc_UserAdvManager[6]=='true' ? 'checked="checked"' : '' , 200 'UserAdvManager_NO_COMMENT_ANO_FALSE' => $conf_nbc_UserAdvManager[6]=='false' ? 'checked="checked"' : '' , 201 'UserAdvManager_MAILEXCLUSION_TRUE' => $conf_nbc_UserAdvManager[12]=='true' ? 'checked="checked"' : '' , 202 'UserAdvManager_MAILEXCLUSION_FALSE' => $conf_nbc_UserAdvManager[12]=='false' ? 'checked="checked"' : '' , 203 'UserAdvManager_MAILEXCLUSION_LIST' => $conf_nbc_UserAdvManager[13], 204 'UserAdvManager_PASSWORDENF_TRUE' => $conf_nbc_UserAdvManager[14]=='true' ? 'checked="checked"' : '' , 205 'UserAdvManager_PASSWORDENF_FALSE' => $conf_nbc_UserAdvManager[14]=='false' ? 'checked="checked"' : '' , 206 'UserAdvManager_PASSWORD_SCORE' => $conf_nbc_UserAdvManager[15], 207 'UserAdvManager_ADMINPASSWENF_TRUE' => $conf_nbc_UserAdvManager[16]=='true' ? 'checked="checked"' : '' , 208 'UserAdvManager_ADMINPASSWENF_FALSE' => $conf_nbc_UserAdvManager[16]=='false' ? 'checked="checked"' : '' , 209 'UserAdvManager_GHOSTRACKER_TRUE' => $conf_nbc_UserAdvManager[17]=='true' ? 'checked="checked"' : '' , 210 'UserAdvManager_GHOSTRACKER_FALSE' => $conf_nbc_UserAdvManager[17]=='false' ? 'checked="checked"' : '' , 211 'UserAdvManager_PASSWORD_TEST_SCORE' => $UserAdvManager_Password_Test_Score, 186 'UserAdvManager_MAIL_INFO_TRUE' => $conf_nbc_UserAdvManager[0]=='true' ? 'checked="checked"' : '' , 187 'UserAdvManager_MAIL_INFO_FALSE' => $conf_nbc_UserAdvManager[0]=='false' ? 'checked="checked"' : '' , 188 'UserAdvManager_MAILINFO_TEXT' => $conf_nbc_UserAdvManager[10], 189 'UserAdvManager_NO_CASSE_TRUE' => $conf_nbc_UserAdvManager[1]=='true' ? 'checked="checked"' : '' , 190 'UserAdvManager_NO_CASSE_FALSE' => $conf_nbc_UserAdvManager[1]=='false' ? 'checked="checked"' : '' , 191 'UserAdvManager_USERNAME_CHAR_TRUE' => $conf_nbc_UserAdvManager[7]=='true' ? 'checked="checked"' : '' , 192 'UserAdvManager_USERNAME_CHAR_FALSE' => $conf_nbc_UserAdvManager[7]=='false' ? 'checked="checked"' : '' , 193 'UserAdvManager_USERNAME_CHAR_LIST' => $conf_nbc_UserAdvManager[8], 194 'UserAdvManager_CONFIRM_MAIL_TRUE' => $conf_nbc_UserAdvManager[2]=='true' ? 'checked="checked"' : '' , 195 'UserAdvManager_CONFIRM_MAIL_FALSE' => $conf_nbc_UserAdvManager[2]=='false' ? 'checked="checked"' : '' , 196 'UserAdvManager_CONFIRMMAIL_TEXT' => $conf_nbc_UserAdvManager[11], 197 'UserAdvManager_No_Confirm_Group' => $conf_nbc_UserAdvManager[3], 198 'UserAdvManager_Validated_Group' => $conf_nbc_UserAdvManager[4], 199 'UserAdvManager_No_Confirm_Status' => $conf_nbc_UserAdvManager[9], 200 'UserAdvManager_Validated_Status' => $conf_nbc_UserAdvManager[5], 201 'UserAdvManager_NO_COMMENT_ANO_TRUE' => $conf_nbc_UserAdvManager[6]=='true' ? 'checked="checked"' : '' , 202 'UserAdvManager_NO_COMMENT_ANO_FALSE' => $conf_nbc_UserAdvManager[6]=='false' ? 'checked="checked"' : '' , 203 'UserAdvManager_MAILEXCLUSION_TRUE' => $conf_nbc_UserAdvManager[12]=='true' ? 'checked="checked"' : '' , 204 'UserAdvManager_MAILEXCLUSION_FALSE' => $conf_nbc_UserAdvManager[12]=='false' ? 'checked="checked"' : '' , 205 'UserAdvManager_MAILEXCLUSION_LIST' => $conf_nbc_UserAdvManager[13], 206 'UserAdvManager_PASSWORDENF_TRUE' => $conf_nbc_UserAdvManager[14]=='true' ? 'checked="checked"' : '' , 207 'UserAdvManager_PASSWORDENF_FALSE' => $conf_nbc_UserAdvManager[14]=='false' ? 'checked="checked"' : '' , 208 'UserAdvManager_PASSWORD_SCORE' => $conf_nbc_UserAdvManager[15], 209 'UserAdvManager_ADMINPASSWENF_TRUE' => $conf_nbc_UserAdvManager[16]=='true' ? 'checked="checked"' : '' , 210 'UserAdvManager_ADMINPASSWENF_FALSE' => $conf_nbc_UserAdvManager[16]=='false' ? 'checked="checked"' : '' , 211 'UserAdvManager_GHOSTRACKER_TRUE' => $conf_nbc_UserAdvManager[17]=='true' ? 'checked="checked"' : '' , 212 'UserAdvManager_GHOSTRACKER_FALSE' => $conf_nbc_UserAdvManager[17]=='false' ? 'checked="checked"' : '' , 213 'UserAdvManager_GHOSTRACKER_DAYLIMIT' => $conf_nbc_UserAdvManager[18], 214 'UserAdvManager_GHOSTRACKER_REMINDERTEXT' => $conf_nbc_UserAdvManager[19], 215 'UserAdvManager_PASSWORD_TEST_SCORE' => $UserAdvManager_Password_Test_Score, 212 216 ) 213 217 ); … … 958 962 // +-----------------------------------------------------------------------+ 959 963 960 $page['filtered_users'] = get_ unvalid_user_list();964 $page['filtered_users'] = get_ghost_user_list(); 961 965 962 966 // +-----------------------------------------------------------------------+ … … 1041 1045 1042 1046 // +-----------------------------------------------------------------------+ 1043 // | Resend new validation key to users|1047 // | Send ghost reminder | 1044 1048 // +-----------------------------------------------------------------------+ 1045 1049 // +-----------------------------------------------------------------------+ 1046 1050 // | selected users | 1047 1051 // +-----------------------------------------------------------------------+ 1048 if (isset($_POST[' Mail_With_Key']))1052 if (isset($_POST['Reminder_Email'])) 1049 1053 { 1050 1054 $collection = array(); … … 1076 1080 } 1077 1081 // +-----------------------------------------------------------------------+ 1078 // | Resend new validation key to users|1079 // +-----------------------------------------------------------------------+ 1080 if (isset($_POST[' Mail_With_Key']) and count($collection) > 0)1082 // | Send ghost reminder | 1083 // +-----------------------------------------------------------------------+ 1084 if (isset($_POST['Reminder_Email']) and count($collection) > 0) 1081 1085 { 1082 1086 if (in_array($conf['guest_id'], $collection)) 1083 1087 { 1084 array_push($page['errors'], l10n('No_ validation_for_Guest'));1088 array_push($page['errors'], l10n('No_reminder_for_Guest')); 1085 1089 } 1086 1090 if (($conf['guest_id'] != $conf['default_user_id']) and 1087 1091 in_array($conf['default_user_id'], $collection)) 1088 1092 { 1089 array_push($page['errors'], l10n('No_ validation_for_default_user'));1093 array_push($page['errors'], l10n('No_reminder_for_default_user')); 1090 1094 } 1091 1095 if (in_array($conf['webmaster_id'], $collection)) 1092 1096 { 1093 array_push($page['errors'], l10n('No_ validation_for_Webmaster'));1097 array_push($page['errors'], l10n('No_reminder_for_Webmaster')); 1094 1098 } 1095 1099 if (in_array($user['id'], $collection)) 1096 1100 { 1097 array_push($page['errors'], l10n('No_ validation_for_your_account'));1101 array_push($page['errors'], l10n('No_reminder_for_your_account')); 1098 1102 } 1099 1103 … … 1101 1105 { 1102 1106 foreach ($collection as $user_id) 1103 { 1104 $typemail = 1; 1105 $query = " 1106 SELECT id, username, mail_address 1107 FROM ".USERS_TABLE." 1108 WHERE id = '".$user_id."' 1109 ;"; 1110 $data = mysql_fetch_array(pwg_query($query)); 1111 1112 ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],true); 1113 } 1114 array_push( 1115 $page['infos'], 1116 l10n_dec( 1117 '%d_Mail_With_Key', '%d_Mails_With_Key', 1118 count($collection) 1119 ) 1120 ); 1121 1122 $page['filtered_users'] = get_unvalid_user_list(); 1123 } 1124 } 1125 1126 // +-----------------------------------------------------------------------+ 1127 // | Send reminder without new key to users | 1128 // +-----------------------------------------------------------------------+ 1129 // +-----------------------------------------------------------------------+ 1130 // | selected users | 1131 // +-----------------------------------------------------------------------+ 1132 if (isset($_POST['Mail_Without_Key'])) 1133 { 1134 $collection = array(); 1135 1136 switch ($_POST['target']) 1137 { 1138 case 'all' : 1139 { 1140 foreach($page['filtered_users'] as $local_user) 1141 { 1142 array_push($collection, $local_user['id']); 1143 } 1144 break; 1145 } 1146 case 'selection' : 1147 { 1148 if (isset($_POST['selection'])) 1149 { 1150 $collection = $_POST['selection']; 1151 } 1152 break; 1153 } 1154 } 1155 1156 if (count($collection) == 0) 1157 { 1158 array_push($page['errors'], l10n('Select at least one user')); 1159 } 1160 } 1161 // +-----------------------------------------------------------------------+ 1162 // | Send reminder without new key to users | 1163 // +-----------------------------------------------------------------------+ 1164 if (isset($_POST['Mail_Without_Key']) and count($collection) > 0) 1165 { 1166 if (in_array($conf['guest_id'], $collection)) 1167 { 1168 array_push($page['errors'], l10n('No_validation_for_Guest')); 1169 } 1170 if (($conf['guest_id'] != $conf['default_user_id']) and 1171 in_array($conf['default_user_id'], $collection)) 1172 { 1173 array_push($page['errors'], l10n('No_validation_for_default_user')); 1174 } 1175 if (in_array($conf['webmaster_id'], $collection)) 1176 { 1177 array_push($page['errors'], l10n('No_validation_for_Webmaster')); 1178 } 1179 if (in_array($user['id'], $collection)) 1180 { 1181 array_push($page['errors'], l10n('No_validation_for_your_account')); 1182 } 1183 1184 if (count($page['errors']) == 0) 1185 { 1186 foreach ($collection as $user_id) 1187 { 1188 $typemail = 2; 1107 { 1189 1108 $query = " 1190 1109 SELECT id, username, mail_address … … 1195 1114 $data = mysql_fetch_array(pwg_query($query)); 1196 1115 1197 ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],false);1116 ghostreminder($user_id,$data['username'],$data['mail_address']); 1198 1117 } 1199 1118 array_push( … … 1205 1124 ); 1206 1125 1207 $page['filtered_users'] = get_unvalid_user_list(); 1208 } 1209 } 1210 1211 // +-----------------------------------------------------------------------+ 1212 // | Force validation | 1213 // +-----------------------------------------------------------------------+ 1214 // +-----------------------------------------------------------------------+ 1215 // | selected users | 1216 // +-----------------------------------------------------------------------+ 1217 if (isset($_POST['Force_Validation'])) 1218 { 1219 $collection = array(); 1220 1221 switch ($_POST['target']) 1222 { 1223 case 'all' : 1224 { 1225 foreach($page['filtered_users'] as $local_user) 1226 { 1227 array_push($collection, $local_user['id']); 1228 } 1229 break; 1230 } 1231 case 'selection' : 1232 { 1233 if (isset($_POST['selection'])) 1234 { 1235 $collection = $_POST['selection']; 1236 } 1237 break; 1238 } 1239 } 1240 1241 if (count($collection) == 0) 1242 { 1243 array_push($page['errors'], l10n('Select at least one user')); 1244 } 1245 } 1246 // +-----------------------------------------------------------------------+ 1247 // | Force validation | 1248 // +-----------------------------------------------------------------------+ 1249 if (isset($_POST['Force_Validation']) and count($collection) > 0) 1250 { 1251 if (in_array($conf['guest_id'], $collection)) 1252 { 1253 array_push($page['errors'], l10n('No_validation_for_Guest')); 1254 } 1255 if (($conf['guest_id'] != $conf['default_user_id']) and 1256 in_array($conf['default_user_id'], $collection)) 1257 { 1258 array_push($page['errors'], l10n('No_validation_for_default_user')); 1259 } 1260 if (in_array($conf['webmaster_id'], $collection)) 1261 { 1262 array_push($page['errors'], l10n('No_validation_for_Webmaster')); 1263 } 1264 if (in_array($user['id'], $collection)) 1265 { 1266 array_push($page['errors'], l10n('No_validation_for_your_account')); 1267 } 1268 1269 if (count($page['errors']) == 0) 1270 { 1271 foreach ($collection as $user_id) 1272 { 1273 $query = " 1274 SELECT id, username, mail_address 1275 FROM ".USERS_TABLE." 1276 WHERE id = '".$user_id."' 1277 ;"; 1278 1279 $data = mysql_fetch_array(pwg_query($query)); 1280 1281 ForceValidation($data['id']); 1282 } 1283 array_push( 1284 $page['infos'], 1285 l10n_dec( 1286 '%d_Validated_User', '%d_Validated_Users', 1287 count($collection) 1288 ) 1289 ); 1290 1291 $page['filtered_users'] = get_unvalid_user_list(); 1292 } 1293 } 1294 1295 1296 // +-----------------------------------------------------------------------+ 1297 // | groups list | 1298 // +-----------------------------------------------------------------------+ 1299 1300 $groups[-1] = '------------'; 1301 1302 $query = ' 1303 SELECT id, name 1304 FROM '.GROUPS_TABLE.' 1305 ORDER BY name ASC 1306 ;'; 1307 1308 $result = pwg_query($query); 1309 1310 while ($row = mysql_fetch_array($result)) 1311 { 1312 $groups[$row['id']] = $row['name']; 1313 } 1126 $page['filtered_users'] = get_ghost_user_list(); 1127 } 1128 } 1314 1129 1315 1130 // +-----------------------------------------------------------------------+ … … 1341 1156 } 1342 1157 1158 1343 1159 // +-----------------------------------------------------------------------+ 1344 1160 // | user list | 1345 1161 // +-----------------------------------------------------------------------+ 1346 1347 $profile_url = get_root_url().'admin.php?page=profile&user_id=';1348 $perm_url = get_root_url().'admin.php?page=user_perm&user_id=';1349 1162 1350 1163 $visible_user_list = array(); … … 1363 1176 $visible_user_list[] = $local_user; 1364 1177 } 1365 1178 1179 $reminder = ''; 1180 if (isset($local_user['reminder']) and $local_user['reminder'] == 'true') 1181 { 1182 $reminder = l10n('Reminder_Sent_OK'); 1183 } 1184 else if (isset($local_user['reminder']) and $local_user['reminder'] == 'false') 1185 { 1186 $reminder = l10n('Reminder_Sent_NOK'); 1187 } 1188 1366 1189 foreach ($visible_user_list as $local_user) 1367 1190 { 1368 $groups_string = preg_replace(1369 '/(\d+)/e',1370 "\$groups['$1']",1371 implode(1372 ', ',1373 $local_user['groups']1374 )1375 );1376 1377 1191 if (isset($_POST['pref_submit']) 1378 1192 and isset($_POST['selection']) … … 1386 1200 } 1387 1201 1388 $properties = array();1389 if ( $local_user['level'] != 0 )1390 {1391 $properties[] = l10n( sprintf('Level %d', $local_user['level']) );1392 }1393 $properties[] =1394 (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))1395 ? l10n('is_high_enabled') : l10n('is_high_disabled');1396 1397 $expiration = expiration($local_user['id']);1398 1399 1202 $template->append( 1400 1203 'users', … … 1402 1205 'ID' => $local_user['id'], 1403 1206 'CHECKED' => $checked, 1404 'U_PROFILE' => $profile_url.$local_user['id'],1405 'U_PERM' => $perm_url.$local_user['id'],1406 1207 'USERNAME' => $local_user['username'] 1407 1208 .($local_user['id'] == $conf['guest_id'] … … 1409 1210 .($local_user['id'] == $conf['default_user_id'] 1410 1211 ? '<BR />['.l10n('is_the_default').']' : ''), 1411 'STATUS' => l10n('user_status_'.1412 $local_user['status']).(($local_user['adviser'] == 'true')1413 ? '<BR />['.l10n('adviser').']' : ''),1414 1212 'EMAIL' => get_email_address_as_display_text($local_user['email']), 1415 'GROUPS' => $groups_string, 1416 'REGISTRATION' => $local_user['registration_date'], 1417 'EXPIRATION' => $expiration, 1213 'LASTVISIT' => $local_user['lastvisit'], 1214 'REMINDER' => $reminder, 1418 1215 ) 1419 1216 ); … … 1436 1233 // +-----------------------------------------------------------------------+ 1437 1234 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/ghosttracker.tpl'); 1438 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 1439 1235 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 1236 } 1440 1237 else 1441 1238 { 1442 1239 array_push($page['infos'], l10n('Err_GhostTracker_Settings')); 1443 1240 } 1444 break; 1241 break; 1445 1242 } 1446 1243 ?> -
extensions/NBC_UserAdvManager/trunk/admin/confirmmail.tpl
r3858 r4143 9 9 <li><label>{'UserAdvManager_ConfirmMail_Info'|@translate}</label><br> 10 10 <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_TIMEOUT_TRUE} name="UserAdvManager_ConfirmMail_TimeOut"/> {'UserAdvManager_ConfirmMail_TimeOut_true'|@translate}<br> 11 <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_TIMEOUT_FALSE} name="UserAdvManager_ConfirmMail_TimeOut"/> {'UserAdvManager_ConfirmMail_TimeOut_false'|@translate}<br> 12 <br> 11 <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_TIMEOUT_FALSE} name="UserAdvManager_ConfirmMail_TimeOut"/> {'UserAdvManager_ConfirmMail_TimeOut_false'|@translate}<br><br> 13 12 </li> 14 <li><label>{'UserAdvManager_ConfirmMail_Delay_Info'|@translate}</label><input type="text" name="UserAdvManager_ConfirmMail_Delay" value="{$UserAdvManager_CONFIRMMAIL_DELAY}" size="5" style="text-align: center;"/><br> 15 <br> 13 <li><label>{'UserAdvManager_ConfirmMail_Delay_Info'|@translate}</label><input type="text" name="UserAdvManager_ConfirmMail_Delay" value="{$UserAdvManager_CONFIRMMAIL_DELAY}" size="5" style="text-align: center;"/><br><br> 16 14 </li> 17 15 <li><label>{'UserAdvManager_ConfirmMail_Remail'|@translate}</label><br> 18 16 <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_REMAIL_TRUE} name="UserAdvManager_ConfirmMail_Remail"/> {'UserAdvManager_ConfirmMail_Remail_true'|@translate}<br> 19 <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_REMAIL_FALSE} name="UserAdvManager_ConfirmMail_Remail"/> {'UserAdvManager_ConfirmMail_Remail_false'|@translate}<br> 20 <br> 17 <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_REMAIL_FALSE} name="UserAdvManager_ConfirmMail_Remail"/> {'UserAdvManager_ConfirmMail_Remail_false'|@translate}<br><br> 21 18 </li> 22 19 {if $UserAdvManager_CONFIRMMAIL_REMAIL_TRUE} 23 20 <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt1'|@translate}</label><br> 24 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt1" id="UserAdvManager_ConfirmMail_ReMail_Txt1" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT1}</textarea> 25 <br><br> 21 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt1" id="UserAdvManager_ConfirmMail_ReMail_Txt1" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT1}</textarea><br><br> 26 22 </li> 27 23 <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt2'|@translate}</label><br> 28 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea> 29 <br> 24 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea><br> 30 25 </li> 31 26 {else} 32 27 <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt1'|@translate}</label><br> 33 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt1" id="UserAdvManager_ConfirmMail_ReMail_Txt1" rows="10" cols="80" readonly{$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT1}</textarea> 34 <br><br> 28 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt1" id="UserAdvManager_ConfirmMail_ReMail_Txt1" rows="10" cols="80" readonly{$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT1}</textarea><br><br> 35 29 </li> 36 30 <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt2'|@translate}</label><br> 37 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea> 38 <br> 31 <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt2" id="UserAdvManager_ConfirmMail_ReMail_Txt2" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT2}</textarea><br> 39 32 </li> 40 33 {/if} -
extensions/NBC_UserAdvManager/trunk/admin/global.tpl
r4135 r4143 21 21 <input type="radio" value="true" {$UserAdvManager_PASSWORDENF_TRUE} name="UserAdvManager_Password_Enforced">{'UserAdvManager_Password_Enforced_true'|@translate} 22 22 <input type="text" name="UserAdvManager_Password_Score" value="{$UserAdvManager_PASSWORD_SCORE}" size="5" style="text-align: center;"><br><br> 23 23 {if $UserAdvManager_PASSWORDENF_TRUE} 24 24 <label>{'UserAdvManager_Password_Enforced_Info'|@translate}</label><br><br> 25 25 {'UserAdvManager_PasswordTest'|@translate}<input type="text" name="UserAdvManager_Password_Test" value="{$UserAdvManager_PASSWORD_TEST}" size="50" style="text-align: left;"> 26 26 <input class="submit" type="submit" value="{'PasswordTest'|@translate}" name="PasswordTest" > 27 27 {'UserAdvManager_ScoreTest'|@translate}{$UserAdvManager_PASSWORD_TEST_SCORE}<br><br> 28 28 {/if} 29 29 <input type="radio" value="false" {$UserAdvManager_PASSWORDENF_FALSE} name="UserAdvManager_Password_Enforced">{'UserAdvManager_Password_Enforced_false'|@translate}<br><br> 30 30 </li> … … 43 43 <input type="radio" value="false" {$UserAdvManager_MAILEXCLUSION_FALSE} name="UserAdvManager_MailExclusion">{'UserAdvManager_MailExclusion_false'|@translate}<br><br> 44 44 </li> 45 45 {if $UserAdvManager_MAILEXCLUSION_TRUE} 46 46 <li><label>{'UserAdvManager_MailExclusion_List'|@translate}</label><br> 47 47 <textarea name="UserAdvManager_MailExclusion_List" id="UserAdvManager_MailExclusion_List" rows="3" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILEXCLUSION_LIST}</textarea><br><br> 48 48 </li> 49 49 {/if} 50 50 <li><label>{'UserAdvManager_GhostTracker'|@translate}</label><br> 51 51 <input type="radio" value="true" {$UserAdvManager_GHOSTRACKER_TRUE} name="UserAdvManager_GhostUser_Tracker">{'UserAdvManager_GhostTracker_true'|@translate}<br> 52 52 <input type="radio" value="false" {$UserAdvManager_GHOSTRACKER_FALSE} name="UserAdvManager_GhostUser_Tracker">{'UserAdvManager_GhostTracker_false'|@translate}<br><br> 53 53 </li> 54 {if $UserAdvManager_GHOSTRACKER_TRUE} 55 <li><label>{'UserAdvManager_GhostTracker_DayLimit'|@translate}</label><br> 56 <input type="text" name="UserAdvManager_GhostTracker_DayLimit" value="{$UserAdvManager_GHOSTRACKER_DAYLIMIT}" size="5" style="text-align: center;"><br><br> 57 </li> 54 58 59 <li><label>{'UserAdvManager_GhostTracker_ReminderText'|@translate}</label><br><br> 60 <textarea name="UserAdvManager_GhostTracker_ReminderText" id="UserAdvManager_GhostTracker_ReminderText" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_GHOSTRACKER_REMINDERTEXT}</textarea><br><br> 61 </li> 62 {/if} 55 63 </ul> 56 64 … … 65 73 <input type="radio" value="false" {$UserAdvManager_MAIL_INFO_FALSE} name="UserAdvManager_Mail_Info">{'UserAdvManager_Mail_Info_false'|@translate}<br><br> 66 74 </li> 67 75 {if $UserAdvManager_MAIL_INFO_TRUE} 68 76 <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br> 69 77 <textarea name="UserAdvManager_MailInfo_Text" id="UserAdvManager_MailInfo_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILINFO_TEXT}</textarea><br><br> 70 78 </li> 71 79 {/if} 72 80 <li><label>{'UserAdvManager_Confirm_Mail'|@translate}</label><br> 73 81 <input type="radio" value="true" {$UserAdvManager_CONFIRM_MAIL_TRUE} name="UserAdvManager_Confirm_Mail">{'UserAdvManager_Confirm_Mail_true'|@translate}<br> 74 82 <input type="radio" value="false" {$UserAdvManager_CONFIRM_MAIL_FALSE} name="UserAdvManager_Confirm_Mail">{'UserAdvManager_Confirm_Mail_false'|@translate}<br><br> 75 83 </li> 76 84 {if $UserAdvManager_CONFIRM_MAIL_TRUE} 77 85 <li><label>{'UserAdvManager_ConfirmMail_Text'|@translate}</label><br><br> 78 86 <textarea name="UserAdvManager_ConfirmMail_Text" id="UserAdvManager_ConfirmMail_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_TEXT}</textarea><br><br> 79 87 </li> 80 88 {/if} 81 89 <br> 82 90 <div style="text-align: center; font-size: 1.1em; color: red;"><b>{'UserAdvManager_Confirm_Group_Notice'|@translate}</b></div> -
extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl
r4061 r4143 24 24 {foreach from=$users item=user name=users_loop} 25 25 <tr class="{if $smarty.foreach.users_loop.index is odd}row1{else}row2{/if}"> 26 <td><input type="checkbox" name="selection[]" value="{$user.ID}" {$user.CHECKED} id="selection-{$user.ID}" /></td>26 <td><input type="checkbox" name="selection[]" value="{$user.ID}" {$user.CHECKED} id="selection-{$user.ID}" ></td> 27 27 <td><label for="selection-{$user.ID}">{$user.USERNAME}</label></td> 28 28 <td>{$user.STATUS}</td> … … 36 36 {/foreach} 37 37 </table> 38 <br />38 <br> 39 39 </li> 40 40 </ul> … … 42 42 <p> 43 43 {'target'|@translate} 44 <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label>45 <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label>44 <label><input type="radio" name="target" value="all" > {'all'|@translate}</label> 45 <label><input type="radio" name="target" value="selection" checked="checked" > {'selection'|@translate}</label> 46 46 </p> 47 47 -
extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
r4135 r4143 145 145 146 146 147 /* Function called from UserAdvManager_admin.php to send a reminder mail for ghost users */ 148 function ghostreminder($user_id, $username, $email) 149 { 150 global $conf; 151 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 152 153 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 154 155 $infos1_perso = ""; 156 157 $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Ghost_remainder_of_%s', $username)); 158 159 if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[19]) and $conf_nbc_UserAdvManager[19] <> '' and isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true') 160 { 161 $infos1 = get_user_language_desc($conf_nbc_UserAdvManager[19])."\n\n"; 162 resetlastvisit($user_id); 163 } 164 165 pwg_mail($email, array( 166 'subject' => $subject, 167 'content' => $infos1.get_absolute_root_url(), 168 )); 169 170 /* ********************** */ 171 /* Email sending debugger */ 172 /* This is only to trace */ 173 /* the send of emails for */ 174 /* debugging */ 175 /* ********************** */ 176 // MailLog($email,$subject); 177 /* ********************** */ 178 } 179 180 147 181 /* Function called from functions AddConfirmMail and ResetConfirmMail for validation key generation */ 148 182 function FindAvailableConfirmMailID() … … 152 186 $id = generate_key(16); 153 187 $query = " 154 155 156 157 188 SELECT COUNT(*) 189 FROM ".USER_CONFIRM_MAIL_TABLE." 190 WHERE id = '".$id."' 191 ;"; 158 192 list($count) = mysql_fetch_row(pwg_query($query)); 159 193 … … 176 210 { 177 211 $query = " 178 179 180 181 212 SELECT status 213 FROM ".USER_INFOS_TABLE." 214 WHERE user_id = '".$user_id."' 215 ;"; 182 216 list($status) = mysql_fetch_row(pwg_query($query)); 183 217 184 218 $query = " 185 186 187 188 189 219 INSERT INTO ".USER_CONFIRM_MAIL_TABLE." 220 (id, user_id, mail_address, status, date_check) 221 VALUES 222 ('".$Confirm_Mail_ID."', '".$user_id."', '".$email."', '".$status."', null) 223 ;"; 190 224 pwg_query($query); 191 225 192 226 $query = " 193 194 195 196 197 198 199 200 227 DELETE FROM ".USER_GROUP_TABLE." 228 WHERE user_id = '".$user_id."' 229 AND ( 230 group_id = '".$conf_nbc_UserAdvManager[3]."' 231 OR 232 group_id = '".$conf_nbc_UserAdvManager[4]."' 233 ) 234 ;"; 201 235 pwg_query($query); 202 236 … … 204 238 { 205 239 $query = " 206 207 208 209 240 UPDATE ".USER_INFOS_TABLE." 241 SET status = '".$conf_nbc_UserAdvManager[9]."' 242 WHERE user_id = '".$user_id."' 243 ;"; 210 244 pwg_query($query); 211 245 } … … 214 248 { 215 249 $query = " 216 217 218 219 220 250 INSERT INTO ".USER_GROUP_TABLE." 251 (user_id, group_id) 252 VALUES 253 ('".$user_id."', '".$conf_nbc_UserAdvManager[3]."') 254 ;"; 221 255 pwg_query($query); 222 256 } … … 239 273 { 240 274 $query = " 241 242 243 244 275 UPDATE ".USER_CONFIRM_MAIL_TABLE." 276 SET id = '".$Confirm_Mail_ID."' 277 WHERE user_id = '".$user_id."' 278 ;"; 245 279 pwg_query($query); 246 280 247 281 $query = " 248 249 250 251 282 UPDATE ".USER_INFOS_TABLE." 283 SET registration_date = '".$dbnow."' 284 WHERE user_id = '".$user_id."' 285 ;"; 252 286 pwg_query($query); 253 287 … … 257 291 258 292 293 /* Function called from function_UserAdvManager.inc.php to reset last visit date after sending a reminder */ 294 function resetlastvisit($user_id) 295 { 296 global $conf; 297 298 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 299 300 $query = " 301 UPDATE ".USER_LASTVISIT_TABLE." 302 SET lastvisit = '".$dbnow."' 303 WHERE user_id = '".$user_id."' 304 ;"; 305 pwg_query($query); 306 } 307 308 259 309 /* Function called from main.inc.php - Triggered on user deletion */ 260 310 function DeleteConfirmMail($user_id) 261 311 { 262 312 $query = " 263 264 265 313 DELETE FROM ".USER_CONFIRM_MAIL_TABLE." 314 WHERE user_id = '".$user_id."' 315 ;"; 266 316 pwg_query($query); 267 317 } … … 279 329 280 330 $query = " 281 282 283 284 331 SELECT COUNT(*) 332 FROM ".USER_CONFIRM_MAIL_TABLE." 333 WHERE id = '".$id."' 334 ;"; 285 335 list($count) = mysql_fetch_row(pwg_query($query)); 286 336 … … 288 338 { 289 339 $query = " 290 291 292 293 340 SELECT user_id, status, date_check 341 FROM ".USER_CONFIRM_MAIL_TABLE." 342 WHERE id = '".$id."' 343 ;"; 294 344 $data = mysql_fetch_array(pwg_query($query)); 295 345 … … 297 347 { 298 348 $query = " 299 300 301 302 349 SELECT registration_date 350 FROM ".USER_INFOS_TABLE." 351 WHERE user_id = '".$data['user_id']."' 352 ;"; 303 353 list($registration_date) = mysql_fetch_row(pwg_query($query)); 304 354 … … 328 378 329 379 $query = ' 330 331 332 333 380 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 381 SET date_check="'.$dbnow.'" 382 WHERE id = "'.$id.'" 383 ;'; 334 384 pwg_query($query); 335 385 … … 337 387 { 338 388 $query = " 339 340 341 342 389 DELETE FROM ".USER_GROUP_TABLE." 390 WHERE user_id = '".$data['user_id']."' 391 AND group_id = '".$conf_nbc_UserAdvManager[3]."' 392 ;"; 343 393 pwg_query($query); 344 394 } … … 347 397 { 348 398 $query = " 349 350 351 352 353 399 INSERT INTO ".USER_GROUP_TABLE." 400 (user_id, group_id) 401 VALUES 402 ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."') 403 ;"; 354 404 pwg_query($query); 355 405 } … … 358 408 { 359 409 $query = " 360 361 362 363 410 UPDATE ".USER_INFOS_TABLE." 411 SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."' 412 WHERE user_id = '".$data['user_id']."' 413 ;"; 364 414 pwg_query($query); 365 415 } … … 380 430 381 431 $query = ' 382 383 384 385 432 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 433 SET date_check="'.$dbnow.'" 434 WHERE id = "'.$id.'" 435 ;'; 386 436 pwg_query($query); 387 437 … … 389 439 { 390 440 $query = " 391 392 393 394 441 DELETE FROM ".USER_GROUP_TABLE." 442 WHERE user_id = '".$data['user_id']."' 443 AND group_id = '".$conf_nbc_UserAdvManager[3]."' 444 ;"; 395 445 pwg_query($query); 396 446 } … … 399 449 { 400 450 $query = " 401 402 403 404 451 DELETE FROM ".USER_GROUP_TABLE." 452 WHERE user_id = '".$data['user_id']."' 453 AND group_id = '".$conf_nbc_UserAdvManager[4]."' 454 ;"; 405 455 pwg_query($query); 406 456 407 457 $query = " 408 409 410 411 412 458 INSERT INTO ".USER_GROUP_TABLE." 459 (user_id, group_id) 460 VALUES 461 ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."') 462 ;"; 413 463 pwg_query($query); 414 464 } … … 417 467 { 418 468 $query = " 419 420 421 422 469 UPDATE ".USER_INFOS_TABLE." 470 SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."' 471 WHERE user_id = '".$data['user_id']."' 472 ;"; 423 473 pwg_query($query); 424 474 } … … 445 495 446 496 $query = " 447 448 449 450 497 SELECT COUNT(*) 498 FROM ".USER_CONFIRM_MAIL_TABLE." 499 WHERE user_id = '".$id."' 500 ;"; 451 501 list($count) = mysql_fetch_row(pwg_query($query)); 452 502 … … 454 504 { 455 505 $query = " 456 457 458 459 506 SELECT user_id, status, date_check 507 FROM ".USER_CONFIRM_MAIL_TABLE." 508 WHERE user_id = '".$id."' 509 ;"; 460 510 $data = mysql_fetch_array(pwg_query($query)); 461 511 … … 465 515 466 516 $query = " 467 468 469 470 517 UPDATE ".USER_CONFIRM_MAIL_TABLE." 518 SET date_check='".$dbnow."' 519 WHERE user_id = '".$data['user_id']."' 520 ;"; 471 521 pwg_query($query); 472 522 … … 474 524 { 475 525 $query = " 476 477 478 479 526 DELETE FROM ".USER_GROUP_TABLE." 527 WHERE user_id = '".$data['user_id']."' 528 AND group_id = '".$conf_nbc_UserAdvManager[3]."' 529 ;"; 480 530 pwg_query($query); 481 531 } … … 484 534 { 485 535 $query = " 486 487 488 536 DELETE FROM ".USER_GROUP_TABLE." 537 WHERE user_id = '".$data['user_id']."' 538 AND group_id = '".$conf_nbc_UserAdvManager[4]."' 489 539 ;"; 490 540 pwg_query($query); 491 541 492 542 $query = " 493 494 495 496 497 543 INSERT INTO ".USER_GROUP_TABLE." 544 (user_id, group_id) 545 VALUES 546 ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."') 547 ;"; 498 548 pwg_query($query); 499 549 } … … 502 552 { 503 553 $query = " 504 505 506 507 554 UPDATE ".USER_INFOS_TABLE." 555 SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."' 556 WHERE user_id = '".$data['user_id']."' 557 ;"; 508 558 pwg_query($query); 509 559 } … … 523 573 { 524 574 $query = " 525 526 527 528 575 SELECT ".$conf['user_fields']['username']." 576 FROM ".USERS_TABLE." 577 WHERE LOWER(".$conf['user_fields']['username'].") = '".strtolower($username)."' 578 ;"; 529 579 list($username) = mysql_fetch_row(pwg_query($query)); 530 580 … … 532 582 } 533 583 } 534 535 536 /* Obsolete function - Check for single email in database */537 //function SearchMail($email)538 //{539 // global $conf, $lang;540 //541 // if (isset($email))542 // {543 // $query = "544 // SELECT COUNT(*)545 // FROM ".USERS_TABLE."546 // WHERE ".$conf['user_fields']['email']." = '".$email."'547 // ;";548 // list($nbr_mail) = mysql_fetch_row(pwg_query($query));549 //550 // return isset($nbr_mail) ? $nbr_mail : 0;551 // }552 //}553 584 554 585 … … 612 643 /* search users depending expiration date */ 613 644 $query = ' 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 645 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 646 u.'.$conf['user_fields']['username'].' AS username, 647 u.'.$conf['user_fields']['email'].' AS email, 648 ui.status, 649 ui.adviser, 650 ui.enabled_high, 651 ui.level, 652 ui.registration_date 653 FROM '.USERS_TABLE.' AS u 654 INNER JOIN '.USER_INFOS_TABLE.' AS ui 655 ON u.'.$conf['user_fields']['id'].' = ui.user_id 656 LEFT JOIN '.USER_GROUP_TABLE.' AS ug 657 ON u.'.$conf['user_fields']['id'].' = ug.user_id 658 WHERE u.'.$conf['user_fields']['id'].' >= 3 659 AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'" 660 OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'")'; 630 661 631 662 if ($conf_nbc_UserAdvManager[3] <> '-1' and $conf_nbc_UserAdvManager[9] == '-1') 632 663 { 633 664 $query.= ' 634 665 AND ug.group_id = '.$conf_nbc_UserAdvManager[3]; 635 666 } 636 667 if ($conf_nbc_UserAdvManager[3] == '-1' and $conf_nbc_UserAdvManager[9] <> '-1') 637 668 { 638 669 $query.= ' 639 670 AND ui.status = \''.$conf_nbc_UserAdvManager[9]."'"; 640 671 } 641 672 if ($conf_nbc_UserAdvManager[3] <> '-1' and $conf_nbc_UserAdvManager[9] <> '-1') 642 673 { 643 674 $query.= ' 644 675 AND ug.group_id = \''.$conf_nbc_UserAdvManager[3]."'"; 645 676 } 646 677 $query.= ' 647 678 ORDER BY id ASC 648 679 ;'; 649 680 … … 670 701 { 671 702 $query = ' 672 673 674 675 703 SELECT user_id, group_id 704 FROM '.USER_GROUP_TABLE.' 705 WHERE user_id IN ('.implode(',', $user_ids).') 706 ;'; 676 707 677 708 $result = pwg_query($query); … … 689 720 } 690 721 722 723 /* Function called from UserAdvManager.php - Get ghost users */ 724 function get_ghost_user_list() 725 { 726 global $conf, $page; 727 728 /* Get UserAdvManager configuration */ 729 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 730 731 $users = array(); 732 733 /* search users depending expiration date */ 734 $query = ' 735 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 736 u.'.$conf['user_fields']['username'].' AS username, 737 u.'.$conf['user_fields']['email'].' AS email, 738 lv.lastvisit, 739 lv.reminder 740 FROM '.USERS_TABLE.' AS u 741 INNER JOIN '.USER_LASTVISIT_TABLE.' AS lv 742 ON u.'.$conf['user_fields']['id'].' = lv.user_id 743 WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_nbc_UserAdvManager[18].'") 744 ORDER BY id ASC;'; 745 746 $result = pwg_query($query); 747 748 while ($row = mysql_fetch_array($result)) 749 { 750 $user = $row; 751 $user['groups'] = array(); 752 753 array_push($users, $user); 754 } 755 756 /* add group lists */ 757 $user_ids = array(); 758 foreach ($users as $i => $user) 759 { 760 $user_ids[$i] = $user['id']; 761 } 762 763 return $users; 764 } 765 766 691 767 /* Function called from UserAdvManager.php - to determine who is expired or not and giving a different display color */ 692 768 function expiration($id) … … 701 777 702 778 $query = " 703 704 705 706 779 SELECT registration_date 780 FROM ".USER_INFOS_TABLE." 781 WHERE user_id = '".$id."' 782 ;"; 707 783 list($registration_date) = mysql_fetch_row(pwg_query($query)); 708 784 … … 734 810 } 735 811 } 812 736 813 737 814 /** … … 811 888 } 812 889 813 /* Function called from maintain.inc.php - to determineif database upgrade is needed */890 /* Function called from maintain.inc.php - to check if database upgrade is needed */ 814 891 function table_exist($table) 815 892 { -
extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
r4135 r4143 7 7 8 8 /* Global Configuration Tab */ 9 $lang['Title_Tab1'] = 'UserAdvManager - G lobal Configuration';10 $lang['Tab_Global'] = 'G lobal Configuration';9 $lang['Title_Tab1'] = 'UserAdvManager - General Setup'; 10 $lang['Tab_Global'] = 'General Setup'; 11 11 $lang['UserAdvManager_Title1'] = 'Users registration management'; 12 12 $lang['UserAdvManager_Title2'] = 'Registration validation and groups / status management'; 13 $lang['UserAdvManager_Mail_Info'] = ' Mail information user ';13 $lang['UserAdvManager_Mail_Info'] = ' Mail information user (<b style="color: green;">activate and save settings to display the customizable email content</b> - <b style="color: red;">Caution: If, after configuration, you disable this option, you will lose any related customizations!</b>).'; 14 14 $lang['UserAdvManager_Mail_Info_true'] = ' Send an information mail to the user when he registes or updates his profile.'; 15 15 $lang['UserAdvManager_Mail_Info_false'] = ' Turns off the sending of mail. (default)'; … … 21 21 $lang['UserAdvManager_Username_Char_true'] = ' The following characters will be forbidden for username choice'; 22 22 $lang['UserAdvManager_Username_Char_false'] = ' Use the default username charset control. (default)'; 23 $lang['UserAdvManager_Password_Enforced'] = 'Strengthening passwords - Enabling this option makes the seizure of the password required for visitors registration. Also, the password entered by the visitor will meet with a score of complexity .';23 $lang['UserAdvManager_Password_Enforced'] = 'Strengthening passwords - Enabling this option makes the seizure of the password required for visitors registration. Also, the password entered by the visitor will meet with a score of complexity (<b style="color: green;">activate and save settings to display more informations</b>).'; 24 24 $lang['UserAdvManager_Password_Enforced_Info'] = '<b style="text-decoration: underline; color: green;">Explanations:</b> <b style="color: green;">A password score is calculated on the basic parameters: length, type of characters used (letters, digits, uppercase, lowercase, special characters). If the password of the user does not score, the score reached is displayed with the minimal score to reach and an indication to increase the value of this score. To give you an idea, a score below 100 is considered "low complexity". Between 100 and 500, the complexity is increased and average. Beyond 500, that\'s Fort Knox! ;-)<br>You can do your passwords complexity tests by using the field below. This will allow you to get an idea of the score to define a custom complexity.</b>'; 25 25 $lang['UserAdvManager_PasswordTest'] = 'Passowrd to test : '; … … 31 31 $lang['UserAdvManager_AdminPassword_Enforced_true'] = 'Enable strengthening passwords for admins.'; 32 32 $lang['UserAdvManager_AdminPassword_Enforced_false'] = 'Disable strengthening passwords for admins. (default)'; 33 $lang['UserAdvManager_Confirm_Mail'] = 'Email address confirmation ';33 $lang['UserAdvManager_Confirm_Mail'] = 'Email address confirmation (<b style="color: green;">activate and save settings to display the customizable email content</b> - <b style="color: red;">Caution: If, after configuration, you disable this option, you will lose any related customizations!</b>).'; 34 34 $lang['UserAdvManager_Confirm_Mail_true'] = ' Send an email to user to allow him to validate his email and his registration.'; 35 35 $lang['UserAdvManager_Confirm_Mail_false'] = ' Use the default Piwigo registration system (without registration validation). (default)'; … … 44 44 $lang['UserAdvManager_No_Comment_Anonymous_true'] = ' The author field have to be filled to send a comment.'; 45 45 $lang['UserAdvManager_No_Comment_Anonymous_false'] = ' Use the default Piwigo settings on comments sending. (default)'; 46 $lang['UserAdvManager_MailExclusion'] = 'Email provider exclusion ';46 $lang['UserAdvManager_MailExclusion'] = 'Email provider exclusion (<b style="color: green;">activate and save settings to display the exclusion list field</b> - <b style="color: red;">Caution: If, after configuration, you disable this option, you will lose any related customizations!</b>)'; 47 47 $lang['UserAdvManager_MailExclusion_true'] = ' Set the email provider exclusion ON (i.e. : @hotmail.* or @msn.*)'; 48 48 $lang['UserAdvManager_MailExclusion_false'] = ' Set the email provider exclusion OFF. (default)'; 49 49 $lang['UserAdvManager_MailExclusion_List'] = ' If email provider exclusion is set to ON, fill the email domains to exclude below. You have to use the following format :<br>@[domaine_name].[domaine_extension] - Example : @hotmail.com<br>Seperate the different domains with a comma (,)<br>'; 50 $lang['UserAdvManager_GhostTracker'] = 'Ghost Tracker - Allows to manage registered users according their last visit date ( see the "Ghost Tracker" tab) :';50 $lang['UserAdvManager_GhostTracker'] = 'Ghost Tracker - Allows to manage registered users according their last visit date (<b style="color: green;">activate and save settings to display more options</b> - <b style="color: red;">Caution: If, after configuration, you disable this option, you will lose any related customizations!</b>) :'; 51 51 $lang['UserAdvManager_GhostTracker_true'] = ' Enable Ghost Tracker.'; 52 52 $lang['UserAdvManager_GhostTracker_false'] = ' Disable Ghost Tracker. (Default)'; 53 $lang[' audit'] = 'Audit parameters';54 $lang[' submit'] = 'Save parameters';53 $lang['UserAdvManager_GhostTracker_DayLimit'] = ' Type in here the maximum limit, in days, between two visits of a visitor. When this limit is reached, this visitor will appear in the table on "Ghost Tracker" tab.'; 54 $lang['UserAdvManager_GhostTracker_ReminderText'] = ' Text used in the email reminder sent to encourage visitors to come back to the gallery (NB: The text pre-filled at the plugin installation is given as an example).<br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>'; 55 55 56 56 … … 67 67 $lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Enable email reminder'; 68 68 $lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Disable email reminder. (Default)'; 69 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Custom content of the re call message with regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>';70 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Custom content of the re call message without regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>';69 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Custom content of the reminder message with regeneration of validation key.<br>If left blank, the reminder email will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled at the plugin installation is given as an example)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>'; 70 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Custom content of the reminder message without regeneration of validation key.<br>If left blank, the reminder email will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled at the plugin installation is given as an example)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>'; 71 71 72 72 … … 87 87 88 88 89 /* Ghost Tracker Tab */ 90 $lang['GhostTracker_Title'] = 'Advanced ghost visitors management'; 91 $lang['Title_Tab4'] = 'UserAdvManager - Ghost Tracker'; 92 $lang['Tab_GhostTracker'] = 'Ghost Tracker'; 93 $lang['UserAdvManager_GhostTracker_User_List'] = 'When Ghost Tracker is enabled, you will find below the list of registered visitors who have not returned since x days. "x" is the number of days configured in the General Setup tab. In addition, you will find a column indicating whether an email reminder has been sent to targeted visitors. So, you can see at a glance and treat visitors who have not taken account of the reminder.<br><br>In this view, you can: 94 <br><br> 95 - Manually delete accounts <b>(manual drain)</b> 96 <br> 97 - Generate email reminder <b>with resetting the last visit date</b>. This allows to give a wildcard to targeted visitors. If the visitor has already received a reminder, nothing prevents to resent a new mail which will reset again, in fact, the last visit date. 98 <br>'; 99 $lang['LastVisit_Date'] = 'Last visit'; 100 $lang['Ghost_Reminder'] = 'Email reminder'; 101 $lang['Reminder_Sent_OK'] = 'YES'; 102 $lang['Reminder_Sent_NOK'] = 'NO'; 103 104 89 105 /* Mailing */ 90 106 $lang['infos_mail %s'] = '%s, please find here your information to login the gallery :'; … … 96 112 $lang['Reminder_with_key_of_%s'] = '%s, your validation key has been renewed'; 97 113 $lang['Reminder_without_key_of_%s'] = '%s, your validation key will expire'; 114 $lang['Ghost_remainder_of_%s'] = '%s, this is a reminder email'; 98 115 99 116 … … 126 143 $lang['UserAdvManager_no_update_pwd'] = '[profile updated without password changed]'; 127 144 $lang['invalid_pwd'] = 'Invalid username or password !'; 128 $lang['Err_ConfirmMail_Settings'] = 'This page will be available only if "Email address confirmation" is activated in tab "Global Configuration".';129 $lang['Err_UserManager_Settings'] = 'This page is available only if "Enable limiting the registration deadline" is active in the "ConfirmMail Settings" tab and an unvalidated users group is set in "G lobal Configuration" tab.';130 $lang['Err_GhostTracker_Settings'] = 'This page is available only if "Ghost Tracker" is active in the "G lobal Configuration" tab.';145 $lang['Err_ConfirmMail_Settings'] = 'This page will be available only if "Email address confirmation" is activated in "General Setup" tab.'; 146 $lang['Err_UserManager_Settings'] = 'This page is available only if "Enable limiting the registration deadline" is active in the "ConfirmMail Settings" tab and an unvalidated users group is set in "General Setup" tab.'; 147 $lang['Err_GhostTracker_Settings'] = 'This page is available only if "Ghost Tracker" is active in the "General Setup" tab.'; 131 148 $lang['No_validation_for_Guest'] = 'The "Guest" account is not subject to validation'; 132 149 $lang['No_validation_for_default_user'] = 'The default account is not subject to validation'; … … 134 151 $lang['No_validation_for_your_account'] = 'You personnal admin account is not subject to validation'; 135 152 $lang['Database_Error'] = '<b><u>Warning! Critical integrity error in your database.</u></b><br><br>Please check the integrity of the #_user_confirm_mail table.'; 153 $lang['No_reminder_for_Guest'] = 'The "Guest" account is not subject to receive reminders from GhostTracker'; 154 $lang['No_reminder_for_default_user'] = 'The default account is not subject to receive reminders from GhostTracker'; 155 $lang['No_reminder_for_Webmaster'] = 'The "Webmaster" account is not subject to receive reminders from GhostTracker'; 156 $lang['No_reminder_for_your_account'] = 'You personnal admin account is not subject to receive reminders from GhostTracker'; 136 157 137 158 … … 146 167 147 168 /* Action button names */ 169 $lang['audit'] = 'Audit settings'; 170 $lang['submit'] = 'Save settings'; 148 171 $lang['Delete_selected'] = 'Delete'; 149 172 $lang['Mail_without_key'] = 'Reminder without key'; 150 173 $lang['Mail_with_key'] = 'Reminder with key'; 151 174 $lang['Force_Validation'] = 'Forced validation'; 175 $lang['Reminder_Email'] = 'Email reminder'; 152 176 ?> -
extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r4135 r4143 11 11 $lang['UserAdvManager_Title1'] = 'Gestion de l\'inscription des utilisateurs'; 12 12 $lang['UserAdvManager_Title2'] = 'Validation d\'inscription et gestion de groupes / statuts'; 13 $lang['UserAdvManager_Mail_Info'] = 'Mail d\'information à l\'utilisateur ';13 $lang['UserAdvManager_Mail_Info'] = 'Mail d\'information à l\'utilisateur (<b style="color: green;">activez puis sauvegardez pour afficher le contenu paramétrable du mail</b> - <b style="color: red;">Attention : Si, après configuration, vous désactivez cette option, vous perdrez les personnalisations s\'y afférant!</b>)'; 14 14 $lang['UserAdvManager_Mail_Info_true'] = ' Envoyer un mail à l\'utilisateur reprenant ses infos lors de son inscription ou la mise à jour de son profil.'; 15 15 $lang['UserAdvManager_Mail_Info_false'] = ' Désactive l\'envoi de mail d\'info. (valeur par défaut)'; … … 21 21 $lang['UserAdvManager_Username_Char_true'] = ' Interdire les caractères saisis dans le champs ci-après pour le nom d\'utilisateur lors de l\'inscription == '; 22 22 $lang['UserAdvManager_Username_Char_false'] = ' Laisser le contrôle par défaut du nom d\'utilisateur. (valeur par défaut)'; 23 $lang['UserAdvManager_Password_Enforced'] = 'Renforcement des mots de passe - Activer cette option rend la saisie du mot de passe obligatoire à l\'inscription des visiteurs. De plus, le mot de passe saisi par le visiteur devra répondre à un score de complexité .';23 $lang['UserAdvManager_Password_Enforced'] = 'Renforcement des mots de passe - Activer cette option rend la saisie du mot de passe obligatoire à l\'inscription des visiteurs. De plus, le mot de passe saisi par le visiteur devra répondre à un score de complexité <b style="color: green;">(activez puis sauvegardez pour afficher plus d\'infos</b>).'; 24 24 $lang['UserAdvManager_Password_Enforced_Info'] = '<b style="text-decoration: underline; color: green;">Explications :</b> <b style="color: green;">Le score d\'un mot de passe est calculé en fonction des paramètres de base : longueur, types de caractères utilisés(lettres, chiffres, majuscules, minuscules, caractères spéciaux). Si le mot de passe de l\'utilisateur ne répond pas au score, le score réalisé est affiché ainsi que le score minimum à atteindre et une indication pour augmenter la valeur de ce score. Pour donner un ordre d\'idée, un score inférieur à 100 est considéré comme faible. Entre 100 et 500, la complexité est renforcée et dans la moyenne. Au dela de 500, c\'est Fort Knox !! ;-)<br>Vous pouvez faire vos essais de complexité d\'un mot de passe en utilisant le champ ci-dessous. Cela vous permettra de vous faire une idée du score à définir pour une complexité personnalisée.</b>'; 25 25 $lang['UserAdvManager_PasswordTest'] = 'Mot de passe à tester : '; … … 31 31 $lang['UserAdvManager_AdminPassword_Enforced_true'] = 'Activer le renforcement des mots de passe pour les admins.'; 32 32 $lang['UserAdvManager_AdminPassword_Enforced_false'] = 'Désactiver le renforcement des mots de passe pour les admins. (valeur par défaut)'; 33 $lang['UserAdvManager_Confirm_Mail'] = 'Confirmation de l\'adresse email ';33 $lang['UserAdvManager_Confirm_Mail'] = 'Confirmation de l\'adresse email (<b style="color: green;">activez puis sauvegardez pour afficher le contenu paramétrable du mail</b> - <b style="color: red;">Attention : Si, après configuration, vous désactivez cette option, vous perdrez les personnalisations s\'y afférant!</b>).'; 34 34 $lang['UserAdvManager_Confirm_Mail_true'] = ' Envoyer un mail permettant a l\'utilisateur de confirmer son adresse email et donc son compte utilisateur.'; 35 35 $lang['UserAdvManager_Confirm_Mail_false'] = ' Système d\'inscription et de mise à jour standard sans confirmation de l\'adresse email. (valeur par défaut)'; … … 44 44 $lang['UserAdvManager_No_Comment_Anonymous_true'] = ' Le champs auteur doit être renseigné pour enregistrer un commentaire.'; 45 45 $lang['UserAdvManager_No_Comment_Anonymous_false'] = ' Laisser le fonctionnement par défaut pour enregistrer un commentaire. (valeur par défaut)'; 46 $lang['UserAdvManager_MailExclusion'] = 'Exclusion des domaines de messagerie ';46 $lang['UserAdvManager_MailExclusion'] = 'Exclusion des domaines de messagerie (<b style="color: green;">activez puis sauvegardez pour afficher le cadre de la liste des exclusions</b> - <b style="color: red;">Attention : Si, après configuration, vous désactivez cette option, vous perdrez les personnalisations s\'y afférant!</b>)'; 47 47 $lang['UserAdvManager_MailExclusion_true'] = ' Activer l\'exclusion des domaines de messagerie (par exemple @hotmail.* ou @msn.*)'; 48 48 $lang['UserAdvManager_MailExclusion_false'] = ' Désactiver l\'exclusion des domaines de messagerie. (valeur par défaut)'; 49 49 $lang['UserAdvManager_MailExclusion_List'] = ' Si l\'exclusion de domaines de messagerie est activée, saisissez les domaines à exclure ici. Il faut respecter le format suivant :<br>@[nom_du_domaine].[extension_du_domaine] - Exemple : @hotmail.com<br><br>Séparez les domaines par une virgule<br>'; 50 $lang['UserAdvManager_GhostTracker'] = 'Gestion des visiteurs fantômes - Permet de gérer les inscrits en fonction de leur date de dernière visite ( voir onglet "Ghost Tracker") :';50 $lang['UserAdvManager_GhostTracker'] = 'Gestion des visiteurs fantômes - Permet de gérer les inscrits en fonction de leur date de dernière visite (<b style="color: green;">activez puis sauvegardez pour afficher plus d\'options</b> - <b style="color: red;">Attention : Si, après configuration, vous désactivez cette option, vous perdrez les personnalisations s\'y afférant!</b>) :'; 51 51 $lang['UserAdvManager_GhostTracker_true'] = ' Activer la gestion des visiteurs fantômes.'; 52 52 $lang['UserAdvManager_GhostTracker_false'] = ' Désactiver la gestion des visiteurs fantômes. (valeur par défaut)'; 53 $lang[' audit'] = 'Auditer les paramètres';54 $lang[' submit'] = 'Sauvegarder les paramètres';53 $lang['UserAdvManager_GhostTracker_DayLimit'] = ' Saisissez ici le délai maximum, en jours, entre deux visites d\'un visiteur. Lorsque ce délai est atteind, le visiteur en question apparaitra dans le tableau de l\'onglet "Ghost Tracker".'; 54 $lang['UserAdvManager_GhostTracker_ReminderText'] = ' Texte utilisé dans le mail de rappel envoyé à l\'utilisateur pour l\'inciter à revenir visiter la galerie (NB: Le texte pré-renseigné à l\'installation du plugin est donné à titre d\'exemple).<br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>'; 55 55 56 56 … … 67 67 $lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Activer le rappel par mail.'; 68 68 $lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Désactiver le rappel par mail. (valeur par défaut)'; 69 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de rappel avec regénération de clé de validation.<br>Si laissé vide, le mail de rappel ne comportera que le lien de validation. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré 70 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de rappel sans regénération de clé de validation.<br>Si laissé vide, le mail de rappel sera vide. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré 69 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de rappel avec regénération de clé de validation.<br>Si laissé vide, le mail de rappel ne comportera que le lien de validation. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré-renseigné à l\'installation du plugin est donné en exemple)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">La modification du texte n\'est possible <b>QUE</b> si le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>'; 70 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de rappel sans regénération de clé de validation.<br>Si laissé vide, le mail de rappel sera vide. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré-renseigné à l\'installation du plugin est donné en exemple)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">La modification du texte n\'est possible <b>QUE</b> si le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>'; 71 71 72 72 … … 87 87 88 88 89 /* UserManager Tab */90 $lang[' UserManager_Title'] = 'Gestion avancée des visiteurs fantômes';91 $lang['Title_Tab 3'] = 'UserAdvManager - Ghost Tracker';89 /* Ghost Tracker Tab */ 90 $lang['GhostTracker_Title'] = 'Gestion avancée des visiteurs fantômes'; 91 $lang['Title_Tab4'] = 'UserAdvManager - Ghost Tracker'; 92 92 $lang['Tab_GhostTracker'] = 'Ghost Tracker'; 93 $lang['UserAdvManager_ ConfirmMail_User_List'] = 'Lorsque la limitation du délai d\'inscription est activée, vous trouverez ci-dessous la liste des utilisateurs en attente de validation d\'inscription <b style="text-decoration: underline;">qu\'ils soient ou pas</b> dans les délais pour la valider.<br><br>Dans cette vue, vous pouvez :93 $lang['UserAdvManager_GhostTracker_User_List'] = 'Lorsque la gestion des visiteurs fantômes est activée, vous trouverez ci-dessous la liste des visiteurs inscrits sur votre galerie et qui ne sont pas revenus depuis x jours. "x" étant le nombre de jours paramétrés dans l\'onglet de configuration générale. De plus, vous trouverez une colonne précisant si un mail de rappel a déjà été envoyé aux visiteurs ciblés, vous permettant de visualiser d\'un coup d\'oeil et traiter les visiteurs qui n\'auraient pas tenu compte du rappel.<br><br>Dans cette vue, vous pouvez : 94 94 <br><br> 95 95 - Supprimer manuellement les comptes <b>(purge manuelle)</b> 96 96 <br> 97 - Générer l\'email de rappel <b>sans génération</b> d\'une nouvelle clef. Rappel : Cette fonction ne réinitialise pas la date d\'inscription du visiteur ciblé et le délai d\'expiration est toujours d\'actualité. 98 <br> 99 - Générer l\'email de rappel <b>avec génération</b> d\'une nouvelle clef. Rappel : Cette fonction réinitialise également la date d\'inscription du visiteur ciblé ce qui équivaut à prolonger le délai de validation.<br> 100 - Valider manuellement une inscription en attente de validation même si la date d\'expiration est révolue <b>(forçage de la validation)</b>. 97 - Générer l\'email de rappel <b>avec réinitialisation de la date de dernière visite</b>. Ce qui permet de donner un "joker" au visiteur ciblé. Si le visiteur a déjà bénéficié d\'un mail de rappel, rien n\'empêche de renvoyer un nouveau mail qui réinitialisera, de fait, la date de dernière visite. 101 98 <br>'; 102 $lang['Registration_Date'] = 'Date d\'enregistrement'; 99 $lang['LastVisit_Date'] = 'Date de dernière visite'; 100 $lang['Ghost_Reminder'] = 'Email de rappel'; 101 $lang['Reminder_Sent_OK'] = 'OUI'; 102 $lang['Reminder_Sent_NOK'] = 'NON'; 103 103 104 104 … … 150 150 $lang['No_validation_for_your_account'] = 'Votre compte d\'admin n\'est pas soumis à validation'; 151 151 $lang['Database_Error'] = '<b><u>Attention ! Erreur critique d\'intégrité dans votre base de données.</u></b><br><br>Veuillez contrôler l\'intégrité de la table #_user_confirm_mail.'; 152 $lang['No_reminder_for_Guest'] = 'Le compte Guest n\'est pas soumis à recevoir des rappels du GhostTracker'; 153 $lang['No_reminder_for_default_user'] = 'Le compte par défaut n\'est pas soumis à recevoir des rappels du GhostTracker'; 154 $lang['No_reminder_for_Webmaster'] = 'Le compte du Webmaster n\'est pas soumis à recevoir des rappels du GhostTracker'; 155 $lang['No_reminder_for_your_account'] = 'Votre compte d\'admin n\'est pas soumis à recevoir des rappels du GhostTracker'; 152 156 153 157 … … 162 166 163 167 /* Action button names */ 168 $lang['audit'] = 'Auditer les paramètres'; 169 $lang['submit'] = 'Sauvegarder les paramètres'; 164 170 $lang['Delete_selected'] = 'Supprimer'; 165 171 $lang['Mail_without_key'] = 'Rappel sans clé'; 166 172 $lang['Mail_with_key'] = 'Rappel avec clé'; 167 173 $lang['Force_Validation'] = 'Validation forcée'; 174 $lang['Reminder_Email'] = 'Email de rappel'; 168 175 ?> -
extensions/NBC_UserAdvManager/trunk/main.inc.php
r4135 r4143 2 2 /* 3 3 Plugin Name: NBC UserAdvManager 4 Version: 2.12.0 a4 Version: 2.12.0 5 5 Description: Permet de renforcer les possibilités de gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 … … 128 128 } 129 129 130 131 add_event_handler('loc_begin_index', 'UserAdvManager_GhostTracker'); 132 133 function UserAdvManager_GhostTracker() 134 { 135 global $conf, $user; 136 137 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 138 139 if (isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true' and !is_admin() and !is_a_guest()) 140 { 141 142 $userid = get_userid($user['username']); 143 144 /* Looking for existing entry in last visit table */ 145 $query = ' 146 SELECT * 147 FROM '.USER_LASTVISIT_TABLE.' 148 WHERE user_id = '.$userid.' 149 ;'; 150 151 $count = mysql_num_rows(pwg_query($query)); 152 153 if ($count == 0) 154 { 155 /* If not, data are inserted in table */ 156 $query = ' 157 INSERT INTO '.USER_LASTVISIT_TABLE.' (user_id, lastvisit, reminder) 158 VALUES ('.$userid.', now(), "false") 159 ;'; 160 pwg_query($query); 161 } 162 else if ($count > 0) 163 { 164 /* If yes, data are updated in table */ 165 $query = ' 166 UPDATE '.USER_LASTVISIT_TABLE.' 167 SET lastvisit = now(), reminder = "false" 168 WHERE user_id = '.$userid.' 169 LIMIT 1 170 ;'; 171 pwg_query($query); 172 } 173 } 174 } 130 175 131 176 … … 267 312 { 268 313 $query = ' 269 270 271 272 314 SELECT '.$conf['user_fields']['email'].' AS email 315 FROM '.USERS_TABLE.' 316 WHERE '.$conf['user_fields']['id'].' = \''.$user['id'].'\' 317 ;'; 273 318 274 319 list($current_email) = mysql_fetch_row(pwg_query($query)); … … 282 327 { 283 328 $query = ' 284 285 286 287 329 SELECT '.$conf['user_fields']['username'].' 330 FROM '.USERS_TABLE.' 331 WHERE '.$conf['user_fields']['id'].' = \''.$user['id'].'\' 332 ;'; 288 333 289 334 list($username) = mysql_fetch_row(pwg_query($query)); -
extensions/NBC_UserAdvManager/trunk/maintain.inc.php
r4135 r4143 12 12 13 13 $q = ' 14 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 15 VALUES ("nbc_UserAdvManager","true;false;false;-1;-1;-1;false;false;;-1;;;false;;false;100;false,false","Parametres du plugin nbc UserAdvManager") 14 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 15 VALUES ("nbc_UserAdvManager","true;false;false;-1;-1;-1;false;false;;-1;;;false;;false;100;false,false,10,Hello. 16 17 This is a reminder because a very long time passed since your last visit on our gallery. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 18 19 On receipt of this message and no new visit within 15 days, we would be obliged to automatically delete your account. 20 21 Best regards, 22 23 The admin of the gallery.","Parametres du plugin nbc UserAdvManager") 16 24 ;'; 17 25 pwg_query($q); 18 26 19 27 $q = ' 20 21 28 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 29 VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;Hello. 22 30 23 31 This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration. … … 32 40 33 41 $q = " 34 CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." ( 35 id varchar(50) NOT NULL default '', 36 user_id smallint(5) NOT NULL default '0', 37 mail_address varchar(255) default NULL, 38 status enum('webmaster','admin','normal','generic','guest') default NULL, 39 date_check datetime default NULL, 40 lastvisit DATETIME NULL DEFAULT NULL, 41 reminder ENUM('true','false') NULL DEFAULT NULL 42 PRIMARY KEY (id) 43 ) 44 ;"; 42 CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." ( 43 id varchar(50) NOT NULL default '', 44 user_id smallint(5) NOT NULL default '0', 45 mail_address varchar(255) default NULL, 46 status enum('webmaster','admin','normal','generic','guest') default NULL, 47 date_check datetime default NULL, 48 PRIMARY KEY (id) 49 ) 50 ;"; 45 51 pwg_query($q); 46 52 47 53 $q = " 48 49 50 51 52 53 54 54 CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." ( 55 user_id SMALLINT(5) NOT NULL DEFAULT '0', 56 lastvisit DATETIME NULL DEFAULT NULL, 57 reminder ENUM('true','false') NULL, 58 PRIMARY KEY (`user_id`) 59 ) 60 ;"; 55 61 pwg_query($q); 56 62 } … … 62 68 /* Check for upgrade from 2.10 */ 63 69 $query = ' 64 65 66 67 70 SELECT * 71 FROM '.CONFIG_TABLE.' 72 WHERE param = "nbc_UserAdvManager_ConfirmMail" 73 ;'; 68 74 $count = mysql_num_rows(pwg_query($query)); 69 75 … … 90 96 { 91 97 $q = ' 92 93 94 98 DELETE FROM '.CONFIG_TABLE.' 99 WHERE param="nbc_UserAdvManager" 100 ;'; 95 101 96 102 pwg_query($q); … … 100 106 { 101 107 $q = ' 102 103 104 108 DELETE FROM '.CONFIG_TABLE.' 109 WHERE param="nbc_UserAdvManager_ConfirmMail" 110 ;'; 105 111 106 112 pwg_query($q); … … 120 126 121 127 $q = ' 122 123 128 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 129 VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;Hello. 124 130 125 131 This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration. … … 145 151 if ((!isset($conf_nbc_UserAdvManager[14]) and !isset($conf_nbc_UserAdvManager[15])) and !isset($conf_nbc_UserAdvManager[16]) and !isset($conf_nbc_UserAdvManager[17])) 146 152 { 147 $upgrade_nbc_UserAdvManager = $conf_nbc_UserAdvManager[0].';'.$conf_nbc_UserAdvManager[1].';'.$conf_nbc_UserAdvManager[2].';'.$conf_nbc_UserAdvManager[3].';'.$conf_nbc_UserAdvManager[4].';'.$conf_nbc_UserAdvManager[5].';'.$conf_nbc_UserAdvManager[6].';'.$conf_nbc_UserAdvManager[7].';'.$conf_nbc_UserAdvManager[8].';'.$conf_nbc_UserAdvManager[9].';'.$conf_nbc_UserAdvManager[10].';'.$conf_nbc_UserAdvManager[11].';'.$conf_nbc_UserAdvManager[12].';'.$conf_nbc_UserAdvManager[13].';false;100;false;false'; 153 $upgrade_nbc_UserAdvManager = $conf_nbc_UserAdvManager[0].';'.$conf_nbc_UserAdvManager[1].';'.$conf_nbc_UserAdvManager[2].';'.$conf_nbc_UserAdvManager[3].';'.$conf_nbc_UserAdvManager[4].';'.$conf_nbc_UserAdvManager[5].';'.$conf_nbc_UserAdvManager[6].';'.$conf_nbc_UserAdvManager[7].';'.$conf_nbc_UserAdvManager[8].';'.$conf_nbc_UserAdvManager[9].';'.$conf_nbc_UserAdvManager[10].';'.$conf_nbc_UserAdvManager[11].';'.$conf_nbc_UserAdvManager[12].';'.$conf_nbc_UserAdvManager[13].';false;100;false;false;10;Hello. 154 155 This is a reminder because a very long time passed since your last visit on our gallery. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 156 157 On receipt of this message and no new visit within 15 days, we would be obliged to automatically delete your account. 158 159 Best regards, 160 161 The admin of the gallery.'; 148 162 149 163 $query = ' 150 UPDATE '.CONFIG_TABLE.' 151 SET value="'.$upgrade_nbc_UserAdvManager.'" 152 WHERE param="nbc_UserAdvManager" 153 LIMIT 1 154 ;'; 155 164 UPDATE '.CONFIG_TABLE.' 165 SET value="'.$upgrade_nbc_UserAdvManager.'" 166 WHERE param="nbc_UserAdvManager" 167 LIMIT 1 168 ;'; 156 169 pwg_query($query); 157 170 } 158 171 159 172 $q = " 160 161 162 163 164 165 166 173 CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." ( 174 user_id SMALLINT(5) NOT NULL DEFAULT '0', 175 lastvisit DATETIME NULL DEFAULT NULL, 176 reminder ENUM('true','false') NULL, 177 PRIMARY KEY (`user_id`) 178 ) 179 ;"; 167 180 pwg_query($q); 168 181 }
Note: See TracChangeset
for help on using the changeset viewer.