Changeset 3858 for extensions
- Timestamp:
- Sep 17, 2009, 9:41:40 PM (15 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/ConfirmMail.php
r3742 r3858 12 12 load_language('plugin.lang', NBC_UserAdvManager_PATH); 13 13 14 if ( isset($_GET['key']))14 if (isset($_GET['key'])) 15 15 { 16 16 17 if ( VerifyConfirmMail($_GET['key']) ) 18 $template->assign(array( 19 'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_ok'), 20 )); 17 if (VerifyConfirmMail($_GET['key'])) 18 $template->assign( 19 array( 20 'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_ok'), 21 ) 22 ); 21 23 else 22 $template->assign( array(23 'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_bad'), 24 )); 25 26 24 $template->assign( 25 array( 26 'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_bad'), 27 ) 28 ); 27 29 // redirect(make_index_url()); 28 30 } … … 49 51 $template->set_filenames( 50 52 array( 51 52 53 53 'confirm_mail'=>NBC_UserAdvManager_PATH.'ConfirmMail.tpl', 54 ) 55 ); 54 56 if ( isset($lang['Theme: '.$user['theme']]) ) 55 57 { 56 58 $template->assign( 57 58 59 'THEME_ABOUT',l10n('Theme: '.$user['theme']) 60 ); 59 61 } 60 62 … … 62 64 { 63 65 $template->assign( 64 65 66 67 68 69 66 array( 67 'GALLERY_URL' => 68 isset($page['gallery_url']) ? 69 $page['gallery_url'] : $conf['gallery_url'], 70 ) 71 ); 70 72 } 71 73 -
extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php
r3845 r3858 48 48 switch ($page['tab']) 49 49 { 50 // ************************************************************************* 50 51 // +-----------------------------------------------------------------------+ 51 52 // | Global Config | 52 53 // +-----------------------------------------------------------------------+ 54 // ************************************************************************* 53 55 case 'global': 54 56 … … 135 137 $No_Valid_Status = $status; 136 138 } 139 137 140 /* Template initialization for unvalidated users group */ 138 141 $template->assign( … … 144 147 ); 145 148 } 149 146 150 /* Get status values */ 147 151 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) … … 152 156 $Valid_Status = $status; 153 157 } 158 154 159 /* Template initialization for unvalidated users group */ 155 160 $template->assign( … … 189 194 190 195 if ( isset($_POST['audit']) or isset($_POST['submit']) ) 191 196 { 192 197 $msg_error1 = ''; 193 198 … … 217 222 218 223 /* Username without forbidden keys */ 219 220 221 222 223 224 224 if ( isset($conf_nbc_UserAdvManager[7]) and $conf_nbc_UserAdvManager[7] == 'true' ) 225 { 226 $query = " 227 SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']." 228 FROM ".USERS_TABLE." 229 ;"; 225 230 226 231 $result = pwg_query($query); 227 232 228 while($row = mysql_fetch_array($result)) 233 while($row = mysql_fetch_array($result)) 234 { 235 if (!ValidateUsername($row['username'])) 236 $msg_error2 .= (($msg_error2 <> '') ? '<br/>' : '') . l10n('Err_audit_username_char').$row['username']; 237 } 238 } 239 240 $msg_error3 = ''; 241 242 /* Email without forbidden domain */ 243 if ( isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' ) 244 { 245 $query = " 246 SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']." 247 FROM ".USERS_TABLE." 248 ;"; 249 250 $result = pwg_query($query); 251 252 while($row = mysql_fetch_array($result)) 253 { 254 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 255 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 256 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 229 257 { 230 if (!ValidateUsername($row['username'])) 231 $msg_error2 .= (($msg_error2 <> '') ? '<br/>' : '') . l10n('Err_audit_username_char').$row['username']; 232 } 233 } 234 235 $msg_error3 = ''; 236 237 /* Email without forbidden domain */ 238 if ( isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' ) 239 { 240 $query = " 241 SELECT ".$conf['user_fields']['username'].", ".$conf['user_fields']['email']." 242 FROM ".USERS_TABLE." 243 ;"; 244 245 $result = pwg_query($query); 246 247 while($row = mysql_fetch_array($result)) 248 { 249 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 250 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 251 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 252 { 253 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 254 if (preg_match($pattern, $row['mail_address'])) 255 { 256 $msg_error3 .= (($msg_error3 <> '') ? '<br/>' : '') . l10n('Err_audit_email_forbidden').$row['username'].' ('.$row['mail_address'].')'; 257 } 258 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 259 if (preg_match($pattern, $row['mail_address'])) 260 { 261 $msg_error3 .= (($msg_error3 <> '') ? '<br/>' : '') . l10n('Err_audit_email_forbidden').$row['username'].' ('.$row['mail_address'].')'; 258 262 } 259 263 } 260 264 } 261 262 if ($msg_error1 <> '') 263 $errors[] = $msg_error1.'<br/><br/>'; 264 265 if ($msg_error2 <> '') 266 $errors[] = $msg_error2.'<br/><br/>'; 267 268 if ($msg_error3 <> '') 269 $errors[] = $msg_error3.'<br/><br/>'; 270 271 if ($msg_error1 <> '' or $msg_error2 <> '' or $msg_error3 <> '') 272 array_push($page['errors'], l10n('Err_audit_advise')); 273 else 274 array_push($page['infos'], l10n('UserAdvManager_audit_ok')); 265 } 266 267 if ($msg_error1 <> '') 268 $errors[] = $msg_error1.'<br/><br/>'; 269 270 if ($msg_error2 <> '') 271 $errors[] = $msg_error2.'<br/><br/>'; 272 273 if ($msg_error3 <> '') 274 $errors[] = $msg_error3.'<br/><br/>'; 275 276 if ($msg_error1 <> '' or $msg_error2 <> '' or $msg_error3 <> '') 277 array_push($page['errors'], l10n('Err_audit_advise')); 278 else 279 array_push($page['infos'], l10n('UserAdvManager_audit_ok')); 275 280 } 276 281 … … 296 301 break; 297 302 303 // ************************************************************************* 298 304 // +-----------------------------------------------------------------------+ 299 305 // | ConfirmMail Config | 300 306 // +-----------------------------------------------------------------------+ 307 // ************************************************************************* 301 308 case 'confirmmail': 302 309 … … 345 352 // | errors display | 346 353 // +-----------------------------------------------------------------------+ 347 if ( isset ($errors) and count($errors) != 0)348 {349 $template->assign('errors',array());350 foreach ($errors as $error)351 {352 array_push($page['errors'], $error);353 }354 }354 if ( isset ($errors) and count($errors) != 0) 355 { 356 $template->assign('errors',array()); 357 foreach ($errors as $error) 358 { 359 array_push($page['errors'], $error); 360 } 361 } 355 362 356 363 // +-----------------------------------------------------------------------+ … … 367 374 368 375 376 // ************************************************************************* 369 377 // +-----------------------------------------------------------------------+ 370 378 // | Users manager page | 371 379 // +-----------------------------------------------------------------------+ 380 // ************************************************************************* 372 381 case 'usermanager': 382 373 383 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 374 384 $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array(); … … 380 390 // +-----------------------------------------------------------------------+ 381 391 382 if (!defined('PHPWG_ROOT_PATH'))392 if (!defined('PHPWG_ROOT_PATH')) 383 393 { 384 394 die('Hacking attempt!'); … … 390 400 // | Check Access and exit when user status is not ok | 391 401 // +-----------------------------------------------------------------------+ 392 check_status(ACCESS_ADMINISTRATOR);402 check_status(ACCESS_ADMINISTRATOR); 393 403 394 404 $page['order_by_items'] = array( … … 403 413 // +-----------------------------------------------------------------------+ 404 414 405 $page['filtered_users'] = get_unvalid_user_list();415 $page['filtered_users'] = get_unvalid_user_list(); 406 416 407 417 // +-----------------------------------------------------------------------+ 408 418 // | selected users | 409 419 // +-----------------------------------------------------------------------+ 410 if (isset($_POST['Del_Selected']))411 {412 $collection = array();413 414 switch ($_POST['target'])415 {416 case 'all' :417 {418 foreach($page['filtered_users'] as $local_user)419 {420 array_push($collection, $local_user['id']);421 }422 423 }424 case 'selection' :425 {426 if (isset($_POST['selection']))427 {428 $collection = $_POST['selection'];429 }430 break;431 }432 }433 434 435 {436 array_push($page['errors'], l10n('Select at least one user'));437 438 }420 if (isset($_POST['Del_Selected'])) 421 { 422 $collection = array(); 423 424 switch ($_POST['target']) 425 { 426 case 'all' : 427 { 428 foreach($page['filtered_users'] as $local_user) 429 { 430 array_push($collection, $local_user['id']); 431 } 432 break; 433 } 434 case 'selection' : 435 { 436 if (isset($_POST['selection'])) 437 { 438 $collection = $_POST['selection']; 439 } 440 break; 441 } 442 } 443 444 if (count($collection) == 0) 445 { 446 array_push($page['errors'], l10n('Select at least one user')); 447 } 448 } 439 449 440 450 // +-----------------------------------------------------------------------+ 441 451 // | delete users | 442 452 // +-----------------------------------------------------------------------+ 443 if (isset($_POST['Del_Selected']) and count($collection) > 0) 444 { 445 if (in_array($conf['guest_id'], $collection)) 446 { 447 array_push($page['errors'], l10n('Guest cannot be deleted')); 448 } 449 if (($conf['guest_id'] != $conf['default_user_id']) and 450 in_array($conf['default_user_id'], $collection)) 451 { 452 array_push($page['errors'], l10n('Default user cannot be deleted')); 453 } 454 if (in_array($conf['webmaster_id'], $collection)) 455 { 456 array_push($page['errors'], l10n('Webmaster cannot be deleted')); 457 } 458 if (in_array($user['id'], $collection)) 459 { 460 array_push($page['errors'], l10n('You cannot delete your account')); 461 } 462 463 if (count($page['errors']) == 0) 464 { 465 foreach ($collection as $user_id) 466 { 467 delete_user($user_id); 468 } 469 array_push( 470 $page['infos'], 471 l10n_dec( 472 '%d user deleted', '%d users deleted', 473 count($collection) 474 ) 475 ); 476 477 foreach ($page['filtered_users'] as $filter_key => $filter_user) 478 { 479 if (in_array($filter_user['id'], $collection)) 480 { 481 unset($page['filtered_users'][$filter_key]); 482 } 483 } 484 } 485 } 486 453 if (isset($_POST['Del_Selected']) and count($collection) > 0) 454 { 455 if (in_array($conf['guest_id'], $collection)) 456 { 457 array_push($page['errors'], l10n('Guest cannot be deleted')); 458 } 459 if (($conf['guest_id'] != $conf['default_user_id']) and 460 in_array($conf['default_user_id'], $collection)) 461 { 462 array_push($page['errors'], l10n('Default user cannot be deleted')); 463 } 464 if (in_array($conf['webmaster_id'], $collection)) 465 { 466 array_push($page['errors'], l10n('Webmaster cannot be deleted')); 467 } 468 if (in_array($user['id'], $collection)) 469 { 470 array_push($page['errors'], l10n('You cannot delete your account')); 471 } 472 473 if (count($page['errors']) == 0) 474 { 475 foreach ($collection as $user_id) 476 { 477 delete_user($user_id); 478 } 479 array_push( 480 $page['infos'], 481 l10n_dec( 482 '%d user deleted', '%d users deleted', 483 count($collection) 484 ) 485 ); 486 487 foreach ($page['filtered_users'] as $filter_key => $filter_user) 488 { 489 if (in_array($filter_user['id'], $collection)) 490 { 491 unset($page['filtered_users'][$filter_key]); 492 } 493 } 494 } 495 } 496 497 // +-----------------------------------------------------------------------+ 498 // | Resend new validation key to users | 499 // +-----------------------------------------------------------------------+ 487 500 // +-----------------------------------------------------------------------+ 488 501 // | selected users | 489 502 // +-----------------------------------------------------------------------+ 490 if (isset($_POST['Mail_With_Key']))491 {492 $collection = array();493 494 switch ($_POST['target'])495 {496 case 'all' :497 {498 foreach($page['filtered_users'] as $local_user)499 {500 array_push($collection, $local_user['id']);501 }502 break;503 }504 case 'selection' :505 {506 if (isset($_POST['selection']))507 {508 $collection = $_POST['selection'];509 }510 break;511 }512 }513 514 if (count($collection) == 0)515 {516 array_push($page['errors'], l10n('Select at least one user'));517 }518 }503 if (isset($_POST['Mail_With_Key'])) 504 { 505 $collection = array(); 506 507 switch ($_POST['target']) 508 { 509 case 'all' : 510 { 511 foreach($page['filtered_users'] as $local_user) 512 { 513 array_push($collection, $local_user['id']); 514 } 515 break; 516 } 517 case 'selection' : 518 { 519 if (isset($_POST['selection'])) 520 { 521 $collection = $_POST['selection']; 522 } 523 break; 524 } 525 } 526 527 if (count($collection) == 0) 528 { 529 array_push($page['errors'], l10n('Select at least one user')); 530 } 531 } 519 532 // +-----------------------------------------------------------------------+ 520 533 // | Resend new validation key to users | 521 534 // +-----------------------------------------------------------------------+ 522 if (isset($_POST['Mail_With_Key']) and count($collection) > 0)523 {524 if (in_array($conf['guest_id'], $collection))525 {526 array_push($page['errors'], l10n('No_validation_for_Guest'));527 }528 if (($conf['guest_id'] != $conf['default_user_id']) and529 in_array($conf['default_user_id'], $collection))530 {531 array_push($page['errors'], l10n('No_validation_for_default_user'));532 }533 if (in_array($conf['webmaster_id'], $collection))534 {535 array_push($page['errors'], l10n('No_validation_for_Webmaster'));536 }537 if (in_array($user['id'], $collection))538 {539 array_push($page['errors'], l10n('No_validation_for_your_account'));540 }541 542 if (count($page['errors']) == 0)543 {544 foreach ($collection as $user_id)545 {546 $typemail = 1;547 548 549 550 535 if (isset($_POST['Mail_With_Key']) and count($collection) > 0) 536 { 537 if (in_array($conf['guest_id'], $collection)) 538 { 539 array_push($page['errors'], l10n('No_validation_for_Guest')); 540 } 541 if (($conf['guest_id'] != $conf['default_user_id']) and 542 in_array($conf['default_user_id'], $collection)) 543 { 544 array_push($page['errors'], l10n('No_validation_for_default_user')); 545 } 546 if (in_array($conf['webmaster_id'], $collection)) 547 { 548 array_push($page['errors'], l10n('No_validation_for_Webmaster')); 549 } 550 if (in_array($user['id'], $collection)) 551 { 552 array_push($page['errors'], l10n('No_validation_for_your_account')); 553 } 554 555 if (count($page['errors']) == 0) 556 { 557 foreach ($collection as $user_id) 558 { 559 $typemail = 1; 560 $query = " 561 SELECT id, username, mail_address 562 FROM ".USERS_TABLE." 563 WHERE id = '".$user_id."' 551 564 ;"; 552 $data = mysql_fetch_array(pwg_query($query));565 $data = mysql_fetch_array(pwg_query($query)); 553 566 554 ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],true); 555 } 556 array_push( 557 $page['infos'], 558 l10n_dec( 559 '%d_Mail_With_Key', '%d_Mails_With_Key', 560 count($collection) 561 ) 562 ); 563 564 foreach ($page['filtered_users'] as $filter_key => $filter_user) 565 { 566 if (in_array($filter_user['id'], $collection)) 567 { 568 unset($page['filtered_users'][$filter_key]); 569 } 570 } 571 } 572 } 573 567 ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],true); 568 } 569 array_push( 570 $page['infos'], 571 l10n_dec( 572 '%d_Mail_With_Key', '%d_Mails_With_Key', 573 count($collection) 574 ) 575 ); 576 577 $page['filtered_users'] = get_unvalid_user_list(); 578 } 579 } 580 581 // +-----------------------------------------------------------------------+ 582 // | Send reminder without new key to users | 583 // +-----------------------------------------------------------------------+ 574 584 // +-----------------------------------------------------------------------+ 575 585 // | selected users | 576 586 // +-----------------------------------------------------------------------+ 577 if (isset($_POST['Mail_Without_Key']))578 {579 $collection = array();580 581 switch ($_POST['target'])582 {583 case 'all' :584 {585 foreach($page['filtered_users'] as $local_user)586 {587 array_push($collection, $local_user['id']);588 }589 break;590 }591 case 'selection' :592 {593 if (isset($_POST['selection']))594 {595 $collection = $_POST['selection'];596 }597 break;598 }599 }600 601 if (count($collection) == 0)602 {603 array_push($page['errors'], l10n('Select at least one user'));604 }605 }587 if (isset($_POST['Mail_Without_Key'])) 588 { 589 $collection = array(); 590 591 switch ($_POST['target']) 592 { 593 case 'all' : 594 { 595 foreach($page['filtered_users'] as $local_user) 596 { 597 array_push($collection, $local_user['id']); 598 } 599 break; 600 } 601 case 'selection' : 602 { 603 if (isset($_POST['selection'])) 604 { 605 $collection = $_POST['selection']; 606 } 607 break; 608 } 609 } 610 611 if (count($collection) == 0) 612 { 613 array_push($page['errors'], l10n('Select at least one user')); 614 } 615 } 606 616 // +-----------------------------------------------------------------------+ 607 617 // | Send reminder without new key to users | 608 618 // +-----------------------------------------------------------------------+ 609 if (isset($_POST['Mail_Without_Key']) and count($collection) > 0) 610 { 611 if (in_array($conf['guest_id'], $collection)) 612 { 613 array_push($page['errors'], l10n('No_validation_for_Guest')); 614 } 615 if (($conf['guest_id'] != $conf['default_user_id']) and 616 in_array($conf['default_user_id'], $collection)) 617 { 618 array_push($page['errors'], l10n('No_validation_for_default_user')); 619 } 620 if (in_array($conf['webmaster_id'], $collection)) 621 { 622 array_push($page['errors'], l10n('No_validation_for_Webmaster')); 623 } 624 if (in_array($user['id'], $collection)) 625 { 626 array_push($page['errors'], l10n('No_validation_for_your_account')); 627 } 628 629 if (count($page['errors']) == 0) 630 { 631 foreach ($collection as $user_id) 632 { 633 $typemail = 2; 634 $query = " 635 SELECT id, username, mail_address 636 FROM ".USERS_TABLE." 637 WHERE id = '".$user_id."' 638 ;"; 639 $data = mysql_fetch_array(pwg_query($query)); 619 if (isset($_POST['Mail_Without_Key']) and count($collection) > 0) 620 { 621 if (in_array($conf['guest_id'], $collection)) 622 { 623 array_push($page['errors'], l10n('No_validation_for_Guest')); 624 } 625 if (($conf['guest_id'] != $conf['default_user_id']) and 626 in_array($conf['default_user_id'], $collection)) 627 { 628 array_push($page['errors'], l10n('No_validation_for_default_user')); 629 } 630 if (in_array($conf['webmaster_id'], $collection)) 631 { 632 array_push($page['errors'], l10n('No_validation_for_Webmaster')); 633 } 634 if (in_array($user['id'], $collection)) 635 { 636 array_push($page['errors'], l10n('No_validation_for_your_account')); 637 } 638 639 if (count($page['errors']) == 0) 640 { 641 foreach ($collection as $user_id) 642 { 643 $typemail = 2; 644 $query = " 645 SELECT id, username, mail_address 646 FROM ".USERS_TABLE." 647 WHERE id = '".$user_id."' 648 ;"; 649 650 $data = mysql_fetch_array(pwg_query($query)); 640 651 641 ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],false); 642 } 643 array_push( 644 $page['infos'], 645 l10n_dec( 646 '%d_Reminder_Sent', '%d_Reminders_Sent', 647 count($collection) 648 ) 649 ); 650 651 foreach ($page['filtered_users'] as $filter_key => $filter_user) 652 { 653 if (in_array($filter_user['id'], $collection)) 654 { 655 unset($page['filtered_users'][$filter_key]); 656 } 657 } 658 } 659 } 652 ResendMail2User($typemail,$user_id,$data['username'],$data['mail_address'],false); 653 } 654 array_push( 655 $page['infos'], 656 l10n_dec( 657 '%d_Reminder_Sent', '%d_Reminders_Sent', 658 count($collection) 659 ) 660 ); 661 662 $page['filtered_users'] = get_unvalid_user_list(); 663 } 664 } 665 666 // +-----------------------------------------------------------------------+ 667 // | Force validation | 668 // +-----------------------------------------------------------------------+ 669 // +-----------------------------------------------------------------------+ 670 // | selected users | 671 // +-----------------------------------------------------------------------+ 672 if (isset($_POST['Force_Validation'])) 673 { 674 $collection = array(); 675 676 switch ($_POST['target']) 677 { 678 case 'all' : 679 { 680 foreach($page['filtered_users'] as $local_user) 681 { 682 array_push($collection, $local_user['id']); 683 } 684 break; 685 } 686 case 'selection' : 687 { 688 if (isset($_POST['selection'])) 689 { 690 $collection = $_POST['selection']; 691 } 692 break; 693 } 694 } 695 696 if (count($collection) == 0) 697 { 698 array_push($page['errors'], l10n('Select at least one user')); 699 } 700 } 701 // +-----------------------------------------------------------------------+ 702 // | Force validation | 703 // +-----------------------------------------------------------------------+ 704 if (isset($_POST['Force_Validation']) and count($collection) > 0) 705 { 706 if (in_array($conf['guest_id'], $collection)) 707 { 708 array_push($page['errors'], l10n('No_validation_for_Guest')); 709 } 710 if (($conf['guest_id'] != $conf['default_user_id']) and 711 in_array($conf['default_user_id'], $collection)) 712 { 713 array_push($page['errors'], l10n('No_validation_for_default_user')); 714 } 715 if (in_array($conf['webmaster_id'], $collection)) 716 { 717 array_push($page['errors'], l10n('No_validation_for_Webmaster')); 718 } 719 if (in_array($user['id'], $collection)) 720 { 721 array_push($page['errors'], l10n('No_validation_for_your_account')); 722 } 723 724 if (count($page['errors']) == 0) 725 { 726 foreach ($collection as $user_id) 727 { 728 $query = " 729 SELECT id, username, mail_address 730 FROM ".USERS_TABLE." 731 WHERE id = '".$user_id."' 732 ;"; 733 734 $data = mysql_fetch_array(pwg_query($query)); 735 736 ForceValidation($data['id']); 737 } 738 array_push( 739 $page['infos'], 740 l10n_dec( 741 '%d_Validated_User', '%d_Validated_Users', 742 count($collection) 743 ) 744 ); 745 746 $page['filtered_users'] = get_unvalid_user_list(); 747 } 748 } 660 749 661 750 // +-----------------------------------------------------------------------+ … … 663 752 // +-----------------------------------------------------------------------+ 664 753 665 $groups[-1] = '------------';754 $groups[-1] = '------------'; 666 755 667 756 $query = ' … … 671 760 ;'; 672 761 673 $result = pwg_query($query);762 $result = pwg_query($query); 674 763 675 764 while ($row = mysql_fetch_array($result)) … … 681 770 // | Template Init | 682 771 // +-----------------------------------------------------------------------+ 683 $base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';772 $base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list'; 684 773 685 774 if (isset($_GET['start']) and is_numeric($_GET['start'])) … … 701 790 702 791 /* Hide radio-button if not allow to assign adviser */ 703 if ($conf['allow_adviser'])704 {705 $template->assign('adviser', true);706 }792 if ($conf['allow_adviser']) 793 { 794 $template->assign('adviser', true); 795 } 707 796 708 797 // +-----------------------------------------------------------------------+ … … 710 799 // +-----------------------------------------------------------------------+ 711 800 712 $profile_url = get_root_url().'admin.php?page=profile&user_id=';713 801 $profile_url = get_root_url().'admin.php?page=profile&user_id='; 802 $perm_url = get_root_url().'admin.php?page=user_perm&user_id='; 714 803 715 804 $visible_user_list = array(); … … 717 806 { 718 807 /* simulate LIMIT $start, $conf['users_page'] */ 719 808 if ($num < $start) 720 809 { 721 810 continue; … … 727 816 728 817 $visible_user_list[] = $local_user; 729 }730 731 foreach ($visible_user_list as $local_user)818 } 819 820 foreach ($visible_user_list as $local_user) 732 821 { 733 822 $groups_string = preg_replace( … … 738 827 $local_user['groups'] 739 828 ) 740 741 742 if (isset($_POST['pref_submit'])743 744 745 {746 747 }748 749 750 751 752 753 754 755 756 757 758 759 760 829 ); 830 831 if (isset($_POST['pref_submit']) 832 and isset($_POST['selection']) 833 and in_array($local_user['id'], $_POST['selection'])) 834 { 835 $checked = 'checked="checked"'; 836 } 837 else 838 { 839 $checked = ''; 840 } 841 842 $properties = array(); 843 if ( $local_user['level'] != 0 ) 844 { 845 $properties[] = l10n( sprintf('Level %d', $local_user['level']) ); 846 } 847 $properties[] = 848 (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) 849 ? l10n('is_high_enabled') : l10n('is_high_disabled'); 761 850 762 if (isset($conf_nbc_UserAdvManager_ConfirmMail[1]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true' ) 763 { 764 $template->append( 765 'users', 766 array( 767 'ID' => $local_user['id'], 768 'CHECKED' => $checked, 769 'U_PROFILE' => $profile_url.$local_user['id'], 770 'U_PERM' => $perm_url.$local_user['id'], 771 'USERNAME' => $local_user['username'] 772 .($local_user['id'] == $conf['guest_id'] 773 ? '<BR />['.l10n('is_the_guest').']' : '') 774 .($local_user['id'] == $conf['default_user_id'] 775 ? '<BR />['.l10n('is_the_default').']' : ''), 776 'STATUS' => l10n('user_status_'. 777 $local_user['status']).(($local_user['adviser'] == 'true') 778 ? '<BR />['.l10n('adviser').']' : ''), 779 'EMAIL' => get_email_address_as_display_text($local_user['email']), 780 'GROUPS' => $groups_string, 781 'REGISTRATION' => $local_user['registration_date'], 782 ) 783 ); 784 } 785 } 786 787 788 789 851 if (isset($conf_nbc_UserAdvManager_ConfirmMail[1]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true' ) 852 { 853 $template->append( 854 'users', 855 array( 856 'ID' => $local_user['id'], 857 'CHECKED' => $checked, 858 'U_PROFILE' => $profile_url.$local_user['id'], 859 'U_PERM' => $perm_url.$local_user['id'], 860 'USERNAME' => $local_user['username'] 861 .($local_user['id'] == $conf['guest_id'] 862 ? '<BR />['.l10n('is_the_guest').']' : '') 863 .($local_user['id'] == $conf['default_user_id'] 864 ? '<BR />['.l10n('is_the_default').']' : ''), 865 'STATUS' => l10n('user_status_'. 866 $local_user['status']).(($local_user['adviser'] == 'true') 867 ? '<BR />['.l10n('adviser').']' : ''), 868 'EMAIL' => get_email_address_as_display_text($local_user['email']), 869 'GROUPS' => $groups_string, 870 'REGISTRATION' => $local_user['registration_date'], 871 ) 872 ); 873 } 874 } 790 875 791 876 // +-----------------------------------------------------------------------+ 792 877 // | errors display | 793 878 // +-----------------------------------------------------------------------+ 794 if ( isset ($errors) and count($errors) != 0)795 {796 $template->assign('errors',array());797 798 {799 array_push($page['errors'], $error);800 }801 879 if ( isset ($errors) and count($errors) != 0) 880 { 881 $template->assign('errors',array()); 882 foreach ($errors as $error) 883 { 884 array_push($page['errors'], $error); 885 } 886 } 802 887 803 888 // +-----------------------------------------------------------------------+ 804 889 // | templates display | 805 890 // +-----------------------------------------------------------------------+ 806 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/usermanager.tpl');891 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/usermanager.tpl'); 807 892 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 808 893 } 809 894 else 810 895 { 811 array_push($page['infos'], l10n('Err_UserManager_Settings'));896 array_push($page['infos'], l10n('Err_UserManager_Settings')); 812 897 } 813 898 break; 814 815 899 } 816 900 ?> -
extensions/NBC_UserAdvManager/trunk/admin/confirmmail.tpl
r3845 r3858 15 15 <br> 16 16 </li> 17 <!-- This function can't be set due to no access to server's cron functionnalities -->18 <!-- <li><label>{'UserAdvManager_ConfirmMail_AutoDel'|@translate}</label><br>19 <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_AUTODEL_TRUE} name="UserAdvManager_ConfirmMail_AutoDel"/> {'UserAdvManager_ConfirmMail_AutoDel_true'|@translate}<br>20 <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_AUTODEL_FALSE} name="UserAdvManager_ConfirmMail_AutoDel"/> {'UserAdvManager_ConfirmMail_AutoDel_false'|@translate}<br>21 <br>22 </li>-->23 17 <li><label>{'UserAdvManager_ConfirmMail_Remail'|@translate}</label><br> 24 18 <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_REMAIL_TRUE} name="UserAdvManager_ConfirmMail_Remail"/> {'UserAdvManager_ConfirmMail_Remail_true'|@translate}<br> -
extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl
r3846 r3858 29 29 <td>{$user.EMAIL}</td> 30 30 <td>{$user.GROUPS}</td> 31 31 <td style="text-align:center;">{$user.REGISTRATION}</td> 32 32 {foreach from=$user.plugin_columns item=data} 33 33 <td>{$data}</td> 34 {/foreach} 35 <td style="text-align:center;">{$user.REGISTRATION}</td> 34 {/foreach} 36 35 </tr> 37 36 {/foreach} … … 52 51 <input class="submit" type="submit" value="{'Mail_with_key'|@translate}" name="Mail_With_Key" /> 53 52 <input class="submit" type="submit" value="{'Force_Validation'|@translate}" name="Force_Validation" /> 54 <!--55 <input class="submit" type="submit" value="{'submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED} />56 -->57 53 </p> 58 54 </fieldset> -
extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
r3845 r3858 3 3 load_language('plugin.lang', NBC_UserAdvManager_PATH); 4 4 5 /* Function called from main.inc.php to send validation email */ 5 6 function SendMail2User($typemail, $id, $username, $password, $email, $confirm) 6 7 { … … 72 73 /* debugging */ 73 74 /* ********************** */ 74 MailLog($email,$subject);75 // MailLog($email,$subject); 75 76 /* ********************** */ 76 77 } 77 } 78 78 79 79 80 /* Email sending debugger function */ 80 function MailLog ($to, $subject)81 {82 $fo=fopen (NBC_UserAdvManager_PATH.'admin/maillog.txt','a') ;83 fwrite($fo,"======================\n") ;84 fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n");85 fwrite($fo,$to . "\n" . $subject . "\r\n") ;86 fclose($fo) ;81 //function MailLog ($to, $subject) 82 //{ 83 // $fo=fopen (NBC_UserAdvManager_PATH.'admin/maillog.txt','a') ; 84 // fwrite($fo,"======================\n") ; 85 // fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n"); 86 // fwrite($fo,$to . "\n" . $subject . "\r\n") ; 87 // fclose($fo) ; 87 88 //return mail ($to,$subject) ; 88 } 89 90 89 //} 90 91 92 /* Function called from UserAdvManager_admin.php to resend validation email with or without new validation key */ 91 93 function ResendMail2User($typemail, $user_id, $username, $email, $confirm) 92 94 { … … 137 139 /* debugging */ 138 140 /* ********************** */ 139 MailLog($email,$subject);141 // MailLog($email,$subject); 140 142 /* ********************** */ 141 142 } 143 144 143 } 144 145 146 /* Function called from functions AddConfirmMail and ResetConfirmMail for validation key generation */ 145 147 function FindAvailableConfirmMailID() 146 148 { … … 161 163 162 164 163 165 /* Function called from functions SendMail2User to process unvalidated users and generate validation key link */ 164 166 function AddConfirmMail($user_id, $email) 165 167 { … … 170 172 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 171 173 172 if ( isset($Confirm_Mail_ID))174 if (isset($Confirm_Mail_ID)) 173 175 { 174 176 $query = " … … 192 194 AND ( 193 195 group_id = '".$conf_nbc_UserAdvManager[3]."' 194 196 OR 195 197 group_id = '".$conf_nbc_UserAdvManager[4]."' 196 198 ) … … 198 200 pwg_query($query); 199 201 200 if ( !is_admin() and $conf_nbc_UserAdvManager[9] <> -1)202 if (!is_admin() and $conf_nbc_UserAdvManager[9] <> -1) 201 203 { 202 204 $query = " … … 224 226 225 227 228 /* Function called from UserAdvManager_admin.php to reset validation key */ 226 229 function ResetConfirmMail($user_id) 227 230 { … … 232 235 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 233 236 234 if ( isset($Confirm_Mail_ID))237 if (isset($Confirm_Mail_ID)) 235 238 { 236 239 $query = " … … 253 256 254 257 258 /* Function called from main.inc.php - Triggered on user deletion */ 255 259 function DeleteConfirmMail($user_id) 256 260 { … … 263 267 264 268 265 269 /* Function called from ConfirmMail.php to verify validation key used by user according time limit */ 266 270 function VerifyConfirmMail($id) 267 271 { … … 302 306 if (!empty($registration_date)) 303 307 { 304 // Verify Confirmmail with time limit ON305 if (isset ($conf_nbc_UserAdvManager_ConfirmMail[1]))306 {307 // dates formating and compare308 $today = date("d-m-Y"); // Get today's date309 list($day, $month, $year) = explode('-', $today); // explode date of today310 308 // Verify Confirmmail with time limit ON 309 if (isset ($conf_nbc_UserAdvManager_ConfirmMail[1])) 310 { 311 // dates formating and compare 312 $today = date("d-m-Y"); // Get today's date 313 list($day, $month, $year) = explode('-', $today); // explode date of today 314 $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp 311 315 312 list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date313 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date314 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp316 list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date 317 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date 318 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp 315 319 316 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps 317 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days 318 319 // Condition with the value set for time limit 320 if ($deltadays <= $conf_nbc_UserAdvManager_ConfirmMail[1]) // If Nb of days is less than the set limit 321 { 322 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 323 324 $query = ' 325 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 326 SET date_check="'.$dbnow.'" 327 WHERE id = "'.$id.'" 320 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps 321 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days 322 323 // Condition with the value set for time limit 324 if ($deltadays <= $conf_nbc_UserAdvManager_ConfirmMail[1]) // If Nb of days is less than the limit set 325 { 326 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 327 328 $query = ' 329 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 330 SET date_check="'.$dbnow.'" 331 WHERE id = "'.$id.'" 332 ;'; 333 pwg_query($query); 334 335 if ($conf_nbc_UserAdvManager[3] <> -1) 336 { 337 $query = " 338 DELETE FROM ".USER_GROUP_TABLE." 339 WHERE user_id = '".$data['user_id']."' 340 AND group_id = '".$conf_nbc_UserAdvManager[3]."' 341 ;"; 342 pwg_query($query); 343 } 344 345 if ($conf_nbc_UserAdvManager[4] <> -1) // Change user's group 346 { 347 $query = " 348 DELETE FROM ".USER_GROUP_TABLE." 349 WHERE user_id = '".$data['user_id']."' 350 AND group_id = '".$conf_nbc_UserAdvManager[4]."' 351 ;"; 352 pwg_query($query); 353 354 $query = " 355 INSERT INTO ".USER_GROUP_TABLE." 356 (user_id, group_id) 357 VALUES 358 ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."') 359 ;"; 360 pwg_query($query); 361 } 362 363 if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']))) // Change user's status 364 { 365 $query = " 366 UPDATE ".USER_INFOS_TABLE." 367 SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."' 368 WHERE user_id = '".$data['user_id']."' 369 ;"; 370 pwg_query($query); 371 } 372 // Refresh user's category cache 373 invalidate_user_cache(); 374 375 return true; 376 } 377 elseif ($deltadays > $conf_nbc_UserAdvManager_ConfirmMail[1]) // If timelimit exeeds 378 { 379 return false; 380 } 381 } 382 // Verify Confirmmail with time limit OFF 383 else 384 { 385 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 386 387 $query = ' 388 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 389 SET date_check="'.$dbnow.'" 390 WHERE id = "'.$id.'" 328 391 ;'; 329 pwg_query($query);330 331 if ( $conf_nbc_UserAdvManager[3] <> -1)332 {333 $query = "334 DELETE FROM ".USER_GROUP_TABLE."335 WHERE user_id = '".$data['user_id']."'336 AND group_id = '".$conf_nbc_UserAdvManager[3]."'392 pwg_query($query); 393 394 if ($conf_nbc_UserAdvManager[3] <> -1) 395 { 396 $query = " 397 DELETE FROM ".USER_GROUP_TABLE." 398 WHERE user_id = '".$data['user_id']."' 399 AND group_id = '".$conf_nbc_UserAdvManager[3]."' 337 400 ;"; 338 pwg_query($query); 401 pwg_query($query); 402 } 403 404 if ($conf_nbc_UserAdvManager[4] <> -1) 405 { 406 $query = " 407 DELETE FROM ".USER_GROUP_TABLE." 408 WHERE user_id = '".$data['user_id']."' 409 AND group_id = '".$conf_nbc_UserAdvManager[4]."' 410 ;"; 411 pwg_query($query); 412 413 $query = " 414 INSERT INTO ".USER_GROUP_TABLE." 415 (user_id, group_id) 416 VALUES 417 ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."') 418 ;"; 419 pwg_query($query); 420 } 421 422 if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']))) 423 { 424 $query = " 425 UPDATE ".USER_INFOS_TABLE." 426 SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."' 427 WHERE user_id = '".$data['user_id']."' 428 ;"; 429 pwg_query($query); 430 } 431 // Refresh user's category cache 432 invalidate_user_cache(); 433 434 return true; 339 435 } 340 341 if ( $conf_nbc_UserAdvManager[4] <> -1 ) // Change user's group342 {343 $query = "344 DELETE FROM ".USER_GROUP_TABLE."345 WHERE user_id = '".$data['user_id']."'346 AND group_id = '".$conf_nbc_UserAdvManager[4]."'347 ;";348 pwg_query($query);349 350 $query = "351 INSERT INTO ".USER_GROUP_TABLE."352 (user_id, group_id)353 VALUES354 ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."')355 ;";356 pwg_query($query);357 }358 359 if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']))) // Change user's status360 {361 $query = "362 UPDATE ".USER_INFOS_TABLE."363 SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."'364 WHERE user_id = '".$data['user_id']."'365 ;";366 pwg_query($query);367 }368 // Refresh user's category cache369 invalidate_user_cache();370 371 return true;372 }373 elseif ($deltadays > $conf_nbc_UserAdvManager_ConfirmMail[1]) // If timelimit exeeds374 {375 return false;376 436 } 377 437 } 378 // Verify Confirmmail with time limit OFF 379 else 380 { 438 } 439 else 440 return false; 441 } 442 443 /* Function called from UserAdvManager_admin.php to force users validation by admin */ 444 function ForceValidation($id) 445 { 446 global $conf; 447 448 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 449 450 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 451 452 $query = " 453 SELECT COUNT(*) 454 FROM ".USER_CONFIRM_MAIL_TABLE." 455 WHERE user_id = '".$id."' 456 ;"; 457 list($count) = mysql_fetch_row(pwg_query($query)); 458 459 if ($count == 1) 460 { 461 $query = " 462 SELECT user_id, status, date_check 463 FROM ".USER_CONFIRM_MAIL_TABLE." 464 WHERE user_id = '".$id."' 465 ;"; 466 $data = mysql_fetch_array(pwg_query($query)); 467 468 if (!empty($data) and isset($data['user_id']) and !isset($data['date_check'])) 469 { 381 470 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 382 471 383 $query = '384 UPDATE '.USER_CONFIRM_MAIL_TABLE.'385 SET date_check= "'.$dbnow.'"386 WHERE id = "'.$id.'"387 ;';472 $query = " 473 UPDATE ".USER_CONFIRM_MAIL_TABLE." 474 SET date_check='".$dbnow."' 475 WHERE user_id = '".$data['user_id']."' 476 ;"; 388 477 pwg_query($query); 389 390 if ( $conf_nbc_UserAdvManager[3] <> -1)478 479 if ($conf_nbc_UserAdvManager[3] <> -1) 391 480 { 392 481 $query = " … … 394 483 WHERE user_id = '".$data['user_id']."' 395 484 AND group_id = '".$conf_nbc_UserAdvManager[3]."' 396 485 ;"; 397 486 pwg_query($query); 398 487 } 399 400 if ( $conf_nbc_UserAdvManager[4] <> -1)488 489 if ($conf_nbc_UserAdvManager[4] <> -1) 401 490 { 402 491 $query = " … … 404 493 WHERE user_id = '".$data['user_id']."' 405 494 AND group_id = '".$conf_nbc_UserAdvManager[4]."' 406 495 ;"; 407 496 pwg_query($query); 408 497 409 498 $query = " 410 499 INSERT INTO ".USER_GROUP_TABLE." … … 412 501 VALUES 413 502 ('".$data['user_id']."', '".$conf_nbc_UserAdvManager[4]."') 414 503 ;"; 415 504 pwg_query($query); 416 505 } 417 506 418 if ( ( $conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']) ))507 if (($conf_nbc_UserAdvManager[5] <> -1 or isset($data['status']))) 419 508 { 420 509 $query = " … … 422 511 SET status = '".(isset($data['status']) ? $data['status'] : $conf_nbc_UserAdvManager[5])."' 423 512 WHERE user_id = '".$data['user_id']."' 424 513 ;"; 425 514 pwg_query($query); 426 515 } 427 // Refresh user's category cache516 // Refresh user's category cache 428 517 invalidate_user_cache(); 429 430 518 return true; 431 519 } 432 } 433 } 434 } 435 else 436 return false; 437 } 438 439 520 } 521 } 522 523 /* Function called from main.inc.php - Get username case insensitive */ 440 524 function NotSensibleSearchUsername($username) 441 525 { 442 526 global $conf; 443 527 444 if ( isset($username))528 if (isset($username)) 445 529 { 446 530 $query = " … … 456 540 457 541 542 /* Obsolete function - Check for single email in database */ 458 543 function SearchMail($email) 459 544 { 460 545 global $conf, $lang; 461 546 462 if ( isset($email))547 if (isset($email)) 463 548 { 464 549 $query = " … … 473 558 } 474 559 560 561 /* Function called from main.inc.php - Check if username matches forbidden caracters */ 475 562 function ValidateUsername($login) 476 563 { … … 479 566 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 480 567 481 if ( isset($login) and isset($conf_nbc_UserAdvManager[8]) and $conf_nbc_UserAdvManager[8] <> '')568 if (isset($login) and isset($conf_nbc_UserAdvManager[8]) and $conf_nbc_UserAdvManager[8] <> '') 482 569 { 483 570 $pattern = '/'.$conf_nbc_UserAdvManager[8].'/'; … … 494 581 495 582 583 /* Obsolete function - Check for no forbidden email provider */ 584 /* This don't work on function call */ 496 585 function ValidateEmailProvider($email) 497 586 { … … 515 604 516 605 606 /* Function called from UserAdvManager.php - Get unvalidated users according time limit */ 517 607 function get_unvalid_user_list() 518 608 { … … 520 610 521 611 /* Get ConfirmMail configuration */ 522 612 $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array(); 523 613 524 614 /* Get UserAdvManager configuration */ 525 615 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 526 616 527 617 $users = array(); 528 618 529 619 /* search users depending expiration date */ 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 620 $query = ' 621 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 622 u.'.$conf['user_fields']['username'].' AS username, 623 u.'.$conf['user_fields']['email'].' AS email, 624 ui.status, 625 ui.adviser, 626 ui.enabled_high, 627 ui.level, 628 ui.registration_date, 629 ug.group_id 630 FROM '.USERS_TABLE.' AS u 631 INNER JOIN '.USER_INFOS_TABLE.' AS ui 632 ON u.'.$conf['user_fields']['id'].' = ui.user_id 633 INNER JOIN '.USER_GROUP_TABLE.' AS ug 634 ON u.'.$conf['user_fields']['id'].' = ug.user_id 635 WHERE u.'.$conf['user_fields']['id'].' >= 0 636 AND ug.group_id = "'.$conf_nbc_UserAdvManager[3].'" 637 AND TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'" 638 ORDER BY id ASC 639 ;'; 550 640 551 641 $result = pwg_query($query); 552 642 553 554 555 556 557 558 643 while ($row = mysql_fetch_array($result)) 644 { 645 $user = $row; 646 $user['groups'] = array(); 647 648 array_push($users, $user); 559 649 } 560 650 561 651 /* add group lists */ 562 563 564 565 652 $user_ids = array(); 653 foreach ($users as $i => $user) 654 { 655 $user_ids[$i] = $user['id']; 566 656 } 567 657 568 658 $user_nums = array_flip($user_ids); 569 659 570 571 572 573 660 if (count($user_ids) > 0) 661 { 662 $query = ' 663 SELECT user_id, group_id 574 664 FROM '.USER_GROUP_TABLE.' 575 576 665 WHERE user_id IN ('.implode(',', $user_ids).') 666 ;'; 577 667 578 668 $result = pwg_query($query); 579 669 580 581 582 583 584 585 586 670 while ($row = mysql_fetch_array($result)) 671 { 672 array_push( 673 $users[$user_nums[$row['user_id']]]['groups'], 674 $row['group_id'] 675 ); 676 } 587 677 } 588 678 589 return $users;679 return $users; 590 680 } 591 681 ?> -
extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
r3742 r3858 5 5 $conf_UserAdvManager = isset($conf['UserAdvManager']) ? explode(";" , $conf['UserAdvManager']) : array(); 6 6 7 $lang['infos_mail %s'] = '%s, please find here your information to login the gallery :';8 $lang['Password: %s'] = 'Password: %s';9 $lang['Add of %s'] = 'Add of %s';10 $lang['Update of %s'] = 'Update of %s';11 7 12 $lang['Link: %s'] = 'Please, click on this link to confirm your regsitration : %s'; 13 14 $lang['title_confirm_mail'] = 'Validate your registration'; 15 $lang['confirm_mail_page_title'] = 'Validate your registration'; 16 $lang['confirm_mail_ok'] = '<br/><br/><br/>Thank you to have confirmed your email address and your registration on the gallery. Have fun !<br/><br/><br/><br/>'; 17 $lang['confirm_mail_bad'] = '<br/><br/><br/>Your validation key is broken or you haven\'t validated your registration. Please contact the gallery\'s webmaster to check this issue.<br/><br/><br/><br/>'; 18 8 /* Global Configuration Tab */ 19 9 $lang['Title_Tab1'] = 'UserAdvManager - Global Configuration'; 20 $lang['Tab_Global_Options'] = 'Global Configuration'; 21 22 $lang['Title_Tab2'] = 'UserAdvManager - ConfirmMail Configuration'; 23 $lang['Tab_ConfirmMail_Options'] = 'ConfirmMail Configuration'; 24 10 $lang['Tab_Global'] = 'Global Configuration'; 25 11 $lang['UserAdvManager_Title'] = 'Advanced users settings'; 26 27 $lang['UserAdvManager_Mail_Info'] = 'Mail information user'; 28 $lang['UserAdvManager_Mail_Info_true'] = 'Send a information mail to the user when he registering or updating his profile.'; 29 $lang['UserAdvManager_Mail_Info_false'] = 'Turns off the sending of mail.'; 30 $lang['UserAdvManager_MailInfo_Text'] = 'Text used to introduce the email sent to user on his registration or at his profile update.<br>(!!! <blink>WARNING !</blink> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)'; 31 $lang['UserAdvManager_No_Casse'] = 'User insensitive'; 32 $lang['UserAdvManager_No_Casse_true'] = 'Make the user account insensitive at the registration and the identification step'; 33 $lang['UserAdvManager_No_Casse_false'] = 'Let the user-sensitive.'; 34 $lang['UserAdvManager_Username_Char'] = 'Limited charset for unsername'; 12 $lang['UserAdvManager_Mail_Info'] = ' Mail information user'; 13 $lang['UserAdvManager_Mail_Info_true'] = ' Send an information mail to the user when he registes or updates his profile.'; 14 $lang['UserAdvManager_Mail_Info_false'] = ' Turns off the sending of mail.'; 15 $lang['UserAdvManager_MailInfo_Text'] = ' Text used to introduce the email sent to user on his registration or at his profile update.<br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)'; 16 $lang['UserAdvManager_No_Casse'] = ' User insensitive'; 17 $lang['UserAdvManager_No_Casse_true'] = ' Make the user account insensitive at the registration and the identification step'; 18 $lang['UserAdvManager_No_Casse_false'] = ' Let the user-sensitive.'; 19 $lang['UserAdvManager_Username_Char'] = ' Limited charset for unsername'; 35 20 $lang['UserAdvManager_Username_Char_true'] = ' The following characters will be forbidden for username choice'; 36 21 $lang['UserAdvManager_Username_Char_false'] = ' Use the default username charset control.'; … … 38 23 $lang['UserAdvManager_Confirm_Mail_true'] = ' Send an email to user to allow him to validate his email and his registration.'; 39 24 $lang['UserAdvManager_Confirm_Mail_false'] = ' Use the default Piwigo registration system (without registration validation).'; 40 $lang['UserAdvManager_ConfirmMail_Text'] = 'Text used to introduce the email sent to user to allow him to validate his email address<br>(!!! <b link>WARNING !</blink> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)';25 $lang['UserAdvManager_ConfirmMail_Text'] = 'Text used to introduce the email sent to user to allow him to validate his email address<br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)'; 41 26 $lang['UserAdvManager_No_Confirm_Group'] = 'Group to use for the users who haven\'t validated their email address.'; 42 27 $lang['UserAdvManager_Validated_Group'] = 'Group to use for the users who have validated their email address.'; … … 49 34 $lang['UserAdvManager_MailExclusion_true'] = ' Set the email provider exclusion ON (i.e. : @hotmail.* or @msn.*)'; 50 35 $lang['UserAdvManager_MailExclusion_false'] = ' Set the email provider exclusion OFF.'; 51 $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/>'; 52 36 $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>'; 53 37 $lang['audit'] = 'Audit'; 54 38 $lang['submit'] = 'Submit'; 55 39 40 41 /* ConfirmMail Configuration Tab */ 42 $lang['ConfirmMail_Title'] = 'Advanced management and settings of register confirmation by mail'; 43 $lang['Title_Tab2'] = 'UserAdvManager - ConfirmMail Settings'; 44 $lang['Tab_ConfirmMail'] = 'ConfirmMail Settings'; 45 $lang['UserAdvManager_ConfirmMail_Info'] = 'Time limitation for validation of registration :<br>If you enable this option, select the desired time (x) )in the field below. Visitors who register will then have x days to validate their registration. After this period the validation link they have received by mail will be expired.<br>'; 46 $lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Enable limiting the registration deadline.'; 47 $lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Disable limiting the registration deadline.'; 48 $lang['UserAdvManager_ConfirmMail_TimeOut'] = 'Validation delay :'; 49 $lang['UserAdvManager_ConfirmMail_Delay_Info'] = 'Enter the number of days before expiry of the registration validation : '; 50 /* This function can't work due to no access to server's cron functionnalities */ 51 //$lang['UserAdvManager_ConfirmMail_AutoDel'] = 'Suppression automatique des comptes non validés après le délai d\'expiration : '; 52 //$lang['UserAdvManager_ConfirmMail_AutoDel_true'] = 'Activer la suppression automatique - <b style="text-decoration: blink underline;">ATTENTION !</b> La suppression est aveugle et sans notification.'; 53 //$lang['UserAdvManager_ConfirmMail_AutoDel_false'] = 'Désactiver la suppression automatique.'; 54 $lang['UserAdvManager_ConfirmMail_Remail'] = 'Enable or disable email reminder of unvalidated registers :'; 55 $lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Enable email reminder'; 56 $lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Disable email reminder'; 57 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Custom content of the recall 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="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)'; 58 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Custom content of the recall 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="text-decoration: blink underline;">WARNING !</b> Use the multi language tags from Extended Description plugin if this plugin is activated !!!)'; 59 60 61 /* UserManager Tab */ 62 $lang['UserManager_Title'] = 'Advanced settings of unvalidated registered users'; 63 $lang['Title_Tab3'] = 'UserAdvManager - Visitors management'; 64 $lang['Tab_UserManager'] = 'Visitors management'; 65 $lang['UserAdvManager_ConfirmMail_User_List'] = 'When limiting the deadline for registration is enabled, you will find below the list of users awaiting validation, <b style="text-decoration: underline;">whether or not</b> they are in time to validate.<br><br>In this view, you can: 66 <br><br> 67 - Manually delete accounts <b>(manual drain)</b> 68 <br> 69 - Generate email reminder <b>without</b> generating a new key. Warning: Send an email reminder to targeted visitors. This function does not reset the date of registration of targeted visitors and the timeout is still valid. 70 <br> 71 - Generate email reminder <b>with</b> generating a new key. Warning : Send an email reminder to targeted visitors. This function also resets the date of registration of targeted visitors which equates to extend the deadline for validation.<br> 72 - Submit a registration awaiting validation manually even if the expiry date has passed <b>(forcing validation)</b>. 73 <br>'; 74 $lang['Registration'] = 'Registration date'; 75 76 77 /* Mailing */ 78 $lang['infos_mail %s'] = '%s, please find here your information to login the gallery :'; 79 $lang['Password: %s'] = 'Password: %s'; 80 $lang['Add of %s'] = 'Add of %s'; 81 $lang['Update of %s'] = 'Update of %s'; 82 $lang['Link: %s'] = 'Please, click on this link to confirm your regsitration : %s'; 83 $lang['Reminder_with_key_of_%s'] = '%s, your validation key has been renewed'; 84 $lang['Reminder_without_key_of_%s'] = '%s, your validation key will expire'; 85 86 87 /* Email confirmation page */ 88 $lang['title_confirm_mail'] = 'Validate your registration'; 89 $lang['confirm_mail_page_title'] = 'Validate your registration'; 90 $lang['confirm_mail_ok'] = '<br><br><br>Thank you to have confirmed your email address and your registration on the gallery. Have fun !<br><br><br><br>'; 91 $lang['confirm_mail_bad'] = '<br><br><br>Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.<br><br><br><br>'; 92 93 94 /* Errors and Warnings */ 95 $lang['UserAdvManager_audit_ok'] = 'Audit OK'; 96 $lang['UserAdvManager_save_config'] ='Configuration saved.'; 56 97 $lang['Err_audit_no_casse'] = '<b>These accounts are identical to the case closely :</b> '; 57 98 $lang['Err_audit_username_char'] = '<b>This account uses one or more forbidden characters :</b> '; 58 99 $lang['Err_audit_email_forbidden'] = '<b>This account uses a forbidden email provider :</b> '; 59 $lang['Err_audit_advise'] = '<b>you make a correction to comply with new rules that you have activated.<br>use a utility géstion database to correct user accounts directly in the table ### _USERS'; 60 $lang['UserAdvManager_audit_ok'] = 'Audit OK'; 61 $lang['UserAdvManager_save_config'] ='Configuration registered.'; 62 100 $lang['Err_audit_advise'] = '<b>you have to perform corrections to comply with new rules that you have activated.<br>Use a database management utility to correct user accounts directly in the table ### _USERS'; 63 101 $lang['UserAdvManager_Empty Author'] = 'The author field have to be filled to send a comment.'; 64 65 102 if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' ) 66 $lang['reg_err_login5'] = 'user name is already taken, attention name isinsensitive (Shift = Tiny).';67 $lang['reg_err_login6'] = 'Username does not containthe following characters: ';103 $lang['reg_err_login5'] = 'Username already exist, WARNING name is case insensitive (Shift = Tiny).'; 104 $lang['reg_err_login6'] = 'Username does not match the following characters: '; 68 105 $lang['reg_err_login7'] = 'Your email provider is banned for registration. Banned email providers are: '; 69 70 $lang['invalid_pwd'] = 'User name or password invalid !';71 72 106 $lang['UserAdvManager_empty_pwd'] = '[empty password]'; 73 107 $lang['UserAdvManager_no_update_pwd'] = '[profile updated without password changed]'; 108 $lang['invalid_pwd'] = 'Invalid username or password !'; 109 $lang['Err_ConfirmMail_Settings'] = 'This page will be available only if "Email address confirmation" is activated in tab "Global Configuration".'; 110 $lang['Err_UserManager_Settings'] = 'This page is available only if "Enable limiting the registration deadline" is active in the "ConfirmMail Settings" tab.'; 111 $lang['No_validation_for_Guest'] = 'The "Guest" account is not subject to validation'; 112 $lang['No_validation_for_default_user'] = 'The default account is not subject to validation'; 113 $lang['No_validation_for_Webmaster'] = 'The "Webmaster" account is not subject to validation'; 114 $lang['No_validation_for_your_account'] = 'You personnal admin account is not subject to validation'; 115 $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.'; 74 116 75 $lang['Err_ConfirmMail_Settings'] = 'This page will be available only if "Email address confirmation" is activated in tab "Global Configuration".'; 117 118 /* Processing messages */ 119 $lang['%d_Mail_With_Key'] = '%d message with key renewal was sent'; 120 $lang['%d_Mails_With_Key'] = '%d messages with key renewal were sent'; 121 $lang['%d_Reminder_Sent'] = '%d reminder message was sent'; 122 $lang['%d_Reminders_Sent'] = '%d reminder messages were sent'; 123 $lang['%d_Validated_User'] = '%d User validated manually'; 124 $lang['%d_Validated_Users'] = '%d Users validated manually'; 125 126 127 /* Action button names */ 128 $lang['Delete_selected'] = 'Delete'; 129 $lang['Mail_without_key'] = 'Reminder without key'; 130 $lang['Mail_with_key'] = 'Reminder with key'; 131 $lang['Force_Validation'] = 'Forced validation'; 76 132 ?> -
extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r3845 r3858 5 5 $conf_UserAdvManager = isset($conf['UserAdvManager']) ? explode(";" , $conf['UserAdvManager']) : array(); 6 6 7 $lang['infos_mail %s'] = '%s, voici vos informations pour vous identifier sur la galerie :';8 $lang['Password: %s'] = 'Mot de passe: %s';9 $lang['Add of %s'] = 'Création de %s';10 $lang['Update of %s'] = 'Mise à jour de %s';11 7 12 $lang['Link: %s'] = 'Cliquez sur le lien suivant pour confirmer votre inscription : %s'; 13 14 $lang['title_confirm_mail'] = 'Confirmation de votre inscription'; 15 $lang['confirm_mail_page_title'] = 'Confirmation d\'inscription'; 16 $lang['confirm_mail_ok'] = '<br><br><br>Merci d\'avoir confirmé votre mail et aussi et surtout votre inscription sur le site, profitez bien des photos ...<br><br><br><br>'; 17 $lang['confirm_mail_bad'] = '<br><br><br>Votre clef d\'activation unique est érronée ou expirée ou vous avez déjà validé votre compte, veuillez contacter le webmaster pour régler ce problème.<br><br><br><br>'; 18 8 /* Global Configuration Tab */ 19 9 $lang['Title_Tab1'] = 'UserAdvManager - Configuration Générale'; 20 10 $lang['Tab_Global'] = 'Configuration Générale'; 21 22 11 $lang['UserAdvManager_Title'] = 'Configuration avancée des utilisateurs'; 23 24 12 $lang['UserAdvManager_Mail_Info'] = 'Mail d\'information à l\'utilisateur'; 25 13 $lang['UserAdvManager_Mail_Info_true'] = ' Envoyer un mail à l\'utilisateur reprenant ses infos lors de son inscription ou la mise à jour de son profil.'; … … 47 35 $lang['UserAdvManager_MailExclusion_false'] = ' Désactiver l\'exclusion des domaines de messagerie.'; 48 36 $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>'; 49 50 51 37 $lang['audit'] = 'Audit'; 52 38 $lang['submit'] = 'Valider'; 53 39 54 $lang['Err_audit_no_casse'] = '<b>Ces comptes sont identiques à la casse près :</b> ';55 $lang['Err_audit_username_char'] = '<b>Ce compte contient un ou des caractères interdits :</b> ';56 $lang['Err_audit_email_forbidden'] = '<b>Ce compte contient des domaines de messagerie interdit :</b> ';57 $lang['Err_audit_advise'] = '<b>Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activé<br>utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b>';58 $lang['UserAdvManager_audit_ok'] = 'Audit OK';59 $lang['UserAdvManager_save_config'] ='Configuration enregistrée.';60 40 61 $lang['UserAdvManager_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.'; 62 63 if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' ) 64 $lang['new_reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).'; 65 $lang['reg_err_login6'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : '; 66 $lang['reg_err_login7'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : '; 67 68 $lang['invalid_pwd'] = 'Nom utilisateur ou Mot de passe invalide !'; 69 70 $lang['UserAdvManager_empty_pwd'] = '[mot de passe vide]'; 71 $lang['UserAdvManager_no_update_pwd'] = '[mise à jour du profil sans changement du mot de passe]'; 72 41 /* ConfirmMail Configuration Tab */ 73 42 $lang['ConfirmMail_Title'] = 'Configuration et gestion avancée de la confirmation par mail'; 74 $lang['Err_ConfirmMail_Settings'] = 'Cette page n\'est accessible que si "Confirmation de l\'adresse email" est actif dans l\'onglet "Configuration Générale".';75 43 $lang['Title_Tab2'] = 'UserAdvManager - Configuration de ConfirmMail'; 76 44 $lang['Tab_ConfirmMail'] = 'Configuration de ConfirmMail'; 77 $lang['UserAdvManager_ConfirmMail_Info'] = 'Limitation du délai de validation de l\'inscription : 78 <br> 79 Si vous activez cette option, sélectionnez le délai souhaité dans la liste qui suit. Les visiteurs qui s\'inscriront alors auront x jours de délais pour valider leur inscription. Passé ce délai, le lien de validation qu\'ils auront reçu par mail sera expiré.<br>'; 45 $lang['UserAdvManager_ConfirmMail_Info'] = 'Limitation du délai de validation de l\'inscription :<br>Si vous activez cette option, sélectionnez le délai (x) )souhaité dans la liste qui suit. Les visiteurs qui s\'inscriront alors auront x jours de délais pour valider leur inscription. Passé ce délai, le lien de validation qu\'ils auront reçu par mail sera expiré.<br>'; 80 46 $lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Activer la limitation du délai d\'inscription.'; 81 47 $lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Désactiver la limitation du délai d\'inscription.'; … … 86 52 //$lang['UserAdvManager_ConfirmMail_AutoDel_true'] = 'Activer la suppression automatique - <b style="text-decoration: blink underline;">ATTENTION !</b> La suppression est aveugle et sans notification.'; 87 53 //$lang['UserAdvManager_ConfirmMail_AutoDel_false'] = 'Désactiver la suppression automatique.'; 88 $lang['UserAdvManager_ConfirmMail_Remail'] = 'Activer ou désactiver la fonctionnalité de r elance des inscrits non validés :';89 $lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Activer l a relancepar mail';90 $lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Désactiver l a relancepar mail';91 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de r elance avec regénération de clé de validation.<br>Si laissé vide, le mail de relancene 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="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';92 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de r elance sans regénération de clé de validation.<br>Si laissé vide, le mail de relancesera 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="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)';54 $lang['UserAdvManager_ConfirmMail_Remail'] = 'Activer ou désactiver la fonctionnalité de rappel des inscrits non validés :<br>'; 55 $lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Activer le rappel par mail'; 56 $lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Désactiver le rappel par mail'; 57 $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="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)'; 58 $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="text-decoration: blink underline;">ATTENTION !</b> Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)'; 93 59 94 60 95 $lang['UserManager_Title'] = 'Configuration et gestion avancée de la confirmation par mail'; 96 $lang[' Err_UserManager_Settings'] = 'Cette page n\'est accessible que si "Délai de validation d\'inscription" est actif dans l\'onglet "Configuration de ConfirmMail".';61 /* UserManager Tab */ 62 $lang['UserManager_Title'] = 'Gestion avancée des inscrits non validés'; 97 63 $lang['Title_Tab3'] = 'UserAdvManager - Gestion des visiteurs'; 98 64 $lang['Tab_UserManager'] = 'Gestion des visiteurs'; … … 101 67 - Supprimer manuellement les comptes <b>(purge manuelle)</b> 102 68 <br> 103 - Générer l\'email de r elance <b>sans génération</b> d\'une nouvelle clef. Rrappel pour le visiteur qu\'il doit valider son inscription.Cette fonction ne réinitialise pas la date d\'inscription du visiteur ciblé et le délai d\'expiration est toujours d\'actualité.69 - 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é. 104 70 <br> 105 - Générer l\'email de r elance <b>avec génération</b> d\'une nouvelle clef. Rappel pour le visiteur qu\'il doit valider son inscription.Cette fonction réinitialise également la date d\'inscription du visiteur ciblé ce qui équivaut à prolonger le délai de validation.<br>71 - 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> 106 72 - 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>. 107 73 <br>'; 108 74 $lang['Registration'] = 'Date d\'enregistrement'; 75 76 77 /* Mailing */ 78 $lang['infos_mail %s'] = '%s, voici vos informations pour vous identifier sur la galerie :'; 79 $lang['Password: %s'] = 'Mot de passe: %s'; 80 $lang['Add of %s'] = 'Création de %s'; 81 $lang['Update of %s'] = 'Mise à jour de %s'; 82 $lang['Link: %s'] = 'Cliquez sur le lien suivant pour confirmer votre inscription : %s'; 83 $lang['Reminder_with_key_of_%s'] = '%s, votre clé de confirmation a été renouvelée'; 84 $lang['Reminder_without_key_of_%s'] = '%s, votre clé de confirmation va expirer'; 85 86 87 /* Email confirmation page */ 88 $lang['title_confirm_mail'] = 'Confirmation de votre inscription'; 89 $lang['confirm_mail_page_title'] = 'Confirmation d\'inscription'; 90 $lang['confirm_mail_ok'] = '<br><br><br>Merci d\'avoir confirmé votre mail et aussi et surtout votre inscription sur le site, profitez bien des photos ...<br><br><br><br>'; 91 $lang['confirm_mail_bad'] = '<br><br><br>Votre clef d\'activation unique est érronée ou expirée ou vous avez déjà validé votre compte, veuillez contacter le webmaster pour régler ce problème.<br><br><br><br>'; 92 93 94 /* Errors and Warnings */ 95 $lang['UserAdvManager_audit_ok'] = 'Audit OK'; 96 $lang['UserAdvManager_save_config'] ='Configuration enregistrée.'; 97 $lang['Err_audit_no_casse'] = '<b>Ces comptes sont identiques à la casse près :</b> '; 98 $lang['Err_audit_username_char'] = '<b>Ce compte contient un ou des caractères interdits :</b> '; 99 $lang['Err_audit_email_forbidden'] = '<b>Ce compte contient des domaines de messagerie interdit :</b> '; 100 $lang['Err_audit_advise'] = '<b>Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activé<br>utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b>'; 101 $lang['UserAdvManager_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.'; 102 if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' ) 103 $lang['new_reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).'; 104 $lang['reg_err_login6'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : '; 105 $lang['reg_err_login7'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : '; 106 $lang['UserAdvManager_empty_pwd'] = '[mot de passe vide]'; 107 $lang['UserAdvManager_no_update_pwd'] = '[mise à jour du profil sans changement du mot de passe]'; 108 $lang['invalid_pwd'] = 'Nom utilisateur ou Mot de passe invalide !'; 109 $lang['Err_ConfirmMail_Settings'] = 'Cette page n\'est accessible que si "Confirmation de l\'adresse email" est actif dans l\'onglet "Configuration Générale".'; 110 $lang['Err_UserManager_Settings'] = 'Cette page n\'est accessible que si "Délai de validation d\'inscription" est actif dans l\'onglet "Configuration de ConfirmMail".'; 109 111 $lang['No_validation_for_Guest'] = 'Le compte Guest n\'est pas soumis à validation'; 110 112 $lang['No_validation_for_default_user'] = 'Le compte par défaut n\'est pas soumis à validation'; 111 113 $lang['No_validation_for_Webmaster'] = 'Le compte du Webmaster n\'est pas soumis à validation'; 112 114 $lang['No_validation_for_your_account'] = 'Votre compte d\'admin n\'est pas soumis à validation'; 115 $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.'; 113 116 117 118 /* Processing messages */ 114 119 $lang['%d_Mail_With_Key'] = '%d message avec renouvellement de clé a été envoyé'; 115 120 $lang['%d_Mails_With_Key'] = '%d messages avec renouvellement de clé ont été envoyés'; 116 $lang['%d_Reminder_Sent'] = '%d message de relance a été envoyé'; 117 $lang['%d_Reminders_Sent'] = '%d messages de relance ont été envoyés'; 121 $lang['%d_Reminder_Sent'] = '%d message de rappel a été envoyé'; 122 $lang['%d_Reminders_Sent'] = '%d messages de rappel ont été envoyés'; 123 $lang['%d_Validated_User'] = '%d Utilisateur validé manuellement'; 124 $lang['%d_Validated_Users'] = '%d Utilisateurs validés manuellement'; 118 125 119 $lang['Reminder_with_key_of_%s'] = '%s, votre clé de confirmation a été renouvelée';120 $lang['Reminder_without_key_of_%s'] = '%s, votre clé de confirmation va expirer';121 126 127 /* Action button names */ 122 128 $lang['Delete_selected'] = 'Supprimer'; 123 $lang['Mail_without_key'] = ' Relancesans clé';124 $lang['Mail_with_key'] = ' Relanceavec clé';129 $lang['Mail_without_key'] = 'rappel sans clé'; 130 $lang['Mail_with_key'] = 'rappel avec clé'; 125 131 $lang['Force_Validation'] = 'Validation forcée'; 126 132 ?> -
extensions/NBC_UserAdvManager/trunk/main.inc.php
r3826 r3858 50 50 -- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin 51 51 52 -- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Force expiration, list unvalidated users,...)53 Beautify plugin's main admin panel52 -- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Renew validation key, list unvalidated users,...) 53 Beautify plugin's main admin panel 54 54 55 55 */ … … 62 62 63 63 ++ No single email check for admins (new trigger needed in (functions_user.inc.php ?)) 64 65 ++ Administration page for Confirm Mail66 ++ Admin tabsheet for Confirm Mail to set options :67 ++ Setting a delay time with timeout for email confirmation (Timeout = CurrentDate - RegistrationDate)68 -- List of users who haven't validated - could be easy to set with groups options : Unvalidated users are in a "Unvalidated" group.69 ++ List of users with expired validation time70 -- List of validates users ? -> Same as "List of users who haven't validated" : They could belong to a "validated" group.71 ++ Opportunities to take actions on database tables :72 ++ Re-asking validation (case of non reception of validation email)73 ++ Force expiration74 ++ Force confirmation75 ++ Cleanup expired user's accounts76 ++ (...)77 64 78 65 ++ Password control and enforcement … … 93 80 94 81 95 96 82 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 83 97 84 define('NBC_UserAdvManager_DIR' , basename(dirname(__FILE__))); 98 85 define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 86 99 87 include_once (NBC_UserAdvManager_PATH.'include/constants.php'); 100 88 include_once (NBC_UserAdvManager_PATH.'include/functions_UserAdvManager.inc.php'); 89 101 90 load_language('plugin.lang', NBC_UserAdvManager_PATH); 102 91 … … 129 118 130 119 if (( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or ( isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true')) 131 SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true); 120 121 SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true); 132 122 } 133 123 … … 205 195 //} 206 196 /* This work with a code copy of ValidateEmailProvider() function */ 207 208 {209 $ncsemail = strtolower($_POST['email']);210 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);211 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)197 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['email'])) 198 { 199 $ncsemail = strtolower($_POST['email']); 200 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 201 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 212 202 { 213 203 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 214 if (preg_match($pattern, $ncsemail)) 215 { 216 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 217 $_POST['login'] = ''; 204 if (preg_match($pattern, $ncsemail)) 205 { 206 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 207 $_POST['login'] = ''; 208 } 218 209 } 219 210 } 220 }221 211 } 222 212 } … … 251 241 //} 252 242 /* This work with a code copy of ValidateEmailProvider() function */ 253 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))243 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address'])) 254 244 { 255 245 $ncsemail = strtolower($_POST['mail_address']); 256 246 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 257 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)247 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 258 248 { 259 249 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 260 250 if (preg_match($pattern, $ncsemail)) 261 251 { 262 263 $_POST['login'] = '';252 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 253 $_POST['login'] = ''; 264 254 } 265 255 } … … 312 302 $errors[] = $mail_error; 313 303 } 314 /* This don't work on user's profile page - Why ?? */315 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))316 {317 $ncsemail = strtolower($_POST['mail_address']);318 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);319 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)320 {321 322 if (preg_match($pattern, $ncsemail))323 {324 $mail_error = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";325 }326 }327 }328 if (!empty($mail_error))304 305 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address'])) 306 { 307 $ncsemail = strtolower($_POST['mail_address']); 308 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 309 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 310 { 311 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 312 if (preg_match($pattern, $ncsemail)) 313 { 314 $mail_error = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 315 } 316 } 317 } 318 if (!empty($mail_error)) 329 319 { 330 320 $errors[] = $mail_error; 331 321 } 332 322 } 333 /* This don't work on call of ValidateEmailProvider() function - Why ?? -> Due to the "return = false|true" in function ?*/334 //if (isset($_POST['mail_address']))335 //{336 // $mail_error = ValidateEmailProvider($_POST['mail_address']);337 // if (!empty($mail_error))338 // {339 // $errors[] = $mail_error;340 // }341 //}342 323 343 324 $typemail = 3;
Note: See TracChangeset
for help on using the changeset viewer.