<?php
/**
* @version $Id: application.php 13243 2009-10-20 04:01:04Z ian $
* @package Joomla
* @subpackage Config
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant to the
* GNU General Public License, and as distributed it includes or is derivative
* of works licensed under the GNU General Public License or other free or open
* source software licenses. See COPYRIGHT.php for copyright notices and
* details.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JPATH_COMPONENT.DS.'views'.DS.'racetypesadmin'.DS.'view.html.php' );
/**
* @package Joomla
* @subpackage Config
*/
class ChalangeAdminControllerRacetypes extends ChalangeAdminController
{
function add(){
JRequest::setVar('view','racetypeAdmin');
parent::display();
}
function edit(){
JRequest::setVar('view','racetypeAdmin'); //indico que vista se encarga de ello
parent::display(); //muestro la vista
}
function remove(){
JRequest::setVar('view','racetypesAdmin');
$cid = JRequest::getVar('cid',array(),'','array');
$db =& JFactory::getDBO();
if (count($cid)){
$cids= implode(',',$cid);
$query="DELETE FROM #__gcd_racetypes WHERE id IN ($cids)";
$db->setQuery($query);
if (!$db->query()){
echo "<script>alert('".$db->getErrorMsg()."');
window.history.go(-1);</script>\n";
}
}
parent::display();
}
}