Académique Documents
Professionnel Documents
Culture Documents
php
?>
<h1><?php echo "Überschrift";?></h1>
<ul>
Empaquetar el Componente Crear las Plantillas Sumario de Registros.
$this->setError( $table->getErrorMsg());
return false;
<? }
foreach ($this->rows as $row) { // Reading of the data sets in the array // Checkin the revue
?> Registro Individual. if( !$table->checkin())
<li> {
<?php echo $row->text;?> // An error occurred, update the model error message
<small><em>(<?php echo $row->manufacturer;?>)</em></small> $this->setError( $table->getErrorMsg());
Crear los Controladores Crear el Controlador Principal. return false;
<br>
<a href="<?php echo $row->photo_large;?>" onclick="OpeWindow(this.href); return false"> COMPONENTE }
return true;
<img src=<?php echo $row->photo_small;?>>
}
</a> }
</li>
<?php
}
?>
</ul> /com_auto/administration/tables/auto.php
<?php
/**
/com_auto/install.sql * Boxoffice Administrator Controller
*
DROP TABLE IF EXISTS `#__auto`; * @package com_boxoffice
INSERT INTO `#__auto` (`id`, `text`, `manufacturer`, `photo_large`, `photo_small`, `published`) /**
Instalar Crear los ficheros de Instalación.
VALUES (2, 'Smart fortwo', 'Smart', * Boxoffice Component Administrator Controller
'http://localhost/joomla/images/stories/com_auto/smart_large.jpg', *
'http://localhost/joomla/images/stories/com_auto/smart_small.jpg', 1), * @package com_boxoffice
(4, 'Roadster', 'Smart', * @subpackage components
'http://localhost/joomla/images/stories/com_auto/roadster_large.jpg', Desinstalar
*/
'http://localhost/joomla/images/stories/com_auto/roadster_small.jpg', 1);
class BoxofficeController extends JController
{
Comprimir todo el componente
dentro de un único Fichero. /**
* Method to display the list view
*
/com_auto/uninstall.sql * @access public
*
*/
DROP TABLE IF EXISTS `#__auto`;
function display()
{
/com_auto/auto.xml // We override the JController default display
//method which expects a view named boxoffice.
// We want a view of 'revues' that uses the 'default' layout.
<?xml version="1.0" encoding="utf-8"?> // Set the view and the model
<!DOCTYPE install SYSTEM "http://dev.joomla.org/xml/1.5/component-install.dtd">
$view =& $this->getView( 'revues', 'html' );
<install type="component" version="1.5.0"> $model =& $this->getModel( 'revues' );
$view->setModel( $model, true );
<name>Auto</name>
<creationDate>November 2007</creationDate> // Use the View display method
<author>Hagen Graf</author>
<authorEmail>hagen.graf@gmail.com</authorEmail> $view->display();
<authorUrl>http://www.cocoate.com</authorUrl>
<copyright>All rights reserved</copyright> }
<license>GNU/GPL</license>
<version>Component Version String</version> /**
<description>description of the component ... </description> * Method to display the edit view
*
<files folder="site"> * @access public
<filename>index.html</filename> *
<filename>auto.php</filename> */
<filename>controller.php</filename>
<filename>views/index.html</filename> function edit()
<filename>views/auto/index.html</filename> {
<filename>views/auto/view.html.php</filename>
<filename>views/auto/tmpl/index.html</filename> // Get the requested id(s) as an array of ids
<filename>views/auto/tmpl/default.php</filename> $cids = JRequest::getVar('cid', null, 'default', 'array');
<filename>models/auto.php</filename> if( $cids === null )
</files> {
// Report an error if there was no cid parameter in the request
<install> JError::raiseError( 500,
<sql> 'cid parameter missing from the request' );
<file charset="utf8" driver="mysql">install.sql</file> }
</sql>
</install> // Get the first revue to be edited
$revueId = (int)$cids[0];
<uninstall>
<sql> // Set the view and model for a single revue
<file charset="utf8" driver="mysql">uninstall.sql</file> $view =& $this->getView( JRequest::getVar( 'view', 'revue' ), 'html' );
</sql> $model =& $this->getModel( 'revue' );
</uninstall> $view->setModel( $model, true );
<administration> // Display the edit form for the requested revue
<menu>Joomla! 1.5 Book Auto</menu> $view->edit( $revueId );
<files folder="admin">
<filename>index.html</filename> }
<filename>admin.auto.php</filename>
<filename>controller.php</filename> /**
<filename>controllers/auto.php</filename> * Method to add a new revue
<filename>controllers/index.html</filename> *
<filename>models/auto.php</filename> * @access public
<filename>models/autos.php</filename> *
<filename>models/index.html</filename> */
<filename>views/autos/view.html.php</filename> function add()
<filename>views/autos/index.html</filename> {
<filename>views/autos/tmpl/default.php</filename> // Set the view for a single revue
<filename>views/autos/tmpl/index.html</filename> $view =& $this->getView( JRequest::getVar( 'view', 'revue' ), 'html' );
<filename>views/auto/view.html.php</filename> $model =& $this->getModel( 'revue' );
<filename>views/auto/tmpl/form.php</filename> $view->setModel( $model, true );
<filename>views/auto/index.html</filename> $view->add();
<filename>views/auto/tmpl/index.html</filename> }
<filename>tables/auto.php</filename>
<filename>tables/index.html</filename> /**
<filename>install.sql</filename> * Method to save the revue
<filename>uninstall.sql</filename> *
</files> * @access public
</administration> *
*/
</install> function save()
{
$model =& $this->getModel( 'revue' );
$model->store();
$redirectTo = Jroute::_('index.php?option='.JRequest::getVar('option').'&task=display');
$this->setRedirect( $redirectTo, 'Revue Saved' );
}
/**
* Method to cancel
*
* @access public
*
*/
function cancel()
{
$redirectTo = Jroute::_('index.php?option='.JRequest::getVar('option').'&task=display');
/**
* Method to remove one or more revenues
*
* @access public
*
*/
function remove()
{
// Retrieve the ids to be removed
$cids = JRequest::getVar ('cid', null, 'default', 'array');
if( $cids === null )
{
// Make sure there were records to be removed
JError::raiseError( 500, 'No revues were selected for removal' );
}
$model =& $this->getModel( 'revues');
$model->delete( $cids);
$redirectTo =
JRoute::_('index.php?option='.JRequest::getVar( 'option' ).'&task=display');
$this->setRedirect( $redirectTo, 'Revues Deleted' );
}