HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/xdudes.com/admin/mb.php
<?php

include('admin/db.php');
if (isset($_SESSION['templateName'])) {
    $template_name = $_SESSION['templateName'];
}
if (isset($_SESSION['templatePath'])) {
    $template_path = $_SESSION['templatePath'];
}
if (isset($_SESSION['templateURL'])) {
    $template_url = $_SESSION['templateURL'];
}

function getMetaData($page) {
    extract($GLOBALS);
    return false;
}

function getTemplate($template, $args = array()) {
    extract($GLOBALS);
    global $template_path, $template_url, $row, $rrow, $key, $value;
    if (count($args) > 0) {
        foreach ($args as $arg_key => $arg_value) {
            ${$arg_key} = $arg_value;
        }
    }
    include($template_path . "/" . $template);
}

function getTemplateItem($template, $args = array()) {
    extract($GLOBALS);
    global $template_path, $template_url, $row, $rrow, $key, $value;
    if (count($args) > 0) {
        foreach ($args as $arg_key => $arg_value) {
            ${$arg_key} = $arg_value;
        }
    }
    include($template_path . "/items/" . $template);
}

function getWidget($widget, $args = array()) {
    extract($GLOBALS);
    global $template_path, $template_url, $row, $rrow, $key, $value;
    if (count($args) > 0) {
        foreach ($args as $arg_key => $arg_value) {
            ${$arg_key} = $arg_value;
        }
    }
    include($template_path . "/widgets/" . $widget);
}

function displayBlock($block_id, $use_template = true, $args = array()) {
    extract($GLOBALS);
    global $template_path, $template_url, $config, $currentLang, $default_language;
    if ($currentLang) {
        $langSelect = ", `blocks_languages`.`data`";
        $langJoin = "LEFT JOIN `blocks_languages` ON `blocks_languages`.`block_id` = `blocks`.`record_num`";
        $langWhere = "AND `blocks_languages`.`language` = '$currentLang'";
    }
    $block = dbRow("SELECT * $langSelect FROM `blocks` $langJoin WHERE `record_num` = '" . (int) $block_id . "' $langWhere", $config['blocks_cache_time'] > 0, $config['blocks_cache_time']);
    if (is_array($block) && $block['status'] == 1) {
        if (count($args) > 0) {
            foreach ($args as $arg_key => $arg_value) {
                ${$arg_key} = $arg_value;
            }
        }
        if ($currentLang) {
            $langData = unserialize($block['data']);
            if ($langData['subject'] != "") {
                $block['subject'] = $langData['subject'];
            }
            if ($langData['body'] != "") {
                $block['body'] = base64_decode($langData['body']);
            }
        }
        ob_start();
        eval("?>" . $block['body']);
        $block['body'] = trim(ob_get_contents());
        ob_end_clean();
        if ($block['body'] != "") {
            if ($use_template === false) {
                print $block['body'];
            } else {
                if (file_exists($template_path . "/blocks/block-".$block['record_num'].".php")) {
                    include($template_path . "/blocks/block-".$block['record_num'].".php");
                } else {
                    include($template_path . "/blocks/block.php");
                }
            }
        }
    }
}

function isLoggedIn() {
    return isset($_SESSION['userid']) && is_numeric($_SESSION['userid']);
}

function isVerified() {
    return isset($_SESSION['email_verified']) && $_SESSION['email_verified'] == 1;
}

function loginUser($ref = '') {
    global $basehttp;
    header("Location: $basehttp/$ref");
}