diff options
Diffstat (limited to 'phpBB/index.php')
| -rw-r--r-- | phpBB/index.php | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 7ed32e597e..9669bf7f75 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -41,23 +41,23 @@ include('page_header.'.$phpEx);  $template->set_block("body", "catrow", "cats");  $template->set_block("catrow", "forumrow", "forums"); -$sql = "SELECT * FROM catagories ORDER BY cat_order"; +$sql = "SELECT * FROM $categories_table ORDER BY cat_order";  if(!$result = $db->sql_query($sql))   { -   error_die($db, QUERY_ERROR); +	error_die($db, QUERY_ERROR);  }  $total_rows = $db->sql_numrows();  if($total_rows)  { -   $rows = $db->sql_fetchrowset($result); -   for($x = 0; $x < $total_rows; $x++) -     { +	$rows = $db->sql_fetchrowset($result); +	for($x = 0; $x < $total_rows; $x++) +	{ -	$template->set_var(array("CAT_ID" => $rows[$x]["cat_id"], +		$template->set_var(array("CAT_ID" => $rows[$x]["cat_id"],  				 "PHP_SELF" => $PHP_SELF,  				 "CAT_DESC" => stripslashes($rows[$x]["cat_title"]))); -	$sub_sql = "SELECT f.* FROM forums f WHERE f.cat_id = '".$rows[$x]["cat_id"]."' ORDER BY forum_id"; +	$sub_sql = "SELECT f.* FROM $forums_table f WHERE f.cat_id = '".$rows[$x]["cat_id"]."' ORDER BY forum_id";  	if(!$sub_result = $db->sql_query($sub_sql))  	  {  	     error_die($db, QUERY_ERROR);  | 
