?? mod.jsp
字號:
<%@ page contentType="text/html;charset=utf-8"%>
<%@ include file="../../include.jsp"%>
<%
long advid = StringUtil.getLong(request,"advid");
DBRow detail = productMgr.getDetailAdv(advid);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>無標題文檔</title>
<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_adv")%>"+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")%>");
}
//-->
</script>
<link href="../../style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="init()">
<br>
<table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" 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 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> </td>
<td><input type="button" name="Submit" value=" 選擇上傳 " onClick="showBMsg();"></td>
</tr>
<tr>
<td> </td>
<td><span id="showadv"></span></td>
</tr>
<tr>
<td>廣告連接</td>
<td><input name="link" type="text" id="link" size="60" value="<%=detail.getString("link")%>">
(flash廣告無效)</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> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value=" 保 存 ">
<input type="button" name="Submit" value=" 返 回 " onClick="history.back();"></td>
</tr>
</form>
</table></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -