mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 22:39:03 +02:00
Moved under "trunk" to be able to track releases under "tags"
SVN:code[55]
This commit is contained in:
40
trunk/pages/ajax.php
Normal file
40
trunk/pages/ajax.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
require_once('../application/application.class.inc.php');
|
||||
require_once('../application/nicewebpage.class.inc.php');
|
||||
|
||||
require_once('../application/startup.inc.php');
|
||||
|
||||
function ReadParam($sName, $defaultValue = "")
|
||||
{
|
||||
return isset($_REQUEST[$sName]) ? $_REQUEST[$sName] : $defaultValue;
|
||||
}
|
||||
|
||||
$oPage = new nice_web_page("Asynchronous versus asynchronous DisplayBlocks");
|
||||
$oPage->no_cache();
|
||||
$oPage->add("<h1>Asynchronous versus asynchronous DisplayBlocks</h1>\n");
|
||||
|
||||
$oContext = new UserContext();
|
||||
$operation = ReadParam('operation', '');
|
||||
$sClassName = ReadParam('class', 'bizContact');
|
||||
$sOrganizationCode = ReadParam('org', 'ITOP');
|
||||
|
||||
$oPage->p("[Synchronous] Count of all $sClassName objects for organization '$sOrganizationCode'");
|
||||
$oFilter = $oContext->NewFilter($sClassName);
|
||||
$oFilter ->AddCondition('organization', $sOrganizationCode, '=');
|
||||
$oBlock = new DisplayBlock($oFilter, 'count', false);
|
||||
$oBlock->Display($oPage, "block1");
|
||||
|
||||
$oPage->p("[Asynchronous] All $sClassName objects for organization '$sOrganizationCode'");
|
||||
$oFilter = $oContext->NewFilter($sClassName);
|
||||
$oFilter ->AddCondition('organization', $sOrganizationCode, '=');
|
||||
$oBlock = new DisplayBlock($oFilter, 'list', true);
|
||||
$oBlock->Display($oPage, "block2");
|
||||
|
||||
$oPage->p("[Asynchronous] Details of all $sClassName objects for organization '$sOrganizationCode'");
|
||||
$oFilter = $oContext->NewFilter($sClassName);
|
||||
$oFilter ->AddCondition('organization', $sOrganizationCode, '=');
|
||||
$oBlock = new DisplayBlock($oFilter, 'details', true);
|
||||
$oBlock->Display($oPage, "block3");
|
||||
|
||||
$oPage->output();
|
||||
?>
|
||||
Reference in New Issue
Block a user