Вход Регистрация
Файл: titwar.ru/supportsend.php
Строк: 75
<?php
/////////////////////////////////основные файлы
include('inc/cfg.php');
include(
'inc/lostblock.php');
/////////////////////////////////страница
if($_GET['add'] == ok)
{
if(
$user['bantype'] != 1)
{
$skok strlen($_POST['text']);
$text ekr($_POST['text']);
if(
strlen($_POST['text']) <= 500)
{
$userss$user['login'];
$strana$user['strana'];
if (
$user['adm'] == '111') {$strana='<u>'.$strana.'</u>';}
if (
$user['adm'] == '222') {$strana='<u>'.$strana.'</u>';}
if (
$user['adm'] == '333') {$strana='<u>'.$strana.'</u>';}

include(
'filtr.php');
$date date('H:i');
    if(
$user['img'] != "")
    {
    
$clan mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='$user[id]'"));
    
$img $clan['img'];
        
$id_send $user['id'];
    }
    else
    {
    
$img '';
        
$id_send $user['id'];
    }
    
$predmsg mysql_fetch_array(mysql_query("SELECT * FROM chat2 WHERE id_send='$user[id]' ORDER BY `id` DESC LIMIT 0 , 1"));

    if (
$predmsg['text'] != $text)
    {
    if(
$text != "" and $user['login'] != "")
    {
        if(
$_POST['privat'] == "yes")
        {        
        
$pr    ekr($_POST['name']);
        }
        else
        {        
$pr '';
        }
        
mysql_query("UPDATE users SET post=post+'1' WHERE id='$user[id]'");
        
mysql_query("INSERT INTO `chat2` ( `date` ,`strana` , `user` ,`id_send`, `text`, `img`, `privat` )
        VALUES 
        ( '
$date', '$strana', '$userss', '$id_send', '$text', '$img', '$pr')");
         
header('location:support.php'.$ssilki1.'');



    }
else
    {    
header('location:support.php'.$ssilki1.'');
    }
    }
else
    {    
header('location:support.php'.$ssilki1.'');
    }
    

include(
'support.php'.$ssilki1.'');
}
else
{
include(
'inc/verh.php');
echo 
'<br>Превышен лимит ввода.<br>Максимум 500 символов!<br><br>';
echo 
'<a href=support.php'.$ssilki1.'>Назад</a>';
include(
'inc/niz.php');
}
}
else
{
include(
'inc/verh.php');
echo 
'---<br>Вы не можете обратиться в поддержку!<br>---<br>';
echo 
'<a href=support.php'.$ssilki1.'>Назад</a>';
include(
'inc/niz.php');
}
}
elseif(
$_GET['add'] == ok2)
{
if(
$user['bantype'] != 1)
{

$text ekr($_POST['text']);

$userss=$user['login'];
$strana$user['strana'];
if (
$users['adm'] == '111') {$strana='<b><u>'.$strana.'</u></b>';}
if (
$users['adm'] == '222') {$strana='<u>'.$strana.'</u>';}
if (
$users['adm'] == '333') {$strana='<u>'.$strana.'</u>';}

//include('filtr.php');
//include('smiles.php');
$date date('H:i');
    if(
$user['img'] != "")
    {
    
$clan mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='$user[id]'"));
    
$img $clan['img'];
        
$id_send $user['id'];
    }
    else
    {
    
$img '';
        
$id_send $user['id'];
    }



    if(
$text != "" and $user['login'] != "")
    {
        if(
$_POST['privat'] == "yes")
        {        
        
$pr    ekr($_POST['name']);
        }
        else
        {        
$pr '';
        }
        
mysql_query("INSERT INTO `chat2` ( `date` ,`strana` , `user` ,`id_send`, `text`, `img`, `privat` )VALUES ( '$date', '$strana', '$userss', '$id_send', '$text', '$img', '$pr')");
         
header('location:support.php'.$ssilki1.'');



    }
else
    {    
header('location:support.php'.$ssilki1.'');
    }

include(
'support.php'.$ssilki1.'');
}
else
{
include(
'inc/verh.php');
echo 
'---<br>Вы не можете обратиться в поддержку!<br>---<br>';
echo 
'<a href=support.php'.$ssilki1.'>Назад</a>';
include(
'inc/niz.php');
}
}
?>
Онлайн: 1
Реклама