Файл: modules/kabinet/del_mes.php
Строк: 71
<?php
########################################
## WAP-ENGINE ##
########################################
## ##
## Автор : CHUMA (Токарев Владимир) ##
## e-mail : crazychuma@gmail.com ##
## WAP : http://wap-engine.ru ##
## ##
########################################
## ВЫ НЕ ИМЕЕТЕ ПРАВО ##
## ИЗМЕНЯТЬ КОД СКРИПТА ##
## ДЛЯ ДАЛЬНЕЙШЕГО РАСПРОСТРАНЕНИЯ! ##
########################################
include ('../../config.php');
include ('../../templates/run.php');
include ('../../templates/func.php');
####################
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw)
{
if($_GET['box']=='outbox')
{
if($_GET['clear']==1)
{
write_to_file('../../data/outbox/'.$login.'.php', "<?phprn/*rn*/rn?>");
header ("Location: outbox.php?&".session_name()."=".session_id()."");
}
else
{
$outbox_f = @file('../../data/outbox/'.$login.'.php');
$outbox_count = count($outbox_f);
for($i=2; $i < $outbox_count - 2; $i++)
{
$messages[] = $outbox_f[$i];
}
$mes_count = count($messages);
for($i=0; $i < $mes_count; $i++)
{
if($i != $_GET['id'])
{
$mes_to_file .= trim($messages[$i])."rn";
}
}
$mes_to_file = trim($mes_to_file);
if(!empty($mes_to_file))
{ $mes_to_file = "rn".$mes_to_file; } else
{ $mes_to_file = ''; }
write_to_file('../../data/outbox/'.$login.'.php', "<?phprn/*$mes_to_filern*/rn?>");
header ("Location: outbox.php?page=$_GET[page]&".session_name()."=".session_id()."");
}
}
else
{
if($_GET['clear']==1)
{
write_to_file('../../data/inbox/'.$login.'.php', "<?phprn/*rn*/rn?>");
header ("Location: inbox.php?&".session_name()."=".session_id()."");
}
else
{
$inbox_f = @file('../../data/inbox/'.$login.'.php');
$inbox_count = count($inbox_f);
for($i=2; $i < $inbox_count - 2; $i++)
{
$messages[] = $inbox_f[$i];
}
$mes_count = count($messages);
for($i=0; $i < $mes_count; $i++)
{
if($i != $_GET['id'])
{
$mes_to_file .= trim($messages[$i])."rn";
}
}
$mes_to_file = trim($mes_to_file);
if(!empty($mes_to_file))
{ $mes_to_file = "rn".$mes_to_file; } else
{ $mes_to_file = ''; }
write_to_file('../../data/inbox/'.$login.'.php', "<?phprn/*$mes_to_filern*/rn?>");
header ("Location: inbox.php?page=$_GET[page]&".session_name()."=".session_id()."");
}
}
}
else
{
include ("../../themes/$themes.php");
echo"<p class="b">Вы не авторизованы!!! Войдите в личный кабинет.<br /></p>";
include ("../../templates/foot.php");
}
?>