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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? controller.php

?? 簡介:一款免費(fèi)開源的內(nèi)容管理系統(tǒng)(CMS)
?? PHP
字號:
<?php/** * @version		$Id: controller.php 10492 2008-07-02 06:38:28Z ircmaxell $ * @package		Joomla * @subpackage	Content * @copyright	Copyright (C) 2005 - 2008 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( 'Restricted access' );jimport('joomla.application.component.controller');/** * User Component Controller * * @package		Joomla * @subpackage	Weblinks * @since 1.5 */class UserController extends JController{	/**	 * Method to display a view	 *	 * @access	public	 * @since	1.5	 */	function display()	{		parent::display();	}	function edit()	{		global $mainframe, $option;		$db		=& JFactory::getDBO();		$user	=& JFactory::getUser();		if ( $user->get('guest')) {			JError::raiseError( 403, JText::_('Access Forbidden') );			return;		}		JRequest::setVar('layout', 'form');		parent::display();	}	function save()	{		// Check for request forgeries		JRequest::checkToken() or jexit( 'Invalid Token' );		$user	 =& JFactory::getUser();		$userid = JRequest::getVar( 'id', 0, 'post', 'int' );		// preform security checks		if ($user->get('id') == 0 || $userid == 0 || $userid <> $user->get('id')) {			JError::raiseError( 403, JText::_('Access Forbidden') );			return;		}		//clean request		$post = JRequest::get( 'post' );		$post['username']	= JRequest::getVar('username', '', 'post', 'username');		$post['password']	= JRequest::getVar('password', '', 'post', 'string', JREQUEST_ALLOWRAW);		$post['password2']	= JRequest::getVar('password2', '', 'post', 'string', JREQUEST_ALLOWRAW);		// do a password safety check		if(strlen($post['password']) || strlen($post['password2'])) { // so that "0" can be used as password e.g.			if($post['password'] != $post['password2']) {				$msg	= JText::_('PASSWORDS_DO_NOT_MATCH');				$this->setRedirect($_SERVER['HTTP_REFERER'], $msg);				return false;			}		}		// we don't want users to edit certain fields so we will unset them		unset($post['gid']);		unset($post['block']);		unset($post['usertype']);		unset($post['registerDate']);		unset($post['activation']);		// store data		$model = $this->getModel('user');		if ($model->store($post)) {			$msg	= JText::_( 'Your settings have been saved.' );		} else {			//$msg	= JText::_( 'Error saving your settings.' );			$msg	= $model->getError();		}		$this->setRedirect( $_SERVER['HTTP_REFERER'], $msg );	}	function cancel()	{		$this->setRedirect( 'index.php' );	}	function login()	{		// Check for request forgeries		JRequest::checkToken('request') or jexit( 'Invalid Token' );		global $mainframe;		if ($return = JRequest::getVar('return', '', 'method', 'base64')) {			$return = base64_decode($return);			if (strpos( $return, 'http' ) !== false && strpos( $return, JURI::base() ) !== 0) {				$return = '';			}		}		$options = array();		$options['remember'] = JRequest::getBool('remember', false);		$options['return'] = $return;		$credentials = array();		$credentials['username'] = JRequest::getVar('username', '', 'method', 'username');		$credentials['password'] = JRequest::getString('passwd', '', 'post', JREQUEST_ALLOWRAW);		//preform the login action		$error = $mainframe->login($credentials, $options);		if(!JError::isError($error))		{			// Redirect if the return url is not registration or login			if ( ! $return ) {				$return	= 'index.php?option=com_user';			}			$mainframe->redirect( $return );		}		else		{			// Facilitate third party login forms			if ( ! $return ) {				$return	= 'index.php?option=com_user&view=login';			}			// Redirect to a login form			$mainframe->redirect( $return );		}	}	function logout()	{		global $mainframe;		//preform the logout action		$error = $mainframe->logout();		if(!JError::isError($error))		{			if ($return = JRequest::getVar('return', '', 'method', 'base64')) {				$return = base64_decode($return);				if (strpos( $return, 'http' ) !== false && strpos( $return, JURI::base() ) !== 0) {					$return = '';				}			}			// Redirect if the return url is not registration or login			if ( $return && !( strpos( $return, 'com_user' )) ) {				$mainframe->redirect( $return );			}		} else {			parent::display();		}	}	/**	 * Prepares the registration form	 * @return void	 */	function register()	{		$usersConfig = &JComponentHelper::getParams( 'com_users' );		if (!$usersConfig->get( 'allowUserRegistration' )) {			JError::raiseError( 403, JText::_( 'Access Forbidden' ));			return;		}				$user 	=& JFactory::getUser();				if ( $user->get('guest')) {			JRequest::setVar('view', 'register');		} else {			$this->setredirect('index.php?option=com_user&task=edit',JText::_('You are already registered.'));		}		parent::display();	}	/**	 * Save user registration and notify users and admins if required	 * @return void	 */	function register_save()	{		global $mainframe;		// Check for request forgeries		JRequest::checkToken() or jexit( 'Invalid Token' );		// Get required system objects		$user 		= clone(JFactory::getUser());		$pathway 	=& $mainframe->getPathway();		$config		=& JFactory::getConfig();		$authorize	=& JFactory::getACL();		$document   =& JFactory::getDocument();		// If user registration is not allowed, show 403 not authorized.		$usersConfig = &JComponentHelper::getParams( 'com_users' );		if ($usersConfig->get('allowUserRegistration') == '0') {			JError::raiseError( 403, JText::_( 'Access Forbidden' ));			return;		}		// Initialize new usertype setting		$newUsertype = $usersConfig->get( 'new_usertype' );		if (!$newUsertype) {			$newUsertype = 'Registered';		}		// Bind the post array to the user object		if (!$user->bind( JRequest::get('post'), 'usertype' )) {			JError::raiseError( 500, $user->getError());		}		// Set some initial user values		$user->set('id', 0);		$user->set('usertype', '');		$user->set('gid', $authorize->get_group_id( '', $newUsertype, 'ARO' ));		$date =& JFactory::getDate();		$user->set('registerDate', $date->toMySQL());		// If user activation is turned on, we need to set the activation information		$useractivation = $usersConfig->get( 'useractivation' );		if ($useractivation == '1')		{			jimport('joomla.user.helper');			$user->set('activation', md5( JUserHelper::genRandomPassword()) );			$user->set('block', '1');		}		// If there was an error with registration, set the message and display form		if ( !$user->save() )		{			JError::raiseWarning('', JText::_( $user->getError()));			$this->register();			return false;		}		// Send registration confirmation mail		$password = JRequest::getString('password', '', 'post', JREQUEST_ALLOWRAW);		$password = preg_replace('/[\x00-\x1F\x7F]/', '', $password); //Disallow control chars in the email		UserController::_sendMail($user, $password);		// Everything went fine, set relevant message depending upon user activation state and display message		if ( $useractivation == 1 ) {			$message  = JText::_( 'REG_COMPLETE_ACTIVATE' );		} else {			$message = JText::_( 'REG_COMPLETE' );		}				$this->setRedirect('index.php', $message);	}	function activate()	{		global $mainframe;		// Initialize some variables		$db			=& JFactory::getDBO();		$user 		=& JFactory::getUser();		$document   =& JFactory::getDocument();		$pathway 	=& $mainframe->getPathWay();		$usersConfig = &JComponentHelper::getParams( 'com_users' );		$userActivation			= $usersConfig->get('useractivation');		$allowUserRegistration	= $usersConfig->get('allowUserRegistration');		// Check to see if they're logged in, because they don't need activating!		if ($user->get('id')) {			// They're already logged in, so redirect them to the home page			$mainframe->redirect( 'index.php' );		}		if ($allowUserRegistration == '0' || $userActivation == '0') {			JError::raiseError( 403, JText::_( 'Access Forbidden' ));			return;		}		// create the view		require_once (JPATH_COMPONENT.DS.'views'.DS.'register'.DS.'view.html.php');		$view = new UserViewRegister();		$message = new stdClass();		// Do we even have an activation string?		$activation = JRequest::getVar('activation', '', '', 'alnum' );		$activation = $db->getEscaped( $activation );		if (empty( $activation ))		{			// Page Title			$document->setTitle( JText::_( 'REG_ACTIVATE_NOT_FOUND_TITLE' ) );			// Breadcrumb			$pathway->addItem( JText::_( 'REG_ACTIVATE_NOT_FOUND_TITLE' ));			$message->title = JText::_( 'REG_ACTIVATE_NOT_FOUND_TITLE' );			$message->text = JText::_( 'REG_ACTIVATE_NOT_FOUND' );			$view->assign('message', $message);			$view->display('message');			return;		}		// Lets activate this user		jimport('joomla.user.helper');		if (JUserHelper::activateUser($activation))		{			// Page Title			$document->setTitle( JText::_( 'REG_ACTIVATE_COMPLETE_TITLE' ) );			// Breadcrumb			$pathway->addItem( JText::_( 'REG_ACTIVATE_COMPLETE_TITLE' ));			$message->title = JText::_( 'REG_ACTIVATE_COMPLETE_TITLE' );			$message->text = JText::_( 'REG_ACTIVATE_COMPLETE' );		}		else		{			// Page Title			$document->setTitle( JText::_( 'REG_ACTIVATE_NOT_FOUND_TITLE' ) );			// Breadcrumb			$pathway->addItem( JText::_( 'REG_ACTIVATE_NOT_FOUND_TITLE' ));			$message->title = JText::_( 'REG_ACTIVATE_NOT_FOUND_TITLE' );			$message->text = JText::_( 'REG_ACTIVATE_NOT_FOUND' );		}		$view->assign('message', $message);		$view->display('message');	}	/**	 * Password Reset Request Method	 *	 * @access	public	 */	function requestreset()	{		// Check for request forgeries		JRequest::checkToken() or jexit( 'Invalid Token' );		// Get the input		$email		= JRequest::getVar('email', null, 'post', 'string');		// Get the model		$model = &$this->getModel('Reset');		// Request a reset		if ($model->requestReset($email) === false)		{			$message = JText::sprintf('PASSWORD_RESET_REQUEST_FAILED', $model->getError());			$this->setRedirect('index.php?option=com_user&view=reset', $message);			return false;		}		$this->setRedirect('index.php?option=com_user&view=reset&layout=confirm');	}	/**	 * Password Reset Confirmation Method	 *	 * @access	public	 */	function confirmreset()	{		// Check for request forgeries		JRequest::checkToken() or jexit( 'Invalid Token' );		// Get the input		$token = JRequest::getVar('token', null, 'post', 'alnum');		// Get the model		$model = &$this->getModel('Reset');		// Verify the token		if ($model->confirmReset($token) === false)		{			$message = JText::sprintf('PASSWORD_RESET_CONFIRMATION_FAILED', $model->getError());			$this->setRedirect('index.php?option=com_user&view=reset&layout=confirm', $message);			return false;		}		$this->setRedirect('index.php?option=com_user&view=reset&layout=complete');	}	/**	 * Password Reset Completion Method	 *	 * @access	public	 */	function completereset()	{		// Check for request forgeries		JRequest::checkToken() or jexit( 'Invalid Token' );		// Get the input		$password1 = JRequest::getVar('password1', null, 'post', 'string', JREQUEST_ALLOWRAW);		$password2 = JRequest::getVar('password2', null, 'post', 'string', JREQUEST_ALLOWRAW);		// Get the model		$model = &$this->getModel('Reset');		// Reset the password		if ($model->completeReset($password1, $password2) === false)		{			$message = JText::sprintf('PASSWORD_RESET_FAILED', $model->getError());			$this->setRedirect('index.php?option=com_user&view=reset&layout=complete', $message);			return false;		}		$message = JText::_('PASSWORD_RESET_SUCCESS');		$this->setRedirect('index.php?option=com_user&view=login', $message);	}	/**	 * Username Reminder Method	 *	 * @access	public	 */	function remindusername()	{		// Check for request forgeries		JRequest::checkToken() or jexit( 'Invalid Token' );		// Get the input		$email = JRequest::getVar('email', null, 'post', 'string');		// Get the model		$model = &$this->getModel('Remind');		// Send the reminder		if ($model->remindUsername($email) === false)		{			$message = JText::sprintf('USERNAME_REMINDER_FAILED', $model->getError());			$this->setRedirect('index.php?option=com_user&view=remind', $message);			return false;		}		$message = JText::sprintf('USERNAME_REMINDER_SUCCESS', $email);		$this->setRedirect('index.php?option=com_user&view=login', $message);	}	function _sendMail(&$user, $password)	{		global $mainframe;		$db		=& JFactory::getDBO();		$name 		= $user->get('name');		$email 		= $user->get('email');		$username 	= $user->get('username');		$usersConfig 	= &JComponentHelper::getParams( 'com_users' );		$sitename 		= $mainframe->getCfg( 'sitename' );		$useractivation = $usersConfig->get( 'useractivation' );		$mailfrom 		= $mainframe->getCfg( 'mailfrom' );		$fromname 		= $mainframe->getCfg( 'fromname' );		$siteURL		= JURI::base();		$subject 	= sprintf ( JText::_( 'Account details for' ), $name, $sitename);		$subject 	= html_entity_decode($subject, ENT_QUOTES);		if ( $useractivation == 1 ){			$message = sprintf ( JText::_( 'SEND_MSG_ACTIVATE' ), $name, $sitename, $siteURL."index.php?option=com_user&task=activate&activation=".$user->get('activation'), $siteURL, $username, $password);		} else {			$message = sprintf ( JText::_( 'SEND_MSG' ), $name, $sitename, $siteURL);		}		$message = html_entity_decode($message, ENT_QUOTES);		//get all super administrator		$query = 'SELECT name, email, sendEmail' .				' FROM #__users' .				' WHERE LOWER( usertype ) = "super administrator"';		$db->setQuery( $query );		$rows = $db->loadObjectList();		// Send email to user		if ( ! $mailfrom  || ! $fromname ) {			$fromname = $rows[0]->name;			$mailfrom = $rows[0]->email;		}		JUtility::sendMail($mailfrom, $fromname, $email, $subject, $message);		// Send notification to all administrators		$subject2 = sprintf ( JText::_( 'Account details for' ), $name, $sitename);		$subject2 = html_entity_decode($subject2, ENT_QUOTES);		// get superadministrators id		foreach ( $rows as $row )		{			if ($row->sendEmail)			{				$message2 = sprintf ( JText::_( 'SEND_MSG_ADMIN' ), $row->name, $sitename, $name, $email, $username);				$message2 = html_entity_decode($message2, ENT_QUOTES);				JUtility::sendMail($mailfrom, $fromname, $row->email, $subject2, $message2);			}		}	}}?>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产中文一区二区三区| 在线电影一区二区三区| 中文字幕日韩欧美一区二区三区| av中文字幕亚洲| 亚洲欧美偷拍三级| 欧美色窝79yyyycom| 日韩avvvv在线播放| 欧美va在线播放| 成人免费毛片片v| 一区二区三区日本| 91精品国产综合久久香蕉麻豆 | 国产精品私房写真福利视频| 99精品视频一区二区三区| 一区二区三区在线观看视频| 欧美日韩一级大片网址| 老汉av免费一区二区三区| 欧美激情中文不卡| 欧洲精品视频在线观看| 久久激情五月激情| 国产精品水嫩水嫩| 欧美日韩精品高清| 国模冰冰炮一区二区| 亚洲欧洲日韩av| 这里是久久伊人| 大桥未久av一区二区三区中文| 亚洲午夜激情av| 精品免费日韩av| 91啦中文在线观看| 麻豆91精品视频| 国产精品国产精品国产专区不片| 欧美日韩国产一级二级| 国产主播一区二区三区| 一区二区免费在线| 久久尤物电影视频在线观看| 91国偷自产一区二区三区观看| 久久精工是国产品牌吗| 亚洲色大成网站www久久九九| 日韩亚洲电影在线| 91同城在线观看| 精品一区二区三区久久久| 亚洲天堂a在线| 日韩精品专区在线影院重磅| 91影院在线观看| 狠狠色丁香婷婷综合| 亚洲最新视频在线观看| 国产亚洲短视频| 8x福利精品第一导航| 99精品视频一区二区| 久久99精品久久久久婷婷| 一区二区三区在线观看视频| 国产亚洲精品aa| 91精品国产免费| 色综合久久久久| 国产美女精品人人做人人爽| 婷婷综合五月天| 亚洲色图19p| 国产亚洲精品7777| 欧美一二区视频| 欧美曰成人黄网| 成人听书哪个软件好| 精品一区二区三区久久久| 亚洲成人资源网| 亚洲色图色小说| 日本一区二区三区在线观看| 日韩午夜av一区| 欧洲中文字幕精品| 99精品欧美一区二区三区小说 | 精品国产露脸精彩对白| 欧美日韩日日摸| 99国产精品久久久久| 国产成人一区二区精品非洲| 美日韩一区二区三区| 午夜精品久久久久久久久久 | 久久99精品久久久久久动态图 | 国产精品色在线观看| 日韩视频中午一区| 欧美午夜精品电影| 91日韩一区二区三区| 成人网页在线观看| 国产剧情一区二区三区| 久久精品国产免费看久久精品| 亚洲国产欧美日韩另类综合 | 国产精品毛片久久久久久久| 26uuu色噜噜精品一区二区| 欧美一区二区大片| 欧美理论电影在线| 欧美日韩免费电影| 在线观看中文字幕不卡| 色诱视频网站一区| 99久久久精品| 播五月开心婷婷综合| 丁香婷婷深情五月亚洲| 国产传媒日韩欧美成人| 国产一区二区三区电影在线观看| 九一九一国产精品| 免费人成在线不卡| 另类小说图片综合网| 秋霞成人午夜伦在线观看| 日本在线不卡视频| 三级成人在线视频| 轻轻草成人在线| 蜜桃av一区二区三区| 免费国产亚洲视频| 久久国产尿小便嘘嘘尿| 老汉av免费一区二区三区| 久久激情五月激情| 韩国一区二区在线观看| 国产乱人伦偷精品视频不卡| 国产一区二区三区免费在线观看| 国产在线视频一区二区三区| 国内精品久久久久影院一蜜桃| 国产一区二区三区免费看| 国产经典欧美精品| 成人h精品动漫一区二区三区| 波多野结衣精品在线| 色综合天天综合色综合av| 91国偷自产一区二区三区观看| 欧美最新大片在线看 | 日韩一区二区不卡| 精品国产电影一区二区| 国产午夜亚洲精品理论片色戒| 日本一区二区三级电影在线观看| 精品一区二区三区免费毛片爱| 极品尤物av久久免费看| 国产成人av一区二区三区在线| 成人va在线观看| 91国偷自产一区二区三区观看| 欧美日韩不卡在线| 日韩精品一区二区三区在线播放| 久久蜜桃一区二区| 国产精品久久免费看| 一区二区三区免费网站| 日韩精品色哟哟| 国产美女精品一区二区三区| 成人h动漫精品一区二区| 91福利国产成人精品照片| 69久久99精品久久久久婷婷| 精品理论电影在线| 国产精品美女久久久久av爽李琼 | 亚洲日本成人在线观看| 亚洲bt欧美bt精品| 黄色资源网久久资源365| 成人午夜免费av| 欧美三片在线视频观看| 日韩欧美国产小视频| 国产女人18水真多18精品一级做| 亚洲欧美一区二区三区极速播放 | 九九视频精品免费| 成人一区二区三区中文字幕| 色先锋资源久久综合| 欧美精品久久天天躁| 国产网站一区二区三区| 亚洲一区二区中文在线| 久久99热这里只有精品| av成人免费在线| 91精品国产全国免费观看| 国产欧美精品一区二区三区四区| 亚洲综合精品久久| 国产综合一区二区| 91福利资源站| 精品久久久久久久久久久久久久久 | 奇米色777欧美一区二区| 成人做爰69片免费看网站| 欧美日韩激情在线| 亚洲国产高清在线| 日产精品久久久久久久性色| 成人av在线一区二区三区| 7777精品伊人久久久大香线蕉 | 国产欧美日本一区二区三区| 性久久久久久久久久久久| 国产精品99久久久久久久vr | 欧美成人午夜电影| 亚洲欧洲美洲综合色网| 免费在线看一区| 一本到不卡免费一区二区| 精品1区2区在线观看| 亚洲综合免费观看高清完整版在线 | 奇米一区二区三区| 色综合天天天天做夜夜夜夜做| 精品国产乱码久久久久久1区2区 | 色婷婷狠狠综合| 久久婷婷久久一区二区三区| 亚洲综合免费观看高清完整版| 国产精品原创巨作av| 欧美婷婷六月丁香综合色| 国产欧美日韩麻豆91| 免费的国产精品| 在线观看亚洲一区| 中文成人综合网| 九九国产精品视频| 欧美日韩一区二区三区在线看| 中文字幕不卡在线观看| 蜜芽一区二区三区| 欧美色图12p| 最新久久zyz资源站| 狠狠狠色丁香婷婷综合久久五月| 欧美男女性生活在线直播观看| 中文字幕在线观看不卡| 国产一区二区三区四区五区美女 | 久久99久久久欧美国产|