Beispiel #1
0
        $domain = cmtx_url_decode(cmtx_setting('site_domain'));
        //get domain
        if (!stristr($referrer, $domain)) {
            //if referrer does not contain domain
            ?>
			<span class='negative'>The referrer has external origin.</span>
			<p />
			You have arrived at this page from outside of the admin panel.
			<p />
			Please access this page through the menu above.
			<?php 
            die;
        }
    }
}
if (cmtx_restrict_page($_GET['page'])) {
    echo '<h3>Page Restricted</h3>';
    echo '<hr class="title"/>';
    echo 'You don\'t have permission to view this page.';
    die;
}
$access_log = cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "access`");
$total = cmtx_db_num_rows($access_log);
if ($total >= 100) {
    cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "access` ORDER BY `dated` ASC LIMIT 1");
}
if (file_exists('includes/pages/' . basename($_GET['page']) . '.php')) {
    $admin_id = cmtx_get_admin_id();
    $username = cmtx_sanitize($_SESSION['cmtx_username']);
    $page = cmtx_sanitize(basename($_GET['page']));
    $ip_address = cmtx_get_ip_address();
Beispiel #2
0
<?php 
    if (!cmtx_restrict_page("tool_db_backup")) {
        ?>
 <li><a href="index.php?page=tool_db_backup"><?php 
        echo CMTX_MENU_TITLE_TOOLS_DB_BACKUP;
        ?>
</a></li> <?php 
    }
    if (!cmtx_restrict_page("tool_optimize_tables")) {
        ?>
 <li><a href="index.php?page=tool_optimize_tables"><?php 
        echo CMTX_MENU_TITLE_TOOLS_OPTIMIZE_TABLES;
        ?>
</a></li> <?php 
    }
    if (!cmtx_restrict_page("tool_text_finder")) {
        ?>
 <li><a href="index.php?page=tool_text_finder"><?php 
        echo CMTX_MENU_TITLE_TOOLS_TEXT_FINDER;
        ?>
</a></li> <?php 
    }
    ?>
</ul>
<?php 
}
?>

<ul id="help" class="ddsubmenustyle">
<li><a href="http://www.commentics.org/support/knowledgebase.php" target="_blank"><?php 
echo CMTX_MENU_TITLE_HELP_FAQ;