Demo

Probiere ClanSphere aus und teste daran herum. Demo

Codepaste - Details
Weitere Infos zum Codepaste

Name download-zeit berechnen
Autor de ichraffsnicht
CMS-Version ClanSphere 2008
Datei files/view.php
Datum 21.09.2008 um 16:28 Uhr
Beschreibung mit diesen hack wird die Dauer des downloads für die jeweilige Verbindungsgeschwindigkeit (z.B. DSL6000) berechnet.

Der hack funktioniert insoweit ohne probleme, ist aber auch nur schnell zusammen geschustert, und soll eher zum selbermachen anregen.

hf

Für irgendwas, was kaputt geht, übernehme ich keine Haftung!
Alter Code Alter Code +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
1. / 2. / ... 
<?php
// ClanSphere 2008 - www.clansphere.net
// $Id: $

$cs_lang cs_translate('files');

require 
'mods/files/functions.php';

$file_id $_REQUEST['where'];
settype($file_id,'integer');
$maxlength '80';
$modul 'files';
$files_size '';
$access_id $account['access_files'];

$from 'files fls INNER JOIN {pre}_users usr ON fls.users_id = usr.users_id';
$from .= ' INNER JOIN {pre}_categories cat ON fls.categories_id = cat.categories_id';
$select 'fls.files_name AS files_name, fls.users_id AS users_id, usr.users_nick'
$select .= ' AS users_nick, fls.files_time AS files_time, fls.files_id AS files_id';
$select .= ', fls.files_mirror AS files_mirror ,cat.categories_name AS categories_name';
$select .= ', cat.categories_id AS categories_id, fls.files_count AS files_count';  
$select .= ', fls.files_description AS files_description, fls.files_close AS files_close';
$select .= ', fls.files_vote AS files_vote, fls.files_size AS files_size, fls.files_version AS files_version, fls.files_previews AS files_previews';
$where "files_id = '" $file_id "'";
$cs_file cs_sql_select(__FILE__,$from,$select,$where);

$from 'voted';
$select 'users_id, voted_answer';
$where "voted_fid = '" $file_id "' AND voted_mod = '" $modul "'"
$order '';
$start '';
$cs_voted cs_sql_select(__FILE__,$from,$select,$where,0,0,0);
$voted_loop count($cs_voted);

if(!empty(
$_POST['voted_answer'])) 
{
    
$voted_answer $_POST['voted_answer'];
}

if(!empty(
$account['users_id'])) 
{
    
$users_id $account['users_id'];
}
else
{
    
$users_id '0';
}    

$check_user_voted 0;
for (
$run 0$run $voted_loop$run++)
{
    
$voted_users_id $cs_voted[$run]['users_id'];
    if(
$voted_users_id == $users_id)
    {
        
$check_user_voted++;
    }
}

if(empty(
$check_user_voted))
{    
    if(isset(
$_POST['submit'])) 
    {        
        
$time cs_time();
        
$voted_ip =$_SERVER['REMOTE_ADDR'];
        
$votes_cells = array('voted_fid','users_id','voted_time','voted_answer','voted_ip','voted_mod');
        
$votes_save = array($file_id,$users_id,$time,$voted_answer,$voted_ip,$modul);
        
cs_sql_insert(__FILE__,'voted',$votes_cells,$votes_save);
        
header('location:' $_SERVER['PHP_SELF'] . '?mod=files&action=view&where=' .$file_id);
    }
}


