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

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

?? admin.categories.php

?? Joomla15 - 最新開源CMS
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?php
/**
* @version		$Id: admin.categories.php 8346 2007-08-07 09:51:10Z eddieajau $
* @package		Joomla
* @subpackage	Categories
* @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.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

require_once( JApplicationHelper::getPath( 'admin_html' ) );

// get parameters from the URL or submitted form
$section 	= JRequest::getCmd( 'section', 'com_content' );
$cid 		= JRequest::getVar( 'cid', array(0), '', 'array' );
JArrayHelper::toInteger($cid, array(0));

switch (JRequest::getCmd('task'))
{
	case 'add' :
	case 'edit':
		editCategory( );
		break;

	case 'moveselect':
		moveCategorySelect( $option, $cid, $section );
		break;

	case 'movesave':
		moveCategorySave( $cid, $section );
		break;

	case 'copyselect':
		copyCategorySelect( $option, $cid, $section );
		break;

	case 'copysave':
		copyCategorySave( $cid, $section );
		break;

	case 'go2menu':
	case 'go2menuitem':
	case 'save':
	case 'apply':
		saveCategory( );
		break;

	case 'remove':
		removeCategories( $section, $cid );
		break;

	case 'publish':
		publishCategories( $section, $cid, 1 );
		break;

	case 'unpublish':
		publishCategories( $section, $cid, 0 );
		break;

	case 'cancel':
		cancelCategory();
		break;

	case 'orderup':
		orderCategory( $cid[0], -1 );
		break;

	case 'orderdown':
		orderCategory( $cid[0], 1 );
		break;

	case 'accesspublic':
		accessMenu( $cid[0], 0, $section );
		break;

	case 'accessregistered':
		accessMenu( $cid[0], 1, $section );
		break;

	case 'accessspecial':
		accessMenu( $cid[0], 2, $section );
		break;

	case 'saveorder':
		saveOrder( $cid, $section );
		break;

	default:
		showCategories( $section, $option );
		break;
}

/**
* Compiles a list of categories for a section
* @param string The name of the category section
*/
function showCategories( $section, $option )
{
	global $mainframe;

	$db					=& JFactory::getDBO();
	$filter_order		= $mainframe->getUserStateFromRequest( $option.'.filter_order',					'filter_order',		'c.ordering',	'cmd' );
	$filter_order_Dir	= $mainframe->getUserStateFromRequest( $option.'.filter_order_Dir',				'filter_order_Dir',	'',				'word' );
	$filter_state		= $mainframe->getUserStateFromRequest( $option.'.'.$section.'.filter_state',	'filter_state',		'',				'word' );
	$sectionid			= $mainframe->getUserStateFromRequest( $option.'.'.$section.'.sectionid',		'sectionid',		0,				'int' );
	$search				= $mainframe->getUserStateFromRequest( $option.'.search',						'search',			'',				'string' );
	$search				= JString::strtolower( $search );

	$limit		= $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' );
	$limitstart	= $mainframe->getUserStateFromRequest( $option.'limitstart', 'limitstart', 0, 'int' );

	$section_name 	= '';
	$content_add 	= '';
	$content_join 	= '';
	$order 			= ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', c.ordering';
	if (intval( $section ) > 0) {
		$table = 'content';

		$query = 'SELECT title'
		. ' FROM #__sections'
		. ' WHERE id = '.(int) $section;
		$db->setQuery( $query );
		$section_name = $db->loadResult();
		$section_name = JText::sprintf( 'Content:', JText::_( $section_name ) );
		$where 	= ' WHERE c.section = '.$db->Quote($section);
		$type 	= 'content';
	} else if (strpos( $section, 'com_' ) === 0) {
		$table = substr( $section, 4 );

		$query = 'SELECT name'
		. ' FROM #__components'
		. ' WHERE link = '.$db->Quote('option='.$section);
		;
		$db->setQuery( $query );
		$section_name = $db->loadResult();
		$where 	= ' WHERE c.section = '.$db->Quote($section);
		$type 	= 'other';
		// special handling for contact component
		if ( $section == 'com_contact_details' ) {
			$section_name 	= JText::_( 'Contact' );
		}
		$section_name = JText::sprintf( 'Component:', $section_name );
	} else {
		$table 	= $section;
		$where 	= ' WHERE c.section = '.$db->Quote($section);
		$type 	= 'other';
	}

	// get the total number of records
	$query = 'SELECT COUNT(*)'
	. ' FROM #__categories'
	. ' WHERE section = '.$db->Quote($section)
	;
	$db->setQuery( $query );
	$total = $db->loadResult();

	// allows for viweing of all content categories
	if ( $section == 'com_content' ) {
		$table 			= 'content';
		$content_add 	= ' , z.title AS section_name';
		$content_join 	= ' LEFT JOIN #__sections AS z ON z.id = c.section';
		$where 			= ' WHERE c.section NOT LIKE "%com_%"';
		if ($filter_order == 'c.ordering'){
			$order 			= ' ORDER BY  z.title, c.ordering';
		} else {
			$order 			= ' ORDER BY  '.$filter_order.' '. $filter_order_Dir.', z.title, c.ordering';
		}

		$section_name 	= JText::_( 'All Content:' );

		// get the total number of records
		$query = 'SELECT COUNT(*)'
		. ' FROM #__categories'
		. ' INNER JOIN #__sections AS s ON s.id = section';
		if ( $sectionid > 0 ) {
			$query .= ' WHERE section = '.$db->Quote($sectionid);
		}
		$db->setQuery( $query );
		$total = $db->loadResult();
		$type 			= 'content';
	}

	// used by filter
	if ( $sectionid > 0 ) {
		$filter = ' AND c.section = '.$db->Quote($sectionid);
	} else {
		$filter = '';
	}
	if ( $filter_state ) {
		if ( $filter_state == 'P' ) {
			$filter .= ' AND c.published = 1';
		} else if ($filter_state == 'U' ) {
			$filter .= ' AND c.published = 0';
		}
	}
	if ($search) {
		$filter .= ' AND LOWER(c.name) LIKE "%'.$db->getEscaped($search).'%"';
	}

	jimport('joomla.html.pagination');
	$pageNav = new JPagination( $total, $limitstart, $limit );

	$tablesAllowed = $db->getTableList();
	if (!in_array($db->getPrefix().$table, $tablesAllowed)) {
		$table = 'content';
	}

	$query = 'SELECT  c.*, c.checked_out as checked_out_contact_category, g.name AS groupname, u.name AS editor, COUNT( DISTINCT s2.checked_out ) AS checked_out_count'
	. $content_add
	. ' FROM #__categories AS c'
	. ' LEFT JOIN #__users AS u ON u.id = c.checked_out'
	. ' LEFT JOIN #__groups AS g ON g.id = c.access'
	. ' LEFT JOIN #__'.$table.' AS s2 ON s2.catid = c.id AND s2.checked_out > 0'
	. $content_join
	. $where
	. $filter
	. ' AND c.published != -2'
	. ' GROUP BY c.id'
	. $order
	;
	$db->setQuery( $query, $pageNav->limitstart, $pageNav->limit );
	$rows = $db->loadObjectList();
	if ($db->getErrorNum()) {
		echo $db->stderr();
		return;
	}

	$count = count( $rows );
	// number of Active Items
	for ( $i = 0; $i < $count; $i++ ) {
		$query = 'SELECT COUNT( a.id )'
		. ' FROM #__content AS a'
		. ' WHERE a.catid = '. (int) $rows[$i]->id
		. ' AND a.state <> -2'
		;
		$db->setQuery( $query );
		$active = $db->loadResult();
		$rows[$i]->active = $active;
	}
	// number of Trashed Items
	for ( $i = 0; $i < $count; $i++ ) {
		$query = 'SELECT COUNT( a.id )'
		. ' FROM #__content AS a'
		. ' WHERE a.catid = '. (int) $rows[$i]->id
		. ' AND a.state = -2'
		;
		$db->setQuery( $query );
		$trash = $db->loadResult();
		$rows[$i]->trash = $trash;
	}

	// get list of sections for dropdown filter
	$javascript = 'onchange="document.adminForm.submit();"';
	$lists['sectionid']	= JHTML::_('list.section',  'sectionid', $sectionid, $javascript );

	// state filter
	$lists['state']	= JHTML::_('grid.state',  $filter_state );

	// table ordering
	$lists['order_Dir'] = $filter_order_Dir;
	$lists['order']		= $filter_order;

	// search filter
	$lists['search']= $search;

	categories_html::show( $rows, $section, $section_name, $pageNav, $lists, $type );
}

