Ignore:
Timestamp:
Sep 5, 2009, 11:37:48 PM (11 years ago)
Author:
Eric
Message:
  • Code cleaning : Deletion of old commented parts, PHP 5.3 improvement, HTML compliant for tpl files
  • Implementing a monitoring system for using the mail() function (spy log file)
  • Finalization of listing table of unvalidated registered
  • Preview of upcoming features (coding of management panel)
Location:
extensions/NBC_UserAdvManager/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php

    r3742 r3826  
    329329        {
    330330          global $conf, $page;
    331  
    332           $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array(); 
     331         
     332                /* Get ConfirmMail configuration */
     333          $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array();
     334         
     335                /* Get UserAdvManager configuration */
     336                  $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 
    333337 
    334338          $users = array();
    335339   
    336 /* search users depending on filters and order */
    337 //TODO:Adding condition in request [if user in USER_CONFIRM_MAIL_TABLE]
     340/* search users depending expiration date */
    338341          $query = '
    339342            SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
     
    344347                            ui.enabled_high,
    345348                            ui.level,
    346                             ui.registration_date
     349                            ui.registration_date,
     350                            ug.group_id
    347351            FROM '.USERS_TABLE.' AS u
    348             INNER JOIN '.USER_INFOS_TABLE.' AS ui
    349               ON u.'.$conf['user_fields']['id'].' = ui.user_id
    350             LEFT JOIN '.USER_GROUP_TABLE.' AS ug
    351               ON u.'.$conf['user_fields']['id'].' = ug.user_id
    352             WHERE u.'.$conf['user_fields']['id'].' > 0
    353             AND TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= '.$conf_nbc_UserAdvManager_ConfirmMail[1].'
    354             ORDER BY id ASC
     352                INNER JOIN '.USER_INFOS_TABLE.' AS ui
     353                        ON u.'.$conf['user_fields']['id'].' = ui.user_id
     354                INNER JOIN '.USER_GROUP_TABLE.' AS ug
     355                        ON u.'.$conf['user_fields']['id'].' = ug.user_id
     356                WHERE u.'.$conf['user_fields']['id'].' >= 0
     357                                AND ug.group_id = "'.$conf_nbc_UserAdvManager[3].'"
     358                        AND TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) <= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'"
     359                        ORDER BY id ASC
    355360          ;';
    356361
  • extensions/NBC_UserAdvManager/trunk/admin/confirmmail.tpl

    r3742 r3826  
    1010        <legend>{'ConfirmMail_Title'|@translate}</legend>
    1111    <ul>
    12         <li><label>{'UserAdvManager_ConfirmMail_Info'|@translate}</label><br/>
    13         <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_TIMEOUT_TRUE} name="UserAdvManager_ConfirmMail_TimeOut"/> {'UserAdvManager_ConfirmMail_TimeOut_true'|@translate}<br/>
    14         <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_TIMEOUT_FALSE} name="UserAdvManager_ConfirmMail_TimeOut"/> {'UserAdvManager_ConfirmMail_TimeOut_false'|@translate}<br/>
     12        <li><label>{'UserAdvManager_ConfirmMail_Info'|@translate}</label><br>
     13        <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_TIMEOUT_TRUE} name="UserAdvManager_ConfirmMail_TimeOut"/> {'UserAdvManager_ConfirmMail_TimeOut_true'|@translate}<br>
     14        <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_TIMEOUT_FALSE} name="UserAdvManager_ConfirmMail_TimeOut"/> {'UserAdvManager_ConfirmMail_TimeOut_false'|@translate}<br>
    1515        </li>
    16       <br/>
    17                 <li><label>{'UserAdvManager_ConfirmMail_Delay_Info'|@translate}</label><input type="text" name="UserAdvManager_ConfirmMail_Delay" value="{$UserAdvManager_CONFIRMMAIL_DELAY}" size="5" style="text-align: center;"/><br/>
     16      <br>
     17                <li><label>{'UserAdvManager_ConfirmMail_Delay_Info'|@translate}</label><input type="text" name="UserAdvManager_ConfirmMail_Delay" value="{$UserAdvManager_CONFIRMMAIL_DELAY}" size="5" style="text-align: center;"/><br>
    1818            </li>
    19             <!--TODO:Adding new option [Auto_Deletion : True | False]-->
    20             <!--TODO:Adding new option [Resend_new_validation_key : True | False]-->
    21       <br/>
     19      <br>
     20                <li><label>{'UserAdvManager_ConfirmMail_AutoDel'|@translate}</label><br>
     21        <input type="radio" value="true" {$UserAdvManager_CONFIRMMAIL_AUTODEL_TRUE} name="UserAdvManager_ConfirmMail_AutoDel"/> {'UserAdvManager_ConfirmMail_AutoDel_true'|@translate}<br>
     22        <input type="radio" value="false" {$UserAdvManager_CONFIRMMAIL_AUTODEL_FALSE} name="UserAdvManager_ConfirmMail_AutoDel"/> {'UserAdvManager_ConfirmMail_AutoDel_false'|@translate}<br>
     23            </li>
     24      <br>
     25                <li><label>{'UserAdvManager_ConfirmMail_ReMail_Txt'|@translate}</label><br>
     26                <textarea name="UserAdvManager_ConfirmMail_ReMail_Txt" id="UserAdvManager_ConfirmMail_ReMail_Txt" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_CONFIRMMAIL_REMAIL_TXT}</textarea>
     27            </li>
     28      <br>
    2229    </ul>
    23         <div align="center"><input class="submit" type="submit" value="{'submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED} /></div>
     30        <p><input class="submit" type="submit" value="{'submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED} /></p>
     31      <br><hr><br>
    2432    <ul>
    25       <br/>
     33                <li><label>{'UserAdvManager_ConfirmMail_User_List'|@translate}</label><br>
     34            </li>
     35      <br>
    2636                <table class="table2" width="97%">
    2737                        <thead>
     
    3242                        <td>{'Email address'|@translate}</td>
    3343                        <td>{'Groups'|@translate}</td>
    34                         <td>{'UserAdvManager_Indiv_Suppr'|@translate}</td>
     44                        <!--<td>{'UserAdvManager_Indiv_Suppr'|@translate}</td>-->
    3545                        </tr>
    3646                        </thead>
     
    4757                        <td>{$data}</td>
    4858                {/foreach}
    49                         <td style="text-align:center;">
    50                         <!--TODO:Changing ACTION to Single_Deletion-->
    51                         <a href="{$user.U_ACTION}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" class="button" style="border:none" alt="{'Profile'|@translate}" title="{'Profile'|@translate}" /></a>
    52                         </td>
     59                                <!--Unaffected column - Can be used in the future -->
     60                        <!--<td style="text-align:center;">-->
     61                        <!--<a href="{$user.U_ACTION}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" class="button" style="border:none" alt="{'Profile'|@translate}" title="{'Profile'|@translate}" /></a>-->
     62                        <!--</td>-->
    5363                        </tr>
    5464                {/foreach}
     
    5666        <br/>
    5767    </ul>
    58         <div align="center"><input class="submit" type="submit" value="{'audit'|@translate}" name="audit" /> <input class="submit" type="submit" value="{'submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED} /></div>
     68
     69<p>
     70  {'target'|@translate}
     71  <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label>
     72  <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label>
     73</p>
     74
     75<p>
     76  <input class="submit" type="reset" value="{'Reset'|@translate}" name="pref_reset" />
     77  <input class="submit" type="submit" value="{'submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED} />
     78</p>
    5979  </fieldset>
    6080</form>
Note: See TracChangeset for help on using the changeset viewer.