<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片管理 > {#$info.pic_name#} 管理  -  Powered by GV32.COM</title>
<link rel="stylesheet" type="text/css" href="{#$base_weburl#}/templates/adminsys/css/list.css" />
<script language="javascript" src="{#$base_weburl#}/js/common.js"></script>

<script language="javascript">
var webroot_url = '{#$base_weburl#}';
function submitFun()
{

		var idpii_url 	= document.getElementById('pii_url');
		var content= CKEDITOR.instances.pii_content.getData()
		var idsuggestionInfo 	= document.getElementById('suggestionInfo');

		if(idpii_url.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：图片不能为空请输入！';
			idpii_url.focus();
			return false;
		}else if(content=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：图片内容不能为空请输入！';
			CKEDITOR.instances.pii_content.focus();
			return false;
		}

		document.formSub.action='{#$employee_weburl#}/index.php?load=picture&act=additem';
		document.formSub.target="_self"
		document.formSub.submit();
}


	
	function upLoadFile()
	{
		document.formSub.target="hidden_frame"
		document.formSub.action='{#$employee_weburl#}/index.php?load=uploadfile&act=upload&upLoadName=upfile&getUrl=pii_url';
		document.formSub.submit(); 
		document.getElementById("lodingdiv").style.display="";
		document.getElementById("lodingdiv").innerHTML="<img src=\"{#$webroot_url#}/uploads/sys/loading2.gif\" />文件正上传，请稍候...";

	}

	function hiddenLoding()
	{
		document.getElementById("lodingdiv").style.display="none";
		document.getElementById("lodingdiv").innerHTML="";
		document.getElementById("pii_url").value="";
		document.getElementById("upfile").value="";
	}
	
</script>
</head>
<body>
<table  cellpadding="0" cellspacing="0" style="width:100%; ">
<tr><td><table cellpadding="0" cellspacing="0" height="22" style="width:100%; color:#000000; font-weight:normal; background-color:#67D9FF;"  >
  <tr>
    <td>&nbsp;<img src="{#$base_weburl#}/uploads/sys/h.gif"  width="15" border="0"><a href="{#$employee_weburl#}/index.php?load=picture&act=infolist">图片管理</a></td>
    <td>&nbsp;</td>
     <td align="right"><a href="http://help.gv32.com/type_picturelist.html" target="_blank" title="点击-在线帮助"><img src="{#$base_weburl#}/images/sys/adminhelp.png"  width="21" border="0" alt="点击-在线帮助"></a>&nbsp;&nbsp;</td>
  </tr>
</table>
</td></tr>

<tr><td>
<div class="list">
<table cellpadding="0" cellspacing="1"   style="width:100%" class="tableborder">
<tbody>
<tr>
<th>{#if $listval eq 'pii_id'#}<a href="javascript:addOrderBy('pii_id','{#$listhtml#}')" >{#if $listhtml eq 'DESC'#}↑{#else#}↓{#/if#}序号</a>{#else#}<a href="javascript:addOrderBy('pii_id','DESC')" >序号</a>{#/if#}</th>
<th>{#if $listval eq 'pii_name'#}<a href="javascript:addOrderBy('pii_name','{#$listhtml#}')" >{#if $listhtml eq 'DESC'#}↑{#else#}↓{#/if#}图片标题</a>{#else#}<a href="javascript:addOrderBy('pii_name','DESC')" >图片</a>{#/if#}</th>
<th>{#if $listval eq 'pii_count'#}<a href="javascript:addOrderBy('pii_count','{#$listhtml#}')" >{#if $listhtml eq 'DESC'#}↑{#else#}↓{#/if#}流量</a>{#else#}<a href="javascript:addOrderBy('pii_count','DESC')" >流量</a>{#/if#}</th>
<th>{#if $listval eq 'pii_enabled'#}<a href="javascript:addOrderBy('pii_enabled','{#$listhtml#}')" >{#if $listhtml eq 'DESC'#}↑{#else#}↓{#/if#}是否显示</a>{#else#}<a href="javascript:addOrderBy('pii_enabled','DESC')" >是否显示</a>{#/if#}</th>
<th>{#if $listval eq 'pii_uptime'#}<a href="javascript:addOrderBy('pii_uptime','{#$listhtml#}')" >{#if $listhtml eq 'DESC'#}↑{#else#}↓{#/if#}更新时间</a>{#else#}<a href="javascript:addOrderBy('pii_uptime','DESC')" >更新时间</a>{#/if#}</th>
<th>操作</th>
</tr>

{#foreach item=item from=$infoItem#}
			<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
			<td class="tdcenter" >{#$item.pii_id#} </td>
			<td  class="key">&nbsp;<a href="{#$base_weburl#}{#$item.pii_url#}" target="_blank">{#$item.pii_url#}</a></td>
			<td  class="tdcenter">{#$item.pii_count#}</td>
			<td  class="tdcenter">{#$_LANG.bd_enabledArray[$item.pii_enabled]#}</td>
			<td  class="keykey">&nbsp;&nbsp;{#$item.pii_uptime|date_format:"%Y-%m-%d %H:%M:%S"#} </td>
			<td class="keykey"> <a href="{#$employee_weburl#}/index.php?load=picture&act=infoitem&id={#$item.pii_id#}" >修改</a> <a href="{#$employee_weburl#}/index.php?load=picture&act=delitem&id={#$item.pii_id#}&pic_id={#$item.pic_id#}"  onclick="if(confirm('你确认要删除操作！')){ return  true; }else{ return  false; }"  title="删除" >删除</a></td>
			</tr>
{#/foreach#}
<tr>
<td colspan="7" class="tdleft">


</td>
</tr>


</tbody>
</table>

<form action="{#$employee_weburl#}/index.php?load=picture&act=additem" method="post"   enctype="multipart/form-data" name="formSub" id="formSub" >
<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
<tr >
<th colspan="2">添加图片 到 {#$info.pic_name#}</th>
</tr>
<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>上传主图：</strong></td>
<td class="tdd"> <input    name="pic_id" id="pic_id" value="{#$info.pic_id#}" type="hidden" />    
<input type="file" id="upfile" name="upfile" style="width:450">&nbsp;<input name="but" type="button" value="上传文件"  onclick="upLoadFile(this)">
<iframe name='hidden_frame' id="hidden_frame" style="border:none; background-color:#00CCCC;" scrolling="no"  width="0" height="0" ></iframe>
<div id="lodingdiv" style=" display:none;width:380px;" ><img src="{#$base_weburl#}/uploads/sys/loading2.gif" />文件正上传中，请稍候...</div>
</td>
</tr>
<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>图片地址：</strong></td>
<td class="tdd">
<input type="text"  name="pii_url" id="pii_url" value="" style="width:300px;" />(可以手动填写！)</td>
</tr>



<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>图片内容：</strong></td>
<td class="tdd">
{#$ckeditorLoad#}</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>显示：</strong></td>
<td class="tdd">{#foreach key=ek item=ei from=$_LANG.bd_enabledArray#}
{#$ei#}<input type="radio"   name="pii_enabled" id="pii_enabled[{#$ek#}]"  value="{#$ek#}" {#if $ek eq 1#} checked="checked" {#/if#}>
{#/foreach#}
</td>
</tr>



<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td colspan="2"  class="tdcenter"><div id="suggestionInfo">&nbsp;</div></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td colspan="2"  class="tdcenter"> <input name="buttsubmit" id="buttsubmit" type="button" value="添 加"  onclick="submitFun(this)"  ></td>
</tr>

</table>
</form>
</div>

</td></tr>
<tr><td></td></tr>
</table>

</body>
</html>