Файл: Dvig/photo_view.php
Строк: 16
<?php
####################
## Автор - USER-X ##
## Copyright 2013 ##
## xcms.mcdir.ru ##
####################
define( 'xcms_pro', 1 ) ;
$path = '';
$title='Топ';
include_once ($path . 'core/core.php');
include_once ($path.'core/head.php');
#########
if($users) {
$total = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `core_photos` WHERE `id`='$id' "), 0); //Подсчет общего числа записей
if ($total) {
$mys = mysql_query("SELECT * FROM `core_photos` WHERE `id`='$id' order by `time` DESC LIMIT 8");
while ($res = mysql_fetch_array($mys)) {
$uses = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id`='.$res['kto'].''));
echo'<div id="razd"><a href="/usermain.php?id='.$uses['id'].'">'.$uses['login'].'</a> | <a href="/photos.php?id='.$uses['id'].'">Фотографии '.$uses['login'].'</a> | <b>Просмотр</b></div>
<div id="body"><center>
<img src="'.$host.'/photos/'.$res['file'].'" width="250" height="250"/><br/>';
if($res['opis']){echo $res['opis'].'<br/><br/>';}
echo'<a href="'.$host.'/photos/'.$res['file'].'">Скачать оригинал</a>
| <a href="/photos.php?id='.$uses['id'].'">К списку фото</a>
| <a href="/usermain.php?id='.$uses['id'].'">В анкету</a>
</center></div>
';
}
} else {echo '<div id="razd">Ошибка</div>';}
} else {
$_SESSION['ok'] = 'Запрещенно!<br/>';
header("location: index.php");
exit;
}
include_once ($path.'core/foot.php');
?>