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

📄 %%f5^f5e^f5ea9858%%gallery_edit.tpl.html.php

📁 没用的东西? 国外php免费程序,相册 留言板 等
💻 PHP
字号:
<?php /* Smarty version 2.6.19, created on 2008-08-05 03:22:17         compiled from gallery_edit.tpl.html */ ?><form action="index.php" method="post" enctype="multipart/form-data" onsubmit="return sbcheck(this);">
<table width="100%" border="0" cellspacing="1" cellpadding="8" class="fdsmain" id="upTable">  
  <?php if ($this->_tpl_vars['_GALLERY'][5] == 1): ?><tr>
    <td width="150" align="right">Picture Category * </td>
    <td class="editArea">
	<select name="picCate[]">
	<?php unset($this->_sections['fdsamou']);$this->_sections['fdsamou']['name'] = 'fdsamou';$this->_sections['fdsamou']['loop'] = is_array($_loop=$this->_tpl_vars['gcate']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);$this->_sections['fdsamou']['show'] = true;$this->_sections['fdsamou']['max'] = $this->_sections['fdsamou']['loop'];$this->_sections['fdsamou']['step'] = 1;$this->_sections['fdsamou']['start'] = $this->_sections['fdsamou']['step'] > 0 ? 0 : $this->_sections['fdsamou']['loop']-1;if ($this->_sections['fdsamou']['show']) {    $this->_sections['fdsamou']['total'] = $this->_sections['fdsamou']['loop'];    if ($this->_sections['fdsamou']['total'] == 0)        $this->_sections['fdsamou']['show'] = false;} else    $this->_sections['fdsamou']['total'] = 0;if ($this->_sections['fdsamou']['show']):            for ($this->_sections['fdsamou']['index'] = $this->_sections['fdsamou']['start'], $this->_sections['fdsamou']['iteration'] = 1;                 $this->_sections['fdsamou']['iteration'] <= $this->_sections['fdsamou']['total'];                 $this->_sections['fdsamou']['index'] += $this->_sections['fdsamou']['step'], $this->_sections['fdsamou']['iteration']++):$this->_sections['fdsamou']['rownum'] = $this->_sections['fdsamou']['iteration'];$this->_sections['fdsamou']['index_prev'] = $this->_sections['fdsamou']['index'] - $this->_sections['fdsamou']['step'];$this->_sections['fdsamou']['index_next'] = $this->_sections['fdsamou']['index'] + $this->_sections['fdsamou']['step'];$this->_sections['fdsamou']['first']      = ($this->_sections['fdsamou']['iteration'] == 1);$this->_sections['fdsamou']['last']       = ($this->_sections['fdsamou']['iteration'] == $this->_sections['fdsamou']['total']);?>
	<option value="<?php echo $this->_tpl_vars['gcate'][$this->_sections['fdsamou']['index']][0]; ?>"<?php if ($this->_tpl_vars['gcate'][$this->_sections['fdsamou']['index']][0] == $this->_tpl_vars['ONE']['gCate']): ?> selected<?php endif; ?>><?php echo $this->_tpl_vars['gcate'][$this->_sections['fdsamou']['index']][1]; ?></option>
	<?php endfor; endif; ?>
	</select>
	</td>
  </tr><?php else: ?><input type="hidden" name="picCate[]" value="0"><?php endif; ?>
  <tr>
    <td width="150" align="right">Picture Name * </td>
    <td class="editArea">
	<input type="text" name="picName[]" value="<?php echo $this->_tpl_vars['ONE']['gName']; ?>" size="20">
	<?php if ($this->_tpl_vars['_GALLERY'][4] == 1): ?><input type="checkbox" name="picShow[]" <?php if ($this->_tpl_vars['ONE']['gShow'] == 1): ?> checked<?php endif; ?>> Checked to set it visible<?php endif; ?>
	</td>
  </tr>
  <tr>
    <td width="150" align="right">Picture Description  </td>
    <td class="editArea">
	<textarea name="picDesc[]" cols="34" rows="3"><?php echo $this->_tpl_vars['ONE']['gDesc']; ?></textarea>
	</td>
  </tr>
  <tr>
    <td align="right">Picture File * </td>
    <td class="editArea"><input type="file" name="pic1"></td>
  </tr>
</table>
<div id="addS"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="8" class="fdsmain">
  <tr>
    <td width="150"><?php if ($this->_tpl_vars['ONE']['ID'] == 0): ?><a href="javascript:void(0);" onclick="addNew();" style="color:#000099;">Upload +</a><?php endif; ?></td>
    <td><input type="submit" value=" Save Pictures "></td>
  </tr>
