Ejemplo n.º 1
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  */
 public function cancel($key = null)
 {
     JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN', true));
     $app = JFactory::getApplication();
     $context = 'com_jhotelreservation.edit.extraoption';
     $result = parent::cancel();
 }
Ejemplo n.º 2
0
 /**
  * Override parent cancel method to reset the add module state.
  */
 public function cancel($key = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     parent::cancel();
     $app->setUserState('com_modules.add.module.extension_id', null);
 }
Ejemplo n.º 3
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  */
 public function cancel($key = null)
 {
     JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     $app = JFactory::getApplication();
     $context = 'com_jbusinessdirectory.edit.managecompanyevent';
     $result = parent::cancel();
 }
Ejemplo n.º 4
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  Boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     $return = parent::cancel($key);
     // Redirect to the main page.
     $this->setRedirect(JRoute::_('index.php', false));
     return $return;
 }
Ejemplo n.º 5
0
 /**
  * Method to cancel an edit.
  *
  * @param     string     $key    The name of the primary key of the URL variable.
  *
  * @return    boolean            True if access level checks pass, false otherwise.
  */
 public function cancel($key = 'id')
 {
     $result = parent::cancel($key);
     // Redirect to the return page.
     $this->setRedirect($this->getReturnPage());
     return $result;
 }
Ejemplo n.º 6
0
 /**
  * Override parent cancel method to reset the add module state.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     $app = JFactory::getApplication();
     $result = parent::cancel();
     $app->setUserState('com_modules.add.module.extension_id', null);
     $app->setUserState('com_modules.add.module.params', null);
     return $result;
 }
Ejemplo n.º 7
0
 public function cancel($key = null)
 {
     parent::cancel($key);
     $model = $this->getModel();
     if ($model->getTempId()) {
         $this->setRedirect(JRoute::_('index.php?option=com_rsmembership&view=transactions', false));
     }
 }
Ejemplo n.º 8
0
 /**
  * 
  * cancel the slide save
  */
 public function cancel($key = null)
 {
     //bypass direct saving restrictions
     $context = "{$this->option}.edit.{$this->context}";
     $recordId = JRequest::getInt("id");
     $this->holdEditId($context, $recordId);
     parent::cancel($key);
     $this->setRedirectToSlides();
 }
Ejemplo n.º 9
0
 /**
  * Override parent cancel method to reset the add module state.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $result = parent::cancel();
     $app->setUserState('com_modules.add.module.extension_id', null);
     $app->setUserState('com_modules.add.module.params', null);
     $this->setRedirect(JRoute::_(sprintf('index.php?option=%s&view=modules', RokSprocket_Helper::getRedirectionOption()), false));
     return $result;
 }
Ejemplo n.º 10
0
 public function cancel($key = null)
 {
     parent::cancel($key = null);
     $app = JFactory::getApplication();
     $rootCat = JUDirectoryFrontHelperCategory::getRootCategory();
     $parent_cat_id = $app->input->getInt('parent_id', $rootCat->id);
     $cat_id = $app->input->getInt('id', 0);
     if ($cat_id) {
         $parent_cat_id = JUDirectoryHelper::getCategoryById($cat_id)->parent_id;
     }
     $this->setRedirect("index.php?option=com_judirectory&view=listcats&cat_id=" . $parent_cat_id);
 }
Ejemplo n.º 11
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     $app = JFactory::getApplication();
     $context = 'com_menus.edit.item';
     $result = parent::cancel();
     if ($result) {
         // Clear the ancillary data from the session.
         $app->setUserState($context . '.type', null);
         $app->setUserState($context . '.link', null);
     }
 }
Ejemplo n.º 12
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     Session::checkToken() or exit(Lang::txt('JINVALID_TOKEN'));
     // Initialise variables.
     $context = 'com_menus.edit.item';
     $result = parent::cancel();
     if ($result) {
         // Clear the ancillary data from the session.
         User::setState($context . '.type', null);
         User::setState($context . '.link', null);
     }
 }
Ejemplo n.º 13
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN', true));
     // Initialise variables.
     $app = JFactory::getApplication();
     $context = 'com_jhotelreservation.edit.room';
     $result = parent::cancel();
     if ($result) {
         // Clear the ancillary data from the session.
         $app->setUserState($context . '.type', null);
         $app->setUserState($context . '.link', null);
     }
 }
Ejemplo n.º 14
0
 /**
  * Override parent cancel method to reset the add module state.
  *
  * @param   string $key The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     $app = JFactory::getApplication();
     $result = parent::cancel();
     $app->setUserState('com_advancedmodules.add.module.extension_id', null);
     $app->setUserState('com_advancedmodules.add.module.params', null);
     if (!JFactory::getApplication()->isAdmin()) {
         $returnUri = $this->input->post->get('return', null, 'base64');
         $returnUri = !empty($returnUri) ? base64_decode(urldecode($returnUri)) : JUri::base();
         $this->setRedirect($returnUri);
         $this->redirect();
     }
     return $result;
 }
Ejemplo n.º 15
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   12.2
  */
 public function cancel($key = null)
 {
     $result = parent::cancel();
     $data = $this->input->get("jform", array(), "array");
     $view = $data['type'];
     switch ($view) {
         case "":
             $view = $this->view_list;
             break;
         case "component.admin":
         case "component.site":
         case "table.admin":
         case "table.site":
             $view = "component";
             break;
         default:
             break;
     }
     $this->setRedirect(JRoute::_("index.php?option=com_jdeveloper&view=" . $view . "&id=" . $data["item_id"], false));
     return $result;
 }
