<%@ Page CodeBehind="admin_style.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.admin_style" %>
<!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">
				<style type="text/css">
.STYLE6 { COLOR: #ff0000 }
</style>
</HEAD>
	<BODY bgColor="#ffffff" topMargin="5" marginwidth="0" marginheight="0">
		<form id="Form1" method="post" runat="server">
			<DIV></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;样式管理</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,3)" background="images/tab_unactive_bg.gif"
																	UNSELECTABLE="on">所有样式</TD>
																<TD width="3"><IMG id="tabImgRight__0" height="22" src="images/tab_unactive_right.gif" width="3"></TD>
															</TR>
														</TBODY>
													</TABLE>												</TD>
												<TD><TABLE height="22" cellSpacing="0" cellPadding="0" border="0">
														<TBODY>
															<TR>
																<TD width="3"><IMG id="tabImgLeft__1" height="22" src="images/tab_unactive_left.gif" width="3"></TD>
																<TD class="tab" id="tabLabel__1" onclick="javascript:tabClick(1,3)" background="images/tab_unactive_bg.gif"
																	UNSELECTABLE="on">添加样式</TD>
																<TD width="3"><IMG id="tabImgRight__1" height="22" src="images/tab_unactive_right.gif" width="3"></TD>
															</TR>
														</TBODY>
													</TABLE>												</TD>
												<TD>
													<TABLE height="22" cellSpacing="0" cellPadding="0" border="0">
														<TBODY>
															<TR>
																<TD width="3"><IMG id="tabImgLeft__2" height="22" src='images/tab_unactive_left.gif' width="3"></TD>
																<TD class="tab" id="tabLabel__2" onclick='javascript:tabClick(2,3)' background='images/tab_unactive_bg.gif'
																	UNSELECTABLE='on'>批量导入样式 </TD>
																<TD width="3"><IMG id="tabImgRight__2" height="22" src='images/tab_unactive_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 vAlign="top" height="100" class="borderstyle">
													<DIV id="tabContent__0">
													  <asp:datagrid id="DataGrid" runat="server" CssClass="GridBody" GridLines="None"
					AutoGenerateColumns="False" Width="100%" PageSize="20" 
					AllowSorting="True">
                                                        <AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
                                                        <ItemStyle CssClass="GridItem"></ItemStyle>
                                                        <HeaderStyle CssClass="GridHead"></HeaderStyle>
                                                        <Columns>
                                                        <asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
                                                        <asp:TemplateColumn HeaderText="缩略图">
                                                          <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                                                          <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                          <ItemTemplate>
                                                            <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.pic") %>'> </asp:Label>
                                                          </ItemTemplate>
                                                        </asp:TemplateColumn>
                                                        <asp:BoundColumn DataField="title" HeaderText="样式名称">
                                                          <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                                                          <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="path" HeaderText="文件路径">
                                                          <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                                                          <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="show" HeaderText="前台可见">
                                                          <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                                                          <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="mr" HeaderText="是否缺省">
                                                          <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                                                          <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        </asp:BoundColumn>
                                                        <asp:HyperLinkColumn Text="编辑" DataNavigateUrlField="id" DataNavigateUrlFormatString="admin_style_edit.aspx?id={0}" HeaderText="编辑">
                                                          <HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
                                                          <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        </asp:HyperLinkColumn>
                                                        <asp:ButtonColumn Text="删除" HeaderText="删除" CommandName="Delete">
                                                          <HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
                                                          <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        </asp:ButtonColumn>
                                                        </Columns>
                                                        <PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
                                                      </asp:datagrid>
													</DIV>
													<!--内容框End-->
													<!--内容框Start-->
													<DIV id="tabContent__1">
														<TABLE cellSpacing="1" cellPadding="3" width="100%" align="center" border="0">
															<TBODY>
																<TR>
																	<TD width="22%" class="table_body"><FONT face="宋体">缩略图</FONT></TD>
																  <TD width="78%" class="table_none"><FONT face="宋体">
																    <asp:TextBox id="pic" runat="server" CssClass="tableTdtext"></asp:TextBox>
																  </FONT></TD>
															  </TR>
																<TR>
																	<TD class="table_body"><FONT face="宋体">名称</FONT></TD>
															  <TD class="table_none"><SPAN id="ctl00_PageBody_Licensed_Txt2"></SPAN><FONT face="宋体">
															    <asp:TextBox id="title" runat="server" CssClass="tableTdtext"></asp:TextBox>
															  </FONT></TD>
															  </TR>
																<TR>
																	<TD class="table_body"><FONT face="宋体">文件相对路径</FONT></TD>
															  <TD class="table_none"><FONT face="宋体">
															    <asp:TextBox id="path" runat="server" CssClass="tableTdtext"></asp:TextBox>
															  </FONT></TD>
															  </TR>
																<TR>
																	<TD class="table_body">&nbsp;</TD>
																	<TD class="table_none"><FONT face="宋体">
																	  <asp:CheckBox id="show" runat="server" Text="前台可见" Checked="True"></asp:CheckBox>
																	  &nbsp;
                                                                      <asp:CheckBox id="mr" runat="server" Text="设为默认"></asp:CheckBox>
																	</FONT></TD>
															  </TR>
																<TR>
																  <TD class="table_body">&nbsp;</TD>
																  <TD class="table_none"><FONT face="宋体">
																    <asp:Button id="Button1" runat="server" Text=" 添 加 " CssClass="formbutton" onclick="Button1_Click"></asp:Button>
																  </FONT></TD>
															  </TR>
															</TBODY>
														</TABLE>
												  </DIV>
													<!--内容框Start-->
													<DIV id="tabContent__2">
														<TABLE cellSpacing="1" cellPadding="3" width="100%" align="center" border="0">
															<TBODY>
																<TR>
																  <TD width="78%" class="table_none"><FONT face="宋体">此项检查并导入样式下的所有目录，并会替换原样式库</FONT><br>
																    <FONT face="宋体">
																    <asp:Button id="Button2" runat="server" Text="批量导入style目录下的样式" CssClass="formbutton" onclick="Button2_Click"></asp:Button>
															      </FONT></TD>
															  </TR>
															</TBODY>
														</TABLE>
												  </DIV>
													<!--内容框Start--></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>
				</DIV>
				<DIV>				</DIV>
		  <div align="center">
		    <script language='javascript'>
        function tabClick(idx,count) {
          for (i_tr = 0; i_tr < count; i_tr++) {
            if (i_tr == idx) {
              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';
              continue;
            }
            var tabImgLeft = eval('document.all.tabImgLeft__' + i_tr);
            var tabImgRight = eval('document.all.tabImgRight__' + i_tr);
            var tabLabel = eval('document.all.tabLabel__' + i_tr);
            var tabContent = eval('document.all.tabContent__' + i_tr);

            tabImgLeft.src = 'images/tab_unactive_left.gif';
            tabImgRight.src = 'images/tab_unactive_right.gif';
            tabLabel.background = 'images/tab_unactive_bg.gif';
            tabContent.style.visibility = 'hidden';
            tabContent.style.display = 'none';
          }
        }
        tabClick(0,3);
					</script>
				</div>
		  </DIV>
		</form>
	</BODY>
</HTML>
