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

📄 index.jsp

📁 3d商店系统!利用jsp和3d结合制作!
💻 JSP
📖 第 1 页 / 共 4 页
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ page import="com.bjsxt.shopping.category.*"%>

<%!
private List<Category> getTopCategories(List<Category> categories) {
	List<Category> topCategories = new ArrayList<Category>();
	for(int i=0; i<categories.size(); i++) {
		Category c = categories.get(i);
		if(c.getGrade() == 1) {
			topCategories.add(c);
		}
	}
	return topCategories;
}

private List<Category> getChilds(Category parent, List<Category> categories) {
	List<Category> childs = new ArrayList<Category>();
	for(int i=0; i<categories.size(); i++) {
		Category c = categories.get(i);
		if(c.getPid() == parent.getId()) {
			childs.add(c);
		}
	}
	return childs;
}

private String getChildsStr(List<Category> childs) {
	StringBuffer buf = new StringBuffer();
	for(int i=0; i<childs.size(); i++) {
		Category c = childs.get(i);
		buf.append("<a href='ShowProducts.jsp?categoryId=" + c.getId() + "'>")
		   .append(c.getName()).append("</a>")
		   .append("-");
	}
	return buf.toString();
}
 %>

<%
List<Category> categories = CategoryService.getInstance().getCategories();
List<Category> topCategories = getTopCategories(categories);
 %>
<html>
<head>
<me content="zh-cn"></me>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Frag--3d商店会员注册登录</title>
<link href="images/new.css" rel="stylesheet" type="text/css">
<script language="javascript1.2">
function js_callpage(htmlurl)
{
	var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=2,width=360,height=470');
	return false;
}
function js_callpage1(htmlurl)
{
	var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=2,width=100,height=100');
	return false;
}
</script>
<script language="JavaScript">
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x;if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function on_trview(trname,enforce)
{
	
	<%
	for(int i=0; i<topCategories.size(); i++) {
		Category c = topCategories.get(i);	
	%>
		document.all.pma_<%=c.getId()%>.style.display="none";
	<%
	}
	%>
	
	
	if (enforce=="in")
	{
		eval("document.all.pma_"+trname+".style.display=''");
		//eval("alert()");
		//ruby on rails
	}
	/*
	else
	{
		var pma_code,pma_serial;
		pma_code="";
		if (pma_code!="") /////////////二级分类默认打开层
		{
			if (pma_code=="21"){pma_serial=0;}
			if (pma_code=="5"){pma_serial=1;}
			if (pma_code=="4"){pma_serial=2;}
			if (pma_code=="2"){pma_serial=3;}
			if (pma_code=="20"){pma_serial=4;}
			if (pma_code=="22"){pma_serial=5;}
			if (pma_code=="12"){pma_serial=6;}
			if (pma_code=="3"){pma_serial=7}
			if (pma_code=="8"){pma_serial=8;}
			if (pma_code=="24"){pma_serial=9;}
			if (pma_code=="23"){pma_serial=10;}
			if (pma_code=="1"){pma_serial=11;}
			if (pma_code=="26"){pma_serial=12;}
			if (pma_serial!="")
			{
				eval("document.all.pma_"+pma_serial+".style.display=''");
				eval("MM_swapImage('images"+pma_serial+"','','images/0"+pma_serial+"-2.gif',1)");
			}
		}
		
	}
	*/
}


function MM_reloadPage(init) {//reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
</script>
<script language="JavaScript">
var imgUrl=new Array();
var imgLink=new Array();
var imgTitle=new Array();
var imgPrice1=new Array();
var imgPrice2=new Array();
var adNum=0;imgUrl[1]='http://www.thinkshop.cn/pimages/br0465.gif';
	imgLink[1]='index_pi.php?productcode=BR0465';
	imgTitle[1]='贝尔金家用笔记本电脑便携袋(银色,膝上型)';
	imgPrice1[1]='价格:¥339.00';
	imgPrice2[1]='会员价格:¥319.00';imgUrl[2]='http://www.thinkshop.cn/pimages/br0461.gif';
	imgLink[2]='index_pi.php?productcode=BR0461';
	imgTitle[2]='贝尔金家用笔记本电便携袋(橙色,手提型)';
	imgPrice1[2]='价格:¥339.00';
	imgPrice2[2]='会员价格:¥319.00';imgUrl[3]='http://www.thinkshop.cn/pimages/gt1176.gif';
	imgLink[3]='index_pi.php?productcode=GT1176';
	imgTitle[3]='贝尔金家用笔记本便携内袋(银)';
	imgPrice1[3]='价格:¥369.00';
	imgPrice2[3]='会员价格:¥359.00';imgUrl[4]='http://www.thinkshop.cn/pimages/gt0873.gif';
	imgLink[4]='index_pi.php?productcode=GT0873';
	imgTitle[4]='3M 14.1 电脑防窥片';
	imgPrice1[4]='价格:¥459.00';
	imgPrice2[4]='会员价格:¥449.00';var imgPre=new Array();
var j=0;
for (i=1;i<imgUrl.length;i++) {
if( (imgUrl[i]!="") && (imgLink[i]!="") ) {
j++;
} else {
break;
}
}

function playTran(){
	if (document.all)
	imgInit.filters.revealTrans.play();
}

var key=0;

function nextAd(){
	if(adNum<j)adNum++ ;
	else adNum=1;

	if( key==0 ){
		key=1;
	} else if (document.all){
		imgInit.filters.revealTrans.Transition=10;
		imgInit.filters.revealTrans.apply();
 		playTran();
	}
	document.images.imgInit.src=imgUrl[adNum];
	document.images.imgInit.title=imgTitle[adNum];
	img_title.innerHTML='<font color=#FFFFff>'+imgTitle[adNum]+'</font>';

⌨️ 快捷键说明

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