<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<%@ Register TagPrefix="IlgharUC" TagName="Ime" Src="../../ime.dwt.ascx"%>
<%@ Register TagPrefix="IlgharUC" TagName="LanguageMenu" Src="../../language_menu.dwt.ascx"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ilghar:Get ID="Order" Object="Order" InnerID="Request.QueryString['ID']" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>反馈</title>
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<script type="text/javascript" src="<%=CommonPath%>ajax.js"></script>
<script type="text/javascript" src="<%=JsPath%>common.js"></script>
<ilgharUC:Ime Ime="true" Eot="true" runat="server" />
<script type="text/javascript">
function XmlHttpCallBack(xmlHttp)
{
	if (xmlHttp.status == 200)
	{
		var list = document.getElementById("List");
		list.innerHTML = HandleFake404(xmlHttp);
		
		if (_action == "Add")
			alert("添加成功！");
	}
	else
	{
		if (_action == "Add")
			alert("添加失败！请查看日志！");
		else
			alert("失败！请查看日志！");
	}
	
	document.getElementById("Submit").disabled = false;
	window.status = "";
}

function OnAdd(form)
{
	if (form.Content.value == "")
	{
		alert("请输入内容！");
		return false;
	}
	
	if (form.Content.value.length > 255)
	{
		alert("内容不能超过255个字符！");
		return false;
	}
	
	var data = "OrderID=<%=Order[ID]%>";
	data += "&Content=" + encodeURIComponent(form.Content.value);

	document.getElementById("Submit").disabled = true;
	_action = "Add";
	window.status = "正在操作...";
	_ajax.Post("<%=WebPath%>ilghar.aspx?Lang=<%=ContentLang%>&Object=Feedback&Operation=Add&Transfer=" + encodeURIComponent(BuildAjaxPath()), data, XmlHttpCallBack);
	return false;
}
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" onclick="OpenCloseLeftFrame()" /></div>
	<div class="Title"><a href="list.aspx?Lang=<%=ContentLang%>">订单列表</a> → <span class="<%=ContentLang%>Font"><%=Order[Number]%></span></div>
	<div class="Right"></div>
</div>
<div class="Block">
	<ul class="TabMenu">
		<%If !Convert.ToBoolean(Order[IsArchived]) && !Convert.ToBoolean(Order[IsCanceled]) && !Convert.ToBoolean(Order[IsConfirmed])%>
			<li class="Left"></li>
			<li class="Middle"><a href="edit.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">编辑</a></li>
			<li class="Right"></li>
		<%Else%>
			<li class="Left"></li>
			<li class="Middle"><a href="view.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">查看</a></li>
			<li class="Right"></li>
			<li class="Left"></li>
			<li class="Middle"><a href="payment.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">收款单</a></li>
			<li class="Right"></li>
			<li class="Left"></li>
			<li class="Middle"><a href="refund.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">退款单</a></li>
			<li class="Right"></li>
			<li class="Left"></li>
			<li class="Middle"><a href="delivery.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">发货单</a></li>
			<li class="Right"></li>
			<li class="Left"></li>
			<li class="Middle"><a href="return.aspx?Lang=<%=ContentLang%>&amp;ID=<%=Request.QueryString["ID"]%>">退货单</a></li>
			<li class="Right"></li>
		<%EndIf%>
		<li class="Left Selected"></li>
		<li class="Middle Selected">反馈</li>
		<li class="Right Selected"></li>
	</ul>
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle"></li>
		<li class="Right"></li>
	</ul>
	<div class="ToolBar">
		<form method="post" onsubmit="return OnAdd(this)">
			<textarea name="Content" cols="80" rows="4" class="<%=ContentLang%>Font"></textarea><br />
			<input type="submit" id="Submit" class="Button" value="提交" />
		</form>
	</div>
	<div id="List">
		<table border="0" cellpadding="4" cellspacing="1">
			<tbody>
				<ilghar:List ID="List" Object="Feedback" Page="PageNumber" PageSize="10" Condition="OrderID=Order[ID]" Validate="True">
					<ilghar:Record>
						<tr class="<%=ContentLang%>Font">
							<th><%=Creator%>：</th>
							<td>
								<pre class="<%=ContentLang%>Font"><%=Content%></pre><br /><br />
								发表于：<%=CreateTime%>
							</td>
						</tr>
					</ilghar:Record>
				</ilghar:List>
			</tbody>
		</table>
		<ilghar:Pagination Page="PageNumber" PageSize="10" RecordCount="List[RecordCount]">
			<div class="Pagination">
				<div class="Left">共 <%=RecordCount%> 条 当前显示第 <%=PageNumber%> 页 第 <%=RangeLower%>-<%=RangeUpper%> 条 </div>
				<div class="Right">
					<ilghar:FirstPage>
						<ilghar:Yes>
							<img src="<%=ImagePath%>pagination/first_page_off.gif"/>
							<img src="<%=ImagePath%>pagination/previous_page_off.gif"/>
						</ilghar:Yes>
						<ilghar:No>
							<a href="javascript:Go(1)"><img src="<%=ImagePath%>pagination/first_page_on.gif"/></a>
							<a href="javascript:Go(<%=PageNumber%> - 1)" id="PrevPage"><img src="<%=ImagePath%>pagination/previous_page_on.gif"/></a>
						</ilghar:No>
					</ilghar:FirstPage>
					<ilghar:CurrentPage Range="5">
						<ilghar:Yes>
							<span class="Current"><%=Index%></span>						
						</ilghar:Yes>
						<ilghar:No>
							<a href="javascript:Go(<%=Index%>)">[<%=Index%>]</a>
						</ilghar:No>
					</ilghar:CurrentPage>
					<ilghar:LastPage>
						<ilghar:Yes>
							<img src="<%=ImagePath%>pagination/next_page_off.gif"/>
							<img src="<%=ImagePath%>pagination/last_page_off.gif"/>
						</ilghar:Yes>
						<ilghar:No>
							<a href="javascript:Go(<%=PageNumber%> + 1)" id="NextPage"><img src="<%=ImagePath%>pagination/next_page_on.gif"/></a>
							<a href="javascript:Go(<%=PageCount%>)"><img src="<%=ImagePath%>pagination/last_page_on.gif"/></a>
						</ilghar:No>
					</ilghar:LastPage>
				</div>
			</div>
		</ilghar:Pagination>
	</div>
	<div class="Footer"></div>
</div>
<script type="text/javascript">
HandleFake404();
</script>
</body>
</html>