Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 2.16 KB  |  hits: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*====================================================================*/
  3. /* What Visited my profile                                            */
  4. /* For vBulletin 3.8.x                                                */
  5. /* by StenLi (http://vbsupport.org/forum/member.php?u=42925)          */
  6. /* Hook support (http://vbsupport.org/forum/showthread.php?p=303052)  */      
  7. /*====================================================================*/
  8.  
  9. // ####################### SET PHP ENVIRONMENT ###########################
  10. error_reporting(E_ALL & ~E_NOTICE);
  11.  
  12. // #################### DEFINE IMPORTANT CONSTANTS #######################
  13. define('THIS_SCRIPT', 'myip');
  14. define('CSRF_PROTECTION', true);
  15.  
  16. // ################### PRE-CACHE TEMPLATES AND DATA ######################
  17. // get special phrase groups
  18. $phrasegroups = array(
  19.      'user',
  20. );
  21.  
  22. // get special data templates from the datastore
  23. $actiontemplates = array();
  24.  
  25. // pre-cache templates used by specific actions
  26. $globaltemplates = array(
  27.           'myip_s',
  28.         'myip_s_bits'
  29. );
  30. // ######################### REQUIRE BACK-END ############################
  31. require_once('./global.php');
  32.  
  33.  
  34. // Если пользователь не залогинен, то кидаем на страницу ошибки
  35.   if(!$vbulletin->userinfo['userid'])
  36.       {
  37.             print_no_permission();
  38.       }
  39.      
  40. // UserID      
  41. $un1=&$vbulletin->userinfo['userid'];
  42. // Запрос к бд по USERID
  43. $r=$db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . "myip WHERE user_login = '".$un1."' LIMIT 20");
  44.  
  45. // Цикл вывода
  46. while($rop = $db->fetch_array($r))
  47. {
  48.                         $ip=$rop['ip']; // IP адрес
  49.                         $date=$rop['date']; // Дата входа
  50.                         $u_agent=htmlspecialchars($rop['user_agent']); // Юзер агент
  51. eval('$myipbits.="' . fetch_template('myip_s_bits') . '";');
  52.                
  53. }
  54. $navbits = array();
  55.  
  56. $navbits[$parent] = 'MY IP - Информация'; // Заголовок navbar
  57.  
  58. $navbits = construct_navbits(array());
  59.  
  60. eval('$navbar = "' . fetch_template('navbar') . '";');
  61.  
  62. eval('print_output("' . fetch_template('myip_s') . '");');
  63.  
  64. // ################### MY IP END ######################
  65. ?>