示例#1
0
 /**
  * display the edit form
  * @return void
  */
 function edit()
 {
     JRequest::setVar('view', 'hotellinkedit');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
 /**
  * Constructor
  *
  * @since 0.9
  */
 function __construct()
 {
     parent::__construct();
     // Register Extra task
     $this->registerTask('galleryupload', 'uploadimage');
     $this->registerTask('introimgup', 'uploadimage');
 }
 /**
  * display the edit form
  * @return void
  */
 function edit()
 {
     JRequest::setVar('view', 'roomfacility');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
示例#4
0
 /**
  * logic to create the edit venue view
  *
  * @access public
  * @return void
  * @since 0.9
  */
 function edit()
 {
     JRequest::setVar('view', 'settings');
     parent::display();
     $model = $this->getModel('settings');
     $model->checkout();
 }
示例#5
0
 function __construct()
 {
     parent::__construct();
     // Register Extra task
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('saveandnew', 'save');
 }
示例#6
0
 /**
  * Logic to create the view for the edit categoryscreen
  *
  * @access public
  * @return void
  * @since 1.5
  */
 function edit()
 {
     JRequest::setVar('view', 'city');
     JRequest::setVar('hidemainmenu', 1);
     $model = $this->getModel('city');
     $user =& JFactory::getUser();
     // Error if checkedout by another administrator
     if ($model->isCheckedOut($user->get('id'))) {
         $this->setRedirect('index.php?option=com_hotelguide&view=cities', JText::_('HG_EDITED_BY_ANOTHER_ADMIN'));
     }
     $model->checkout($user->get('id'));
     parent::display();
 }
示例#7
0
 /**
  * Logic to create the view for the edit categoryscreen
  *
  * @access public
  * @return void
  * @since 1.0
  */
 function edit()
 {
     JRequest::setVar('view', 'promotion');
     JRequest::setVar('hidemainmenu', 1);
     $model = $this->getModel('promotion');
     $user =& JFactory::getUser();
     $acl =& JFactory::getACL();
     $myObjectID = $acl->get_object_id('users', $user->get('id'), 'ARO');
     $myGroups = $acl->get_object_groups($myObjectID, 'ARO');
     $myGroupName = strtolower($acl->get_group_name($myGroups[0], 'ARO'));
     if ($myGroupName != 'super administrator' and $myGroupName != 'administrator') {
         $db =& JFactory::getDBO();
         $query = 'SELECT DISTINCT h.created_by, h.user_id_hotel' . ' FROM #__hg_promotions AS i' . ' LEFT JOIN #__hg_hotelitems AS h ON h.id = i.hotel' . ' WHERE i.id=' . $model->_id;
         $db->setQuery($query);
         $recorset = $db->loadObject();
         //Si $recordset es true es porque ya el registro que se va a editar, existe, en caso contrario, es uno nuevo
         if ($recorset) {
             if ($recorset->created_by != $user->get('id') and $recorset->user_id_hotel != $user->get('id')) {
                 $this->setRedirect('index.php?option=com_hotelguide&view=promotions', JText::_('HG_ACCESS_DENIED'));
             }
         }
     }
     // Error if checkedout by another administrator
     if ($model->isCheckedOut($user->get('id'))) {
         $this->setRedirect('index.php?option=com_hotelguide&view=promotions', JText::_('HG_EDITED_BY_ANOTHER_ADMIN'));
     }
     $model->checkout($user->get('id'));
     parent::display();
 }
示例#8
0
 function __construct()
 {
     parent::__construct();
     $this->registerTask('batchupload', 'batchupload');
 }
示例#9
0
 /**
  * Logic to create the view for the edit eventscreen
  *
  * @access public
  * @return void
  * @since 1.0
  */
 function edit()
 {
     // Check for request forgeries
     //JRequest::checkToken() or jexit( 'Invalid Token' );
     JRequest::setVar('view', 'event');
     JRequest::setVar('hidemainmenu', 1);
     $model = $this->getModel('event');
     $user =& JFactory::getUser();
     // Error if checkedout by another administrator
     if ($model->isCheckedOut($user->get('id'))) {
         $this->setRedirect('index.php?option=com_hotelguide&view=events', JText::_('HG_EDITED_BY_ANOTHER_ADMIN'));
     }
     $model->checkout($user->get('id'));
     parent::display();
 }
示例#10
0
 function __construct()
 {
     parent::__construct();
 }
示例#11
0
 /**
  * Logic to create the view for the edit userrates
  *
  * @access public
  * @return void
  * @since 1.0
  */
 function edit()
 {
     JRequest::setVar('view', 'userrate');
     JRequest::setVar('hidemainmenu', 1);
     $model = $this->getModel('userrate');
     $user =& JFactory::getUser();
     //		$model->checkout( $user->get('id') );
     parent::display();
 }