</table>
<input type="hidden" name="id" value="<?php echo $this->_tpl_vars['ONE']['ID']; ?>">
<input type="hidden" name="cate" value="save">
<input type="hidden" name="action" value="gallery">
</form>
<script>
var picID=1;
function sbcheck(form){
	var arr=document.getElementsByName("picName[]");
	if(arr[0].value==''){
		alert('Picture name is empty.');
		arr[0].focus();
		return false;
	}
	<?php if ($this->_tpl_vars['ONE']['ID'] == 0): ?>var n=arr.length;
	for(var i=0;i<n;i++){
		if(arr[i].value!=''){
			var pic=document.getElementsByName("pic"+(i+1))[0];
			if(pic.value==''){
				alert('Picture file is empty.');
				pic.focus();
				return false;
			}
		}
	}<?php endif; ?>
}

function addNew(){
	var one='<table width="100%" border="0" cellspacing="1" cellpadding="8" class="fdsmain"><tr><td colspan="2" align="right">New Picture <font color="#770000">[Won\'t be uploaded when picture name  is empty]</font></td></tr>';
		<?php if ($this->_tpl_vars['_GALLERY'][5] == 1): ?>
		one+='<tr><td width="150" align="right">Picture Category * </td><td class="editArea"><select name="picCate[]">';
		<?php unset($this->_sections['fdsamou']);$this->_sections['fdsamou']['name'] = 'fdsamou';$this->_sections['fdsamou']['loop'] = is_array($_loop=$this->_tpl_vars['gcate']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);$this->_sections['fdsamou']['show'] = true;$this->_sections['fdsamou']['max'] = $this->_sections['fdsamou']['loop'];$this->_sections['fdsamou']['step'] = 1;$this->_sections['fdsamou']['start'] = $this->_sections['fdsamou']['step'] > 0 ? 0 : $this->_sections['fdsamou']['loop']-1;if ($this->_sections['fdsamou']['show']) {    $this->_sections['fdsamou']['total'] = $this->_sections['fdsamou']['loop'];    if ($this->_sections['fdsamou']['total'] == 0)        $this->_sections['fdsamou']['show'] = false;} else    $this->_sections['fdsamou']['total'] = 0;if ($this->_sections['fdsamou']['show']):            for ($this->_sections['fdsamou']['index'] = $this->_sections['fdsamou']['start'], $this->_sections['fdsamou']['iteration'] = 1;                 $this->_sections['fdsamou']['iteration'] <= $this->_sections['fdsamou']['total'];                 $this->_sections['fdsamou']['index'] += $this->_sections['fdsamou']['step'], $this->_sections['fdsamou']['iteration']++):$this->_sections['fdsamou']['rownum'] = $this->_sections['fdsamou']['iteration'];$this->_sections['fdsamou']['index_prev'] = $this->_sections['fdsamou']['index'] - $this->_sections['fdsamou']['step'];$this->_sections['fdsamou']['index_next'] = $this->_sections['fdsamou']['index'] + $this->_sections['fdsamou']['step'];$this->_sections['fdsamou']['first']      = ($this->_sections['fdsamou']['iteration'] == 1);$this->_sections['fdsamou']['last']       = ($this->_sections['fdsamou']['iteration'] == $this->_sections['fdsamou']['total']);?>
		one+='<option value="<?php echo $this->_tpl_vars['gcate'][$this->_sections['fdsamou']['index']][0]; ?>"<?php if ($this->_tpl_vars['gcate'][$this->_sections['fdsamou']['index']][0] == $this->_tpl_vars['ONE']['gCate']): ?> selected<?php endif; ?>><?php echo $this->_tpl_vars['gcate'][$this->_sections['fdsamou']['index']][1]; ?></option>';
		<?php endfor; endif; ?>
		one+='</select></td></tr>';
		<?php else: ?>one+='<input type="hidden" name="picCate[]" value="0">';
		<?php endif; ?>
		one+='<tr><td width="150" align="right">Picture Name * </td><td class="editArea"><input type="text" name="picName[]" size="20"><input type="checkbox" name="picShow[]" checked> Checked to set it visible</td></tr>';
		one+='<tr><td width="150" align="right">Picture Description</td><td class="editArea"><textarea name="picDesc[]" cols="34" rows="3"></textarea></td></tr>';
		one+='<tr><td align="right">Picture File * </td><td class="editArea"><input type="file" name="pic'+(++picID)+'"></td></tr>';
		one+='</table>';
	var node = document.createElement("DIV");
	node.innerHTML = one;
	
	$('addS').appendChild(node);
}
</script>

⌨️ 快捷键说明

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