Файл: usscripts/new.php
Строк: 75
<?
##########################################
## Автор: -=ШАХТЕР=- # ## Сайт: http://masteram.us # ## ICQ : 46-92-90 # ## Версия 3.0 от 4.06.10 #
## ДАННЫЙ СКРИПТ РАСПРОСТРАНЯЕТСЯ БЕСПЛАТНО #
## КАЧАЕМ ТОЛЬКО НА http://masteram.us #
#########################################
require'../config.php';
$align='left';
$title='Обменник-Новинки';
aut();
include '../style/head.php';
who_add(0,'us');
echo menu.'<a href="/fo">Oбменник</a>|<b>Новинки</b>'.$div9;
echo '<br />';
if (empty($user['max'])) $user['max']=10;
$max = $user['max'];
$k_post=mysql_result(mysql_query("select COUNT(*) from `fo_files` WHERE `timeupload` > '".($time-(86400*$set['fo_day_new']))."';"),0);
$k_page=k_page($k_post,$max);
$page=page($k_page);
$start=$max*$page-$max;
if ($k_post==0)echo 'Здесь файлов пока нет :)<br />';
$q = mysql_query( "SELECT * from `fo_files` WHERE `timeupload` > '".($time-(86400*$set['fo_day_new']))."' ORDER BY timeupload DESC limit $start,$max;" );
while ($file = @mysql_fetch_array(@$q))
{
if(is_file($file['path'])){
$ex = pathinfo($file['path']);
$ext = strtolower($ex['extension']);
//Предосмотр
$pre = '';
if ($ext == 'bmp') $pre = 'Предосмотр невозможен...<br>';
if ($ext == 'gif' or $ext == 'jpeg' or $ext == 'jpg' or $ext == 'png' or $ext == 'JPG' or $ext == 'GIF' or $ext == 'PNG'or $ext == 'JPEG') $pre = '<img style="margin: 1px;" src="/fo/img.php?bab=1&file='.$file['id'].'" alt=""/><br />';
//Новизна файла
$new_info='';
$filtime2 = $file['timeupload']+(3600*24*$set['fo_day_new']);
if($filtime2>=$time and $set['fo_day_new']!=0) $new_info = ' <img src="/fo/ext/new.gif" alt=""/>';
//Красивый размер
if($file['size'] < 1024) $file['size'] = '('.$file['size'].' б)';
if($file['size'] < 1048576 and $file['size'] >= 1024) $file['size'] = '('.round($file['size']/1024, 2).' Кб)';
if($file['size'] > 1048576) $file['size'] = '('.round($file['size']/1024/1024, 2).' Мб)';
//Иконка к файлу
if(!file_exists('ext/'.$ext.'.png') ) $ico = '<img src="/fo/ext/stand.png" alt=""/>';
elseif ($ext =='jar') $ico = ' <img src="/fo/ic.php?lf='.$file['path'].'&file='.$file[id].'" alt="" width="16" height="16"/>';
else $ico = '<img src="/fo/ext/'.$ext.'.png" alt=""/>';
//Показ расиширения
$extension = "$ext|";
$file['size']=str_replace(')','',$file['size']);
$file['size']=str_replace('(','',$file['size']);
echo links.''.$ico.' <a href="/fo/down/'.$file[id].'"><strong>'.$file['name'].'</strong></a>  ['.$extension.$file['size'].']'.$new_info.$div9.'';
echo ' <img src="/fo/ext/load.gif" alt=""/><a href="/fo/load/'.$file['id'].'">Скачать</a>';
if($ext =='txt')echo '|<a href="/fo/read/'.$file['id'].'">Читать</a>';
echo '<br />';
$bolt=0;
if(($ext == 'avi' || $ext == '3gp' || $ext == 'mp4') && extension_loaded('ffmpeg')){
$pre = '<img style="margin: 1px;" src="/fo/ffmpeg.php?file='.$file['id'].'" alt=""/><br />';
$bolt=1;
}
else if($ext == 'thm' || $ext == 'nth'){
$pre = '<img style="margin: 1px;" src="/fo/theme.php?file='.$file['id'].'" alt="prev"/><br />';
$bolt=1;
}
if(($ext == 'avi' || $ext == 'flv' || $ext =='swf' || $ext =='mp4') AND (
!$h_ua ||
strpos($h_ua, 'windows') !== false ||
strpos($h_ua, 'linux') !== false ||
strpos($h_ua, 'bsd') !== false ||
strpos($h_ua, 'x11') !== false ||
strpos($h_ua, 'unix') !== false ||
strpos($h_ua, 'macintosh') !== false ||
strpos($h_ua, 'macos') !== false))
{
$pre ='<object type="application/x-shockwave-flash" data="uflvplayer_500x375.swf" height="99" width="125">
<param name="bgcolor" value="#DFE6EF" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="uflvplayer_500x375.swf" />
<param name="FlashVars" value="way=/fo/'.$file['path'].'&swf=uflvplayer_500x375.swf&w=400&h=300&pic=/fo/ffmpeg.php?file='.$file['id'].'&autoplay=0&tools=1&skin=white&volume=70&q=&comment=" /></object><br />';
}
if($ext == 'mp3' or $ext == 'wav'){
if (
!$h_ua ||
strpos($h_ua, 'windows') !== false ||
strpos($h_ua, 'linux') !== false ||
strpos($h_ua, 'bsd') !== false ||
strpos($h_ua, 'x11') !== false ||
strpos($h_ua, 'unix') !== false ||
strpos($h_ua, 'macintosh') !== false ||
strpos($h_ua, 'macos') !== false)
{
echo'Прослушка: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 " width="96" height="20" id="own_flashplayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<embed src="/fo/own_flashplayer_plc.swf?file=/fo/'.$file['path']. '&sta rtplay=false" quality="high" bgcolor="#0B91C4" width="96" height="20" name="own_flashplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object><br />';
}}
echo $pre;
$opis=$file['about'];
$opis=substr($opis,0,100);
$opis = htmlentities($opis, ENT_QUOTES, 'UTF-8');
echo ''.$opis.'...<br />';
}else {
mysql_query("DELETE FROM `fo_files` where id = '".$file['id']."'");
}
echo '<dl></dl>';
}
if ($k_page>1){
echo '<br/><dl><dt></dt></dl>';
str("?",$k_page,$page); // Вывод страниц
echo '<br/><dl><dt></dt></dl>';
}
echo "<br/>";
echo $div1.'<a href="/usscripts">Скрипты</a>'.$div9;
include '../style/foot.php';
?>