/**
* Compiles information to add or edit a category
* @param string The name of the category section
* @param integer The unique id of the category to edit (0 if new)
* @param string The name of the current user
*/
function editCategory( )
{
	global $mainframe;

	// Initialize variables
	$db			=& JFactory::getDBO();
	$user 		=& JFactory::getUser();
	$uid		= $user->get('id');

	$type		= JRequest::getCmd( 'type' );
	$redirect	= JRequest::getCmd( 'section', 'content' );
	$section	= JRequest::getCmd( 'section', 'com_content' );
	$cid		= JRequest::getVar( 'cid', array(0), '', 'array' );

	JArrayHelper::toInteger($cid, array(0));

	// check for existance of any sections
	$query = 'SELECT COUNT( id )'
	. ' FROM #__sections'
	. ' WHERE scope = "content"'
	;
	$db->setQuery( $query );
	$sections = $db->loadResult();
	if (!$sections && $type != 'other'
			&& $section != 'com_weblinks'
			&& $section != 'com_newsfeeds'
			&& $section != 'com_contact_details'
			&& $section != 'com_banner') {
		$mainframe->redirect( 'index.php?option=com_categories&section='. $section, JText::_( 'WARNSECTION', true ) );
	}

	$row =& JTable::getInstance('category');
	// load the row from the db table
	$row->load( $cid[0] );

	// fail if checked out not by 'me'
	if ( JTable::isCheckedOut($user->get ('id'), $row->checked_out )) {
		$msg = JText::sprintf( 'DESCBEINGEDITTED', JText::_( 'The category' ), $row->title );
		$mainframe->redirect( 'index.php?option=com_categories&section='. $row->section, $msg );
	}

	if ( $cid[0] ) {
		$row->checkout( $user->get('id'));
	} else {
		$row->published 	= 1;
	}


	// make order list
	$order = array();
	$query = 'SELECT COUNT(*)'
	. ' FROM #__categories'
	. ' WHERE section = '.$db->Quote($row->section)
	;
	$db->setQuery( $query );
	$max = intval( $db->loadResult() ) + 1;

	for ($i=1; $i < $max; $i++) {
		$order[] = JHTML::_('select.option',  $i );
	}

	// build the html select list for sections
	if ( $section == 'com_content' ) {
		$query = 'SELECT s.id AS value, s.title AS text'
		. ' FROM #__sections AS s'
		. ' ORDER BY s.ordering'
		;
		$db->setQuery( $query );
		$sections = $db->loadObjectList();
		$lists['section'] = JHTML::_('select.genericlist',   $sections, 'section', 'class="inputbox" size="1"', 'value', 'text', $row->section );;
	} else {
		if ( $type == 'other' ) {
			$section_name = JText::_( 'N/A' );
		} else {
			$temp =& JTable::getInstance('section');
			$temp->load( $row->section );
			$section_name = $temp->name;
		}
		if(!$section_name) $section_name = JText::_( 'N/A' );
		$row->section = $section;
		$lists['section'] = '<input type="hidden" name="section" value="'. $row->section .'" />'. $section_name;
	}

	// build the html select list for ordering
	$query = 'SELECT ordering AS value, title AS text'
	. ' FROM #__categories'
	. ' WHERE section = '.$db->Quote($row->section)
	. ' ORDER BY ordering'
	;
	$lists['ordering'] 			= JHTML::_('list.specificordering',  $row, $cid[0], $query );

	// build the select list for the image positions
	$active =  ( $row->image_position ? $row->image_position : 'left' );
	$lists['image_position'] 	= JHTML::_('list.positions',  'image_position', $active, NULL, 0, 0 );
	// Imagelist
	$lists['image'] 			= JHTML::_('list.images',  'image', $row->image );
	// build the html select list for the group access
	$lists['access'] 			= JHTML::_('list.accesslevel',  $row );
	// build the html radio buttons for published
	$published = ($row->id) ? $row->published : 1;
	$lists['published'] 		= JHTML::_('select.booleanlist',  'published', 'class="inputbox"', $published );

 	categories_html::edit( $row, $lists, $redirect );
}

