index.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. if (cfr('USERPROFILE')) {
  3. if ($ubillingConfig->getAlterParam('ROS_NAS_PPPOE_SESSION_INFO_IN_PROFLE')) {
  4. if (ubRouting::checkPost('GetPPPoEInfo') and ubRouting::checkPost('usrlogin')) {
  5. $infoBlock = zb_GetROSPPPoESessionInfo(ubRouting::post('usrlogin'), wf_getBoolFromVar(ubRouting::post('returnAsHTML'), true), wf_getBoolFromVar(ubRouting::post('returnInSpoiler'), true));
  6. die($infoBlock);
  7. }
  8. }
  9. try {
  10. if (ubRouting::checkGet('username', false)) {
  11. $login = ubRouting::get('username', 'login');
  12. $login = trim($login);
  13. try {
  14. $profile = new UserProfile($login);
  15. show_window(__('User profile'), $profile->render());
  16. //TODO: think about custom page titles
  17. //$system->config['pagename'] = __('User profile') . ' ' . $profile->extractUserAddress();
  18. if (ubRouting::checkGet('justregistered')) {
  19. if (!$ubillingConfig->getAlterParam('BORING_USERREG')) {
  20. $newUserRegisteredNotification = '';
  21. @$awesomeness = rcms_scandir('skins/awesomeness/');
  22. if (!empty($awesomeness)) {
  23. $awesomenessRnd = array_rand($awesomeness);
  24. $awesomeness = $awesomeness[$awesomenessRnd];
  25. $newUserRegisteredNotification .= wf_tag('center') . wf_img_sized('skins/awesomeness/' . $awesomeness, '', '256') . wf_tag('center', true);
  26. }
  27. $messages = new UbillingMessageHelper();
  28. $newUserRegisteredNotification .= $messages->getStyledMessage(__('Its incredible, but you now have a new user') . '!', 'success');
  29. $newUserRegisteredNotification .= wf_CleanDiv();
  30. $newUserRegisteredNotification .= wf_tag('br');
  31. $newUserRegisteredNotification .= web_UserControls($login);
  32. show_window('', wf_modalOpenedAuto(__('Success') . '!', $newUserRegisteredNotification));
  33. } else {
  34. /**
  35. * And how do you live such a boring life?
  36. * Do you like to return after a boring job to your boring house
  37. * to wait for the end of your boring life among boring gray walls?
  38. */
  39. }
  40. }
  41. } catch (Exception $exception) {
  42. show_error(__('Strange exception') . ': ' . $exception->getMessage());
  43. show_window('', wf_tag('center') . wf_img('skins/unicornwrong.png') . wf_tag('center', true));
  44. }
  45. } else {
  46. throw new Exception('GET_NO_USERNAME');
  47. }
  48. } catch (Exception $exception) {
  49. show_error(__('Strange exception') . ': ' . $exception->getMessage());
  50. show_window('', wf_tag('center') . wf_img('skins/unicornchainsawwrong.png') . wf_tag('center', true));
  51. }
  52. } else {
  53. show_error(__('Access denied'));
  54. }