| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: bannerclient.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Banners 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant 9 * to the GNU General Public License, and as distributed it includes or 10 * is derivative of works licensed under the GNU General Public License or 11 * other free or open source software licenses. 12 * See COPYRIGHT.php for copyright notices and details. 13 */ 14 15 // no direct access 16 defined( '_JEXEC' ) or die( 'Restricted access' ); 17 18 /** 19 * @package Joomla 20 * @subpackage Banners 21 */ 22 class TableBannerClient extends JTable 23 { 24 var $cid = null; 25 var $name = ''; 26 var $contact = ''; 27 var $email = ''; 28 var $extrainfo = ''; 29 var $checked_out = 0; 30 var $checked_out_time = 0; 31 var $editor = ''; 32 33 function __construct( &$_db ) { 34 parent::__construct( '#__bannerclient', 'cid', $_db ); 35 } 36 37 /** 38 * Overloaded check function 39 * 40 * @access public 41 * @return boolean 42 * @see JTable::check 43 * @since 1.5 44 */ 45 function check() 46 { 47 // check for valid client name 48 if (trim($this->name == '')) { 49 $this->setError(JText::_( 'BNR_CLIENT_NAME' )); 50 return false; 51 } 52 53 // check for valid client contact 54 if (trim($this->contact == '')) { 55 $this->setError(JText::_( 'BNR_CONTACT' )); 56 return false; 57 } 58 59 // check for valid client email 60 jimport( 'joomla.mail.helper' ); 61 if (!JMailHelper::isEmailAddress( $this->email )) { 62 $this->setError(JText::_( 'BNR_VALID_EMAIL' )); 63 return false; 64 } 65 66 return true; 67 } 68 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |