<%@ Register TagPrefix="uc1" TagName="AddRelatedContact" Src="AddRelatedContact.ascx" %>
<%@ Register TagPrefix="cc1" Namespace="EasyWebEditorControl" Assembly="EasyWebEditorControl" %>
<%@ Register TagPrefix="uc1" TagName="Counter" Src="Counter.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="MgrContent.aspx.vb" Inherits="AllSaints.ViewChildPageContacts" ValidateRequest = "false"%>
<%@ Register TagPrefix="uc1" TagName="AddRelatedLinks" Src="AddRelatedLinks.ascx" %>
<%@ Register TagPrefix="uc1" TagName="TopPage" Src="TopPage.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftPage" Src="LeftPage.ascx" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>Content Management</title>
		<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
		<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="css/default.css" type="text/css" rel="stylesheet">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" encType="multipart/form-data" runat="server">
			<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0">
				<TR>
					<TD bgColor="white" colSpan="3" colspan=2><uc1:toppage id="TopPage1" runat="server"></uc1:toppage></TD>
				</TR>
				<tr>
					<td style="width:210px; padding-left:10px; padding-bottom:10px;" valign="top" bgcolor="#ffffff">
						<table cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td valign="top" class="LeftLinksTd">
									<uc1:leftpage id="Toppage2" runat="server"></uc1:leftpage>
								</td>
							</tr>
						</table>
					</td>
					<td style="width:100%; padding:10px;" valign=top bgcolor="#ffffff">
						<table cellpadding="0" cellspacing="0" align=left width="100%">
							<TR bgColor="white">
								<TD colSpan="3">
									<table cellSpacing="0" cellPadding="0" width="90%" align="center" border="0">
										<tr>
											<td><asp:datalist id=dlSubPages runat="server" DataKeyField="ID" DataMember="GetChildPages" DataSource="<%# DsChildPageLinks1 %>" ShowHeader="False" RepeatDirection="Horizontal" RepeatLayout="Flow" ShowFooter="False" CssClass="nav1linkpipe">
													<ItemTemplate>
														<asp:LinkButton id=LinkButton1 runat="server" CssClass="nav1linkoff" Text='<%# DataBinder.Eval(Container, "DataItem.PageName") %>' CommandName="ParentPageName" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ID") %>'>
														</asp:LinkButton>
													</ItemTemplate>
													<SeparatorTemplate>
														|
													</SeparatorTemplate>
												</asp:datalist></td>
										</tr>
									</table>
								</TD>
							</TR>
							<TR>
								<TD noWrap width="150" bgColor="white">&nbsp;</TD>
								<TD bgColor="#ffffff"></TD>
								<TD noWrap width="20%" bgColor="white">&nbsp;</TD>
							</TR>
							<TR>
								<TD class="maintitle2" vAlign="top" noWrap width="150" bgColor="white">&nbsp;&nbsp;Link 
									Title:</TD>
								<TD vAlign="top" bgColor="#ffffff"><asp:textbox id=txtPageName runat="server" Text='<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].PageName") %>' Width="250px" ToolTip='<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].PageName") %>'>
									</asp:textbox><asp:label id=lblPageID runat="server" Text='<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].ID") %>' Visible="False"></asp:label></TD>
								<TD vAlign="top" bgColor="white" rowSpan="6"><asp:panel id="TopPanel" runat="server" Width="100%" Visible="False">
										<asp:Image id=imgTop runat="server" Width="245px" Height="90px" ImageUrl='<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].TopPicture") %>'>
										</asp:Image>
										<asp:LinkButton id="lnkTopPicRemove" runat="server">Remove Picture</asp:LinkButton>
										<BR>
										<INPUT id="TopPicture" type="file" name="TopPicture" runat="server"><BR>
										<asp:Button id="btnTopPicUpdate" runat="server" Text="Update"></asp:Button>
									</asp:panel><asp:panel class="maintitle2" id="RightPanel" runat="server" Width="100%" Visible="False">
			<asp:Image id=imgRight runat="server" Width="230px" Height="300px" ImageUrl='<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].RightPicture") %>'></asp:Image>
			<asp:LinkButton id="lnkRightPicRemove" runat="server">Remove Picture</asp:LinkButton><BR><INPUT id="RightPicture" type="file" name="RightPicture" runat="server"><BR>Description:<BR>
			<asp:TextBox id=txtImageDesc runat="server" Width="150px" Text='<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].RightPicDesc") %>'>
										</asp:TextBox><BR>
			<asp:Button id="btnRightPicUpdate" runat="server" Text="Update"></asp:Button></asp:panel><BR>
								</TD>
							</TR>
							<TR bgColor="white">
								<TD class="maintitle2" vAlign="top">&nbsp;
									<asp:label id="lblPageHeading" runat="server" Visible="False">Page Heading:</asp:label></TD>
								<TD vAlign="top"><asp:panel id="pnlPageHeading" runat="server" Visible="False">
			<asp:textbox id=txtPageHeading runat="server" Width="250px" Text='<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].BodyHeading") %>'>
										</asp:textbox><BR>
			<asp:DropDownList id="DDL_Teachers" runat="server" AutoPostBack="True"></asp:DropDownList>
			<asp:LinkButton id="lnkViewCalendar" runat="server">Manage Class Calendar</asp:LinkButton>&nbsp; 
			<asp:LinkButton id="lnkClassAssignments" runat="server">Manage Class Assignments</asp:LinkButton></asp:panel></TD>
							</TR>
							<% if(DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].external_link")= "External") %>
							<tr bgcolor="white">
								<td colspan="2" style="PADDING-LEFT: 8px;FONT-FAMILY: verdana;COLOR: red;FONT-SIZE: 11px">
									! This is external link point to '<%# DataBinder.Eval(DsViewPage1, "Tables[GetPageInfo].DefaultView.[0].url") %>' 
									content added to this page will not be displayed on public site.
								</td>
							</tr>
							<% End if %>
							<TR bgColor="white">
								<TD class="maintitle2" vAlign="top"><asp:panel id="pnlPageBodyLeft" runat="server" Visible="False">&nbsp; Page Body:</asp:panel>
									<TABLE id="Table2" cellSpacing="0" cellPadding="0" width="90%" align="center" border="0">
										<TR>
											<TD>&nbsp;</TD>
										</TR>
										<TR>
											<TD vAlign="top"><asp:datagrid id=DataGrid2 runat="server" DataKeyField="ID" DataMember="GetChildPages" DataSource="<%# DsViewChildPages1 %>" ShowHeader="False" CssClass="nav2linkoff" AutoGenerateColumns="False" BorderWidth="0px" CellPadding="1" CellSpacing="1">
													<Columns>
														<asp:HyperLinkColumn DataNavigateUrlField="ID" DataNavigateUrlFormatString="MgrContent.aspx?Level=1&amp;ID={0}"
															DataTextField="PageName"></asp:HyperLinkColumn>
													</Columns>
												</asp:datagrid><asp:hyperlink id="hlnkManageLinks" runat="server" CssClass="nav1linkhigh" NavigateUrl="#"> Manage Links</asp:hyperlink></TD>
										</TR>
									</TABLE>
								</TD>
								<TD class="maintitle2" vAlign="top" style="height:500px;"><BR>
									<cc1:easywebedit id="EWE1" style="height: 425px;width: 650px;" runat="server" Visible="False" ImagesLocation="../images/webeditnewpics/"
										BackColor="#CDCB9B" AllowFileDeletion="True" AllowFileUpload="True" DesignStyle="Classic" AllowDirectoryCreation="True"
										CallContentChangedFunction="False" MaxUploadSize="50000"></cc1:easywebedit><BR>
									<asp:button id="btnUpdate" runat="server" Text="Update Page Contents"></asp:button></TD>
							</TR>
							<TR bgColor="#ffffff">
								<TD class="maintitle2" vAlign="top" colSpan="2"><asp:panel id="pnlLinks" runat="server" Visible="False"><STRONG>&nbsp;Related&nbsp;Links:<BR>
										</STRONG>
										<asp:datagrid id=DG_RelatedLinks runat="server" CssClass="itable" DataSource="<%# DsContactLinks1 %>" DataMember="cmdCL_Select" DataKeyField="ID" Width="100%" Visible="TRUE" AutoGenerateColumns="False">
											<ItemStyle BorderWidth="0px" CssClass="itablebody"></ItemStyle>
											<HeaderStyle Font-Bold="True" CssClass="itablehead"></HeaderStyle>
											<Columns>
												<asp:BoundColumn DataField="LinkName" SortExpression="LinkName" HeaderText="Link Text">
													<HeaderStyle Width="40%"></HeaderStyle>
												</asp:BoundColumn>
												<asp:TemplateColumn SortExpression="LinkURL" HeaderText="Link URL Address">
													<ItemTemplate>
														<SPAN style="width:350px;overflow:hidden;text-overflow:ellipsis;"><NOBR>
																<asp:Label id=Label2 runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.LinkURL") %>'>
																</asp:Label>
															</NOBR></SPAN>
													</ItemTemplate>
													<EditItemTemplate>
														<asp:TextBox id=TextBox1 Width="325px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.LinkURL") %>'>
														</asp:TextBox>
													</EditItemTemplate>
												</asp:TemplateColumn>
												<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit">
													<HeaderStyle Width="20%"></HeaderStyle>
												</asp:EditCommandColumn>
												<asp:ButtonColumn Text="Delete" CommandName="Delete"></asp:ButtonColumn>
											</Columns>
										</asp:datagrid>
										<BR>
										<TABLE id="Table3" border="0" width="70%" align="center">
											<TR>
												<TD>
													<uc1:AddRelatedLinks id="AddRelLinks1" runat="server" Visible="True"></uc1:AddRelatedLinks></TD>
											</TR>
										</TABLE>
									</asp:panel></TD>
							</TR>
							<TR bgColor="#ffffff">
								<TD class="maintitle2" vAlign="top" colSpan="2"><asp:panel id="pnlContacts" runat="server" Visible="False"><STRONG>&nbsp;Related 
											Contacts:<BR>
										</STRONG>
										<asp:DataGrid id=DG_RelatedContacts runat="server" CssClass="itable" DataSource="<%# DsGetRelatedContacts1 %>" DataMember="GetRelContacts" DataKeyField="ID" Width="100%" AutoGenerateColumns="False">
											<ItemStyle CssClass="itablebody"></ItemStyle>
											<HeaderStyle CssClass="itablehead"></HeaderStyle>
											<Columns>
												<asp:BoundColumn DataField="Heading" SortExpression="Heading" HeaderText="Heading">
													<HeaderStyle Width="40%"></HeaderStyle>
												</asp:BoundColumn>
												<asp:BoundColumn DataField="InfoText" SortExpression="InfoText" HeaderText="Info Text">
													<HeaderStyle Width="40%"></HeaderStyle>
												</asp:BoundColumn>
												<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit">
													<HeaderStyle Width="10%"></HeaderStyle>
												</asp:EditCommandColumn>
												<asp:ButtonColumn Text="Delete" CommandName="Delete">
													<HeaderStyle Width="10%"></HeaderStyle>
												</asp:ButtonColumn>
											</Columns>
										</asp:DataGrid>
										<BR>
										<TABLE id="Table4" border="0" width="70%" align="center">
											<TR>
												<TD>
													<uc1:AddRelatedContact id="AddRelContact1" runat="server" Visible="True"></uc1:AddRelatedContact></TD>
											</TR>
										</TABLE>
									</asp:panel></TD>
							</TR>
							<TR>
								<TD class="maintitle2" vAlign="top" bgColor="white" colSpan="2">&nbsp;</TD>
							</TR>
						</table>
					</td>
				</tr>
			</TABLE>
			<uc1:counter id="Counter1" runat="server"></uc1:counter></form>
	</body>
</HTML>
