<!--#include file="menu.asp" -->
<%if request("action")="oedit" then%>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<form method="POST" action="mana_save.asp?action=oedit" target="_self">
  <tr>
    <td height=30 align="center">广告位类型名称： <input type="text" name="pricename" size="20" maxlength="50" value='<%=request("price")%>'>
<input type="hidden" name="ID" value='<%=request("ID")%>'>
<input type="submit" value=" 修 改 " name="cmdok">
&nbsp;
<input type="reset" value=" 复 原 " name="cmdcancel">
&nbsp;
<input type="button" name="ok" value=" 放 弃 " onClick="javascript:window.open('mana.asp','_self')"></td>
  </tr>
</form>
</table>
<%elseif request("action")="odel" then
ID = Request("ID")
price=request("price")%>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<form action="mana_save.asp?action=odel" method=post target="_self">
<input type="hidden" name="price" value="<%=price%>">  <tr>
    <td height=30 align="center">删除广告位种类：[ <font color="#FF0000"><%=price%></font> ]？（此操作将一起删除相应的所有广告设置！并且删除后将无法恢复！）
	<input type=submit value="  是  " name="alert_button">
&nbsp;&nbsp;
<input type=button value="  否  " onClick="javascript:window.open('mana.asp','_self')"></td>
  </tr>
</form>
</table>
<%elseif request("action")="tedit" then%>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<%set adsrs1=server.createobject("adodb.recordset")
adssql1="select * from dlxf_place where dlxf_placeid="& request("ID") &""
adsrs1.Open adssql1,conn,1,1%>
<form method="POST" action="mana_save.asp?action=tedit"  target="_self">
  <tr>
    <td height=30 align=center>广告位置名称： <input type="text" name="placename" size="20" maxlength="20" Class="text" value="<%=adsrs1("dlxf_placename")%>">　尺寸<input type="text" name="cc" size="10" maxlength="20" Class="text" value="<%=adsrs1("dlxf_cc")%>">　编号： <input type="text" name="place" size="3" maxlength="20" Class="text" value="<%=adsrs1("dlxf_place")%>">
　价格： <input type="text" name="jg" size="6" maxlength="20" Class="text" value="<%=adsrs1("dlxf_jg")%>">元/
<select size="1" name="jgg">
<option value="年"<%if adsrs1("dlxf_jgg")="年" then%> selected<%end if%>>年</option>
<option value="月"<%if adsrs1("dlxf_jgg")="月" then%> selected<%end if%>>月</option>
<option value="天"<%if adsrs1("dlxf_jgg")="天" then%> selected<%end if%>>天</option>
</select>
<input type="hidden" name="ID" value='<%=request("ID")%>'>
<input type="submit" value=" 修 改 " name="cmdok">&nbsp;<input type="reset" value=" 复 原 " name="cmdcancel">&nbsp;<input type="button" name="ok" value=" 放 弃 " onClick="javascript:window.open('mana.asp','_self')"></td>
  </tr>
</form>
<%adsrs1.Close
set adsrs1=nothing%>
</table>
<%elseif request("action")="tdel" then%>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<form action="mana_save.asp?action=tdel" method=post  target="_self">
<input type="hidden" name="priceid" value="<%=request("priceid")%>">
<input type="hidden" name="place" value="<%=request("place")%>">
<input type="hidden" name="id" value="<%=request("id")%>">
  <tr>
    <td height=30 align="center">删除广告位：[<font color="#FF0000"> <%=request("place")%> </font>]？（此操作将一起删除相应的所有广告设置！并且删除后将无法恢复！）
	<input type=submit value="  是  ">
&nbsp;&nbsp;
<input type=button value="  否  " onClick="javascript:window.open('mana.asp','_self')"></td>
  </tr>
</form>
</table>
<%elseif request("action")="code" then%>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height=30 align="center"><input type="text" size="70" value="<script language=javascript src=ads.asp?priceid=<%=request("priceid")%>&place=<%=request("place")%>></script>"><br><font color=red>请注意文件目录，请将此代码插入到相应位置。</font></td>
  </tr>
</table>
<%end if%>
<!--========================================================================-->
<br>
<table width="95%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor=#999999>
  <tr align="center" bgcolor=#ffffff>
    <td width=30% height=22><strong>广告种类管理</strong></td>
    <td width=70%><strong>广告位管理</strong></td>
  </tr>
  <tr align="center" bgcolor=#ffffff>
<form method="post" action="mana_save.asp?action=addone" name="price" target="_self">
	<td height=25><input class=text type="text" name="price" size="20" maxlength="50">
<input type="submit" name="Submit3" value="添加"></td>
</form>

<form method="post" action="mana_save.asp?action=tadd" name="type"  target="_self">
    <td>
