FundacionLQDVI_WebCongresos/www/administrator/components/com_alpharegistration/controller.php

82 lines
1.5 KiB
PHP
Raw Normal View History

<?php
/**
* @version 2.0.12 alpharegistration $
* @package alpharegistration
* @copyright Copyright © 2009-2010 - Bernard Gilly - All rights reserved.
* @license GNU/GPL
* @author Bernard Gilly
* @author mail contact@alphaplug.com
* @website www.alphaplug.com
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controller');
class alpharegistrationController extends JController
{
/**
* Custom Constructor
*/
function __construct()
{
parent::__construct();
}
/**
* Show Control Panel
*/
function cpanel() {
$view = $this->getView ( 'alpharegistration','html');
$view->_display();
}
function configuration() {
$model = &$this->getModel('configuration');
$view = $this->getView ( 'configuration','html');
$results = $model->getParams();
$view->assignRef('params', $results);
$view->display();
}
function saveconfiguration()
{
// Check for request forgeries
JRequest::checkToken() or die( 'Invalid Token' );
$table =& JTable::getInstance('component');
if (!$table->loadByOption( 'com_alpharegistration' ))
{
JError::raiseWarning( 500, 'Not a valid component' );
return false;
}
$post = JRequest::get( 'post' );
$table->bind( $post );
// pre-save checks
if (!$table->check()) {
JError::raiseWarning( 500, $table->getError() );
return false;
}
// save the changes
if (!$table->store()) {
JError::raiseWarning( 500, $table->getError() );
return false;
}
}
}
?>