Created
August 19, 2011 14:49
-
-
Save linickx/1156971 to your computer and use it in GitHub Desktop.
PRT - admin options - dbblock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Line 36 | |
# How do we connect to phpbb? | |
if ($lnx_PRT_options['prt_phpbb_dbinsecureon'] != "1") { | |
# COnnect to phpBB and get a list of forums | |
$wpdb->select($lnx_PRT_options['prt_phpbb_db']); | |
# Run The query | |
$tt_results = $wpdb->get_results("SELECT * FROM $lnx_PRT_options[prt_phpbb_tt] LIMIT 3"); // Topic Table Querey - check connectivity | |
$ft_results = $wpdb->get_results("SELECT forum_id,forum_name FROM $lnx_PRT_options[prt_phpbb_ft]"); // Forum Table Querey - for exclusions | |
$pt_results = $wpdb->get_results("SELECT * FROM $lnx_PRT_options[prt_phpbb_pt] LIMIT 3"); // Posts Table Querey - to check recent posts functionaility | |
# Connect back to wordpress :-) | |
$wpdb->select(DB_NAME); | |
} else { | |
# Make new DB Connection | |
$phpbbdb = new wpdb($lnx_PRT_options['prt_phpbb_dbinsecureuid'], $lnx_PRT_options['prt_phpbb_dbinsecurepw'], $lnx_PRT_options['prt_phpbb_db'], $prt_phpbb_dbinsecurehos); | |
# Run The query | |
$tt_results = $phpbbdb->get_results("SELECT * FROM $lnx_PRT_options[prt_phpbb_tt] LIMIT 3"); // As above | |
$ft_results = $phpbbdb->get_results("SELECT forum_id,forum_name FROM $lnx_PRT_options[prt_phpbb_ft]"); | |
$pt_results = $phpbbdb->get_results("SELECT * FROM $lnx_PRT_options[prt_phpbb_pt] LIMIT 3"); | |
} | |
// line 59 | |
# Now print the admin form! | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment