<%
        Dim TName As String = ""
        Dim TID As Integer = Val(Request.QueryString("tid"))
        If TID > 0 Then
            Category.OtherCategory.GetData("HelpCategory", TID, TName)
        End If
        '拼写条件与排序
        Dim Where As String = ""
        If TID > 0 Then
            Where = "H_CategoryId=" & TID
        Else
            TName = FilterStr(Request.QueryString("key"))
            If TName.Length > 0 Then
                Where = "H_Title Like '%" & TName & "%'"
            End If
        End If
        Dim PageSize As Integer = 8'每页记录数
        Dim PageCount As Integer '总页数
        Dim RecordCount As Integer = HelpData.Count(Where) '统计记录数
        If RecordCount > 0 Then '统计总页数
           If RecordCount Mod PageSize = 0 Then
               PageCount = RecordCount \ PageSize
           Else
               PageCount = RecordCount \ PageSize + 1
           End If
        End If
        Dim PageID As Integer = Val(Request.QueryString("Page")) '当前页数
        If PageID < 1 Then
            PageID = 1
        ElseIf PageID > PageCount Then
            PageID = PageCount
        End If
        Dim Dr As SqlDataReader
        If RecordCount > 0 Then
           Dr =  Procedure.CommonPage("H_ID,H_Title,H_OrderID", "[" & TablePrefix & "Help]", Where, "Order By H_OrderID Asc,H_ID Desc", PageSize, PageID, RecordCount)
        End If
%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>帮助中心 - {$WebSet.Name$}</title>
<script type="text/javascript" src="{$WebPath$}Sys/Js/jquery.js"></script>
<script type="text/javascript" src="{$WebPath$}Sys/Js/AlertWindow.js"></script>
<link  type="text/css" rel="Stylesheet" href="{$WebPath$}Css/Style.css"/>
<link  type="text/css" rel="Stylesheet" href="{$WebPath$}Css/Help.css"/>
<tourex:mytag name="default_head"/>
<tourex:mytag name="default_inorder"/>
<div class="box" style="margin-top:10px;">
	<div class="hL230">
		<div class="hNav">
			<div><a href="{$WebPath$}Help/"><img src="{$WebPath$}Images/Help/helpName.gif"/></a></div>
			<tourex:category type="下级" name="helpcategory">
			<div class="hNavTit"><span><a href="{$WebPath$}Help/List.aspx?tid={${@t_id@}$}">{${@t_name@}$}</a></span></div>
			<ul class="hNavText">
			<tourex:datalist sql="Select H_ID,H_Title From [{$TablePrefix$}Help] Where H_CategoryID={${@t_id@}$} Order By H_OrderID,H_ID Desc">
			<li><a href="{$WebPath$}Help/Show.aspx?id={${@H_ID@}$}" title="{${@H_Title@}$}">{$bSubstring({@H_Title@},20)$}</a></li>
			</tourex:datalist>
			</ul>
			</tourex:category>
		</div>
	</div>
    <script type="text/javascript">
	function SearchHelp()
	{
		var k=$('#HelpKey').val();
		if(k=='请输入最简短关键字，如：提现；只能搜索帮助内')k='';
		location='{$webpath$}Help/List.aspx?key='+encodeURIComponent(k);return false;
		}
	</script>
	<div class="hR750">
		<div class="hSearch" onKeyUp="if(event.keyCode==13)SearchHelp();"><b>查找帮助</b> <input type="text" class="inputTit" value="请输入最简短关键字，如：提现；只能搜索帮助内容" onfocus="this.value='';this.onfocus='';" id="HelpKey" /> 
		<input type="button" value="" class="inputOk" onclick="SearchHelp();" /></div>
		<ul class="hInfo">
			<p>{$TName$}</p>
		<%
		If RecordCount>0 Then
			While Dr.Read
			%>
			<li>·<a href="{$WebPath$}Help/Show.aspx?id={$Dr("h_id")$}">{$Dr("h_title").ToString()$}</a></li>
			<%
			End While
			Dr.Close()
		Else
			TourExStr.AppendLine("暂无")
		End If
		%>
		</ul>
		<tourex:mytag name="page"/>
	</div>
	<div class="clearit"></div>
</div>
<tourex:mytag name="default_foot"/>