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

📄 kjavaupdate.jsp

📁 一个免费wap站
💻 JSP
字号:
<?xml version="1.0" encoding="gb2312" ?>
<%@ page language="java" contentType="text/html; charset=gb2312"
    pageEncoding="gb2312"%>
<%@ page import="com.eline.wap.common.util.*"%>
<%@ page import="com.eline.wap.resource.model.*"%>
<%@ page import="com.eline.wap.resource.client.*"%>
<%@ page import="com.eline.wap.resource.exceptions.*"%>
<%
int indexId = StringUtils.getInt(request.getParameter("indexId"), 0);
System.out.println("kjavaUpdate.jsp?indexId=" + indexId);

KJavaHelper helper = new KJavaHelper();
KJava item = null;
try {
	item = helper.getKJava(indexId);
	if (item == null)
		throw new ResourceException("Null item? get kjava item failure!");
} catch (ResourceException e) {
	response.sendRedirect(SiteUrls.getInstance().getProperty(SiteUrls.RESOURCE_FAILURE));
	return;
}

String uploadPath = request.getContextPath()
+ AppSettings.getInstance().getProperty(AppKeys.UPLOAD_ROOT)
+ "/images/icons";

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>更新KJAVA信息</title>
<!-- link href="../../style/default.css" type="text/css" rel="stylesheet" /-->
<style type="text/css">
body, table, td, select, input,textarea { font-size: 9pt; font-family: SimSun; }
.button2w { width: 50px; }
</style>
<script language=javascript>
<!--
function fileImage_onchange () {
	var element = event.srcElement;
	var image = null;
	if (element == null)
		return;
	if (element.name == "fileImage")
		image = document.all["ImagePreview"];
	if (image != null)
		image.src = element.value;
}
function form1_onsubmit() {
	if (document.all["name"].value.length < 1) {
		window.alert("必须正确填写游戏名");
		return false;
	}
	return true;
}
function buttonCancel_onclick() {
	var dlgWnd = window;

	if (window.parent != null)
		dlgWnd = window.parent;
	dlgWnd.close();

	return true;
}
//-->
</script>
</head>
<body bottomMargin="0" bgcolor="#d4d0c8" leftMargin="0" topMargin="0" rightMargin="0">
<form name="Form1" method="post" action="<%=SiteUrls.getInstance().getProperty(SiteUrls.J2ME)%>?webAction=1" onsubmit="return form1_onsubmit()"  enctype="multipart/form-data">
	<table cellspacing="1" cellpadding="0" width="400" border="0">
		<tr>
			<td align="center">
				<table style="border-right: darkgray 1px solid; border-top: darkgray 1px solid; border-left: darkgray 1px solid; border-bottom: darkgray 1px solid"
					cellspacing="0" cellpadding="2" width="100%" border="0">
					<tr>
						<td style="border-bottom: darkgray 1px solid" colspan="2"><b>编辑KJAVA游戏资源</b></td>
					</tr>
					<tr>
						<td width="100">名称</td>
						<td><input id="name" type="text" size="25" name="name" maxlength="50" value="<%=item.getName() %>"/></td>
					</tr>
					<tr>
						<td width="100">图标上传</td>
						<td><input id="fileImage" type="file" size="35" name="fileImage" onchange="return fileImage_onchange()" /></td>
					</tr>
					<tr>
						<td width="100">状态</td>
						<td><select id="active" name="active">
								<option <%=item.isActive() ? "" : "selected"%> value="0">无效</option>
								<option value="1" <%=item.isActive() ? "selected" : ""%>>有效</option>
							</select></td>
					</tr>
					<tr>
						<td width="100">描述</td>
						<td>
							<textarea id="description" name="description" rows="5" cols="30"><%=item.getDescription() %></textarea>
						</td>
					</tr>
				</table>
				<br/>
				<table style="border-right: darkgray 1px solid; border-top: darkgray 1px solid; border-left: darkgray 1px solid; border-bottom: darkgray 1px solid"
					cellspacing="0" cellpadding="2" width="100%" border="0">
					<tr>
						<td style="border-bottom: darkgray 1px solid" colspan="2"><b>LOG预览</b></td>
					</tr>
					<tr>
						<td colspan="2">
						<%
						String imagePath = item.getLogoFile();
						if (imagePath != null && imagePath.length() > 0) {
							imagePath = uploadPath + imagePath;
						} else
							imagePath = null;
						%>
							<div style="overflow: auto; width: 396px; height: 50px;"><img alt="log图片" id="ImagePreview" <%=imagePath != null ? ("src=\"" + imagePath + "\"") : ""%> /></div>
						</td>
					</tr>
				</table>
				<br/>
				<input class="button2w" id="buttonSubmit" type="submit" value="确定" name="buttonSubmit" /><input class="button2w" id="buttonCancel" type="button" value="放弃" name="buttonCancel" onclick="return buttonCancel_onclick()" />
				<input type="hidden" name="indexId" value="<%=indexId %>" />
			</td>
		</tr>
	</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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