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

📄 ct_catalog.jsp

📁 TurboCWCShop v1.6.7 is make in the Utility-LAYer Framework.
💻 JSP
📖 第 1 页 / 共 3 页
字号:
	var the_row;
	the_row = (cur_row==null || cur_row==0)?-1:cur_row;
	the_table.deleteRow(the_row);
	cur_row = null;
	cur_cell=null;
}

function add_col(the_table) {
	event.cancelBubble=true;
	var the_col,i,the_cell;
	the_col = cur_col==null?-1:(cur_col+1);
	var the_title=prompt("Please input the title: ","Untitled");
	if(the_title==null)return;
	if(the_col!=-1 && the_col<=sort_col && sort_col!=null)sort_col++;
	the_title=the_title==""?"Untitled":the_title
	clear_color();
	for(var i=0;i<the_table.rows.length;i++){
		the_cell=the_table.rows[i].insertCell(the_col);
		the_cell.innerText=i==0?the_title:("NewCol_" + the_cell.cellIndex);
	}
	read_def(the_table);
}

function del_col(the_table) {
	if(the_table.rows[0].cells.length==1) return;
	var the_col,the_cell;
	the_col = cur_col==null?(the_table.rows[0].cells.length-1):cur_col;
	if(the_col!=-1 && the_col<sort_col && sort_col!=null)sort_col--;
	else if(the_col==sort_col)sort_col=null;
	for(var i=0;i<the_table.rows.length;i++) the_table.rows[i].deleteCell(the_col);
	cur_col = null;
	cur_cell=null;
}

function res_tab(the_table){
	the_table.outerHTML=Org_con;
	init();
}

