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

📄 mod.jsp

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

session.setAttribute("ad_upload_img",detail.getString("path"));
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script src="<%=ConfigBean.getStringValue("systenFolder")%>alert_js.jsp"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function check(theForm)
{
	if ( !theForm.type[0].checked&&!theForm.type[1].checked )
	{
		alert("请选择广告类型");
		return(false);
	}
	
	return(true);
}

function showBMsg()
{
	if ( !check(document.form1) )
	{
	}
	else if ( document.form1.width.value==0||document.form1.height.value==0 )
	{
		alert("请填写高度和宽度");
	}
	else
	{
		var result = window.showModalDialog('upload_b_if.jsp',window,"dialogWidth:20;dialogHeight:10;status:no;help:no");
	
		if ( !(typeof result == 'undefined') )
		{
			document.form1.path.value = result;
			//document.getElementById('img_s').src = "<%=ConfigBean.getStringValue("systenFolder")%>.<%=ConfigBean.getStringValue("upload_pro_img")%>"+result;
			if ( document.form1.type[0].checked )
			{
				flag=1;
			}
			else
			{
				flag=2;
			}
			document.getElementById("showadv").innerHTML = printAdv(flag,document.form1.width.value,document.form1.height.value,result);
		}
	}
}

function printAdv(flag,width,height,path)
{
		path = "<%=ConfigBean.getStringValue("systenFolder")%>.<%=ConfigBean.getStringValue("upload_pro_img")%>"+path;
		var flash = "";
		var img = "";
		
		flash += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'>";
		flash += "<param name='movie' value='"+path+"'>";
		flash += "<param name='quality' value='high'>";
		flash += "<embed src='"+path+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed></object>";
		
		img += "<img width="+width+" height="+height+" src="+path+" border=0>";
		
		if ( flag==1 )
		{
			return(img);
		}
		else
		{
			return(flash);
		}
}

function init()
{
	document.getElementById("showadv").innerHTML = printAdv(<%=detail.getString("type")%>,<%=detail.getString("width")%>,<%=detail.getString("height")%>,"<%=detail.getString("path")%>");
}

function MM_openBrWindowAdv(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function preViewURL(url)
{
	MM_openBrWindowAdv(url,'','');
}

function getPosterURL()
{
	document.getElementById("link").value = "<%=systemConfig.getStringConfigValue("url")+ConfigBean.getStringValue("systenFolder")%>product/poster-"+document.getElementById("poster_template").value+".html";
}
//-->
</script>
<link href="../comm.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {color: #0066FF}
-->
</style>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="init()">
<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>
<br>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <form action="<%=ConfigBean.getStringValue("systenFolder")%>appController/modAdv" method="post" onSubmit="return check(this);" name="form1">
    <input type="hidden" name="advid" value="<%=advid%>">
    <input type="hidden" name="path" value="<%=detail.getString("path")%>">
    <input type="hidden" name="backurl" value="<%=StringUtil.getString(request,"backurl")%>">
    <tr>
      <td>标题</td>
      <td><input name="title" type="text" id="title" size="60" value="<%=detail.getString("title")%>"></td>
    </tr>
    <tr>
      <td width="12%">广告类型</td>
      <td width="88%"><input name="type" type="radio" value="1" <%=detail.get("type",0)==1?"checked":""%>>
        图片
        <input type="radio" name="type" value="2" <%=detail.get("type",0)==2?"checked":""%>>
        FLASH</td>
    </tr>
    <tr>
      <td>宽 度</td>
      <td><input name="width" type="text" id="width3" size="10" value="<%=detail.get("width",0)%>">
        像素 (首页广告最大宽度778,对联广告最大宽度为100)</td>
    </tr>
    <tr>
      <td>高 度</td>
      <td><input name="height" type="text" id="height2" size="10" value="<%=detail.get("height",0)%>">
        像素 </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input name="Submit" type="button" class="short-button" onClick="showBMsg();" value=" 选择上传 "></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><span id="showadv"></span></td>
    </tr>
    <tr>
      <td>广告连接</td>
      <td><span class="STYLE1">flash广告无效</span><br>
        <input name="link" type="text" id="link" size="60" value="<%=detail.getString("link")%>">
          <label>
          <input name="Submit2" type="button" class="short-button" value="预览链接" onClick="preViewURL(document.getElementById('link').value)">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从海报 
		
			      <select name="poster_template" id="poster_template">
<%
DBRow poster[] = posterMgr.getAllPosters(null);
for (int i=0; i<poster.length; i++)
{
%>
	        <option value="<%=poster[i].getString("psid")%>"><%=poster[i].getString("topic")%></option>
<%
}
%>
          </select>
		 
        <input name="Submit3" type="button" class="short-button" value="提取链接" onClick="getPosterURL()">
        </label></td>
    </tr>
    <tr>
      <td>是否开启</td>
      <td><input type="radio" name="used" value="1" <%=detail.get("used",0)==1?"checked":""%>>
        开启
        <input type="radio" name="used" value="0" <%=detail.get("used",0)==0?"checked":""%>>
        关闭</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input name="Submit" type="submit" class="long-button" value="  保 存  ">
        &nbsp; &nbsp; 
        &nbsp;
                      <input name="Submit" type="button" class="long-button" onClick="history.back();" value="  返 回  "></td>
    </tr>
  </form>
</table>
<br>
<br>
</body>
</html>

⌨️ 快捷键说明

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