View file otp_m.php

File size: 2.4Kb
  1. <?
  2. // Mod by DaNaM
  3. include_once 'sys/inc/start.php';
  4. include_once 'sys/inc/compress.php';
  5. include_once 'sys/inc/sess.php';
  6. include_once 'sys/inc/home.php';
  7. include_once 'sys/inc/settings.php';
  8. include_once 'sys/inc/db_connect.php';
  9. include_once 'sys/inc/ipua.php';
  10. include_once 'sys/inc/fnc.php';
  11. include_once 'sys/inc/user.php';
  12.  
  13. only_reg();
  14.  
  15. if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
  16. $ank=get_user($ank['id']);
  17. $set['title']='Отпечаток для '.$ank['nick'];
  18. include_once 'sys/inc/thead.php';
  19. title();
  20. err();
  21. aut();
  22. $k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `ava` WHERE `id_ank` = $ank[id]"),0);
  23. $k_page=k_page($k_post,$set['p_str']);
  24. $page=page($k_page);
  25. $start=$set['p_str']*$page-$set['p_str'];
  26. echo "<table class='post'>\n";
  27. if ($k_post==0)
  28. {
  29. echo " <tr>\n";
  30. echo " <td class='p_t'>\n";
  31. echo "Нет ляпов на аве\n";
  32. echo " </td>\n";
  33. echo " </tr>\n";
  34.  
  35. }
  36. $q=mysql_query("SELECT * FROM `ava` WHERE `id_ank` = $ank[id] LIMIT $start, $set[p_str]");
  37. while ($ava = mysql_fetch_assoc($q))
  38. {
  39. $ank2=get_user($ava['id_user']);
  40.  
  41. echo " <tr>\n";
  42. if ($set['set_show_icon']==2){
  43. echo " <td class='icon48' rowspan='2'>\n";
  44. avatar($ank2['id']);
  45. echo " </td>\n";
  46. }
  47.  
  48.  
  49. echo " <td class='p_t'>\n";
  50. echo "<a href='/info.php?id=$ank2[id]'>$ank2[nick]</a>\n";
  51. echo online($ank2['id'])."";
  52. echo " </td>\n";
  53. echo " </tr>\n";
  54. echo " <tr>\n";
  55. echo " <tr>\n";
  56. if ($set['set_show_icon']==1)
  57. echo "Состояние: ";
  58. if ($ava['time']>=$time)
  59. echo "<font color='#288919'><strong>еще стоит</strong></font><br />";
  60. else
  61. echo "<font color='#FF0000'><strong>уже стерся</strong></font><br />";
  62. $time2 = $ava['time']-60*60*24*2;
  63. echo "Оставил ляп <img src='/otp/".$ava['otp'].".png' /> <strong>".vremja($time2)."</strong><br />
  64. Ляп сотрется <strong>".vremja($ava['time'])."</strong><br />
  65. ";
  66. echo "Комментарий к ляпу:<br />
  67. ";
  68. if($ava['komm']!=NULL)
  69. echo '<strong>'.$ava['komm'].'</strong>';
  70. else
  71. echo "<strong>отсутствует</strong>";
  72. echo " </tr>\n";
  73. echo " </tr>\n";
  74.  
  75. }
  76. echo "</table>\n";
  77.  
  78. if(isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && otkuda($_SESSION['refer']))
  79. echo "&laquo;<a href='$_SESSION[refer]'>".otkuda($_SESSION['refer'])."</a><br />\n";
  80. echo "&laquo;<a href='umenu.php'>Мое меню</a><br />\n";
  81.  
  82. include_once 'sys/inc/tfoot.php';
  83. ?>