/** * If a method is passed in the GET url parameter * * http://localhost/controller/method/(param)/(param)/(param) * url[0] = Controller * url[1] = Method * url[2] = Param * url[3] = Param * url[4] = Param */ private function _callControllerMethod() { $length = count($this->_url); // Make sure the method we are calling exists if ($length > 1) { if (!method_exists($this->_controller, $this->_url[1])) { $this->_controller->index(); return false; } } // Determine what to load switch ($length) { case 5: //Controller->Method(Param1, Param2, Param3) $this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4]); break; case 4: //Controller->Method(Param1, Param2) $this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3]); break; case 3: //Controller->Method(Param1) $this->_controller->{$this->_url[1]}($this->_url[2]); break; case 2: //Controller->Method() $this->_controller->{$this->_url[1]}(); break; default: $this->_controller->index(); break; } return true; }
public function _new() { parent::_new(); $resource = $this->_uses[$this->modeltype]; $db = DB::Instance(); if ($resource->isLoaded()) { $this->_data['work_schedule_id'] = $resource->work_schedule_id; $this->view->set('workschedule', $resource->work_schedule_detail); } elseif (isset($this->_data['work_schedule_id'])) { $resource->work_schedule_id = $this->_data['work_schedule_id']; $this->view->set('workschedule', $resource->work_schedule_detail); } else { $workschedule = DataObjectFactory::Factory('WorkSchedule'); $cc = new ConstraintChain(); $cc->add(new Constraint('status', '!=', $workschedule->completedStatus())); $cc->add(new Constraint('status', '!=', $workschedule->cancelledStatus())); $this->view->set('workschedules', $workschedule->getAll($cc)); } $person = DataObjectFactory::Factory('Person'); $cc = new ConstraintChain(); $cc->add(new Constraint('company_id', '=', COMPANY_ID)); $this->view->set('people', $person->getAll($cc)); $resources = new EngineeringResourceCollection($this->_templateobject); $sh = $this->setSearchHandler($resources); $sh->addConstraint(new Constraint('work_schedule_id', '=', $resource->work_schedule_id)); parent::index($resources, $sh); $this->view->set('clickaction', 'edit'); }
public function view() { $flash = Flash::Instance(); // Preserve any search criteria selection so that the context is maintained $s_data = array(); if (isset($this->_data['id'])) { $s_data['wh_transfer_id'] = $this->_data['id']; } $whtransfer = new WHTransfer(); $whtransfer->load($this->_data['id']); $this->view->set('whtransfer', $whtransfer); $from_store = WHLocation::getStoreLocation($whtransfer->from_whlocation_id); $this->view->set('from_store', $from_store); $to_store = WHLocation::getStoreLocation($whtransfer->to_whlocation_id); $this->view->set('to_store', $to_store); $this->setSearch('whtransfersSearch', 'useDefault', $s_data); parent::index(new WHTransferlineCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebarlist = array(); $sidebarlist['awaiting'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'selectWHTransfers')), 'tag' => 'View Transfers Awaiting Despatch'); $sidebarlist['completed'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'viewWHTransfers')), 'tag' => 'View Completed Transfers'); if ($whtransfer->awaitingTransfer()) { $sidebarlist['edit'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'transferStock', 'id' => $whtransfer->id)), 'tag' => 'Action this Transfer'); } if ($whtransfer->transferred()) { $sidebarlist['edit'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'printaction', 'printaction' => 'printTransferNote', 'filename' => 'WHT' . $whtransfer->transfer_number, 'id' => $whtransfer->id)), 'tag' => 'Reprint Transfer Note'); } $sidebar->addList('Actions', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $flash = Flash::Instance(); // Preserve any search criteria selection so that the context is maintained $s_data = array(); if (isset($this->_data['id'])) { $s_data['wh_transfer_id'] = $this->_data['id']; } $this->view->set('clickaction', 'view'); $whtransfer = new WHTransfer(); $whtransfer->load($this->_data['id']); $this->view->set('whtransfer', $whtransfer); $from_store = WHLocation::getStoreLocation($whtransfer->from_whlocation_id); $this->view->set('from_store', $from_store); $to_store = WHLocation::getStoreLocation($whtransfer->to_whlocation_id); $this->view->set('to_store', $to_store); $this->setSearch('whtransfersSearch', 'useDefault', $s_data); parent::index(new WHTransferlineCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebarlist = array(); $sidebarlist['all'] = array('tag' => 'View All Transfers', 'link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'index'))); if ($whtransfer->awaitingTransfer()) { $sidebarlist['edit'] = array('tag' => 'Edit this Transfer', 'link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'edit', 'id' => $whtransfer->id))); $sidebarlist['cancel'] = array('tag' => 'Cancel this Transfer', 'link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'cancel', 'id' => $whtransfer->id))); } $sidebar->addList('Actions', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function view() { if (!$this->loadData()) { $this->dataError(); sendBack(); } $accesslist = $this->_uses[$this->modeltype]; // $this->addSidebar($systempolicy); $policy_permissions = new SystemPolicyControlListCollection(); $sh = $this->setSearchHandler($policy_permissions); $sh->addConstraint(new Constraint('access_lists_id', '=', $accesslist->{$accesslist->idField})); parent::index($policy_permissions, $sh); $this->view->set('no_ordering', true); $sidebar = new SidebarController($this->view); $sidebarlist = array(); $sidebarlist['alllists'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'index'), 'tag' => 'View All System Access Lists'); $sidebar->addList('Actions', $sidebarlist); $sidebarlist = array(); $sidebarlist['edit'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'edit', 'id' => $accesslist->{$accesslist->idField}), 'tag' => 'edit_access_list'); $sidebarlist['delete'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'delete', 'id' => $accesslist->{$accesslist->idField}), 'tag' => 'delete_access_list'); $sidebarlist['addpermission'] = array('link' => array('modules' => $this->_modules, 'controller' => 'systempolicycontrollists', 'action' => '_new', 'object_policies_id' => $accesslist->{$accesslist->idField}), 'tag' => 'add_policy_permission'); $sidebar->addList('This Policy', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); $errors = array(); $s_data = array(); // Set context from calling module if (isset($this->_data['username'])) { $s_data['username'] = $this->_data['username']; } if (isset($this->_data['glcentre_id'])) { $s_data['glcentre_id'] = $this->_data['glcentre_id']; } $this->setSearch('poauthlimitsSearch', 'useDefault', $s_data); $username = $this->search->getValue('username'); $glcentre_id = $this->search->getValue('glcentre_id'); parent::index(new POAuthLimitCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $actions = array(); $actions['new'] = array('tag' => 'New Authorisation Limit', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new')); if (isset($s_data['username']) && $s_data['username'] != '') { $actions['forperson'] = array('tag' => 'New Authorisation Limit for this person', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new', 'username' => $username)); } if (isset($s_data['glcentre_id']) && $s_data['glcentre_id'] != '0') { $actions['foraccount'] = array('tag' => 'New Authorisation Limit for this GL Centre', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new', 'glcentre_id' => $s_data['glcentre_id'])); } $sidebar->addList('Actions', $actions); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { parent::index($pi = new ProjectEquipmentAllocationCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'projects', 'controller' => 'ProjectEquipmentAllocations', 'action' => 'new'), 'tag' => 'new_Project Equipment Allocation'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'edit'); parent::index(new ComplaintCodeCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => $this->_modules['module'], 'controller' => $this->name, 'action' => 'new'), 'tag' => 'New Complaint Code'), 'view_scc' => array('link' => array('module' => $this->_modules['module'], 'controller' => 'Supplementarycomplaintcodes', 'action' => 'index'), 'tag' => 'View Supplementary Complaint Codes'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'edit'); parent::index(new SOPriceTypeCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'new_Price_Type'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new NewsletterCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'crm', 'controller' => 'Newsletters', 'action' => 'new'), 'tag' => 'new_Newsletter'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'edit'); parent::index(new POrderLineCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('tag' => 'new_POrderLine', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new'))))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new TicketAttachmentCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'ticketing', 'controller' => 'attachments', 'action' => 'new'), 'tag' => 'New Attachment'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new SystemcompanyCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'system_admin', 'controller' => 'systemcompanys', 'action' => 'new'), 'tag' => 'new_system_company'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { global $smarty; $this->view->set('clickaction', 'edit'); parent::index(new CalendarEventAttendeeCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'calendar', 'controller' => 'CalendarEventAttendees', 'action' => 'new'), 'tag' => 'new_Event_Attendee'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { parent::index(new ResourcetemplateCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'projects', 'controller' => 'resourcetemplate', 'action' => 'new'), 'tag' => 'new_resource_template'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); $this->view->set('no_delete', false); $this->view->set('clickaction', 'view'); }
public function index() { global $smarty; $this->view->set('clickaction', 'edit'); parent::index(new UsercompanyaccessCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'system_admin', 'controller' => 'Usercompanyaccesss', 'action' => 'new'), 'tag' => 'new_user_company_access'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { global $smarty; $this->view->set('clickaction', 'edit'); parent::index(new OpportunityNoteCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'crm', 'controller' => 'OpportunityNotes', 'action' => 'new'), 'tag' => 'new_OpportunityNote'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickcontroller', 'whtransferlines'); $this->view->set('clickaction', 'index'); parent::index(new WHTransferCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('tag' => 'New Transfer', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new'))))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { // Click action index to prevent future editing $this->view->set('clickaction', 'index'); $this->view->set('orderby', 'year'); parent::index(new ComplaintVolumeCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => $this->_modules['module'], 'controller' => $this->name, 'action' => 'new'), 'tag' => 'Add New Sales Data'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { global $smarty, $module, $submodule; $this->view->set('clickaction', 'edit'); $this->view->set('orderby', 'module_name'); parent::index(new ModuleAdminCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => $module, 'submodule' => $submodule, 'controller' => 'moduleadmins', 'action' => 'new'), 'tag' => 'New Module Admin'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new TicketReleaseVersionCollection($this->_templateobject)); $sidebarlist = array(); $sidebarlist['all_tickets'] = array('link' => array('modules' => $this->_modules, 'controller' => 'tickets', 'action' => 'view'), 'tag' => 'View All Tickets'); $sidebarlist['new'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'New Release Version'); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
function index() { $this->EstLocation = 1; $this->nom_sing = 'une société'; $this->nom_plur = 'sociétés'; if ($_REQUEST['page']) { $this->action_admin = 'Modifier une ' . $this->nom_sing; } else { $this->action_admin = 'Ajouter une ' . $this->nom_sing; } return parent::index(); }
public function profile($id, $first_name) { parent::index(); $id = explode('-', $id); $id = $id['0']; $id = intval($id); $this->f3->set('page_name', ucwords($first_name) . '\'s Profile'); $first_name = strtolower($first_name); $this->f3->set('main', 'views/members/profile.html'); $this->f3->set('js', 'loadProfile(' . $id . ',\'' . $first_name . '\')'); echo View::instance()->render('views/layout.html'); }
public function index() { $s_data = null; $errors = array(); $this->setSearch('ProjectSearch', 'resources', $s_data, $errors); $this->view->set('clickaction', 'edit'); parent::index($pi = new ResourceCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'new_project_resource'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new ARGroupCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebarlist = array(); $sidebarlist['showall'] = array('tag' => 'View All Assets', 'link' => array_merge($this->_modules, array('controller' => 'assets', 'action' => 'index'))); $sidebarlist['viewtrans'] = array('tag' => 'View All Transactions', 'link' => array_merge($this->_modules, array('controller' => 'artransactions', 'action' => 'index'))); $sidebarlist['new'] = array('tag' => 'New Transaction', 'link' => array_merge($this->_modules, array('controller' => 'artransactions', 'action' => 'new'))); $sidebar->addList('Actions', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $moduleobjects = new ModuleObjectCollection($this->_templateobject); $sh = new SearchHandler($moduleobjects, false); $sh->extract(); parent::index(new ModuleObjectCollection($this->_templateobject), $sh); $this->view->set('clickaction', 'view'); $sidebar = new SidebarController($this->view); $sidebarlist['new'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'New'); $sidebar->addList('Actions', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { global $smarty; $this->view->set('clickaction', 'edit'); $s_data = array(); $errors = array(); $this->setSearch('CampaignSearch', 'useDefault', $s_data); parent::index(new CampaignCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'crm', 'controller' => 'Campaigns', 'action' => 'new'), 'tag' => 'new_campaign'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { global $smarty; $s_data = array(); // Set context from calling module if (isset($this->_data['username'])) { $s_data['username'] = $this->_data['username']; } if (isset($this->_data['roleid'])) { $s_data['roleid'] = $this->_data['roleid']; } $this->setSearch('AdminSearch', 'HasRole', $s_data); parent::index(new HasRoleCollection($this->_templateobject)); }
public function index() { // Search $errors = array(); $s_data = array(); // Set context from calling module // $this->setSearch('SystemPolicySearch', 'useDefault', $s_data); parent::index(new SystemPolicyControlListCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'New System Policy Access List'))); $this->view->register('sidebar', $sidebar); $this->view->set('page_title', $this->getPageName('', 'List')); $this->view->set('clickaction', 'edit'); $this->view->set('sidebar', $sidebar); }
public function index() { $collection = new TicketCollection($this->_templateobject); $sh = new SearchHandler($collection, false); $sh->extract(); $sh->setFields(array('id' => 'id', 'summary' => 'summary', 'originator_person' => 'originator_person', 'client_ticket_status' => 'client_ticket_status', 'client_ticket_priority' => 'client_ticket_priority', 'client_ticket_severity' => 'client_ticket_severity', 'created' => 'created', 'lastupdated' => 'lastupdated')); $this->setSearch('TicketsSearch', 'useClient'); parent::index($collection, $sh); $this->view->set('no_delete', true); $this->view->set('clickaction', 'view'); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'ticketing', 'controller' => 'client', 'action' => 'new'), 'tag' => 'New Ticket'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }