Changeset 5633 for extensions/NBC_UserAdvManager
- Timestamp:
- Apr 4, 2010, 4:18:52 PM (15 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk
- Files:
-
- 8 added
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/ConfirmMail.php
r5593 r5633 2 2 //----------------------------------------------------------- include 3 3 define('PHPWG_ROOT_PATH','./../../'); 4 4 5 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 6 5 7 include_once (UAM_PATH.'include/constants.php'); 6 8 include_once (UAM_PATH.'include/functions.inc.php'); … … 11 13 //check_status(ACCESS_NONE); 12 14 load_language('plugin.lang', UAM_PATH); 13 14 if (isset($_GET['key']))15 {16 17 global $conf;18 19 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);20 21 if (VerifyConfirmMail($_GET['key']))22 {23 $template->assign(24 array(25 'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[5],26 )27 );28 }29 else30 {31 $template->assign(32 array(33 'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[6],34 )35 );36 }37 }38 15 39 16 /** … … 55 32 '/theme/'.$user['theme'].'/themeconf.inc.php'); 56 33 57 $template->set_filenames( 58 array( 59 'confirm_mail'=>UAM_PATH.'ConfirmMail.tpl', 60 ) 61 ); 34 if (isset($_GET['key'])) 35 { 36 37 global $conf; 38 39 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 40 41 if (VerifyConfirmMail($_GET['key'])) 42 { 43 $status = true; 44 45 $template->assign( 46 array( 47 'STATUS' => $status, 48 'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[5], 49 ) 50 ); 51 } 52 else 53 { 54 $status = false; 55 $template->assign( 56 array( 57 'STATUS' => $status, 58 'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[6], 59 ) 60 ); 61 } 62 } 63 62 64 if (isset($lang['Theme: '.$user['theme']])) 63 65 { … … 78 80 } 79 81 82 $template->set_filenames( 83 array( 84 'confirm_mail'=>dirname(__FILE__).'/template/ConfirmMail.tpl', 85 ) 86 ); 80 87 81 88 $template->pparse('confirm_mail'); -
extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php
r5593 r5633 216 216 $result = pwg_query($query); 217 217 218 while ($row = mysql_fetch_assoc($result))218 while ($row = pwg_db_fetch_assoc($result)) 219 219 { 220 220 $groups[$row['id']] = $row['name']; … … 370 370 $result = pwg_query($query); 371 371 372 while($row = mysql_fetch_assoc($result))372 while($row = pwg_db_fetch_assoc($result)) 373 373 { 374 374 $msg_error1 .= (($msg_error1 <> '') ? '<br/>' : '') . l10n('Err_audit_no_casse').stripslashes($row['username']); … … 388 388 $result = pwg_query($query); 389 389 390 while($row = mysql_fetch_assoc($result))390 while($row = pwg_db_fetch_assoc($result)) 391 391 { 392 392 if (!ValidateUsername(stripslashes($row['username']))) … … 407 407 $result = pwg_query($query); 408 408 409 while($row = mysql_fetch_assoc($result))409 while($row = pwg_db_fetch_assoc($result)) 410 410 { 411 411 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[13]); … … 801 801 WHERE id = '".$user_id."' 802 802 ;"; 803 $data = mysql_fetch_assoc(pwg_query($query));803 $data = pwg_db_fetch_assoc(pwg_query($query)); 804 804 805 805 ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],true); … … 886 886 ;"; 887 887 888 $data = mysql_fetch_assoc(pwg_query($query));888 $data = pwg_db_fetch_assoc(pwg_query($query)); 889 889 890 890 ResendMail2User($typemail,$user_id,stripslashes($data['username']),$data['mail_address'],false); … … 970 970 ;"; 971 971 972 $data = mysql_fetch_assoc(pwg_query($query));972 $data = pwg_db_fetch_assoc(pwg_query($query)); 973 973 974 974 ForceValidation($data['id']); … … 1001 1001 $result = pwg_query($query); 1002 1002 1003 while ($row = mysql_fetch_assoc($result))1003 while ($row = pwg_db_fetch_assoc($result)) 1004 1004 { 1005 1005 $groups[$row['id']] = $row['name']; … … 1082 1082 $result = pwg_query($query); 1083 1083 1084 $row = mysql_fetch_assoc($result);1084 $row = pwg_db_fetch_assoc($result); 1085 1085 1086 1086 if (isset($row['reminder']) and $row['reminder'] == 'true') … … 1353 1353 ;"; 1354 1354 1355 $data = mysql_fetch_assoc(pwg_query($query));1355 $data = pwg_db_fetch_assoc(pwg_query($query)); 1356 1356 1357 1357 ghostreminder($user_id,stripslashes($data['username']),$data['mail_address']); … … 1378 1378 FROM '.USER_LASTVISIT_TABLE.';'; 1379 1379 1380 $count = mysql_num_rows(pwg_query($query1));1380 $count = pwg_db_num_rows(pwg_query($query1)); 1381 1381 1382 1382 if ($count <> 0) … … 1397 1397 $result = pwg_query($query); 1398 1398 1399 while ($row = mysql_fetch_assoc($result))1399 while ($row = pwg_db_fetch_assoc($result)) 1400 1400 { 1401 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));1401 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 1402 1402 1403 1403 $query = " … … 1424 1424 $result = pwg_query($query); 1425 1425 1426 while($row = mysql_fetch_assoc($result))1426 while($row = pwg_db_fetch_assoc($result)) 1427 1427 { 1428 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));1428 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 1429 1429 1430 1430 $query = " -
extensions/NBC_UserAdvManager/trunk/changelog.txt.php
r5593 r5633 163 163 Bug 1508 fixed - Plugin's name is now UserAdvManager (deletion of "nbc_" in code and PEM) 164 164 Bug 1551 fixed - Database upgrade improvement 165 166 -- 2.15.1 : Bug 1571 fixed - Missing translation tag 167 Bug 1572 fixed - Fix unable to read resource: "ConfirmMail.tpl" 168 Bug 1574 fixed - Beautifying ConfirmMail page 169 Bug 1576 fixed - Compatibility with other database systems than MySql like PostgreSql or Sqlite. Using Piwigo's pwg_db_### integrated functions. 165 170 */ 166 171 ?> -
extensions/NBC_UserAdvManager/trunk/include/functions.inc.php
r5181 r5633 22 22 WHERE user_id = '.$id.' 23 23 ;'; 24 $data = mysql_fetch_assoc(pwg_query($query));24 $data = pwg_db_fetch_assoc(pwg_query($query)); 25 25 26 26 /* Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language */ … … 166 166 WHERE user_id = '.$user_id.' 167 167 ;'; 168 $data = mysql_fetch_assoc(pwg_query($query));168 $data = pwg_db_fetch_assoc(pwg_query($query)); 169 169 $language = $data['language']; 170 170 … … 265 265 WHERE user_id = '.$user_id.' 266 266 ;'; 267 $data = mysql_fetch_assoc(pwg_query($query));267 $data = pwg_db_fetch_assoc(pwg_query($query)); 268 268 $language = $data['language']; 269 269 … … 320 320 WHERE id = '".$id."' 321 321 ;"; 322 list($count) = mysql_fetch_row(pwg_query($query));322 list($count) = pwg_db_fetch_row(pwg_query($query)); 323 323 324 324 if ($count == 0) … … 336 336 $Confirm_Mail_ID = FindAvailableConfirmMailID(); 337 337 338 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));338 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 339 339 340 340 if (isset($Confirm_Mail_ID)) … … 345 345 WHERE user_id = '".$user_id."' 346 346 ;"; 347 list($status) = mysql_fetch_row(pwg_query($query));347 list($status) = pwg_db_fetch_row(pwg_query($query)); 348 348 349 349 $query = " … … 399 399 $Confirm_Mail_ID = FindAvailableConfirmMailID(); 400 400 401 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));401 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 402 402 403 403 if (isset($Confirm_Mail_ID)) … … 427 427 global $conf; 428 428 429 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));429 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 430 430 431 431 $query = " … … 474 474 WHERE id = '".$id."' 475 475 ;"; 476 list($count) = mysql_fetch_row(pwg_query($query));476 list($count) = pwg_db_fetch_row(pwg_query($query)); 477 477 478 478 if ($count == 1) … … 483 483 WHERE id = '".$id."' 484 484 ;"; 485 $data = mysql_fetch_assoc(pwg_query($query));485 $data = pwg_db_fetch_assoc(pwg_query($query)); 486 486 487 487 if (!empty($data) and isset($data['user_id']) and !isset($data['date_check'])) … … 492 492 WHERE user_id = '".$data['user_id']."' 493 493 ;"; 494 list($registration_date) = mysql_fetch_row(pwg_query($query));494 list($registration_date) = pwg_db_fetch_row(pwg_query($query)); 495 495 496 496 /* Time limit process */ … … 516 516 if ($deltadays <= $conf_UAM_ConfirmMail[1]) // If Nb of days is less than the limit set 517 517 { 518 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));518 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 519 519 520 520 $query = ' … … 568 568 else 569 569 { 570 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));570 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 571 571 572 572 $query = ' … … 640 640 WHERE user_id = '".$id."' 641 641 ;"; 642 list($count) = mysql_fetch_row(pwg_query($query));642 list($count) = pwg_db_fetch_row(pwg_query($query)); 643 643 644 644 if ($count == 1) … … 649 649 WHERE user_id = '".$id."' 650 650 ;"; 651 $data = mysql_fetch_assoc(pwg_query($query));651 $data = pwg_db_fetch_assoc(pwg_query($query)); 652 652 653 653 if (!empty($data) and isset($data['user_id']) and !isset($data['date_check'])) 654 654 { 655 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));655 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 656 656 657 657 $query = " … … 718 718 WHERE LOWER(".stripslashes($conf['user_fields']['username']).") = '".strtolower($username)."' 719 719 ;"; 720 $users = mysql_num_rows(pwg_query($query));720 $users = pwg_db_num_rows(pwg_query($query)); 721 721 if ($users > 0) 722 722 { … … 837 837 $result = pwg_query($query); 838 838 839 while ($row = mysql_fetch_assoc($result))839 while ($row = pwg_db_fetch_assoc($result)) 840 840 { 841 841 $user = $row; … … 864 864 $result = pwg_query($query); 865 865 866 while ($row = mysql_fetch_assoc($result))866 while ($row = pwg_db_fetch_assoc($result)) 867 867 { 868 868 array_push( … … 901 901 $result = pwg_query($query); 902 902 903 while ($row = mysql_fetch_assoc($result))903 while ($row = pwg_db_fetch_assoc($result)) 904 904 { 905 905 $user = $row; … … 942 942 $result = pwg_query($query); 943 943 944 while ($row = mysql_fetch_assoc($result))944 while ($row = pwg_db_fetch_assoc($result)) 945 945 { 946 946 $user = $row; … … 977 977 WHERE user_id = '".$id."' 978 978 ;"; 979 list($registration_date) = mysql_fetch_row(pwg_query($query));979 list($registration_date) = pwg_db_fetch_row(pwg_query($query)); 980 980 981 981 /* Time limit process */ … … 1088 1088 { 1089 1089 $query = 'DESC '.$table.';'; 1090 return (bool)($res= mysql_query($query));1090 return (bool)($res=pwg_query($query)); 1091 1091 } 1092 1092 -
extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php
r5598 r5633 255 255 $lang['Err_UserManager_Settings'] = 'Diese Seite ist nur verfügbar, wenn "Bestätigung der Anmeldung" aktiv ist und wenn eine Gruppe von nicht validierte Besuchern wird in "Einstellen Bestätigungen und Validierungen der Registrierung" konfiguriert.'; 256 256 // --------- End: New or revised $lang ---- from version 2.15.0 257 258 259 // --------- Starting below: New or revised $lang ---- from version 2.15.1 260 $lang['reg_err_mail_address_dbl'] = 'This email address is already used.'; 261 // --------- End: New or revised $lang ---- from version 2.15.1 257 262 ?> -
extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
r5598 r5633 252 252 $lang['Err_UserManager_Settings'] = 'This page is available only if "Confirmation of registration" is active and if a group of visitors not validated is configured in "Setting confirmations and validations of registration".'; 253 253 // --------- End: New or revised $lang ---- from version 2.15.0 254 255 256 // --------- Starting below: New or revised $lang ---- from version 2.15.1 257 $lang['reg_err_mail_address_dbl'] = 'Diese E-Mail-Adresse wird bereits verwendet.'; 258 // --------- End: New or revised $lang ---- from version 2.15.1 254 259 ?> -
extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php
r5598 r5633 254 254 $lang['Err_UserManager_Settings'] = 'Esta página está disponible sólo si "Confirmación de registro" está activo y si un grupo de visitantes no ha sido validada está configurado en "Configuración de las confirmaciones y validaciones de registro".'; 255 255 // --------- End: New or revised $lang ---- from version 2.15.0 256 257 258 // --------- Starting below: New or revised $lang ---- from version 2.15.1 259 $lang['reg_err_mail_address_dbl'] = 'Esta dirección de correo electrónico ya se utiliza.'; 260 // --------- End: New or revised $lang ---- from version 2.15.1 256 261 ?> -
extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r5598 r5633 251 251 $lang['Err_UserManager_Settings'] = 'Cette page n\'est accessible que si "Confirmation d\'inscription" est actif et si un groupe de visiteurs non validés est configuré dans le "Paramétrage des confirmations et validations d\'inscriptions".'; 252 252 // --------- End: New or revised $lang ---- from version 2.15.0 253 254 255 // --------- Starting below: New or revised $lang ---- from version 2.15.1 256 $lang['reg_err_mail_address_dbl'] = 'Cette adresse email est déjà utilisée.'; 257 // --------- End: New or revised $lang ---- from version 2.15.1 253 258 ?> -
extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php
r5598 r5633 254 254 $lang['Err_UserManager_Settings'] = 'Questa pagina è disponibile solo se "Conferma dell\'iscrizione" è attiva e se un gruppo di visitatori non convalidato è configurato in "Impostare le conferme e validazioni all\'iscrizione".'; 255 255 // --------- End: New or revised $lang ---- from version 2.15.0 256 257 258 // --------- Starting below: New or revised $lang ---- from version 2.15.1 259 $lang['reg_err_mail_address_dbl'] = 'Questo indirizzo e-mail è già utilizzato.'; 260 // --------- End: New or revised $lang ---- from version 2.15.1 256 261 ?> -
extensions/NBC_UserAdvManager/trunk/main.inc.php
r5593 r5633 2 2 /* 3 3 Plugin Name: UserAdvManager 4 Version: 2.15. 04 Version: 2.15.1 5 5 Description: Renforcer la gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 … … 92 92 ;'; 93 93 94 $count = mysql_num_rows(pwg_query($query));94 $count = pwg_db_num_rows(pwg_query($query)); 95 95 96 96 if ($count == 0) … … 210 210 WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['email'].'\') 211 211 ;'; 212 list($count) = mysql_fetch_array(pwg_query($query));212 list($count) = pwg_db_fetch_row(pwg_query($query)); 213 213 if ($count != 0) 214 214 { … … 234 234 WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['mail_address'].'\') 235 235 ;'; 236 list($count) = mysql_fetch_array(pwg_query($query));236 list($count) = pwg_db_fetch_row(pwg_query($query)); 237 237 if ($count != 0) 238 238 { … … 355 355 ;'; 356 356 357 list($current_email) = mysql_fetch_row(pwg_query($query));357 list($current_email) = pwg_db_fetch_row(pwg_query($query)); 358 358 359 359 if ($_POST['mail_address'] != $current_email and ( isset($conf_UAM[2]) and $conf_UAM[2] == 'true')) … … 370 370 ;'; 371 371 372 list($username) = mysql_fetch_row(pwg_query($query));372 list($username) = pwg_db_fetch_row(pwg_query($query)); 373 373 374 374 SendMail2User($typemail, $user['id'], $username, $_POST['use_new_pwd'], $_POST['mail_address'], $confirm_mail_need); -
extensions/NBC_UserAdvManager/trunk/maintain.inc.php
r5593 r5633 89 89 WHERE param = "nbc_UserAdvManager_ConfirmMail" 90 90 ;'; 91 $count1 = mysql_num_rows(pwg_query($query));91 $count1 = pwg_db_num_rows(pwg_query($query)); 92 92 93 93 $query1 = ' … … 96 96 WHERE param = "nbc_UserAdvManager_ConfirmMail" 97 97 ;'; 98 $count2 = mysql_num_rows(pwg_query($query1));98 $count2 = pwg_db_num_rows(pwg_query($query1)); 99 99 100 100 /* If old params exist an upgrade is needed */ … … 109 109 WHERE param = "nbc_UserAdvManager_ConfirmMail" 110 110 ;'; 111 $count = mysql_num_rows(pwg_query($query));111 $count = pwg_db_num_rows(pwg_query($query)); 112 112 113 113 if ($count == 0) -
extensions/NBC_UserAdvManager/trunk/obsolete.list
r5593 r5633 4 4 admin/userlist.tpl 5 5 admin/usermanager.tpl 6 ConfirmMail.tpl
Note: See TracChangeset
for help on using the changeset viewer.