Файл: selemege.tk/mail_screen/index.php
Строк: 83
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$nick=mysql_fetch_assoc(mysql_query("SELECT `id`, `nick` FROM `user` WHERE `id` = '".intval($_GET['id'])."' "));
if (!isset($_GET['id']) || !isset($user)) { header("Location: /index.php"); exit; }
$set['title']='Скриншоты переписок с '.$nick['nick'];
include_once '../sys/inc/thead.php';
title();
aut(); // форма авторизации
if (isset($_GET['id']) && isset($_GET['id_img'])) {
unlink(H."/mail_screen/".$user['id']."/".$_GET['id']."/screen_".$_GET['id_img'].".jpeg");
mysql_query("DELETE FROM `mail_screen` WHERE `id` = '".intval($_GET['id_img'])."' ");
}
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `mail_screen` WHERE `id_user` = '".$user['id']."' AND `id_ank` = '".intval($_GET['id'])."' "),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q=mysql_query("SELECT * FROM `mail_screen` WHERE `id_user` = '".$user['id']."' AND `id_ank` = '".intval($_GET['id'])."' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
echo "<table class='post'>n";
if ($k_post==0)
{
echo '<div class="mess">';
echo 'Скриншотов нет';
echo '</div>';
}
while ($post = mysql_fetch_assoc($q))
{
/*-----------зебра-----------*/
if ($num==0){
echo '<div class="nav2">';
$num=1;
}elseif ($num==1){
echo '<div class="nav1">';
$num=0;
}
/*---------------------------*/
echo '<center><br />';
echo "<a href = '".$user['id']."/".$post['id_ank']."/screen_".$post['id'].".jpeg'><img src='".$user['id']."/".$_GET['id']."/screen_".$post['id'].".jpeg' alt = 'S' height = '100' width = '100' border = '1' /></a><br /> <a style = 'color: red;' href = '?id=".$post['id_ank']."&id_img=".$post['id']."'>удалить</a><br />n";
echo '<br />';
echo 'Ссылка на скриншот: <br />';
echo '<input value = "[url=http://'.$_SERVER['HTTP_HOST'].'/mail_screen/'.$user['id'].'/'.$_GET['id'].'/screen_'.$post['id'].'.jpeg]screen_'.$post['id'].'[/url]"><br />';
echo '<br />';
/*
echo 'Ссылка с картинкой на скриншот: <br />';
echo '<input value = "[url=http://'.$_SERVER['HTTP_HOST'].'/mail_screen/'.$user['id'].'/'.$_GET['id'].'/screen_'.$post['id'].'.jpeg][img]http://'.$_SERVER['HTTP_HOST'].'/mail_screen/'.$user['id'].'/'.$_GET['id'].'/screen_'.$post['id'].'.jpeg[/img][/url]"><br />';
*/
echo '</center><br />';
echo " </div>n";
}
echo "</table>n";
if ($k_page>1)str('index.php?',$k_page,$page); // Вывод страниц
include_once '../sys/inc/tfoot.php';
?>