48 lines
1.0 KiB
PHP
48 lines
1.0 KiB
PHP
|
|
<?php
|
||
|
|
/*
|
||
|
|
* @component SQL 2 Excel Component
|
||
|
|
* @copyright Copyright (C) Joomla-R-Us, joomla-r-us.com
|
||
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3
|
||
|
|
*/
|
||
|
|
|
||
|
|
// no direct access
|
||
|
|
defined('_JEXEC') or die('Restricted access');
|
||
|
|
|
||
|
|
// Include library dependencies
|
||
|
|
jimport('joomla.filter.input');
|
||
|
|
|
||
|
|
class TableSqlexceldatabase extends JTable
|
||
|
|
{
|
||
|
|
// #__sql2excel_sections
|
||
|
|
var $id = null;
|
||
|
|
var $db_name = null;
|
||
|
|
var $db_type = null;
|
||
|
|
var $db_host = null;
|
||
|
|
var $db_username = null;
|
||
|
|
var $db_password = null;
|
||
|
|
var $db_database = null;
|
||
|
|
var $db_prefix = null;
|
||
|
|
|
||
|
|
|
||
|
|
function __construct(& $db) {
|
||
|
|
parent::__construct('#__sql2excel_databases', 'id', $db);
|
||
|
|
}
|
||
|
|
|
||
|
|
function check()
|
||
|
|
{
|
||
|
|
// Make sure the section has a title specified
|
||
|
|
if (trim( $this->db_name ) == '') {
|
||
|
|
$this->setError( JText::_( 'The database must have an identifier') );
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
if (! $this->db_type > 0 ) {
|
||
|
|
$this->setError( JText::_( 'The database type must be defined') );
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
?>
|