<?php

$setting_zc = mysql_query('SELECT * FROM `zc_setting`;');

while($set_zc = mysql_fetch_assoc($setting_zc)){
$setup_zc[$set_zc['name']] = $set_zc['value'];
} 


$all_files = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `'.$setup_zc['pref'].'files` WHERE `size` > 0 AND `open`=0'));
$all_files1 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `'.$setup_zc['pref'].'files` WHERE `size` > 0 AND `open`=1'));

$new_all_files = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `'.$setup_zc['pref'].'files` WHERE `timeupload` > '.($time-(86400*$setup_zc['day_new'])).' AND `size` > 0 AND `open`=0'));
$new_all_files1 = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `'.$setup_zc['pref'].'files` WHERE `timeupload` > '.($time-(86400*$setup_zc['day_new'])).' AND `size` > 0 AND `open`=1'));

if($new_all_files[0]!=0) $new_all = '+'.(int)$new_all_files[0].''; else $new_all="";
if($new_all_files1[0]!=0) $new_all1 = '+'.(int)$new_all_files1[0].''; else $new_all1="";
echo '('.(int)$all_files[0].$new_all.'/'.(int)$all_files1[0].$new_all1.')'; 

?>
