Renamed templates, more usage of EL
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jun 2011 08:09:35 +0000 (08:09 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jun 2011 08:09:35 +0000 (08:09 +0000)
19 files changed:
.gitattributes
beg.php
inc/modules/admin/what-config_autopurge.php
inc/modules/admin/what-config_beg.php
inc/modules/admin/what-config_cats.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_register2.php
inc/modules/admin/what-list_cats.php
templates/de/html/admin/admin_config_beg.tpl
templates/de/html/admin/admin_config_cats.tpl
templates/de/html/admin/admin_config_cats_row.tpl
templates/de/html/admin/admin_edit_refbanner_row.tpl
templates/de/html/admin/admin_list_cats.tpl
templates/de/html/admin/admin_list_cats_404.tpl
templates/de/html/admin/admin_list_cats_row.tpl
templates/de/html/admin/admin_list_user_cats.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_user_cats_404.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_user_cats_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_menu_status_row.tpl

index 4e793f2cf18429bfaeabb2cc06ab1d6a2733c417..dc5b4944c6dbad480465b38fdb0ac665055298f3 100644 (file)
@@ -1247,6 +1247,9 @@ templates/de/html/admin/admin_list_unconfirmed_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_unconfirmed_row_404.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_user.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_user_alpha.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_user_cats.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_user_cats_404.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_user_cats_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_user_pagenav.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_user_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_user_sort.tpl svneol=native#text/plain
diff --git a/beg.php b/beg.php
index e9e559138e952b77c901dd99c1283b930f6da3b9..9aaef503068c988d604f01297c4b3e4846758b0d 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -104,7 +104,7 @@ if (isGetRequestParameterSet('userid')) {
                        array(getUserData('userid')), __FILE__, __LINE__);
 
                // Check for last entry for userid w/o IP number
-               $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (`timeout` > (UNIX_TIMESTAMP() - {?beg_timeout?}) OR (timeout > (UNIX_TIMESTAMP() - {?beg_userid_timeout?}) AND `userid`=%s)) AND (`remote_ip`='%s' OR `sid`='%s') LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (`timeout` > (UNIX_TIMESTAMP() - {?beg_timeout?}) OR (`timeout` > (UNIX_TIMESTAMP() - {?beg_userid_timeout?}) AND `userid`=%s)) AND (`remote_ip`='%s' OR `sid`='%s') LIMIT 1",
                        array(getUserData('userid'), detectRemoteAddr(), session_id()), __FILE__, __LINE__);
 
                // Entry not found, points set and not logged in?
index 994886dea6c9834354a2bbd2ff462f72dc3cf20a..93e24239cdece47bb4e35beb80b8c81519a6f274 100644 (file)
@@ -60,14 +60,14 @@ if (isFormSent()) {
        $content['ap_notify_del_mails']   = addSelectionBox('yn', getConfig('ap_dm_notify')   , 'ap_dm_notify');
 
        // Output time selection boxes
-       $content['ap_in_since']       = createTimeSelections(getApInactiveSince()  , 'ap_inactive_since'  , 'MWDh');
-       $content['ap_in_time']        = createTimeSelections(getApInactiveTime()   , 'ap_inactive_time'   , 'MWDh');
-       $content['ap_un_time']        = createTimeSelections(getApUnconfirmedTime(), 'ap_unconfirmed_time', 'MWDh');
-       $content['ap_task_time']      = createTimeSelections(getApTasksTime()      , 'ap_tasks_time'      , 'MWDh');
-       $content['ap_del_mails_time'] = createTimeSelections(getApDmTimeout()      , 'ap_dm_timeout'      , 'MWDh');
+       $content['ap_in_since']       = createConfigurationTimeSelections('ap_inactive_since'  , 'MWDh');
+       $content['ap_in_time']        = createConfigurationTimeSelections('ap_inactive_time'   , 'MWDh');
+       $content['ap_un_time']        = createConfigurationTimeSelections('ap_unconfirmed_time', 'MWDh');
+       $content['ap_task_time']      = createConfigurationTimeSelections('ap_tasks_time'      , 'MWDh');
+       $content['ap_del_mails_time'] = createConfigurationTimeSelections('ap_dm_timeout'      , 'MWDh');
 
        // Mail confirmation links
-       $content['auto_purge'] = createTimeSelections(getAutoPurge(), 'auto_purge', 'MWD');
+       $content['auto_purge'] = createConfigurationTimeSelections('auto_purge', 'MWD');
 
        // Prepare more Y/N selections
        foreach (array('auto_purge_active') as $entry) {
index 84062756e2c508246bc9724fda9619a6cdcceb76..bc8872712f4679a0c22cc7e80d1d62709883d362 100644 (file)
@@ -56,13 +56,10 @@ if (isFormSent()) {
        setConfigEntry('beg_rallye_disable_notify', postRequestParameter('beg_rallye_disable_notify'));
 } else {
        // Prepare constants for the template
-       $content['points']           = translateComma(getBegPoints()             , false);
-       $content['points_max']       = translateComma(getBegPointsMax()          , false);
-       $content['notify_bonus']     = translateComma(getBegNotifyBonus()        , false);
-       $content['timeout']          = createTimeSelections(getBegTimeout()      , 'beg_timeout'       , 'Dhm');
-       $content['userid_timeout']   = createTimeSelections(getBegUseridTimeout(), 'beg_userid_timeout', 'Dhm');
-       $content['ip_timeout']       = createTimeSelections(getBegIpTimeout()    , 'beg_ip_timeout'    , 'Dhm');
-       $content['wait_selection']   = createTimeSelections(getBegNotifyWait()   , 'beg_notify_wait'   , 'ms' );
+       $content['timeout']          = createConfigurationTimeSelections('beg_timeout'       , 'Dhm');
+       $content['userid_timeout']   = createConfigurationTimeSelections('beg_userid_timeout', 'Dhm');
+       $content['ip_timeout']       = createConfigurationTimeSelections('beg_ip_timeout'    , 'Dhm');
+       $content['wait_selection']   = createConfigurationTimeSelections('beg_notify_wait'   , 'ms' );
 
        // Init all Y/N selections
        foreach (array('rallye', 'active', 'mode', 'rallye_enable_notify', 'rallye_disable_notify', 'new_member_notify', 'include_own') as $entry) {
index a81bf8c1d67700d7296fa1dab89b097a388f5900..4001380d4bf38856e60b2921b3e2b4998b585c1f 100644 (file)
@@ -158,14 +158,14 @@ if (isFormSent('add')) {
                        $CATS .= '<option value="' . $content['sort'] . '">' . $cat . '</option>';
 
                        // Load row template and switch color
-                       $OUT .= loadTemplate('admin_config_cats_row', true, $content);
+                       $OUT .= loadTemplate('admin_list_cats_row', true, $content);
                } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
 
                // Load main template
-               loadTemplate('admin_config_cats', false, $OUT);
+               loadTemplate('admin_list_cats', false, $OUT);
        } // END - if
 
        // Remember in array
index 84c277f5e73107fa20a51f088346fd22424739bc..ae4eaaa0f424fd4ab9069ec5e121a8e87b1ab4ba 100644 (file)
@@ -78,11 +78,11 @@ if (isFormSent()) {
        adminSaveSettingsFromPostData();
 } else {
        // Time selection boxes
-       $content['online_timeout']   = createTimeSelections(getOnlineTimeout()      , 'ip_timeout'           , 'ms');
-       $content['url_tlock']        = createTimeSelections(getUrlTlock()           , 'url_tlock'            , 'WDh');
-       $content['profile_lock']     = createTimeSelections(getProfileLock()        , 'profile_lock'         , 'WDh');
-       $content['profile_update']   = createTimeSelections(getProfileUpdate()      , 'profile_update'       , 'YM');
-       $content['profile_reupdate'] = createTimeSelections(getResendProfileUpdate(), 'resend_profile_update', 'MWD');
+       $content['online_timeout']   = createConfigurationTimeSelections('ip_timeout'           , 'ms');
+       $content['url_tlock']        = createConfigurationTimeSelections('url_tlock'            , 'WDh');
+       $content['profile_lock']     = createConfigurationTimeSelections('profile_lock'         , 'WDh');
+       $content['profile_update']   = createConfigurationTimeSelections('profile_update'       , 'YM');
+       $content['profile_reupdate'] = createConfigurationTimeSelections('resend_profile_update', 'MWD');
 
        // Prepare more Y/N selections
        foreach (array('show_points_unconfirmed','show_timings','youre_here','member_menu','guest_menu','order_multi_page','autosend_active','send_prof_update','admin_notify','display_debug_sqls','stats_enabled') as $entry) {
index 0dc37b89fcc871a577dd5a2f13713786df0dfd59..32f87c17edf19670e94ae982892ec6fe192b1085 100644 (file)
@@ -55,7 +55,7 @@ if (isFormSent()) {
 } else {
        // Remember stuff in constants
        $content['display_refid']                    = addSelectionBox('yn', getDisplayRefid()                 , 'display_refid');
-       $content['ip_timeout']                       = createTimeSelections(getIpTimeout()                     , 'ip_timeout', 'Dhm');
+       $content['ip_timeout']                       = createConfigurationTimeSelections('ip_timeout', 'Dhm');
        $content['check_double_email']               = addSelectionBox('yn', getCheckDoubleEmail()             , 'check_double_email');
        $content['register_default']                 = addSelectionBox('yn', getRegisterDefault()              , 'register_default');
        $content['register_generate_password_empty'] = addSelectionBox('yn', getRegisterGeneratePasswordEmpty(), 'register_generate_password_empty');
index d7881b9e51ed1664db7efc1c272d58c9344547ea..dc827167058904671b50385855330d347ef959f3 100644 (file)
@@ -79,7 +79,7 @@ if (isGetRequestParameterSet('userid')) {
                                $content['sel'] = $selection;
 
                                // Load row template and count up
-                               $OUT .= loadTemplate('admin_list_cats_row', true, $content);
+                               $OUT .= loadTemplate('admin_list_user_cats_row', true, $content);
                                $count++;
                        } // END - while
 
@@ -90,10 +90,10 @@ if (isGetRequestParameterSet('userid')) {
                        $content['rows'] = $OUT;
 
                        // Load main template
-                       loadTemplate('admin_list_cats', false, $content);
+                       loadTemplate('admin_list_user_cats', false, $content);
                } else {
                        // No categories selected! :-(
-                       loadTemplate('admin_list_cats_404', false, $content);
+                       loadTemplate('admin_list_user_cats_404', false, $content);
                }
        } else {
                // User not found
index d7957cad00cf5faf0612553dc5b4325e620c4fbc..638390d3bb1f759e6ecf3664e45e3b174762ffe5 100644 (file)
@@ -11,7 +11,7 @@
                        {--ADMIN_BEG_POINTS--}:
                </td>
                <td width="295" align="center">
-                       <input type="text" class="form_field" name="beg_points" size="7" maxlength="10" value="{?beg_points?}" />
+                       <input type="text" class="form_field" name="beg_points" size="7" maxlength="10" value="{%config,translateComma=beg_points%}" />
                </td>
        </tr>
        <tr>
@@ -19,7 +19,7 @@
                        {--ADMIN_BEG_POINTS_MAX--}:
                </td>
                <td width="195" align="center">
-                       <input type="text" class="form_field" name="beg_points_max" size="7" maxlength="10" value="{?beg_points_max?}" />
+                       <input type="text" class="form_field" name="beg_points_max" size="7" maxlength="10" value="{%config,translateComma=beg_points_max%}" />
                </td>
        </tr>
        <tr>
                        {--ADMIN_BEG_NOTIFY_BONUS--}
                </td>
                <td align="center">
-                       <input type="text" class="form_field" name="beg_notify_bonus" size="3" maxlength="7" value="{?beg_notify_bonus?}" />
+                       <input type="text" class="form_field" name="beg_notify_bonus" size="3" maxlength="7" value="{%config,translateComma=beg_notify_bonus%}" />
                </td>
        </tr>
        <tr>
index 24b68aab1565a2de0b8ef045700f4e694d529495..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,25 +1 @@
-<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&amp;what=config_cats%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <tr>
-               <td align="center" colspan="4" class="table_header bottom">
-                       <strong>{--ADMIN_CONFIG_CATEGORIES_TITLE--}</strong>
-               </td>
-       </tr>
-       <tr>
-               <td class="header_column bottom right" align="center"><strong>{--ID_SELECT--}</strong></td>
-               <td class="header_column bottom right" align="center"><strong>{--CATEGORY_NAME--}</strong></td>
-               <td class="header_column bottom right" align="center"><strong>{--ADMIN_IS_VISIBLE--}</strong></td>
-               <td class="header_column bottom" align="center"><strong>{--SORTING_KEY--}</strong></td>
-       </tr>
-       $content
-       <tr>
-               <td class="table_footer" colspan="4">
-                       <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
-                       <input type="submit" class="form_submit" name="edit" value="{--ADMIN_EDIT_CATEGORIES--}" />
-                       <input type="submit" class="form_delete" name="delete" value="{--ADMIN_DELETE_CATEGORIES--}" />
-               </td>
-       </tr>
-</table>
-</form>
-</div>
+<!-- @DEPRECATED //-->
index 211ba4e7566133fa7b25c3d077f32c524595f273..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,14 +1 @@
-<tr>
-       <td align="center" class="bottom right {%template,ColorSwitch%}">
-               <input type="checkbox" class="form_field" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" />
-       </td>
-       <td class="bottom right {%template,ColorSwitch%}">
-               {%pipe,getCategory=$content[id]%}
-       </td>
-       <td align="center" class="bottom right {%template,ColorSwitch%}">
-               {%pipe,translateComma=$content[visible]%}
-       </td>
-       <td align="center" class="bottom {%template,ColorSwitch%}">
-               $content[sort]
-       </td>
-</tr>
+<!-- @DEPRECATED //-->
index 80015df6c56cdaf2b82332bd52c11135748486b1..d822520433b29e1050a35881bff0851459019c10 100644 (file)
@@ -13,5 +13,7 @@
 </tr>
 <tr>
        <td class="{%template,ColorSwitch%} bottom" align="right">{--ADMIN_SELECT_REFERAL_BANNER_ACTIVE--}:</td>
-       <td class="{%template,ColorSwitch%} bottom">$content[visible]</td>
+       <td class="{%template,ColorSwitch%} bottom">
+               $content[visible]
+       </td>
 </tr>
index 52e6650b0bf816e46e0532fa71091c413fc1d6dd..24b68aab1565a2de0b8ef045700f4e694d529495 100644 (file)
@@ -1,21 +1,25 @@
 <div align="center">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&amp;what=config_cats%}" method="post">
 <table border="0" cellspacing="0" cellpadding="0" class="table dashed">
        <tr>
-               <td colspan="3" align="center" class="table_header bottom" height="50">
-                       {--USER_ID--}: <strong><a href="{%url=modules.php?module=admin&amp;what=list_user&amp;userid=$content[userid]%}">$content[userid]</a></strong>
-                       ($content[email])
+               <td align="center" colspan="4" class="table_header bottom">
+                       <strong>{--ADMIN_CONFIG_CATEGORIES_TITLE--}</strong>
                </td>
        </tr>
-       $content[rows]
        <tr>
-               <td colspan="3" class="table_footer">
-                       <div>
-                               <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u>
-                       </div>
-                       <div>
-                               {%pipe,generateMemberAdminActionLinks=$content[userid]%}
-                       </div>
+               <td class="header_column bottom right" align="center"><strong>{--ID_SELECT--}</strong></td>
+               <td class="header_column bottom right" align="center"><strong>{--CATEGORY_NAME--}</strong></td>
+               <td class="header_column bottom right" align="center"><strong>{--ADMIN_IS_VISIBLE--}</strong></td>
+               <td class="header_column bottom" align="center"><strong>{--SORTING_KEY--}</strong></td>
+       </tr>
+       $content
+       <tr>
+               <td class="table_footer" colspan="4">
+                       <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
+                       <input type="submit" class="form_submit" name="edit" value="{--ADMIN_EDIT_CATEGORIES--}" />
+                       <input type="submit" class="form_delete" name="delete" value="{--ADMIN_DELETE_CATEGORIES--}" />
                </td>
        </tr>
 </table>
+</form>
 </div>
index 66c6b97b69f10b7be52c9c3797c826cc3da67624..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,15 +1 @@
-<div align="center">
-<div class="table dashed">
-       <div class="table_header bottom">
-               <strong>{--ADMIN_MEMBER_NO_CATEGORIES_1--}<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;userid=$content[userid]%}">$content[userid]</a>{--ADMIN_MEMBER_NO_CATEGORIES_2--}</strong>
-       </div>
-       <div class="table_header">
-               <div>
-                       <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u>
-               </div>
-               <div>
-                       {%pipe,generateMemberAdminActionLinks=$content[userid]%}
-               </div>
-       </div>
-</div>
-</div>
+<!-- @DEPRECATED //-->
index 6f9a7cb40f8eb63b9bb4cf1f4d1e6b7feb08f9d5..8f17ff13ef34f520272af7eb5a752efec18e6885 100644 (file)
@@ -1,11 +1,14 @@
 <tr>
-       <td class="bottom {%template,ColorSwitch%}" width="30" align="right">
-               $content[cnt].
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               <input type="checkbox" class="form_field" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" />
        </td>
-       <td class="bottom {%template,ColorSwitch%}">
-               $content[cat]
+       <td class="bottom right {%template,ColorSwitch%}">
+               {%pipe,getCategory=$content[id]%}
        </td>
-       <td class="bottom {%template,ColorSwitch%} left" width="50" align="center">
-               $content[sel]
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               {%pipe,translateYesNo=$content[visible]%}
+       </td>
+       <td align="center" class="bottom {%template,ColorSwitch%}">
+               $content[sort]
        </td>
 </tr>
diff --git a/templates/de/html/admin/admin_list_user_cats.tpl b/templates/de/html/admin/admin_list_user_cats.tpl
new file mode 100644 (file)
index 0000000..52e6650
--- /dev/null
@@ -0,0 +1,21 @@
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <tr>
+               <td colspan="3" align="center" class="table_header bottom" height="50">
+                       {--USER_ID--}: <strong><a href="{%url=modules.php?module=admin&amp;what=list_user&amp;userid=$content[userid]%}">$content[userid]</a></strong>
+                       ($content[email])
+               </td>
+       </tr>
+       $content[rows]
+       <tr>
+               <td colspan="3" class="table_footer">
+                       <div>
+                               <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u>
+                       </div>
+                       <div>
+                               {%pipe,generateMemberAdminActionLinks=$content[userid]%}
+                       </div>
+               </td>
+       </tr>
+</table>
+</div>
diff --git a/templates/de/html/admin/admin_list_user_cats_404.tpl b/templates/de/html/admin/admin_list_user_cats_404.tpl
new file mode 100644 (file)
index 0000000..66c6b97
--- /dev/null
@@ -0,0 +1,15 @@
+<div align="center">
+<div class="table dashed">
+       <div class="table_header bottom">
+               <strong>{--ADMIN_MEMBER_NO_CATEGORIES_1--}<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;userid=$content[userid]%}">$content[userid]</a>{--ADMIN_MEMBER_NO_CATEGORIES_2--}</strong>
+       </div>
+       <div class="table_header">
+               <div>
+                       <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u>
+               </div>
+               <div>
+                       {%pipe,generateMemberAdminActionLinks=$content[userid]%}
+               </div>
+       </div>
+</div>
+</div>
diff --git a/templates/de/html/admin/admin_list_user_cats_row.tpl b/templates/de/html/admin/admin_list_user_cats_row.tpl
new file mode 100644 (file)
index 0000000..6f9a7cb
--- /dev/null
@@ -0,0 +1,11 @@
+<tr>
+       <td class="bottom {%template,ColorSwitch%}" width="30" align="right">
+               $content[cnt].
+       </td>
+       <td class="bottom {%template,ColorSwitch%}">
+               $content[cat]
+       </td>
+       <td class="bottom {%template,ColorSwitch%} left" width="50" align="center">
+               $content[sel]
+       </td>
+</tr>
index ad2aaf11d22f911f6d1c8e2e08b98131756c1f46..8397481a2968a627a96248ed5d65683a163c9365 100644 (file)
@@ -9,7 +9,7 @@
        <td width="25%" class="{%template,ColorSwitch%} bottom">
                {--ADMIN_IS_VISIBLE--}:
                $content[visible]
-               </td>
+       </td>
        <td width="25%" class="{%template,ColorSwitch%} bottom">
                {--ADMIN_MENU_IS_LOCKED--}:
                $content[locked]