<?php require_once "AMP/System/Page.inc.php"; require_once "Modules/Schedule/Item/ComponentMap.inc.php"; $map = new ComponentMap_ScheduleItem(); $page = new AMPSystem_Page($dbcon, $map); if (isset($_GET['action']) && $_GET['action'] == "list") { $page->showList(true); } if (isset($_GET['schedule_id']) && $_GET['schedule_id']) { $page->addCallback('list', 'addCriteria', array('schedule_id=' . $_GET['schedule_id'], true)); $page->addCallback('form', 'setDefaultValue', array('schedule_id', $_GET['schedule_id'])); } if (isset($_GET['owner_id']) && $_GET['owner_id']) { $page->addCallback('list', 'addCriteria', array('owner_id=' . $_GET['owner_id'], true)); $page->addCallback('form', 'setDefaultValue', array('owner_id', $_GET['owner_id'])); } $page->execute(); print $page->output();
<?php require_once 'AMP/System/Page.inc.php'; require_once 'Modules/Calendar/Feeds/CalendarFeeds.php'; require_once 'Modules/Calendar/Feeds/ComponentMap.inc.php'; $map = new ComponentMap_CalendarFeeds(); $page = new AMPSystem_Page($dbcon, $map); if (isset($_GET['action']) && $_GET['action'] == "update") { $feeds = new CalendarFeeds($dbcon); if ($feeds->update()) { $page->setMessage('Updated feeds'); } else { $page->setMessage('Could not update feeds', $is_error = true); } $page->showList(true); } if (isset($_GET['action']) && $_GET['action'] == "list") { $page->showList(true); } $page->execute(); print $page->output();
function _initController() { if (class_exists('AMPSystem_Page')) { $this->_controller =& AMPSystem_Page::instance(); } }
function commitSearch() { parent::commitSearch(); $this->dropComponent('menu'); }
<?php require_once 'Modules/Schedule/Appointment/ComponentMap.inc.php'; require_once 'AMP/System/Page.inc.php'; $map = new ComponentMap_Appointment(); $page = new AMPSystem_Page($dbcon, $map); if (isset($_GET['action']) && $_GET['action'] == 'list') { $page->showList(true); } $item_id = false; // for single schedule items if (isset($_GET['scheduleitem_id']) && $_GET['scheduleitem_id']) { $item_id = $_GET['scheduleitem_id']; } if (isset($_GET['action_id']) && $_GET['action_id']) { $item_id = $_GET['action_id']; } if ($item_id) { $page->addCallback('form', 'setDefaultValue', array('action_id', $item_id)); $page->addCallback('list', 'addCriteria', array('action_id=' . $item_id, true)); } // for single users if (isset($_GET['userdata_id']) && ($user_id = $_GET['userdata_id'])) { $page->addCallback('form', 'setDefaultValue', array('userdata_id', $user_id)); $page->addCallback('list', 'addCriteria', 'userdata_id=' . $user_id); } // for single schedules if (isset($_GET['schedule_id']) && ($schedule_id = $_GET['schedule_id'])) { $page->addCallback('form', 'setSchedule', $schedule_id); $page->addCallback('list', 'appendEditLinkVar', 'schedule_id=' . $schedule_id); $itemset =& ScheduleLookup_ItemSet::instance($schedule_id);