..one or more modules you must have seen the iframes used for realtime result display. In this tutorial I'm going to show you how to insert them into your module and how they..
xAnalyze is a module that can search through corrupt data and configuration files in order to find the exact position of errors
<?php
/* Authentication checker */
if(!defined('IN_SCRIPT')){
exit;
}
if(!defined("PASS_WO_LOGIN")){
// make sure we have any sort of authentication setup
if(!@$_CONTEXT['pass_access']){
if(!@$_CONTEXT['ip_access']){
// as long as we don't have any type of authentication, redirect to setup
header("Location: setup.php");
exit;
}
}
// block unauthorized ip access
if(isset($_CONTEXT['ip_access']) && $_CONTEXT['ip_access']){
if(in_array($_SERVER['REMOTE_ADDR'],$_CONTEXT['ip_allowed'])){
$bLoggedTHC = true;
}
}
// block unauthorized access without a password specified
if(isset($_CONTEXT['pass_access']) && $_CONTEXT['pass_access']==true){
$sCookieName = "thcauth_".substr($_CONTEXT['pass_hash'],0,5);
if(!isset($_COOKIE[$sCookieName])){
header("Location: ".$_PATHS['root_http']."/login.php");
exit;
}
$bLoggedTHC = ($_COOKIE[$sCookieName]==$_CONTEXT['pass_hash'] ? true : false);
}
if(!$bLoggedTHC){
// redirect on login failure
header("Location: ".$_CONTEXT['redirect_fail_login']);
exit;
}
}
?>