⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin.categories.html.php

📁 mambo的cms源代码
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php/*** @version $Id: admin.categories.html.php,v 1.23 2005/02/16 16:27:09 saka Exp $* @package Mambo* @subpackage Categories* @copyright (C) 2000 - 2005 Miro International Pty Ltd* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL* Mambo is Free Software*//** ensure this file is being included by a parent file */defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );/*** @package Mambo* @subpackage Categories*/class categories_html {	/**	* Writes a list of the categories for a section	* @param array An array of category objects	* @param string The name of the category section	*/	function show( &$rows, $section, $section_name, &$pageNav, &$lists, $type ) {		global $my, $mosConfig_live_site, $adminLanguage;		mosCommonHTML::loadOverlib();		?>		<form action="index2.php" method="post" name="adminForm">		<table class="adminheading">		<tr>			<?php			if ( $section == 'content') {				?>				<th class="categories">				<?php echo $adminLanguage->A_COMP_CATEG_MANAGER;?>				</th>				<td width="right">				<?php echo $lists['sectionid'];?>				</td>				<?php			} else {				if ( is_numeric( $section ) ) {					$query = 'com_content&sectionid=' . $section;				} else {					if ( $section == 'com_contact_details' ) {						$query = 'com_contact';					} else {						$query = $section;					}				}				?>				<th class="categories">				<?php echo sprintf ($adminLanguage->A_COMP_CATEG_CATEGS, $section_name); ?>				</th>				<?php			}			?>		</tr>		</table>		<table class="adminlist">		<tr>			<th width="10" align="left">			<?php echo $adminLanguage->A_COMP_NB;?>			</th>			<th width="20">			<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows );?>);" />			</th>			<th class="title">			<?php echo $adminLanguage->A_COMP_CATEG_NAME;?>			</th>			<th width="10%">			<?php echo $adminLanguage->A_COMP_PUBLISHED;?>			</th>			<?php			if ( $section <> 'content') {				?>				<th colspan="2" width="5%">				<?php echo $adminLanguage->A_COMP_REORDER;?>				</th>				<?php			}			?>			<th width="2%">			<?php echo $adminLanguage->A_COMP_ORDER;?>			</th>			<th width="1%">			<a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo $adminLanguage->A_COMP_SAVE_ORDER;?>" /></a>			</th>			<th width="10%">			<?php echo $adminLanguage->A_COMP_ACCESS;?>			</th>			<?php			if ( $section == 'content') {				?>				<th width="12%" align="left">				<?php echo $adminLanguage->A_COMP_SECTION;?>				</th>				<?php			}			?>			<th width="5%" nowrap>			<?php echo $adminLanguage->A_COMP_CATEG_ID;?>			</th>			<?php			if ( $type == 'content') {				?>				<th width="5%">				<?php echo $adminLanguage->A_COMP_ACTIVE;?>				</th>				<th width="5%">				<?php echo $adminLanguage->A_COMP_TRASH;?>				</th>				<?php			} else {				?>				<th width="20%">				</th>				<?php			}			?>		</tr>		<?php		$k = 0;		for ($i=0, $n=count( $rows ); $i < $n; $i++) {			$row 	= &$rows[$i];			$row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='. $row->section;			$link = 'index2.php?option=com_categories&section='. $section .'&task=editA&hidemainmenu=1&id='. $row->id;			$access 	= mosCommonHTML::AccessProcessing( $row, $i );			$checked 	= mosCommonHTML::CheckedOutProcessing( $row, $i );			$published 	= mosCommonHTML::PublishedProcessing( $row, $i );			?>			<tr class="<?php echo "row$k"; ?>">				<td>				<?php echo $pageNav->rowNumber( $i ); ?>				</td>				<td>				<?php echo $checked; ?>				</td>				<td>				<?php				if ( $row->checked_out_contact_category && ( $row->checked_out_contact_category != $my->id ) ) {					echo $row->name .' ( '. $row->title .' )';				} else {					?>					<a href="<?php echo $link; ?>">					<?php echo $row->name .' ( '. $row->title .' )'; ?>					</a>					<?php				}				?>				</td>				<td align="center">				<?php echo $published;?>				</td>				<?php				if ( $section <> 'content' ) {					?>					<td>					<?php echo $pageNav->orderUpIcon( $i ); ?>					</td>					<td>					<?php echo $pageNav->orderDownIcon( $i, $n ); ?>					</td>					<?php				}				?>				<td align="center" colspan="2">				<input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" />				</td>				<td align="center">				<?php echo $access;?>				</td>				<?php				if ( $section == 'content' ) {					?>					<td align="left">					<a href="<?php echo $row->sect_link; ?>" title="Edit Section">					<?php echo $row->section_name; ?>					</a>					</td>					<?php				}				?>				<td align="center">				<?php echo $row->id; ?>				</td>				<?php				if ( $type == 'content') {					?>					<td align="center">					<?php echo $row->active; ?>					</td>					<td align="center">					<?php echo $row->trash; ?>					</td>					<?php				} else {					?>					<td>					</td>					<?php				}				$k = 1 - $k;				?>			</tr>			<?php		}		?>		</table>		<?php echo $pageNav->getListFooter(); ?>		<input type="hidden" name="option" value="com_categories" />		<input type="hidden" name="section" value="<?php echo $section;?>" />		<input type="hidden" name="task" value="" />		<input type="hidden" name="chosen" value="" />		<input type="hidden" name="act" value="" />		<input type="hidden" name="boxchecked" value="0" />		<input type="hidden" name="type" value="<?php echo $type; ?>" />		<input type="hidden" name="hidemainmenu" value="0" />		</form>		<?php	}	/**	* Writes the edit form for new and existing categories	* @param mosCategory The category object	* @param string	* @param array	*/	function edit( &$row, &$lists, $redirect, $menus ) {		global $adminLanguage;		if ($row->image == "") {			$row->image = 'blank.png';		}		if ( $redirect == 'content' ) {			$component = 'Content';		} else {			$component = ucfirst( substr( $redirect, 4 ) );			if ( $redirect == 'com_contact_details' ) {				$component = 'Contact';			}		}		mosMakeHtmlSafe( $row, ENT_QUOTES, 'description' );		?>		<script language="javascript" type="text/javascript">		function submitbutton(pressbutton, section) {			var form = document.adminForm;			if (pressbutton == 'cancel') {				submitform( pressbutton );				return;			}			if ( pressbutton == 'menulink' ) {				if ( form.menuselect.value == "" ) {					alert( "<?php echo $adminLanguage->A_COMP_SELECT_MENU;?>" );					return;				} else if ( form.link_type.value == "" ) {					alert( "<?php echo $adminLanguage->A_COMP_SELECT_MENU_TYPE;?>" );					return;				} else if ( form.link_name.value == "" ) {					alert( "<?php echo $adminLanguage->A_COMP_ENTER_MENU_NAME;?>" );					return;				}			}			if ( form.name.value == "" ) {				alert("<?php echo $adminLanguage->A_COMP_CATEG_MUST_NAME;?>");			} else {				<?php getEditorContents( 'editor1', 'description' ) ; ?>				submitform(pressbutton);			}		}		</script>		<form action="index2.php" method="post" name="adminForm">		<table class="adminheading">		<tr>			<th class="categories">			<?php echo $adminLanguage->A_COMP_CATEG;?>:			<small>			<?php echo $row->id ? $adminLanguage->A_COMP_EDIT : $adminLanguage->A_COMP_NEW;?>			</small>			<small><small>			[ <?php echo $component; ?>: <?php echo $row->name; ?> ]			</small></small>			</th>		</tr>		</table>		<table width="100%">		<tr>			<td valign="top" width="60%">				<table class="adminform">				<tr>					<th colspan="3">					<?php echo $adminLanguage->A_COMP_CATEG_DETAILS;?>					</th>				<tr>				<tr>					<td>					<?php echo $adminLanguage->A_COMP_CATEG_TITLE;?>:					</td>					<td colspan="2">					<input class="text_area" type="text" name="title" value="<?php echo $row->title; ?>" size="50" maxlength="50" title="<?php echo $adminLanguage->A_COMP_SECT_SHORT_NAME;?>" />					</td>				</tr>				<tr>					<td>					<?php echo $adminLanguage->A_COMP_CATEG_NAME;?>:					</td>					<td colspan="2">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -