Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [szukam scryptu] pilne phpbb logowanie
Forum PHP.pl > Forum > Gotowe rozwiązania
adisoft
witam poszukuje skryptu dzieki ktoremu mozna by sie logowac albo zakladac konto na stronie includowac jakos ten login z phpbb na normalnej stronie cos takiego jak np. wyswietlanie statsow ile jest gosci usero itp na forum tylko ze z logowaniem
Ive
http://phpbb.pl/forum/viewtopic.php?t=4071 prosze ;] kiedys znalazlem i nie wiem czy link nadal aktywny bo nie sprawdzalem tongue.gif
adisoft
danke exclamation.gif pokombinuje cos z tym tylko oni tam chyba sami nie wiedza czy jest to dobrze ? w kazdym badz razie dzieki winksmiley.jpg
bigZbig
Przy pomocy tego skryptu mozna sie z dowolnej strony zalogowac do forum phpBB. Zwróc uwage zwłaszcza na zmienne
  1. <?php
  2. $phpbb_root_path = './forum/';
  3. $redirect = '../index.php';
  4. ?>


Skrypt wyswieltla też linka do panelu rejestracji, a po zalogowaniu link do profilu oraz informacje o nowych wiadomosciach w skrzynce privmsg.

  1. <?
  2. define('IN_PHPBB', true);
  3. $phpbb_root_path = './forum/';
  4. include($phpbb_root_path . 'extension.inc');
  5. include($phpbb_root_path . 'common.'.$phpEx);
  6. $userdata = session_pagestart($user_ip, PAGE_INDEX);
  7. init_userprefs($userdata);
  8.  
  9. $redirect = '../index.php';
  10. $images_path = $phpbb_path.'templates/'.$theme[template_name].'/images/';
  11. $images['login'] = '<img src=\"'.$images_path.'icon_mini_login.gif\" />';
  12. $login_path = append_sid($phpbb_path.'login.'.$phpEx.'');
  13. $images['profile'] = '<img src=\"'.$images_path.'icon_mini_profile.gif\" />';
  14. $profile_edit = append_sid($phpbb_path.'profile.'.$phpEx.'?mode=editprofile');
  15. $profile_register = append_sid($phpbb_path.'profile.'.$phpEx.'?mode=register');
  16. $images['pm_new_msg'] = '<img src=\"'.$images_path.'icon_mini_message.gif\" />';
  17. $images['pm_no_new_msg'] = $images['pm_new_msg'];
  18.  
  19. if ( ($userdata['session_logged_in']) )
  20. {
  21. if ( $userdata['user_new_privmsg'] )
  22. {
  23. $l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
  24. $l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
  25.  
  26. if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
  27. {
  28. $s_privmsg_new = 1;
  29. $icon_pm = $images['pm_new_msg'];
  30. }
  31. else
  32. {
  33. $s_privmsg_new = 0;
  34. $icon_pm = $images['pm_new_msg'];
  35. }
  36. }
  37. else
  38. {
  39. $l_privmsgs_text = $lang['No_new_pm'];
  40.  
  41. $s_privmsg_new = 0;
  42. $icon_pm = $images['pm_no_new_msg'];
  43. }
  44.  
  45. if ( $userdata['user_unread_privmsg'] )
  46. {
  47. $l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
  48. $l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
  49. }
  50. else
  51. {
  52. $l_privmsgs_text_unread = $lang['No_unread_pm'];
  53. }
  54. }
  55. else
  56. {
  57. $icon_pm = $images['pm_no_new_msg'];
  58. $l_privmsgs_text = $lang['Login_check_pm'];
  59. $l_privmsgs_text_unread = '';
  60. $s_privmsg_new = 0;
  61. }
  62.  
  63. $pm = array(
  64. 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
  65. 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
  66. 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
  67. 'PRIVMSG_IMG' => $icon_pm,
  68. 'L_PRIVATEMSGS' => $lang['Private_Messages'],
  69.  
  70. 'U_PRIVATEMSGS' => append_sid($phpbb_path.'privmsg.'.$phpEx.'?folder=inbox'),
  71. 'U_PRIVATEMSGS_POPUP' => append_sid($phpbb_path.'privmsg.'.$phpEx.'?mode=newpm'),
  72. );
  73.  
  74. $login = '
  75. <form method=\"post\" action=\"'.$login_path.'\">
  76. <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">
  77. <tr>
  78. <td align=\"center\" class=\"postbody\">
  79. '.$images[login].' <input type=\"text\" name=\"username\" size=\"11\" class=\"post\" value=\"nick\" />&nbsp;
  80. <input type=\"password\" name=\"password\" size=\"11\" maxlength=\"32\" class=\"post\" value=\"pass\" />&nbsp;
  81. <input type=\"hidden\" name=\"redirect\" value=\"'.$redirect.'\" />
  82. <input type=\"checkbox\" name=\"autologin\" class=\"post\" />&nbsp;
  83. <input type=\"submit\" name=\"login\" value=\"Zaloguj\" class=\"post\" /> |&nbsp;
  84. '.$images[profile].' Tu się możesz <a href=\"'.$profile_register.'\">zarejestrować</a>.
  85. </td>
  86. </tr>
  87. </table>
  88. </form>';
  89.  
  90. $logout = '
  91. <form method=\"post\" action=\"'.$login_path.'\">
  92. <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">
  93.  <tr>
  94. <td align=\"center\" valign=\"bottom\" class=\"postbody\">'.$images[login].' Witaj: <b>'.$userdata[username].'</b>
  95.  <input type=\"hidden\" name=\"redirect\" value=\"'.$redirect.'\" />
  96.  <input type=\"submit\" name=\"logout\" value=\"Wyloguj\" class=\"post\" /> |&nbsp;
  97. '.$pm['PRIVMSG_IMG'].' <a href=\"'.$pm['U_PRIVATEMSGS'].'\" class=\"mainmenu\">'.$pm['PRIVATE_MESSAGE_INFO'].'</a> |&nbsp;
  98. '.$images[profile].' <a href=\"'.$profile_edit.'\" class=\"mainmenu\">Profil</a>
  99. </td>
  100.  </tr>
  101. </table>
  102. </form>';
  103.  
  104. $form = ($userdata['session_logged_in']) ? $logout : $login;
  105.  
  106. print($form);
  107. ?>
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.