admin.modules.html.php

来自「国外免费开源的内容管理系统」· PHP 代码 · 共 605 行 · 第 1/2 页

PHP
605
字号
								<?php echo JText::_( 'Position' ); ?>:							</label>						</td>						<td>							<input type="text" id="position" class="combobox" name="position" value="<?php echo $row->position; ?>" />							<ul id="combobox-position" style="display:none;"><?php							$positions = $model->getPositions();							for ($i=0,$n=count($positions);$i<$n;$i++) {								echo '<li>',$positions[$i],'</li>';							}							?></ul>						</td>					</tr>					<tr>						<td valign="top"  class="key">							<label for="ordering">								<?php echo JText::_( 'Order' ); ?>:							</label>						</td>						<td>							<script language="javascript" type="text/javascript">							<!--							writeDynaList( 'class="inputbox" name="ordering" id="ordering" size="1"', orders, originalPos, originalPos, originalOrder );							//-->							</script>						</td>					</tr>					<tr>						<td valign="top" class="key">							<label for="access">								<?php echo JText::_( 'Access Level' ); ?>:							</label>						</td>						<td>							<?php echo $lists['access']; ?>						</td>					</tr>					<tr>						<td valign="top" class="key">							<?php echo JText::_( 'ID' ); ?>:						</td>						<td>							<?php echo $row->id; ?>						</td>					</tr>					<tr>						<td valign="top" class="key">							<?php echo JText::_( 'Description' ); ?>:						</td>						<td>							<?php echo JText::_($row->description); ?>						</td>					</tr>				</table>			</fieldset>			<fieldset class="adminform">				<legend><?php echo JText::_( 'Menu Assignment' ); ?></legend>				<script type="text/javascript">					function allselections() {						var e = document.getElementById('selections');							e.disabled = true;						var i = 0;						var n = e.options.length;						for (i = 0; i < n; i++) {							e.options[i].disabled = true;							e.options[i].selected = true;						}					}					function disableselections() {						var e = document.getElementById('selections');							e.disabled = true;						var i = 0;						var n = e.options.length;						for (i = 0; i < n; i++) {							e.options[i].disabled = true;							e.options[i].selected = false;						}					}					function enableselections() {						var e = document.getElementById('selections');							e.disabled = false;						var i = 0;						var n = e.options.length;						for (i = 0; i < n; i++) {							e.options[i].disabled = false;						}					}				</script>				<table class="admintable" cellspacing="1">					<tr>						<td valign="top" class="key">							<?php echo JText::_( 'Menus' ); ?>:						</td>						<td>						<?php if ($row->client_id != 1) : ?>							<?php if ($row->pages == 'all') { ?>							<label for="menus-all"><input id="menus-all" type="radio" name="menus" value="all" onclick="allselections();" checked="checked" /><?php echo JText::_( 'All' ); ?></label>							<label for="menus-none"><input id="menus-none" type="radio" name="menus" value="none" onclick="disableselections();" /><?php echo JText::_( 'None' ); ?></label>							<label for="menus-select"><input id="menus-select" type="radio" name="menus" value="select" onclick="enableselections();" /><?php echo JText::_( 'Select From List' ); ?></label>							<?php } elseif ($row->pages == 'none') { ?>							<label for="menus-all"><input id="menus-all" type="radio" name="menus" value="all" onclick="allselections();" /><?php echo JText::_( 'All' ); ?></label>							<label for="menus-none"><input id="menus-none" type="radio" name="menus" value="none" onclick="disableselections();" checked="checked" /><?php echo JText::_( 'None' ); ?></label>							<label for="menus-select"><input id="menus-select" type="radio" name="menus" value="select" onclick="enableselections();" /><?php echo JText::_( 'Select From List' ); ?></label>							<?php } else { ?>							<label for="menus-all"><input id="menus-all" type="radio" name="menus" value="all" onclick="allselections();" /><?php echo JText::_( 'All' ); ?></label>							<label for="menus-none"><input id="menus-none" type="radio" name="menus" value="none" onclick="disableselections();" /><?php echo JText::_( 'None' ); ?></label>							<label for="menus-select"><input id="menus-select" type="radio" name="menus" value="select" onclick="enableselections();" checked="checked" /><?php echo JText::_( 'Select From List' ); ?></label>							<?php } ?>						<?php endif; ?>						</td>					</tr>					<tr>						<td valign="top" class="key">							<?php echo JText::_( 'Menu Selection' ); ?>:						</td>						<td>							<?php echo $lists['selections']; ?>						</td>					</tr>				</table>				<?php if ($row->client_id != 1) : ?>					<?php if ($row->pages == 'all') { ?>					<script type="text/javascript">allselections();</script>					<?php } elseif ($row->pages == 'none') { ?>					<script type="text/javascript">disableselections();</script>					<?php } else { ?>					<?php } ?>				<?php endif; ?>			</fieldset>		</div>		<div class="col width-50">			<fieldset class="adminform">				<legend><?php echo JText::_( 'Parameters' ); ?></legend>				<?php					echo $pane->startPane("menu-pane");					echo $pane->startPanel(JText :: _('Module Parameters'), "param-page");					$p = $params;					if($params = $p->render('params')) :						echo $params;					else :						echo "<div style=\"text-align: center; padding: 5px; \">".JText::_('There are no parameters for this item')."</div>";					endif;					echo $pane->endPanel();					if ($p->getNumParams('advanced')) {						echo $pane->startPanel(JText :: _('Advanced Parameters'), "advanced-page");						if($params = $p->render('params', 'advanced')) :							echo $params;						else :							echo "<div  style=\"text-align: center; padding: 5px; \">".JText::_('There are no advanced parameters for this item')."</div>";						endif;						echo $pane->endPanel();					}					if ($p->getNumParams('legacy')) {						echo $pane->startPanel(JText :: _('Legacy Parameters'), "legacy-page");						if($params = $p->render('params', 'legacy')) :							echo $params;						else :							echo "<div  style=\"text-align: center; padding: 5px; \">".JText::_('There are no legacy parameters for this item')."</div>";						endif;						echo $pane->endPanel();					}				if ($p->getNumParams('other')) {					echo $pane->startPanel(JText :: _('Other Parameters'), "other-page");					if($params = $p->render('params', 'other')) :						echo $params;						else :						echo "<div  style=\"text-align: center; padding: 5px; \">".JText::_('There are no other parameters for this item')."</div>";  						endif;						echo $pane->endPanel();					}					echo $pane->endPane();				?>			</fieldset>		</div>		<div class="clr"></div>		<?php		if ( !$row->module || $row->module == 'custom' || $row->module == 'mod_custom' ) {			?>			<fieldset class="adminform">				<legend><?php echo JText::_( 'Custom Output' ); ?></legend>				<?php				// parameters : areaname, content, width, height, cols, rows				echo $editor->display( 'content', $row->content, '100%', '400', '60', '20', array('pagebreak', 'readmore') ) ;				?>			</fieldset>			<?php		}		?>		<input type="hidden" name="option" value="com_modules" />		<input type="hidden" name="id" value="<?php echo $row->id; ?>" />		<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />		<input type="hidden" name="original" value="<?php echo $row->ordering; ?>" />		<input type="hidden" name="module" value="<?php echo $row->module; ?>" />		<input type="hidden" name="task" value="" />		<input type="hidden" name="client" value="<?php echo $client->id ?>" />		<?php echo JHTML::_( 'form.token' ); ?>		</form>	<?php	}	function preview()	{		$editor =& JFactory::getEditor();		?>		<script>		var form = window.top.document.adminForm		var title = form.title.value;		var alltext = window.top.<?php echo $editor->getContent('text') ?>;		</script>		<table align="center" width="90%" cellspacing="2" cellpadding="2" border="0">			<tr>				<td class="contentheading" colspan="2"><script>document.write(title);</script></td>			</tr>		<tr>			<script>document.write("<td valign=\"top\" height=\"90%\" colspan=\"2\">" + alltext + "</td>");</script>		</tr>		</table>		<?php	}/**	/**	* Displays a selection list for module types	*/	function add( &$modules, $client )	{ 		JHTML::_('behavior.tooltip');		?>		<form action="index.php" method="post" name="adminForm">		<table class="adminlist" cellpadding="1">		<thead>		<tr>			<th colspan="4">			<?php echo JText::_( 'Modules' ); ?>			</th>		</tr>		</thead>		<tfoot>		<tr>			<th colspan="4">&nbsp;			</th>		</tr>		</tfoot>		<tbody>		<?php		$k 		= 0;		$x 		= 0;		$count 	= count( $modules );		for ( $i=0; $i < $count; $i++ ) {			$row = &$modules[$i];			$link = 'index.php?option=com_modules&amp;task=edit&amp;module='. $row->module .'&amp;created=1&amp;client='. $client->id;			if ( !$k ) {				?>				<tr class="<?php echo "row$x"; ?>" valign="top">				<?php				$x = 1 - $x;			}			?>				<td width="50%">					<span class="editlinktip hasTip" title="<?php echo JText::_(stripslashes( $row->name)).' :: '.JText::_(stripslashes( $row->descrip )); ?>" name="module" value="<?php echo $row->module; ?>" onclick="isChecked(this.checked);" /><input type="radio" name="module" value="<?php echo $row->module; ?>" id="cb<?php echo $i; ?>"><a href="<?php echo $link;?>"><?php echo JText::_($row->name); ?></a></span>				</td>			<?php			if ( $k ) {				?>				</tr>				<?php			}			?>			<?php			$k = 1 - $k;		}		?>		</tbody>		</table>		<input type="hidden" name="option" value="com_modules" />		<input type="hidden" name="client" value="<?php echo $client->id; ?>" />		<input type="hidden" name="created" value="1" />		<input type="hidden" name="task" value="edit" />		<input type="hidden" name="boxchecked" value="0" />		<?php echo JHTML::_( 'form.token' ); ?>		</form>		<?php	}}

⌨️ 快捷键说明

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