Changeset 1506 in ExiteCMS
- Timestamp:
- 07/02/08 17:27:46 (4 years ago)
- Location:
- modules/common/download_statistics/php-files/modules/download_statistics
- Files:
-
- 5 edited
-
admin.php (modified) (3 diffs)
-
download_statistics.side_panel.php (modified) (1 diff)
-
module_installer.php (modified) (5 diffs)
-
templates/modules.download_statistics.admin.tpl (modified) (1 diff)
-
templates/modules.download_statistics.side_panel.tpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/common/download_statistics/php-files/modules/download_statistics/admin.php
r1481 r1506 137 137 } 138 138 } 139 $title = stripinput($_POST['dlstats_title']); 139 140 $remote = IsNum($_POST['dlstats_remote']) ? $_POST['dlstats_remote'] : 0; 140 141 $google_key = stripinput($_POST['dlstats_google_api_key']); … … 147 148 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$remote."' WHERE cfg_name = 'dlstats_remote'"); 148 149 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$google_key."' WHERE cfg_name = 'dlstats_google_api_key'"); 150 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$title."' WHERE cfg_name = 'dlstats_title'"); 149 151 redirect(FUSION_SELF.$aidlink."&status=cs"); 150 152 exit; … … 161 163 $settings2['dlstats_remote'] = $remote; 162 164 $settings2['dlstats_google_api_key'] = $google_key; 165 $settings2['dlstats_title'] = $title; 163 166 } 164 167 // reset the action switch to return to the default action -
modules/common/download_statistics/php-files/modules/download_statistics/download_statistics.side_panel.php
r1464 r1506 30 30 // check if we need to get a local download counter 31 31 if ($data['dlsc_download_id']) { 32 $result2 = dbquery("SELECT * FROM ".$db_prefix."downloads WHEREdownload_id = '".$data['dlsc_download_id']."'");32 $result2 = dbquery("SELECT d.*, c.download_cat_access FROM ".$db_prefix."downloads d LEFT JOIN ".$db_prefix."download_cats c ON d.download_cat = c.download_cat_id WHERE d.download_id = '".$data['dlsc_download_id']."'"); 33 33 if ($data2 = dbarray($result2)) { 34 // get the counter and the download category (needed to create a link) 35 $data['download_cat'] = $data2['download_cat']; 36 $data['count'] = $data2['download_count']; 34 // check if the user has access to it 35 if (checkgroup($data2['download_cat_access'])) { 36 // get the counter and the download category (needed to create a link) 37 $data['download_cat'] = $data2['download_cat']; 38 $data['count'] = $data2['download_count']; 39 } 37 40 } 38 41 } -
modules/common/download_statistics/php-files/modules/download_statistics/module_installer.php
r1499 r1506 17 17 $mod_title = "Download Statistics"; 18 18 $mod_description = "Gather and display download statistics from download mirror logs. includes a Google Map with downloaders per country"; 19 $mod_version = "1. 0.8";19 $mod_version = "1.1.1"; 20 20 $mod_developer = "WanWizard"; 21 21 $mod_email = "wanwizard@gmail.com"; … … 94 94 $localestrings['en']['dls511'] = "Google Maps API key:"; 95 95 $localestrings['en']['dls512'] = "Click <a href='http://code.google.com/apis/maps/signup.html' target='_blank'>here</a> to sign up for a key."; 96 $localestrings['en']['dls513'] = "Download Statistics Panel Title"; 97 $localestrings['en']['dls514'] = "Used as title of the statistics panel. You can use %s as a placeholder for the total download count"; 96 98 // Statistics counter panel 97 99 $localestrings['en']['dls600'] = "Download Statistics Panel"; … … 163 165 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##configuration (cfg_name, cfg_value) VALUES ('dlstats_remote', '0')"); 164 166 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##configuration (cfg_name, cfg_value) VALUES ('dlstats_google_api_key', '')"); 167 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##configuration (cfg_name, cfg_value) VALUES ('dlstats_title', '')"); 165 168 166 169 // Geomap information table … … 229 232 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'dlstats_remote'"); 230 233 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'dlstats_google_api_key'"); 234 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'dlstats_title'"); 231 235 232 236 // delete the tables … … 262 266 263 267 switch ($current_version) { 264 case "1.0.0": // current release version 268 case "1.1.0": 269 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('dlstats_title', '')"); 270 271 case "1.1.1": // current release version 272 265 273 } 266 274 } -
modules/common/download_statistics/php-files/modules/download_statistics/templates/modules.download_statistics.admin.tpl
r1481 r1506 141 141 </tr> 142 142 <tr> 143 <td class='tbl' valign='top'> 144 {$locale.dls513} 145 </td> 146 <td class='tbl'> 147 <input type='text' name='dlstats_title' value='{$settings2.dlstats_title}' maxlength='50' class='textbox' style='width:300px;' /> 148 <br /> 149 <span class='small2'>{$locale.dls514}</span> 150 </td> 151 </tr> 152 <tr> 143 153 <td class='tbl' style='vertical-align:top;width:250px;'> 144 154 {$locale.dls508} -
modules/common/download_statistics/php-files/modules/download_statistics/templates/modules.download_statistics.side_panel.tpl
r1464 r1506 18 18 {section name=bar loop=$counters} 19 19 {if $smarty.section.bar.first} 20 {include file="_openside_x.tpl" name=$_name title=$_title |cat:" ("|cat:$total|cat:")"state=$_state style=$_style}20 {include file="_openside_x.tpl" name=$_name title=$_title state=$_state style=$_style} 21 21 <table cellpadding='0' cellspacing='0'> 22 22 {/if} … … 36 36 </tr> 37 37 {if $smarty.section.bar.last} 38 {if $settings.dlstats_title != "" || true} 39 <td colspan='2' align='center'> 40 {ssprintf format=$settings.dlstats_title|replace:"|":"<br />" var1=$total} 41 </td> 42 {/if} 38 43 </table> 39 44 {include file="_closeside_x.tpl"}
Note: See TracChangeset
for help on using the changeset viewer.
