<!--#include file="../inc/Conn.asp"-->
<!--#include file="Inc/Admin.Asp"-->
<!--#include file="Inc/Function.asp"-->
<%
'PurviewValue="AboutUs"
'If not CheckAdmin(PurviewValue) then
'Response.Write("<script language=""JavaScript"">alert(""越权操作!"");history.go(-1);")
'response.end
'End If

dim strFileName
const MaxPerPage=20
dim totalPut,CurrentPage,TotalPages
dim rs, sql
strFileName="Admin_Aboutus.asp"

if request("page")<>"" then
    currentPage=cint(request("page"))
else
	currentPage=1
end if

Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from Aboutus order by Aboutusorder"
rs.Open sql,conn,1,1
%>
<script language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除此记录吗？"))
     return true;
   else
     return false;
}
</script>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td  align="center" valign="top"><%
  	if rs.eof and rs.bof then
		response.write "目前共有 0 条记录"
	else
    	totalPut=rs.recordcount
		if currentpage<1 then
       		currentpage=1
    	end if
    	if (currentpage-1)*MaxPerPage>totalput then
	   		if (totalPut mod MaxPerPage)=0 then
	     		currentpage= totalPut \ MaxPerPage
		  	else
		      	currentpage= totalPut \ MaxPerPage + 1
	   		end if

    	end if
	    if currentPage=1 then        
        	showContent
        	showpage strFileName,totalput,MaxPerPage,true,true,"条记录"
   	 	else
   	     	if (currentPage-1)*MaxPerPage<totalPut then
         	   	rs.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rs.bookmark        		
            	showContent
            	showpage strFileName,totalput,MaxPerPage,true,true,"条记录"
        	else
	        	currentPage=1        
           		showContent
           		showpage strFileName,totalput,MaxPerPage,true,true,"条记录"
	    	end if
		end if
	end if

sub showContent
   	dim i
    i=0
%> 
      <table width="556" border="0" cellpadding="0" cellspacing="1" class="border">
        <tr>
          <td height="25" class="topbg"><strong>栏目管理</strong></td>
        </tr>
        <tr> 
          <td height="66"> 
            <div align="center">
              <table width="100%" height="62" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
                <tr class="Title"> 
                  <td width="78" align="center"><strong>排序号</strong></td>
                  <td width="94" align="center"><strong>语种</strong></td>
                  <td width="265" height="29" align="center"><strong> 栏目名称</strong></td>
                  <td width="108" align="center"><strong> 操作</strong></td>
                </tr>
                <%do while not rs.EOF %>
                <tr class="tdbg"> 
                  <td align="center" class=tdbg><%=rs("Aboutusorder")%></td>
                  <td align="center" class=tdbg>
				  <% if rs("Language")="1" then 
				        response.Write "中文"
				     else
					    response.Write "英文"
					 end if 
				   %></td>
                  <td height="28" align="center" class=tdbg><%=rs("Title")%></td>
                  <td align="center" class=tdbg>
				   <% if rs("Language")="1" then %>
				  <a href=../Aboutus.asp?Title=<%=rs("Title")%> target="_self">查看</a>&nbsp; 				  
				  <%else
				  EnTitle=rs("Title")
				  'Response.Write(EnTitle)
				  %>
				   <a href=../EnAboutus.asp?Title=<%=EnTitle%> target="_self">查看</a>&nbsp;  <%end if %>
                    &nbsp;<a href="Admin_AboutusModify.asp?ID=<%=rs("ID")%>">修改</a>&nbsp; 
					<%If rs("title")<>"公司简介" then%>
                    &nbsp;<a href="Admin_AboutusDel.asp?ID=<%=rs("ID")%>" onClick="return ConfirmDel();">删除</a><%End If%></td>
                </tr>
                <%
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext
loop
%>
              </table>
            </div></td>
        </tr>
      </table>
      <%
end sub 
%> </td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
<%
rs.Close
set rs=Nothing
call CloseConn()  
%>