<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!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 NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>导航配置!</title>
<link rel="stylesheet" href="../js/reveal.css">	
<script type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/jquery.reveal.js"></script>
</head>
<body>
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.

        if request("t")="navigation" Then 
		dim rs,sql
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_navigation" 
		rs.open sql,dbok,3,2
		rs.addnew 
			rs("title")=trim(request.form("title"))
			rs("url")=trim(request.form("url"))
			rs("sort")=trim(request.form("sort"))
			rs("wait_nayi")=trim(request.form("wait_nayi"))
			rs("wait_nasi")=trim(request.form("wait_nasi"))
			rs("yida_language")="ch"
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功添加！');location.replace('admin_navigation.asp');</script>"
        response.end
		End If 

%>
	   <table width="98%" height="21" border="1"cellpadding="6" cellspacing="0" bordercolor="#cccccc" bgcolor="#FFFFFF" style="border-collapse:collapse" align="center">
            <tr>
              <td colspan="5"><a href="#" class="big-link" data-reveal-id="myModal">+ 创建</a>	
               </td>
             </tr>
             <Tr>
		<td bgcolor="#cccccc">标题</td>
		<td bgcolor="#cccccc">地址</td>
		<td bgcolor="#cccccc">窗口</td>
		<td bgcolor="#cccccc">排序</td>
		<td bgcolor="#cccccc">操作!</td>
	   </tr>
<%
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_navigation WHERE wait_nasi = 0 ORDER BY sort ASC"
		rs.open sql,dbok,1,1

		if rs.bof and rs.eof then
			No_record = "暂无记录!"
				Else
		do while not rs.eof

%>
	  <tr onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc z">
		<td><%=rs("title")%></td>
		<td><input value="<%=rs("url")%>" size="35" /></td>
                <% if rs("wait_nayi") = "_self" then %>
		<td>原窗口</td> 
                <%else%>
		<td>新窗口</td>
                <%end if%> 
		<td><%=rs("sort")%></td>
		<td><a href="admin_navigationedit.asp?id=<%=rs("id")%>"><img src="../images/023.jpg" alt="修改"/></a> <a href="../admin_del.asp?t=navigationdel&id=<%=rs("id")%>"><img src="../images/015.gif" alt="删除" onclick="{if(confirm('确定删除它吗?')){return true;}return false;}"/></a></td>
	  </tr>
	    <%
		set rss = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_navigation WHERE wait_nasi = "&rs("id")&" ORDER BY sort ASC"
		rss.open sql,dbok,1,1
                do while not rss.eof
            %>
	  <tr onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">
		<td> ┝ <%=rss("title")%></td>
		<td><input value="<%=rss("url")%>" size="35" /></td>
                <% if rss("wait_nayi") = "_self" then %>
		<td>原窗口</td> 
                <%else%>
		<td>新窗口</td>
                <%end if%> 
		<td><%=rss("sort")%></td>
		<td><a href="admin_navigationedit.asp?id=<%=rss("id")%>"><img src="../images/023.jpg" alt="修改"/></a> <a href="../admin_del.asp?t=navigationdel&id=<%=rss("id")%>"><img src="../images/015.gif" alt="删除" onclick="{if(confirm('确定删除它吗?')){return true;}return false;}"/></a></td>
	  </tr>
<%
            rss.movenext
            Loop
			rss.close
			set rss = nothing

		rs.MoveNext 
		loop   
		rs.close
		End If 
%>
<tr>
                <td colspan="5"><%=No_record%></td>
</tr>
		</table>
<br /><div id="myModal" class="reveal-modal">
		  <table width="98%" height="131" border="0"cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" bgcolor="#FFFFFF" align="center">
		  <form id="form1" name="form1" method="POST" action="admin_navigation.asp?t=navigation" onsubmit="return numericCheck()">
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">导航归属<br />

<select name="wait_nasi" class="winla">
<option value="0">---项级导航---</option>
<%
set rs = server.createobject("adodb.recordset")
sql="select * from shuaiweb_navigation WHERE wait_nasi = 0 ORDER BY sort ASC"
rs.open sql,dbok,1,1
do while not rs.eof
%>
<option value="<%=rs("id")%>"><%=rs("title")%></option>
<%
rs.MoveNext 
loop
rs.close
set rs=nothing
%>
</select>
</td>
			</tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">导航名称<br /><input name="title" type="text" id="title" class="win"/></td>
			</tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">导航地址<br /><input name="url" type="text" id="url" class="win"/>
			  (支持外部连接!)</td>
			</tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">打开选项<br /><select name="wait_nayi" class="winla">
                                <option value="_self">原窗口打开</option>
                               <option value="_blank">新窗口打开</option>
                          </select>
                        </td>
			</tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">导航排序<br /><input name="sort" type="text" id="sort" size="5" value="0" class="win2"/>
			  (必须是数字,数字越小越靠前!)</td>
			</tr>
			<tr>
			  <td><input type="submit" name="Submit" value="添 加" class="inanniu"/></td>
			</tr>
		  </form>

			<tr>
				<td>
<script>
 function showText(){
  if(document.getElementById("q").value==2){
   document.getElementById("text").innerHTML="<div style='padding:5px 5px 5px 5px; font-size:12px;'><input type='button' value='隐藏' onclick='hiddenText();' /><br /><br />网站路径标签 {yidacms:webpath}  </div>";
  } 
 }
 function hiddenText(){
  document.getElementById("text").innerHTML="";
 }
</script>
<select name="q" id="q" onchange="showText();">
 <option value="1">===查看可用标签===</option>
    <option value="2">基本标签</option>
</select>
<span id="text"></span>
				</td>
			</tr>

		</table>
<a class="close-reveal-modal">&#215;</a>
		</div>
</body>
</html>