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

📄 admin.templates.html.php

📁 没什么功能
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php/*** @version		$Id: admin.templates.html.php 10381 2008-06-01 03:35:53Z pasamio $* @package		Joomla* @subpackage	Templates* @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.*/// no direct accessdefined('_JEXEC') or die('Restricted access');/*** @package		Joomla* @subpackage	Templates*/class TemplatesView{	/**	* @param array An array of data objects	* @param object A page navigation object	* @param string The option	*/	function showTemplates(& $rows, & $lists, & $page, $option, & $client)	{		global $mainframe;		$limitstart = JRequest :: getVar('limitstart', '0', '', 'int');		$user = & JFactory :: getUser();		if (isset ($row->authorUrl) && $row->authorUrl != '') {			$row->authorUrl = str_replace('http://', '', $row->authorUrl);		}		JHTML::_('behavior.tooltip');?>		<form action="index.php" method="post" name="adminForm">			<table class="adminlist">			<thead>				<tr>					<th width="5" class="title">						<?php echo JText::_( 'Num' ); ?>					</th>					<th class="title" colspan="2">						<?php echo JText::_( 'Template Name' ); ?>					</th>					<?php		if ($client->id == 1) {?>						<th width="5%">							<?php echo JText::_( 'Default' ); ?>						</th>						<?php		} else {?>						<th width="5%">							<?php echo JText::_( 'Default' ); ?>						</th>						<th width="5%">							<?php echo JText::_( 'Assigned' ); ?>						</th>						<?php		}?>					<th width="10%" align="center">						<?php echo JText::_( 'Version' ); ?>					</th>					<th width="15%" class="title">						<?php echo JText::_( 'Date' ); ?>					</th>					<th width="25%"  class="title">						<?php echo JText::_( 'Author' ); ?>					</th>				</tr>			</thead>			<tfoot>				<tr>					<td colspan="8">						<?php echo $page->getListFooter(); ?>					</td>				</tr>			</tfoot>			<tbody>			<?php		$k = 0;		for ($i = 0, $n = count($rows); $i < $n; $i++) {			$row = & $rows[$i];			$author_info = @ $row->authorEmail . '<br />' . @ $row->authorUrl;?>				<tr class="<?php echo 'row'. $k; ?>">					<td>						<?php echo $page->getRowOffset( $i ); ?>					</td>					<td width="5">					<?php			if ( JTable::isCheckedOut($user->get ('id'), $row->checked_out )) {?>							&nbsp;							<?php			} else {?>							<input type="radio" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->directory; ?>" onclick="isChecked(this.checked);" />							<?php			}?>					</td>					<td><?php $img_path = ($client->id == 1 ? JURI::root().'administrator' : $mainframe->getSiteURL() ).'/templates/'.$row->directory.'/template_thumbnail.png'; ?>						<span class="editlinktip hasTip" title="<?php echo $row->name;?>::<img border=&quot;1&quot; src=&quot;<?php echo $img_path; ?>&quot; name=&quot;imagelib&quot; alt=&quot;<?php echo JText::_( 'No preview available' ); ?>&quot; width=&quot;206&quot; height=&quot;145&quot; />"><a href="index.php?option=com_templates&amp;task=edit&amp;cid[]=<?php echo $row->directory;?>&amp;client=<?php echo $client->id;?>">							<?php echo $row->name;?></a></span>					</td>					<?php			if ($client->id == 1) {?>						<td align="center">							<?php				if ($row->published == 1) {?>							<img src="templates/khepri/images/menu/icon-16-default.png" alt="<?php echo JText::_( 'Published' ); ?>" />								<?php				} else {?>								&nbsp;								<?php				}?>						</td>						<?php			} else {?>						<td align="center">							<?php				if ($row->published == 1) {?>								<img src="templates/khepri/images/menu/icon-16-default.png" alt="<?php echo JText::_( 'Default' ); ?>" />								<?php				} else {?>								&nbsp;								<?php				}?>						</td>						<td align="center">							<?php				if ($row->assigned == 1) {?>								<img src="images/tick.png" alt="<?php echo JText::_( 'Assigned' ); ?>" />								<?php				} else {?>								&nbsp;								<?php				}?>						</td>						<?php			}?>					<td align="center">						<?php echo $row->version; ?>					</td>					<td>						<?php echo $row->creationdate; ?>					</td>					<td>						<span class="editlinktip hasTip" title="<?php echo JText::_( 'Author Information' );?>::<?php echo $author_info; ?>">							<?php echo @$row->author != '' ? $row->author : '&nbsp;'; ?>						</span>					</td>				</tr>				<?php		}?>			</tbody>			</table>	<input type="hidden" name="option" value="<?php echo $option;?>" />	<input type="hidden" name="client" value="<?php echo $client->id;?>" />	<input type="hidden" name="task" value="" />	<input type="hidden" name="boxchecked" value="0" />	<?php echo JHTML::_( 'form.token' ); ?>	</form>	<?php	}	function previewTemplate($template, $showPositions, $client, $option)	{		global $mainframe;		$tp = intval($showPositions);		$url = $client->id ? JURI::base() : $mainframe->getSiteURL();?>		<style type="text/css">		.previewFrame {			border: none;			width: 95%;			height: 600px;			padding: 0px 5px 0px 10px;		}		</style>		<table class="adminform">			<tr>				<th width="50%" class="title">					<?php echo JText::_( 'Site Preview' ); ?>				</th>				<th width="50%" style="text-align:right">					<?php echo JHTML::_('link', $url.'index.php?tp='.$tp.'&amp;template='.$template, JText::_( 'Open in new window' ), array('target' => '_blank')); ?>				</th>			</tr>			<tr>				<td width="100%" valign="top" colspan="2">					<?php echo JHTML::_('iframe', $url.'index.php?tp='.$tp.'&amp;template='.$template,'previewFrame',  array('class' => 'previewFrame')) ?>				</td>			</tr>		</table>		<?php	}	/**	* @param string Template name	* @param string Source code	* @param string The option	*/	function editTemplate($row, $lists, & $params, $option, & $client, & $ftp, & $template)	{		JRequest::setVar( 'hidemainmenu', 1 );		JHTML::_('behavior.tooltip');?>		<form action="index.php" method="post" name="adminForm">		<?php if($ftp): ?>		<fieldset title="<?php echo JText::_('DESCFTPTITLE'); ?>" class="adminform">			<legend><?php echo JText::_('DESCFTPTITLE'); ?></legend>			<?php echo JText::_('DESCFTP'); ?>			<?php if(JError::isError($ftp)): ?>				<p><?php echo JText::_($ftp->message); ?></p>			<?php endif; ?>			<table class="adminform nospace">			<tbody>			<tr>				<td width="120">					<label for="username"><?php echo JText::_('Username'); ?>:</label>				</td>				<td>					<input type="text" id="username" name="username" class="input_box" size="70" value="" />				</td>			</tr>			<tr>				<td width="120">					<label for="password"><?php echo JText::_('Password'); ?>:</label>				</td>				<td>					<input type="password" id="password" name="password" class="input_box" size="70" value="" />				</td>			</tr>			</tbody>			</table>		</fieldset>		<?php endif; ?>		<div class="col width-50">			<fieldset class="adminform">				<legend><?php echo JText::_( 'Details' ); ?></legend>				<table class="admintable">				<tr>					<td valign="top" class="key">						<?php echo JText::_( 'Name' ); ?>:					</td>					<td>						<strong>							<?php echo JText::_($row->name); ?>						</strong>					</td>

⌨️ 快捷键说明

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