Changeset 1530 in ExiteCMS
- Timestamp:
- 07/08/08 18:10:05 (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
-
administration/downloads.php (modified) (5 diffs)
-
administration/tools/language_pack_English.php (modified) (1 diff)
-
administration/tools/language_pack_Nederlands.php (modified) (1 diff)
-
administration/upgrade/rev01530.php (added)
-
downloads.php (modified) (1 diff)
-
files/locales/en.main.global.php (modified) (1 diff)
-
includes/templates/admin.downloads.tpl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/downloads.php
r1159 r1530 133 133 $download_description = addslash($_POST['download_description']); 134 134 $download_url = stripinput($_POST['download_url']); 135 $download_external = (isset($_POST['download_external']) && isNum($_POST['download_external'])) ? $_POST['download_external'] : 0; 135 136 $download_license = stripinput($_POST['download_license']); 136 137 $download_os = stripinput($_POST['download_os']); … … 139 140 if ($step == "edit") { 140 141 $download_datestamp = isset($_POST['update_datestamp']) ? ", download_datestamp='".time()."'" : ""; 141 $result = dbquery("UPDATE ".$db_prefix."downloads SET download_title='$download_title', download_description='$download_description', download_url='$download_url', download_cat='$download_cat', download_license='$download_license', download_os='$download_os', download_version='$download_version', download_filesize='$download_filesize'".$download_datestamp." WHERE download_id='$download_id'");142 $result = dbquery("UPDATE ".$db_prefix."downloads SET download_title='$download_title', download_description='$download_description', download_url='$download_url', download_cat='$download_cat', download_license='$download_license', download_os='$download_os', download_version='$download_version', download_filesize='$download_filesize'".$download_datestamp.",download_external='".$download_external."' WHERE download_id='$download_id'"); 142 143 redirect(FUSION_SELF.$aidlink."&download_cat_id=$download_cat&cat_locale=$cat_locale"); 143 144 } else { 144 $result = dbquery("INSERT INTO ".$db_prefix."downloads (download_title, download_description, download_url, download_cat, download_license, download_os, download_version, download_filesize, download_datestamp, download_count ) VALUES ('$download_title', '$download_description', '$download_url', '$download_cat', '$download_license', '$download_os', '$download_version', '$download_filesize', '".time()."', '0')");145 $result = dbquery("INSERT INTO ".$db_prefix."downloads (download_title, download_description, download_url, download_cat, download_license, download_os, download_version, download_filesize, download_datestamp, download_count, download_external) VALUES ('$download_title', '$download_description', '$download_url', '$download_cat', '$download_license', '$download_os', '$download_version', '$download_filesize', '".time()."', '0', '$download_external')"); 145 146 redirect(FUSION_SELF.$aidlink."&download_cat_id=$download_cat&cat_locale=$cat_locale"); 146 147 } … … 156 157 $download_version = $data['download_version']; 157 158 $download_filesize = $data['download_filesize']; 159 $download_external = $data['download_external']; 158 160 $formaction = FUSION_SELF.$aidlink."&step=edit&download_cat_id=$download_cat_id&download_id=$download_id"; 159 161 $title = $locale['470']; … … 166 168 $download_version = ""; 167 169 $download_filesize = ""; 170 $download_external = 0; 168 171 $formaction = FUSION_SELF.$aidlink; 169 172 $title = $locale['471']; … … 223 226 $variables['download_version'] = $download_version; 224 227 $variables['download_filesize'] = $download_filesize; 228 $variables['download_external'] = $download_external; 225 229 226 230 } else { -
trunk/administration/tools/language_pack_English.php
r1527 r1530 234 234 $localestrings['489'] = "Update Publication Date"; 235 235 $localestrings['490'] = "Attention! All downloads in '%s' are publicly accessable!"; 236 $localestrings['491'] = "Count download externally:"; 237 $localestrings['492'] = "Yes"; 238 $localestrings['493'] = "No"; 236 239 $localestrings['500'] = "Current Downloads"; 237 240 $localestrings['501'] = "Download Item [Click to Test]"; -
trunk/administration/tools/language_pack_Nederlands.php
r1527 r1530 234 234 $localestrings['489'] = "Publicatiedatum aanpassen"; 235 235 $localestrings['490'] = "Attentie! Alle downloads in '%s' toegankelijk voor het publiek!"; 236 $localestrings['491'] = "Download wordt extern geteld:"; 237 $localestrings['492'] = "Ja"; 238 $localestrings['493'] = "Nee"; 236 239 $localestrings['500'] = "Huidige Downloads"; 237 240 $localestrings['501'] = "Download Item [Klik om te testen]"; -
trunk/downloads.php
r1468 r1530 71 71 // and the user has access to it... 72 72 if (checkgroup($cdata['download_cat_access'])) { 73 // update the download counter (if we're using internal statistics) 74 if (!isset($settings['dlstats_remote']) || !$settings['dlstats_remote']) $result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'"); 73 // update download counter 74 if ($data['download_external']) { 75 // do nothing, an external module will update the counters 76 } else { 77 $result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'"); 78 // download module installed but no external stats collector active? 79 if (isset($settings['dlstats_remote']) && !$settings['dlstats_remote']) { 80 // Then update the IP counters for mapping purposes 81 if (USER_IP != "0.0.0.0") { 82 $result = dbquery("INSERT INTO ".$db_prefix."dlstats_ips (dlsi_ip, dlsi_ccode, dlsi_counter) VALUES ('".USER_IP."', '".USER_CC."', '1') ON DUPLICATE KEY UPDATE dlsi_counter = dlsi_counter + 1"); 83 } 84 } 85 } 75 86 // if a URL is given for the download, redirect to it, else fall back to the download category 76 87 if ($data['download_url']) { 77 88 // download statistics plugin installed but no remote stats used? Then update the IP counters 78 89 if (isset($settings['dlstats_remote']) && !$settings['dlstats_remote']) { 79 if (USER_IP != "0.0.0.0") {80 $result = dbquery("INSERT INTO ".$db_prefix."dlstats_ips (dlsi_ip, dlsi_ccode, dlsi_counter) VALUES ('".USER_IP."', '".USER_CC."', '1') ON DUPLICATE KEY UPDATE dlsi_counter = dlsi_counter + 1");81 }82 90 } 83 91 redirect($data['download_url']); -
trunk/files/locales/en.main.global.php
r1527 r1530 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Sat Jul 5 2008, 21:35:58 CEST5 // generated on : Tue Jul 8 2008, 16:32:08 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
trunk/includes/templates/admin.downloads.tpl
r1285 r1530 20 20 <table align='center' cellpadding='0' cellspacing='0' width='460'> 21 21 <tr> 22 <td width=' 80' class='tbl'>22 <td width='1%' class='tbl' style='white-space:nowrap'> 23 23 {$locale.480} 24 24 </td> … … 28 28 </tr> 29 29 <tr> 30 <td valign='top' width='80' class='tbl'>30 <td width='1%' valign='top' class='tbl' style='white-space:nowrap'> 31 31 {$locale.481} 32 32 </td> … … 36 36 </tr> 37 37 <tr> 38 <td class='tbl'></td><td class='tbl'> 38 <td width='1%' class='tbl' style='white-space:nowrap'> 39 </td> 40 <td class='tbl'> 39 41 <input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onclick="addText('download_description', '<b>', '</b>');" /> 40 42 <input type='button' value='i' class='button' style='font-style:italic;width:25px;' onclick="addText('download_description', '<i>', '</i>');" /> … … 52 54 </tr> 53 55 <tr> 54 <td width=' 80' class='tbl'>56 <td width='1%' class='tbl' style='white-space:nowrap'> 55 57 {$locale.482} 56 58 </td> … … 60 62 </tr> 61 63 <tr> 62 <td width='80' class='tbl'> 64 <td width='1%' class='tbl' style='white-space:nowrap'> 65 {$locale.491} 66 </td> 67 <td class='tbl'> 68 <select name='download_external' class='textbox'> 69 <option value='0'{if $download_external == 0} selected="selected"{/if}>{$locale.493}</option> 70 <option value='1'{if $download_external == 1} selected="selected"{/if}>{$locale.492}</option> 71 </select> 72 </td> 73 </tr> 74 <tr> 75 <td width='1%' class='tbl' style='white-space:nowrap'> 63 76 {$locale.483} 64 77 </td> … … 75 88 </tr> 76 89 <tr> 77 <td width=' 80' class='tbl'>90 <td width='1%' class='tbl' style='white-space:nowrap'> 78 91 {$locale.484} 79 92 </td> … … 83 96 </tr> 84 97 <tr> 85 <td width=' 80' class='tbl'>98 <td width='1%' class='tbl' style='white-space:nowrap'> 86 99 {$locale.485} 87 100 </td> … … 99 112 </tr> 100 113 <tr> 101 <td width=' 80' class='tbl'>114 <td width='1%' class='tbl' style='white-space:nowrap'> 102 115 {$locale.487} 103 116 </td>
Note: See TracChangeset
for help on using the changeset viewer.
