function _updateClient($eid, $id) { $mainframe = JFactory::getApplication(); ## Include the confirmation class to sent the tickets. $path = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'classes' . DS . 'confirmation.php'; $override = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'classes' . DS . 'override' . DS . 'confirmation.php'; ## Check if the override is there. if (file_exists($override)) { ## Yes, now we use it. require_once $override; } else { ## No, use the standard require_once $path; } if (isset($eid)) { $sendconfirmation = new confirmation((int) $eid); $sendconfirmation->doConfirm(); $sendconfirmation->doSend(); } $mainframe->redirect('index.php', JText::_('COM_TICKETMASTER_CONFIRM_OK')); }
function _doConfirm($eid) { ## Include the confirmation class to sent the tickets. $path = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'classes' . DS . 'confirmation.php'; $override = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'classes' . DS . 'override' . DS . 'confirmation.php'; ## Check if the override is there. if (file_exists($override)) { ## Yes, now we use it. require_once $override; } else { ## No, use the standard require_once $path; } if (isset($eid)) { $sendconfirmation = new confirmation((int) $eid); $sendconfirmation->doConfirm(); $sendconfirmation->doSend(); } }
function validate() { $mainframe = JFactory::getApplication(); ## Getting the POST variables. $post = JRequest::get('post'); if ($this->ordercode == 0) { $msg = JText::_('COM_TICKETMASTER_NO_VALID_ID'); $mainframe->redirect('index.php?option=com_ticketmaster', $msg); } if ($this->id == 0) { $msg = JText::_('COM_TICKETMASTER_NO_VALID_ID'); $mainframe->redirect('index.php?option=com_ticketmaster', $msg); } ## GETTING THE MODEL TO SAVE $model = $this->getModel('validate'); ## OK, all tickets have been added to the database session.<br /> ## We need to update the table for total-tickets. $path_include = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'classes' . DS . 'confirmation.php'; include_once $path_include; if (isset($this->ordercode)) { $sendconfirmation = new confirmation((int) $this->ordercode); $sendconfirmation->doConfirm(); $sendconfirmation->doSend(); } if (!$model->update($this->ordercode, $this->id)) { $msg = JText::_('COM_TICKETMASTER_VALIDATION_FAILED'); $mainframe->redirect('index.php?option=com_ticketmaster', $msg); } $msg = JText::_('COM_TICKETMASTER_VALIDATED'); $mainframe->redirect('index.php?option=com_ticketmaster', $msg); }