<%@ Page language="c#" Codebehind="ActionReport.aspx.cs" AutoEventWireup="True" EnableEventValidation="False" Inherits="DocumentRouter.ActionReport" %>

<%@ Register assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Tarvos Document Router</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"/>
		<meta content="C#" name="CODE_LANGUAGE"/>
		<meta content="JavaScript" name="vs_defaultClientScript"/>
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"/>
		<link href="Data/DocumentRouter.css" type="text/css" rel="stylesheet" />
		<script src="Scripts/Tools.js" type="text/javascript"></script>
		
		<script language="javascript" type="text/javascript">
<!--

function ShowWait()
{
	try
	{
		document.body.style.cursor = 'wait';
		document.getElementById('waitImg').style.display = "";
	}
	catch(e)
	{
	}
}

function HideWait()
{
	try
	{
		document.body.style.cursor = 'default';
		document.getElementById('waitImg').style.display = "none";
	}
	catch(e)
	{
	}
}

// Redirect to AlchemyWeb logout page, so license is released
function HandleOnClose()
{
	try
	{
		if (event.clientY < 0)
		{
			if(sAlchemyLogout != '')
			{
				self.location.href = sAlchemyLogout;
			}
		}
	}
	catch(e)
	{
	}
}

function RequestStart(sender, args)
{
	if (args.get_eventTarget().indexOf("ExportExcel") != -1 ||
				args.get_eventTarget().indexOf("btnLogOut") != -1)
	{
		args.set_enableAjax(false);
		HideWait();
	}
}

function ShowPopupActionReport(logID)
{

	var oWindow = GetRadWindowManager().GetWindowByName("PopupActionReport");
	if (oWindow != null)
	{
		oWindow.SetUrl("PopupActionReport.aspx?logID=" + logID + "&rnd=" + Math.random());
		oWindow.Show();
		return false;
	}

	var oWindow = radopen("PopupActionReport.aspx?logID=" + logID + "&rnd=" + Math.random(), "PopupActionReport");
	oWindow.set_visibleStatusbar(false);
	oWindow.SetSize(800, 500);
	oWindow.Center();
	return false;
}

//-->
		</script>
	</head>
	<body onmouseover="javascript:window.status='Tarvos DocumentRouter'; return true;" onresize="javascript:ResizeTables();"
		onbeforeunload="javascript:HandleOnClose();" topMargin="0" onload="javascript:HideWait(); javascript:ResizeTables();">
		<form id="ActionReportForm" method="post" runat="server">
			<asp:ScriptManager ID="ScriptManager1" runat="server">
			</asp:ScriptManager>
			<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Web20">
			</telerik:RadWindowManager>
			<telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" Skin="Web20" />
		<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" ClientEvents-OnRequestStart="RequestStart" 
				ClientEvents-OnResponseEnd="javascript:HideWait(); javascript:ResizeTables();" 
				HorizontalAlign="NotSet">
			<table class="MainTable" id="tblMain" cellspacing="0" cellpadding="0" align="center">
				<tr class="Header" valign="middle">
					<td><asp:image id="Image1" runat="server" ImageUrl="~/Images/logo.png"></asp:image></td>
					<td><asp:label id="lblHeader" runat="server" ForeColor="White">Tarvos Document Router</asp:label></td>
					<td></td>
				</tr>
				<tr>
					<td style="HEIGHT: 10px" align="right" background="Images/menuback.png"
						bgcolor="white" colspan="4"></td>
				</tr>
				<tr>
					<td bgcolor="white" colspan="4"><asp:label id="lblError" runat="server" ForeColor="Red" Visible="False" Font-Names="Verdana"
							Font-Size="Medium">Label</asp:label></td>
				</tr>
				<tr>
					<td class="Tab">&nbsp;</td>
					<td class="Tab">
						<p><asp:imagebutton id="btnSettings" runat="server" ImageUrl="~/Images/settings.png" CssClass="ImgButton" ToolTip="Instellingen"></asp:imagebutton><asp:imagebutton id="btnDocRouter" runat="server" ImageUrl="~/Images/DocRouter.png" CssClass="ImgButton" ToolTip="Hoofdscherm"></asp:imagebutton><asp:imagebutton id="btnLogOut" runat="server" ImageUrl="~/Images/exit.png" CssClass="ImgButton" ToolTip="Afsluiten"></asp:imagebutton><asp:imagebutton id="btnHelp" runat="server" ImageUrl="~/Images/help.png" CssClass="ImgButton" ToolTip="Help"></asp:imagebutton>&nbsp;&nbsp;<asp:Image id="waitImg" runat="server" ImageUrl="~/Images/icon_wait.gif"></asp:Image></P>
					</td>
					<td class="Tab" align="left">&nbsp;</td>
				</tr>
				<tr>
					<td class="ListColumn"><br />
						<table id="Table1" class="ButtonBar" cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td height="10"><asp:ImageButton id="btnSearch" runat="server" CssClass="ImgButton" ImageUrl="~/Images/Search.png"></asp:ImageButton><asp:ImageButton id="btnExportExcel" runat="server" CssClass="ImgButton" ImageUrl="~/Images/excel2.png" onclick="btnExportExcel_Click" ></asp:ImageButton></td>
							</tr>
						</table>
						<p></p>
						<asp:table id="tbHeader" CssClass="PaneHeader" runat="server"></asp:table>
						<table id="tbContent" class="PaneContent">
							<tr>
								<td height="6px"></td>
							</tr>
							<tr>
								<td>
									<asp:label id="lblAction" runat="server">Kies een actie</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<asp:DropDownList runat="server" Width="100%" ID="dpActions">
										<asp:ListItem Text="Alle acties" Value="" Selected="True"></asp:ListItem>
										<asp:ListItem Text="Document verplaatst" Value="Store document"></asp:ListItem>
										<asp:ListItem Text="Document verplaatst en verstuurd" Value="Publish document"></asp:ListItem>
										<asp:ListItem Text="Document verborgen" Value="Hide document"></asp:ListItem>
										<asp:ListItem Text="Document verwijderd" Value="Delete document"></asp:ListItem>
										<asp:ListItem Text="Document toegevoegd" Value="Document uploaded"></asp:ListItem>
										<asp:ListItem Text="Profiel opgeslagen" Value="Profile saved"></asp:ListItem>
										<asp:ListItem Text="Instellingen geopend" Value="Settings clicked"></asp:ListItem>
									</asp:DropDownList>
								</td>
							</tr>
							<tr>
								<td height="6px"></td>
							</tr>
							<tr>
								<td>
									<asp:label id="lblPhrase" runat="server">Datum vanaf</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<telerik:RadDateTimePicker ID="txtDateFrom" runat="server" Skin="Web20" 
										Width="100%">
										<Calendar Skin="Web20" UseColumnHeadersAsSelectors="False" 
											UseRowHeadersAsSelectors="False" ViewSelectorText="x">
										</Calendar>
										<TimeView CellSpacing="-1" Culture="Dutch (Netherlands)">
										</TimeView>
										<TimePopupButton HoverImageUrl="" ImageUrl="" />
										<DatePopupButton HoverImageUrl="" ImageUrl="" />
										<DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy">
										</DateInput>
									</telerik:RadDateTimePicker>
								</td>
							</tr>
							<tr>
								<td>
									<asp:label id="Label1" runat="server">Datum t/m</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<telerik:RadDateTimePicker ID="txtDateEnd" runat="server" Width="100%" 
										DateInput-DateFormat="dd-MM-yyyy" DateInput-Width="100%" Skin="Web20" Culture="Dutch (Netherlands)">
										<Calendar Skin="Web20" UseColumnHeadersAsSelectors="False" 
											UseRowHeadersAsSelectors="False" ViewSelectorText="x" DayCellToolTipFormat="dddd d MMMM yyyy">
										</Calendar>
										<DatePopupButton HoverImageUrl="" ImageUrl="" />
										<DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy">
										</DateInput>
									</telerik:RadDateTimePicker>
								</td>
							</tr>
							<tr>
								<td>
									<asp:label id="Label2" runat="server">Gebruiker</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<asp:TextBox ID="txtUserName" runat="server" Width="100%"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td>
									<asp:label id="Label3" runat="server">Documenttitel</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<asp:TextBox ID="txtDocumentTitle" runat="server" Width="100%"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td>
									<asp:label id="Label4" runat="server">Document ItemID</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<asp:TextBox ID="txtItemID" runat="server" Width="100%"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td>
									<asp:label id="Label5" runat="server">Database</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<asp:TextBox ID="txtDatabaseTitle" runat="server" Width="100%"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td>
									<asp:label id="Label6" runat="server">Aangepaste Profielveld</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<asp:TextBox ID="txtFieldName" runat="server" Width="100%"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td>
									<asp:label id="Label7" runat="server">Aangepaste Profielveldwaarde</asp:label>
								</td>
							</tr>
							<tr>
								<td>
									<asp:TextBox ID="txtFieldValue" runat="server" Width="100%"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td height="6px"></td>
							</tr>
							<tr>
								<td>
									<asp:label id="lblDocuments" runat="server">Documenten</asp:label>
								</td>
							</tr>
						</table>
					</td>
					<td class="ActionReportColumn">
						<table style="height:100%; border: solid 1px steelblue;" id="tblDoc" cellspacing="0" cellpadding="0" width="100%">
							<tr valign="top" style="height:100%;">
								<td>
									<br />
									<div id="divContentReport" style="OVERFLOW: auto;">
									<asp:DataGrid runat="server" AutoGenerateColumns="False" AllowPaging="True" CssClass="TableList" ID="dgDocs"
										PageSize="20" PagerStyle-Mode="NumericPages" >
										<SelectedItemStyle CssClass="TableSelectedItemRow"></SelectedItemStyle>
										<AlternatingItemStyle CssClass="TableAlternatingItemRow"></AlternatingItemStyle>
										<ItemStyle CssClass="TableItemRow"></ItemStyle>
										<HeaderStyle CssClass="TableHeaderRow"></HeaderStyle>
										<Columns>
											<asp:ButtonColumn Text="&lt;img src=&quot;Images/small_nav_doc.png&quot; border=0&gt;"
												CommandName="Select"></asp:ButtonColumn>
											<asp:ButtonColumn DataTextField="LogID" HeaderText="Id" CommandName="Select"></asp:ButtonColumn>
											<asp:ButtonColumn HeaderText="Actie" DataTextField="Action" CommandName="Select"></asp:ButtonColumn>
											<asp:BoundColumn HeaderText="Datum" DataField="ActionDate"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Gebruiker" DataField="UserName"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Documenttitel" DataField="Title"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="ItemID" DataField="ItemID"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Database" DataField="Database" Visible="false"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Database" DataField="DatabaseTitle"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="ItemPad" DataField="ItemPath" Visible="false"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Bron ItemID" DataField="SourceItemID"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Bron Database" DataField="SourceDatabase" Visible="false"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Bron Database" DataField="SourceDatabaseTitle"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Bron ItemPad" DataField="SourceItemPath" Visible="false"></asp:BoundColumn>
											<asp:BoundColumn HeaderText="Velden gewijzigd" DataField="FieldCount"></asp:BoundColumn>
										</Columns>
										<PagerStyle Position="TopAndBottom" PrevPageText="Vorige" NextPageText="Volgende"></PagerStyle>
									</asp:DataGrid>
									</div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</telerik:RadAjaxPanel>
		</form>
	</body>
</html>
