Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/app/webroot/news/administrator/components/com_jevents/models/ |
Upload File : |
<?php /** * JEvents Component for Joomla 1.5.x * * @version $Id: user.php 1399 2009-03-30 08:31:52Z geraint $ * @package JEvents * @copyright Copyright (C) 2008-2009 GWE Systems Ltd * @license GNU/GPLv2, see http://www.gnu.org/licenses/gpl-2.0.html * @link http://www.jevents.net */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); jimport( 'joomla.application.component.model' ); JLoader::import("jevuser",JPATH_COMPONENT_ADMINISTRATOR."/tables/"); /** * @package Joom!Fish * @subpackage User */ class AdminUserModelUser extends JModel { /** * @var string name of the current model * @access private */ var $_modelName = 'user'; /** * @var array list of current users * @access private */ var $_users = null; /** * default constrcutor */ function __construct() { parent::__construct(); $app = &JFactory::getApplication(); $option = JRequest::getVar('option', ''); // Get the pagination request variables $limit = $app->getUserStateFromRequest( 'global.list.limit', 'limit', $app->getCfg('list_limit'), 'int' ); $limitstart = $app->getUserStateFromRequest( $option.'.limitstart', 'limitstart', 0, 'int' ); // In case limit has been changed, adjust limitstart accordingly $limitstart = ($limit != 0 ? (floor($limitstart / $limit) * $limit) : 0); $this->setState('limit', $limit); $this->setState('limitstart', $limitstart); } /** * return the model name */ function getName() { return $this->_modelName; } /** * generic method to load the user related data * @return array of users */ function getUsers() { TableUser::checkTable(); if($this->_users == null) { $this->_loadUsers(); } return $this->_users; } /** * generic method to load the user related data * @return array of users */ function getUser() { $cid = JRequest::getVar("cid",array(0)); JArrayHelper::toInteger($cid); if (count($cid)>0){ $id=$cid[0]; } else $id=0; $user = new TableUser(); if ($id>0){ $user->load($id); } return $user; } /** * Method to store user information */ function store($cid, $data) { $user = new TableUser(); if ($cid>0){ $user->load($cid); } return $user->save($data); } /** * Method to load the users in the system * * @return void */ function _loadUsers(){ $this->_users= TableUser::getUsers(); } }