Changeset 3920 for extensions/NBC_UserAdvManager
- Timestamp:
- Sep 27, 2009, 6:17:56 PM (15 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php
r3896 r3920 747 747 } 748 748 } 749 749 750 750 751 // +-----------------------------------------------------------------------+ … … 848 849 (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) 849 850 ? l10n('is_high_enabled') : l10n('is_high_disabled'); 851 852 $expiration = expiration($local_user['id']); 850 853 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 } 854 $template->append( 855 'users', 856 array( 857 'ID' => $local_user['id'], 858 'CHECKED' => $checked, 859 'U_PROFILE' => $profile_url.$local_user['id'], 860 'U_PERM' => $perm_url.$local_user['id'], 861 'USERNAME' => $local_user['username'] 862 .($local_user['id'] == $conf['guest_id'] 863 ? '<BR />['.l10n('is_the_guest').']' : '') 864 .($local_user['id'] == $conf['default_user_id'] 865 ? '<BR />['.l10n('is_the_default').']' : ''), 866 'STATUS' => l10n('user_status_'. 867 $local_user['status']).(($local_user['adviser'] == 'true') 868 ? '<BR />['.l10n('adviser').']' : ''), 869 'EMAIL' => get_email_address_as_display_text($local_user['email']), 870 'GROUPS' => $groups_string, 871 'REGISTRATION' => $local_user['registration_date'], 872 'EXPIRATION' => $expiration, 873 ) 874 ); 874 875 } 875 876 -
extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl
r3858 r3920 29 29 <td>{$user.EMAIL}</td> 30 30 <td>{$user.GROUPS}</td> 31 <td style="text-align:center;">{$user.REGISTRATION}</td>31 <td {if $user.EXPIRATION == True}style="color:red;text-align:center;"{else}style="color:lime;text-align:center;"{/if}>{$user.REGISTRATION}</td> 32 32 {foreach from=$user.plugin_columns item=data} 33 33 <td>{$data}</td> … … 35 35 </tr> 36 36 {/foreach} 37 </table>37 </table> 38 38 <br/> 39 39 </li> -
extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
r3896 r3920 695 695 return $users; 696 696 } 697 698 /* Function called from UserAdvManager.php - to determine who is expired or not and giving a different display color */ 699 function expiration($id) 700 { 701 global $conf, $page; 702 703 /* Get ConfirmMail configuration */ 704 $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array(); 705 706 /* Get UserAdvManager configuration */ 707 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 708 709 $query = " 710 SELECT registration_date 711 FROM ".USER_INFOS_TABLE." 712 WHERE user_id = '".$id."' 713 ;"; 714 list($registration_date) = mysql_fetch_row(pwg_query($query)); 715 716 /* Time limit process */ 717 /* ****************** begin ******************* */ 718 if (!empty($registration_date)) 719 { 720 // dates formating and compare 721 $today = date("d-m-Y"); // Get today's date 722 list($day, $month, $year) = explode('-', $today); // explode date of today 723 $daytimestamp = mktime(0, 0, 0, $month, $day, $year);// Generate UNIX timestamp 724 725 list($regdate, $regtime) = explode(' ', $registration_date); // Explode date and time from registration date 726 list($regyear, $regmonth, $regday) = explode('-', $regdate); // Explode date from registration date 727 $regtimestamp = mktime(0, 0, 0, $regmonth, $regday, $regyear);// Generate UNIX timestamp 728 729 $deltasecs = $daytimestamp - $regtimestamp;// Compare the 2 UNIX timestamps 730 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days 731 732 // Condition with the value set for time limit 733 if ($deltadays <= $conf_nbc_UserAdvManager_ConfirmMail[1]) // If Nb of days is less than the limit set 734 { 735 return false; 736 } 737 else 738 { 739 return True; 740 } 741 } 742 } 697 743 ?> -
extensions/NBC_UserAdvManager/trunk/main.inc.php
r3918 r3920 60 60 61 61 -- 2.11.3 : On Patricia's request (french forum), the unvalidated users management tab shows users according with the settings of unvalidated group and / or unvalidated status. 62 Email providers exclusion list can be set with CR/LF between each entry. The comma seperator (,) is still mandatory. 63 Bug fixed : Bad translation tag in french language file. 62 64 Improvement of unvalidated users management tab - Expired users are displayed in red color text. 63 65 … … 315 317 { 316 318 $ncsemail = strtolower($_POST['mail_address']); 317 319 $conf_nbc_MailExclusion = preg_split("/[\s,]+/",$conf_nbc_UserAdvManager[13]); 318 320 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 319 321 {
Note: See TracChangeset
for help on using the changeset viewer.