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

📄 admin.easygallery.html.php

📁 这是一个joomla系统的插件, 这是一个joomla系统的插件
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php/*** @package EasyGallery* @copyright (C) 2006 Joomla-addons.org* @author  Adam van Dongen* @version $Id: admin.easygallery.html.php 8 2007-06-22 13:16:00Z websmurf $* * --------------------------------------------------------------------------------* All rights reserved. Easy Gallery Component for Joomla!** This program is free software; you can redistribute it and/or* modify it under the terms of the Joomla-addons Free Software License * See LICENSE.php for more information.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  * --------------------------------------------------------------------------------**/defined( '_VALID_MOS' ) or die( 'Restricted access' );class HTML_easygallery {    /**   * Display a list of all categories   *   * @param array $rows   * @param <var>mosPageNav</var> $pageNav   * @param array $lists   */  function showCategories($rows, $pageNav, $lists){    global $option;    ?>    <form action="index2.php" method="post" name="adminForm">		<table class="adminheading">		<tr>		  <th class="categories">Category Manager</th>		  <td nowrap="nowrap">Category: <?php echo $lists['cid']; ?></td>	  </tr>	  </table>	  <table class="adminlist">		<tr>			<th width="10" align="left">#</th>			<th width="20"><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows );?>);" /></th>			<th class="title">Category Name</th>			<th width="10%">Published</th>			<th colspan="2" width="5%">Reorder</th>			<th width="2%">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="Save Order" /></a></th>			<th width="5%" nowrap>Category ID</th>			<th width="20%"></th>		</tr>		<?php		$k = 0;		for ($i=0, $n=count( $rows ); $i < $n; $i++) {			$row 	= &$rows[$i];			$link = 'index2.php?option='. $option . '&act=categories&task=edit&hidemainmenu=1&cid='. $row->id;			$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><a href="<?php echo $link; ?>"><?php echo stripslashes( $row->name ) .' ( '. stripslashes( $row->title ) .' )'; ?> </a></td>				<td align="center"><?php echo $published;?></td>				<td><?php echo $pageNav->orderUpIcon( $i ); ?></td>				<td><?php echo $pageNav->orderDownIcon( $i, $n ); ?></td>				<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 $row->id; ?></td>				<td></td>								<?php				$k = 1 - $k;				?>			</tr>			<?php		}		?>		</table>		<?php echo $pageNav->getListFooter(); ?>		<input type="hidden" name="option" value="<?php echo $option; ?>" />		<input type="hidden" name="task" value="" />		<input type="hidden" name="act" value="categories" />		<input type="hidden" name="boxchecked" value="0" />		<input type="hidden" name="hidemainmenu" value="0" />		</form>    <?php  }    /**   * Edit or add a category   * @param mosCategory The category object   * @param string   */	function editCategory( $row, $lists ) {	  global $option;		?>		<script language="javascript" type="text/javascript">		function submitbutton(pressbutton, section) {			var form = document.adminForm;			if (pressbutton == 'cancel') {				submitform( pressbutton );				return;			}			if ( form.name.value == "" ) {				alert("Category must have a 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 $row->id ? 'Edit a category' : 'Add a category';?></th>		</tr>		</table>		<table class="adminform">		<tr>			<th colspan="3">Category Details</th>		<tr>		<tr>			<td width="150">Category Title:</td>			<td colspan="2"><input class="text_area" type="text" name="title" value="<?php echo stripslashes( $row->title ); ?>" size="50" maxlength="50" title="A short name to appear in menus" /></td>		</tr>		<tr>			<td>Category Name:</td>			<td colspan="2"><input class="text_area" type="text" name="name" value="<?php echo stripslashes( $row->name ); ?>" size="50" maxlength="255" title="A long name to be displayed in headings" /></td>		</tr>		<tr valign="top">			<td>			Access Level:			</td>			<td>			<?php echo $lists['access']; ?>			</td>		</tr>		<tr>			<td>Parent:</td>			<td><?php echo $lists['parent_id']; ?></td>		</tr>		<tr>			<td>Published:</td>			<td><?php echo $lists['published']; ?></td>		</tr>		<tr>			<td valign="top" colspan="2">Description:</td>		</tr>		<tr>			<td colspan="3">			<?php  			// parameters : areaname, content, hidden field, width, height, rows, cols  			editorArea( 'editor1',  $row->description , 'description', '100%;', '300', '60', '20' ) ; 			?>			</td>		</tr>		</table>		<input type="hidden" name="option" value="<?php echo $option; ?>" />		<input type="hidden" name="act" value="categories" />		<input type="hidden" name="id" value="<?php echo $row->id; ?>" />		<input type="hidden" name="task" value="" />		<input type="hidden" name="hidemainmenu" value="0" />		</form>		<?php	}		/**	 * Show photo's	 *	 * @param array $rows	 * @param <var>mosPageNav</var> $pageNav	 * @param array $lists	 */	function showPhotos($rows, $pageNav, $lists){	  global $option;    ?>    <form action="index2.php" method="post" name="adminForm">		<table class="adminheading">		<tr>		  <th class="categories">Manage photo's</th>		  <td nowrap="nowrap">Category: <?php echo $lists['cid']; ?></td>	  </tr>	  </table>	  <table class="adminlist">		<tr>			<th width="10" align="left">#</th>			<th width="20"><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows );?>);" /></th>			<th class="title">Name</th>			<th colspan="2" width="5%">Reorder</th>			<th width="2%">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="Save Order" /></a></th>			<th class="title">Category</th>			<th class="title" width="75">Cat Thumb</th>			<th class="title" width="75">Published</th>			<th></th>		</tr>		<?php		$k = 0;		for ($i=0, $n=count( $rows ); $i < $n; $i++) {			$row 	= &$rows[$i];			$link = 'index2.php?option='. $option . '&act=photos&task=edit&hidemainmenu=1&cid='. $row->id;			?>			<tr class="<?php echo "row$k"; ?>">				<td><?php echo $pageNav->rowNumber( $i ); ?></td>				<td><?php echo mosHTML::idBox($i, $row->id); ?></td>				<td>				  <a href="<?php echo $link; ?>">				  <?php echo  $row->name ; ?>				  </a>				</td>				<td><?php echo $pageNav->orderUpIcon( $i ); ?></td>				<td><?php echo $pageNav->orderDownIcon( $i, $n ); ?></td>				<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><?php echo $row->category; ?></td>				<td><?php echo ($row->default ? '<img src="images/tick.png" border="0" />' : ''); ?></td>				<td>				  <a href="javascript:void(0);" onclick="return listItemTask('cb<?php echo $i;?>','<?php echo $row->state ? 'unpublish' : 'publish'; ?>')">				  <img src="images/<?php echo $row->state ? "tick.png" : "publish_x.png"; ?>" border="0" />				  </a>				</td>				<td></td>			</tr>			<?php						$k = 1 - $k;		}		?>		</table>		<?php echo $pageNav->getListFooter(); ?>		<input type="hidden" name="option" value="<?php echo $option; ?>" />		<input type="hidden" name="task" value="" />		<input type="hidden" name="act" value="photos" />		<input type="hidden" name="boxchecked" value="0" />		<input type="hidden" name="hidemainmenu" value="0" />		</form>    <?php	}		/**	 * Edit or add a photo	 * @param dbGallery gallery object	 * @param array	 */	function editPhoto( $row, $lists ) {	  global $option, $mainframe, $eg_thumbnail_path;	  ?>	  <script language="javascript" type="text/javascript">		function submitbutton(pressbutton, section) {			var form = document.adminForm;			if (pressbutton == 'cancel') {				submitform( pressbutton );				return;			}			<?php getEditorContents( 'editor1', 'description' ) ; ?>			submitform(pressbutton);		}		</script>	  	  <form action="index2.php" method="post" name="adminForm">		<table class="adminheading">		<tr>			<th class="categories"><?php echo $row->id ? 'Edit a photo' : 'Add a photo';?></th>		</tr>		</table>		<table class="adminform">		<tr>			<th colspan="3">Photo Details</th>		<tr>		<tr>		  <td width="150">Name:</td>		  <td><input type="text" name="name" class="text_area" size="30" value="<?php echo $row->name; ?>" /></td>		  <td rowspan="5"><img src="<?php echo $mainframe->getCfg('live_site') . $eg_thumbnail_path . '/' . $row->path; ?>" alt="<?php echo $row->name; ?>" border="0" /></td>		</tr>		<tr>		  <td>Category:</td>		  <td><?php echo $lists['cid']; ?></td>		</tr>		<tr>		  <td>Gallery thumbnail:</td>		  <td><?php echo mosHTML::yesnoRadioList('default', '', $row->default); ?></td>		</tr>		<tr>		  <td>Published:</td>		  <td><?php echo mosHTML::yesnoRadioList('state', '', $row->state); ?></td>		</tr>		<tr valign="top">		  <td>Description:</td>		  <td><?php 		    // parameters : areaname, content, hidden field, width, height, rows, cols        editorArea( 'editor1',  $row->description , 'description', '100%;', '300', '60', '20' ) ;         ?>		  </td>		</tr>		</table>				<input type="hidden" name="id" value="<?php echo $row->id; ?>" />		<input type="hidden" name="option" value="<?php echo $option; ?>" />		<input type="hidden" name="task" value="" />		<input type="hidden" name="act" value="photos" />		<input type="hidden" name="boxchecked" value="0" />		<input type="hidden" name="hidemainmenu" value="0" />		</form>	  <?php	}		/**	 * Upload form	 * 	 * @param array lists	 */	function upload($lists){	  global $option, $mainframe;	  	  mosCommonHTML::loadOverlib();	  ?>	  <script language="javascript" type="text/javascript">		function submitbutton(pressbutton, section) {			var form = document.adminForm;			if (pressbutton == 'cancel') {				submitform( pressbutton );				return;			}			<?php getEditorContents( 'editor1', 'description' ) ; ?>			submitform(pressbutton);		}		</script>	  <form action="index2.php" method="post" name="adminForm" enctype="multipart/form-data">		<table class="adminheading">		<tr>			<th class="mediamanager">Upload photo(s)</th>		</tr>		</table>		<br />		<div align="left" class="small">Upload limit: <?php echo ini_get('upload_max_filesize'); ?></div>		<table class="adminlist" width="100%">		<tr>		  <td width="150">Place in category: </td>		  <td><?php echo $lists['cid']; ?></td>		</tr>		<tr>		  <td>Image sorting: </td>		  <td><?php echo $lists['sort']; ?></td>		</tr>		<tr>		  <td>Default published: </td>		  <td><?php echo mosHTML::yesnoRadioList('state', '', 1); ?></td>		</tr>		<tr>		  <td>Name: <?php echo mosToolTip('If you leave this empty, Easy Gallery will use the name of the uploaded image.', 'Help'); ?></td>		  <td><input type="text" name="name" class="text_area" size="30" value="" /></td>

⌨️ 快捷键说明

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