⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 topmenu.asp

📁 1.多种查询方式
💻 ASP
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="color.css">
<!-- #include file=../data/connect.asp-->
<!--#include file=../data/myPrg.asp-->
<script language="JavaScript"><!--
var MenuColor=top.MenuColor;
var MenuTextColor=top.MenuTextColor;
var iCount = new Date();
function j(s,j)
{
	iCount ++;
	if(s.options[s.selectedIndex].value != '')
		if (j == 1)
			if(s.options[s.selectedIndex].value.indexOf('?') != -1)
				parent.MainFrame.MenuFrame.TreeMenuFrame.location = s.options[s.selectedIndex].value + "&" + iCount.toString();
			else
				parent.MainFrame.MenuFrame.TreeMenuFrame.location = s.options[s.selectedIndex].value + "?" + iCount.toString();
		else
			if(s.options[s.selectedIndex].value.indexOf('?') != -1)
				parent.MainFrame.netmatter.location = s.options[s.selectedIndex].value + "&" + iCount.toString();
			else
				parent.MainFrame.netmatter.location = s.options[s.selectedIndex].value + "?" + iCount.toString();
	if (j == 1)
		s.selectedIndex = s.selectedIndex;
		//alert(""+s.selectedIndex);
	else
	s.selectedIndex = 0;
	if (j == 1)
	parent.MainFrame.netmatter.location = "home.asp";
	parent.MainFrame.MenuFrame.TreeMenuFrame.focus();
	return true
}
document.writeln('</head><body topmargin=0  bgcolor="'+MenuColor+'">');
document.writeln('<form>');
document.writeln('<table border="0" width="100%" height=100% cellspacing="0" cellpadding="0">');
document.writeln('<tr><td colspan=2 width=100% bgcolor=#ffffff><img src=../images/space.gif height=1></td></tr>');
document.writeln('<tr>');
document.writeln('<td align="left" valign=middle><img border="0"	src="../images/logo.gif" height=22 width=160></td>');
document.writeln('<td nowrap align=right valign=middle><font color="'+MenuTextColor+'">');
// -->
</script>
</font>&nbsp;
<select size="1" onchange="j(this,0);">
<option selected>-系统设置-</option>
<option >————</option>
<option value="../tools/chkpass.asp?">更改口令</option>
<option value="../tools/menucolor.asp?">系统颜色</option>
</select>
<select size="1" onchange="j(this,1);" id=select1 name=select1>
<option selected>选择公司进入管理</option>
<option >—————</option>
<% companyid = request("companyid")
arra = split(session("username"),";")

flag = arra(1)
User = arra(2)
if companyid = "" then companyid = 0
if flag = 3 then 
	companyid = arra(0)
	elseif flag = 6 then
	companyid = arra(0)
elseif flag = 4 then
	viewid = arra(3)
elseif flag = 5 then
	viewid = arra(3)
end if
		if flag < 3 then
	       sql="select * from company where company_disabled = 0 order by company_id "
		elseif flag = 3 then
		   sql="select * from company where company_disabled = 0 and company_id = "&companyid&"  order by company_id "
		elseif flag = 6 then
		   sql="select * from company where company_disabled = 0 and company_id = "&companyid&"  order by company_id "
		
		else
			sql = "select * from company where company_disabled = 0 and company_id in (select distinct flag_companyid from flag where flag_user_id = "&viewid&")"
		end if
			set rs_guest = server.CreateObject("adodb.recordset")
						rs_guest.open sql,conn,1,1
						rs_count = rs_guest.RecordCount 
						
                if not rs_guest.eof then
                   	  rs_guest.movefirst
					  dim i 
					  i =0
					  do while not rs_guest.eof
							response.write "<option value=""tree.asp?id="&rs_guest("company_id")&""">"&rs_guest("company_name")&"</option>"+chr(13)+chr(10)
						if i = 0 and companyid = 0 then companyid = rs_guest("company_id")
						i = i +1
						 rs_guest.movenext
    		          loop          
                 else
                         'response.write "<option  value='0'>没有公司</option>"+chr(13)+chr(10)
                 end if
                rs_guest.close
                set rs_guest = nothing
                call closedatabase          
				response.write "  </select>"
%>
</td>
  </tr>
<tr><td colspan=2 width=100% bgcolor=#000000><img src=../images/space.gif height=1></td></tr>
<tr><td colspan=2 width=100% bgcolor=#ffffff><img src=../images/space.gif height=1></td></tr>
<tr><td colspan=2 width=100%><img src=../images/space.gif height=1></td></tr>
<!--<tr><td colspan=2 width=100% bgcolor=#444444><img src=../images/space.gif height=2></td></tr>-->
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -