. # # # Usage: In posting.php, following submit_post(): # # require_once('/home/uckelman/site-src/bridge/src/forum_post_send.php'); # try { send_post_to_lists($config, $user, $mode, $data, $post_data); } catch (Exception $e) { trigger_error($e, E_USER_ERROR); } function send_post_to_lists($config, $user, $mode, $data, $post_data) { require_once('Log.php'); $logger = &Log::singleton('file', '/var/log/listbridge', 'one'); /* print '
'; var_dump($data); var_dump($post_data); print '
'; */ require_once('Mail.php'); require_once(__DIR__ . '/BridgeConf.php'); require_once(__DIR__ . '/BridgeImpl.php'); require_once(__DIR__ . '/PhpBB3Conf.php'); require_once(__DIR__ . '/PhpBB3Impl.php'); require_once(__DIR__ . '/PhpBB3ToMailman.php'); $db = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB, DB_USER, DB_PASS); $bridge = new BridgeImpl($db); $phpbb = new PhpBB3Impl(); $mailer = Mail::factory('sendmail'); $conduit = new PhpBB3ToMailman($bridge, $phpbb, $mailer, $logger); $conduit->process($config, $user, $mode, $data, $post_data); } ?>