<%set adsrs=server.createobject("adodb.recordset")
adssql="select * from dlxf_price order by dlxf_priceID desc"
adsrs.Open adssql,conn,1,1%>在 
<select size="1" name="price" style="font-size: 9pt">
<%if adsrs.EOF then %>
<option>暂无大类</option>
<%else
while not adsrs.EOF%>
<option value="<%=adsrs("dlxf_price")%>"><%=trim(adsrs("dlxf_price"))%></option>
<%adsrs.MoveNext
wend
end if
adsrs.Close
set adsrs=nothing%>
</select>
<input class=text type="text" name="placename" size="15" value="广告位名称">
<input class=text type="text" name="cc" size="10" value="尺寸(宽*高)">
编号：<input class=text type="text" name="place" size="2">
价格：<input class=text type="text" name="jg" size="6">元/
<select size="1" name="jgg">
<option value="年">年</option>
<option value="月" selected>月</option>
<option value="天">天</option>
</select>
<input type="submit" name="Submit3" value="添加">
	</td>
</form>
  </tr>
  <tr bgcolor=#ffffff>
    <td valign=top>
<!--====================-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#ffffff>
  <tr bgcolor=#6C90D1 align=center>
    <td width="15%" height=20><strong>序号</strong></td>
    <td width="56%"><strong>广告位种类名称</strong></td>
    <td width="29%"><strong>操作</strong></td>
  </tr>
<%set adsrs=server.createobject("adodb.recordset")
adssql ="SELECT * From dlxf_price order by dlxf_priceID"
adsrs.open adssql,conn,1,1		
do while not adsrs.eof%>
  <tr bgcolor=#D6DFF7 align=center>
    <td height=20><%=adsrs("dlxf_priceID")%></td>
    <td><a href=mana.asp?priceid=<%=adsrs("dlxf_priceid")%>&action=priceid><font color=#000000><%=adsrs("dlxf_price")%></font></a></td>
    <td><a href="mana.asp?ID=<%=adsrs("dlxf_priceID")%>&price=<%=adsrs("dlxf_price")%>&action=oedit" style="text-decoration: none">编辑</a> 
      <a href="mana.asp?ID=<%=adsrs("dlxf_priceID")%>&price=<%=adsrs("dlxf_price")%>&action=odel" style="text-decoration: none">删除</a></td>
  </tr>
<%adsrs.MoveNext
Loop
adsrs.close%>
</table>
<!--====================-->
	</td>
    <td valign=top>
<!--====================-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#ffffff>
  <tr bgcolor=#6C90D1 align=center>
    <td width="6%" height=20><strong>代码</strong></td>
    <td width="15%"><strong>广告种类</strong></td>
    <td width="30%"><strong>广告位置</strong></td>
    <td width="3%"></td>
    <td width="15%"><strong>广告尺寸</strong></td>
    <td width="7%"><strong>编号</strong></td>
    <td width="12%"><strong>价格</strong></td>
    <td width="12%"><strong>操作</strong></td>
  </tr>
<%
set adsrs=server.createobject("adodb.recordset")
if request("action")="priceid" then
adssql ="SELECT  * From dlxf_place where dlxf_priceid="&request("priceid")&" order by dlxf_placeID"
else
adssql ="SELECT  * From dlxf_place order by dlxf_placeID"
end if
adsrs.open adssql,conn,1,1		
do while not adsrs.eof%>
<%set adsrs1=server.createobject("adodb.recordset")
adssql1="select * from dlxf_ads where dlxf_place="&adsrs("dlxf_place")&" and dlxf_priceid="&adsrs("dlxf_priceid")&" and dlxf_act=1 order by dlxf_id desc"
adsrs1.open adssql1,conn,1,1
sum=adsrs1.recordcount
adsrs1.close
if sum>0 then
sum=sum
color="efefef"
else
sum="<strong>×</strong>"
color="ffff00"
end if

%>
  <tr bgcolor=<%=color%> align=center>
    <td height=20><a href=mana.asp?priceid=<%=adsrs("dlxf_priceid")%>&place=<%=adsrs("dlxf_place")%>&action=code>代码</a></td>
    <td><%=adsrs("dlxf_price")%></td>
    <td><a href=view.asp?priceid=<%=adsrs("dlxf_priceid")%>&place=<%=adsrs("dlxf_place")%>&action=search><%=adsrs("dlxf_placename")%></a></td>
    <td><%=sum%></td>
    <td><%=adsrs("dlxf_cc")%></td>
    <td><%=adsrs("dlxf_place")%></td>
    <td>￥<strong><%="<font color=red>"&adsrs("dlxf_jg")&"</font>/"&adsrs("dlxf_jgg")%></strong></td>
    <td> <a href="mana.asp?ID=<%=adsrs("dlxf_placeID")%>&place=<%=adsrs("dlxf_place")%>&action=tedit" style="text-decoration: none">编辑</a> 
      <a href="mana.asp?ID=<%=adsrs("dlxf_placeID")%>&place=<%=adsrs("dlxf_place")%>&priceid=<%=adsrs("dlxf_priceid")%>&action=tdel" style="text-decoration: none">删除</a> 
    </td>
  </tr>
<%adsrs.MoveNext
Loop
adsrs.close%>
</table>
<!--====================-->
	</td>
  </tr>
</table>
<!--========================================================================-->
