<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Admin_Help.aspx.vb" Inherits="TourEx.Web.Admin_Help" %>
<!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" />
<title>无标题页</title>
<link rel="stylesheet" type="text/css" href="Css/Style.css"/>
<script type="text/javascript" src="../Sys/Js/jquery.js"></script>
<script type="text/javascript" src="../Sys/Js/CreateSelect.js"></script>
<script type="text/javascript" src="../Sys/Js/jquery.validate.js"></script>
<script type="text/javascript" src="../Sys/Js/jquery.validate.check.js"></script>
<script type="text/javascript" src="../Sys/WebEdit/xheditor-zh-cn.min.js"></script>
<script type="text/javascript" src="../Sys/WebEdit/xheditor_plugins/ubb.js"></script>
</head>
<body>
<ul class="navLocation">
	<li>您当前位置：<a href="Admin_Main.aspx">首页</a> > <a href="Admin_HelpList.aspx">帮助列表</a> > <asp:Label ID="navIgation" runat="server" Text=""></asp:Label></li>
</ul>
<form runat="server" id="TourExForm">
<asp:HiddenField ID="RanNum" runat="server" />
<div class="infoBox">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="infoBoxTd" width="120px">标题：</td>
		<td><asp:TextBox ID="H_Title" runat="server" size="40" class="formTitle"></asp:TextBox></td>
	</tr>
	<tr>
		<td class="infoBoxTd">类型：</td>
		<td>
            <asp:DropDownList ID="H_CategoryId" runat="server">
            </asp:DropDownList>
        </td>
	</tr>
	<tr>
		<td class="infoBoxTd">Url跳转：</td>
		<td><asp:TextBox ID="H_Url" runat="server" size="50" onkeyup="$('#H_Text').valid();" class="formTitle"></asp:TextBox></td>
	</tr>
	<tr>
		<td class="infoBoxTd">内容：</td>
		<td><asp:TextBox ID="H_Text" runat="server" TextMode="MultiLine"></asp:TextBox></td>
	</tr>
	<tr>
		<td class="infoBoxTd">排序：</td>
		<td><asp:TextBox ID="H_OrderId" runat="server" onkeyup="this.value=this.value.replace(/\D/g,'');" class="formTitle"></asp:TextBox></td>
	</tr>
	<tr>
		<td class="infoBoxTd">&nbsp;</td>
		<td><asp:Button ID="Button1" runat="server" Text="确定" CssClass="formInput01" /></td>
	</tr>
</table>
</div>
</form>

<script language="javascript" type="text/javascript">
	<!--//
	var editor;
	$(function () {
	    $('#H_Text').val(html2ubb($('#H_Text').val()));
	    editor = $('#H_Text').xheditor({ tools: 'full', width: '90%', height: '300', forcePtag: false, internalScript: true, inlineScript: true, linkTag: true, localUrl: 'root', showBlocktag: true, beforeSetSource: ubb2html, beforeGetSource: html2ubb, upImgUrl: 'Admin_Upload.ashx?r=' + $('#RanNum').val(), upFlashUrl: 'Admin_Upload.ashx?r=' + $('#RanNum').val(), upMediaUrl: 'Admin_Upload.ashx?r=' + $('#RanNum').val() });
	    //editor.setSource(html2ubb($('#H_Text').val()));
	    $("#TourExForm").validate({
	        rules: {
	            H_Title: { required: true },
	            H_CategoryId: { min: 1 },
	            H_Url: { required: function () { return $('#H_Text').val() == ''; }, url: true },
	            H_Text: { required: function () { return $('#H_Url').val() == ''; } },
	            H_OrderId: { digits: true }
	        },
	        messages: {
	            H_Title: { required: '请填写标题' },
	            H_CategoryId: { min: '请选择类型' },
	            H_Url: { required: 'Url跳转和内容必填一项', url: '请填写合法的Url链接' },
	            H_Text: { required: 'Url跳转和内容必填一项' },
	            H_OrderId: { digits: '必须是正整数!' }
	        }
	    });
	});
	//-->
</script>
</body>
</html>
