<!--#include file="conn.asp"-->
<!--#include file="seeion.asp"-->
<!--#include file="fckeditor/fckeditor.asp"-->
<%

Dim Angel_languageid
    Angel_languageid=Trim(request.QueryString("Languageid"))
If Angel_languageid="" Then 
    Angel_languageid=1
Else
    Angel_languageid=Angel_languageid
End If 
If request.Form("submit") = "确认添加" Then
    If request.Form("Angel_about_name") = "" Then
        response.Write "<script language=javascript>alert(""单页名称不能为空！"");window.history.back();</script>"
        response.End
    End If
    If request.Form("Angel_about_order") = "" Or Not IsNumeric(request.Form("Angel_about_order")) Then
        response.Write "<script language=javascript>alert(""排序数字不能为空而且必须为数字！"");window.history.back();</script>"
        response.End
    End If
    If request.Form("Angel_all_about_content") = "" Then
        response.Write "<script language=javascript>alert(""详细内容不能为空！"");window.history.back();</script>"
        response.End
    End If
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from Angel_about"
    rs.Open sql, conn, 1, 3
    rs.addnew
    rs("Angel_about_name") = request.Form("Angel_about_name")
    rs("Angel_about_order") = request.Form("Angel_about_order")
    rs("Angel_about_parent") = request.Form("Angel_about_parent")
    rs("Angel_about_keywords") = request.Form("Angel_about_keywords")
    rs("Angel_about_description") = request.Form("Angel_about_description")
    rs("Angel_about_content") = request.Form("Angel_about_content")
    rs("Angel_all_about_content") = request.Form("Angel_all_about_content")
	rs("Angel_languageid")=Angel_languageid
    rs.update
    rs.Close
    Set rs = Nothing
    conn.Close
    Set conn = Nothing
    response.Write "<script language=javascript>alert(""单页添加成功！"");window.location.href=""about.asp""</script>"
    response.End
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=gb2312" />
<title>网站后台管理系统</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="header.asp"-->
<div id="top_banner" class="layout"></div>
<div id="content" class="layout">
  <!--#include file="left.asp"-->
  <div id="right">
    <div class="right_title">
      <h2>修改单页</h2>
    </div>
    <div class="right_body">
<table align="center" style="margin-bottom:10px">
	<tr>
	<td>
<%If Int(Angel_languageid)=1 Then  %>
<div id="lglocatione1"><a href="about.asp?LanguageId=1" >添加中文</a></div>
<div id="lglocatione"><a href="about.asp?Languageid=2">添加英文</a></div>
<%else%>
<div id="lglocatione"><a href="about.asp?LanguageId=1" >添加中文</a></div>
<div id="lglocatione1"><a href="about.asp?Languageid=2">添加英文</a></div>
<%End If %>
</td>
	</tr>
</table>

      <table>
        <tr>
          <th width="40">ID</th>
          <th width="200">单页名称</th>
          <th width="60">排序数字</th>
          <th>导航调用地址</th>
          <th width="120">修改</th>
        </tr>
        <%
Dim rs, sql, close_rs, rss
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from Angel_about where 1=1 and Angel_languageid="&Angel_languageid&" and Angel_about_parent = 0 order by Angel_about_order asc"
rs.Open sql, conn, 1, 1
Do While Not rs.EOF
%>
        <tr align="center">
          <td><%=rs("Angel_id")%></td>
          <td align="left"><span class="red">[主]<%=rs("Angel_about_name")%></span></td>
          <td><span class="red"><%=rs("Angel_about_order")%></span></td>
          <td><a href="../about.asp?id=<%=rs("Angel_ID")%>" target="_blank">about.asp?id=<%=rs("Angel_ID")%></a></td>
          <td>[<a href="about_modify.asp?id=<%=rs("Angel_id")%>">修改</a>] [<a href="about_delete.asp?id=<%=rs("Angel_id")%>" onclick="return confirm('确定要删除此单页吗？删除后将不可恢复！')">删除</a>]</td>
        </tr>
        <%
