亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? weblink.php

?? Joomla15 - 最新開源CMS
?? PHP
字號:
<?php
/**
 * @version		$Id: weblink.php 7984 2007-07-15 14:59:15Z friesengeist $
 * @package		Joomla
 * @subpackage	Content
 * @copyright	Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

jimport('joomla.application.component.model');

/**
 * Weblinks Component Weblink Model
 *
 * @author Johan Janssens <johan.janssens@joomla.org>
 * @package		Joomla
 * @subpackage	Weblinks
 * @since 1.5
 */
class WeblinksModelWeblink extends JModel
{
	/**
	 * Weblink id
	 *
	 * @var int
	 */
	var $_id = null;

	/**
	 * Weblink data
	 *
	 * @var array
	 */
	var $_data = null;

	/**
	 * Constructor
	 *
	 * @since 1.5
	 */
	function __construct()
	{
		parent::__construct();

		$id = JRequest::getVar('id', 0, '', 'int');
		$this->setId((int)$id);
	}

	/**
	 * Method to set the weblink identifier
	 *
	 * @access	public
	 * @param	int Weblink identifier
	 */
	function setId($id)
	{
		// Set weblink id and wipe data
		$this->_id		= $id;
		$this->_data	= null;
	}

	/**
	 * Method to get a weblink
	 *
	 * @since 1.5
	 */
	function &getData()
	{
		// Load the weblink data
		if ($this->_loadData())
		{
			// Initialize some variables
			$user = &JFactory::getUser();

			// Make sure the weblink is published
			if (!$this->_data->published) {
				JError::raiseError(404, JText::_("Resource Not Found"));
				return false;
			}

			// Check to see if the category is published
			if (!$this->_data->cat_pub) {
				JError::raiseError( 404, JText::_("Resource Not Found") );
				return;
			}

			// Check whether category access level allows access
			if ($this->_data->cat_access > $user->get('aid', 0)) {
				JError::raiseError( 403, JText::_('ALERTNOTAUTH') );
				return;
			}
		}
		else  $this->_initData();

		return $this->_data;
	}

	/**
	 * Method to increment the hit counter for the weblink
	 *
	 * @access	public
	 * @return	boolean	True on success
	 * @since	1.5
	 */
	function hit()
	{
		global $mainframe;

		if ($this->_id)
		{
			$weblink = & $this->getTable();
			$weblink->hit($this->_id);
			return true;
		}
		return false;
	}

	/**
	 * Tests if weblink is checked out
	 *
	 * @access	public
	 * @param	int	A user id
	 * @return	boolean	True if checked out
	 * @since	1.5
	 */
	function isCheckedOut( $uid=0 )
	{
		if ($this->_loadData())
		{
			if ($uid) {
				return ($this->_data->checked_out && $this->_data->checked_out != $uid);
			} else {
				return $this->_data->checked_out;
			}
		}
	}

	/**
	 * Method to checkin/unlock the weblink
	 *
	 * @access	public
	 * @return	boolean	True on success
	 * @since	1.5
	 */
	function checkin()
	{
		if ($this->_id)
		{
			$weblink = & $this->getTable();
			if(! $weblink->checkin($this->_id)) {
				$this->setError($this->_db->getErrorMsg());
				return false;
			}
			return true;
		}
		return false;
	}

	/**
	 * Method to checkout/lock the weblink
	 *
	 * @access	public
	 * @param	int	$uid	User ID of the user checking the article out
	 * @return	boolean	True on success
	 * @since	1.5
	 */
	function checkout($uid = null)
	{
		if ($this->_id)
		{
			// Make sure we have a user id to checkout the article with
			if (is_null($uid)) {
				$user	=& JFactory::getUser();
				$uid	= $user->get('id');
			}
			// Lets get to it and checkout the thing...
			$weblink = & $this->getTable();
			if(!$weblink->checkout($uid, $this->_id)) {
				$this->setError($this->_db->getErrorMsg());
				return false;
			}

			return true;
		}
		return false;
	}

	/**
	 * Method to store the weblink
	 *
	 * @access	public
	 * @return	boolean	True on success
	 * @since	1.5
	 */
	function store($data)
	{
		$row =& $this->getTable();

		// Bind the form fields to the web link table
		if (!$row->bind($data, "published")) {
			$this->setError($this->_db->getErrorMsg());
			return false;
		}

		// Create the timestamp for the date
		$row->date = gmdate('Y-m-d H:i:s');

		// Make sure the web link table is valid
		if (!$row->check()) {
			$this->setError($this->_db->getErrorMsg());
			return false;
		}

		// Store the web link table to the database
		if (!$row->store()) {
			$this->setError($this->_db->getErrorMsg());
			return false;
		}

		return true;
	}

