Вход Регистрация
Файл: region_clean/complaint.php
Строк: 93
<?php 
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################

require_once "start.php";
require_once 
"sid.php";

header("Cache-Control: no-cache");
if (
$ver == "wml")header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else 
header("Content-Type:text/html; charset=UTF-8");

require_once 
"inc.php";
$link connect_db();
list(
$row$id$ps$fsize1$fsize2) = check_login($link);
require_once 
"version.php";

switch(
$mod) {
default:

if (
$ver == "wml") {
echo 
$xml;
echo 
$dtd;
echo 
"<wml>
      <card id="
cabinet" title=">Мои Письма">
      <p>"
;
} else {
echo 
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
<html xmlns="http://www.w3.org/1999/xhtml">
      <
head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
      <
title>Мои Письма</title>
      <
meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
      <
div align="left">n
      
<form action=complaint.php?$ses&amp;mod=ok&amp;usid=$usid method=post>n";
}

$user = $row['user'];
if (!is_numeric(
$usid)) { header('Location: index.php?isset=403'); }
$selus = mysql_fetch_array(mysql_query("SELECT `userFROM `usersWHERE `id`='".(int)$usid."'"));
$usnick = $selus['user'];

echo 'Жалоба на письма юзера: <a href="
search.php?'.$ses.'&amp;go=view&amp;nick='.$usid.'"><b>'.col_n($usnick).'</b></a>
      <br/>Укажи причину жалобы, в письме было:<br/>
      <input type="
radio" name="comp" value="1"/> Реклама<br/>
      <input type="
radio" name="comp" value="2"/> Спам,флуд<br/>
      <input type="
radio" name="comp" value="3"/> Маты,оскорбления<br/><br/>';
if (
$ver == "wml") {
echo 
$fsize1;
echo "
<anchor title="Sign">Отправить<go href="complaint.php?$ses&amp;mod=ok&amp;usid=$usidmethod="post">n
      
<postfield name="comp" value="1"/>n
      
<postfield name="comp" value="2"/>n
      
<postfield name="comp" value="3"/>n
      
<postfield name="usid" value="$usid"/>n
      
</go></anchor><br/>n";
echo 
$fsize2;
} else {
echo '<input type="
submit" class="ibutton" value="Отправить"/></form>';
}
echo "
<br/><div class='d1'><a href="enter.php?$ses&amp;ref=$ref">Прихожая</a></div>";
include_once 'foot.php';
break;

case 'ok':

if (
$ver == "wml") {
echo 
$xml;
echo 
$dtd;
echo "
<wml>
      <
card id="cabinet" title=">Мои Письма">
      <
p>";
} else {
echo "
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <
html xmlns="http://www.w3.org/1999/xhtml">
      <
head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
      <
title>Мои Письма</title>
      <
meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
      <
div align="left">n";
}

$ussel = mysql_fetch_array(mysql_query("SELECT `userFROM `usersWHERE `id`='".(int)$usid."'"));
$nickus = $ussel['user'];

$fromid = mysql_fetch_array(mysql_query("SELECT `id`,`userFROM `usersWHERE `id` = '".(int)$id."'"));
$fromus = $fromid['user'];

if (
$_POST['comp'] == 1) {
$what = 'Реклама';
} elseif (
$_POST['comp'] == 2) {
$what = 'Спам,флуд';
} elseif (
$_POST['comp'] == 3) {
$what = 'Маты,оскорбления';
}

$select = mysql_query("SELECT `user`,`idFROM `usersWHERE `level`>='7'");
$row2 = mysql_fetch_array($select);

$us = $row2['user'];
$usid = $row2['id'];
$data = date("d-M-[H:i]");
$kol = mt_rand(0,99999999);
$time = time();
$topic = "Поступила жалоба!";
$selSYS = mysql_fetch_array(mysql_query("SELECT `userFROM `usersWHERE `id`='1'"));
$message = "Пользователь <b>".$fromus."</bоставил претензию на письма юзера <b>".$nickus."</b>. В письме было: <b>".$what."</b>!";
mysql_query("
Insert into zapiski set klu4='".$kol."'who ='".$selSYS[0]."'idwho ='1'message '".$message ."'towhom '".$id."'idtowhom '".$usid."'time '".$time."'readd '0'topic '".$topic."'date='".$data."'");
echo 'Ок, твоя претензия на письма юзера '.col_n(
$nickus).' отправлена Админу!<br/><br/>';
echo "
<a href="enter.php?$ses&amp;ref=$ref">Прихожая</a><br/>";


include_once 'foot.php';
break;
}
?>
Онлайн: 2
Реклама