<%@ Page CodeBehind="admin_label_add.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.admin_label_add" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<TITLE></TITLE>
		<LINK href="images/Site_Css.css" type="text/css" rel="stylesheet">
			<META http-equiv="Content-Type" content="text/html; charset=gb2312">
			<LINK href="images/Css.css" type="text/css" rel="stylesheet">
				<META content="MSHTML 6.00.6000.16544" name="GENERATOR">
				<script language="javascript">
	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.show3.style.display = 'none'; document.all.show5.style.display = 'none'; document.all.show6.style.display = 'none'; document.all.show7.style.display = 'none';
    }
    else if (Val == "1") {//用户列表
        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.部门：{$dept}<br>12.角色：{$role}<br>13.注册时间：{$regdate}<br>14.空间大小：{$spacetotal}<br>15.空间介绍：{$recommend}<br>16.外部空间地址：{$outurl}";
        document.all.show1.style.display = 'none'; document.all.show3.style.display = ''; document.all.show5.style.display = 'none'; document.all.show6.style.display = 'none'; document.all.show7.style.display = 'none';
    }
    else if (Val == "2") {//分页
        document.getElementById("skin_info").innerHTML = "1.第一页：{$firstpage}<br>2.下一页：{$nextpage}<br>3.上一页：{$priorpage}<br>4.最末页：{$lastpage}<br>5.页码列表：{$pagelist}<br>6.总共页数：{$countpage}<br>7.当前页号：{$currpage}<br>8.总共记录数：{$recordcount}";
        document.all.show1.style.display = 'none'; document.all.show3.style.display = 'none'; document.all.show5.style.display = ''; document.all.show6.style.display = 'none'; document.all.show7.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.show3.style.display = 'none'; document.all.show5.style.display = 'none'; document.all.show6.style.display = ''; document.all.show7.style.display = 'none';
    } else if (Val == "4") {//资源
        document.getElementById("skin_info").innerHTML = "1.资源类型：{$zytype}<br>2.科目：{$km}<br>3.版本：{$jcvar}<br>4.年级：{$nj}<br>5.分类：{$kind}<br>6.资源标题：{$FileName}<br>7.文件资源格式：{$fileext}<br>";
        document.all.show1.style.display = ''; document.all.show3.style.display = 'none'; document.all.show5.style.display = 'none'; document.all.show6.style.display = 'none'; document.all.show7.style.display = 'none';
    }
    else if (Val == "5") {//类别
        document.getElementById("skin_info").innerHTML = "1.类别名称：{$kind}<br>2.类别ID：{$id}";
        document.all.show1.style.display = 'none'; document.all.show3.style.display = 'none'; document.all.show5.style.display = 'none'; document.all.show6.style.display = 'none'; document.all.show7.style.display = '';
    }

}
				</script>
	</HEAD>
	<BODY bgColor="#ffffff" topMargin="5" marginwidth="0" marginheight="0">
		<form name="Form1" method="post" id="Form1" runat="server">
			<DIV></DIV>
			<DIV>
				<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
					<TBODY>
						<TR>
							<TD class="menubar_title"><IMG hspace="3" src="images/default.gif" align="absMiddle" vspace="3" border="0">&nbsp;<asp:label id="add" runat="server">添加</asp:label>标签</TD>
							<TD class="menubar_readme_text" vAlign="bottom">&nbsp;</TD>
						</TR>
						<TR>
							<TD class="menubar_function_text" height="1">&nbsp;</TD>
							<TD class="menubar_menu_td" align="right">&nbsp;</TD>
						</TR>
						<TR>
							<TD colSpan="2" height="5"></TD>
						</TR>
					</TBODY></TABLE>
				<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
					<TBODY>
						<TR>
							<TD background="images/tab_top_bg.gif" height="22">
								<TABLE cellSpacing="0" cellPadding="0" border="0">
									<TBODY>
										<TR> <!--按钮　Start-->
											<TD>
												<TABLE height="22" cellSpacing="0" cellPadding="0" border="0">
													<TBODY>
														<TR>
															<TD width="3"><IMG id="tabImgLeft__0" height="22" src="images/tab_unactive_left.gif" width="3"></TD>
															<TD class="tab" id="tabLabel__0" onClick="javascript:tabClick(0,1)" background="images/tab_active_bg.gif"
																UNSELECTABLE="on"><asp:label id="add1" runat="server" Font-Bold="True">添加</asp:label>标签</TD>
															<TD width="3"><IMG id="tabImgRight__0" height="22" src="images/Menu/tab_active_right.gif" width="3"></TD>
														</TR>
													</TBODY></TABLE>
											</TD>
										</TR>
									</TBODY></TABLE>
							</TD>
						</TR>
						<TR>
							<TD bgColor="#ffffff">
								<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
									<TBODY>
										<TR>
											<TD width="1" background="images/tab_bg.gif"><IMG height="1" src="images/tab_bg.gif" width="1"></TD>
											<TD class="borderstyle" vAlign="top">
												<DIV id="tabContent__0">
													<TABLE width="100%" border="0" align="center" cellPadding="3" cellSpacing="1">
														<TBODY>
															<TR>
																<TD width="27%" class="table_body">标签类型</TD>
																<TD width="73%" class="table_none"><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></TD>
															</TR>
															<TR>
																<TD class="table_body"><span class="a3-green">标签名称</span></TD>
																<TD class="table_none"><span class="forumrow"><span class="a3-green">
																			<input type="text" name="label" id="label" runat="server" onKeyUp="OutputNewsCode(this.value);"
																				style="WIDTH: 113px; HEIGHT: 20px" size="13">
																		</span>
																	</span>(请使用英文或数字设定调用名称,并且是唯一标识)
																	<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ErrorMessage="请输入标签" ControlToValidate="label"
																		Display="Dynamic"></asp:requiredfieldvalidator></TD>
															</TR>
															<TR>
																<TD class="table_body">标签说明</TD>
																<TD class="table_none"><input type="text" name="note" id="note" runat="server"> (提示说明,以作管理区分)
																</TD>
															</TR>
															<TR>
																<TD class="table_body">标签设置</TD>
																<TD class="table_none"><%--文件--%>
																	<div id="show1">
                                                                        排序：
																		<select name="para1" runat="server" id="para1">
																			<option value="0">URL接收(URL:order)</option>
																			<option value="LastTime|Desc">按更新时间[最新的]</option>
																			<option value="LastTime|ASC" selected>按更新时间[最早的]</option>
																			<option value="FileSize|Desc">按大小[最大的]</option>
																			<option value="FileSize|ASC">按大小[最小的]</option>
																			<option value="UserName|ASC">按用户名</option>
																			<option value="FileName|ASC">按文件名</option>
																			<option value="DownCount|Desc">按下载次数</option>
																		</select>
																		过滤条件：
																		<select name="para2" runat="server" id="para2">
																			<option value="0" selected>显示全部</option>
																			<option value="1">显示已审核</option>
																		</select>
                                                                        <select name="para41" runat="server" id="para41">
																			<option value="-1">URL接收(URL:type)</option>
                                                                            <option value="0" selected>显示全部</option>
																			<option value="3">显示管理</option>
																			<option value="1">显示教师</option>
                                                                            <option value="2">显示学生</option>
                                                                            <option value="4">显示资源</option>
																		</select>
																		<BR>
																		显示记录数： <input name="para3" type="text" size="10" id="para3" runat="server" value="10">（输入0为显示全部记录） 
																		每页显示记录数：<INPUT id="para4" type="text" size="10" value="10" name="para4" runat="server"> 
                                                                        显示列数：<INPUT id="para42" type="text" size="10" value="1" name="para42" 
                                                                            runat="server"><br>
																		标题最多字符数： <INPUT id="para5" type="text" size="10" value="10" name="para5" runat="server">
																		<br>
																		指定单独用户名： <input type="text" name="para6" id="para6" runat="server"><asp:checkbox id="para7" runat="server" Text="URL接收(URL:username)"></asp:checkbox>
																		(请填写用户名,用英文分号分隔)<br>
																		类别ID： <input type="text" name="para8" id="para8" runat="server"><asp:checkbox id="para9" runat="server" Text="URL接收(URL:kind)"></asp:checkbox>
																		(请填写类别ID,用英文分号分隔)<br>
																		文件扩展名： <input type="text" name="para10" id="para10" runat="server"><asp:checkbox id="para11" runat="server" Text="URL接收(URL:ext)"></asp:checkbox>
																		(请填写指定调用的扩展名,用英文分号分隔，如jpg;gif;png)<br>
																	过滤文件名：
																	<asp:checkbox id="para43" runat="server" Text="URL接收(URL:key)"></asp:checkbox>
																	</div>
																	<%--用户--%>
																	<div id="show3">排序：
																		<select name="para21" runat="server" id="para21">
																			<option value="0">URL接收(URL:order)</option>
																			<option value="regdate|Desc">按注册时间[最新的]</option>
																			<option value="regdate|ASC" selected>按注册时间[最早的]</option>
																			<option value="uUserName|ASC">按用户名</option>
																			<option value="[level]|ASC">按等级</option>
																			<option value="spacetotal|Desc">按使用空间</option>
																		</select>
																		显示记录数： <input name="para22" type="text" size="10" runat="server" id="para22" value="10">（输入0为显示全部记录）<br>
																		每页显示记录数：<INPUT id="para23" type="text" size="10" value="10" name="para23" runat="server"><br>
																		部门ID： <input type="text" name="para24" id="para24" runat="server"><asp:checkbox 
                                                                            id="para25" runat="server" Text="URL接收(URL:dept)"></asp:checkbox>
																		(请填写班级ID,用英文分号分隔)
																		<br />
																		指定用户名： <input type="text" name="para37" runat="server" id="para37">
																		<asp:checkbox id="para38" runat="server" Text="URL接收(URL:username)"></asp:checkbox>
																		(请填写用户名,用英文分号分隔)</div>
																	<%--分页--%>
																	<div id="show5">页码列表CSS：<input type="text" name="para30" id="para30" runat="server">
																		当前页码CSS：<input type="text" name="para31" id="para31" runat="server">
																		<br>
																		最多显示页码数量：<input type="text" name="para32" id="para32" runat="server"></div>
																	<%--公告--%>
																	<div id="show6">显示记录数： <input name="para33" type="text" size="10" runat="server" id="para33" value="10">（输入0为显示全部记录） 
																		标题最多字符数： <INPUT id="para34" type="text" size="10" value="10" name="para34" runat="server"><br>
																		每页显示记录数：<INPUT id="para40" type="text" size="10" value="10" name="para40" runat="server"><br>
																	</div>
																	<%--类别--%>
																	<div id="show7">类别ID： <input type="text" name="para35" id="para35" runat="server">
																		<asp:checkbox id="para36" runat="server" Text="URL接收(URL:kindid)"></asp:checkbox>
																		(请填写类别ID,多个用英文分号分隔)</div>
																</TD>
															</TR>
															<TR>
																<TD class="table_body"><span class="td_title">参数设置(请用HTML语法填写)： </span></TD>
																<TD class="table_none">&nbsp;<asp:CheckBox ID="para46" runat="server" 
                                                                        oncheckedchanged="para46_CheckedChanged"/>是否多表查询&nbsp;<asp:TextBox ID="para47" runat="server" Visible="false"></asp:TextBox></TD>
															</TR>
															<TR>
																<TD class="table_body"><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 class="table_none"><span class="forumrowHighlight">
																		<textarea name="content" ID="content" style="WIDTH:100%" rows="10" runat="server"></textarea>
																		<a href="javascript:admin_Size(-3,'content')"><img src="../pics/minus1.gif" width="20" height="20" border='0' unselectable="on"></a>
																		<a href="javascript:admin_Size(3,'content')"><img src="../pics/plus1.gif" width="20" height="20" border='0' unselectable="on"></a>
																	</span></TD>
															</TR>
														</TBODY></TABLE>
												</DIV> <!--内容框End--></TD>
											<TD width="1" background="images/tab_bg.gif"><IMG height="1" src="images/tab_bg.gif" width="1"></TD>
										</TR>
									</TBODY></TABLE>
							</TD>
						</TR>
						<TR>
							<TD background="images/tab_bg.gif" bgColor="#ffffff"><IMG height="1" src="images/tab_bg.gif" width="1"></TD>
						</TR>
					</TBODY></TABLE> <!--选项卡 End--></DIV>
			<DIV>
				<div align="center"><span class="px14"><br>
						<asp:button id="Button1" runat="server" CssClass="formbutton" Width="100px" 
                        Text=" 添 加 " onclick="Button1_Click"></asp:button>
					</span><br>
				</div>
			</DIV>
		</form>
		<SCRIPT language="javascript">
        function tabClick(idx,count) {
          for (i_tr = 0; i_tr < count; i_tr++) {
              var tabImgLeft = eval('document.all.tabImgLeft__' + idx);
              var tabImgRight = eval('document.all.tabImgRight__' + idx);
              var tabLabel = eval('document.all.tabLabel__' + idx);
              var tabContent = eval('document.all.tabContent__' + idx);

              tabImgLeft.src = 'images/tab_active_left.gif';
              tabImgRight.src = 'images/tab_active_right.gif';
              tabLabel.background = 'images/tab_active_bg.gif';
              tabContent.style.visibility = 'visible';
              tabContent.style.display = 'block';
          }
        }
        tabClick(0,1);
		NewsTypeSel(document.all.T_type.selectedIndex);
		</SCRIPT>
		<BR>
	</BODY>
</HTML>
