📄 %%f5^f5e^f5ea9858%%gallery_edit.tpl.html.php
字号:
<?php /* Smarty version 2.6.19, created on 2008-07-28 09:21:04 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">
<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; ?>
<!--<?php if ($this->_tpl_vars['_GALLERY'][5] == 1): ?><span id="orderSpan"> | Placement: <input type="text" size="4" name="picOrder[]" value="<?php echo $this->_tpl_vars['ONE']['gOrder']; ?>"></span><?php endif; ?>-->
</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;
}
var n=arr.length;
for(var i=0;i<n;i++){
if(arr[i].value==''){
//alert('Picture name is empty.');
//arr[i].focus();
//return false;
}else{
var pic=document.getElementsByName("pic"+(i+1))[0];
if(pic.value==''){
alert('Picture file is empty.');
pic.focus();
return false;
}
}
}
}
function addNew(){
var one='<table width="100%" border="0" cellspacing="1" cellpadding="8" class="fdsmain"><tr><td colspan="2">New Picture <font color="#770000">[Won\'t be uploaded when picture name is empty]</font></td></tr>';
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 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 + -