Changeset 19234 for extensions/UserAdvManager
- Timestamp:
- Nov 30, 2012, 10:04:06 PM (11 years ago)
- Location:
- extensions/UserAdvManager/trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/admin/UAM_admin.php
r18999 r19234 1617 1617 while ($row = pwg_db_fetch_assoc($result)) 1618 1618 { 1619 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));1619 $dbnow = date("Y-m-d H:i:s"); 1620 1620 1621 1621 $query = ' … … 1645 1645 while($row = pwg_db_fetch_assoc($result)) 1646 1646 { 1647 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));1647 $dbnow = date("Y-m-d H:i:s"); 1648 1648 1649 1649 $query = ' -
extensions/UserAdvManager/trunk/changelog.txt.php
r18799 r19234 358 358 Add da_DK, thanks to : Kaare 359 359 360 -- 2.41.2 : Bug 2765 fixed - Code cleanup 361 Bug 2788 fixed : Warning message on email exclusion no more remains if misconfiguration is fixed. But it's still necessary to refresh the current page once for the warning message to disappear. 362 Bug 2796 fixed - Use of php date() function instead od MySql NOW() - Usefull if MySql server is not set at the same date-time as Apache/Php server 363 Update da_DK, thanks to : Kaare 364 Update it_IT, thanks to : virgigiole 365 Update lv_LV, thanks to : agrisans 360 366 */ 361 367 ?> -
extensions/UserAdvManager/trunk/include/functions.inc.php
r19063 r19234 66 66 if ((isset($conf_UAM[15]) and $conf_UAM[15] == 'true') or (isset($conf_UAM[18]) and $conf_UAM[18] == 'true')) 67 67 { 68 69 $userid = get_userid($user['username']); 68 $userid = get_userid($user['username']); 70 69 71 70 // Looking for existing entry in last visit table … … 76 75 WHERE user_id = '.$userid.' 77 76 ;'; 78 77 79 78 $count = pwg_db_num_rows(pwg_query($query)); 80 79 81 80 if ($count == 0) 82 81 { … … 385 384 } 386 385 } 387 386 388 387 if (((!empty($_POST['use_new_pwd']) and (isset($conf_UAM[0]) and $conf_UAM[0] == 'true')) or $confirm_mail_need)) 389 388 { … … 393 392 WHERE '.$conf['user_fields']['id'].' = \''.$user['id'].'\' 394 393 ;'; 395 394 396 395 list($username) = pwg_db_fetch_row(pwg_query($query)); 397 396 SendMail2User($typemail, $user['id'], $username, $_POST['use_new_pwd'], $_POST['mail_address'], $confirm_mail_need); … … 412 411 { 413 412 global $conf, $user; 414 413 415 414 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 416 415 417 416 $conf_UAM = unserialize($conf['UserAdvManager']); 418 417 419 418 // Performing GhostTracker scheduled tasks 420 419 // --------------------------------------- … … 522 521 die('Hacking attempt!'); 523 522 } 524 523 525 524 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 526 525 527 526 $conf_UAM = unserialize($conf['UserAdvManager']); 528 527 529 528 $collection = array(); 530 529 $reminder = false; 531 530 532 531 $page['filtered_users'] = get_ghosts_autotasks(); 533 532 … … 542 541 { 543 542 if (count($collection) > 0) 544 543 { 545 544 // Process if a non-admin nor webmaster user is logged 546 545 // --------------------------------------------------- 547 546 if (in_array($user['id'], $collection)) 548 547 { 549 548 // Check lastvisit reminder state 550 549 // ------------------------------ … … 579 578 redirect(make_index_url().'?UAM_msg=deleted', 0); 580 579 } 581 580 } 582 581 else // Process if an admin or webmaster user is logged 583 582 { … … 608 607 // Reset of lastvisit date 609 608 // ----------------------- 610 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));609 $dbnow = date("Y-m-d H:i:s"); 611 610 612 611 $query = ' … … 633 632 ;'; 634 633 pwg_query($query); 635 634 } 636 635 637 636 // Change user status … … 687 686 // Reset confirmed user status to unvalidated 688 687 // ------------------------------------------ 689 688 $query = ' 690 689 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 691 690 SET date_check = NULL 692 691 WHERE user_id = '.$user_id.' 693 692 ;'; 694 693 pwg_query($query); 695 694 696 695 // Get users information for email notification 697 696 // -------------------------------------------- 698 697 $query = ' 699 698 SELECT id, username, mail_address 700 699 FROM '.USERS_TABLE.' 701 700 WHERE id = '.$user_id.' 702 701 ;'; 703 704 702 $data = pwg_db_fetch_assoc(pwg_query($query)); 703 705 704 demotion_mail($user_id, $data['username'], $data['mail_address']); 706 705 } … … 733 732 die('Hacking attempt!'); 734 733 } 735 734 736 735 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 737 736 738 737 $conf_UAM = unserialize($conf['UserAdvManager']); 739 738 740 739 $collection = array(); 741 740 $reminder = false; 742 741 743 742 $page['filtered_users'] = get_unvalid_user_autotasks(); 744 743 … … 757 756 // --------------------------------------------------- 758 757 if (in_array($user['id'], $collection)) 759 758 { 760 759 // Check ConfirmMail reminder state 761 760 // -------------------------------- … … 780 779 if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true') 781 780 { 782 783 781 $typemail = 1; 782 784 783 // Get current user information 785 784 // ---------------------------- … … 807 806 redirect(make_index_url().'?UAM_msg=deleted', 0); 808 807 } 809 808 } 810 809 else // Process if an admin or webmaster user is logged 811 810 { … … 895 894 UAM_ConfirmMail(); 896 895 } 897 898 } 896 } 897 899 898 900 899 /** … … 919 918 $patterns[] = '#\[myurl\]#i'; 920 919 $replacements[] = get_gallery_home_url(); 921 920 922 921 if (function_exists('get_user_language_desc')) 923 922 { … … 925 924 } 926 925 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[40])); 927 926 928 927 $page["errors"][]=$custom_text; 929 928 } … … 944 943 } 945 944 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[23])); 946 945 947 946 $page["errors"][]=$custom_text; 948 947 } … … 963 962 } 964 963 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[31])); 965 964 966 965 $page["errors"][]=$custom_text; 967 966 } 968 967 } 969 968 } 969 970 970 971 /** 971 972 * Triggered on init … … 975 976 function UAM_ConfirmMail() 976 977 { 977 978 978 if (isset($_GET['key']) and isset($_GET['userid'])) 979 979 { 980 981 980 global $user, $lang, $conf, $page; 982 981 983 982 $key = $_GET['key']; 984 983 $userid = $_GET['userid']; … … 986 985 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 987 986 $conf_UAM = unserialize($conf['UserAdvManager']); 988 987 989 988 $query = ' 990 991 992 993 989 SELECT '.USERS_TABLE.'.username 990 FROM '.USERS_TABLE.' 991 WHERE ('.USERS_TABLE.'.id ='.$userid.') 992 ;'; 994 993 $result = pwg_db_fetch_assoc(pwg_query($query)); 995 994 996 995 if (VerifyConfirmMail($key)) 997 996 { … … 1003 1002 // ---------------------------------------------- 1004 1003 $query = ' 1005 1006 1007 1008 1004 SELECT language 1005 FROM '.USER_INFOS_TABLE.' 1006 WHERE '.USER_INFOS_TABLE.'.user_id ='.$userid.' 1007 ;'; 1009 1008 $data = pwg_db_fetch_assoc(pwg_query($query)); 1010 1009 1011 1010 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 1012 1011 // ------------------------------------------------------------------------------------------------------------------------------- … … 1025 1024 load_language('plugin.lang', UAM_PATH); 1026 1025 } 1027 1026 1028 1027 if (isset($conf_UAM_ConfirmMail[5]) and !empty($conf_UAM_ConfirmMail[5])) 1029 1028 { … … 1036 1035 $patterns[] = '#\[myurl\]#i'; 1037 1036 $replacements[] = get_gallery_home_url(); 1038 1037 1039 1038 if (function_exists('get_user_language_desc')) 1040 1039 { … … 1046 1045 } 1047 1046 $page['infos'][]=$custom_text; 1048 //print_r($custom_text); 1049 } 1050 //log_user($userid, true); 1047 } 1051 1048 } 1052 1049 else … … 1062 1059 $patterns[] = '#\[myurl\]#i'; 1063 1060 $replacements[] = get_gallery_home_url(); 1064 1061 1065 1062 if (function_exists('get_user_language_desc')) 1066 1063 { … … 1071 1068 $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[6])); 1072 1069 } 1073 1070 1074 1071 $page['errors'][]=$custom_text; 1075 1072 } … … 1077 1074 } 1078 1075 } 1076 1077 1079 1078 /** 1080 1079 * Triggered on render_lost_password_mail_content … … 1091 1090 { 1092 1091 global $conf; 1093 1092 1094 1093 load_language('plugin.lang', UAM_PATH); 1095 1094 1096 1095 $conf_UAM = unserialize($conf['UserAdvManager']); 1097 1096 1098 1097 if (isset($conf_UAM[28]) and $conf_UAM[28] == 'true') 1099 1098 { … … 1103 1102 $patterns[] = '#\[myurl\]#i'; 1104 1103 $replacements[] = get_gallery_home_url(); 1105 1104 1106 1105 $infos = preg_replace($patterns, $replacements, $conf_UAM[29])."\n"."\n".$infos; 1107 1106 } … … 1122 1121 $conf_UAM = unserialize($conf['UserAdvManager']); 1123 1122 1124 1125 1126 1123 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 1124 1125 $infos1_perso = ""; 1127 1126 $infos2_perso = ""; 1128 1127 $subject = ""; … … 1166 1165 $patterns[] = '#\[mygallery\]#i'; 1167 1166 $replacements[] = $conf['gallery_title']; 1168 1167 1169 1168 if (function_exists('get_user_language_desc')) 1170 1169 { … … 1175 1174 1176 1175 break; 1177 1176 1178 1177 case 2: // Confirmation email on user profile update - With information email if modification done in user profile 1179 1178 if (isset($conf_UAM[41]) and !empty($conf_UAM[41])) … … 1185 1184 $patterns[] = '#\[mygallery\]#i'; 1186 1185 $replacements[] = $conf['gallery_title']; 1187 1186 1188 1187 if (function_exists('get_user_language_desc')) 1189 1188 { … … 1205 1204 $patterns[] = '#\[myurl\]#i'; 1206 1205 $replacements[] = get_gallery_home_url(); 1207 1206 1208 1207 if (function_exists('get_user_language_desc')) 1209 1208 { … … 1237 1236 1238 1237 break; 1239 1238 1240 1239 case 3: // Only information email send to user if checked 1241 1240 if (isset($conf_UAM[43]) and !empty($conf_UAM[43])) … … 1247 1246 $patterns[] = '#\[mygallery\]#i'; 1248 1247 $replacements[] = $conf['gallery_title']; 1249 1248 1250 1249 if (function_exists('get_user_language_desc')) 1251 1250 { … … 1267 1266 $patterns[] = '#\[myurl\]#i'; 1268 1267 $replacements[] = get_gallery_home_url(); 1269 1268 1270 1269 if (function_exists('get_user_language_desc')) 1271 1270 { … … 1303 1302 if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and $confirm) // Add confirmation link ? 1304 1303 { 1305 $infos2 = array 1306 ( 1304 $infos2 = array( 1307 1305 get_l10n_args('UAM_Link: %s', AddConfirmMail($id, $email)), 1308 1306 get_l10n_args('', ''), … … 1319 1317 $patterns[] = '#\[myurl\]#i'; 1320 1318 $replacements[] = get_gallery_home_url(); 1321 1319 1322 1320 if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active 1323 1321 { … … 1325 1323 $replacements[] = $conf_UAM_ConfirmMail[1]; 1326 1324 } 1327 1325 1328 1326 if (function_exists('get_user_language_desc')) 1329 1327 { … … 1339 1337 { 1340 1338 switch_lang_to(get_default_language()); 1341 1339 1342 1340 load_language('plugin.lang', UAM_PATH); 1343 1341 $subject = get_l10n_args('UAM_Subject admin validation for %s',$username); 1344 1342 1345 1343 $content = array( 1346 get_l10n_args('UAM_Manual_validation_needed_for %s', stripslashes($username)),1347 get_l10n_args('', ''),1348 get_l10n_args('UAM_Link: %s', AddConfirmMail($id, $email)),1349 );1350 1351 UAM_mail_notification_admins($subject, $content);1344 get_l10n_args('UAM_Manual_validation_needed_for %s', stripslashes($username)), 1345 get_l10n_args('', ''), 1346 get_l10n_args('UAM_Link: %s', AddConfirmMail($id, $email)), 1347 ); 1348 1349 UAM_mail_notification_admins($subject, $content); 1352 1350 } 1353 1351 else … … 1376 1374 { 1377 1375 global $conf, $user; 1378 1376 1379 1377 // Check arguments 1380 1378 if (empty($keyargs_subject) or empty($keyargs_content)) … … 1446 1444 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 1447 1445 1448 1446 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 1449 1447 1450 1448 // We have to get the user's language in database … … 1457 1455 $data = pwg_db_fetch_assoc(pwg_query($query)); 1458 1456 $language = $data['language']; 1459 1457 1460 1458 // And switch gallery to this language before using personalized and multilangual contents 1461 1459 // --------------------------------------------------------------------------------------- 1462 1460 switch_lang_to($data['language']); 1463 1461 1464 1462 load_language('plugin.lang', UAM_PATH); 1465 1463 … … 1467 1465 { 1468 1466 case 1: //Generating email content for remind with a new key 1467 if (isset($conf_UAM[42]) and !empty($conf_UAM[42])) 1468 { 1469 // Management of Extension flags ([username], [mygallery]) 1470 // ------------------------------------------------------- 1471 $patterns[] = '#\[username\]#i'; 1472 $replacements[] = $username; 1473 $patterns[] = '#\[mygallery\]#i'; 1474 $replacements[] = $conf['gallery_title']; 1475 1476 if (function_exists('get_user_language_desc')) 1477 { 1478 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n"; 1479 } 1480 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n"; 1481 } 1482 1483 if (isset($conf_UAM_ConfirmMail[2]) and !empty($conf_UAM_ConfirmMail[2]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm) 1484 { 1485 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 1486 // ------------------------------------------------------------------------- 1487 $patterns[] = '#\[username\]#i'; 1488 $replacements[] = $username; 1489 $patterns[] = '#\[mygallery\]#i'; 1490 $replacements[] = $conf['gallery_title']; 1491 $patterns[] = '#\[myurl\]#i'; 1492 $replacements[] = get_gallery_home_url(); 1493 1494 if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active 1495 { 1496 $patterns[] = '#\[Kdays\]#i'; 1497 $replacements[] = $conf_UAM_ConfirmMail[1]; 1498 } 1499 1500 if (function_exists('get_user_language_desc')) 1501 { 1502 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[2]))."\n\n"; 1503 } 1504 else $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[2]))."\n\n"; 1505 1506 $infos2 = array 1507 ( 1508 get_l10n_args('UAM_Link: %s', ResetConfirmMail($user_id)), 1509 get_l10n_args('', ''), 1510 ); 1511 } 1512 1513 // Set reminder true 1514 // ----------------- 1515 $query = ' 1516 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 1517 SET reminder = "true" 1518 WHERE user_id = '.$user_id.' 1519 ;'; 1520 pwg_query($query); 1521 1522 break; 1523 1524 case 2: //Generating email content for remind without a new key 1469 1525 if (isset($conf_UAM[42]) and !empty($conf_UAM[42])) 1470 1526 { … … 1482 1538 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n"; 1483 1539 } 1484 1485 if (isset($conf_UAM_ConfirmMail[2]) and !empty($conf_UAM_ConfirmMail[2]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm) 1486 { 1487 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) 1488 // ------------------------------------------------------------------------- 1489 $patterns[] = '#\[username\]#i'; 1490 $replacements[] = $username; 1491 $patterns[] = '#\[mygallery\]#i'; 1492 $replacements[] = $conf['gallery_title']; 1493 $patterns[] = '#\[myurl\]#i'; 1494 $replacements[] = get_gallery_home_url(); 1495 1496 if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active 1497 { 1498 $patterns[] = '#\[Kdays\]#i'; 1499 $replacements[] = $conf_UAM_ConfirmMail[1]; 1500 } 1501 1502 if (function_exists('get_user_language_desc')) 1503 { 1504 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[2]))."\n\n"; 1505 } 1506 else $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[2]))."\n\n"; 1507 1508 $infos2 = array 1509 ( 1510 get_l10n_args('UAM_Link: %s', ResetConfirmMail($user_id)), 1511 get_l10n_args('', ''), 1512 ); 1513 } 1514 1515 // Set reminder true 1516 // ----------------- 1517 $query = ' 1518 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 1519 SET reminder = "true" 1520 WHERE user_id = '.$user_id.' 1521 ;'; 1522 pwg_query($query); 1523 1524 break; 1525 1526 case 2: //Generating email content for remind without a new key 1527 if (isset($conf_UAM[42]) and !empty($conf_UAM[42])) 1528 { 1529 // Management of Extension flags ([username], [mygallery]) 1530 // ------------------------------------------------------- 1531 $patterns[] = '#\[username\]#i'; 1532 $replacements[] = $username; 1533 $patterns[] = '#\[mygallery\]#i'; 1534 $replacements[] = $conf['gallery_title']; 1535 1536 if (function_exists('get_user_language_desc')) 1537 { 1538 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n"; 1539 } 1540 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n"; 1541 } 1542 1540 1543 1541 if (isset($conf_UAM_ConfirmMail[4]) and !empty($conf_UAM_ConfirmMail[4]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and !$confirm) 1544 1542 { … … 1557 1555 $replacements[] = $conf_UAM_ConfirmMail[1]; 1558 1556 } 1559 1557 1560 1558 if (function_exists('get_user_language_desc')) 1561 1559 { … … 1564 1562 else $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[4]))."\n\n"; 1565 1563 } 1566 1564 1567 1565 // Set reminder true 1568 1566 // ----------------- … … 1600 1598 $conf_UAM = unserialize($conf['UserAdvManager']); 1601 1599 $subject = ""; 1602 1603 1600 1601 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 1604 1602 1605 1603 // We have to get the user's language in database … … 1616 1614 // --------------------------------------------------------------------------------------- 1617 1615 switch_lang_to($data['language']); 1618 1616 1619 1617 load_language('plugin.lang', UAM_PATH); 1620 1618 … … 1682 1680 1683 1681 $conf_UAM = unserialize($conf['UserAdvManager']); 1682 1683 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 1684 1684 1685 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 1686 1687 $custom_txt = ""; 1688 $subject = ""; 1685 $custom_txt = ""; 1686 $subject = ""; 1689 1687 1690 1688 // We have to get the user's language in database … … 1695 1693 WHERE user_id = '.$id.' 1696 1694 ;'; 1695 1697 1696 $data = pwg_db_fetch_assoc(pwg_query($query)); 1698 1697 … … 1730 1729 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[44]))."\n\n"; 1731 1730 } 1732 1731 1733 1732 if (isset($conf_UAM[24]) and !empty($conf_UAM[24])) 1734 1733 { … … 1787 1786 1788 1787 $conf_UAM = unserialize($conf['UserAdvManager']); 1789 1790 1791 1792 1788 1789 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 1790 1791 $custom_txt = ""; 1793 1792 $subject = ""; 1794 1793 … … 1800 1799 WHERE user_id = '.$id.' 1801 1800 ;'; 1801 1802 1802 $data = pwg_db_fetch_assoc(pwg_query($query)); 1803 1803 … … 1827 1827 WHERE id = '.$id.' 1828 1828 ;'; 1829 1829 1830 $result = pwg_db_fetch_assoc(pwg_query($query)); 1830 1831 … … 1844 1845 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[46]))."\n\n"; 1845 1846 } 1846 1847 1847 1848 if (isset($conf_UAM[27]) and !empty($conf_UAM[27])) 1848 1849 { … … 1894 1895 $query = ' 1895 1896 SELECT COUNT(*) 1896 1897 FROM '.USER_CONFIRM_MAIL_TABLE.' 1897 1898 WHERE id = "'.$id.'" 1898 1899 ;'; … … 1920 1921 $Confirm_Mail_ID = FindAvailableConfirmMailID(); 1921 1922 1922 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));1923 1923 $dbnow = date("Y-m-d H:i:s"); 1924 1924 1925 if (isset($Confirm_Mail_ID)) 1925 1926 { … … 1930 1931 ;'; 1931 1932 list($status) = pwg_db_fetch_row(pwg_query($query)); 1932 1933 1933 1934 $query = ' 1934 1935 INSERT INTO '.USER_CONFIRM_MAIL_TABLE.' … … 1937 1938 ("'.$Confirm_Mail_ID.'", '.$user_id.', "'.$email.'", "'.$status.'", null) 1938 1939 ;'; 1940 1939 1941 pwg_query($query); 1940 1942 … … 1950 1952 ) 1951 1953 ;'; 1954 1952 1955 pwg_query($query); 1953 1956 … … 1961 1964 WHERE user_id = '.$user_id.' 1962 1965 ;'; 1966 1963 1967 pwg_query($query); 1964 1968 } … … 1974 1978 ('.$user_id.', '.$conf_UAM[2].') 1975 1979 ;'; 1980 1976 1981 pwg_query($query); 1977 1982 } … … 1986 1991 WHERE user_id = '.$user_id.' 1987 1992 ;'; 1993 1988 1994 pwg_query($query); 1989 1995 } 1990 1996 1991 1997 // Set UAM_validated field to false in #_users table 1992 1998 // ------------------------------------------------- 1993 1999 SetUnvalidated($user_id); 1994 2000 1995 2001 if ( $conf['guest_access'] ) 1996 2002 { … … 2015 2021 { 2016 2022 global $conf; 2017 2023 2018 2024 $conf_UAM = unserialize($conf['UserAdvManager']); 2019 2025 … … 2029 2035 ) 2030 2036 ;'; 2037 2031 2038 pwg_query($query); 2032 2039 … … 2038 2045 WHERE user_id = '.$user_id.' 2039 2046 ;'; 2047 2040 2048 pwg_query($query); 2041 2049 } … … 2049 2057 ('.$user_id.', '.$conf_UAM[2].') 2050 2058 ;'; 2059 2051 2060 pwg_query($query); 2052 2061 } … … 2060 2069 ('.$user_id.', "'.$conf_UAM[35].'") 2061 2070 ;'; 2071 2062 2072 pwg_query($query); 2063 2073 } … … 2076 2086 { 2077 2087 global $conf; 2078 2088 2079 2089 $Confirm_Mail_ID = FindAvailableConfirmMailID(); 2080 2090 2081 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));2082 2091 $dbnow = date("Y-m-d H:i:s"); 2092 2083 2093 if (isset($Confirm_Mail_ID)) 2084 2094 { … … 2088 2098 WHERE user_id = '.$user_id.' 2089 2099 ;'; 2100 2090 2101 pwg_query($query); 2091 2102 … … 2095 2106 WHERE user_id = '.$user_id.' 2096 2107 ;'; 2108 2097 2109 pwg_query($query); 2098 2110 2099 2111 if ( $conf['guest_access'] ) 2100 2112 { … … 2119 2131 global $conf; 2120 2132 2121 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));2133 $dbnow = date("Y-m-d H:i:s"); 2122 2134 2123 2135 $query = ' … … 2126 2138 WHERE user_id = '.$user_id.' 2127 2139 ;'; 2140 2128 2141 pwg_query($query); 2129 2142 } … … 2140 2153 WHERE user_id = '.$user_id.' 2141 2154 ;'; 2155 2142 2156 pwg_query($query); 2143 2157 } 2158 2144 2159 2145 2160 /** … … 2153 2168 WHERE user_id = '.$user_id.' 2154 2169 ;'; 2170 2155 2171 pwg_query($query); 2156 2172 } … … 2174 2190 2175 2191 $tab = pwg_db_fetch_row(pwg_query($query)); 2176 2192 2177 2193 $values = explode(',', $tab[0]); 2178 2194 2179 2195 unset($values[array_search($user_id, $values)]); 2180 2196 2181 2197 $query = ' 2182 2198 UPDATE '.CONFIG_TABLE.' … … 2202 2218 2203 2219 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 2204 2220 2205 2221 $conf_UAM = unserialize($conf['UserAdvManager']); 2206 2222 … … 2212 2228 WHERE id = "'.$id.'" 2213 2229 ;'; 2230 2214 2231 list($count) = pwg_db_fetch_row(pwg_query($query)); 2215 2232 … … 2230 2247 WHERE user_id = '.$data['user_id'].' 2231 2248 ;'; 2249 2232 2250 list($registration_date) = pwg_db_fetch_row(pwg_query($query)); 2233 2251 … … 2236 2254 if (!empty($registration_date)) 2237 2255 { 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));2260 2261 2262 2263 2256 // Verify Confirmmail with time limit ON 2257 // ------------------------------------- 2258 if (isset ($conf_UAM_ConfirmMail[1])) 2259 { 2260 // Dates formating and compare 2261 // --------------------------- 2262 $today = date("d-m-Y"); // Get today's date 2263 list($day, $month, $year) = explode('-', $today); // explode date of today 2264 $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp 2265 2266 list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date 2267 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date 2268 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp 2269 2270 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps 2271 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days 2272 2273 // Condition with the value set for time limit 2274 // ------------------------------------------- 2275 if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set 2276 { 2277 $dbnow = date("Y-m-d H:i:s"); 2278 2279 // Update ConfirmMail table 2280 // ------------------------ 2281 $query = ' 2264 2282 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 2265 2283 SET date_check="'.$dbnow.'", reminder="false" 2266 2284 WHERE id = "'.$id.'" 2267 2285 ;'; 2268 2269 2270 2271 2272 2273 2286 pwg_query($query); 2287 2288 // Update LastVisit table - Force reminder field to false 2289 // Usefull when a user has been automatically downgraded and revalidate its registration 2290 // ------------------------------------------------------------------------------------- 2291 $query = ' 2274 2292 UPDATE '.USER_LASTVISIT_TABLE.' 2275 2293 SET reminder="false" 2276 2294 WHERE user_id = "'.$data['user_id'].'" 2277 2295 ;'; 2278 2296 pwg_query($query); 2279 2297 2280 2281 2282 2298 if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group 2299 { 2300 $query = ' 2283 2301 DELETE FROM '.USER_GROUP_TABLE.' 2284 2302 WHERE user_id = '.$data['user_id'].' 2285 2303 AND group_id = '.$conf_UAM[2].' 2286 2304 ;'; 2287 2288 2289 2290 2291 2292 2305 pwg_query($query); 2306 } 2307 2308 if ($conf_UAM[3] <> -1) // Add user to validated users group 2309 { 2310 $query = ' 2293 2311 INSERT INTO '.USER_GROUP_TABLE.' 2294 2312 (user_id, group_id) … … 2296 2314 ('.$data['user_id'].', '.$conf_UAM[3].') 2297 2315 ;'; 2298 2299 2300 2301 2302 2303 2316 pwg_query($query); 2317 } 2318 2319 if ($conf_UAM[4] <> -1) // Change user's status 2320 { 2321 $query = ' 2304 2322 UPDATE '.USER_INFOS_TABLE.' 2305 2323 SET status = "'.$conf_UAM[4].'" 2306 2324 WHERE user_id = '.$data['user_id'].' 2307 2325 ;'; 2308 2309 2310 2311 2312 2313 2326 pwg_query($query); 2327 } 2328 2329 if ($conf_UAM[36] <> -1) // Change user's privacy level 2330 { 2331 $query = ' 2314 2332 UPDATE '.USER_INFOS_TABLE.' 2315 2333 SET level = "'.$conf_UAM[36].'" 2316 2334 WHERE user_id = '.$data['user_id'].' 2317 2335 ;'; 2318 2319 2320 2321 2322 2336 pwg_query($query); 2337 } 2338 2339 // Set UAM_validated field to True in #_users table 2340 $query = ' 2323 2341 UPDATE '.USERS_TABLE.' 2324 2342 SET UAM_validated = "true" 2325 2343 WHERE id = '.$data['user_id'].' 2326 2344 ;'; 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));2345 2346 2347 2348 2345 pwg_query($query); 2346 2347 // Refresh user's category cache 2348 // ----------------------------- 2349 invalidate_user_cache(); 2350 2351 return true; 2352 } 2353 elseif ($deltadays > $conf_UAM_ConfirmMail[1]) // If timelimit exeeds 2354 { 2355 return false; 2356 } 2357 } 2358 // Verify Confirmmail with time limit OFF 2359 // -------------------------------------- 2360 else 2361 { 2362 $dbnow = date("Y-m-d H:i:s"); 2363 2364 // Update ConfirmMail table 2365 // ------------------------ 2366 $query = ' 2349 2367 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 2350 2368 SET date_check="'.$dbnow.'" 2351 2369 WHERE id = "'.$id.'" 2352 2370 ;'; 2353 2354 2355 2356 2357 2358 2371 pwg_query($query); 2372 2373 // Update LastVisit table - Force reminder field to false 2374 // Usefull when a user has been automatically downgraded and revalidate its registration 2375 // ------------------------------------------------------------------------------------- 2376 $query = ' 2359 2377 UPDATE '.USER_LASTVISIT_TABLE.' 2360 2378 SET reminder="false" 2361 2379 WHERE user_id = "'.$data['user_id'].'" 2362 2380 ;'; 2363 2364 2365 2366 2367 2381 pwg_query($query); 2382 2383 if ($conf_UAM[2] <> -1) // Delete user from unvalidated users group 2384 { 2385 $query = ' 2368 2386 DELETE FROM '.USER_GROUP_TABLE.' 2369 2387 WHERE user_id = '.$data['user_id'].' 2370 2388 AND group_id = '.$conf_UAM[2].' 2371 2389 ;'; 2372 2373 2374 2375 2376 2377 2390 pwg_query($query); 2391 } 2392 2393 if ($conf_UAM[3] <> -1) 2394 { 2395 $query = ' 2378 2396 DELETE FROM '.USER_GROUP_TABLE.' 2379 2397 WHERE user_id = '.$data['user_id'].' 2380 2398 AND group_id = '.$conf_UAM[3].' 2381 2399 ;'; 2382 2383 2384 2400 pwg_query($query); 2401 2402 $query = ' 2385 2403 INSERT INTO '.USER_GROUP_TABLE.' 2386 2404 (user_id, group_id) … … 2388 2406 ('.$data['user_id'].', '.$conf_UAM[3].') 2389 2407 ;'; 2390 2391 2392 2393 2394 2395 2408 pwg_query($query); 2409 } 2410 2411 if ($conf_UAM[4] <> -1) // Change user's status 2412 { 2413 $query = ' 2396 2414 UPDATE '.USER_INFOS_TABLE.' 2397 2415 SET status = "'.$conf_UAM[4].'" 2398 2416 WHERE user_id = '.$data['user_id'].' 2399 2417 ;'; 2400 2401 2402 2403 2404 2405 2418 pwg_query($query); 2419 } 2420 2421 if ($conf_UAM[36] <> -1) // Change user's privacy level 2422 { 2423 $query = ' 2406 2424 UPDATE '.USER_INFOS_TABLE.' 2407 2425 SET level = "'.$conf_UAM[36].'" 2408 2426 WHERE user_id = '.$data['user_id'].' 2409 2427 ;'; 2410 2411 2412 2413 2414 2428 pwg_query($query); 2429 } 2430 2431 // Set UAM_validated field to True in #_users table 2432 $query = ' 2415 2433 UPDATE '.USERS_TABLE.' 2416 2434 SET UAM_validated = "true" 2417 2435 WHERE id = '.$data['user_id'].' 2418 2436 ;'; 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2437 pwg_query($query); 2438 2439 // Refresh user's category cache 2440 // ----------------------------- 2441 invalidate_user_cache(); 2442 2443 return true; 2444 } 2445 } 2446 } 2429 2447 else if (!empty($data) and !is_null($data['date_check'])) 2430 2448 { 2431 2449 return false; 2432 2450 } 2433 2451 } 2434 2452 else 2435 2453 return false; … … 2451 2469 if (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') // Set date of validation 2452 2470 { 2453 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));2454 2455 2471 $dbnow = date("Y-m-d H:i:s"); 2472 2473 $query = ' 2456 2474 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 2457 2475 SET date_check="'.$dbnow.'" 2458 2476 WHERE user_id = '.$id.' 2459 2477 ;'; 2460 2478 pwg_query($query); 2461 2479 } 2462 2480 … … 2470 2488 pwg_query($query); 2471 2489 } 2472 2490 2473 2491 if ($conf_UAM[3] <> -1) // Set user's valid group 2474 2492 { 2475 2493 $query = ' 2476 2494 DELETE FROM '.USER_GROUP_TABLE.' 2477 2495 WHERE user_id = '.$id.' 2478 2496 AND group_id = '.$conf_UAM[3].' 2479 2497 ;'; 2480 2481 2482 2498 pwg_query($query); 2499 2500 $query = ' 2483 2501 INSERT INTO '.USER_GROUP_TABLE.' 2484 2502 (user_id, group_id) … … 2486 2504 ('.$id.', '.$conf_UAM[3].') 2487 2505 ;'; 2488 2506 pwg_query($query); 2489 2507 } 2490 2508 2491 2509 if ($conf_UAM[4] <> -1) // Set user's valid status 2492 2510 { 2493 2511 $query = ' 2494 2512 UPDATE '.USER_INFOS_TABLE.' 2495 2513 SET status = "'.$conf_UAM[4].'" 2496 2514 WHERE user_id = '.$id.' 2497 2515 ;'; 2498 2516 pwg_query($query); 2499 2517 } 2500 2518 2501 2519 if ($conf_UAM[36] <> -1) // Set user's valid privacy level 2502 2520 { 2503 2521 $query = ' 2504 2522 UPDATE '.USER_INFOS_TABLE.' 2505 2523 SET level = "'.$conf_UAM[36].'" 2506 2524 WHERE user_id = '.$id.' 2507 2525 ;'; 2508 2526 pwg_query($query); 2509 2527 } 2510 2528 … … 2591 2609 2592 2610 $conf_UAM = unserialize($conf['UserAdvManager']); 2593 2611 2594 2612 if (isset($email) and isset($conf_UAM[11]) and !empty($conf_UAM[11])) 2595 2613 { 2596 2597 2598 2599 2600 2601 {2602 2603 }2604 2605 2606 else2607 {2608 return false;2609 }2614 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]); 2615 for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++) 2616 { 2617 $pattern = '/'.$conf_MailExclusion[$i].'/i'; 2618 if (preg_match($pattern, $email)) 2619 { 2620 return true; 2621 } 2622 } 2623 } 2624 else 2625 { 2626 return false; 2627 } 2610 2628 } 2611 2629 … … 2619 2637 function get_unvalid_user_list() 2620 2638 { 2621 2622 2623 2639 global $conf, $page; 2640 2641 // Get ConfirmMail configuration 2624 2642 // ----------------------------- 2625 2643 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); … … 2627 2645 // --------------------- 2628 2646 $conf_UAM = unserialize($conf['UserAdvManager']); 2629 2647 2630 2648 $users = array(); 2631 2649 2632 2650 // Search users depending expiration date 2633 2651 // -------------------------------------- 2634 2652 $query = ' … … 2652 2670 ;'; 2653 2671 2654 2655 2672 $result = pwg_query($query); 2673 2656 2674 while ($row = pwg_db_fetch_assoc($result)) 2657 2675 { 2658 2676 $user = $row; 2659 2677 $user['groups'] = array(); 2660 2678 2661 2679 array_push($users, $user); 2662 2663 2664 2680 } 2681 2682 // Add groups list 2665 2683 // --------------- 2666 2684 $user_ids = array(); 2667 2685 foreach ($users as $i => $user) 2668 2686 { 2669 2670 2687 $user_ids[$i] = $user['id']; 2688 } 2671 2689 2672 2690 $user_nums = array_flip($user_ids); … … 2674 2692 if (count($user_ids) > 0) 2675 2693 { 2676 2694 $query = ' 2677 2695 SELECT user_id, group_id 2678 2696 FROM '.USER_GROUP_TABLE.' … … 2680 2698 ;'; 2681 2699 2682 2700 $result = pwg_query($query); 2683 2701 2684 2702 while ($row = pwg_db_fetch_assoc($result)) 2685 2703 { 2686 2687 2704 array_push( 2705 $users[$user_nums[$row['user_id']]]['groups'], 2688 2706 $row['group_id'] 2689 2690 2691 2692 2693 2707 ); 2708 } 2709 } 2710 2711 return $users; 2694 2712 } 2695 2713 … … 2704 2722 function get_unvalid_user_autotasks() 2705 2723 { 2706 2707 2708 2724 global $conf, $page; 2725 2726 // Get ConfirmMail configuration 2709 2727 // ----------------------------- 2710 2728 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 2711 2729 2712 2730 $users = array(); 2713 2731 2714 2732 // search users depending expiration date 2715 2733 // -------------------------------------- 2716 2734 $query = ' … … 2724 2742 ORDER BY ui.registration_date ASC;'; 2725 2743 2726 2744 $result = pwg_query($query); 2727 2745 2728 2746 while ($row = pwg_db_fetch_assoc($result)) 2729 2747 { 2730 2748 array_push($users, $row); 2731 2732 2733 2749 } 2750 2751 return $users; 2734 2752 } 2735 2753 … … 2743 2761 function get_ghost_user_list() 2744 2762 { 2745 2763 global $conf, $page; 2746 2764 2747 2765 $conf_UAM = unserialize($conf['UserAdvManager']); … … 2749 2767 $users = array(); 2750 2768 2751 2769 // Search users depending expiration date 2752 2770 // -------------------------------------- 2753 2771 $query = ' … … 2763 2781 ORDER BY lv.lastvisit ASC;'; 2764 2782 2765 2783 $result = pwg_query($query); 2766 2784 2767 2785 while ($row = pwg_db_fetch_assoc($result)) 2768 2786 { 2769 2787 $user = $row; 2770 2788 $user['groups'] = array(); 2771 2789 2772 2790 array_push($users, $user); 2773 2774 2775 2791 } 2792 2793 // Add groups list 2776 2794 // --------------- 2777 2795 $user_ids = array(); … … 2779 2797 { 2780 2798 $user_ids[$i] = $user['id']; 2781 2782 2783 2799 } 2800 2801 return $users; 2784 2802 } 2785 2803 … … 2793 2811 function get_ghosts_autotasks() 2794 2812 { 2795 2813 global $conf, $page; 2796 2814 2797 2815 $conf_UAM = unserialize($conf['UserAdvManager']); 2798 2816 2799 2817 $users = array(); 2800 2818 2801 2819 // Search users depending expiration date and reminder sent 2802 2820 // -------------------------------------------------------- 2803 2821 $query = ' … … 2810 2828 ORDER BY lv.lastvisit ASC;'; 2811 2829 2812 2830 $result = pwg_query($query); 2813 2831 2814 2832 while ($row = pwg_db_fetch_assoc($result)) 2815 2833 { 2816 2834 array_push($users, $row); 2817 2818 2819 2835 } 2836 2837 return $users; 2820 2838 } 2821 2839 … … 2829 2847 function get_user_list() 2830 2848 { 2831 2832 2849 global $conf, $page; 2850 2833 2851 $users = array(); 2834 2852 2835 2853 // Search users depending expiration date with exclusion of Adult_Content generic users 2836 2854 // ------------------------------------------------------------------------------------ 2837 2855 $query = ' … … 2849 2867 ;'; 2850 2868 2851 2869 $result = pwg_query($query); 2852 2870 2853 2871 while ($row = pwg_db_fetch_assoc($result)) 2854 2872 { 2855 2873 $user = $row; 2856 2874 $user['groups'] = array(); 2857 2875 2858 2876 array_push($users, $user); 2859 2860 2861 2877 } 2878 2879 // Add groups list 2862 2880 // --------------- 2863 2881 $user_ids = array(); 2864 2882 foreach ($users as $i => $user) 2865 2883 { 2866 2867 2868 2869 2884 $user_ids[$i] = $user['id']; 2885 } 2886 2887 return $users; 2870 2888 } 2871 2889 … … 2882 2900 { 2883 2901 global $conf, $page; 2884 2885 2902 2903 // Get ConfirmMail configuration 2886 2904 // ----------------------------- 2887 2905 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 2888 2906 2889 2907 // Get UAM configuration 2890 2908 // --------------------- 2891 2909 $conf_UAM = unserialize($conf['UserAdvManager']); 2892 2893 2910 2911 $query = ' 2894 2912 SELECT registration_date 2895 2913 FROM '.USER_INFOS_TABLE.' 2896 2914 WHERE user_id = '.$id.' 2897 2915 ;'; 2898 2916 list($registration_date) = pwg_db_fetch_row(pwg_query($query)); 2899 2917 2900 2918 // Time limit process 2901 2919 // ******************************************** 2902 2903 { 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2920 if (!empty($registration_date)) 2921 { 2922 // Dates formating and compare 2923 // --------------------------- 2924 $today = date("d-m-Y"); // Get today's date 2925 list($day, $month, $year) = explode('-', $today); // explode date of today 2926 $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp 2927 2928 list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date 2929 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date 2930 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp 2931 2932 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps 2933 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days 2934 2935 // Condition with the value set for time limit 2918 2936 // ------------------------------------------- 2919 2920 2921 2922 2923 2924 2925 2926 2927 2937 if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set 2938 { 2939 return false; 2940 } 2941 else 2942 { 2943 return true; 2944 } 2945 } 2928 2946 } 2929 2947 … … 2967 2985 $points = $points + 1; 2968 2986 2969 2987 // Adding bonus points for lowercase 2970 2988 // --------------------------------- 2971 2989 $point_lowercase = 1; … … 2976 2994 // -------------------------------------- 2977 2995 $points = $points + 2; 2978 2996 2979 2997 // Adding bonus points for uppercase 2980 2998 // --------------------------------- … … 2986 3004 // ------------------------------------ 2987 3005 $points = $points + 3; 2988 3006 2989 3007 // Adding bonus points for numbers 2990 3008 // ------------------------------- … … 3041 3059 $t = array(); 3042 3060 $v = false; 3043 3061 3044 3062 $query = ' 3045 3063 SELECT value … … 3047 3065 WHERE param = "UserAdvManager_Redir" 3048 3066 ;'; 3049 3067 3050 3068 if ($v = (($t = pwg_db_fetch_row(pwg_query($query))) !== false)) 3051 3069 { … … 3076 3094 3077 3095 $result = pwg_db_fetch_assoc(pwg_query($query)); 3078 3096 3079 3097 if($result['UAM_pwdreset'] == 'true') 3080 3098 { … … 3154 3172 { 3155 3173 global $template; 3156 3174 3157 3175 $template->append('plugin_user_list_column_titles', l10n('UAM_PwdReset')); 3158 3176 3159 3177 $user_ids = array(); 3160 3178 3161 3179 foreach ($visible_user_list as $i => $user) 3162 3180 { 3163 3181 $user_ids[$i] = $user['id']; 3164 3182 } 3165 3183 3166 3184 $user_nums = array_flip($user_ids); 3167 3185 … … 3176 3194 ;'; 3177 3195 $result = pwg_query($query); 3178 3196 3179 3197 while ($row = mysql_fetch_array($result)) 3180 3198 { … … 3188 3206 } 3189 3207 else $pwdreset = l10n('UAM_PwdReset_NA'); 3190 3208 3191 3209 $visible_user_list[$user_nums[$row['id']]]['plugin_columns'][] = $pwdreset; // Shows users password state in user_list 3192 3210 } … … 3263 3281 $j++; 3264 3282 } 3265 3283 3266 3284 // Saving UAM configuration 3267 3285 // ------------------------ … … 3327 3345 { 3328 3346 global $prefixeTable, $dblayer, $conf; 3329 3347 3330 3348 define('DEFAULT_PREFIX_TABLE', 'piwigo_'); 3331 3349 3332 3350 $Backup_File = UAM_PATH.'/include/backup/UAM_dbbackup.sql'; 3333 3351 … … 3400 3418 continue; 3401 3419 } 3402 3420 3403 3421 $query.= ' '.$sql_line; 3404 3422 3405 3423 // if we reached the end of query, we execute it and reinitialize the 3406 3424 // variable "query" -
extensions/UserAdvManager/trunk/language/de_DE/help.lang.php
r14861 r19234 1 1 <?php 2 //global $lang;3 2 4 3 $lang['UAM_confirmTitle_d'] = '- Informationen E-Mail generation<br> -
extensions/UserAdvManager/trunk/language/de_DE/plugin.lang.php
r18466 r19234 1 1 <?php 2 3 //global $lang,$conf;4 5 //$conf_UAM = unserialize($conf['UserAdvManager']);6 7 2 8 3 /* UserManager Tab */ -
extensions/UserAdvManager/trunk/language/en_UK/help.lang.php
r18158 r19234 1 1 <?php 2 //global $lang;3 2 4 3 $lang['UAM_carexcTitle_d'] = 'It may be interesting to prohibit certain characters in usernames (example: refuse login names containing @). This option allows to exclude characters or sequence of characters, events.<br> -
extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php
r18431 r19234 1 1 <?php 2 3 //global $lang,$conf;4 5 //$conf_UAM = unserialize($conf['UserAdvManager']);6 7 2 8 3 /* UserManager Tab */ -
extensions/UserAdvManager/trunk/language/es_ES/help.lang.php
r17800 r19234 1 1 <?php 2 //global $lang;3 2 4 3 $lang['UAM_confirmTitle_d'] = ' -
extensions/UserAdvManager/trunk/language/es_ES/plugin.lang.php
r18505 r19234 1 1 <?php 2 3 //global $lang,$conf;4 5 //$conf_UAM = unserialize($conf['UserAdvManager']);6 7 2 8 3 /* UserManager Tab */ -
extensions/UserAdvManager/trunk/language/fr_FR/help.lang.php
r18158 r19234 1 1 <?php 2 //global $lang;3 2 4 3 $lang['UAM_carexcTitle_d'] = 'Il peut être intéressant d\'interdire certains caractères dans les noms d\'utilisateurs (exemple : refuser les logins contenant un @). Cette option permet d\'exclure les caractères, ou suite de caractères, indésirables.<br>NB: l\'option permet également d\'exclure des mots complets. -
extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r18431 r19234 1 1 <?php 2 3 //global $lang,$conf;4 5 //$conf_UAM = unserialize($conf['UserAdvManager']);6 7 2 8 3 /* UserManager Tab */ -
extensions/UserAdvManager/trunk/language/hu_HU/plugin.lang.php
r18206 r19234 1 1 <?php 2 3 //global $lang,$conf;4 5 //$conf_UAM = unserialize($conf['UserAdvManager']);6 7 2 8 3 /* UserManager Tab */ -
extensions/UserAdvManager/trunk/language/it_IT/help.lang.php
r18898 r19234 1 1 <?php 2 //global $lang;3 2 4 3 $lang['UAM_confirmTitle_d'] = ' -
extensions/UserAdvManager/trunk/language/it_IT/plugin.lang.php
r18509 r19234 1 1 <?php 2 3 //global $lang,$conf;4 5 //$conf_UAM = unserialize($conf['UserAdvManager']);6 7 2 8 3 /* UserManager Tab */ -
extensions/UserAdvManager/trunk/language/lv_LV/help.lang.php
r19051 r19234 1 1 <?php 2 //global $lang;3 2 4 3 $lang['UAM_confirmTitle_d'] = '- Informācijas e-pasta ģenerēšana<br> -
extensions/UserAdvManager/trunk/language/lv_LV/plugin.lang.php
r18538 r19234 1 1 <?php 2 3 //global $lang,$conf;4 5 //$conf_UAM = unserialize($conf['UserAdvManager']);6 7 2 8 3 /* UserManager Tab */
Note: See TracChangeset
for help on using the changeset viewer.