function exp_tab(the_table){
	var the_content="";
	document.onclick();
	the_content=the_table.outerHTML;
	the_content=the_content.replace(/ style=\"[^\"]*\"/g,"");
	the_content=the_content.replace(/ mode=\"(false|true)"/g,"");
	the_content=the_content.replace(/ oBgc=\"[\w#\d]*\"/g,"");
	the_content=the_content.replace(/ oFc=\"[\w#\d]*\"/g,"");
	the_content=the_content.replace(/<DIV contentEditable=false>([^<]*)<\/DIV>/ig,"$1");
	the_content="<style>table{font-size: 9pt;word-break:break-all;cursor: default;BORDER: black 1px solid;background-color:#eeeecc;border-collapse:collapse;border-Color:#999999;align:center;}</style>\n"+the_content;
	var newwin=window.open("about:blank","_blank","");
	newwin.document.open();
	newwin.document.write(the_content);
	newwin.document.close();
	newwin=null;
}

function addSon(parentid)
{
	document.temp_form.action = "add_catalog.jsp";
	document.temp_form.backurl.value = "<%=StringUtil.getCurrentURL(request)%>";
	document.temp_form.parentid.value = parentid;
	document.temp_form.submit();
}

function modC(id)
{
	document.temp_form.action = "mod_catalog.jsp";
	document.temp_form.backurl.value = "<%=StringUtil.getCurrentURL(request)%>";
	document.temp_form.id.value = id;
	document.temp_form.submit();
}

function delC(id)
{
	if (confirm("确认操作吗?"))
	{
		document.temp_form.action = "<%=ConfigBean.getStringValue("systenFolder")%>appController/delCatalog";
		document.temp_form.id.value = id;
		document.temp_form.submit();
	}
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td bgcolor="#FFFFFF"> <TABLE width=100% height="47" border=0 cellPadding=0 cellSpacing=0   class="thetable" id="PowerTable">
        <form name="csort_form" method="post">
          <input type="hidden" name="id">
		  <thead>
          <TR align=middle> 
              <TD width="8%" height="22" align="center">货架编号</TD>
            <TD width="92%" align="left">货架名称</TD>
          </TR>
		  </thead>
          <%
String lineBg;
DBRow catalog[] = catalogMgr.getCatalogByParentId(0l,null);
for ( int i=0; i<catalog.length; i++ )
{
		if ( i%2==0 )
		{
			lineBg = "#ffffff";
		}
		else
		{
			lineBg = "#eeeeee";
		}
%>
          <TR> 
            <TD height="23" align="center" bgcolor="<%=lineBg%>"> 
              <%=catalog[i].getString("id")%>
            </TD>
            <TD bgcolor="<%=lineBg%>"> 
              <%=catalog[i].getString("title")%>
            </TD>
          </TR>
          <%
}
%>
        </form>
      </TABLE>
      <table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr> 
          <td><input name="button" type=button id=move    onclick=Move_up(Main_Tab) value= 上移 > 
            <input name="button" type=button id=move  onclick=Move_down(Main_Tab) value= 下移 > 
            <input type="button" name="Submit3" value="保存修改" onClick="updateCatalogSort(Main_Tab)"></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<form action="" method="get" name="temp_form">
<input type="hidden" name="id">
<input type="hidden" name="parentid">
<input type="hidden" name="backurl">
</form>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"  class="thetable">
  <form name="listForm" method="post">
    <input type="hidden" name="id">
    <input type="hidden" name="parentid">
    <input type="hidden" name="imp_color">
    <thead>
      <tr> 
        <td valign="middle">货架名称</td>
        <td valign="middle">&nbsp;</td>
        <td valign="middle">连 接</td>
        <td align="center" valign="middle">加 亮</td>
        <td align="center" valign="middle">货架编号</td>
        <td width="6%" align="center" valign="middle">访问数</td>
        <td width="7%" align="center" valign="middle">商品数量</td>
        <td width="21%" align="center" valign="middle">操 作</td>
      </tr>
    </thead>
    <tr bgcolor="cccccc"> 
      <td valign="middle" >商 城</td>
      <td valign="middle" >&nbsp;</td>
      <td valign="middle" >&nbsp;</td>
      <td width="7%" align="center" valign="middle">/</td>
      <td width="8%" align="center" valign="middle" >/</td>
      <td align="center" valign="middle">/</td>
      <td align="center" valign="middle" >/ </td>
      <td align="center" valign="middle"> <input type="button" name="Submit" value="增加子货架" onClick="addSon(0)"> 
      </td>
    </tr>
    <%
String qx;
DBRow treeRows[] = catalogMgr.getCatalogTree();
for ( int i=0; i<treeRows.length; i++ )
{
		if ( i%2==0 )
		{
			lineBg = "#ffffff";
		}
		else
		{
			lineBg = "#eeeeee";
		}
		
	if ( treeRows[i].get("parentid",0) != 0 )
	 {
	 	qx = "├ ";
	 }
	 else
	 {
	 	qx = "";
	 }
%>
    <tr onMouseOut="this.style.background='<%=lineBg%>'"onMouseOver="this.style.background='#F4E088'" bgcolor="<%=lineBg%>"> 
      <td width="17%" height="60" valign="middle"> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 
        <%=Tree.makeSpace("&nbsp;&nbsp;&nbsp;",treeRows[i].get("level",0))%>
        <%=qx%>
        <%=treeRows[i].getString("title")%></a> 
      </td>
      <td width="8%" align="center" valign="middle">
<%
if ( !treeRows[i].getString("img").equals("") )
{
%>
	  <a href="<%=ConfigBean.getStringValue("systenFolder")%>.<%=ConfigBean.getStringValue("upload_pro_img")+treeRows[i].getString("img")%>" target="_blank"><img src="<%=ConfigBean.getStringValue("systenFolder")%>.<%=ConfigBean.getStringValue("upload_pro_img")+treeRows[i].getString("img")%>" width="50" height="50" border="0" alt="<%=treeRows[i].getString("description")%>"></a>
<%
}
%>	  
	  </td>
      <td width="26%" valign="middle"><a href="<%=treeRows[i].getString("link")%>" target="_blank"> 
        <%=treeRows[i].getString("link")%>
        </a></td>
      <td width="7%" align="center" valign="middle"> 
        <%
String alive_sl;
if ( treeRows[i].get("imp_color",0) == 1 )
{
	alive_sl = "checked";
}
else
{
	alive_sl = "";
}
%>
        <input type="checkbox" name="alive_x" id="alive_x" value="<%=treeRows[i].getString("id")%>" onClick="impColor(this)" <%=alive_sl%>> 
      </td>
      <td width="8%" align="center" valign="middle"> 
        <%=treeRows[i].getString("id")%>
      </td>
      <td align="center" valign="middle"> 
        <%=treeRows[i].getString("click")%>
      </td>
      <td align="center" valign="middle"> 
        <%=productMgr.getNewProductByCid(treeRows[i].get("id",0l),null).length%>
      </td>
      <td align="center" valign="middle"> <input type="button" name="Submit2s" value="删除" onClick="delC(<%=treeRows[i].getString("id")%>)"> 
        <input type="button" name="Submit2" value="修改" onClick="modC(<%=treeRows[i].getString("id")%>)"> 
        <input type="button" name="Submit22" value="增加子货架" onClick="addSon(<%=treeRows[i].getString("id")%>)"></td>
    </tr>
    <%	
}
%>
  </form>
</table>
<br>
</body>
</html>

⌨️ 快捷键说明

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