<%@ Page CodeBehind="admin_transfer_add.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.admin_transfer_add" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
		<% @ Import Namespace="Webdisk" %>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<link href="img/main.css" rel="stylesheet" type="text/css">
		<style type="text/css">	
		.style5 { FONT-WEIGHT: bold; COLOR: #ffffff }	
		.style6 { COLOR: #0000ff }	
		</style>
		<script>
	function admin_Size(num,objname)
{
	var obj=document.getElementById(objname)
	if (parseInt(obj.rows)+num>=3) {
		obj.rows = parseInt(obj.rows) + num;	
	}
	if (num>0)
	{
		obj.width="90%";
	}
}
function NewsTypeSel(Val){
	if (Val=="0"){
		document.getElementById("skin_info").innerHTML = "1.图标：{$ico}<br>2.文件名：{$filename}<br>3.下载地址：{$down}<br>4.附加图标：{$addico}<br>5.文件注释：{$note}<br>6.所属用户：{$user}<br>7.大小：{$size}<br>8.更新时间：{$time}<br>9.下载次数：{$count}";
		document.all.show1.style.display='';
		document.all.show2.style.display='none';
		document.all.show3.style.display='none';
		document.all.show4.style.display='none';
		document.all.show5.style.display='none';
	}
	else if(Val=="1"){
		document.getElementById("skin_info").innerHTML = "1.目录名：{$dirname}<br>2.目录路径：{$postion}<br>3.目录注释：{$note}<br>4.所属用户：{$user}<br>5.更新时间：{$time}";
		document.all.show1.style.display='none';
		document.all.show2.style.display='';
		document.all.show3.style.display='none';
		document.all.show4.style.display='none';
		document.all.show5.style.display='none';
	}
	else if(Val=="2"){
		document.getElementById("skin_info").innerHTML = "1.用户名：{$username}<br>2.等级：{$level}<br>3.真实姓名：{$realname}<br>4.性别：{$sex}<br>5.主页：{$url}<br>6.邮件：{$mail}<br>7.QQ：{$qq}<br>8.MSN：{$msn}<br>9.电话：{$phone}<br>10.地址：{$address}<br>11.公司：{$company}<br>12.部门：{$bm}<br>13.注册时间：{$regdate}<br>14.空间大小：{$spacetotal}<br>15.空间介绍：{$recommend}<br>16.外部空间地址：{$outurl}";
		document.all.show1.style.display='none';
		document.all.show2.style.display='none';
		document.all.show3.style.display='';
		document.all.show4.style.display='none';
		document.all.show5.style.display='none';
	}
	else if(Val=="3"){
		document.getElementById("skin_info").innerHTML = "1.公告名：{$title}<br>2.公告内容：{$content}<br>3.添加时间：{$time}<br>4.添加人：{$adduser}";
		document.all.show1.style.display='none';
		document.all.show2.style.display='none';
		document.all.show3.style.display='none';
		document.all.show4.style.display='';
		document.all.show5.style.display='none';
	}
	else if(Val=="4"){
		document.getElementById("skin_info").innerHTML = "1.留言标题：{$title}<br>2.留言时间：{$time}<br>3.留言人：{$adduser}<br>4.留言内容：{$content}<br>5.回复内容：{$reply}<br>6.回复时间：{$replytime}";
		document.all.show1.style.display='none';
		document.all.show2.style.display='none';
		document.all.show3.style.display='none';
		document.all.show4.style.display='none';
		document.all.show5.style.display='';
	}
}
function OutputNewsCode(Val){
	var obj = document.all.code;
	if (obj){
		if (Val!=''){
			obj.value = "<scr"+"ipt src=\"homeapply.aspx?GetName="+Val.toLowerCase()+"\"><\/scr"+"ipt>";
		}else{
			obj.value = "";
		}
	}
}
		</script>
</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<div align="center">
				<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb" height="27">
					<tr>
						<td colSpan="3" class="td_title"><asp:Label id="add" runat="server" Font-Bold="True">添加调用</asp:Label>
						</td>
					</tr>
					<tr class="tableTd">
						<td width="297" align="right">调用类型：</td>
						<td width="1054"><span class="forumrow"><span class="a3-green">
									<select name="T_type" id="T_type" runat="server" onChange="NewsTypeSel(this.selectedIndex)">
										<option value="1" selected>公共文件</option>
										<option value="2">公共目录</option>
										<option value="3">注册用户</option>
										<option value="4">公告</option>
										<option value="5">网站留言</option>
									</select>
								</span></span>
					  </td>
					</tr>
					<tr class="tableTd">
						<td align="right">调用标识名称：</td>
						<td><span class="forumrow"><span class="a3-green"> <input type="text" name="T_name" id="T_name" runat="server" onKeyUp="OutputNewsCode(this.value);"
										style="WIDTH: 113px; HEIGHT: 20px" size="13"> </span></span>(请使用英文或数字设定调用名称,并且是唯一标识)
							<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="必须输入标识名称" ControlToValidate="T_name"></asp:RequiredFieldValidator></td>
					</tr>
					<tr class="tableTd">
						<td align="right">调用代码：
						</td>
						<td><input name="code" type="text" disabled id="code" size="70">
							<BR>
							(<span class="style6">将调用代码复制到页面中任何位置即可显示此调用</span>)</td>
					</tr>
					<tr class="tableTd">
						<td align="right">调用说明：
						</td>
						<td><input type="text" name="textfield" id="T_sm" runat="server"> (提示说明,以作管理区分)
						</td>
					</tr>
					<tr class="tableTd">
						<td align="right">调用设置：</td>
						<td>
      <div id="show1">排序：
								<select name="select" runat="server" id="T_order1">
									<option value="1" selected>按更新时间</option>
									<option value="2">按大小</option>
									<option value="3">按用户名</option>
									<option value="4">按文件名</option>
									<option value="5">按下载次数</option>
								</select>
								过滤条件：
								<select name="select" runat="server" id="T_filter1">
									<option value="0" selected>显示全部</option>
									<option value="1">显示精华</option>
									<option value="2">显示固顶</option>
								</select>
								<BR>
								显示记录数： <input name="T_count1" type="text" size="10" id="T_count1" runat="server" value="10">
								标题最多字符数：<INPUT id="T_len1" type="text" size="10" value="10" name="textfield" runat="server">
								<br>
								单独用户名： 
								<input type="text" name="textfield" id="T_user1" runat="server"> 
								(请填写用户名,用英文逗号分隔)<br>
								类别ID： <input type="text" name="textfield" id="T_kind1" runat="server"> (请填写类别ID,用英文逗号分隔)<br>
						文件扩展名：
						<input type="text" name="textfield2" id="T_ext" runat="server">
(请填写指定调用的扩展名,用英文逗号分隔，如jpg,gif,png)<br>
<br>
						动态变量：（使用调用代码时动态传递的URL参数）<br>
						Dir（调用指定目录的文件）</div>
							<div id="show2" style="DISPLAY:none">排序：
								<select name="select" runat="server" id="T_order2">
									<option value="1" selected>按更新时间</option>
									<option value="2">按用户名</option>
									<option value="3">按目录名</option>
								</select>
								过滤条件：
								<select name="select" runat="server" id="T_filter2">
									<option value="0" selected>显示全部</option>
									<option value="1">显示精华</option>
									<option value="2">显示固顶</option>
								</select>
								<BR>
								显示记录数： <input name="textfield" type="text" size="10" runat="server" id="T_count2" value="10">
								标题最多字符数：<INPUT id="T_len2" type="text" size="10" value="10" name="textfield" runat="server">
								<br>
								单独用户名： <input type="text" name="textfield" runat="server" id="T_user2"> (请填写用户名,用英文逗号分隔)<br>
								类别ID： <input type="text" name="textfield" id="T_kind2" runat="server"> (请填写类别ID,用英文逗号分隔)</div>
      <br>提示：将目录路径做为参数dir传递到调用文件页即可显示此目录下的文件<DIV></DIV>
							<div id="show3" style="DISPLAY:none">排序：
								<select name="select" runat="server" id="T_order3">
									<option value="1" selected>按注册时间</option>
									<option value="2">按用户名</option>
									<option value="3">按等级</option>
									<option value="4">按使用空间</option>
								</select>
								显示记录数： <input name="textfield" type="text" size="10" runat="server" id="T_count3" value="10">
								<br>
								等级名称： <input type="text" name="textfield" id="T_level" runat="server"> (请填写等级名称,用英文逗号分隔)
							</div>
							<div id="show4" style="DISPLAY:none">显示记录数： <input name="T_count4" type="text" size="10" runat="server" id="T_count4" value="10">标题最多字符数：<INPUT id="T_len4" type="text" size="10" value="10" name="textfield" runat="server"></div>
							<div id="show5" style="DISPLAY:none">显示记录数： <input name="T_count5" type="text" size="10" runat="server" id="T_count5" value="10">标题最多字符数：<INPUT id="T_len5" type="text" size="10" value="10" name="textfield" runat="server"><br>类别：								
							<select name="select" runat="server" id="T_lytype">
									<option value="1" selected>全部留言</option>
									<option value="2">已审核</option>
									<option value="3">已回复</option>
								</select></div></td></tr>
					<tr>
						<td colSpan="3" class="td_title">参数设置(请用HTML语法填写)：
						</td>
					</tr>
					<tr class="tableTd">
						<td align="right">模板_开始标记部分：</td>
						<td><span class="forumrow"><span class="a3-green"><span class="forumrowHighlight"> <textarea name="Skin_Head" ID="Skin_Head" style="WIDTH:100%" rows="3" runat="server"></textarea>
										<a href="javascript:admin_Size(-3,'Skin_Head')"><img src="../pics/minus1.gif" width="20" height="20" border='0' unselectable="on"></a>
										<a href="javascript:admin_Size(3,'Skin_Head')"><img src="../pics/plus1.gif" width="20" height="20" border='0' unselectable="on"></a>
									</span></span></span>
						</td>
					</tr>
					<tr class="tableTd">
						<td align="right">模板_主体循环标记部分：
							<fieldset title="模板变量">
								<legend>
									&nbsp;模板变量说明&nbsp;</legend>
							<div id="skin_info" align="left">1.图标：{$ico}<br>
									2.文件名：{$filename}<br>
									3.下载地址：{$down}<br>
									4.附加图标：{$addico}<br>
									5.文件注释：{$note}<br>
									6.所属用户：{$user}<br>
									7.大小：{$size}<br>
								8.更新时间：{$time}<br>
								9.下载次数：{$count}</div>
							</fieldset>
						</td>
						<td><span class="forumrowHighlight"> <textarea name="Skin_Main" ID="Skin_Main" style="WIDTH:100%" rows="10" runat="server"></textarea>
								<a href="javascript:admin_Size(-3,'Skin_Main')"><img src="../pics/minus1.gif" width="20" height="20" border='0' unselectable="on"></a>
								<a href="javascript:admin_Size(3,'Skin_Main')"><img src="../pics/plus1.gif" width="20" height="20" border='0' unselectable="on"></a>
							</span>
						</td>
					</tr>
					<tr class="tableTd">
						<td align="right">模板_结束标记部分：</td>
						<td><span class="forumrowHighlight"> <textarea name="Skin_Footer" ID="Skin_Footer" style="WIDTH:100%" rows="3" runat="server"></textarea>
								<a href="javascript:admin_Size(-3,'Skin_Footer')"><img src="../pics/minus1.gif" width="20" height="20" border='0' unselectable="on"></a>
								<a href="javascript:admin_Size(3,'Skin_Footer')"><img src="../pics/plus1.gif" width="20" height="20" border='0' unselectable="on"></a>
							</span>
						</td>
					</tr>
					<tr class="tableTd">
						<td colspan="2" align="right"><div align="center"><span class="forumrow"><span class="px14">
										<asp:button id="Submit1" runat="server" Width="100px" Text="添　加" class="formbutton" onclick="Submit1_Click"></asp:button>
									</span></span>
							</div>
						</td>
					</tr></table>
							</div>
		</form>
		<script>
			OutputNewsCode(document.all.T_name.value);
			NewsTypeSel(document.all.T_type.selectedIndex);
		</script>
	</body>
</HTML>