Ejemplo n.º 16
0
 public function save($key = null, $urlVar = null)
 {
     $db =& JFactory::getDBO();
     $exp_array = array();
     $data = JRequest::getVar('jform', array(), 'post', 'array');
     $usergroup = 0;
     if ($_GET["id"] == 0) {
         $usergroup = $data['usergroup'];
     } else {
         $usergroup = $_GET['id'];
     }
     foreach ($data['experimentselect'] as $experiment) {
         $experiment_array = explode(',', $experiment);
         array_push($exp_array, $experiment_array[0]);
         $query = "SELECT gid FROM #__weblab WHERE gid = " . $usergroup . " AND exp_name='" . $experiment_array[0] . "' AND cat_name='" . $experiment_array[1] . "'";
         $db->setQuery($query);
         $column = $db->loadResultArray();
         if (empty($column)) {
             $query = "INSERT INTO #__weblab (gid, exp_name, cat_name) VALUES (" . $usergroup . ", '" . $experiment_array[0] . "','" . $experiment_array[1] . "')";
             $db->setQuery($query);
             $db->query();
         }
     }
     $query = "SELECT exp_name FROM #__weblab WHERE gid = " . $usergroup;
     $db->setQuery($query);
     $column = $db->loadResultArray();
     foreach ($column as $exp_name) {
         if (!in_array($exp_name, $exp_array)) {
             $query = "DELETE FROM #__weblab WHERE exp_name='" . $exp_name . "' AND gid=" . $usergroup;
             $db->setQuery($query);
             $db->query();
         }
     }
     //print_r(parent::save($key, $urlVar));
     parent::cancel();
 }
Ejemplo n.º 17
0
 public function cancel($key = null)
 {
     JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
     $app = JFactory::getApplication();
     $listing_id = $app->input->getInt('id', 0);
     if ($listing_id) {
         $listingObject = JUDirectoryHelper::getListingById($listing_id);
         $cat_id = $listingObject->cat_id;
     } else {
         $fieldCategory = JUDirectoryFrontHelperField::getField('cat_id');
         $fieldsData = $app->input->post->get('fields', array(), 'array');
         $cat_id = $fieldsData[$fieldCategory->id]['main'];
     }
     if (!$cat_id) {
         $rootCategory = JUDirectoryFrontHelperCategory::getRootCategory();
         $cat_id = $rootCategory->id;
     }
     $context = $this->option . ".edit." . $this->context;
     $app->setUserState($context . '.data', null);
     $app->setUserState($context . '.fieldsdata', null);
     $app->setUserState($context . '.related_listings', null);
     if ($listing_id) {
         $db = JFactory::getDbo();
         $query = "SELECT cat_id FROM #__judirectory_listings_xref WHERE listing_id = {$listing_id} AND main = 1";
         $db->setQuery($query);
         $cat_id = $db->loadResult();
     }
     parent::cancel($key = null);
     if ($this->view_list == "pendinglistings") {
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));
     } else {
         $this->setRedirect("index.php?option=com_judirectory&view=listcats&cat_id={$cat_id}");
     }
 }
Ejemplo n.º 18
0
 public function cancel($key = null)
 {
     $return = parent::cancel($key);
     $this->setRedirect('index.php?option=com_bfstop&view=blocklist');
     return $return;
 }
Ejemplo n.º 19
0
 public function cancel($key = null)
 {
     $this->holdID();
     return parent::cancel($key);
 }
Ejemplo n.º 20
0
 public function cancel($key = null)
 {
     JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     if ($return = $this->input->get('return', null, 'base64')) {
         $this->setRedirect(base64_decode($return));
         return true;
     }
     return parent::cancel($key);
 }
Ejemplo n.º 21
0
 public function cancel($key = null)
 {
     parent::cancel($key);
 }
Ejemplo n.º 22
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   1.6
  */
 public function cancel($key = null)
 {
     JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     $app = JFactory::getApplication();
     $context = 'com_menus.edit.item';
     $result = parent::cancel();
     if ($result) {
         // Clear the ancillary data from the session.
         $app->setUserState($context . '.type', null);
         $app->setUserState($context . '.link', null);
         // Redirect to the list screen.
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend() . '&menutype=' . $app->getUserState('com_menus.items.menutype'), false));
     }
     return $result;
 }
