<!--#include file="admin_conn.asp"-->
<%
chkLogin
dim action : action = be("get","action")

select case action
	case "save" : save
	case else : headAdmin "视频地区语言管理" : main
end select

sub save()
	dim areastr : areastr = be("post","areastr")
	dim langstr : langstr = be("post","langstr")
	objFile.createFile "../inc/vodarea.txt",areastr
	objFile.createFile "../inc/vodlang.txt",langstr
	updateCacheFile
	writeA "修改完毕"
end sub
dispseObj()

sub main
%>
<script type="text/javascript">
	$(document).ready(function(){
    	$('#form1').form({
		onSubmit:function(){
			if(!$("#form1").valid()) {return false;}
		},
	    success:function(data){
	        $.messager.alert('系统提示', data, 'info',function(){
	        	location.href=location.href;
	        });
	    }
		});
	});
</script>
<form action="?action=save" method="post" id="form1" name="form1">
<table class="tb">
<tr class="thead"><th colspan="2">自定义地区和语言 ->>> 1.每个各占一行;2.不要有多余的空行</th></tr>
<tr><td width="50%">地区</td>
<td width="50%">语言</td>
</tr>
<tr>
	<td>
	<textarea id="areastr" name="areastr" style="width:100%;font-family: Arial, Helvetica, sans-serif;font-size: 14px;" rows="25"><%=objFile.getFile("../inc/vodarea.txt")%></textarea>
	</td>
	<td>
	<textarea id="langstr" name="langstr" style="width:100%;font-family: Arial, Helvetica, sans-serif;font-size: 14px;" rows="25"><%=objFile.getFile("../inc/vodlang.txt")%></textarea>
	</td>
	</tr>
	<tr>
	<td align="center" colspan="2"> <input type="submit" id="btnSave" name="btnSave" value="保存" class="input" /> </td>
	</tr>
</table>
</form>
</body>
</html>
<%
end sub
%>