PHPFusion\SiteLinks::get_current_SiteLinks PHP Method

    public static function get_current_SiteLinks($url = "", $key = NULL)
    {
        $url = stripinput($url);
        static $data = array();
        if (empty($data)) {
            if (!$url) {
                $pathinfo = pathinfo($_SERVER['PHP_SELF']);
                $url = FUSION_FILELINK;
            }
            $result = dbquery("SELECT * FROM " . DB_SITE_LINKS . " WHERE link_url='" . $url . "' AND link_language='" . LANGUAGE . "'");
            if (dbrows($result) > 0) {
                $data = dbarray($result);
            }
        }
        return $key === NULL ? (array) $data : (isset($data[$key]) ? $data[$key] : NULL);
    }

Usage Example

Example #1
0
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_FAQS)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
if (file_exists(INFUSIONS . "faq/locale/" . LOCALESET . "faq.php")) {
    include INFUSIONS . "faq/locale/" . LOCALESET . "faq.php";
} else {
    include INFUSIONS . "faq/locale/English/faq.php";
}
include "templates/faq.php";
add_to_title($locale['global_200'] . \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name"));
if (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
    $result = dbquery("SELECT *\tFROM " . DB_FAQ_CATS . " " . (multilang_table("FQ") ? "WHERE faq_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " faq_cat_id='" . intval($_GET['cat_id']) . "'");
    if (dbrows($result) > 0) {
        $data = dbarray($result);
        add_to_title($locale['global_201'] . $data['faq_cat_name']);
        $data['faq_link'] = INFUSIONS . "faq/faq.php?cat_id=" . $data['faq_cat_id'];
        $info = $data;
        if (dbcount("(faq_id)", DB_FAQS, "faq_cat_id='" . intval($_GET['cat_id']) . "'")) {
            $result = dbquery("SELECT faq_id, faq_question, faq_answer from " . DB_FAQS . " WHERE faq_cat_id='" . intval($_GET['cat_id']) . "' ORDER BY faq_question");
            while ($data = dbarray($result)) {
                $info['items'][$data['faq_id']] = $data;
            }
        } else {
            $info['nofaq_items'] = $locale['411'];
        }
All Usage Examples Of PHPFusion\SiteLinks::get_current_SiteLinks