- Timestamp:
- May 23, 2011, 7:08:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/branches/2.20/admin/UAM_admin.php
r10958 r11019 106 106 case 'global': 107 107 108 if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_ No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_GroupComm']))108 if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw'])) 109 109 { 110 110 … … 149 149 (isset($_POST['UAM_Validated_Group'])?$_POST['UAM_Validated_Group']:''), 150 150 (isset($_POST['UAM_Validated_Status'])?$_POST['UAM_Validated_Status']:''), 151 $_POST['UAM_No_Comment_Anonymous'],152 151 $_POST['UAM_Username_Char'], 153 152 $_POST['UAM_Username_List'], … … 180 179 $_POST['UAM_Stuffs'], 181 180 $_POST['UAM_HidePassw'], 182 $_POST['UAM_GroupComm'],183 (isset($_POST['UAM_AllowComm_Group'])?$_POST['UAM_AllowComm_Group']:''),184 181 ); 185 182 186 183 $conf['UserAdvManager'] = serialize($newconf_UAM); 187 184 188 $query = ' 189 UPDATE '.CONFIG_TABLE.' 190 SET value="'.pwg_db_real_escape_string($conf['UserAdvManager']).'" 191 WHERE param="UserAdvManager" 192 LIMIT 1 193 ;'; 194 195 pwg_query($query); 185 conf_update_param('UserAdvManager', pwg_db_real_escape_string($conf['UserAdvManager'])); 196 186 197 187 //Email confirmation settings … … 214 204 215 205 $conf['UserAdvManager_ConfirmMail'] = serialize($newconf_UAM_ConfirmMail); 216 217 $query = ' 218 UPDATE '.CONFIG_TABLE.' 219 SET value="'.pwg_db_real_escape_string($conf['UserAdvManager_ConfirmMail']).'" 220 WHERE param="UserAdvManager_ConfirmMail" 221 LIMIT 1 222 ;'; 223 224 pwg_query($query); 206 207 conf_update_param('UserAdvManager_ConfirmMail', pwg_db_real_escape_string($conf['UserAdvManager_ConfirmMail'])); 225 208 226 209 array_push($page['infos'], l10n('UAM_save_config')); … … 259 242 $Valid = -1; 260 243 $Downgrade = -1; 261 $AllowComm = -1;262 244 263 245 //Check groups list in database … … 284 266 } 285 267 //configuration value for downgrade users 286 if (isset($conf_UAM[2 6]) and $conf_UAM[26] == $row['id'])268 if (isset($conf_UAM[25]) and $conf_UAM[25] == $row['id']) 287 269 { 288 270 $Downgrade = $row['id']; 289 }290 //configuration value for users group allowed to post comments291 if (isset($conf_UAM[37]) and $conf_UAM[37] == $row['id'])292 {293 $AllowComm = $row['id'];294 271 } 295 272 } … … 319 296 ) 320 297 ); 321 //Template initialization for allowed group for comments322 $template->assign(323 'AllowComm_Group',324 array(325 'group_options'=> $groups,326 'group_selected' => $AllowComm327 )328 );329 298 330 299 //Status setting for unvalidated, validated users and downgrade status … … 338 307 { 339 308 $status_options[$status] = l10n('user_status_'.$status); 340 if (isset($conf_UAM[ 8]) and $conf_UAM[8] == $status)309 if (isset($conf_UAM[7]) and $conf_UAM[7] == $status) 341 310 { 342 311 $No_Valid_Status = $status; … … 376 345 { 377 346 $status_options[$status] = l10n('user_status_'.$status); 378 if (isset($conf_UAM[2 7]) and $conf_UAM[27] == $status)347 if (isset($conf_UAM[26]) and $conf_UAM[26] == $status) 379 348 { 380 349 $Downgrade_Status = $status; … … 412 381 'UAM_MAIL_INFO_TRUE' => $conf_UAM[0]=='true' ? 'checked="checked"' : '' , 413 382 'UAM_MAIL_INFO_FALSE' => $conf_UAM[0]=='false' ? 'checked="checked"' : '' , 414 'UAM_MAILINFO_TEXT' => $conf_UAM[ 9],415 'UAM_USERNAME_CHAR_TRUE' => $conf_UAM[ 6]=='true' ? 'checked="checked"' : '' ,416 'UAM_USERNAME_CHAR_FALSE' => $conf_UAM[ 6]=='false' ? 'checked="checked"' : '' ,417 'UAM_USERNAME_CHAR_LIST' => $conf_UAM[ 7],383 'UAM_MAILINFO_TEXT' => $conf_UAM[8], 384 'UAM_USERNAME_CHAR_TRUE' => $conf_UAM[5]=='true' ? 'checked="checked"' : '' , 385 'UAM_USERNAME_CHAR_FALSE' => $conf_UAM[5]=='false' ? 'checked="checked"' : '' , 386 'UAM_USERNAME_CHAR_LIST' => $conf_UAM[6], 418 387 'UAM_CONFIRM_MAIL_TRUE' => $conf_UAM[1]=='true' ? 'checked="checked"' : '' , 419 388 'UAM_CONFIRM_MAIL_FALSE' => $conf_UAM[1]=='false' ? 'checked="checked"' : '' , 420 389 'UAM_CONFIRM_MAIL_LOCAL' => $conf_UAM[1]=='local' ? 'checked="checked"' : '' , 421 'UAM_CONFIRMMAIL_TEXT' => $conf_UAM[ 10],390 'UAM_CONFIRMMAIL_TEXT' => $conf_UAM[9], 422 391 'UAM_No_Confirm_Group' => $conf_UAM[2], 423 392 'UAM_Validated_Group' => $conf_UAM[3], 424 'UAM_No_Confirm_Status' => $conf_UAM[ 8],393 'UAM_No_Confirm_Status' => $conf_UAM[7], 425 394 'UAM_Validated_Status' => $conf_UAM[4], 426 'UAM_NO_COMMENT_ANO_TRUE' => $conf_UAM[5]=='true' ? 'checked="checked"' : '' , 427 'UAM_NO_COMMENT_ANO_FALSE' => $conf_UAM[5]=='false' ? 'checked="checked"' : '' , 428 'UAM_MAILEXCLUSION_TRUE' => $conf_UAM[11]=='true' ? 'checked="checked"' : '' , 429 'UAM_MAILEXCLUSION_FALSE' => $conf_UAM[11]=='false' ? 'checked="checked"' : '' , 430 'UAM_MAILEXCLUSION_LIST' => $conf_UAM[12], 431 'UAM_PASSWORDENF_TRUE' => $conf_UAM[13]=='true' ? 'checked="checked"' : '' , 432 'UAM_PASSWORDENF_FALSE' => $conf_UAM[13]=='false' ? 'checked="checked"' : '' , 433 'UAM_PASSWORD_SCORE' => $conf_UAM[14], 434 'UAM_ADMINPASSWENF_TRUE' => $conf_UAM[15]=='true' ? 'checked="checked"' : '' , 435 'UAM_ADMINPASSWENF_FALSE' => $conf_UAM[15]=='false' ? 'checked="checked"' : '' , 436 'UAM_GHOSTRACKER_TRUE' => $conf_UAM[16]=='true' ? 'checked="checked"' : '' , 437 'UAM_GHOSTRACKER_FALSE' => $conf_UAM[16]=='false' ? 'checked="checked"' : '' , 438 'UAM_GHOSTRACKER_DAYLIMIT' => $conf_UAM[17], 439 'UAM_GHOSTRACKER_REMINDERTEXT' => $conf_UAM[18], 440 'UAM_ADDLASTVISIT_TRUE' => $conf_UAM[19]=='true' ? 'checked="checked"' : '' , 441 'UAM_ADDLASTVISIT_FALSE' => $conf_UAM[19]=='false' ? 'checked="checked"' : '' , 442 'UAM_ADMINCONFMAIL_TRUE' => $conf_UAM[20]=='true' ? 'checked="checked"' : '' , 443 'UAM_ADMINCONFMAIL_FALSE' => $conf_UAM[20]=='false' ? 'checked="checked"' : '' , 444 'UAM_REDIRTOPROFILE_TRUE' => $conf_UAM[21]=='true' ? 'checked="checked"' : '' , 445 'UAM_REDIRTOPROFILE_FALSE' => $conf_UAM[21]=='false' ? 'checked="checked"' : '' , 446 'UAM_GTAUTO_TRUE' => $conf_UAM[22]=='true' ? 'checked="checked"' : '' , 447 'UAM_GTAUTO_FALSE' => $conf_UAM[22]=='false' ? 'checked="checked"' : '' , 448 'UAM_GTAUTOMAIL_TRUE' => $conf_UAM[23]=='true' ? 'checked="checked"' : '' , 449 'UAM_GTAUTOMAIL_FALSE' => $conf_UAM[23]=='false' ? 'checked="checked"' : '' , 450 'UAM_GTAUTODEL_TEXT' => $conf_UAM[24], 451 'UAM_GTAUTOMAILTEXT' => $conf_UAM[25], 452 'UAM_Downgrade_Group' => $conf_UAM[26], 453 'UAM_Downgrade_Status' => $conf_UAM[27], 454 'UAM_ADMINVALIDATIONMAIL_TEXT' => $conf_UAM[28], 455 'UAM_CUSTOMPASSWRETR_TRUE' => $conf_UAM[29]=='true' ? 'checked="checked"' : '' , 456 'UAM_CUSTOMPASSWRETR_FALSE' => $conf_UAM[29]=='false' ? 'checked="checked"' : '' , 457 'UAM_CUSTOMPASSWRETR_TEXT' => $conf_UAM[30], 458 'UAM_USRAUTO_TRUE' => $conf_UAM[31]=='true' ? 'checked="checked"' : '' , 459 'UAM_USRAUTO_FALSE' => $conf_UAM[31]=='false' ? 'checked="checked"' : '' , 460 'UAM_USRAUTODEL_TEXT' => $conf_UAM[32], 461 'UAM_USRAUTOMAIL_TRUE' => $conf_UAM[33]=='true' ? 'checked="checked"' : '' , 462 'UAM_USRAUTOMAIL_FALSE' => $conf_UAM[33]=='false' ? 'checked="checked"' : '' , 463 'UAM_STUFFS_TRUE' => $conf_UAM[34]=='true' ? 'checked="checked"' : '' , 464 'UAM_STUFFS_FALSE' => $conf_UAM[34]=='false' ? 'checked="checked"' : '' , 465 'UAM_HIDEPASSW_TRUE' => $conf_UAM[35]=='true' ? 'checked="checked"' : '' , 466 'UAM_HIDEPASSW_FALSE' => $conf_UAM[35]=='false' ? 'checked="checked"' : '' , 467 'UAM_GROUPCOMM_TRUE' => $conf_UAM[36]=='true' ? 'checked="checked"' : '' , 468 'UAM_GROUPCOMM_FALSE' => $conf_UAM[36]=='false' ? 'checked="checked"' : '' , 469 'UAM_ALLOWCOMM_GROUP' => $conf_UAM[37], 395 'UAM_MAILEXCLUSION_TRUE' => $conf_UAM[10]=='true' ? 'checked="checked"' : '' , 396 'UAM_MAILEXCLUSION_FALSE' => $conf_UAM[10]=='false' ? 'checked="checked"' : '' , 397 'UAM_MAILEXCLUSION_LIST' => $conf_UAM[11], 398 'UAM_PASSWORDENF_TRUE' => $conf_UAM[12]=='true' ? 'checked="checked"' : '' , 399 'UAM_PASSWORDENF_FALSE' => $conf_UAM[12]=='false' ? 'checked="checked"' : '' , 400 'UAM_PASSWORD_SCORE' => $conf_UAM[13], 401 'UAM_ADMINPASSWENF_TRUE' => $conf_UAM[14]=='true' ? 'checked="checked"' : '' , 402 'UAM_ADMINPASSWENF_FALSE' => $conf_UAM[14]=='false' ? 'checked="checked"' : '' , 403 'UAM_GHOSTRACKER_TRUE' => $conf_UAM[15]=='true' ? 'checked="checked"' : '' , 404 'UAM_GHOSTRACKER_FALSE' => $conf_UAM[15]=='false' ? 'checked="checked"' : '' , 405 'UAM_GHOSTRACKER_DAYLIMIT' => $conf_UAM[16], 406 'UAM_GHOSTRACKER_REMINDERTEXT' => $conf_UAM[17], 407 'UAM_ADDLASTVISIT_TRUE' => $conf_UAM[18]=='true' ? 'checked="checked"' : '' , 408 'UAM_ADDLASTVISIT_FALSE' => $conf_UAM[18]=='false' ? 'checked="checked"' : '' , 409 'UAM_ADMINCONFMAIL_TRUE' => $conf_UAM[19]=='true' ? 'checked="checked"' : '' , 410 'UAM_ADMINCONFMAIL_FALSE' => $conf_UAM[19]=='false' ? 'checked="checked"' : '' , 411 'UAM_REDIRTOPROFILE_TRUE' => $conf_UAM[20]=='true' ? 'checked="checked"' : '' , 412 'UAM_REDIRTOPROFILE_FALSE' => $conf_UAM[20]=='false' ? 'checked="checked"' : '' , 413 'UAM_GTAUTO_TRUE' => $conf_UAM[21]=='true' ? 'checked="checked"' : '' , 414 'UAM_GTAUTO_FALSE' => $conf_UAM[21]=='false' ? 'checked="checked"' : '' , 415 'UAM_GTAUTOMAIL_TRUE' => $conf_UAM[22]=='true' ? 'checked="checked"' : '' , 416 'UAM_GTAUTOMAIL_FALSE' => $conf_UAM[22]=='false' ? 'checked="checked"' : '' , 417 'UAM_GTAUTODEL_TEXT' => $conf_UAM[23], 418 'UAM_GTAUTOMAILTEXT' => $conf_UAM[24], 419 'UAM_Downgrade_Group' => $conf_UAM[25], 420 'UAM_Downgrade_Status' => $conf_UAM[26], 421 'UAM_ADMINVALIDATIONMAIL_TEXT' => $conf_UAM[27], 422 'UAM_CUSTOMPASSWRETR_TRUE' => $conf_UAM[28]=='true' ? 'checked="checked"' : '' , 423 'UAM_CUSTOMPASSWRETR_FALSE' => $conf_UAM[28]=='false' ? 'checked="checked"' : '' , 424 'UAM_CUSTOMPASSWRETR_TEXT' => $conf_UAM[29], 425 'UAM_USRAUTO_TRUE' => $conf_UAM[30]=='true' ? 'checked="checked"' : '' , 426 'UAM_USRAUTO_FALSE' => $conf_UAM[30]=='false' ? 'checked="checked"' : '' , 427 'UAM_USRAUTODEL_TEXT' => $conf_UAM[31], 428 'UAM_USRAUTOMAIL_TRUE' => $conf_UAM[32]=='true' ? 'checked="checked"' : '' , 429 'UAM_USRAUTOMAIL_FALSE' => $conf_UAM[32]=='false' ? 'checked="checked"' : '' , 430 'UAM_STUFFS_TRUE' => $conf_UAM[33]=='true' ? 'checked="checked"' : '' , 431 'UAM_STUFFS_FALSE' => $conf_UAM[33]=='false' ? 'checked="checked"' : '' , 432 'UAM_HIDEPASSW_TRUE' => $conf_UAM[34]=='true' ? 'checked="checked"' : '' , 433 'UAM_HIDEPASSW_FALSE' => $conf_UAM[34]=='false' ? 'checked="checked"' : '' , 470 434 'UAM_PASSWORD_TEST_SCORE' => $UAM_Password_Test_Score, 471 435 'UAM_ERROR_REPORTS4' => $UAM_Exclusionlist_Error, … … 487 451 488 452 //Username without forbidden keys 489 if ( isset($conf_UAM[ 6]) and $conf_UAM[6] == 'true' )453 if ( isset($conf_UAM[5]) and $conf_UAM[5] == 'true' ) 490 454 { 491 455 $query = " … … 506 470 507 471 //Email without forbidden domain 508 if ( isset($conf_UAM[1 1]) and $conf_UAM[11] == 'true' )472 if ( isset($conf_UAM[10]) and $conf_UAM[10] == 'true' ) 509 473 { 510 474 $query = " … … 517 481 while($row = pwg_db_fetch_assoc($result)) 518 482 { 519 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[1 2]);483 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]); 520 484 for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++) 521 485 { … … 572 536 $conf_UAM = unserialize($conf['UserAdvManager']); 573 537 574 if (isset($conf_UAM[1 9]) and $conf_UAM[19]=='true')538 if (isset($conf_UAM[18]) and $conf_UAM[18]=='true') 575 539 { 576 540 // +-----------------------------------------------------------------------+ … … 621 585 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days 622 586 623 if (isset($conf_UAM[1 6]) and $conf_UAM[16]=='true' and $conf_UAM[17] <> '')587 if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and $conf_UAM[16] <> '') 624 588 { 625 if ($deltadays <= ($conf_UAM[1 7]/2))589 if ($deltadays <= ($conf_UAM[16]/2)) 626 590 { 627 591 $display = 'green'; 628 592 } 629 593 630 if (($deltadays > ($conf_UAM[1 7]/2)) and ($deltadays < $conf_UAM[17]))594 if (($deltadays > ($conf_UAM[16]/2)) and ($deltadays < $conf_UAM[16])) 631 595 { 632 596 $display = 'orange'; 633 597 } 634 598 635 if ($deltadays >= $conf_UAM[1 7])599 if ($deltadays >= $conf_UAM[16]) 636 600 { 637 601 $display = 'red'; … … 695 659 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 696 660 697 if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local') and ((isset($conf_UAM[2]) and $conf_UAM[2] <> '-1') or (isset($conf_UAM[ 8]) and $conf_UAM[8] <> '-1')))661 if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local') and ((isset($conf_UAM[2]) and $conf_UAM[2] <> '-1') or (isset($conf_UAM[7]) and $conf_UAM[7] <> '-1'))) 698 662 { 699 663 // +-----------------------------------------------------------------------+ … … 1209 1173 $conf_UAM = unserialize($conf['UserAdvManager']); 1210 1174 1211 if (isset($conf_UAM[16]) and $conf_UAM[1 6]=='true')1175 if (isset($conf_UAM[16]) and $conf_UAM[15]=='true') 1212 1176 { 1213 1177 // +-----------------------------------------------------------------------+
Note: See TracChangeset
for help on using the changeset viewer.