Файл: modules/forum/admin.php
Строк: 436
<?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');
####################
$id = filter($_GET['id']);
$str = filter($_GET['str']);
$str_r = filter($_GET['str_r']);
$str_t = filter($_GET['str_t']);
$page = filter($_GET['page']);
$podrazdel_data = '../../data/forum/podrazdel.php';
$podrazdel_f = file($podrazdel_data);
$podrazdel_count = count($podrazdel_f);
$podrazdel_arr = explode('|', $podrazdel_f[$str]);
$temy_data = '../../data/forum/podrazdel/'.$podrazdel_arr[0].'.php';
$temy_f = @file($temy_data);
$temy_count = count($temy_f);
$tem_data = '../../data/forum/temy/'.$podrazdel_arr[0].'_'.$id.'.php';
$tem_f = @file($tem_data);
$tem_count = count($tem_f);
####################
if($_GET['act']=='edit')
{
$mes_arr = explode('|', $tem_f[$str_t]);
if (isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3' || $login == $mes_arr[0]))
{
$msg = str_replace('<br />', '
', $mes_arr[3]);
$msg = bb_back($msg);
$msg = smiles_back($msg);
include '../../themes/'.$themes.'.php';
echo '<p class="modul_name">Редактирование сообщения</p>';
if($_GET['err'] == 1)
{
echo'<p class="err">Ошибка!!! Вы не ввели текст сообщения.</p>';
}
if($_GET['err'] == 2)
{
echo'<p class="err">Ошибка!!! Текст сообщения более 3000.</p>';
}
if($_GET['err'] == 3)
{
echo"<p class="err">Ошибка!!! Вас забанил $banwho за $bantxt! Окончание бана: $bantime[6]$bantime[7].$bantime[4]$bantime[5].$bantime[0]$bantime[1]$bantime[2]$bantime[3] в $bantime[8]$bantime[9]:$bantime[10]$bantime[11] по времени сервера.</p>";
}
echo"<form method="post" action="admin.php?act=editmes&id=$id&str=$str&str_r=$str_r&str_t=$str_t&page=$page&".session_name()."=".session_id()."">";
echo"<p align="center" class="b">Сообщение:<br /><textarea rows="4" cols="15" name="msg">$msg</textarea><br />
<input type="checkbox" name="msgtrans" value="1" /> Транслит<br />";
echo"<input value="Изменить" name="do" type="submit" /></form></p>";
echo"<p><a href="showtema.php?id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."">К теме</a></p>";
include '../../templates/foot.php';
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='edittem')
{
if (isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
$tem_arr = explode('|', $temy_f[$str_t]);
$msg = str_replace('<br />', '
', $tem_arr[4]);
include '../../themes/'.$themes.'.php';
echo '<p class="modul_name">Редактирование названия темы</p>';
echo"<form method="post" action="admin.php?act=edittemy&id=$id&str=$str&str_r=$str_r&str_t=$str_t&page=$page&".session_name()."=".session_id()."">";
echo"<p align="center" class="b">Название:<br /><input name="tema" maxlength="150" value="$tem_arr[4]" /><br />
<input type="checkbox" name="tematrans" value="1" /> Транслит<br />";
echo"<input value="Изменить" name="do" type="submit" /></form></p>";
echo"<p><a href="index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."">К темам</a></p>";
include '../../templates/foot.php';
}
else
{
include '../../themes/'.$themes.'.php';
echo '<p class="err">Ошибка авторизации!!!<br /></p>';
echo '<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a></p>';
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='delmes')
{
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
for($i=2; $i < $temy_count - 2; $i++)
{
$temy_str = explode('|', $temy_f[$i]);
if($temy_str[0] == $id)
{
$mes_all = $temy_str[8] - 1;
$tema_del = $temy_str[4];
$temy_arr[] = "$temy_str[0]|$temy_str[1]|$temy_str[2]|$temy_str[3]|$temy_str[4]|$temy_str[5]|$temy_str[6]|$temy_str[7]|$mes_all";
}
else
{
$temy_arr[] = trim($temy_f[$i]);
}
}
if(!empty($temy_arr))
{ $temy_n_str = trim(implode("rn", $temy_arr)); } else
{ $temy_n_str = ''; }
$str_put = "<?phprn/*rn$temy_n_strrn*/rn?>";
write_to_file($temy_data, $str_put);
for($i=2; $i < $tem_count - 2; $i++)
{
$tem_str = explode('|', $tem_f[$i]);
if($str_t != $i)
{
$tem_arr[] = trim($tem_f[$i]);
}
else
{
$deleted_mes = trim($tem_str[3]);
}
}
if(!empty($tem_arr))
{ $tem_n_str = "rn".trim(implode("rn", $tem_arr)); } else
{ $tem_n_str = ''; }
$str_put = "<?phprn/*$tem_n_strrn*/rn?>";
write_to_file($tem_data, $str_put);
for($i=2; $i < $podrazdel_count - 2; $i++)
{
$pod_str = explode('|', $podrazdel_f[$i]);
if($pod_str[0] == $podrazdel_arr[0])
{
$mes_all = $pod_str[5] - 1;
$pod_arr[] = trim($pod_str[0]).'|'.trim($pod_str[1]).'|'.trim($pod_str[2]).'|'.trim($pod_str[3]).'|'.trim($pod_str[4]).'|'.$mes_all;
}
else
{
$pod_arr[] = trim($podrazdel_f[$i]);
}
}
$pod_n_str = trim(implode("rn", $pod_arr));
$pod_put = "<?phprn/*rn$pod_n_strrn*/rn?>";
write_to_file($podrazdel_data, $pod_put);
$date = date("d.m.Y / H:i:s", time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Удалил сообщение "$deleted_mes" в теме "$tema_del"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: showtema.php?id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo '<p class="err">Ошибка авторизации!!!<br /></p>';
echo '<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a></p>';
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='editmes')
{
$mess_arr = explode('|', $tem_f[$str_t]);
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3' || $login == $mess_arr[0]))
{
$msg = filter($_POST['msg']);
$msg = str_replace('|', '', $msg);
if($_POST['msgtrans']==1)
{
$msg = tr_to_win($msg);
}
$msg = smiles($msg);
$msg = antimat($msg);
$msg = bbcodes($msg);
$msg = stripslashes($msg);
$msg = str_replace('
', '<br />', $msg);
$time = date('H:i:s', time() + $sdvigclock*3600);
$date = date('d.m.Y', time() + $sdvigclock*3600);
$date_now = date ('YmdHis', time() + $sdvigclock*3600);
if($bantime > $date_now)
{
$errb = '2';
}
if($errb == '2')
{
header ("location: admin.php?act=edit&err=3&str_t=$str_t&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
exit;
}
elseif(empty($msg))
{
header ("location: admin.php?act=edit&err=1&str_t=$str_t&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
exit;
}
elseif(strlen($msg) > 3000 && $status > 3)
{
header ("location: admin.php?act=edit&err=2&str_t=$str_t&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
exit;
}
for($i=2; $i < $tem_count - 2; $i++)
{
$tem_str = explode('|', $tem_f[$i]);
if($str_t != $i)
{
$tem_arr[] = trim($tem_f[$i]);
}
else
{
$edited_mes = trim($tem_str[3]);
$tem_arr[] = "$tem_str[0]|$tem_str[1]|$tem_str[2]|$msg|$login|$date|$time";
}
}
if(!empty($tem_arr))
{ $tem_n_str = "rn".trim(implode("rn", $tem_arr)); } else
{ $tem_n_str = ''; }
$str_put = "<?phprn/*$tem_n_strrn*/rn?>";
write_to_file($tem_data, $str_put);
$date = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Изменил сообщение "$edited_mes" на "$msg"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: showtema.php?id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo '<p class="err">Ошибка авторизации!!!<br /></p>';
echo '<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a></p>';
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='deltem')
{
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
$delstr = trim($temy_f[$str_t]);
$buff = @file_get_contents($temy_data);
$buff = str_replace("$delstrrn",'',$buff);
write_to_file($temy_data, $buff);
$temy_str = explode('|', $temy_f[$str_t]);
$deleted_tema = trim($temy_str[4]);
$last_temy_data = '../../data/forum/last_temy.php';
$buff = @file_get_contents($last_temy_data);
$delstr = "$temy_str[0]|$str|$str_r|$temy_str[1]|$temy_str[2]|$temy_str[3]|$temy_str[4]";
$buff = str_replace("$delstrrn",'',$buff);
write_to_file($last_temy_data, $buff);
$tem_arr = explode('|', $delstr);
$tem_file_count = count(file('../../data/forum/temy/'.$podrazdel_arr[0].'_'.$tem_arr[0].'.php'));
$file = fopen('../../data/forum/temy/'.$podrazdel_arr[0].'_'.$tem_arr[0].'.php','w');
fputs($file,'');
fclose($file);
@unlink('../../data/forum/temy/'.$podrazdel_arr[0].'_'.$tem_arr[0].'.php');
for($i=2; $i < $podrazdel_count - 2; $i++)
{
$pod_str = explode('|', $podrazdel_f[$i]);
if($pod_str[0] == $podrazdel_arr[0])
{
$tem_all = $pod_str[4] - 1;
$mes_all = $pod_str[5] - ($tem_file_count - 4);
$pod_arr[] = trim($pod_str[0]).'|'.trim($pod_str[1]).'|'.trim($pod_str[2]).'|'.trim($pod_str[3]).'|'.$tem_all.'|'.$mes_all;
}
else
{
$pod_arr[] = trim($podrazdel_f[$i]);
}
}
$pod_n_str = trim(implode("rn", $pod_arr));
$pod_put = "<?phprn/*rn$pod_n_strrn*/rn?>";
write_to_file($podrazdel_data, $pod_put);
if(file_exists('../../data/forum/temy/'.$podrazdel_arr[0].'_'.$tem_arr[0].'_podpiska.php'))
{
$file = fopen('../../data/forum/temy/'.$podrazdel_arr[0].'_'.$tem_arr[0].'_podpiska.php','w');
fputs($file,'');
fclose($file);
@unlink('../../data/forum/temy/'.$podrazdel_arr[0].'_'.$tem_arr[0].'_podpiska.php');
}
$date = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Удалил тему "$deleted_tema"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='edittemy')
{
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
$tema = filter($_POST['tema']);
if($_POST['tematrans']==1)
{
$tema = tr_to_win($tema);
}
for($i=2; $i < $temy_count - 2; $i++)
{
$temy_str = explode('|', $temy_f[$i]);
if($str_t != $i)
{
$temy_arr[] = trim($temy_f[$i]);
}
else
{
$temy_arr[] = trim("$temy_str[0]|$temy_str[1]|$temy_str[2]|$temy_str[3]|$tema|$temy_str[5]|$temy_str[6]|$temy_str[7]|$temy_str[8]");
}
}
if(!empty($temy_arr))
{ $temy_n_str = "rn".trim(implode("rn", $temy_arr)); } else
{ $temy_n_str = ''; }
$str_put = "<?phprn/*$temy_n_strrn*/rn?>";
write_to_file($temy_data, $str_put);
$temy_str = explode('|', $temy_f[$str_t]);
$deleted_tema = trim($temy_str[4]);
$last_temy_data = '../../data/forum/last_temy.php';
$buff = @file_get_contents($last_temy_data);
$delstr = "$temy_str[0]|$str|$str_r|$temy_str[1]|$temy_str[2]|$temy_str[3]|$temy_str[4]";
$newstr = "$temy_str[0]|$str|$str_r|$temy_str[1]|$temy_str[2]|$temy_str[3]|$tema";
$buff = str_replace("$delstrrn","$newstrrn",$buff);
write_to_file($last_temy_data, $buff);
$date = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Изменил тему "$deleted_tema" на "$tema"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='zakrep')
{
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
for($i=2; $i < $temy_count - 2; $i++)
{
$temy_str = explode('|', $temy_f[$i]);
if($str_t != $i)
{
$temy_arr[] = trim($temy_f[$i]);
}
else
{
$tema_name = trim($temy_str[4]);
$temy_arr[] = trim("$temy_str[0]|$temy_str[1]|$temy_str[2]|$temy_str[3]|$temy_str[4]|!|$temy_str[6]|$temy_str[7]|$temy_str[8]");
}
}
if(!empty($temy_arr))
{ $temy_n_str = "rn".trim(implode("rn", $temy_arr)); } else
{ $temy_n_str = ''; }
$str_put = "<?phprn/*$temy_n_strrn*/rn?>";
write_to_file($temy_data, $str_put);
$date = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Закрепил тему "$tema_name"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='osvob')
{
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
for($i=2; $i < $temy_count - 2; $i++)
{
$temy_str = explode('|', $temy_f[$i]);
if($str_t != $i)
{
$temy_arr[] = trim($temy_f[$i]);
}
else
{
$tema_name = trim($temy_str[4]);
$temy_arr[] = trim("$temy_str[0]|$temy_str[1]|$temy_str[2]|$temy_str[3]|$temy_str[4]||$temy_str[6]|$temy_str[7]|$temy_str[8]");
}
}
if(!empty($temy_arr))
{ $temy_n_str = "rn".trim(implode("rn", $temy_arr)); } else
{ $temy_n_str = ''; }
$str_put = "<?phprn/*$temy_n_strrn*/rn?>";
write_to_file($temy_data, $str_put);
$date = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Освободил тему "$tema_name"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='close')
{
$temy_str = explode('|', $temy_f[$str_t]);
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3' || $temy_str[1] == $login))
{
for($i=2; $i < $temy_count - 2; $i++)
{
$temy_str = explode('|', $temy_f[$i]);
if($str_t != $i)
{
$temy_arr[] = trim($temy_f[$i]);
}
else
{
$tema_name = trim($temy_str[4]);
$temy_arr[] = trim("$temy_str[0]|$temy_str[1]|$temy_str[2]|$temy_str[3]|$temy_str[4]|$temy_str[5]|#|$temy_str[7]|$temy_str[8]");
}
}
if(!empty($temy_arr))
{ $temy_n_str = "rn".trim(implode("rn", $temy_arr)); } else
{ $temy_n_str = ''; }
$str_put = "<?phprn/*$temy_n_strrn*/rn?>";
write_to_file($temy_data, $str_put);
$date = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Закрыл тему "$tema_name"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: showtema.php?id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
if($_GET['act']=='open')
{
$temy_str = explode('|', $temy_f[$str_t]);
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
for($i=2; $i < $temy_count - 2; $i++)
{
$temy_str = explode('|', $temy_f[$i]);
if($str_t != $i)
{
$temy_arr[] = trim($temy_f[$i]);
}
else
{
$tema_name = trim($temy_str[4]);
$temy_arr[] = trim("$temy_str[0]|$temy_str[1]|$temy_str[2]|$temy_str[3]|$temy_str[4]|$temy_str[5]||$temy_str[7]|$temy_str[8]");
}
}
if(!empty($temy_arr))
{ $temy_n_str = "rn".trim(implode("rn", $temy_arr)); } else
{ $temy_n_str = ''; }
$str_put = "<?phprn/*$temy_n_strrn*/rn?>";
write_to_file($temy_data, $str_put);
$date = date("d.m.Y / H:i:s", time() + ($sdvigclock*3600));
$adm_log_f = @file('../../data/adm_log.php');
$adm_log_count = count($adm_log_f) - 2;
$mes_to_adm_log = "$login|$date|Открыл тему "$tema_name"rn";
for($i=2; $i < $adm_log_count; $i++)
{
$mes_to_adm_log .= $adm_log_f[$i];
}
$mes_to_adm_log = trim($mes_to_adm_log);
write_to_file('../../data/adm_log.php', "<?phprn/*rn$mes_to_adm_logrn*/rn?>");
header ("location: showtema.php?id=$id&str=$str&str_r=$str_r&page=$page&".session_name()."=".session_id()."");
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
if($_GET[act]=='banuser')
{
if (isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw && ($status == '1' || $status == '2' || $status == '3'))
{
include '../../themes/'.$themes.'.php';
$kogo = filter($_GET['ban']);
echo'<p class="modul_name">Забанить пользователя '.$kogo.'</p>';
echo"<form method="post" action="../admin/users.php?act=ban&nick=$kogo&".session_name()."=".session_id().""><p class="b">";
echo"До какого времени:<br />";
echo"Год: <select name="god" class="textbox">";
for($g=2010; $g <= 2020; $g++)
{
if($g == date ("Y", time() + ($sdvigclock*3600)))
{ echo"<option selected="selected">$g</option>"; } else
{ echo"<option>$g</option>"; }
}
echo "</select>";
echo "Сейчас: ".date ("Y", time() + ($sdvigclock*3600))."<br />";
echo"Месяц: <select name="mes" class="textbox">";
for($m=1; $m <= 12; $m++)
{
if($m < 10) { $m = "0".$m; }
if($m == date ("m", time() + ($sdvigclock*3600)))
{ echo"<option selected="selected">$m</option>"; } else
{ echo"<option>$m</option>"; }
}
echo "</select>";
echo "Сейчас: ".date ("m", time() + ($sdvigclock*3600))."<br />";
echo"День: <select name="den" class="textbox">";
for($d=1; $d <= 31; $d++)
{
if($d < 10) { $d = "0".$d; }
if($d == date ("d", time() + ($sdvigclock*3600)))
{ echo"<option selected="selected">$d</option>"; } else
{ echo"<option>$d</option>"; }
}
echo "</select>";
echo "Сейчас: ".date ("d", time() + ($sdvigclock*3600))."<br />";
echo"Час: <select name="chas" class="textbox">";
for($ch=0; $ch <= 23; $ch++)
{
if($ch < 10) { $ch = "0".$ch; }
if($ch == date ("H", time() + ($sdvigclock*3600)))
{ echo"<option selected="selected">$ch</option>"; } else
{ echo"<option>$ch</option>"; }
}
echo "</select>";
echo "Сейчас: ".date ("H", time() + ($sdvigclock*3600))."<br />";
echo"Минут: <select name="minut" class="textbox">";
for($mi=0; $mi <= 59; $mi++)
{
if($mi < 10) { $mi = "0".$mi; }
if($mi == date ("i", time() + ($sdvigclock*3600)))
{ echo"<option selected="selected">$mi</option>"; } else
{ echo"<option>$mi</option>"; }
}
echo "</select>";
echo "Сейчас: ".date ("i", time() + ($sdvigclock*3600))."<br />";
echo"За (что?):<br /><input name="why" value="плохое поведение" /><br />";
echo"<input value="Применить" type="submit" /></p></form>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В гостевую</a></p>";
include '../../templates/foot.php';
}
else
{
include '../../themes/'.$themes.'.php';
echo "<p class="err">Ошибка авторизации!!!<br /></p>";
echo "<p><a href="index.php?".session_name()."=".session_id()."">В форум</a></p>";
include '../../templates/foot.php';
}
}
####################
?>