Changeset 12272 for extensions/UserAdvManager
- Timestamp:
- Sep 30, 2011, 1:51:10 PM (13 years ago)
- Location:
- extensions/UserAdvManager/branches/2.30
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/branches/2.30/ConfirmMail.php
r12227 r12272 42 42 log_user($userid, false); 43 43 44 /* We have to get the user's language in database */ 44 // We have to get the user's language in database 45 // ---------------------------------------------- 45 46 $query = ' 46 47 SELECT language … … 50 51 $data = pwg_db_fetch_assoc(pwg_query($query)); 51 52 52 /* Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language */ 53 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 54 // ------------------------------------------------------------------------------------------------------------------------------- 53 55 if (empty($data)) 54 56 { 55 /* And switch gallery to this language before using personalized and multilangual contents */ 57 // And switch gallery to this language before using personalized and multilangual contents 58 // --------------------------------------------------------------------------------------- 56 59 $language = pwg_get_session_var('lang_switch', $user['language']); 57 60 switch_lang_to($language); … … 59 62 else 60 63 { 61 /* And switch gallery to this language before using personalized and multilangual contents */ 64 // And switch gallery to this language before using personalized and multilangual contents 65 // --------------------------------------------------------------------------------------- 62 66 switch_lang_to($data['language']); 63 67 load_language('plugin.lang', UAM_PATH); … … 67 71 { 68 72 // Management of Extension flags ([username], [mygallery], [myurl]) 73 // ---------------------------------------------------------------- 69 74 $patterns[] = '#\[username\]#i'; 70 75 $replacements[] = $result['username']; … … 99 104 { 100 105 // Management of Extension flags ([username], [mygallery], [myurl]) 106 // ---------------------------------------------------------------- 101 107 $patterns[] = '#\[username\]#i'; 102 108 $replacements[] = $result['username']; -
extensions/UserAdvManager/branches/2.30/GT_del_account.php
r11018 r12272 24 24 { 25 25 // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here 26 // ----------------------------------------------------------------------------------------- 26 27 $patterns[] = '#\[mygallery\]#i'; 27 28 $replacements[] = $conf['gallery_title']; -
extensions/UserAdvManager/branches/2.30/USR_del_account.php
r11018 r12272 24 24 { 25 25 // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here 26 // ----------------------------------------------------------------------------------------- 26 27 $patterns[] = '#\[mygallery\]#i'; 27 28 $replacements[] = $conf['gallery_title']; -
extensions/UserAdvManager/branches/2.30/admin/UAM_admin.php
r12239 r12272 112 112 { 113 113 114 //General configuration settings 114 // Render free text fields 115 // ----------------------- 115 116 $_POST['UAM_MailInfo_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_MailInfo_Text']))); 116 117 117 118 $_POST['UAM_ConfirmMail_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Text']))); 118 119 119 120 $_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText']))); … … 130 131 131 132 // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them 133 // -------------------------------------------------------------------------------------- 132 134 if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List'])) 133 135 { … … 137 139 138 140 // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled 141 // --------------------------------------------------------------------------------------------------------- 139 142 $conf_UAM = unserialize($conf['UserAdvManager']); 140 143 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); … … 148 151 149 152 // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set) 153 // ---------------------------------------------------------------------------------- 150 154 if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_Text']) != 0) 151 155 { … … 155 159 156 160 // Save global UAM configuration 161 // ----------------------------- 157 162 $newconf_UAM = array( 158 163 $_POST['UAM_Mail_Info'], … … 201 206 conf_update_param('UserAdvManager', pwg_db_real_escape_string($conf['UserAdvManager'])); 202 207 203 //Email confirmation settings 208 // Email confirmation settings 209 // -------------------------- 204 210 $_POST['UAM_ConfirmMail_ReMail_Txt1'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_ReMail_Txt1']))); 205 211 … … 211 217 212 218 // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set) 219 // ---------------------------------------------------------------------------------- 213 220 if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_ReMail_Txt1']) == 1) 214 221 { … … 223 230 224 231 // Save ConfirmMail settings 232 // ------------------------- 225 233 $newconf_UAM_ConfirmMail = array ( 226 234 $_POST['UAM_ConfirmMail_TimeOut'], … … 240 248 241 249 // Saving UAM tables and configuration settings 250 // -------------------------------------------- 242 251 if (isset($_POST['save'])) 243 252 { … … 254 263 } 255 264 256 //Testing password enforcement 265 // Testing password enforcement 266 // ---------------------------- 257 267 if (isset($_POST['PasswordTest']) and isset($_POST['UAM_Password_Test']) and !empty($_POST['UAM_Password_Test'])) 258 268 { … … 266 276 $conf_UAM = unserialize($conf['UserAdvManager']); 267 277 268 //Group setting for unvalidated, validated users and downgrade group 278 // Group setting for unvalidated, validated users and downgrade group 279 // ------------------------------------------------------------------ 269 280 $groups[-1] = '---------'; 270 281 $No_Valid = -1; … … 272 283 $Downgrade = -1; 273 284 274 //Get groups list in database 285 // Get groups list in database 286 // --------------------------- 275 287 $query = ' 276 288 SELECT id, name … … 301 313 } 302 314 303 //Template initialization for unvalidated users group 315 // Template initialization for unvalidated users group 316 // --------------------------------------------------- 304 317 $template->assign( 305 318 'No_Confirm_Group', … … 309 322 ) 310 323 ); 311 //Template initialization for validated users group 324 325 // Template initialization for validated users group 326 // ------------------------------------------------- 312 327 $template->assign( 313 328 'Validated_Group', … … 317 332 ) 318 333 ); 319 //Template initialization for downgrade group 334 335 // Template initialization for downgrade group 336 // ------------------------------------------- 320 337 $template->assign( 321 338 'Downgrade_Group', … … 326 343 ); 327 344 328 //Status setting for unvalidated, validated users and downgrade status 345 // Status setting for unvalidated, validated users and downgrade status 346 // -------------------------------------------------------------------- 329 347 $status_options[-1] = '------------'; 330 348 $No_Valid_Status = -1; … … 332 350 $Downgrade_Status = -1; 333 351 334 //Get unvalidate status values 352 // Get unvalidate status values 353 // ---------------------------- 335 354 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 336 355 { … … 341 360 } 342 361 343 //Template initialization for unvalidated users status 344 $template->assign( 345 'No_Confirm_Status', 346 array( 347 'Status_options' => $status_options, 348 'Status_selected' => $No_Valid_Status 349 ) 350 ); 362 // Template initialization for unvalidated users status 363 // ---------------------------------------------------- 364 $template->assign( 365 'No_Confirm_Status', 366 array( 367 'Status_options' => $status_options, 368 'Status_selected' => $No_Valid_Status 369 ) 370 ); 351 371 } 352 372 353 //Get validate status values 373 // Get validate status values 374 // -------------------------- 354 375 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 355 376 { … … 360 381 } 361 382 362 //Template initialization for validated users status 363 $template->assign( 364 'Confirm_Status', 365 array( 366 'Status_options' => $status_options, 367 'Status_selected' => $Valid_Status 368 ) 369 ); 383 // Template initialization for validated users status 384 // -------------------------------------------------- 385 $template->assign( 386 'Confirm_Status', 387 array( 388 'Status_options' => $status_options, 389 'Status_selected' => $Valid_Status 390 ) 391 ); 370 392 } 371 393 372 //Get downgrade status values 394 // Get downgrade status values 395 // --------------------------- 373 396 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 374 397 { … … 379 402 } 380 403 381 //Template initialization for validated users status 382 $template->assign( 383 'Downgrade_Status', 384 array( 385 'Status_options' => $status_options, 386 'Status_selected' => $Downgrade_Status 387 ) 388 ); 404 // Template initialization for validated users status 405 // -------------------------------------------------- 406 $template->assign( 407 'Downgrade_Status', 408 array( 409 'Status_options' => $status_options, 410 'Status_selected' => $Downgrade_Status 411 ) 412 ); 389 413 } 390 414 391 415 392 //Level setting for unvalidated, validated users and downgrade level 416 // Level setting for unvalidated, validated users and downgrade level 417 // ------------------------------------------------------------------ 393 418 $level_options[-1] = '------------'; 394 419 $No_Valid_Level = -1; … … 397 422 398 423 // Get unvalidated privacy levels values 424 // ------------------------------------- 399 425 foreach ($conf['available_permission_levels'] as $level) 400 426 { … … 404 430 $No_Valid_Level = $level; 405 431 } 406 //Template initialization for unvalidated users level 407 $template->assign( 408 'No_Valid_Level', 409 array( 410 'Level_options' => $level_options, 411 'Level_selected' => $No_Valid_Level 412 ) 413 ); 432 433 // Template initialization for unvalidated users level 434 // --------------------------------------------------- 435 $template->assign( 436 'No_Valid_Level', 437 array( 438 'Level_options' => $level_options, 439 'Level_selected' => $No_Valid_Level 440 ) 441 ); 414 442 } 415 443 416 444 // Get validated privacy levels values 445 // ----------------------------------- 417 446 foreach ($conf['available_permission_levels'] as $level) 418 447 { … … 422 451 $Valid_Level = $level; 423 452 } 424 //Template initialization for unvalidated users level 425 $template->assign( 426 'Valid_Level', 427 array( 428 'Level_options' => $level_options, 429 'Level_selected' => $Valid_Level 430 ) 431 ); 453 454 // Template initialization for unvalidated users level 455 // --------------------------------------------------- 456 $template->assign( 457 'Valid_Level', 458 array( 459 'Level_options' => $level_options, 460 'Level_selected' => $Valid_Level 461 ) 462 ); 432 463 } 433 464 434 465 // Get downgrade privacy levels values 466 // ----------------------------------- 435 467 foreach ($conf['available_permission_levels'] as $level) 436 468 { … … 440 472 $Downgrade_Level = $level; 441 473 } 442 //Template initialization for unvalidated users level 443 $template->assign( 444 'Downgrade_Level', 445 array( 446 'Level_options' => $level_options, 447 'Level_selected' => $Downgrade_Level 448 ) 449 ); 474 475 // Template initialization for unvalidated users level 476 // --------------------------------------------------- 477 $template->assign( 478 'Downgrade_Level', 479 array( 480 'Level_options' => $level_options, 481 'Level_selected' => $Downgrade_Level 482 ) 483 ); 450 484 } 451 485 452 //Save last opened paragraph in configuration tab 486 // Save last opened paragraph in configuration tab 487 // ----------------------------------------------- 453 488 $nb_para=(isset($_POST["nb_para"])) ? $_POST["nb_para"]:""; 454 489 $nb_para2=(isset($_POST["nb_para2"])) ? $_POST["nb_para2"]:""; … … 456 491 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 457 492 493 // ------------------------------------------ 458 494 // Template initialization for forms and data 459 495 // ------------------------------------------ 460 496 $themeconf=$template->get_template_vars('themeconf'); 461 497 $UAM_theme=$themeconf['id']; … … 548 584 $msg_error1 = ''; 549 585 550 //Username without forbidden keys 586 // Username without forbidden keys 587 // ------------------------------- 551 588 if ( isset($conf_UAM[5]) and $conf_UAM[5] == 'true' ) 552 589 { … … 561 598 { 562 599 if (!ValidateUsername(stripslashes($row['username']))) 563 $msg_error1 .= (($msg_error1 <> '') ? '<br>' : '') .l10n('UAM_Err_audit_username_char').stripslashes($row['username']);600 $msg_error1 .= (($msg_error1 <> '') ? '<br>' : '').l10n('UAM_Err_audit_username_char').stripslashes($row['username']); 564 601 } 565 602 } … … 567 604 $msg_error2 = ''; 568 605 569 //Email without forbidden domain 606 // Email without forbidden domain 607 // ------------------------------ 570 608 if ( isset($conf_UAM[10]) and $conf_UAM[10] == 'true' ) 571 609 { … … 585 623 if (preg_match($pattern, $row['mail_address'])) 586 624 { 587 $msg_error2 .= (($msg_error2 <> '') ? '<br>' : '') .l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';625 $msg_error2 .= (($msg_error2 <> '') ? '<br>' : '').l10n('UAM_Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')'; 588 626 } 589 627 } … … 672 710 { 673 711 // dates formating and compare 712 // --------------------------- 674 713 $today = date("d-m-Y"); // Get today's date 675 714 list($day, $month, $year) = explode('-', $today); // explode date of today … … 702 741 else $display = ''; 703 742 743 // Template initialization 744 // ----------------------- 704 745 $template->append( 705 746 'users', … … 714 755 ); 715 756 } 716 //Plugin version inserted 757 // Plugin version inserted 758 // ----------------------- 717 759 $template->assign( 718 760 array( … … 1191 1233 1192 1234 $expiration = expiration($local_user['id']); 1193 1235 1236 // Template initialization 1237 // ----------------------- 1194 1238 $template->append( 1195 1239 'users', … … 1217 1261 // Check if validation of register is made by admin or visitor 1218 1262 // If visitor, $Confirm_Local is used to mask useless buttons 1263 // ----------------------------------------------------------- 1219 1264 $Confirm_Local = ""; 1220 1265 … … 1228 1273 } 1229 1274 1230 //Plugin version inserted 1275 // Plugin version inserted 1276 // ----------------------- 1231 1277 $template->assign( 1232 1278 array( … … 1558 1604 } 1559 1605 1606 // Template initialization 1607 // ----------------------- 1560 1608 $template->append( 1561 1609 'users', … … 1571 1619 } 1572 1620 1573 //Plugin version inserted 1621 // Plugin version inserted 1622 // ----------------------- 1574 1623 $template->assign( 1575 1624 array( -
extensions/UserAdvManager/branches/2.30/admin/template/ghosttracker.tpl
r12250 r12272 113 113 jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}'); 114 114 jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 115 jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);115 //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 116 116 }); 117 117 </script> -
extensions/UserAdvManager/branches/2.30/admin/template/global.tpl
r12250 r12272 857 857 jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}'); 858 858 jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 859 jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);859 //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 860 860 }); 861 861 </script> -
extensions/UserAdvManager/branches/2.30/admin/template/usermanager.tpl
r12250 r12272 117 117 jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}'); 118 118 jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 119 jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);119 //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 120 120 }); 121 121 </script> -
extensions/UserAdvManager/branches/2.30/changelog.txt.php
r12239 r12272 266 266 Bug 2437 fixed - New feature : Request password renewal for selected users in Piwigo's users management panel. 267 267 Bug 2445 fixed - Duplicate key MySql error when a user tries to validate his registration twice. 268 Bug 2447 fixed - Only for installation from scratch, all text fields pre-filled and given as examples are translated into the language of the webmaster (if the language is supported by the plugin). The default language remains English in case of any failure. 268 269 Help files remaned and relocated in the language root directory (no more "help" subdirectory) for compliance with the new online translation tool. 269 270 */ -
extensions/UserAdvManager/branches/2.30/include/functions.inc.php
r12239 r12272 40 40 41 41 // Admins, Guests and Adult_Content users are not tracked for Ghost Tracker or Users Tracker 42 // ----------------------------------------------------------------------------------------- 42 43 if (!is_admin() and !is_a_guest() and $user['username'] != "16" and $user['username'] != "18") 43 44 { … … 48 49 49 50 // Looking for existing entry in last visit table 51 // ---------------------------------------------- 50 52 $query = ' 51 53 SELECT * … … 59 61 { 60 62 // If not, data are inserted in table 63 // ---------------------------------- 61 64 $query = ' 62 65 INSERT INTO '.USER_LASTVISIT_TABLE.' (user_id, lastvisit, reminder) … … 68 71 { 69 72 // If yes, data are updated in table 73 // --------------------------------- 70 74 $query = ' 71 75 UPDATE '.USER_LASTVISIT_TABLE.' … … 93 97 94 98 // Exclusion of Adult_Content users 99 // -------------------------------- 95 100 if ($register_user['username'] != "16" and $register_user['username'] != "18") 96 101 { … … 98 103 { 99 104 // This is to send an information email and set user to "waiting" group or status until admin validation 105 // ----------------------------------------------------------------------------------------------------- 100 106 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 101 107 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); … … 105 111 { 106 112 // This is to set user to "waiting" group or status until admin validation 113 // ----------------------------------------------------------------------- 107 114 SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation 108 115 } … … 110 117 { 111 118 // This is to send an information email without validation key 119 // ----------------------------------------------------------- 112 120 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 113 121 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 114 122 } 115 123 // Sending registration confirmation by email 124 // ------------------------------------------ 116 125 elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true' or $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 117 126 { … … 144 153 { 145 154 // Cleanup for ConfirmMail table 155 // ----------------------------- 146 156 DeleteConfirmMail($user_id); 147 157 // Cleanup for LastVisit table 158 // --------------------------- 148 159 DeleteLastVisit($user_id); 149 160 // Cleanup Redirection settings 161 // ---------------------------- 150 162 DeleteRedir($user_id); 151 163 } … … 162 174 163 175 // Exclusion of Adult_Content users 176 // -------------------------------- 164 177 if ($user['username'] != "16" and $user['username'] != "18") 165 178 { … … 171 184 172 185 // Password enforcement control 186 // ---------------------------- 173 187 if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13])) 174 188 { … … 198 212 199 213 // Username without forbidden keys 214 // ------------------------------- 200 215 if (isset($conf_UAM[5]) and $conf_UAM[5] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin()) 201 216 { … … 205 220 206 221 // Email without forbidden domains 222 // ------------------------------- 207 223 if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin()) 208 224 { … … 225 241 226 242 // Update first redirection parameter 243 // ---------------------------------- 227 244 if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true')) 228 245 { … … 242 259 243 260 // Special message display for password reset 261 // ------------------------------------------ 244 262 if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true')) 245 263 { … … 251 269 252 270 // Controls on profile page submission 271 // ----------------------------------- 253 272 if (isset($_POST['validate']) and !is_admin()) 254 273 { 255 274 // Email without forbidden domains 275 // ------------------------------- 256 276 if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['mail_address'])) 257 277 { … … 264 284 265 285 // Password reset control 286 // ---------------------- 266 287 if (isset($conf_UAM[38]) and $conf_UAM[38] == 'true' and UAM_check_pwgreset($user['id'])) 267 288 { 268 289 // if password not changed then pwdreset filed = true else pwdreset field = false 290 // ------------------------------------------------------------------------------ 269 291 if (!empty($_POST['use_new_pwd'])) 270 292 { … … 286 308 287 309 // Password enforcement control 310 // ---------------------------- 288 311 if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13])) 289 312 { … … 301 324 302 325 // Sending registration confirmation by email 326 // ------------------------------------------ 303 327 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 304 328 { … … 316 340 317 341 // This is to send a new validation key 342 // ------------------------------------ 318 343 if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 319 344 … … 321 346 322 347 // This is to set the user to "waiting" group or status until admin validation 348 // --------------------------------------------------------------------------- 323 349 if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 324 350 … … 357 383 358 384 // Performing GhostTracker scheduled tasks 385 // --------------------------------------- 359 386 if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true')) 360 387 { … … 363 390 364 391 // Performing User validation scheduled tasks 392 // ------------------------------------------ 365 393 if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true')) 366 394 { … … 369 397 370 398 // Performing redirection to profile page on first login 399 // ----------------------------------------------------- 371 400 if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true')) 372 401 { … … 387 416 388 417 // Performing redirection to profile page for password reset 418 // --------------------------------------------------------- 389 419 if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true')) 390 420 { … … 453 483 } 454 484 455 // Ghost accounts auto group, status or privacy level downgrade with or without information email sending and autodeletion if user already reminded 485 // GhostTracker auto group, status or privacy level downgrade with or without information email sending and autodeletion if user already reminded 486 // ---------------------------------------------------------------------------------------------------------------------------------------------- 456 487 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))) 457 488 { … … 459 490 { 460 491 // Process if a non-admin nor webmaster user is logged 492 // --------------------------------------------------- 461 493 if (in_array($user['id'], $collection)) 462 494 { 463 495 // Check lastvisit reminder state 496 // ------------------------------ 464 497 $query = ' 465 498 SELECT reminder … … 479 512 480 513 // If user already reminded for ghost account 514 // ------------------------------------------ 481 515 if ($reminder) 482 516 { 483 // delete account 517 // Delete account 518 // -------------- 484 519 delete_user($user['id']); 485 520 486 521 // Logged-in user cleanup, session destruction and redirected to custom page 522 // ------------------------------------------------------------------------- 487 523 invalidate_user_cache(); 488 524 logout_user(); … … 495 531 { 496 532 // Check lastvisit reminder state 533 // ------------------------------ 497 534 $query = ' 498 535 SELECT reminder … … 512 549 513 550 // If never reminded before 551 // ------------------------ 514 552 if (!$reminder) 515 553 { 516 // Reset of lastvisit date 554 // Reset of lastvisit date 555 // ----------------------- 517 556 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 518 557 … … 525 564 526 565 // Auto change group and / or status 566 // --------------------------------- 527 567 // Delete user from all groups 568 // --------------------------- 528 569 $query = " 529 570 DELETE FROM ".USER_GROUP_TABLE." … … 538 579 539 580 // Change user status 581 // ------------------ 540 582 if ($conf_UAM[26] <> -1) 541 583 { … … 549 591 550 592 // Change user group 593 // ----------------- 551 594 if ($conf_UAM[25] <> -1) 552 595 { … … 561 604 562 605 // Change user privacy level 606 // ------------------------- 563 607 if ($conf_UAM[37] <> -1) 564 608 { … … 572 616 573 617 // Auto send email notification on group / status downgrade 618 // -------------------------------------------------------- 574 619 if (isset($conf_UAM[22]) and $conf_UAM[22] == 'true') 575 620 { 576 621 // Set reminder true 622 // ----------------- 577 623 $query = " 578 624 UPDATE ".USER_LASTVISIT_TABLE." … … 583 629 584 630 // Reset confirmed user status to unvalidated 631 // ------------------------------------------ 585 632 $query = ' 586 633 UPDATE '.USER_CONFIRM_MAIL_TABLE.' … … 591 638 592 639 // Get users information for email notification 640 // -------------------------------------------- 593 641 $query = ' 594 642 SELECT id, username, mail_address … … 603 651 elseif ($reminder) // If user already reminded for ghost account 604 652 { 605 // delete account 653 // Delete account 654 // -------------- 606 655 delete_user($user_id); 607 656 } … … 643 692 644 693 // Unvalidated accounts auto email sending and autodeletion if user already reminded 694 // --------------------------------------------------------------------------------- 645 695 if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true')) 646 696 { … … 648 698 { 649 699 // Process if a non-admin nor webmaster user is logged 700 // --------------------------------------------------- 650 701 if (in_array($user['id'], $collection)) 651 702 { 652 703 // Check ConfirmMail reminder state 704 // -------------------------------- 653 705 $query = ' 654 706 SELECT reminder … … 668 720 669 721 // If never reminded before, send reminder and set reminder True 722 // ------------------------------------------------------------- 670 723 if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true') 671 724 { … … 673 726 674 727 // Get current user informations 728 // ----------------------------- 675 729 $query = " 676 730 SELECT id, username, mail_address … … 684 738 685 739 // If already reminded before, delete user 740 // --------------------------------------- 686 741 if ($reminder) 687 742 { … … 690 745 691 746 // Logged-in user cleanup, session destruction and redirected to custom page 747 // ------------------------------------------------------------------------- 692 748 invalidate_user_cache(); 693 749 logout_user(); … … 700 756 { 701 757 // Check reminder state 758 // -------------------- 702 759 $query = ' 703 760 SELECT reminder … … 717 774 718 775 // If never reminded before, send reminder and set reminder True 776 // ------------------------------------------------------------- 719 777 if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true') 720 778 { … … 722 780 723 781 // Get current user informations 782 // ----------------------------- 724 783 $query = " 725 784 SELECT id, username, mail_address … … 733 792 elseif ($reminder) // If user already reminded for account validation 734 793 { 735 // delete account 794 // Delete account 795 // -------------- 736 796 delete_user($user_id); 737 797 } … … 756 816 757 817 // Admin user management 818 // --------------------- 758 819 if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list') 759 820 { … … 761 822 { 762 823 // Email without forbidden domains 824 // ------------------------------- 763 825 if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email'])) 764 826 { … … 824 886 825 887 // We have to get the user's language in database 888 // ---------------------------------------------- 826 889 $query =' 827 890 SELECT user_id, language … … 832 895 833 896 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 897 // ------------------------------------------------------------------------------------------------------------------------------- 834 898 if (empty($data)) 835 899 { 836 900 // And switch gallery to this language before using personalized and multilangual contents 901 // --------------------------------------------------------------------------------------- 837 902 $language = pwg_get_session_var( 'lang_switch', $user['language'] ); 838 903 switch_lang_to($language); … … 841 906 { 842 907 // And switch gallery to this language before using personalized and multilangual contents 843 $language = $data['language']; // Usefull for debugging 908 // --------------------------------------------------------------------------------------- 909 //$language = $data['language']; // Usefull for debugging 844 910 switch_lang_to($data['language']); 845 911 load_language('plugin.lang', UAM_PATH); … … 855 921 { 856 922 // Management of Extension flags ([username], [mygallery], [myurl]) 923 // ---------------------------------------------------------------- 857 924 $patterns[] = '#\[username\]#i'; 858 925 $replacements[] = $username; … … 907 974 } 908 975 909 if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) 976 if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm) // Add confirmation link ? 910 977 { 911 978 $infos2 = array … … 915 982 ); 916 983 917 if (isset($conf_UAM[9]) and $conf_UAM[9] <> '') 984 if (isset($conf_UAM[9]) and $conf_UAM[9] <> '') // Add personal text in confirmation email ? 918 985 { 919 986 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 987 // ------------------------------------------------------------------------- 920 988 $patterns[] = '#\[username\]#i'; 921 989 $replacements[] = $username; … … 965 1033 966 1034 // Sending the email with subject and contents 1035 // ------------------------------------------- 967 1036 pwg_mail($email, array( 968 1037 'subject' => $subject, … … 971 1040 972 1041 // Switching back to default language 1042 // ---------------------------------- 973 1043 switch_lang_back(); 974 1044 } … … 992 1062 993 1063 // We have to get the user's language in database 1064 // ---------------------------------------------- 994 1065 $query =' 995 1066 SELECT user_id, language … … 1001 1072 1002 1073 // And switch gallery to this language before using personalized and multilangual contents 1074 // --------------------------------------------------------------------------------------- 1003 1075 switch_lang_to($data['language']); 1004 1076 … … 1013 1085 { 1014 1086 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 1087 // ------------------------------------------------------------------------- 1015 1088 $patterns[] = '#\[username\]#i'; 1016 1089 $replacements[] = $username; … … 1039 1112 } 1040 1113 1041 // Set reminder true 1114 // Set reminder true 1115 // ----------------- 1042 1116 $query = " 1043 1117 UPDATE ".USER_CONFIRM_MAIL_TABLE." … … 1055 1129 { 1056 1130 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 1131 // ------------------------------------------------------------------------- 1057 1132 $patterns[] = '#\[username\]#i'; 1058 1133 $replacements[] = $username; … … 1075 1150 } 1076 1151 1077 // Set reminder true 1152 // Set reminder true 1153 // ----------------- 1078 1154 $query = " 1079 1155 UPDATE ".USER_CONFIRM_MAIL_TABLE." … … 1092 1168 1093 1169 // Switching back to default language 1170 // ---------------------------------- 1094 1171 switch_lang_back(); 1095 1172 } … … 1113 1190 1114 1191 // We have to get the user's language in database 1192 // ---------------------------------------------- 1115 1193 $query =' 1116 1194 SELECT user_id, language … … 1122 1200 1123 1201 // And switch gallery to this language before using personalized and multilangual contents 1202 // --------------------------------------------------------------------------------------- 1124 1203 switch_lang_to($data['language']); 1125 1204 … … 1131 1210 { 1132 1211 // Management of Extension flags ([username], [mygallery], [myurl], [days]) 1212 // ------------------------------------------------------------------------ 1133 1213 $patterns[] = '#\[username\]#i'; 1134 1214 $replacements[] = $username; … … 1158 1238 1159 1239 // Switching back to default language 1240 // ---------------------------------- 1160 1241 switch_lang_back(); 1161 1242 } … … 1179 1260 1180 1261 // We have to get the user's language in database 1262 // ---------------------------------------------- 1181 1263 $query =' 1182 1264 SELECT user_id, language … … 1187 1269 1188 1270 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 1271 // ------------------------------------------------------------------------------------------------------------------------------- 1189 1272 if (empty($data)) 1190 1273 { 1191 1274 // And switch gallery to this language before using personalized and multilangual contents 1275 // --------------------------------------------------------------------------------------- 1192 1276 $language = pwg_get_session_var( 'lang_switch', $user['language'] ); 1193 1277 switch_lang_to($language); … … 1196 1280 { 1197 1281 // And switch gallery to this language before using personalized and multilangual contents 1282 // --------------------------------------------------------------------------------------- 1198 1283 $language = $data['language']; // Usefull for debugging 1199 1284 switch_lang_to($data['language']); … … 1206 1291 { 1207 1292 // Management of Extension flags ([username], [mygallery], [myurl]) 1293 // ---------------------------------------------------------------- 1208 1294 $patterns[] = '#\[username\]#i'; 1209 1295 $replacements[] = stripslashes($username); … … 1235 1321 1236 1322 // Sending the email with subject and contents 1323 // ------------------------------------------- 1237 1324 pwg_mail($email, array( 1238 1325 'subject' => $subject, … … 1241 1328 1242 1329 // Switching back to default language 1330 // ---------------------------------- 1243 1331 switch_lang_back(); 1244 1332 } … … 1262 1350 1263 1351 // We have to get the user's language in database 1352 // ---------------------------------------------- 1264 1353 $query =' 1265 1354 SELECT user_id, language … … 1270 1359 1271 1360 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 1361 // ------------------------------------------------------------------------------------------------------------------------------- 1272 1362 if (empty($data)) 1273 1363 { 1274 1364 // And switch gallery to this language before using personalized and multilangual contents 1365 // --------------------------------------------------------------------------------------- 1275 1366 $language = pwg_get_session_var( 'lang_switch', $user['language'] ); 1276 1367 switch_lang_to($language); … … 1279 1370 { 1280 1371 // And switch gallery to this language before using personalized and multilangual contents 1372 // --------------------------------------------------------------------------------------- 1281 1373 $language = $data['language']; // Usefull for debugging 1282 1374 switch_lang_to($data['language']); … … 1285 1377 1286 1378 // Retreive users email and user name from id 1379 // ------------------------------------------ 1287 1380 $query =' 1288 1381 SELECT id, username, mail_address … … 1297 1390 { 1298 1391 // Management of Extension flags ([username], [mygallery], [myurl]) 1392 // ---------------------------------------------------------------- 1299 1393 $patterns[] = '#\[username\]#i'; 1300 1394 $replacements[] = $result['username']; … … 1318 1412 1319 1413 // Sending the email with subject and contents 1414 // ------------------------------------------- 1320 1415 pwg_mail($result['mail_address'], array( 1321 1416 'subject' => $subject, … … 1324 1419 1325 1420 // Switching back to default language 1421 // ---------------------------------- 1326 1422 switch_lang_back(); 1327 1423 } … … 1387 1483 1388 1484 // Delete user from all groups 1485 // --------------------------- 1389 1486 $query = " 1390 1487 DELETE FROM ".USER_GROUP_TABLE." … … 1399 1496 1400 1497 // Set user unvalidated status 1498 // --------------------------- 1401 1499 if (!is_admin() and $conf_UAM[7] <> -1) 1402 1500 { … … 1410 1508 1411 1509 // Set user unvalidated group 1510 // -------------------------- 1412 1511 if (!is_admin() and $conf_UAM[2] <> -1) 1413 1512 { … … 1422 1521 1423 1522 // Set user unvalidated privacy level 1523 // ---------------------------------- 1424 1524 if (!is_admin() and $conf_UAM[35] <> -1) 1425 1525 { … … 1451 1551 1452 1552 // Groups cleanup 1553 // -------------- 1453 1554 $query = " 1454 1555 DELETE FROM ".USER_GROUP_TABLE." … … 1661 1762 { 1662 1763 // Verify Confirmmail with time limit ON 1764 // ------------------------------------- 1663 1765 if (isset ($conf_UAM_ConfirmMail[1])) 1664 1766 { 1665 // dates formating and compare 1767 // Dates formating and compare 1768 // --------------------------- 1666 1769 $today = date("d-m-Y"); // Get today's date 1667 1770 list($day, $month, $year) = explode('-', $today); // explode date of today … … 1676 1779 1677 1780 // Condition with the value set for time limit 1781 // ------------------------------------------- 1678 1782 if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set 1679 1783 { 1680 1784 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 1681 1785 1682 // Update ConfirmMail table 1786 // Update ConfirmMail table 1787 // ------------------------ 1683 1788 $query = ' 1684 1789 UPDATE '.USER_CONFIRM_MAIL_TABLE.' … … 1689 1794 1690 1795 // Update LastVisit table - Force reminder field to false 1691 // Usefull when a user has been automatically downgraded and revalidate its registration 1796 // Usefull when a user has been automatically downgraded and revalidate its registration 1797 // ------------------------------------------------------------------------------------- 1692 1798 $query = ' 1693 1799 UPDATE '.USER_LASTVISIT_TABLE.' … … 1739 1845 1740 1846 // Refresh user's category cache 1847 // ----------------------------- 1741 1848 invalidate_user_cache(); 1742 1849 … … 1749 1856 } 1750 1857 // Verify Confirmmail with time limit OFF 1858 // -------------------------------------- 1751 1859 else 1752 1860 { 1753 1861 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 1754 1862 1755 // Update ConfirmMail table 1863 // Update ConfirmMail table 1864 // ------------------------ 1756 1865 $query = ' 1757 1866 UPDATE '.USER_CONFIRM_MAIL_TABLE.' … … 1762 1871 1763 1872 // Update LastVisit table - Force reminder field to false 1764 // Usefull when a user has been automatically downgraded and revalidate its registration 1873 // Usefull when a user has been automatically downgraded and revalidate its registration 1874 // ------------------------------------------------------------------------------------- 1765 1875 $query = ' 1766 1876 UPDATE '.USER_LASTVISIT_TABLE.' … … 1819 1929 1820 1930 // Refresh user's category cache 1931 // ----------------------------- 1821 1932 invalidate_user_cache(); 1822 1933 … … 2039 2150 2040 2151 // Get ConfirmMail configuration 2152 // ----------------------------- 2041 2153 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 2042 2154 // Get UAM configuration 2155 // --------------------- 2043 2156 $conf_UAM = unserialize($conf['UserAdvManager']); 2044 2157 2045 2158 $users = array(); 2046 2159 2047 // search users depending expiration date 2160 // Search users depending expiration date 2161 // -------------------------------------- 2048 2162 $query = ' 2049 2163 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, … … 2092 2206 } 2093 2207 2094 // add group lists 2208 // Add groups list 2209 // --------------- 2095 2210 $user_ids = array(); 2096 2211 foreach ($users as $i => $user) … … 2136 2251 2137 2252 // Get ConfirmMail configuration 2253 // ----------------------------- 2138 2254 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 2139 2255 … … 2141 2257 2142 2258 // search users depending expiration date 2259 // -------------------------------------- 2143 2260 $query = ' 2144 2261 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, … … 2176 2293 $users = array(); 2177 2294 2178 // search users depending expiration date 2295 // Search users depending expiration date 2296 // -------------------------------------- 2179 2297 $query = ' 2180 2298 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, … … 2199 2317 } 2200 2318 2201 // add group lists 2319 // Add groups list 2320 // --------------- 2202 2321 $user_ids = array(); 2203 2322 foreach ($users as $i => $user) … … 2224 2343 $users = array(); 2225 2344 2226 // search users depending expiration date and reminder sent 2345 // Search users depending expiration date and reminder sent 2346 // -------------------------------------------------------- 2227 2347 $query = ' 2228 2348 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, … … 2257 2377 $users = array(); 2258 2378 2259 // search users depending expiration date 2379 // Search users depending expiration date 2380 // -------------------------------------- 2260 2381 $query = ' 2261 2382 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, … … 2280 2401 } 2281 2402 2282 // add group lists 2403 // Add groups list 2404 // --------------- 2283 2405 $user_ids = array(); 2284 2406 foreach ($users as $i => $user) … … 2304 2426 2305 2427 // Get ConfirmMail configuration 2428 // ----------------------------- 2306 2429 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 2307 2430 2308 2431 // Get UAM configuration 2432 // --------------------- 2309 2433 $conf_UAM = unserialize($conf['UserAdvManager']); 2310 2434 … … 2320 2444 if (!empty($registration_date)) 2321 2445 { 2322 // dates formating and compare 2446 // Dates formating and compare 2447 // --------------------------- 2323 2448 $today = date("d-m-Y"); // Get today's date 2324 2449 list($day, $month, $year) = explode('-', $today); // explode date of today … … 2333 2458 2334 2459 // Condition with the value set for time limit 2460 // ------------------------------------------- 2335 2461 if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set 2336 2462 { … … 2358 2484 2359 2485 // Initialisation des variables - Variables initiation 2486 // --------------------------------------------------- 2360 2487 $points = 0; 2361 2488 $point_lowercase = 0; … … 2364 2491 $point_characters = 0; 2365 2492 2366 // On récupère la longueur du mot de passe - Getting password lengh 2493 // On récupère la longueur du mot de passe - Getting password lengh 2494 // ---------------------------------------------------------------- 2367 2495 $length = strlen($password); 2368 2496 … … 2372 2500 // On sélectionne une à une chaque lettre - Select each letters 2373 2501 // $i étant à 0 lors du premier passage de la boucle - $i is 0 at first turn 2502 // ------------------------------------------------------------------------- 2374 2503 $letters = $password[$i]; 2375 2504 … … 2377 2506 { 2378 2507 // On ajoute 1 point pour une minuscule - Adding 1 point to score for a lowercase 2508 // ------------------------------------------------------------------------------ 2379 2509 $points = $points + 1; 2380 2510 2381 2511 // On rajoute le bonus pour une minuscule - Adding bonus points for lowercase 2512 // -------------------------------------------------------------------------- 2382 2513 $point_lowercase = 1; 2383 2514 } … … 2385 2516 { 2386 2517 // On ajoute 2 points pour une majuscule - Adding 2 points to score for uppercase 2518 // ------------------------------------------------------------------------------ 2387 2519 $points = $points + 2; 2388 2520 2389 2521 // On rajoute le bonus pour une majuscule - Adding bonus points for uppercase 2522 // -------------------------------------------------------------------------- 2390 2523 $point_uppercase = 2; 2391 2524 } … … 2393 2526 { 2394 2527 // On ajoute 3 points pour un chiffre - Adding 3 points to score for numbers 2528 // ------------------------------------------------------------------------- 2395 2529 $points = $points + 3; 2396 2530 2397 2531 // On rajoute le bonus pour un chiffre - Adding bonus points for numbers 2532 // --------------------------------------------------------------------- 2398 2533 $point_numbers = 3; 2399 2534 } … … 2401 2536 { 2402 2537 // On ajoute 5 points pour un caractère autre - Adding 5 points to score for special characters 2538 // -------------------------------------------------------------------------------------------- 2403 2539 $points = $points + 5; 2404 2540 2405 2541 // On rajoute le bonus pour un caractère autre - Adding bonus points for special characters 2542 // ---------------------------------------------------------------------------------------- 2406 2543 $point_characters = 5; 2407 2544 } … … 2409 2546 2410 2547 // Calcul du coefficient points/longueur - calculating the coefficient points/length 2548 // --------------------------------------------------------------------------------- 2411 2549 $step1 = $points / $length; 2412 2550 2413 2551 // Calcul du coefficient de la diversité des types de caractères... - Calculation of the diversity of character types... 2552 // --------------------------------------------------------------------------------------------------------------------- 2414 2553 $step2 = $point_lowercase + $point_uppercase + $point_numbers + $point_characters; 2415 2554 2416 2555 // Multiplication du coefficient de diversité avec celui de la longueur - Multiplying the coefficient of diversity with that of the length 2556 // -------------------------------------------------------------------------------------------------------------------------------------------- 2417 2557 $score = $step1 * $step2; 2418 2558 2419 2559 // Multiplication du resultat par la longueur de la chaine - Multiplying the result by the length of the string 2560 // ------------------------------------------------------------------------------------------------------------ 2420 2561 $finalscore = $score * $length; 2421 2562 … … 2486 2627 } 2487 2628 // IMPORTANT SECURITY ! 2629 // -------------------- 2488 2630 $plugin = array_map('htmlspecialchars', $plugin); 2489 2631 … … 2619 2761 2620 2762 // Query to get informations in database 2763 // ------------------------------------- 2621 2764 if (!empty($user_ids)) 2622 2765 { … … 2659 2802 2660 2803 // Initial backup folder creation and file initialisation 2804 // ------------------------------------------------------ 2661 2805 if (!is_dir(UAM_PATH.'/include/backup')) 2662 2806 mkdir(UAM_PATH.'/include/backup'); … … 2668 2812 2669 2813 // Saving UAM specific tables 2814 // -------------------------- 2670 2815 $ListTables = array(USER_CONFIRM_MAIL_TABLE, USER_LASTVISIT_TABLE); 2671 2816 $j=0; … … 2708 2853 2709 2854 // Saving UAM configuration 2855 // ------------------------ 2710 2856 $insertions = "-- -------------------------------------------------------\n"; 2711 2857 $insertions .= "-- Insert UAM configuration in ".CONFIG_TABLE."\n"; … … 2734 2880 2735 2881 // Download generated dump file 2882 // ---------------------------- 2736 2883 if ($download == 'true') 2737 2884 { -
extensions/UserAdvManager/branches/2.30/include/upgradedb.inc.php
r12248 r12272 29 29 { 30 30 // Get current plugin version 31 // -------------------------- 31 32 $plugin = PluginInfos(UAM_PATH); 32 33 $version = $plugin['version']; 33 34 34 35 // Update plugin version in #_config table 36 // --------------------------------------- 35 37 $query = ' 36 38 UPDATE '.CONFIG_TABLE.' … … 45 47 // Check #_plugin table consistency 46 48 // Only useful if a previous version upgrade has not worked correctly (rare case) 49 // ------------------------------------------------------------------------------ 47 50 $query = ' 48 51 SELECT version … … 133 136 { 134 137 // Create missing table 138 // -------------------- 135 139 $query = " 136 140 ALTER TABLE ".USER_CONFIRM_MAIL_TABLE." … … 141 145 142 146 // Upgrade plugin configuration 147 // ---------------------------- 143 148 global $conf; 144 149 … … 191 196 192 197 // Changing parameter name 198 // ----------------------- 193 199 $q = ' 194 200 UPDATE '.CONFIG_TABLE.' … … 206 212 207 213 // Upgrading ConfirmMail options 214 // ----------------------------- 208 215 $query = ' 209 216 SELECT value … … 235 242 236 243 // Upgrading options 244 // ----------------- 237 245 $query = ' 238 246 SELECT value … … 289 297 290 298 // Upgrading options 299 // ----------------- 291 300 $query = ' 292 301 SELECT value … … 313 322 314 323 // Insert a new config entry for futur plugin's version check 324 // ---------------------------------------------------------- 315 325 $query = ' 316 326 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) … … 329 339 330 340 // Upgrading options 341 // ----------------- 331 342 $query = ' 332 343 SELECT value … … 352 363 353 364 // Create new UAM entry in plugins table 365 // ------------------------------------- 354 366 $uam_new_version = "2.20.0"; 355 367 … … 361 373 pwg_query($query); 362 374 363 // Delete old plugin entry in plugins table 375 // Delete old plugin entry in plugins table 376 // ---------------------------------------- 364 377 $query = ' 365 378 DELETE FROM '.PLUGINS_TABLE.' … … 370 383 pwg_query($query); 371 384 372 // rename directory 385 // Rename directory 386 // ---------------- 373 387 if (!rename(PHPWG_PLUGINS_PATH.'NBC_UserAdvManager', PHPWG_PLUGINS_PATH.'UserAdvManager')) 374 388 { … … 384 398 385 399 // Upgrading options 400 // ----------------- 386 401 $query = ' 387 402 SELECT value … … 409 424 410 425 // Upgrading options 426 // ----------------- 411 427 $query = ' 412 428 SELECT value … … 435 451 436 452 // Upgrading options 453 // ----------------- 437 454 $query = ' 438 455 SELECT value … … 447 464 448 465 // Refactoring all configuration options 466 // ------------------------------------- 449 467 $Newconf_UAM[0] = $Newconf_UAM[0]; 450 468 $Newconf_UAM[1] = $Newconf_UAM[1]; … … 484 502 485 503 // unset obsolete conf 504 // ------------------- 486 505 unset ($Newconf_UAM[35]); 487 506 unset ($Newconf_UAM[36]); … … 501 520 502 521 // Upgrading options 522 // ----------------- 503 523 $query = ' 504 524 SELECT value … … 522 542 523 543 // Piwigo's native tables modifications for password reset function - Add pwdreset column 544 // -------------------------------------------------------------------------------------- 524 545 $query = ' 525 546 SHOW COLUMNS FROM '.USERS_TABLE.' -
extensions/UserAdvManager/branches/2.30/language/en_UK/help.lang.php
r12239 r12272 331 331 ... 332 332 '; 333 $lang['UAM_miscTitle'] = ' Other miscellaneous options';333 $lang['UAM_miscTitle'] = 'Miscellaneous options'; 334 334 $lang['UAM_miscTitle_d'] = ' 335 335 - Registered users monitoring<br> -
extensions/UserAdvManager/branches/2.30/language/en_UK/plugin.lang.php
r12239 r12272 343 343 $lang['UAM_MiscOptions'] = 'Other miscellaneous options'; 344 344 $lang['UAM_Title3'] = 'Ghost users management'; 345 $lang['UAM_Title5'] = ' Other miscellaneous options';345 $lang['UAM_Title5'] = 'Miscellaneous options'; 346 346 $lang['UAM_Password_Reset_Msg'] = 'Please, change your password!'; 347 347 $lang['UAM_PwdReset'] = 'Password renewal'; … … 357 357 $lang['UAM %d user pwdreseted'] = 'Password renewal required for %d user'; 358 358 $lang['UAM %d users pwdreseted'] = 'Password renewal required for %d users'; 359 $lang['UAM_Error_Using_illegal_Kdays'] = 'Using the [Kdays] tag is allowed only if the deadline for registration validation limited is active. Refer to the text field in red to correct the problem.'; 360 $lang['UAM_Default_InfoMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery]. 361 362 Please, find find below your connexion information.'; 363 $lang['UAM_Default_ConfirmMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery]. 364 365 To complete the procedure and be able to browse through the pictures, thank you kindly confirm your registration by clicking on the link in this message.'; 366 $lang['UAM_Default_GhstReminder_Txt'] = 'Hello [username]. 367 368 This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 369 370 On receipt of this message and no new visit within [days] days, we would be obliged to automatically delete your account. 371 372 Best regards, 373 374 The admin of the gallery [mygallery] - [myurl]'; 375 $lang['UAM_Default_GhstDeletion_Txt'] = 'Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery]. Please register again.'; 376 $lang['UAM_Default_GhstDemotion_Txt'] = 'Sorry [username], your account has been deprecated due to a too long time passed since your last visit at [mygallery]. Please, use the following link to revalidate your account:'; 377 $lang['UAM_Default_AdminValidation_Txt'] = 'Hello [username]! Thank you for registering and welcome to [mygallery]. 378 379 Your account has been manually validated by the webmaster of [mygallery]. You may now log in at [myurl] and make any appropriate changes to your profile.'; 380 $lang['UAM_Default_PwdRequest_Txt'] = 'You have requested a password reset on our gallery. Please, find below your new connection settings.'; 381 $lang['UAM_Default_ValidationTimeout_Txt'] = 'Sorry, your account has been deleted because you have not validated your registration in requested time ([Kdays] days). Please, retry registration with a valid and non blocked email account.'; 382 $lang['UAM_Default_CfmMail_Remail_Txt1'] = 'Hello [username]. 383 384 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again x days to validate your registration. 385 386 Note: After this period, your account will be permanently deleted.'; 387 $lang['UAM_Default_CfmMail_Remail_Txt2'] = 'Hello [username]. 388 389 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have x days to confirm your registration by clicking on the link in the message you should have received when you registered. 390 391 Note: After this period, your account will be permanently deleted.'; 392 $lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Welcome [username]! You have confirmed that you are human and may now use [mygallery]!'; 393 $lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.'; 359 394 // --------- End: New or revised $lang ---- from version 2.30.0 360 395 ?> -
extensions/UserAdvManager/branches/2.30/language/fr_FR/help.lang.php
r12239 r12272 327 327 ... 328 328 '; 329 $lang['UAM_miscTitle'] = 'Autres options diverses';329 $lang['UAM_miscTitle'] = 'Autres options'; 330 330 $lang['UAM_miscTitle_d'] = ' 331 331 - Suivi des visiteurs inscrits<br> -
extensions/UserAdvManager/branches/2.30/language/fr_FR/plugin.lang.php
r12239 r12272 340 340 $lang['UAM_MiscOptions'] = 'Autres options'; 341 341 $lang['UAM_Title3'] = 'Gestion des utilisateurs fantômes'; 342 $lang['UAM_Title5'] = 'Autres options diverses';342 $lang['UAM_Title5'] = 'Autres options'; 343 343 $lang['UAM_Password_Reset_Msg'] = 'Veuillez modifier votre mot de passe !'; 344 344 $lang['UAM_PwdReset'] = 'Renouvellement du mot de passe'; … … 354 354 $lang['UAM %d user pwdreseted'] = 'Renouvellement de mot de passe demandé pour %d utilisateur'; 355 355 $lang['UAM %d users pwdreseted'] = 'Renouvellement de mot de passe demandé pour %d utilisateurs'; 356 $lang['UAM_Error_Using_illegal_Kdays'] = 'L\'utilisation de la balise [Kdays] n\'est autorisée que si la limitation du délai de validation d\'inscription est active. Reportez vous au champ de texte en rouge pour corriger le problème.'; 357 $lang['UAM_Default_InfoMail_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery]. 358 359 Vous trouverez ci-dessous vos informations de connexion sur la galerie.'; 360 $lang['UAM_Default_ConfirmMail_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery]. 361 362 Pour terminer la procédure et pouvoir parcourir l\'ensemble des photos, merci de bien vouloir valider votre inscription en cliquant sur le lien dans ce message.'; 363 $lang['UAM_Default_GhstReminder_Txt'] = 'Bonjour [username]. 364 365 Ceci est un message de rappel car cela fait longtemps que vous n\'êtes pas revenu visiter la galerie [mygallery]. Si vous ne souhaitez plus utiliser votre compte d\'accès, merci de bien vouloir nous le faire savoir en répondant à ce message. Votre compte sera alors immédiatement détruit. 366 367 A la réception de ce présent message et sans nouvelle visite de votre part sous [days] jours, nous serions dans l\'obligation de supprimer automatiquement votre compte. 368 369 Cordialement, 370 371 L\'administrateur de la galerie [mygallery] - [myurl]'; 372 $lang['UAM_Default_GhstDeletion_Txt'] = 'Désolé [username], votre compte a été supprimé automatiquement pour cause de délai dépassé depuis votre dernière visite à [mygallery]. Veuillez vous réinscrire.'; 373 $lang['UAM_Default_GhstDemotion_Txt'] = 'Désolé [username], votre compte a été rétrogradé pour cause de dépassement de délai depuis votre dernière visite à [mygallery]. Veuillez revalider votre inscription en cliquant sur le lien suivant :'; 374 $lang['UAM_Default_AdminValidation_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery]. 375 376 Votre inscription a été validée manuellement par l\'administrateur de [mygallery]. Vous pouvez maintenant vous connecter à [myurl] et modifier vos informations de profil.'; 377 $lang['UAM_Default_PwdRequest_Txt'] = 'Vous avez demandé le renouvellement de votre mot de passe. Veuillez trouver ci-dessous vos nouvelles informations de connexion.'; 378 $lang['UAM_Default_ValidationTimeout_Txt'] = 'Désolé, votre accès a été supprimé car vous n\'avez pas validé votre inscription dans le temps imparti ([Kdays] jours). Merci de vous réinscrire en prenant garde d\'utiliser une adresse de messagerie valide et accessible.'; 379 $lang['UAM_Default_CfmMail_Remail_Txt1'] = 'Bonjour [username]. 380 381 Ceci est un message de rappel car vous n\'avez pas validé votre inscription sur [mygallery] et votre clé de validation a expiré. Pour vous permettre d\'accéder à notre galerie, votre période de validation a été réinitialisée. Vous avez donc un nouveau délai de x jours pour valider votre inscription. 382 383 Note: A l\'issue de cette période sans validation, votre compte sera définitivement supprimé.'; 384 $lang['UAM_Default_CfmMail_Remail_Txt2'] = 'Bonjour [username]. 385 386 Ceci est un message de rappel car vous vous êtes inscrit sur notre galerie [mygallery] mais vous n\'avez pas encore validé cette inscription et le délai va bientôt expirer. Un délai supplémentaire de x jours vous est accordé. Veuillez cliquer sur le lien de confirmation que vous avez reçu lors de votre inscription. 387 388 Note: A l\'issue de cette période sans validation, votre compte sera définitivement supprimé.'; 389 $lang['UAM_Default_CfmMail_Custom_Txt1'] = 'Bienvenue [username]! Vous avez confirmé que vous étiez bien un humain et non une machine. Vous pouvez maintenant profiter pleinement de [mygallery]!'; 390 $lang['UAM_Default_CfmMail_Custom_Txt2'] = 'Votre clé d\'activation est incorrecte ou expirée ou vous avez déjà validé votre inscription. Merci de contacter le webmestre de la galerie pour résoudre le problème.'; 356 391 // --------- End: New or revised $lang ---- from version 2.30.0 357 392 ?> -
extensions/UserAdvManager/branches/2.30/main.inc.php
r12248 r12272 29 29 30 30 // Plugin administration panel 31 // --------------------------- 31 32 add_event_handler('get_admin_plugin_menu_links', 'UAM_admin_menu'); 32 33 33 /* Lastvisit table feed for Ghost Tracker */ 34 // Lastvisit table feed for Ghost Tracker 35 // -------------------------------------- 34 36 add_event_handler('loc_begin_index', 'UAM_GhostTracker'); 35 37 36 38 // User creation 39 // ------------- 37 40 add_event_handler('register_user', 'UAM_Adduser'); 38 41 39 42 // User deletion 43 // ------------- 40 44 add_event_handler('delete_user', 'UAM_Deluser'); 41 45 42 46 // Check users registration 47 // ------------------------ 43 48 add_event_handler('register_user_check', 'UAM_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 44 49 … … 49 54 50 55 // Redirection to profile page 56 // --------------------------- 51 57 add_event_handler('login_success', 'UAM_LoginTasks'); 52 58 53 59 // Adding customized text to lost password email 60 // --------------------------------------------- 54 61 add_event_handler('render_lost_password_mail_content', 'UAM_lost_password_mail_content'); 55 62 56 63 // *** Important ! This is necessary to make email exclusion work in admin's users management panel *** 64 // ---------------------------------------------------------------------------------------------------- 57 65 add_event_handler('init', 'UAM_InitPage'); 58 66 59 67 // PWG_Stuffs module 68 // ----------------- 60 69 if ((isset($conf_UAM[33]) and $conf_UAM[33] == 'true')) 61 70 { … … 64 73 65 74 // Add new feature in user_list - Password Reset 75 // --------------------------------------------- 66 76 if ((isset($conf_UAM[38]) and $conf_UAM[38] == 'true')) 67 77 { 68 // add new column on user_list 78 // Add new column on user_list 79 // --------------------------- 69 80 add_event_handler('loc_visible_user_list', 'UAM_loc_visible_user_list'); 70 81 71 //add prefilter on user_list 82 // Add prefilter on user_list 83 // -------------------------- 72 84 add_event_handler('loc_begin_admin', 'UAM_PwdReset_Action',60); 73 85 86 /** 87 * UAM_PwdReset_Action - Triggered on UAM_PwdReset_Action 88 * Handle passord reset action in user_list.php 89 */ 74 90 function UAM_PwdReset_Action() 75 91 { … … 170 186 } 171 187 188 /** 189 * UAM_PwdReset_Prefilter 190 * Adds action field for password reset in user_list.tpl 191 */ 172 192 function UAM_PwdReset_Prefilter($content, &$smarty) 173 193 { -
extensions/UserAdvManager/branches/2.30/maintain.inc.php
r12248 r12272 9 9 include_once (UAM_PATH.'include/functions.inc.php'); 10 10 11 load_language('plugin.lang', UAM_PATH); 12 11 13 12 14 function plugin_install() … … 18 20 /* ****************************************************************** */ 19 21 22 $defaultUAM = array(); 23 $defaultConfirmMail = array(); 24 20 25 // Default global parameters for UserAdvManager conf 21 $default1 = array('false','false',-1,-1,-1,'false','',-1,'','','false','','false',100,'false','false',10,'Hello [username]. 22 23 This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 24 25 On receipt of this message and no new visit within 15 days, we would be obliged to automatically delete your account. 26 27 Best regards, 28 29 The admin of the gallery.','false','false','false','false','false','Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery].','Sorry [username], your account has been deprecated due to a too long time passed since your last visit at [mygallery]. Please, use the following link to revalidate your account.',-1,-1,'Thank you for registering at [mygallery]. Your account has been manually validated by _admin_. You may now log in at _link_to_site_ and make any appropriate changes to your profile. Welcome to _name_of_site_!','false','You have requested a password reset on our gallery. Please, find below your new connection settings.','false','Sorry, your account has been deleted because you have not validated your registration in requested time. Please, try registration with a valid and non blocked email account.','false','false','false',-1,-1,-1,'false'); 30 26 // ------------------------------------------------- 27 $defaultUAM[0] = 'false'; // UAM_MAIL_INFO_TRUE/FALSE 28 $defaultUAM[1] = 'false'; // UAM_CONFIRM_MAIL_TRUE/FALSE 29 $defaultUAM[2] = '-1'; // UAM_No_Confirm_Group 30 $defaultUAM[3] = '-1'; // UAM_Validated_Group 31 $defaultUAM[4] = '-1'; // UAM_Validated_Status 32 $defaultUAM[5] = 'false'; // UAM_USERNAME_CHAR_TRUE 33 $defaultUAM[6] = ''; // UAM_USERNAME_CHAR_LIST 34 $defaultUAM[7] = '-1'; // UAM_No_Confirm_Status 35 $defaultUAM[8] = l10n('UAM_Default_InfoMail_Txt'); // UAM_MAILINFO_TEXT 36 $defaultUAM[9] = l10n('UAM_Default_ConfirmMail_Txt'); // UAM_CONFIRMMAIL_TEXT 37 $defaultUAM[10] = 'false'; // UAM_MAILEXCLUSION_TRUE/FALSE 38 $defaultUAM[11] = ''; // UAM_MAILEXCLUSION_LIST 39 $defaultUAM[12] = 'false'; // UAM_PASSWORDENF_TRUE/FALSE 40 $defaultUAM[13] = '100'; // UAM_PASSWORD_SCORE 41 $defaultUAM[14] = 'false'; // UAM_ADMINPASSWENF_TRUE/FALSE 42 $defaultUAM[15] = 'false'; // UAM_GHOSTRACKER_TRUE/FALSE 43 $defaultUAM[16] = '10'; // UAM_GHOSTRACKER_DAYLIMIT 44 $defaultUAM[17] = l10n('UAM_Default_GhstReminder_Txt'); // UAM_GHOSTRACKER_REMINDERTEXT 45 $defaultUAM[18] = 'false'; // UAM_ADDLASTVISIT_TRUE/FALSE 46 $defaultUAM[19] = 'false'; // UAM_ADMINCONFMAIL_TRUE/FALSE 47 $defaultUAM[20] = 'false'; // UAM_REDIRTOPROFILE_TRUE/FALSE 48 $defaultUAM[21] = 'false'; // UAM_GTAUTO_TRUE/FALSE 49 $defaultUAM[22] = 'false'; // UAM_GTAUTOMAIL_TRUE/FALSE 50 $defaultUAM[23] = l10n('UAM_Default_GhstDeletion_Txt'); // UAM_GTAUTODEL_TEXT 51 $defaultUAM[24] = l10n('UAM_Default_GhstDemotion_Txt'); // UAM_GTAUTOMAILTEXT 52 $defaultUAM[25] = '-1'; // UAM_Downgrade_Group 53 $defaultUAM[26] = '-1'; // UAM_Downgrade_Status 54 $defaultUAM[27] = l10n('UAM_Default_AdminValidation_Txt'); // UAM_ADMINVALIDATIONMAIL_TEXT 55 $defaultUAM[28] = 'false'; // UAM_CUSTOMPASSWRETR_TRUE/FALSE 56 $defaultUAM[29] = l10n('UAM_Default_PwdRequest_Txt'); // UAM_CUSTOMPASSWRETR_TEXT 57 $defaultUAM[30] = 'false'; // UAM_USRAUTO_TRUE/FALSE 58 $defaultUAM[31] = l10n('UAM_Default_ValidationTimeout_Txt');// UAM_USRAUTODEL_TEXT 59 $defaultUAM[32] = 'false'; // UAM_USRAUTOMAIL_TRUE/FALSE 60 $defaultUAM[33] = 'false'; // UAM_STUFFS_TRUE/FALSE 61 $defaultUAM[34] = 'false'; // UAM_HIDEPASSW_TRUE/FALSE 62 $defaultUAM[35] = '-1'; // UAM_NO_VALID_LEVEL 63 $defaultUAM[36] = '-1'; // UAM_VALID_LEVEL 64 $defaultUAM[37] = '-1'; // UAM_DOWNGRADE_LEVEL 65 $defaultUAM[38] = 'false'; // UAM_PWDRESET_TRUE/FALSE 66 31 67 // Default specific parameters for UserAdvManager ConfirmMail conf 32 $default2 = array('false',5,'Hello [username]. 33 34 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration. 35 36 Note: After this period, your account will be permanently deleted.','false','Hello [username]. 37 38 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered. 39 40 Note: After this period, your account will be permanently deleted.','You have confirmed that you are human and may now use [mygallery]! Welcome [username]!','Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.'); 41 68 // --------------------------------------------------------------- 69 $defaultConfirmMail[0] = 'false'; // UAM_CONFIRMMAIL_TIMEOUT_TRUE/FALSE 70 $defaultConfirmMail[1] = '5'; // UAM_CONFIRMMAIL_DELAY 71 $defaultConfirmMail[2] = l10n('UAM_Default_CfmMail_Remail_Txt1'); // UAM_CONFIRMMAIL_REMAIL_TXT1 72 $defaultConfirmMail[3] = 'false'; // UAM_CONFIRMMAIL_REMAIL_TRUE/FALSE 73 $defaultConfirmMail[4] = l10n('UAM_Default_CfmMail_Remail_Txt2'); // UAM_CONFIRMMAIL_REMAIL_TXT2 74 $defaultConfirmMail[5] = l10n('UAM_Default_CfmMail_Custom_Txt1'); // UAM_CONFIRMMAIL_CUSTOM_TXT1 75 $defaultConfirmMail[6] = l10n('UAM_Default_CfmMail_Custom_Txt2'); // UAM_CONFIRMMAIL_CUSTOM_TXT2 76 42 77 // Set current plugin version in config table 78 // ------------------------------------------ 43 79 $plugin = PluginInfos(UAM_PATH); 44 80 $version = $plugin['version']; … … 54 90 55 91 // Create UserAdvManager conf if not already exists 92 // ------------------------------------------------ 56 93 $query = ' 57 94 SELECT param … … 65 102 $q = ' 66 103 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 67 VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($default 1)).'","UAM parameters")104 VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($defaultUAM)).'","UAM parameters") 68 105 ;'; 69 106 pwg_query($q); … … 71 108 72 109 // Create UserAdvManager_ConfirmMail conf if not already exists 110 // ------------------------------------------------------------ 73 111 $query = ' 74 112 SELECT param … … 82 120 $q = ' 83 121 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 84 VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($default 2)).'","UAM ConfirmMail parameters")122 VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($defaultConfirmMail)).'","UAM ConfirmMail parameters") 85 123 ;'; 86 124 pwg_query($q); … … 88 126 89 127 // Create UserAdvManager_Redir conf if not already exists 128 // ------------------------------------------------------ 90 129 $query = ' 91 130 SELECT param … … 105 144 106 145 // Create UserAdvManager_Version conf if not already exists 146 // -------------------------------------------------------- 107 147 $query = ' 108 148 SELECT param … … 122 162 123 163 // Create USER_CONFIRM_MAIL_TABLE 164 // ------------------------------ 124 165 $q = " 125 166 CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." ( … … 136 177 137 178 // Create USER_LASTVISIT_TABLE 179 // --------------------------- 138 180 $q = " 139 181 CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." ( … … 147 189 148 190 // Piwigo's native tables modifications for password reset function - Add pwdreset column if not already exists 191 // ------------------------------------------------------------------------------------------------------------ 149 192 $query = ' 150 193 SHOW COLUMNS FROM '.USERS_TABLE.' … … 277 320 278 321 /* Check database upgrade since version 2.16.0 */ 322 /* ******************************************* */ 279 323 if (isset($conf['UserAdvManager_Version'])) 280 324 { … … 316 360 317 361 // Update plugin version number in #_config table and check consistency of #_plugins table 362 // --------------------------------------------------------------------------------------- 318 363 UAM_version_update(); 319 364 -
extensions/UserAdvManager/branches/2.30/stuffs_module/config.inc.php
r9908 r12272 5 5 if (!isset($datas)) $datas = ''; 6 6 7 // Enregistrement de la configuration 7 // set configuration 8 // ----------------- 8 9 if (isset($_POST['submit']) and !is_adviser()) { 9 10 $datas = stripslashes($_POST['personal_content']); 10 11 } 11 12 12 // Parametrage du template 13 // Template init 14 // ------------- 13 15 $template->assign('cat_style', array()); 14 16 $template->assign(array('PERSONAL_CONTENT' => $datas)); -
extensions/UserAdvManager/branches/2.30/stuffs_module/main.inc.php
r9908 r12272 6 6 7 7 // Extended description 8 // -------------------- 8 9 if (function_exists('get_extended_desc')) 9 10 {
Note: See TracChangeset
for help on using the changeset viewer.