Advertisement
Guest User

Untitled

a guest
Jan 11th, 2015
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.37 KB | None | 0 0
  1.  <?php
  2.      
  3. define('IN_PHPBB', true);
  4. $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : 'forum/phpBB3/';
  5. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  6. include($phpbb_root_path . 'common.' . $phpEx);
  7. include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
  8. include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
  9.      
  10.         error_reporting(E_ALL);
  11.         require_once ('konfiguration.php');
  12.         $db = new mysqli(
  13.                              MYSQL_HOST,
  14.                              MYSQL_BENUTZER,
  15.                              MYSQL_KENNWORT,
  16.                              MYSQL_DATENBANK
  17.                             );
  18.          
  19.         if ($db->connect_error) {
  20.             die('Connect Error (' . $mysqli->connect_errno . ') '
  21.                     . $mysqli->connect_error);
  22.         }
  23.                                                
  24.          
  25.        if(!$result = $db->query('SELECT * FROM phpbb_posts WHERE post_id=1')) {
  26.             die('Query failed: ' . $db->error);
  27.         }
  28.            
  29.     $posts_row = $result->fetch_assoc();
  30.      
  31.     echo $post_text = nl2br($posts_row['post_text']);
  32.  
  33.          $bbcode = new bbcode(base64_encode($bbcode_bitfield));        
  34.          $bbcode->bbcode_second_pass($post_text, $posts_row['bbcode_uid'], $posts_row['bbcode_bitfield']);
  35.  
  36.          echo $post_text = smiley_text($post_text);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement