Файл: www/pic/ld.php
Строк: 58
<?php
include '../config.php';
$id=intval($_GET['id']);
div('Загрузка');
$pic_info=mysql_fetch_array(mysql_query("SELECT * FROM `pic_files` WHERE `id`='$id'"));
$u=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='$pic_info[id_user]'"));
$path='loads/'.$pic_info['file'];
$pic=mysql_fetch_array(mysql_query("SELECT * FROM `pic_cat` WHERE `id`='$pic_info[id_cat]'"));
$sort=$_SESSION['pv_size'];
if($sort==1)
echo '';
if($sort==2)
echo '<div class="info"><center><img src="loads/'.$pic_info['file'].'" width="20" height="30"></center></div>';
if($sort==3)
echo '<div class="info"><center><img src="loads/'.$pic_info['file'].'" width="40" height="60"></center></div>';
if($sort==4)
echo '<div class="info"><center><img src="loads/'.$pic_info['file'].'" width="60" height="90"></center></div>';
if($sort==5)
echo '<div class="info"><center><img src="loads/'.$pic_info['file'].'" width="150" height="200"></center></div>';
echo '» <a href="/pic/">Картинки</a><br/>';
echo '» <a href="views.php?id='.$pic_info['id_cat'].'">'.htmlspecialchars(stripslashes($pic['name'])).'</a><br/><br/>';
echo $pic_info['file'].'<br/>';
echo 'Размер: '.round(filesize('loads/'.$pic_info['file'])/1024,1).' Kb<br/>';
$data=GetImageSize($path);
echo 'Разрешение: '.$data[0].'х'.$data[1].'<br/>';
echo 'Скачано: '.$pic_info['down'].' раз<br/>';
echo 'Добавил: <a href="../info.php?id='.$pic_info['id_user'].'">'.$u['login'].'</a><br/>';
echo 'Добавлено: ['.data($pic_info['time_d']).']<br/>';
$plus=mysql_num_rows(mysql_query("SELECT `id` FROM `all_rating` WHERE `id_cat`='4' AND `id_pr`='$id' AND `or`='0'"));
$minus=mysql_num_rows(mysql_query("SELECT `id` FROM `all_rating` WHERE `id_cat`='4' AND `id_pr`='$id' AND `or`='1'"));
echo '<a href="../rt.php?cat=4&id='.$id.'">Рейтинг</a> (<a href="ld.php?sign=1&id='.$id.'">+</a>/<a href="ld.php?sign=2&id='.$id.'">-</a>): '.intval($plus).'/'.intval($minus).'<br/>';
echo '<br/>Ниже приведены различные способы загрузки<br/>Пожалуйста настройте их как вам удобно<br/>';
echo 'Разрешения:<br/>
» <a href="img.php?rv=1&id='.$id.'">128х128</a><br/>
» <a href="img.php?rv=2&id='.$id.'">128х160</a><br/>
» <a href="img.php?rv=3&id='.$id.'">176х208</a><br/>
» <a href="img.php?rv=4&id='.$id.'">176х220</a><br/>
» <a href="img.php?rv=5&id='.$id.'">208х208</a><br/>
» <a href="img.php?rv=6&id='.$id.'">240х320</a>
<form action="down.php?id='.$id.'" method="POST">
<input type="checkbox" name="link"> Скачать через ссылку<br/><br/>
<input type="submit" value="Скачать"></form>';
if($_GET['sign']==1){
mysql_query("INSERT INTO `all_rating` SET `id_cat`='4', `id_user`='$aut[id]', `id_pr`='$id', `or`='0', `time`='$time'");
header('location: ld.php?id='.$id);}
if($_GET['sign']==2){
mysql_query("INSERT INTO `all_rating` SET `id_cat`='4', `id_user`='$aut[id]', `id_pr`='$id', `or`='1', `time`='$time'");
header('location: ld.php?id='.$id);}
echo '</div>';
include '../foot.php';
echo '</div>';
?>