Set rss = server.CreateObject("adodb.recordset")
sql = "select * from Angel_about where Angel_about_parent = "&rs("Angel_id")&" order by Angel_about_order asc"
rss.Open sql, conn, 1, 1
Do While Not rss.EOF
%>
        <tr align="center">
          <td><%=rss("Angel_ID")%></td>
          <td align="left">└<%=rss("Angel_about_name")%></td>
          <td><%=rss("Angel_about_order")%></td>
          <td><a href="../about.asp?id=<%=rss("Angel_ID")%>" target="_blank">about.asp?id=<%=rss("Angel_ID")%></a></td>
          <td>[<a href="about_modify.asp?id=<%=rss("Angel_ID")%>">修改</a>] [<a href="about_delete.asp?id=<%=rss("Angel_ID")%>" onclick="return confirm('确定要删除此单页吗？删除后将不可恢复！')">删除</a>]</td>
        </tr>
        <%
rss.movenext
Loop
rss.Close
Set rss = Nothing
rs.movenext
Loop
rs.Close
Set rs = Nothing
%>
      </table>
    </div>
    <div class="right_title">
      <h2>添加单页</h2>
    </div>
    <div class="right_body">
      <table>
        <form method="post" name="Angel">
          <tr>
            <td width="80" align="center">单页名称：</td>
            <td><input name="Angel_about_name" type="text" size="40" />
              <span class="red">必填</span></td>
          </tr>

          <tr>
            <td align="center">关键字：</td>
            <td><input name="Angel_about_keywords" type="text" size="100" value="请尽量填写有助于搜索引擎收录" onfocus="if (value =='请尽量填写有助于搜索引擎收录'){value =''}" onblur="if (value ==''){value='请尽量填写有助于搜索引擎收录'}" /></td>
          </tr>
          <tr>
            <td align="center">关键描述：</td>
            <td><input name="Angel_about_description" type="text" size="100" value="请尽量填写有助于搜索引擎收录" onfocus="if (value =='请尽量填写有助于搜索引擎收录'){value =''}" onblur="if (value ==''){value='请尽量填写有助于搜索引擎收录'}" /></td>
          </tr>
          <tr>
            <td align="center">排序数字：</td>
            <td><input name="Angel_about_order" type="text" size="10" />
              <span class="red">必填且必须为数字！</span></td>
          </tr>
          <tr>
            <td align="center">所属单页：</td>
            <td><select name="Angel_about_parent">
                <option value="0">作为主单页</option>
                <%
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from Angel_about where 1=1 and Angel_languageid="&Angel_languageid&" and Angel_about_parent = 0 order by Angel_about_order"
rs.Open sql, conn, 1, 1
Do While Not rs.EOF
    response.Write("<option value='"&rs("Angel_ID")&"'>"&rs("Angel_about_name")&"</option>")
    rs.movenext
Loop
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
              </select></td>
          </tr>

          <tr>
            <td align="center">部分内容：</td>
            <td>
		<%
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "fckeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "100%"
oFCKeditor.Height = "180"
oFCKeditor.Value = ""
oFCKeditor.Create "Angel_about_content"
%>	   
			  </td>
          </tr>
          <tr>
            <td align="center">全部内容：</td>
            <td>  
		<%
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "fckeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "100%"
oFCKeditor.Height = "260"
oFCKeditor.Value = ""
oFCKeditor.Create "Angel_all_about_content"
%>	  
			  </td>
          </tr>
          <tr align="center">
            <td colspan="2"><p class="center">
                <input type="submit" name="submit" class="submit_button" value="确认添加" />
              </p></td>
          </tr>
        </form>
      </table>
    </div>
  </div>
  <div class="clear"></div>
</div>
<!--#include file="footer.asp"-->
