<%@page import="com.yeshi.buwan.domain.ad.CommonAdPosition"%>
|
<%@page import="com.yeshi.buwan.domain.ad.CommonAdPositionAd"%>
|
<%@page import="com.yeshi.buwan.domain.web.BanquanVideoAdmin"%>
|
<%@page import="com.yeshi.buwan.domain.DetailSystem"%>
|
<%@page import="com.yeshi.buwan.domain.web.DetailSystemSelect"%>
|
<%@page import="com.yeshi.buwan.domain.web.BanquanKeyAdmin"%>
|
<%@page import="com.yeshi.buwan.domain.VideoIntersection"%>
|
<%@page import="com.yeshi.buwan.util.TimeUtil"%>
|
<%@page import="java.util.concurrent.TimeUnit"%>
|
<%@page import="com.yeshi.buwan.web.tag.PageEntity"%>
|
<%@page import="com.yeshi.buwan.util.StringUtil"%>
|
<%@page import="com.yeshi.buwan.domain.VideoInfo"%>
|
<%@page import="com.yeshi.buwan.domain.SystemInfo"%>
|
<%@ page language="java" import="java.util.*"%>
|
<%@ page contentType="text/html; charset=UTF-8"%>
|
<%@ page pageEncoding="UTF-8"%><%@ taglib prefix="page" uri="/pagelib"%>
|
<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>普通广告</title>
|
<link rel="stylesheet" href="/BuWan/css/gongyong.css" type="text/css" />
|
<link rel="stylesheet" href="/BuWan/css/sspb.css" type="text/css" />
|
<LINK rel=stylesheet href="/BuWan/js/jquery-ui-1.11.4/jquery-ui.css" />
|
<script type="text/javascript" src="/BuWan/js/jquery.min.js"></script>
|
<script type="text/javascript" src="/BuWan/js/check.js"></script>
|
<script type="text/javascript" src="/BuWan/js/jquery.js"></script>
|
<script type="text/javascript"
|
src="/BuWan/js/jquery-ui-1.11.4/jquery-ui.js"></script>
|
<script type="text/javascript">
|
$(function() {
|
var commonPositionInfo = $("#commonPositionInfo")
|
.dialog(
|
{
|
autoOpen : false,
|
modal : true,
|
height : 400,
|
width : 300,
|
buttons : {
|
"确定" : function() {
|
$
|
.ajax({
|
url : encodeURI("/BuWan/CommonAdAdminServlet?type=addCommonAdPositionAd&pid="
|
+ $("#cacheId").val()
|
+ "&ids="
|
+ $("#cacheKey").val()
|
+ "&orderby="
|
+ $("#orderby").val()
|
+ "&position="
|
+ $("#position").val()),//encodeURI
|
cache : false,
|
success : function(data) {
|
alert("添加成功");
|
commonPositionInfo
|
.dialog("close");
|
}
|
});
|
},
|
"取消" : function() {
|
commonPositionInfo.dialog("close");
|
}
|
}
|
});
|
|
$(".detailsystemcheck")
|
.click(
|
function() {
|
if ($(this).is(":checked"))//添加
|
{
|
$("#cacheKey").val($(this).attr("key"));
|
$("#cacheId").val($(this).attr("id"));
|
commonPositionInfo.dialog("open");
|
} else//删除
|
{
|
|
$
|
.ajax({
|
url : encodeURI("/BuWan/CommonAdAdminServlet?type=deleteCommonAdPositionAd&pid="
|
+ $(this).attr("id")
|
+ "&ids="
|
+ $(this).attr("key")),//encodeURI
|
cache : false,
|
success : function(data) {
|
alert("删除成功");
|
}
|
});
|
}
|
});
|
|
$("#deleteChecked").click(function() {
|
var keys = "";
|
for (var i = 0; i < $(".movedata").length; i++) {
|
var ds = $(".movedata")[i];
|
if (ds.checked) {
|
keys += ds.getAttribute("value") + ",";
|
}
|
}
|
if (keys.length > 0) {
|
if (confirm("是否真的要删除?") == true)
|
window.location = "deleteCommonAdList.action?urls=" + keys;
|
}
|
|
});
|
|
});
|
</script>
|
|
<script type="text/javascript">
|
function p_del() {
|
var msg = "您真的确定要删除吗?";
|
if (confirm(msg) == true) {
|
return true;
|
} else {
|
return false;
|
}
|
}
|
|
function changeShow(id) {
|
var u = "/BuWan/VideoServlet?type=changeVideoShow&id=" + id;
|
$.ajax({
|
url : u,
|
cache : false,
|
success : function(data) {
|
alert("修改成功");
|
}
|
});
|
}
|
</script>
|
<!-- 输入框 -->
|
|
<script type="text/javascript">
|
function searchSubmit() {
|
window.location = "commonAdList.action?key=" + $("#key").val()
|
+ "&pid=" + $("#pid").val();
|
}
|
</script>
|
|
|
|
|
</head>
|
<%
|
List<CommonAdPositionAd> list = (List<CommonAdPositionAd>) request.getAttribute("commonAdAdminList");
|
PageEntity pageEntity = (PageEntity) request.getAttribute("pageEntity");
|
List<CommonAdPosition> positionList = (List<CommonAdPosition>) request.getAttribute("positionList");
|
if (pageEntity == null)//设置默认值
|
{
|
pageEntity = new PageEntity();
|
pageEntity.setPageIndex(1);
|
pageEntity.setPageSize(20);
|
pageEntity.setParams(null);
|
pageEntity.setTotalCount(100);
|
}
|
%>
|
|
<body>
|
<div id="commonPositionInfo" style="display: none;">
|
<div style="display: block;">
|
排序值:<input type="text" id="orderby" value="0">
|
</div>
|
<div style="display: block;">
|
插入位置:<input type="text" id="position" value="0">
|
</div>
|
</div>
|
|
<input type="hidden" id="cacheKey">
|
<input type="hidden" id="cacheId">
|
|
|
|
<div class="div_bj">
|
|
<div class="div_ban">用户Banner</div>
|
<div class="div_rdtg"></div>
|
|
<div class="qxsc">
|
<div class="ck" style="float: left;">
|
|
|
<select id="pid" name="pid" style="width:300px;">
|
<%
|
for (CommonAdPosition cap : positionList) {
|
%>
|
<option value="<%=cap.getId()%>"
|
<%=cap.getId().equalsIgnoreCase(pageEntity.getParams().get("pid")) ? "selected='selected'" : ""%>><%=cap.getName()%></option>
|
<%
|
}
|
%>
|
</select>
|
</div>
|
<div class="sc_1" style="float: left; margin-top: 0px;">
|
<input type="text" name="key" maxlength="10"
|
style="width: 150px; height: 37px; margin-left: 50px; float: left; margin-top: 20px;"
|
class="ck_1" id="key" /><img src="/BuWan/img/fadajing.png"
|
width="52" height="43" onclick="searchSubmit()">
|
</div>
|
<div>
|
<a href="getCommonAdPosition.action"> <input type="button"
|
value="添加首页分类 +" class="but_tj" />
|
</a>
|
</div>
|
</div>
|
|
<div class="div_cont">
|
<div class="div_cont01">
|
<ul>
|
<li class="xz">选择</li>
|
<li class="sx">编号</li>
|
<li class="mc">图片</li>
|
<li class="ap" style="width: 400px; margin-left: 0%">广告位名称</li>
|
<li class="" style="margin-left: 2%">创建时间</li>
|
<li class="" style="margin-left: 5%">删除</li>
|
<li class="" style="margin-left: 6%">编辑</li>
|
</ul>
|
</div>
|
|
<%
|
for (CommonAdPositionAd bv : list) {
|
%>
|
<div class="div_tab">
|
<table>
|
<tr>
|
<td><input type="checkbox" value="<%=bv.getAd().getId()%>"
|
class="td_ck movedata" name="movedata" /></td>
|
<td class="sx_00"><div class="div_s0"><%=bv.getAd().getId()%></div>
|
</td>
|
<td><div class="div_td1">
|
<img alt=""
|
src="<%=StringUtil.getAbsoluteUrl(request, bv.getAd().getPicture())%>"
|
style="width: 200px;">
|
</div></td>
|
<td>
|
<td><div class="div_td1">
|
<%=StringUtil.getString(bv.getAd().getBeizhu())%>
|
</div></td>
|
<td>
|
<div class="div_td0">
|
<div class="div_te">
|
|
<ul>
|
<%
|
for (CommonAdPosition ps : positionList) {
|
boolean ch = false;
|
for (CommonAdPosition ca : bv.getCommonAdPositionList()) {
|
if (ca.getId().equalsIgnoreCase(ps.getId())) {
|
ch = true;
|
break;
|
}
|
}
|
%>
|
<li><input class="detailsystemcheck"
|
key="<%=bv.getAd().getId()%>" id="<%=ps.getId()%>"
|
type="checkbox" <%=ch ? "checked" : ""%> /><%=ps.getName() + ("(" + (ps.getPlatform() == 1 ? "A" : "I") + ")")%></li>
|
|
<%
|
}
|
%>
|
</ul>
|
</div>
|
</div>
|
</td>
|
|
<td><%=TimeUtil.getAllTime(Long.parseLong(
|
(StringUtil.isNullOrEmpty(bv.getAd().getCreatetime())) ? "0" : bv.getAd().getCreatetime()))%></td>
|
<td><a key="<%=bv.getAd().getId()%>"
|
href="deleteCommonAd.action?id=<%=bv.getAd().getId()%>"
|
onclick="p_del()"><img src="/BuWan/img/lajitong.png" /> </a></td>
|
|
<td><a key="<%=bv.getAd().getId()%>"
|
href="getCommonAd.action?id=<%=bv.getAd().getId()%>"><img
|
src="/BuWan/img/xiugai.png" /> </a></td>
|
</tr>
|
</table>
|
</div>
|
<%
|
}
|
%>
|
<div class="div_bot">
|
<div class="ck_k">
|
<input type="checkbox" class="ck_1"
|
onclick="if(this.checked==true) { checkAll('movedata'); } else { clearAll('movedata'); }" />
|
</div>
|
<div class="qx_1">全选</div>
|
<div class="sc_1_1">
|
<input type="button" id="deleteChecked" value="删除" class="sc" />
|
</div>
|
</div>
|
|
<div class="div_ym">
|
<page:page preimage="/BuWan/img/page_pre.png"
|
url="homeAdList.action"
|
totalLines="<%=pageEntity.getTotalCount()%>"
|
pagesize="<%=pageEntity.getPageSize()%>"
|
nextimage="/BuWan/img/page_next.png"
|
pagebg="/BuWan/img/page_page.png"
|
inputbg="i/BuWan/mg/page_page.png"
|
pageindex="<%=pageEntity.getPageIndex()%>"
|
gobg="/BuWan/img/page_page.img"
|
params="<%=pageEntity.getParams()%>" />
|
</div>
|
|
</div>
|
</div>
|
</body>
|
<script type="text/javascript" src="/BuWan/js/countheight.js">
|
|
</script>
|
</html>
|