getVar("faq_cat") == 0) { $newfaqart = $jakdb->select("faq_article", ["[>]faq_categories" => ["catid" => "id"]], ["faq_article.id", "faq_article.lang", "faq_article.title", "faq_article.content", "faq_article.time", "faq_categories.class", "faq_categories.title(titlecat)"], ["AND" => ["faq_article.lang" => $BT_LANGUAGE, "faq_article.active" => 1], "ORDER" => ["faq_article.dorder" => "DESC"], "LIMIT" => JAK_FAQ_HOME ]); // Only for certain categories } else { $newfaqart = $jakdb->select("faq_article", ["[>]faq_categories" => ["catid" => "id"]], ["faq_article.id", "faq_article.lang", "faq_article.title", "faq_article.content", "faq_article.time", "faq_categories.class", "faq_categories.title(titlecat)"], ["AND" => ["faq_article.lang" => $BT_LANGUAGE, "faq_article.catid" => [$jakclient->getVar("faq_cat")], "faq_article.active" => 1], "ORDER" => ["faq_article.dorder" => "DESC"], "LIMIT" => JAK_FAQ_HOME ]); } // Can see all active articles } elseif (JAK_USERID) { $newfaqart = $jakdb->select("faq_article", ["[>]faq_categories" => ["catid" => "id"]], ["faq_article.id", "faq_article.lang", "faq_article.title", "faq_article.content", "faq_article.time", "faq_categories.class", "faq_categories.title(titlecat)"], ["AND" => ["faq_article.lang" => $BT_LANGUAGE, "faq_article.active" => 1], "ORDER" => ["faq_article.dorder" => "DESC"], "LIMIT" => JAK_FAQ_HOME ]); // Can see categories for guests } else { $newfaqart = $jakdb->select("faq_article", ["[>]faq_categories" => ["catid" => "id"]], ["faq_article.id", "faq_article.lang", "faq_article.title", "faq_article.content", "faq_article.time", "faq_categories.class", "faq_categories.title(titlecat)"], ["AND" => ["faq_categories.guesta" => 1, "faq_article.lang" => $BT_LANGUAGE, "faq_article.active" => 1], "ORDER" => ["faq_article.dorder" => "DESC"], "LIMIT" => JAK_FAQ_HOME ]); } } if (isset($newfaqart) && !empty($newfaqart)){?>