Файл: Dvig/photos.php
Строк: 10
<?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(!$id){echo'<div id="body"><a href="/photo_a.php">Добавить фото</a></div>';
$id = $users['id'];}
$tottes = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `core_photos` WHERE `kto`='$id'"), 0); //Подсчет общего числа записей
$k_page=k_page($tottes,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if($tottes !== '0'){
$uses = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id`='.$id.''));
$phot = mysql_query("SELECT * FROM `core_photos` WHERE `kto` = '$id' order by `time` DESC LIMIT 10");
echo'<div id="razd"><a href="/usermain.php?id='.$id.'">'.$uses['login'].'</a> | <b>Фотографии '.$uses['login'].'</b></div>';
echo'<div id="body">';
while ($photo = mysql_fetch_array($phot)) {
$uses = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id`='.$id.''));
echo'<a href="/photo_view.php?id='.$photo['id'].'">
<img src="'.$host.'/photos/'.$photo['file'].'" width="90" height="90"/></a> ';
$i++;
echo ($i%5) ? '' : '<br/>';
}
echo'</div>';}else{echo'<div id="razd">Пусто</div>';}
if($id){if ($k_page>1)str('&',$k_page,$page);}else{if ($k_page>1)str('?',$k_page,$page);}
#########
require_once'core/foot.php';
?>