PHP Classes

File: htdocs/modules/protector/index.php

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/modules/protector/index.php   Download  
File: htdocs/modules/protector/index.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change: Cascading dirname(...) calls
Merge branch 'master' into feature/remove_error_suppression_operator
Merge xswatch4
Date: 2 months ago
Size: 475 bytes
 

Contents

Class file image Download
<?php

require dirname(__DIR__, 2) . '/mainfile.php';
defined('XOOPS_TRUST_PATH') || exit('set XOOPS_TRUST_PATH in mainfile.php');

$mydirname = basename(__DIR__);
$mydirpath = __DIR__;
require
$mydirpath . '/mytrustdirname.php'; // set $mytrustdirname

if (isset($_GET['mode']) && $_GET['mode'] === 'admin') {
    require
XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/admin.php';
} else {
    require
XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/main.php';
}