$user = func_to_get_logged_in_user(); $forum_id = uri::segment(3); $forum = 'SELECT * FROM forums WHERE forum_id = '.$forum_id; //Edited to fix the formatting, there's no wrap on code tags here...... $topics = 'SELECT topics.* FROM topics INNER JOIN permissions ON topics.topic_permission_set_id = permissions.permission_set_id WHERE permissions.permission_mask_id = '.$user->user_permission_mask_id.' AND permissions_permission_show = 1 AND topics.topic_forum_id = '.$forum_id; func_to_show_page('forum', array('forum'=>$forum,'topics'=>$topics));
$forum = Model_Forum::find($forum_id); $topics = $forum->topics;
$_has_many = array('topics' => array( 'model_to' => 'Model_Topics', 'key_from' => 'forum_id', 'key_to' => 'topic_forum_id' ));
It looks like you're new here. If you want to get involved, click one of these buttons!