/**
* Saves the catefory after an edit form submit
* @param string The name of the category section
*/
function saveCategory()
{
	global $mainframe;

	// Initialize variables
	$db		 =& JFactory::getDBO();
	$menu 		= JRequest::getCmd( 'menu', 'mainmenu', 'post' );
	$menuid		= JRequest::getVar( 'menuid', 0, 'post', 'int' );
	$redirect 	= JRequest::getCmd( 'redirect', '', 'post' );
	$oldtitle 	= JRequest::getString( 'oldtitle', '', 'post' );
	$post		= JRequest::get( 'post' );

	// fix up special html fields
	$post['description'] = JRequest::getVar( 'description', '', 'post', 'string', JREQUEST_ALLOWRAW );

	$row =& JTable::getInstance('category');
	if (!$row->bind( $post )) {
		JError::raiseError(500, $row->getError() );
	}
	if (!$row->check()) {
		JError::raiseError(500, $row->getError() );
	}
	// if new item order last in appropriate group
	if (!$row->id) {
		$where = "section = " . $db->Quote($row->section);
		$row->ordering = $row->getNextOrder( $where );
	}

	if (!$row->store()) {
		JError::raiseError(500, $row->getError() );
	}
	$row->checkin();

	if ( $oldtitle ) {
		if ($oldtitle != $row->title) {
			$query = 'UPDATE #__menu'
			. ' SET name = '.$db->Quote($row->title)
			. ' WHERE name = '.$db->Quote($oldtitle)
			. ' AND type = "content_category"'
			;
			$db->setQuery( $query );
			$db->query();
		}
	}

	// Update Section Count
	if ($row->section != 'com_contact_details' &&
		$row->section != 'com_newsfeeds' &&
		$row->section != 'com_weblinks') {
		$query = 'UPDATE #__sections SET count=count+1'
		. ' WHERE id = '.$db->Quote($row->section)
		;
		$db->setQuery( $query );
	}

	if (!$db->query()) {
		JError::raiseError(500, $db->getErrorMsg() );
	}

	switch ( JRequest::getCmd('task') )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一级女性全黄久久生活片免费| 欧美一级黄色大片| 国产精品国产成人国产三级| 国产精品夜夜嗨| 国产午夜精品一区二区三区嫩草| 国产盗摄视频一区二区三区| 亚洲国产精品t66y| 色婷婷综合在线| 丝袜美腿亚洲综合| 精品久久五月天| 丁香一区二区三区| 亚洲天堂av一区| 欧美日韩精品是欧美日韩精品| 青青草原综合久久大伊人精品 | 午夜精品免费在线| 日韩一区二区三免费高清| 国产麻豆精品久久一二三| 国产精品久久久久久久久搜平片| 91视视频在线观看入口直接观看www | 欧美日韩色综合| 经典三级在线一区| 一色桃子久久精品亚洲| 欧美日产在线观看| 国产盗摄视频一区二区三区| 樱花草国产18久久久久| 日韩欧美在线观看一区二区三区| 国v精品久久久网| 亚洲高清视频中文字幕| 精品日韩欧美一区二区| 9人人澡人人爽人人精品| 亚洲1区2区3区视频| 久久久久久9999| 在线国产电影不卡| 国产在线精品免费av| 亚洲欧美成人一区二区三区| 91精品国产欧美日韩| 成人免费精品视频| 日本强好片久久久久久aaa| 亚洲国产成人一区二区三区| 欧美另类高清zo欧美| 高清日韩电视剧大全免费| 亚洲成人综合在线| 亚洲国产经典视频| 日韩欧美一区二区久久婷婷| 一本到一区二区三区| 国产麻豆精品在线观看| 午夜精品福利一区二区三区av| 国产女人水真多18毛片18精品视频| 欧美日韩综合在线免费观看| 成人永久aaa| 狠狠狠色丁香婷婷综合激情| 亚洲18色成人| 亚洲伦理在线精品| 欧美国产精品一区二区| 日韩一级片在线观看| 日本韩国欧美在线| 成人精品国产福利| 国产一区二区按摩在线观看| 天天综合网天天综合色| 亚洲精品午夜久久久| 国产嫩草影院久久久久| 欧美精品一区二区三区蜜桃视频 | 日韩美女天天操| 欧美日韩在线三级| 91蜜桃婷婷狠狠久久综合9色| 国产老肥熟一区二区三区| 美女视频黄 久久| 亚洲成av人在线观看| 精品写真视频在线观看| 亚洲欧美日韩国产一区二区三区 | 国产一区二区视频在线播放| 丝袜亚洲另类丝袜在线| 亚洲成人免费看| 亚洲免费在线观看视频| 欧美国产综合一区二区| 国产香蕉久久精品综合网| 精品国产一区二区精华| 日韩亚洲欧美在线观看| 欧美日韩免费观看一区三区| 91国偷自产一区二区使用方法| av成人免费在线观看| 99久久夜色精品国产网站| 国产麻豆精品95视频| 国产一区二区三区在线观看精品 | 亚洲成人先锋电影| 亚洲乱码国产乱码精品精的特点 | 亚洲电影你懂得| 亚洲国产精品久久艾草纯爱| 亚洲男女一区二区三区| 夜夜嗨av一区二区三区| 亚洲亚洲人成综合网络| 亚洲chinese男男1069| 三级一区在线视频先锋| 日本欧美在线看| 九色综合国产一区二区三区| 国产毛片一区二区| 成人黄动漫网站免费app| 波多野结衣在线aⅴ中文字幕不卡| 成人91在线观看| 欧美日韩亚洲综合一区| 这里只有精品电影| 26uuu精品一区二区三区四区在线| 久久久久久一二三区| 亚洲国产精品成人综合| 亚洲蜜桃精久久久久久久| 午夜不卡av免费| 激情成人午夜视频| 9人人澡人人爽人人精品| 欧美亚洲综合另类| 日韩手机在线导航| 欧美国产欧美综合| 午夜视频在线观看一区二区 | 激情综合网av| gogogo免费视频观看亚洲一| 欧美三级欧美一级| 久久综合久久综合九色| 中文字幕一区二区三区色视频| 亚洲成人免费看| 国产不卡在线一区| 欧美亚洲一区二区在线| 精品国产污污免费网站入口 | 日韩av电影免费观看高清完整版在线观看| 久久av老司机精品网站导航| 成人动漫视频在线| 欧美一区二区三区思思人| 国产精品理论片| 开心九九激情九九欧美日韩精美视频电影| 国产精品亚洲一区二区三区在线| 色菇凉天天综合网| 久久午夜老司机| 亚洲成av人片观看| 成人久久视频在线观看| 91精品国产91久久综合桃花| 国产精品美女久久久久久久久| 日韩精彩视频在线观看| 99精品视频在线观看| 欧美不卡视频一区| 亚洲一本大道在线| 91偷拍与自偷拍精品| wwww国产精品欧美| 日本vs亚洲vs韩国一区三区二区| 99久久精品免费观看| 久久综合丝袜日本网| 日本aⅴ精品一区二区三区 | 国产精品久久久久久久久久久免费看| 亚洲成av人**亚洲成av**| 91蝌蚪porny成人天涯| 久久久久久夜精品精品免费| 久久99国内精品| 欧美精品自拍偷拍动漫精品| 一区二区在线看| 成人av网址在线| 国产欧美一区在线| 国产一区福利在线| 日韩视频一区二区三区| 丝袜a∨在线一区二区三区不卡| 色成年激情久久综合| 欧美国产激情二区三区 | 麻豆精品一区二区综合av| 欧美在线三级电影| 亚洲精品高清视频在线观看| 97精品国产露脸对白| 国产精品欧美一级免费| 精品一区二区三区在线观看国产| 91精品欧美久久久久久动漫| 日日骚欧美日韩| 欧美酷刑日本凌虐凌虐| 亚洲国产成人av好男人在线观看| 在线观看国产精品网站| 一区二区三区日韩精品| 色狠狠综合天天综合综合| 亚洲欧美福利一区二区| 一本一道综合狠狠老| 亚洲妇熟xx妇色黄| 精品视频在线免费观看| 午夜精品久久久久久久| 欧美一区二区在线观看| 美国欧美日韩国产在线播放| 欧美不卡视频一区| 高清成人免费视频| 综合欧美亚洲日本| 欧美艳星brazzers| 久久精品国产成人一区二区三区| www国产成人| 99久久免费视频.com| 亚洲午夜电影在线| 91精品国产一区二区三区香蕉| 另类专区欧美蜜桃臀第一页| 久久蜜桃一区二区| youjizz国产精品| 一区二区成人在线| 欧美大片一区二区| 成人精品国产免费网站| 亚洲一区二区三区视频在线播放 | 亚洲小说春色综合另类电影| 91麻豆精品国产自产在线| 日本aⅴ免费视频一区二区三区| 久久精品视频在线免费观看 | 日日摸夜夜添夜夜添国产精品| 精品国产伦理网|