Размер файла: 2.38Kb
<?
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])=='xmlhttprequest')
{
define("H", $_SERVER["DOCUMENT_ROOT"].'/');
include_once H.'sys/inc/start.php';
include_once H.'sys/inc/compress.php';
include_once H.'sys/inc/sess.php';
include_once H.'sys/inc/settings.php';
include_once H.'sys/inc/db_connect.php';
include_once H.'sys/inc/ipua.php';
include_once H.'sys/inc/fnc.php';
include_once H.'sys/inc/user.php';
if (isset($user))
{
$k_photo = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '".$user['id']."'"), 0);
if ($k_photo == 0)
{
?>
<div class="Tw1nGo-changre_ava1 Tw1nGo-red" style="text-align: center;">Фотографии отсутствуют..</div>
<?
}else{
?>
<div class="Tw1nGo-changre_ava3"> Фотографии <span class="Tw1nGo-changre_ava4"> <?= $k_photo?> </span></div>
<div class="Tw1nGo-changre_ava5">
<div class="Tw1nGo-changre_ava6" style="overflow-x: scroll;">
<?
$qz=mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user` = '".$user['id']."' ORDER BY `time` DESC");
while ($postz=mysql_fetch_assoc($qz))
{
$Tw1nGo_avatarka = mysql_fetch_array(mysql_query("SELECT id,id_gallery,ras FROM `gallery_foto` WHERE `id_user` = '$user[id]' AND `id` = '$postz[id]' AND `avatar` = '1' LIMIT 1"));
?>
<div class="Tw1nGo-changre_ava7">
<a onclick="Changre_ava_Tw1nGo(<?= $postz['id']?>)" href="/info.php?id=<?= $user['id']?>&photo=<?= $postz['id']?>">
<?
if($Tw1nGo_avatarka>0){
?>
<img class="Tw1nGo-changre_okiava" src="/user/info/ico/ava_ok_ok.png" alt="Tw1nGo">
<?
}else{
?>
<img class="Tw1nGo-changre_okiava" src="/user/info/ico/ava_ok_no.png" alt="Tw1nGo">
<?
}
?>
<img class="Tw1nGo-preview Tw1nGo-s81_80" src="/foto/foto128/<?= $postz['id']?>.<?= $postz['ras']?>" alt="Tw1nGo" />
</a>
</div>
<?
}
echo "</div>";
echo "</div>";
?>
<a class="Tw1nGo-changre_ava2" onclick="Changre_ava_Tw1nGo()" href="/info.php?id=<?= $user['id']?>&ava_null">
<img class="Tw1nGo-ico" style="margin: -5px 5px 0 0;" src="/user/info/ico/garbage.png" alt="Tw1nGo">
<span class="Tw1nGo-t"> Убрать аватар </span>
</a>
<?
}
?>
<a class="Tw1nGo-changre_ava2" onclick="Changre_ava_Tw1nGo()">
<img class="Tw1nGo-ico" style="margin: -1px 5px 0 0;" src="/user/info/ico/close.png" alt="Tw1nGo">
<span class="Tw1nGo-t"> Отменить </span>
</a>
<?
}else{
echo "<center><b>ERROR!</b></center>";
}
}
?>