Beispiel #1
0
<?php

require_once '../../includes/auth.php';
$fileInfo = array('title' => 'Report for', 'fileName' => 'adrLists/report.php');
$debug->newFile($fileInfo['fileName']);
$buildPage = new Adrlist_BuildPage();
$buildPage->addIncludes('reportMethods.php');
$buildPage->addJs('report.js');
echo $buildPage->output(), '
<div class="layout" id="main">
	<div class="relative textCenter">
	', buildReport(), buildTRT(), '
	</div>
</div>
', $buildPage->buildFooter();
Beispiel #2
0
<?php

/*
This file and it's functions are to be used solely by ../lists/report.php in conjunction with ../js/report.js.
*/
$fileInfo = array('fileName' => 'includes/reportMethods.php');
$debug->newFile($fileInfo['fileName']);
$success = false;
if (!empty($_POST['mode']) && isset($_SESSION['listId']) && (bool) $_SESSION['listId']) {
    define('MODE', $_POST['mode']);
    $debug->add('MODE: ' . MODE);
    if (isset($_SESSION['listRoleId']) && $_SESSION['listRoleId'] > 1) {
        if ($_POST['mode'] == 'buildReport') {
            buildReport();
        } elseif ($_POST['mode'] == 'buildTRT') {
            buildTRT();
        } else {
            $debug->add('No matching mode in ' . $fileInfo['fileName'] . '.');
        }
    }
} else {
    define('MODE', '');
    if (empty($_POST['mode'])) {
        $debug->add('$_POST[\'mode\'] is empty.');
    } elseif (!isset($_SESSION['listId'])) {
        $debug->add('$_SESSION[\'listId\'] is not defined.');
    } elseif (!(bool) $_SESSION['listId']) {
        $debug->add('$_SESSION[\'listId\'] does not contain a value.');
    } else {
        $debug->add('Something else is wrong.');
    }