Размер файла: 2.65Kb
- <?php
- // автор скрипта - Arab
- // icq - 9988817 сайт: http://bola.net.ru
-
- include_once "../includ/functions.php";
- include_once "../includ/login.php";
- include_once "../includ/setting.php";
- include_once "../includ/online.php";
-
- if (!$_SESSION[login]=="" && !md5($_SESSION[password])=="" && md5($_SESSION[password])==$npassword && $_SESSION[login]==$nlogin){
- if($m_level=="1" || $m_level=="2"){
- include_once "../../css/red/index.php";
-
- echo'<div class=agr><center><b>Прив. сообщения юзеров</b></center></div><div class=bgr><div class=url>';
- echo'Привет '.$login.'<br>';
- echo'<a href="../login/menu.php?'.SID.'">Личное меню</a> | <a href="../?'.SID.'">Форум</a></div><div class="r">';
-
- if($privat>0){ echo'<img src="../images/mail.gif" alt=""> <a href="../other/privat.php?'.SID.'">
- <font color="#ff2222"><b>Новое сообщение - ('.$privat.')</b></font></a><br>'; }
-
- $start=check($start);
- $line=check($line);
- $user=check($user);
- if(empty($user)){ echo'<center><b>Не выбран пользователь!</b></center><br></div></div>';
- include_once "../../css/red/foot.php"; exit;}
-
- $maxlist = $all_msg;
- $file = file("$maindir/forum/data/privat/".check($user).".dat");
- $file = array_reverse($file);
- $total = count($file);
- if($total<1){echo'<center><b>Сообщений нет!</b></center><br>';}
- if (empty($_GET['start'])) $start = 0;
- else $start = $_GET['start'];
- if ($total < $start + $maxlist){ $end = $total; }
- else {$end = $start + $maxlist; }
- for ($i = $start; $i < $end; $i++){
- $data = explode("|",$file[$i]);
- $num=$total-$i-1;
- $i2=round($i+1);
- $sdata = date("j.n.Y");
- if($data[2]=="$sdata");
- $data[2]="Сегодня";
-
- $data[1]=str_replace("<br>", "<br>", $data[1]);
-
- echo'<br>'.check($i2).'. От: <b><a href="../other/anketa.php?user='.check($data[0]).'&'.SID.'">'.check($data[0]).'</a> ('.$data[2].' - '.$data[3].')</b>
- <br><i>'.$data[1].'</i><br>
- [<a href="../other/privat.php?deladmin&user='.check($user).'&line='.check($num).'&start='.check($start).'&'.SID.'">Удалить</a>]';}
-
- echo'<br><br>';
- if ($start != 0) {echo '<a href="readsms.php?user='.$user.'&start='.($start - $maxlist).'&'.SID.'"><< Назад </a>| ';}
- if ($total > $start + $maxlist) {echo ' <a href="readsms.php?user='.$user.'&start='.($start + $maxlist).'&'.SID.'"> Далее >></a>';}
-
- echo'<br>[<a href="../other/privat.php?clearadmin&user='.$user.'&'.SID.'">Очистить сообщения</a>]<br></div></div>';
-
- include_once "../../css/red/foot.php";
-
- } else { header ("Location: ../index.php"); }
- } else { header ("Location: ../index.php"); }
-
- ?>