index.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. if (cfr('LIFESTORY')) {
  3. if (ubRouting::checkGet('username')) {
  4. $login = ubRouting::get('username', 'login');
  5. //weblogs user parsing
  6. $searchType = (ubRouting::checkGet('strict')) ? true : false;
  7. $form = web_GrepLogByUser($login, $searchType);
  8. //raw database fields display
  9. if (cfr('ROOT')) {
  10. $userDataRaw = zb_UserGetStargazerData($login);
  11. if (!empty($userDataRaw)) {
  12. $userdump = print_r($userDataRaw, true);
  13. $userdump = wf_tag('pre') . $userdump . wf_tag('pre', true);
  14. $form .= wf_modal(wf_img('skins/brain.png') . ' ' . __('User inside'), __('User inside'), $userdump, 'ubButton', '800', '600') . ' ';
  15. //nethosts data
  16. $userip = $userDataRaw['IP'];
  17. $nethostRaw = zb_MultinetGetNethostData($userip);
  18. if (!empty($nethostRaw)) {
  19. $nethostsCount = sizeof($nethostRaw);
  20. if ($nethostsCount > 1) {
  21. show_error(__('Strange exception') . ': DUPLICATE_NETHOST_DATA');
  22. }
  23. $nethostdump = print_r($nethostRaw, true);
  24. $nethostdump = wf_tag('pre') . ($nethostdump) . wf_tag('pre', true);
  25. $form .= wf_modal(wf_img('skins/menuicons/multinet.png') . ' ' . __('User Networking'), __('User Networking'), $nethostdump, 'ubButton', '400', '400') . ' ';
  26. } else {
  27. show_error(__('Strange exception') . ': EMPTY_NETHOST_DATA');
  28. }
  29. } else {
  30. show_error(__('Strange exception') . ': EMPTY_DATABASE_USERDATA');
  31. }
  32. }
  33. if (ubRouting::checkGet('strict')) {
  34. $form .= wf_Link('?module=lifestory&username=' . $login, wf_img('skins/icon_search_small.gif') . ' ' . __('Normal search'), false, 'ubButton');
  35. } else {
  36. $form .= wf_Link('?module=lifestory&username=' . $login . '&strict=true', wf_img('skins/track_icon.png') . ' ' . __('Strict search'), false, 'ubButton');
  37. }
  38. $form .= wf_delimiter() . web_UserControls($login);
  39. show_window(__('User lifestory'), $form);
  40. } else {
  41. show_error(__('Strange exception') . ': GET_NO_USERNAME');
  42. }
  43. } else {
  44. show_error(__('You cant control this module'));
  45. }