echo 
cs_html_table(1,'forum',1);
echo 
cs_html_roco(1,'headb',0,2); 
$body cs_link($cs_lang['mod'],'files','list');
$cat cs_link($cs_file['categories_name'],'files','listcat','where=' $cs_file['categories_id']);
$file cs_secure($cs_file['files_name']);
echo 
$body ' - ' $cat ' - ' $file;
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('kedit');
echo 
$cs_lang['name'];
echo 
cs_html_roco(2,'leftb',0,0,'60%'); 
echo 
cs_secure($cs_file['files_name']);
echo 
cs_datacontrol($file_id);    
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('package_editors') .$cs_lang['version'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_secure($cs_file['files_version']);
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('fileshare');
echo 
$cs_lang['big'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_filesize($cs_file['files_size']);
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('personal');
echo 
$cs_lang['autor'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_secure($cs_file['users_nick']);
echo 
cs_html_roco(0); 

echo 
cs_html_roco(1,'leftc'); 
echo 
cs_icon('1day');
echo 
$cs_lang['date'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_date('unix',$cs_file['files_time'],1);
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('download');
echo 
$cs_lang['downloaded'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_html_big(1);
echo 
cs_secure($cs_file['files_count']) .' '
echo 
cs_html_big(0);
echo 
$cs_lang['mal'];
echo 
cs_html_roco(0);

$check_vote $cs_file['files_vote'];

if(!empty(
$check_vote))
{
    echo 
cs_html_roco(1,'leftc');
    echo 
cs_icon('Volume Manager');
    echo 
$cs_lang['evaluation'];
    if(empty(
$check_user_voted))
    {    
        echo 
cs_html_roco(2,'leftb');
        echo 
cs_html_form(1,'files','files','view&where=' $file_id);    
        echo 
cs_html_select(1,'voted_answer');
        
$levels 1;
        while(
$levels 7
        {
            
/*$voted_answer == $levels ? $sel = 1 : */$sel 0;
            echo 
cs_html_option($levels ' - ' $cs_lang['vote_' $levels],$levels,$sel);
            
$levels++;
        }     
        echo 
cs_html_select(0);    
        echo 
cs_html_vote('file_id',$file_id,'hidden');
        echo 
cs_html_vote('submit',$cs_lang['ok'],'submit');
        echo 
cs_html_form (0);
    }
    else
    {
        
$files_votes 0;
        for(
$run=0$run<$voted_loop$run++) 
        {
            
$a cs_secure($cs_voted[$run]['voted_answer']);
            
$files_votes += $a;
        }    
        echo 
cs_html_roco(2,'leftc');
        
$files_votes $files_votes $voted_loop;
        
$files_votes round($files_votes,2);
        
$files_votes round($files_votes,0);
        for(
$run=6$run>$files_votes$run--) 
        {
            echo 
cs_icon('favorites');
        }
        for(
$run=1$run<$files_votes$run++) 
        {
            echo 
cs_icon('favorites1');
        }
    }
    echo 
cs_html_roco(0);
}

echo 
cs_html_roco(1,'headb',0,2);
echo 
$cs_lang['info'];
echo 
cs_html_roco(0);
echo 
cs_html_roco(1,'leftb',0,2);
echo 
cs_secure($cs_file['files_description'],1,1);
echo 
cs_html_roco(0);

if(!empty(
$cs_file['files_previews'])) {

    
$files_pics explode("\n",$cs_file['files_previews']);  
    echo 
cs_html_roco(1,'headb',0,2);
    echo 
$cs_lang['preview'];
    echo 
cs_html_roco(0);
    echo 
cs_html_roco(1,'leftb',0,2);
    
$count 1;
    foreach(
$files_pics AS $pic) {
           
$link cs_html_img('uploads/files/thumb-' $pic);
        echo 
cs_html_link('uploads/files/picture-' $pic,$link) . ' ';
        
$count++;
    }
    echo 
cs_html_roco(0); 
}
echo 
cs_html_table(0);
echo 
cs_html_br(1);

echo 
cs_html_table(1,'forum',1);
echo 
cs_html_roco(1,'headb',0,2);
echo 
$cs_lang['mirror'];
echo 
cs_html_roco(2,'headb',0,0,'120px');
echo 
$cs_lang['typ'];
echo 
cs_html_roco(0);
$files_mirror $cs_file['files_mirror'];
$temp explode("-----"$files_mirror);
$temp_loop count($temp);

if (isset(
$_REQUEST['target']))
{       
    
$files_cells = array('files_count');
        
$files_save = array(++$cs_file['files_count']);
    
cs_sql_update(__FILE__,'files',$files_cells,$files_save,$file_id);
    
$temp_a explode("\n"$temp[$_REQUEST['target']]);
    
$select_mirrow $temp_a['1'];
    
header("location:".$select_mirrow."");

for (
$run 1$run $temp_loop$run++)
{
    
$temp_a explode("\n"$temp[$run]);
    if(
$access_id >= $temp_a['4'])
    {
        echo 
cs_html_roco(1,'leftc');
        echo 
cs_icon('html');
        echo 
cs_html_roco(2,'leftb');
        if(empty(
$temp_a['2']))
        {
            
//echo cs_link(cs_secure($temp_a['1'],1),'files','view','where=' .$file_id. '&target=' .$run);
            
echo cs_html_link('?mod=files&action=download&where=' .$file_id'&target=' .$run$temp_a['1'],1);
        }
        else
        {
            
//echo cs_link(cs_secure($temp_a['2'],1),'files','view','where=' .$file_id. '&target=' .$run);  
            
echo cs_html_link('?mod=files&action=download&where=' .$file_id'&target=' .$run$temp_a['2'],1);
        }
        echo 
cs_html_roco(3,'leftc');
        echo 
cs_html_img('symbols/files/filetypes/' $temp_a['3'] . '.gif',0,0,0,$temp_a['3']);
        echo 
'( '
        echo 
cs_html_big(1);
        echo 
$temp_a['3'];
        echo 
cs_html_big(0);
        echo 
' )';
        echo 
cs_html_roco(0);
    }
}

echo 
cs_html_table(0);

include_once(
'mods/comments/functions.php');

$where_com "comments_mod = 'files' AND comments_fid = '" $file_id "'";
$count_com cs_sql_count(__FILE__,'comments',$where_com);

if(!empty(
$count_com)) {
    echo 
cs_html_br(1);
    echo 
cs_comments_view($file_id,'files','view',$count_com);
}
if(empty(
$cs_file['files_close'])) {
    echo 
cs_html_br(1);
    echo 
cs_comments_add($file_id,'files');
}

?>
Neuer Code Neuer Code +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
1. / 2. / ... 
<?php
// ClanSphere 2008 - www.clansphere.net
// $Id: $

$cs_lang cs_translate('files');

require 
'mods/files/functions.php';

$file_id $_REQUEST['where'];
settype($file_id,'integer');
$maxlength '80';
$modul 'files';
$files_size '';
$access_id $account['access_files'];

$from 'files fls INNER JOIN {pre}_users usr ON fls.users_id = usr.users_id';
$from .= ' INNER JOIN {pre}_categories cat ON fls.categories_id = cat.categories_id';
$select 'fls.files_name AS files_name, fls.users_id AS users_id, usr.users_nick'
$select .= ' AS users_nick, fls.files_time AS files_time, fls.files_id AS files_id';
$select .= ', fls.files_mirror AS files_mirror ,cat.categories_name AS categories_name';
$select .= ', cat.categories_id AS categories_id, fls.files_count AS files_count';  
$select .= ', fls.files_description AS files_description, fls.files_close AS files_close';
$select .= ', fls.files_vote AS files_vote, fls.files_size AS files_size, fls.files_version AS files_version, fls.files_previews AS files_previews';
$where "files_id = '" $file_id "'";
$cs_file cs_sql_select(__FILE__,$from,$select,$where);

$from 'voted';
$select 'users_id, voted_answer';
$where "voted_fid = '" $file_id "' AND voted_mod = '" $modul "'"
$order '';
$start '';
$cs_voted cs_sql_select(__FILE__,$from,$select,$where,0,0,0);
$voted_loop count($cs_voted);

if(!empty(
$_POST['voted_answer'])) 
{
    
$voted_answer $_POST['voted_answer'];
}

if(!empty(
$account['users_id'])) 
{
    
$users_id $account['users_id'];
}
else
{
    
$users_id '0';
}    

$check_user_voted 0;
for (
$run 0$run $voted_loop$run++)
{
    
$voted_users_id $cs_voted[$run]['users_id'];
    if(
$voted_users_id == $users_id)
    {
        
$check_user_voted++;
    }
}

if(empty(
$check_user_voted))
{    
    if(isset(
$_POST['submit'])) 
    {        
        
$time cs_time();
        
$voted_ip =$_SERVER['REMOTE_ADDR'];
        
$votes_cells = array('voted_fid','users_id','voted_time','voted_answer','voted_ip','voted_mod');
        
$votes_save = array($file_id,$users_id,$time,$voted_answer,$voted_ip,$modul);
        
cs_sql_insert(__FILE__,'voted',$votes_cells,$votes_save);
        
header('location:' $_SERVER['PHP_SELF'] . '?mod=files&action=view&where=' .$file_id);
    }
}


echo 
cs_html_table(1,'forum',1);
echo 
cs_html_roco(1,'headb',0,2); 
$body cs_link($cs_lang['mod'],'files','list');
$cat cs_link($cs_file['categories_name'],'files','listcat','where=' $cs_file['categories_id']);
$file cs_secure($cs_file['files_name']);
echo 
$body ' - ' $cat ' - ' $file;
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('kedit');
echo 
$cs_lang['name'];
echo 
cs_html_roco(2,'leftb',0,0,'60%'); 
echo 
cs_secure($cs_file['files_name']);
echo 
cs_datacontrol($file_id);    
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('package_editors') .$cs_lang['version'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_secure($cs_file['files_version']);
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('fileshare');
echo 
$cs_lang['big'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_filesize($cs_file['files_size']);
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('history');
echo 
'Downloadzeit';
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
'mit 56k Modem ' round($cs_file['files_size'] / 56 80) . ' sek.';
echo 
cs_html_br(1);
echo 
'mit ISDN Single Channel ' $cs_file['files_size'] / 64 ' sek.';
echo 
cs_html_br(1);
echo 
'mit ISDN Dual Channel ' $cs_file['files_size'] / 128 ' sek.';
echo 
cs_html_br(1);
echo 
'mit DSL Lite ' round($cs_file['files_size'] / 786 82) . ' sek.';
echo 
cs_html_br(1);
echo 
'mit DSL 1000 ' $cs_file['files_size'] / 1024 ' sek.';
echo 
cs_html_br(1);
echo 
'mit DSL 2000 ' $cs_file['files_size'] / 2048 ' sek.';
echo 
cs_html_br(1);
echo 
'mit DSL 3000 ' $cs_file['files_size'] / 3072 ' sek.';
echo 
cs_html_br(1);
echo 
'mit DSL 6000 ' $cs_file['files_size'] / 6144 ' sek.';
echo 
cs_html_br(1);
echo 
'mit DSL 16000 ' $cs_file['files_size'] / 16384 ' sek.';
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('personal');
echo 
$cs_lang['autor'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_secure($cs_file['users_nick']);
echo 
cs_html_roco(0); 

echo 
cs_html_roco(1,'leftc'); 
echo 
cs_icon('1day');
echo 
$cs_lang['date'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_date('unix',$cs_file['files_time'],1);
echo 
cs_html_roco(0);

echo 
cs_html_roco(1,'leftc');
echo 
cs_icon('download');
echo 
$cs_lang['downloaded'];
echo 
cs_html_roco(2,'leftb',0,0,'60%');
echo 
cs_html_big(1);
echo 
cs_secure($cs_file['files_count']) .' '
echo 
cs_html_big(0);
echo 
$cs_lang['mal'];
echo 
cs_html_roco(0);

$check_vote $cs_file['files_vote'];

if(!empty(
$check_vote))
{
    echo 
cs_html_roco(1,'leftc');
    echo 
cs_icon('Volume Manager');
    echo 
$cs_lang['evaluation'];
    if(empty(
$check_user_voted))
    {    
        echo 
cs_html_roco(2,'leftb');
        echo 
cs_html_form(1,'files','files','view&where=' $file_id);    
        echo 
cs_html_select(1,'voted_answer');
        
$levels 1;
        while(
$levels 7
        {
            
/*$voted_answer == $levels ? $sel = 1 : */$sel 0;
            echo 
cs_html_option($levels ' - ' $cs_lang['vote_' $levels],$levels,$sel);
            
$levels++;
        }     
        echo 
cs_html_select(0);    
        echo 
cs_html_vote('file_id',$file_id,'hidden');
        echo 
cs_html_vote('submit',$cs_lang['ok'],'submit');
        echo 
cs_html_form (0);
    }
    else
    {
        
$files_votes 0;
        for(
$run=0$run<$voted_loop$run++) 
        {
            
$a cs_secure($cs_voted[$run]['voted_answer']);
            
$files_votes += $a;
        }    
        echo 
cs_html_roco(2,'leftc');
        
$files_votes $files_votes $voted_loop;
        
$files_votes round($files_votes,2);
        
$files_votes round($files_votes,0);
        for(
$run=6$run>$files_votes$run--) 
        {
            echo 
cs_icon('favorites');
        }
        for(
$run=1$run<$files_votes$run++) 
        {
            echo 
cs_icon('favorites1');
        }
    }
    echo 
cs_html_roco(0);
}

echo 
cs_html_roco(1,'headb',0,2);
echo 
$cs_lang['info'];
echo 
cs_html_roco(0);
echo 
cs_html_roco(1,'leftb',0,2);
echo 
cs_secure($cs_file['files_description'],1,1);
echo 
cs_html_roco(0);

if(!empty(
$cs_file['files_previews'])) {

    
$files_pics explode("\n",$cs_file['files_previews']);  
    echo 
cs_html_roco(1,'headb',0,2);
    echo 
$cs_lang['preview'];
    echo 
cs_html_roco(0);
    echo 
cs_html_roco(1,'leftb',0,2);
    
$count 1;
    foreach(
$files_pics AS $pic) {
           
$link cs_html_img('uploads/files/thumb-' $pic);
        echo 
cs_html_link('uploads/files/picture-' $pic,$link) . ' ';
        
$count++;
    }
    echo 
cs_html_roco(0); 
}
echo 
cs_html_table(0);
echo 
cs_html_br(1);

echo 
cs_html_table(1,'forum',1);
echo 
cs_html_roco(1,'headb',0,2);
echo 
$cs_lang['mirror'];
echo 
cs_html_roco(2,'headb',0,0,'120px');
echo 
$cs_lang['typ'];
echo 
cs_html_roco(0);
$files_mirror $cs_file['files_mirror'];
$temp explode("-----"$files_mirror);
$temp_loop count($temp);

if (isset(
$_REQUEST['target']))
{       
    
$files_cells = array('files_count');
        
$files_save = array(++$cs_file['files_count']);
    
cs_sql_update(__FILE__,'files',$files_cells,$files_save,$file_id);
    
$temp_a explode("\n"$temp[$_REQUEST['target']]);
    
$select_mirrow $temp_a['1'];
    
header("location:".$select_mirrow."");

for (
$run 1$run $temp_loop$run++)
{
    
$temp_a explode("\n"$temp[$run]);
    if(
$access_id >= $temp_a['4'])
    {
        echo 
cs_html_roco(1,'leftc');
        echo 
cs_icon('html');
        echo 
cs_html_roco(2,'leftb');
        if(empty(
$temp_a['2']))
        {
            
//echo cs_link(cs_secure($temp_a['1'],1),'files','view','where=' .$file_id. '&target=' .$run);
            
echo cs_html_link('?mod=files&action=download&where=' .$file_id'&target=' .$run$temp_a['1'],1);
        }
        else
        {
            
//echo cs_link(cs_secure($temp_a['2'],1),'files','view','where=' .$file_id. '&target=' .$run);  
            
echo cs_html_link('?mod=files&action=download&where=' .$file_id'&target=' .$run$temp_a['2'],1);
        }
        echo 
cs_html_roco(3,'leftc');
        echo 
cs_html_img('symbols/files/filetypes/' $temp_a['3'] . '.gif',0,0,0,$temp_a['3']);
        echo 
'( '
        echo 
cs_html_big(1);
        echo 
$temp_a['3'];
        echo 
cs_html_big(0);
        echo 
' )';
        echo 
cs_html_roco(0);
    }
}

echo 
cs_html_table(0);

include_once(
'mods/comments/functions.php');

$where_com "comments_mod = 'files' AND comments_fid = '" $file_id "'";
$count_com cs_sql_count(__FILE__,'comments',$where_com);

if(!empty(
$count_com)) {
    echo 
cs_html_br(1);
    echo 
cs_comments_view($file_id,'files','view',$count_com);
}
if(empty(
$cs_file['files_close'])) {
    echo 
cs_html_br(1);
    echo 
cs_comments_add($file_id,'files');
}

?>
Zurück - Übersicht

Kommentare: 16
Seite [1]
Tom08 ClanSphere Team

09.08.2023

Ort: Daheim
Beiträge: 3083
# 1 - 21.09.2008 um 16:42 Uhr

Muss die komplette Datei geändert werden???
Sind das so viele Änderungen?
Weil sonst eigentlich nur geänderte Teile hier reinkommen

So ... ich hab nochmal die Zeiten etwas formatiert ...


[nopaste=252]Code @ Nopaste [/nopaste]

Tom


Zuletzt editiert von Tom08 ClanSphere Team, am 22.09.2008 um 17:02 Uhr (3x Editiert)
The_Mumie

24.02.2024

Ort: Colmberg
Beiträge: 322
# 2 - 22.09.2008 um 20:34 Uhr

schön habs mir auch eingebaut
nisili

18.05.2015

Ort: Buxtehude
Beiträge: 73
# 3 - 22.09.2008 um 21:12 Uhr

Klasse Code-Schnipsel
Habs gleich einbauen müssen

Aber kann man die Zeit auch in Minuten anzeigen lassen?


Grüß´le
Tom08 ClanSphere Team

09.08.2023

Ort: Daheim
Beiträge: 3083
# 4 - 23.09.2008 um 20:10 Uhr

22.09.2008 um 21:12 Uhr - nisili:
Aber kann man die Zeit auch in Minuten anzeigen lassen?


Sicherlich
Möglich ist fast alles ... ich gucks mir nochmal an

Tom
Neurologe

10.11.2016

Ort: Rieneck
Beiträge: 402
# 5 - 24.09.2008 um 14:33 Uhr

das wäre fein weil ich große dateien zum dl anbieten will (rund 200 mb, livesets von auftritten) und da ist das in sekunden sehr unpraktisch *g*

mfg
neuro
Tom08 ClanSphere Team

09.08.2023

Ort: Daheim
Beiträge: 3083
# 6 - 25.09.2008 um 18:49 Uhr

So ... ich habe es vollbracht
Hier mal 2 Screens:





Es ist iwie sehr lang geworden, aber es funktioniert

[nopaste=253]Zum Nopaste mit dem CODE!!!![/nopaste]

Tom






Zuletzt editiert von Tom08 ClanSphere Team, am 25.09.2008 um 18:50 Uhr (1x Editiert)
nisili

18.05.2015

Ort: Buxtehude
Beiträge: 73
# 7 - 26.09.2008 um 14:07 Uhr

Wow, nice Tom08

Funzt auf Anhieb (und das will was heißen bei mir )

Tausend Dank nice work
ichraffsnicht ClanSphere Team

22.12.2022

Ort: Erdeborn bei Lutherstadt Eisleben
Beiträge: 3301
# 8 - 28.09.2008 um 11:42 Uhr

schön zu sehen, was schneeball für ne riesen kugel geworden ist. echt nice tom08
Tom08 ClanSphere Team

09.08.2023

Ort: Daheim
Beiträge: 3083
# 9 - 28.09.2008 um 11:52 Uhr

Ja
Deine Version war ja wirklich nur die Errechnung ... meins sind jetzt die formellen Dinge
Schön ... das es dir gefällt

(Ich habe glaube ich (sehr) viele Variablen verwendet, man könnte sicherlich weniger verwenden, aber egal )

Tom
----x

28.11.2015

Ort: -
Beiträge: 332
# 10 - 02.10.2008 um 01:12 Uhr

Mhh aber stimmt das auch? Mit ner 16000er Leitung braucht man doch keine 24 Sekunden für 3 MB
Starguest

11.11.2018

Ort: -
Beiträge: 45
# 11 - 12.10.2008 um 13:43 Uhr

Kleiner Tipp von mir noch, der Code wird in die Zeile 125 eingefügt, musste nämlich auch erstmal rumprobieren

Danke Tom super Code, nur frage ich mich ob die Berechnungen stimmen, bei einer 16.000er Leistung braucht man wirklich keine 24 Sekunde bei Vollspeed für 3 Mb..
Tille2000

22.10.2011

Ort: -
Beiträge: 93
# 12 - 15.10.2008 um 18:37 Uhr

Irgendwie haut die Berechnung nicht hin. habe es einmal eingefügt um zu testen, hat auch ohne Probleme geklappt. Nur halt die Berechnung der Downloadzeit ist Falsch.


Für 424 MB berechnet er folgendes:
mit 56k Modem 16540 min - 2 sek
mit DSL 1000 904 min - 32 sek.
mit DSL 2000 452 min - 16 sek.
mit DSL 3000 301 min - 30 sek.
mit DSL 6000 150 min - 45 sek.
mit DSL 16000 56 min - 32 sek.
----x

28.11.2015

Ort: -
Beiträge: 332
# 13 - 18.10.2008 um 21:57 Uhr

Ja die is mal tierisch am Sack.... habs mal fix nachgerechnet und komme da auf 3,4 Minuten bei ner 16k Leitung
Tom08 ClanSphere Team

09.08.2023

Ort: Daheim
Beiträge: 3083
# 14 - 21.10.2008 um 20:03 Uhr

Ich weiß es nicht .... die Berechnungen sind von X-4ray ... ich hab daran nix geändert.
Ich hab's nur formatiert ...
----x

28.11.2015

Ort: -
Beiträge: 332
# 15 - 10.11.2008 um 08:09 Uhr

Mhh ka... X-R4Y ist wohl nicht mehr... zumindest ignoriert er meine PMs bezüglich dieses Threads.
razor041

29.06.2013

Ort: -
Beiträge: 8
# 16 - 13.12.2008 um 14:11 Uhr

hey wo muss ich den code reinkopieren?

Oh hab schon scheine blind zu sein ...xD


Zuletzt editiert von razor041, am 13.12.2008 um 14:16 Uhr (1x Editiert)


Bitte Login benutzen, um Kommentare zu schreiben.