コード例 #1
0
<?php

$fileInfo = array('title' => '', 'fileName' => 'includes/amazonBillingMethods.php');
$debug->newFile($fileInfo['fileName']);
$success = false;
if (MODE == 'buildAmazonBilling') {
    buildAmazonBilling();
} elseif (MODE == 'addMonth') {
    addMonth();
} else {
    $debug->add('There is no matching mode in ' . $fileInfo['fileName'] . '.');
}
function addMonth()
{
    global $debug, $message, $success, $Dbc, $returnThis;
    $output = '';
    try {
        if (empty($_POST['date'])) {
            throw new Adrlist_CustomException();
        }
        $date = Adrlist_Time::addToDate($_POST['date'], 'month', 1);
        $date = $date->format('Y-m-d');
        if (MODE == 'addMonth') {
            $success = true;
            $returnThis['output'] = $date;
        }
    } catch (Adrlist_CustomException $e) {
    }
    if (MODE == 'addMonth') {
        returnData();
    } else {
コード例 #2
0
ファイル: amazonBilling.php プロジェクト: mark-orussa/Adrlist
<?php

require_once '../../includes/siteAdmin.php';
$fileInfo = array('title' => 'Amazon Billing', 'fileName' => 'admin/amazonBilling.php');
$debug->newFile($fileInfo['fileName']);
$buildPage = new Adrlist_BuildPage();
$buildPage->addIncludes('amazonBillingMethods.php');
$buildPage->addJs(array('jquery/jquery.datetimepicker.js', 'amazonBilling.js', 'dateHandling.js'));
$buildPage->addCss(array('jquery.datetimepicker.css'));
echo $buildPage->output(), '
<div class="layout" id="main">
	<div class="textCenter textXlarge">
		', $fileInfo['title'], '
	</div>
	<div class="textCenter" id="amazonBillingHolder">
		', buildAmazonBilling(), '
	</div>
</div>
', $buildPage->buildFooter();