	/**
	 * Method to load content weblink data
	 *
	 * @access	private
	 * @return	boolean	True on success
	 * @since	1.5
	 */
	function _loadData()
	{
		// Lets load the content if it doesn't already exist
		if (empty($this->_data))
		{
			$query = 'SELECT w.*, cc.title AS category,' .
					' cc.published AS cat_pub, cc.access AS cat_access'.
					' FROM #__weblinks AS w' .
					' LEFT JOIN #__categories AS cc ON cc.id = w.catid' .
					' WHERE w.id = '. (int) $this->_id;
			$this->_db->setQuery($query);
			$this->_data = $this->_db->loadObject();
			return (boolean) $this->_data;
		}
		return true;
	}

	/**
	 * Method to initialise the weblink data
	 *
	 * @access	private
	 * @return	boolean	True on success
	 * @since	1.5
	 */
	function _initData()
	{
		// Lets load the content if it doesn't already exist
		if (empty($this->_data))
		{
			$weblink = new stdClass();
			$weblink->id					= 0;
			$weblink->catid				= 0;
			$weblink->sid				= 0;
			$weblink->title				= null;
			$weblink->url				= null;
			$weblink->description			= null;
			$weblink->date				= null;
			$weblink->hits				= 0;
			$weblink->published			= 0;
			$weblink->checked_out			= 0;
			$weblink->checked_out_time 	= 0;
			$weblink->ordering			= 0;
			$weblink->archived			= 0;
			$weblink->approved			= 0;
			$weblink->params				= null;
			$weblink->category			= null;
			$this->_data					= $weblink;
			return (boolean) $this->_data;
		}
		return true;
	}
}
?>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美无砖砖区免费| 色噜噜夜夜夜综合网| 亚洲午夜激情网页| 亚洲精品乱码久久久久久| 国产精品无人区| 中文字幕精品一区二区三区精品| 久久久久久久久99精品| 久久久久久99精品| 中文字幕一区二区三区蜜月| 亚洲男人都懂的| 亚洲五码中文字幕| 麻豆91免费观看| 激情综合色丁香一区二区| 国产在线国偷精品产拍免费yy| 久久精品国产免费看久久精品| 国产精品影音先锋| 97se亚洲国产综合在线| 欧美伊人久久大香线蕉综合69 | 97精品国产97久久久久久久久久久久| 国产99久久久国产精品潘金网站| 99精品欧美一区二区三区小说| 色婷婷一区二区三区四区| 欧美三级中文字幕| 精品国产亚洲在线| 欧美国产日本视频| 五月婷婷激情综合网| 国产真实乱偷精品视频免| 91丨porny丨户外露出| 欧美精品 日韩| 国产欧美日本一区视频| 亚洲国产aⅴ天堂久久| 国产乱色国产精品免费视频| 色av综合在线| 久久久高清一区二区三区| 亚洲精选免费视频| 国产在线精品免费| 欧美色爱综合网| 欧美激情一区二区| 日本最新不卡在线| 99久久免费视频.com| 精品日韩在线观看| 亚洲一区二区视频在线观看| 国产自产v一区二区三区c| 欧美日韩国产一二三| 国产精品五月天| 六月丁香婷婷久久| 在线中文字幕不卡| 国产精品不卡一区| 国产精品18久久久久| 欧美二区三区的天堂| 亚洲色图在线看| 国产一区二区三区综合| 制服.丝袜.亚洲.中文.综合| 亚洲欧美日韩国产另类专区| 国产一区二区女| 欧美男生操女生| 亚洲日本va午夜在线电影| 国产一区二区主播在线| 欧美久久久久久蜜桃| 一区二区免费在线播放| 成人av在线资源网站| 2020国产精品久久精品美国| 日韩中文字幕麻豆| 欧美三级乱人伦电影| 一区二区在线观看免费视频播放| 国产91精品欧美| 国产亚洲精久久久久久| 国产一区三区三区| 久久综合九色综合97_久久久| 日本成人在线视频网站| 欧美日韩第一区日日骚| 日韩专区一卡二卡| 91精品在线麻豆| 日本免费新一区视频| 91麻豆精品国产91久久久资源速度| 亚洲综合免费观看高清在线观看| 色综合久久中文综合久久97| 亚洲精品国产品国语在线app| 99久久免费精品高清特色大片| 亚洲国产精品99久久久久久久久 | 韩国精品久久久| 欧美精品一区二区不卡| 国模大尺度一区二区三区| 久久先锋资源网| 风间由美一区二区三区在线观看| 久久精品视频在线免费观看| 丁香激情综合五月| 亚洲另类色综合网站| 欧美日本韩国一区二区三区视频| 午夜av一区二区| 久久麻豆一区二区| 99v久久综合狠狠综合久久| 亚洲精品视频自拍| 5566中文字幕一区二区电影| 国产一区免费电影| 亚洲精品日日夜夜| 91精品国产综合久久久久久久久久 | 日韩视频免费观看高清在线视频| 久久精品免费观看| 中文字幕亚洲欧美在线不卡| 欧洲亚洲国产日韩| 免费高清在线一区| 国产精品情趣视频| 7777精品伊人久久久大香线蕉最新版 | 日韩精品欧美成人高清一区二区| 欧美精品一区二区在线播放| 成人一区二区三区| 丝袜诱惑亚洲看片| 国产精品国产自产拍高清av| 欧美日韩五月天| 大尺度一区二区| 奇米色777欧美一区二区| 欧美国产日本视频| 久久蜜桃av一区二区天堂| 成人听书哪个软件好| 日韩一区欧美二区| 国产精品美女久久久久av爽李琼| 欧美老肥妇做.爰bbww视频| 国产精品一二一区| 日韩国产欧美在线视频| 国产精品理伦片| 日韩一卡二卡三卡四卡| 色悠悠亚洲一区二区| 国产成人在线影院| 久久福利视频一区二区| 亚洲男人天堂av网| 亚洲国产高清在线观看视频| 日韩一级完整毛片| 欧美在线观看一区二区| 国产精品一二三在| 久久国产精品露脸对白| 五月天视频一区| 一区二区三区四区中文字幕| 国产日韩av一区| 欧美成人a∨高清免费观看| 91精品午夜视频| 欧美综合一区二区三区| 91免费版在线| 不卡一卡二卡三乱码免费网站| 国产在线播精品第三| 久久成人久久鬼色| 美女www一区二区| 蜜臀av国产精品久久久久| 日韩黄色小视频| 丝袜亚洲另类丝袜在线| 亚洲不卡在线观看| 亚洲一区二区五区| 亚洲国产乱码最新视频| 一区二区三区视频在线看| 亚洲天堂免费看| 国产精品亲子乱子伦xxxx裸| 欧美国产日本视频| 中文字幕在线不卡视频| 亚洲少妇30p| 亚洲女同ⅹxx女同tv| 亚洲黄色片在线观看| 亚洲精品国产a久久久久久| 亚洲精品亚洲人成人网在线播放| 亚洲视频综合在线| 亚洲一区在线电影| 亚洲成av人片在www色猫咪| 免费高清视频精品| 国产麻豆一精品一av一免费 | 国产成人精品网址| 国产99精品国产| 91在线免费播放| 91国偷自产一区二区开放时间| 色激情天天射综合网| 欧美日韩国产经典色站一区二区三区| 欧美撒尿777hd撒尿| 日韩精品一区二区三区在线| 久久久久国产精品免费免费搜索| 国产欧美综合在线观看第十页| 亚洲欧洲日本在线| 午夜视频在线观看一区二区| 久久国内精品自在自线400部| 成人免费黄色在线| 欧美日韩一区三区四区| 精品国产乱码久久久久久免费| 亚洲国产激情av| 日韩电影免费在线看| 国产成人99久久亚洲综合精品| 91免费看`日韩一区二区| 日韩一二三区视频| 国产精品灌醉下药二区| 日韩和的一区二区| 成人av在线网| 日韩免费看网站| 国产精品五月天| 美女网站一区二区| 91国模大尺度私拍在线视频| 日韩欧美色综合网站| 亚洲人吸女人奶水| 国产乱色国产精品免费视频| 欧洲精品中文字幕| 久久久精品黄色| 日本一道高清亚洲日美韩| 波多野结衣亚洲| 26uuu精品一区二区| 亚洲国产综合视频在线观看|