Просмотр файла forum/admin/readsms.php

Размер файла: 2.65Kb
  1. <?php
  2. // автор скрипта - Arab
  3. // icq - 9988817 сайт: http://bola.net.ru
  4.  
  5. include_once "../includ/functions.php";
  6. include_once "../includ/login.php";
  7. include_once "../includ/setting.php";
  8. include_once "../includ/online.php";
  9.  
  10. if (!$_SESSION[login]=="" && !md5($_SESSION[password])=="" && md5($_SESSION[password])==$npassword && $_SESSION[login]==$nlogin){
  11. if($m_level=="1" || $m_level=="2"){
  12. include_once "../../css/red/index.php";
  13.  
  14. echo'<div class=agr><center><b>Прив. сообщения юзеров</b></center></div><div class=bgr><div class=url>';
  15. echo'Привет '.$login.'<br>';
  16. echo'<a href="../login/menu.php?'.SID.'">Личное меню</a> | <a href="../?'.SID.'">Форум</a></div><div class="r">';
  17.  
  18. if($privat>0){ echo'<img src="../images/mail.gif" alt=""> <a href="../other/privat.php?'.SID.'">
  19. <font color="#ff2222"><b>Новое сообщение - ('.$privat.')</b></font></a><br>'; }
  20.  
  21. $start=check($start);
  22. $line=check($line);
  23. $user=check($user);
  24. if(empty($user)){ echo'<center><b>Не выбран пользователь!</b></center><br></div></div>';
  25. include_once "../../css/red/foot.php"; exit;}
  26.  
  27. $maxlist = $all_msg;
  28. $file = file("$maindir/forum/data/privat/".check($user).".dat");
  29. $file = array_reverse($file);
  30. $total = count($file);
  31. if($total<1){echo'<center><b>Сообщений нет!</b></center><br>';}
  32. if (empty($_GET['start'])) $start = 0;
  33. else $start = $_GET['start'];
  34. if ($total < $start + $maxlist){ $end = $total; }
  35. else {$end = $start + $maxlist; }
  36. for ($i = $start; $i < $end; $i++){
  37. $data = explode("|",$file[$i]);
  38. $num=$total-$i-1;
  39. $i2=round($i+1);
  40. $sdata = date("j.n.Y");
  41. if($data[2]=="$sdata");
  42. $data[2]="Сегодня";
  43.  
  44. $data[1]=str_replace("&lt;br&gt;", "<br>", $data[1]);
  45.  
  46. echo'<br>'.check($i2).'. От: <b><a href="../other/anketa.php?user='.check($data[0]).'&amp;'.SID.'">'.check($data[0]).'</a> ('.$data[2].' - '.$data[3].')</b>
  47. <br><i>'.$data[1].'</i><br>
  48. [<a href="../other/privat.php?deladmin&amp;user='.check($user).'&amp;line='.check($num).'&amp;start='.check($start).'&amp;'.SID.'">Удалить</a>]';}
  49.  
  50. echo'<br><br>';
  51. if ($start != 0) {echo '<a href="readsms.php?user='.$user.'&start='.($start - $maxlist).'&amp;'.SID.'"><< Назад </a>| ';}
  52. if ($total > $start + $maxlist) {echo ' <a href="readsms.php?user='.$user.'&start='.($start + $maxlist).'&amp;'.SID.'"> Далее >></a>';}
  53.  
  54. echo'<br>[<a href="../other/privat.php?clearadmin&user='.$user.'&amp;'.SID.'">Очистить сообщения</a>]<br></div></div>';
  55.  
  56. include_once "../../css/red/foot.php";
  57.  
  58. } else { header ("Location: ../index.php"); }
  59. } else { header ("Location: ../index.php"); }
  60.  
  61. ?>