Ejemplo n.º 23
0
 /**
  * Method to cancel an edit.
  *
  * @param   string  $key  The name of the primary key of the URL variable.
  *
  * @return  boolean  True if access level checks pass, false otherwise.
  *
  * @since   12.2
  */
 public function cancel($key = null)
 {
     // get the referal details
     $this->ref = $this->input->get('ref', 0, 'word');
     $this->refid = $this->input->get('refid', 0, 'int');
     $cancel = parent::cancel($key);
     if ($cancel) {
         if ($this->refid) {
             $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
             // Redirect to the item screen.
             $this->setRedirect(JRoute::_('index.php?option=' . $this->option . $redirect, false));
         } elseif ($this->ref) {
             $redirect = '&view=' . (string) $this->ref;
             // Redirect to the list screen.
             $this->setRedirect(JRoute::_('index.php?option=' . $this->option . $redirect, false));
         }
     } else {
         // Redirect to the items screen.
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));
     }
     return $cancel;
 }
Ejemplo n.º 24
0
 function cancel($key = NULL)
 {
     parent::cancel();
 }
Ejemplo n.º 25
0
 public function cancel($key = null)
 {
     JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
     $app = JFactory::getApplication();
     $doc_id = $app->input->getInt('id', 0);
     if ($doc_id) {
         $documentObject = JUDownloadHelper::getDocumentById($doc_id);
         $cat_id = $documentObject->cat_id;
     } else {
         $fieldCategory = JUDownloadFrontHelperField::getField('cat_id');
         $fieldData = $app->input->post->get('fields', array(), 'array');
         $cat_id = $fieldData[$fieldCategory->id]['main'];
     }
     if (!$cat_id) {
         $rootCategory = JUDownloadFrontHelperCategory::getRootCategory();
         $cat_id = $rootCategory->id;
     }
     $files = $app->input->get("judlfiles", array(), 'array');
     $context = $this->option . ".edit." . $this->context;
     if (isset($files)) {
         $file_directory = JPATH_ROOT . "/" . JUDownloadFrontHelper::getDirectory("file_directory", "media/com_judownload/files/");
         $file_directory_tmp = $file_directory . "tmp/";
         $files = array_values($files);
         foreach ($files as $file) {
             if (isset($file['file_name']) && $file['file_name']) {
                 $file_path = $file_directory_tmp . $file['file_name'];
                 if (JFile::exists($file_path)) {
                     JFile::delete($file_path);
                 }
             }
             if (isset($file['replace']) && $file['replace']) {
                 $file_path = $file_directory_tmp . $file['replace'];
                 if (JFile::exists($file_path)) {
                     JFile::delete($file_path);
                 }
             }
         }
     }
     $app->setUserState($context . '.data', null);
     $app->setUserState($context . '.fieldsdata', null);
     $app->setUserState($context . '.changelogs', null);
     $app->setUserState($context . '.versions', null);
     $app->setUserState($context . '.files', null);
     $app->setUserState($context . '.related_documents', null);
     if ($doc_id) {
         $db = JFactory::getDbo();
         $query = "SELECT cat_id FROM #__judownload_documents_xref WHERE doc_id = {$doc_id} AND main = 1";
         $db->setQuery($query);
         $cat_id = $db->loadResult();
     }
     parent::cancel($key = null);
     if ($this->view_list == "pendingdocuments") {
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));
     } else {
         $this->setRedirect("index.php?option=com_judownload&view=listcats&cat_id={$cat_id}");
     }
 }
Ejemplo n.º 26
0
 public function cancel($key = null)
 {
     if (parent::cancel($key)) {
         $catid = JRequest::getInt('catid');
         $this->setRedirect(JRoute::_(SmfaqHelperRoute::getCategoryRoute($catid), false));
     }
 }
Ejemplo n.º 27
0
 /**
  * Method to cancel an edit.
  *
  * @param	string	$key	The name of the primary key of the URL variable.
  *
  * @return	Boolean	True if access level checks pass, false otherwise.
  * @since	1.6
  */
 public function cancel($key = 'a_id')
 {
     parent::cancel($key);
     // Redirect to the return page.
     $this->setRedirect($this->getReturnPage());
 }
Ejemplo n.º 28
0
 public function cancel($key = null)
 {
     $this->view_list = 'inbox';
     parent::cancel($key);
 }
 public function cancel($key = 'a_id')
 {
     parent::cancel($key);
     $this->setRedirect($this->getReturnPage());
 }
Ejemplo n.º 30
0
 function cancel($key = NULL)
 {
     parent::cancel();
     $this->setRedirect('index.php?option=com_absolventi&view=ucitelialist');
     $this->redirect;
 }