| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: contact.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Contact 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 to the 9 * GNU General Public License, and as distributed it includes or is derivative 10 * of works licensed under the GNU General Public License or other free or open 11 * source software licenses. See COPYRIGHT.php for copyright notices and 12 * details. 13 */ 14 15 // Check to ensure this file is included in Joomla! 16 defined('_JEXEC') or die( 'Restricted access' ); 17 18 19 /** 20 * @package Joomla 21 * @subpackage Contact 22 */ 23 class TableContact extends JTable 24 { 25 /** @var int Primary key */ 26 var $id = null; 27 /** @var string */ 28 var $name = null; 29 /** @var string */ 30 var $alias = null; 31 /** @var string */ 32 var $con_position = null; 33 /** @var string */ 34 var $address = null; 35 /** @var string */ 36 var $suburb = null; 37 /** @var string */ 38 var $state = null; 39 /** @var string */ 40 var $country = null; 41 /** @var string */ 42 var $postcode = null; 43 /** @var string */ 44 var $telephone = null; 45 /** @var string */ 46 var $fax = null; 47 /** @var string */ 48 var $misc = null; 49 /** @var string */ 50 var $image = null; 51 /** @var string */ 52 var $imagepos = null; 53 /** @var string */ 54 var $email_to = null; 55 /** @var int */ 56 var $default_con = null; 57 /** @var int */ 58 var $published = 0; 59 /** @var int */ 60 var $checked_out = 0; 61 /** @var datetime */ 62 var $checked_out_time = 0; 63 /** @var int */ 64 var $ordering = null; 65 /** @var string */ 66 var $params = null; 67 /** @var int A link to a registered user */ 68 var $user_id = null; 69 /** @var int A link to a category */ 70 var $catid = null; 71 /** @var int */ 72 var $access = null; 73 /** @var string Mobile phone number(s) */ 74 var $mobile = null; 75 /** @var string */ 76 var $webpage = null; 77 78 /** 79 * @param database A database connector object 80 */ 81 function __construct(&$db) 82 { 83 parent::__construct( '#__contact_details', 'id', $db ); 84 } 85 86 /** 87 * Overloaded check function 88 * 89 * @access public 90 * @return boolean 91 * @see JTable::check 92 * @since 1.5 93 */ 94 function check() 95 { 96 $this->default_con = intval( $this->default_con ); 97 98 if (JFilterInput::checkAttribute(array ('href', $this->webpage))) { 99 $this->setError(JText::_('Please provide a valid URL')); 100 return false; 101 } 102 103 // check for http on webpage 104 if (strlen($this->webpage) > 0 && (!(preg_match('#http://#i', $this->webpage) || (preg_match('#https://#i', $this->webpage)) || (preg_match('#ftp://#i', $this->webpage))))) { 105 $this->webpage = 'http://'.$this->webpage; 106 } 107 108 if(empty($this->alias)) { 109 $this->alias = $this->name; 110 } 111 $this->alias = JFilterOutput::stringURLSafe($this->alias); 112 if(trim(str_replace('-','',$this->alias)) == '') { 113 $datenow =& JFactory::getDate(); 114 $this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S"); 115 } 116 117 return true; 118 } 119 }
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 |