Example #1
0
/**
*/
function dPgetMicroDiff()
{
    global $microTimeSet;
    $mt = $microTimeSet;
    dPsetMicroTime();
    return sprintf("%.3f", $microTimeSet - $mt);
}
Example #2
0
<?php

/* CALENDAR $Id: index.php,v 1.30 2005/03/18 08:35:50 gregorerhardt Exp $ */
$AppUI->savePlace();
dPsetMicroTime();
require_once $AppUI->getModuleClass('companies');
require_once $AppUI->getModuleClass('tasks');
// retrieve any state parameters
if (isset($_REQUEST['company_id'])) {
    $AppUI->setState('CalIdxCompany', intval($_REQUEST['company_id']));
}
$company_id = $AppUI->getState('CalIdxCompany', $AppUI->user_company);
// Using simplified set/get semantics. Doesn't need as much code in the module.
$event_filter = $AppUI->checkPrefState('CalIdxFilter', @$_REQUEST['event_filter'], 'EVENTFILTER', 'my');
// get the passed timestamp (today if none)
$date = dPgetParam($_GET, 'date', null);
// get the list of visible companies
$company = new CCompany();
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => $AppUI->_('All')), $companies);
#echo '<pre>';print_r($events);echo '</pre>';
// setup the title block
$titleBlock = new CTitleBlock('Monthly Calendar', 'myevo-appointments.png', $m, "{$m}.{$a}");
$titleBlock->addCell($AppUI->_('Company') . ':');
$titleBlock->addCell(arraySelect($companies, 'company_id', 'onChange="document.pickCompany.submit()" class="text"', $company_id), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickCompany">', '</form>');
$titleBlock->addCell($AppUI->_('Event Filter') . ':');
$titleBlock->addCell(arraySelect($event_filter_list, 'event_filter', 'onChange="document.pickFilter.submit()" class="text"', $event_filter, true), '', "<Form action='{$_SERVER['REQUEST_URI']}' method='post' name='pickFilter'>", '</form>');
$titleBlock->show();
?>

<script language="javascript">