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

📄 set_commend_catalog.jsp

📁 很好的,网上商城在线购物网站系统,电子商务自助建站管理系统。适合电脑,手机,数码,化妆品,服装,运动鞋,首饰,母婴,成人用品,书籍,汽车,办公用品,音像制品的网店
💻 JSP
字号:
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../../include.jsp"%> 
<%
long pcid = StringUtil.getLong(request,"id",0);
long cid = StringUtil.getLong(request,"cid",0);
String key = StringUtil.getString(request,"key");
String backurl = StringUtil.getString(request,"backurl");

int commendCount = 5;
DBRow proGroup[] = productMgr.getNewProductByPgTitleByCount(String.valueOf(pcid),commendCount);

PageCtrl pc = new PageCtrl();
pc.setPageNo(StringUtil.getInt(request,"p"));
pc.setPageSize(15);

DBRow rows[] = null;

if (cid>0)
{
	rows = productMgr.getNewProductByCid(cid,pc);
}
else if (!key.equals(""))
{
	rows = productMgr.getProductsByKeyPcid(key,pcid,pc);
}
else
{
	rows = productMgr.getNewProductByPCID(pcid,pc);
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<link href="../comm.css" rel="stylesheet" type="text/css">
<script src="<%=ConfigBean.getStringValue("systenFolder")%>alert_js.jsp"></script>
<script language="javascript" src="../../common.js"></script>
<script language="javascript">
<!--
function del(pgid)
{
	if (confirm("确认操作吗?"))
	{
		document.temp_form.action = "<%=ConfigBean.getStringValue("systenFolder")%>appController/delPGroup";
		document.temp_form.pgid.value = pgid;
		document.temp_form.submit();
	}
}

function check()
{
	return(confirm("确认推荐首页货架商品?"));
}

function delIndexCatalogCommend(pid)
{
	if (confirm("确认从首页货架推荐删除?"))
	{
		document.commendListForm.pid.value=pid;
		document.commendListForm.submit();
	}
}
//-->
</script>
<style type="text/css">
<!--
.STYLE1 {
	font-size: 14px;
	font-weight: bold;
}
.commend_line
{
	border-bottom:1px solid #cccccc;
}
.STYLE2 {
	color: #FF0000;
	font-weight: bold;
}
form
{
	padding:0px;
	margin:0px;
}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td class="page-title"><img src="../imgs/page_title.gif" alt="title" width="17" height="12" align="absmiddle">&nbsp;&nbsp; 货架管理 »   设置首页货架推荐商品</td>
  </tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td>共有 <span class="STYLE2"><%=commendCount%></span> 个推荐位 </td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  <form name="commendListForm" method="post" action="<%=ConfigBean.getStringValue("systenFolder")%>appController/delIndexCatalogCommend">
    <input type="hidden" name="pid">
	<input type="hidden" name="pgTitle" value="<%=pcid%>">
  <tr> 
<%
for (int i=0; i<proGroup.length; i++)
{
%>
    <td width="18%" align="center" valign="middle" bgcolor="#dddddd" class="STYLE1"><%=(i+1)%></td>
<%
}
%>
  </tr>
  <tr>
<%
for (int i=0; i<proGroup.length; i++)
{
%>
    <td height="120" align="center" valign="middle"><img  src="<%=ConfigBean.getStringValue("systenFolder")%>.<%=ConfigBean.getStringValue("upload_pro_img")+proGroup[i].getString("img_s")%>" width="100" height="100"  border="0"></td>
<%
}
%>
  </tr>
  <tr>
<%
for (int i=0; i<proGroup.length; i++)
{
%>
    <td height="50" align="center" valign="middle" ><%=proGroup[i].getString("name")%></td>
<%
}
%>
  </tr>
  <tr>
<%
for (int i=0; i<proGroup.length; i++)
{
%>
    <td height="40" align="center" valign="middle" class="commend_line"><input name="Submit26" type="button" class="short-button" value="删 除" onClick="delIndexCatalogCommend(<%=proGroup[i].getString("pid")%>)"></td>
<%
}
%>
  </tr>
  </form>
</table>
<br>
<br>
<br>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td width="36%" height="40"> 
	<form name="form2" method="post" action="set_commend_catalog.jsp">
	搜索商品
	<input type="hidden" name="id" value="<%=pcid%>">
	<input type="hidden" name="backurl" value="<%=StringUtil.getCurrentURL()%>?id=<%=pcid%>">
      <input type="text" name="key">
      <input name="Submit242" type="button" class="short-button" value="搜 索"> 
	  </form>
	  </td>
    <td width="64%" align="left" valign="middle">
	<form name="form1" method="get" action="set_commend_catalog.jsp">
	<input type="hidden" name="id" value="<%=pcid%>">
	 <select name="cid" id="select">
          <%
DBRow catalog[] = catalogMgr.getCatalogByParentId(pcid,null);

for ( int i=0; i<catalog.length; i++ )
{
%>
          <option value="<%=catalog[i].getString("id")%>" <%=catalog[i].get("id",0l)==StringUtil.getLong(request,"cid")?"selected":""%>>          <%=catalog[i].getString("title")%>
          </option>
          <%
}
%>
      </select>
    <input name="Submit4" type="submit" class="short-button" value="  查 询  ">
    
    </form></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0"  class="thetable">
      <tr> 
        <td width="19%" align="center" valign="middle" class="right-title">商品图片</td>
        <td width="31%" align="left" valign="middle" class="right-title">商品名称</td>
        <td width="16%" align="center" valign="middle" class="right-title">所属分类</td>
        <td width="16%" align="center" valign="middle" class="right-title">商品价格</td>
        <td width="18%" align="center" valign="middle" class="right-title">操 作</td>
      </tr>

    <%
String className;

for ( int i=0; i<rows.length; i++ )
{
	if ( i%2==0 )
	{
		className = "row-line1";
	}
	else
	{
		className = "row-line2";
	}
%>
  <form name="listForm<%=i%>" method="post" action="<%=ConfigBean.getStringValue("systenFolder")%>appController/indexCatalogCommend" onSubmit="return check()">
    <input type="hidden" name="pid" value="<%=rows[i].getString("pid")%>">
	<input type="hidden" name="pgTitle" value="<%=pcid%>">
	<input type="hidden" name="backurl" value="<%=backurl%>">
    <tr > 
      <td width="19%" height="70" align="center" valign="middle"  class="<%=className%>"  >
	  <img  src="<%=ConfigBean.getStringValue("systenFolder")%>.<%=ConfigBean.getStringValue("upload_pro_img")+rows[i].getString("img_s")%>" width="50" height="50" id="pro_img" border="0">	  </td>
      <td width="31%" align="left" valign="middle"  class="<%=className%>"  ><%=rows[i].getString("name")%></td>
      <td width="16%" align="center" valign="middle"  class="<%=className%>"  >
	  <%
	  if ( cid>0 )
	  {
	  	out.print(rows[i].getString("title"));
	  }
	  else
	  {
	  	out.print(rows[i].getString("stitle"));
	  }
	  %>
	  </td>
      <td width="16%" align="center" valign="middle"   class="<%=className%>"  ><%=rows[i].getString("shop_price")%></td>
      <td width="18%" align="center" valign="middle" class="<%=className%>" ><label>
        <input name="Submit" type="submit" class="short-button" value="推 荐">
      </label></td>
    </tr>
  </form>
    <%
}
%>

</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <form name="dataForm">
          <input type="hidden" name="p">
		  <input type="hidden" name="id" value="<%=pcid%>">
		  <input type="hidden" name="cid" value="<%=cid%>">
		  <input type="hidden" name="key" value="<%=key%>">
  </form>
              <tr>
          <td height="1"></td>
        </tr>
        <tr> 
          
    <td height="28" align="right" valign="middle" class="turn-page-table"> 
      <%
int pre = pc.getPageNo() - 1;
int next = pc.getPageNo() + 1;
out.println("页数:" + pc.getPageNo() + "/" + pc.getPageCount() + " &nbsp;&nbsp;总数:" + pc.getAllCount() + " &nbsp;&nbsp;");
out.println(HtmlUtil.aStyleLink("table-title","首页","javascript:go(1)",null,pc.isFirst()));
out.println(HtmlUtil.aStyleLink("table-title","上一页","javascript:go(" + pre + ")",null,pc.isFornt()));
out.println(HtmlUtil.aStyleLink("table-title","下一页","javascript:go(" + next + ")",null,pc.isNext()));
out.println(HtmlUtil.aStyleLink("table-title","末页","javascript:go(" + pc.getPageCount() + ")",null,pc.isLast()));
%>
      跳转到 
      <input name="jump_p2" type="text" id="jump_p" style="width=28px;" value="<%=StringUtil.getInt(request,"p")%>"> 
      <input name="Submit22" type="button" class="page-go" style="width:28px;padding-top:0px;" onClick="javascript:go(document.getElementById('jump_p2').value)" value="GO">
    </td>
        </tr>
</table> 
<br>
<br>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td><input name="Submit2422" type="button" class="short-button" value="返 回" onClick="history.back();"></td>
  </tr>
</table>
<br>
<br>
</body>
</html>

⌨️ 快捷键说明

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