Changeset 1068 in ExiteCMS


Ignore:
Timestamp:
11/06/07 00:40:02 (4 years ago)
Author:
hverton
Message:

Added the Webmaster Toolbox admin module
Fixed XHTML errors in the opentable/openside templates
Fixed XHTML in the admin index module
Fixed a query error in the members module (didn't filter suspended account when using a letter or country filter)
Converted the GeoIP update script to a Toolbox plugin

Location:
trunk
Files:
7 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/index.php

    r1020 r1068  
    8989$variables['statistics']['members_registered'] = dbcount("(user_id)", "users", "user_status<='1'"); 
    9090$variables['statistics']['members_unactive'] = dbcount("(user_id)", "users", "user_status='2'"); 
    91 $variables['statistics']['members_banned'] = dbcount("(user_id)", "users", "user_status='1'"); 
     91$variables['statistics']['members_suspended'] = dbcount("(user_id)", "users", "user_status='1'"); 
    9292$variables['statistics']['messages_unread'] = dbcount("(post_id)", "posts_unread"); 
    9393$variables['statistics']['comments'] = dbcount("(comment_id)", "comments"); 
  • trunk/includes/core_functions.php

    r957 r1068  
    197197if (isset($_SERVER['SERVER_SOFTWARE'])) { 
    198198    // Common definitions - CGI mode 
     199    define("CMS_CLI", false); 
    199200    $_SERVER['QUERY_STRING'] = isset($_SERVER['QUERY_STRING']) ? cleanurl($_SERVER['QUERY_STRING']) : ""; 
    200201    $_SERVER['REQUEST_URI'] = isset($_SERVER['REQUEST_URI']) ? cleanurl($_SERVER['REQUEST_URI']) : ""; 
     
    208209} else { 
    209210    // Common definitions - CLI mode 
     211    define("CMS_CLI", true); 
    210212    define("USER_IP", '0.0.0.0'); 
    211213} 
  • trunk/includes/templates/admin.index.tpl

    r1015 r1068  
    1717{***************************************************************************} 
    1818{include file="_opentable.tpl" name=$_name title="ExiteCMS v."|cat:$settings.version|cat:" &bull; "|cat:" SVN Revision "|cat:$settings.revision|cat:" &bull; "|cat:$locale.200|cat:" <b>"|cat:$settings.sitename|cat:"</b>"  state=$_state style=$_style} 
     19{assign var='cols' value='0'} 
    1920<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'> 
    2021    <tr> 
    2122        {if $adminpage1|default:0 != 0} 
     23            {assign var='cols' value=$cols+1} 
    2224            <td align='center' width='20%' class='{if $pagenum == 1}tbl1{else}tbl2{/if}'> 
    2325                <span class='small'> 
     
    2729        {/if} 
    2830        {if $adminpage2|default:0 != 0} 
     31            {assign var='cols' value=$cols+1} 
    2932            <td align='center' width='20%' class='{if $pagenum == 2}tbl1{else}tbl2{/if}'> 
    3033                <span class='small'> 
     
    3437        {/if} 
    3538        {if $adminpage3|default:0 != 0} 
     39            {assign var='cols' value=$cols+1} 
    3640            <td align='center' width='20%' class='{if $pagenum == 3}tbl1{else}tbl2{/if}'> 
    3741                <span class='small'> 
     
    4145        {/if} 
    4246        {if $adminpage4|default:0 != 0} 
     47            {assign var='cols' value=$cols+1} 
    4348            <td align='center' width='20%' class='{if $pagenum == 4}tbl1{else}tbl2{/if}'> 
    4449                <span class='small'> 
     
    4954    </tr> 
    5055    <tr> 
    51         <td colspan='4' class='tbl1'> 
     56        <td colspan='{$cols}' class='tbl1'> 
    5257            {counter start=1 print=false assign='column'} 
    5358            <table cellpadding='0' cellspacing='0' width='100%'> 
     
    8590            {$locale.251} {$statistics.members_registered}<br /> 
    8691            {$locale.252} {$statistics.members_unactive}<br /> 
    87             {$locale.253} {$statistics.members_banned}<br /> 
     92            {$locale.253} {$statistics.members_suspended}<br /> 
    8893        </td> 
    8994        <td valign='top' width='33%' class='small'> 
  • trunk/includes/theme_functions.php

    r1060 r1068  
    258258                $td = $template->template_dir; 
    259259                $template->template_dir = array_merge(array(PATH_MODULES.$tpl_parts[1].'/templates'), $template->template_dir); 
     260            } else { 
     261                // we shouldn't get here 
     262            } 
     263         
     264            //if this is a tools template... 
     265            $tpl_parts = explode(".", $panel['template']); 
     266            if ($tpl_parts[0] == "tools") { 
     267                // store the current template directories, we need to restore them later 
     268                $td = $template->template_dir; 
     269                $template->template_dir = array_merge(array(PATH_ADMIN.'tools/templates'), $template->template_dir); 
    260270            } else { 
    261271                // we shouldn't get here 
     
    400410function theme_cleanup() { 
    401411 
    402     global $db_prefix, $userdata, $_db_logs, $template; 
     412    global $db_prefix, $userdata, $_db_logs, $template, $settings; 
    403413 
    404414    // clean-up tasks, will be executed by all admins and super-admins 
     
    416426        // unread posts indicators: set to 30 days 
    417427        $result = dbquery("DELETE FROM ".$db_prefix."posts_unread WHERE post_time < '".(time() - $day * 30)."'", false); 
    418         // deactivate accounts with a bad email address after 90 days 
    419         $result = dbquery("UPDATE ".$db_prefix."users SET user_status = 1, user_ban_reason = '', user_ban_expire = '".time()."' WHERE user_bad_email > 0 AND user_bad_email < '".(time() - $day * 90)."'"); 
     428        // deactivate accounts with a bad email address after 90 days (available since v7.0 rev.1060) 
     429        if ($settings['revision'] >= 1060) { 
     430            $result = dbquery("UPDATE ".$db_prefix."users SET user_status = 1, user_ban_reason = '', user_ban_expire = '".time()."' WHERE user_bad_email > 0 AND user_bad_email < '".(time() - $day * 90)."'"); 
     431        } 
    420432    } 
    421433     
  • trunk/locale/English/admin/main.php

    r831 r1068  
    3838$locale['235'] = "News Categories"; 
    3939$locale['236'] = "Language Settings"; 
     40$locale['237'] = "Webmaster Toolbox for"; 
    4041// Website Statistics 
    4142$locale['250'] = "Website Statistics"; 
    4243$locale['251'] = "Registered Members:"; 
    4344$locale['252'] = "Unactivated Members:"; 
    44 $locale['253'] = "Banned Members:"; 
    45 $locale['254'] = "x"; 
     45$locale['253'] = "Suspended Members:"; 
    4646$locale['255'] = "x"; 
    4747$locale['256'] = "x"; 
  • trunk/locale/English/setup.php

    r960 r1068  
    5858$locale['471'] = "Images"; 
    5959$locale['472'] = "Modules & Plugins"; 
    60 $locale['473'] = "Infusion Panels"; 
     60$locale['473'] = "x"; 
    6161$locale['474'] = "Members"; 
    6262$locale['475'] = "News"; 
    6363$locale['476'] = "Panels"; 
    64 $locale['477'] = "Photo Albums"; 
     64$locale['477'] = "x"; 
    6565$locale['478'] = "PHP Info"; 
    6666$locale['479'] = "Polls"; 
    67 $locale['480'] = "Shoutbox"; 
     67$locale['480'] = "x"; 
    6868$locale['481'] = "Menu System"; 
    69 $locale['482'] = "Submissions"; 
     69$locale['482'] = "x"; 
    7070$locale['483'] = "Upgrade"; 
    7171$locale['484'] = "User Groups"; 
    72 $locale['485'] = "Web Link Categories"; 
    73 $locale['486'] = "Web Links"; 
     72$locale['485'] = "x"; 
     73$locale['486'] = "x"; 
    7474$locale['487'] = "Main Settings"; 
    7575$locale['488'] = "Time and Date Settings"; 
    7676$locale['489'] = "Forum Settings"; 
    7777$locale['490'] = "Registration Settings"; 
    78 $locale['491'] = "Photo Gallery Settings"; 
     78$locale['491'] = "x"; 
    7979$locale['492'] = "Miscellaneous Settings"; 
    8080$locale['493'] = "Private Message Settings"; 
    8181$locale['494'] = "News Categories"; 
    82 $locale['495'] = "Forum Polls"; 
     82$locale['495'] = "Webmaster Toolbox"; 
    8383$locale['496'] = "URL Redirects"; 
    84 $locale['497'] = "Newsletters"; 
    85 $locale['498'] = "Advertising"; 
    86 $locale['499'] = "Virtual Website"; 
    8784// Step 2 - Navigation Links 
    8885$locale['500'] = "Home"; 
  • trunk/members.php

    r1060 r1068  
    4545    } else { 
    4646        if ($country == "") { 
    47             $filter .= " AND user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'"; 
     47            $filter .= " AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
    4848        } else { 
    49             $filter .= " AND user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
     49            $filter .= " AND (user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'))"; 
    5050        } 
    5151    } 
  • trunk/setup.php

    r1009 r1068  
    330330            $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S8', 'settings_lang.gif', '".$locale['459']."', 'settings_languages.php', 3)"); 
    331331            $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('SL', 'site_links.gif', '".$locale['481']."', 'site_links.php', 3)"); 
     332            $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('T',  'tools.gif', '".$locale['495']."', 'tools.php', 3)"); 
    332333            $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('U',  'upgrade.gif', '".$locale['483']."', 'upgrade.php', 3)"); 
    333334            $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('UG', 'user_groups.gif', '".$locale['484']."', 'user_groups.php', 2)"); 
  • trunk/themes/ExiteCMS/templates/templates/_openside_x.tpl

    r934 r1068  
    2727                    <td class='sub-cap-main'> 
    2828                        <div style='display:inline; position:relative; float:right;margin-top:2px;'> 
    29                             <img src='{$smarty.const.THEME}images/panel_{if $_state == 1}on{else}off{/if}.gif' name='b_{$_name}' onclick="javascript:flipBox('{$_name}')" /> 
     29                            <img src='{$smarty.const.THEME}images/panel_{if $_state == 1}on{else}off{/if}.gif' alt='' name='b_{$_name}' onclick="javascript:flipBox('{$_name}')" /> 
    3030                        </div> 
    3131                        {$title|default:"&nbsp;"} 
  • trunk/themes/ExiteCMS/templates/templates/_opentable_x.tpl

    r934 r1068  
    2626                    <td class='cap-main'> 
    2727                        <div style='display:inline; position:relative; float:right;margin-top:2px;'> 
    28                             <img src='{$smarty.const.THEME}images/panel_{if $_state == 1}on{else}off{/if}.gif' name='b_{$_name}' onclick="javascript:flipBox('{$_name}')" /> 
     28                            <img src='{$smarty.const.THEME}images/panel_{if $_state == 1}on{else}off{/if}.gif' name='b_{$_name}' alt='' onclick="javascript:flipBox('{$_name}')" /> 
    2929                        </div> 
    3030                        {$title|default:"&nbsp;"} 
Note: See TracChangeset for help on using the changeset viewer.