BVB Source Codes

Pcook CMS bubble guest v3.0 SDCMS version Show sdcms_ad_group.asp Source code

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download sdcms_ad_group.asp Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code - Type:.asp
  1. <!--#include file="sdcms_check.asp"-->
  2. <%
  3. set sdcms=new Sdcms_Admin
  4. sdcms.Check_admin
  5. sdcms.Check_lever 9
  6. set sdcms=nothing
  7. select case action
  8. case "add":title="添加广告组"
  9. case "edit":title="修改广告组"
  10. case "getcode":title="调用广告组"
  11. case else:stype=1:title="广告组管理"
  12. end select
  13. sd_table="sd_ad_group"
  14. sdcms_head
  15. %>
  16.  
  17. <div class="sdcms_notice"><span>管理操作:</span><a href="?action=add">添加广告组</a> ┊ <a href="sdcms_ad_group.asp">广告组管理</a> ┊ <a href="sdcms_ad.asp">广告管理</a></div>
  18. <br>
  19. <ul id="sdcms_sub_title">
  20.         <li class="sub"><a href="javascript:void(0)" onClick="selectTag('tagContent0',this)"><%=title%></a></li>
  21. </ul>
  22. <div id="sdcms_right_b">
  23. <%
  24. select case action
  25. case "add":add
  26. case "edit":edit
  27. case "save":save
  28. case "del":del
  29. case "getcode":getcode
  30. case else:main
  31. end select
  32. closedb
  33. sub main
  34. %>
  35. <table border="0" align="center" cellpadding="3" cellspacing="1" class="table_b">
  36.     <tr>
  37.       <td width="50" class="title_bg">ID</td>
  38.       <td class="title_bg">名称</td>
  39.       <td class="title_bg">日期</td>
  40.       <td class="title_bg">管理</td>
  41.     </tr>
  42.         <%
  43.         page=request.querystring("page")
  44.         if page="" or not isnumeric(page) then
  45.         page=1
  46.         end if
  47.         pages = 20
  48.         set rs=server.CreateObject("adodb.recordset")
  49.         sql="select id,title,adddate from "&sd_table&" order by id desc"
  50.         rs.open sql,conn,1,1   
  51.         if rs.eof then
  52.         echo "<tr><td colspan=4 class=tdbg>没有广告组,<a href=?action=add>现在添加</a></td></tr>"
  53.         else
  54.         rs.pagesize = pages
  55.         maxpagecount=rs.pagecount
  56.         rs.absolutepage = page
  57.         rcount1=0
  58.         pagestart=page-5
  59.         pageend=page+5
  60.         if pagestart<1 then
  61.         pagestart=1
  62.         end if
  63.         if pageend>maxpagecount then
  64.         pageend=maxpagecount
  65.         end if
  66.         rcount=rs.RecordCount
  67.         do while not rs.eof and rcount1 <rs.pagesize  
  68.         %>
  69.     <tr onmouseover=this.bgColor='#EBFFDC'; onmouseout=this.bgColor='#ffffff';  bgcolor='#ffffff'>
  70.          <%for i=0 to 2%>
  71.       <td <%if i<>1 then%>align="center"<%end if%>><%=rs(i)%></td>
  72.       <%next%>
  73.       <td align="center"><input type="button"  class="bnt01" onClick="location.href='?action=getcode&id=<%=rs(0)%>';" value="调用" > <input type="button" onClick="location.href='?action=edit&id=<%=rs(0)%>';" class="bnt01" value="编辑"> <input type="button"  onClick="if(confirm('真的要删除?不可恢复!'))location.href='?action=del&id=<%=rs(0)%>';return false;" class="bnt01" value="删除"></td>
  74.     </tr>
  75.         <%
  76.         rs.movenext
  77.         rcount1=rcount1+1
  78.         loop
  79.         end if
  80.         if rcount>0 then      
  81.         %>
  82.         <tr>
  83.       <td colspan="6" class="tdbg" >
  84.           <span class="right">转到第
  85.                  <select onChange="location.href='?page='+this.value+''">
  86.                  <%for i=1 to maxpagecount%>
  87.                  <option value="<%=i%>" <%if clng(page)=clng(i) then echo "selected" end if%>><%=i%></option>
  88.                  <%next%>
  89.                  </select>页</span>
  90. <%
  91. if page<>"1" then
  92. echo "<a href=?page="&page-1&">上一页</a> "
  93. else
  94. echo "上一页 "
  95. end if
  96. for i=pagestart to pageend
  97. if i=0 then
  98. i=1
  99. end if
  100. if i=clng(page) then
  101. str="<font color=red><b>"&i&"</b></font>"
  102. else
  103. str=i
  104. end if
  105. strurl="[<a href=?page="&i&">"&str&"</a>]"
  106. echo strurl
  107. next
  108. if page=maxpagecount then
  109. echo " 下一页"
  110. elseif  page<>""&maxpagecount&"" then
  111. echo " <a href=?page="&page+1&"&stype="&stype&"&classid="&classid&">下一页</a>"
  112. else
  113. echo " 下一页"
  114. end if
  115. echo " 页次:"&page&"/"&maxpagecount&" 页   每页: "&pages&" 条  总数: "&rcount&" 条"
  116. %>
  117. </td>
  118.     </tr>
  119.         <%end if%>
  120.   </table>
  121. <%
  122. end sub
  123. sub add
  124. check_info
  125. %>
  126. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  127.   <form name="add" method="post" action="?action=save&act=add" onSubmit='return checkadd()'>
  128.     <tr>
  129.       <td width="9%" align="center" class="tdbg">名 称:      </td>
  130.       <td width="91%" class="tdbg"><input name="t0" type="text" class="input" id="t0" size="40"><img id="fa" alt="方案" style="position:absolute;margin-left:120px;display:none;"></td>
  131.     </tr>
  132.     <tr class="tdbg">
  133.     <tr class="tdbg">
  134.       <td align="center">配 置:</td>
  135.       <td>长:
  136.         <input name="t1" type="text" class="input" id="t1" size="4" maxlength="3" onKeyUp="value=value.replace(/[^\d]/g,'');"    onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));">
  137.         宽:
  138.         <input name="t2" type="text" class="input" id="t2" size="4" maxlength="3" onKeyUp="value=value.replace(/[^\d]/g,'');"   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));">
  139.         标题长度:
  140.         <input name="t3" type="text" class="input" id="t3" onKeyUp="value=value.replace(/[^\d]/g,'');" size="4" maxlength="2"  onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));">
  141.         <span>为0时不显示标题</span></td>
  142.     </tr>
  143.        
  144.         <tr class="tdbg">
  145.       <td align="center">方 案:</td>
  146.       <td>
  147.       <select name="t4" onChange="javascript:document.images.fa.src=this.value;fa.style.display='block';">
  148.         <option value="../plug/ad/00.jpg">不使用方案</option>
  149.                 <%for i=1 to 2%>
  150.         <option value="../plug/ad/0<%=i%>.jpg">方案<%=i%></option>
  151.                 <%next%>
  152.       </select>
  153.       </td>
  154.     </tr>
  155.    
  156.    
  157.     <tr class="tdbg">
  158.           <td>&nbsp;</td>
  159.       <td><input name="Submit" type="submit" class="bnt" value="添 加">
  160.         <input name="Submit2" type="button" onClick="history.go(-1)" class="bnt" value="返 回"></td>
  161.     </tr>
  162.         </form>
  163.   </table>
  164. <%
  165. end sub
  166.  
  167. sub save
  168. t0=trim(request("t0"))
  169. t1=trim(request("t1"))
  170. t2=trim(request("t2"))
  171. t3=trim(request("t3"))
  172. t4=trim(request("t4"))
  173. if t3="" or not isnumeric(t3) then t3=0
  174.  
  175. set rs=server.CreateObject("adodb.recordset")
  176. sql="select title,ad_w,ad_h,ad_l,ad_p,classid,id from "&sd_table&""
  177. if act="save" then
  178.  sql=sql&" where id="&id&""
  179. end if
  180. rs.open sql,conn,1,3
  181.  
  182. if act="add" then
  183.   rs.addnew
  184. else
  185.   rs.update
  186. end if
  187. rs(0)=left(t0,50)
  188. rs(1)=left(t1,3)
  189. rs(2)=left(t2,3)
  190. rs(3)=left(t3,2)
  191. rs(4)=t4
  192. rs(5)=right(replace(t4,".jpg",""),1)
  193. rs.update
  194. id=rs(6)
  195. remove_app("ad_group"&id)
  196. response.Redirect("?")
  197. end sub
  198.  
  199. sub edit
  200. set rs=conn.execute("select id,title,ad_w,ad_h,ad_l,ad_p,classid from "&sd_table&" where id="&id&"")
  201. if rs.eof then
  202. echo "请勿非法提交参数":Died
  203. end if
  204. check_info
  205. %>
  206. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  207.   <form name="add" method="post" action="?action=save&act=save&id=<%=rs(0)%>" onSubmit='return checkadd()'>
  208.     <tr>
  209.       <td width="9%" align="center" class="tdbg">名 称:      </td>
  210.       <td width="91%" class="tdbg"><input name="t0" value="<%=rs(1)%>" type="text" class="input" id="t0" size="40"><img src="../plug/ad/0<%=rs(6)%>.jpg" id="fa" alt="方案" style="position:absolute;margin-left:120px;<%if rs(6)=0 then%>display:none;<%end if%>"></td>
  211.     </tr>
  212.     <tr class="tdbg">
  213.     <tr class="tdbg">
  214.       <td align="center">配 置:</td>
  215.       <td>长:
  216.         <input name="t1" type="text" class="input" value="<%=rs(2)%>" id="t1" size="4" maxlength="3" onKeyUp="value=value.replace(/[^\d]/g,'');"    onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));">
  217.         宽:
  218.         <input name="t2" type="text" class="input" value="<%=rs(3)%>" id="t2" size="4" maxlength="3" onKeyUp="value=value.replace(/[^\d]/g,'');"   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));">
  219.         标题长度:
  220.         <input name="t3" type="text" class="input" value="<%=rs(4)%>" id="t3" onKeyUp="value=value.replace(/[^\d]/g,'');" size="4" maxlength="2"  onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));">
  221.         <span>为0时不显示标题</span></td>
  222.     </tr>
  223.        
  224.         <tr class="tdbg">
  225.       <td align="center">方 案:</td>
  226.       <td>
  227.       <select name="t4" onChange="javascript:document.images.fa.src=this.value;fa.style.display='block';">
  228.         <option value="../plug/ad/00.jpg" <%=w_select(rs(6),0)%>>不使用方案</option>
  229.                 <%for i=1 to 2%>
  230.         <option value="../plug/ad/0<%=i%>.jpg" <%=w_select(rs(6),i)%>>方案<%=i%></option>
  231.                 <%next%>
  232.       </select>
  233.       </td>
  234.     </tr>  
  235.     <tr class="tdbg">
  236.           <td>&nbsp;</td>
  237.       <td><input name="Submit" type="submit" class="bnt" value="保 存">
  238.         <input name="Submit2" type="button" onClick="history.go(-1)" class="bnt" value="返 回"></td>
  239.     </tr>
  240.         </form>
  241.   </table>
  242. <%
  243. end sub
  244. sub getcode
  245. set rs=conn.execute("select id from "&sd_table&" where id="&id&"")
  246. if rs.eof then
  247. echo "请勿非法提交参数":Died
  248. end if
  249. %>
  250. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  251.     <tr>
  252.       <td width="9%" align="center" class="tdbg">选择: </td>
  253.       <td width="91%" class="tdbg"><img id="fa" alt="方案" style="position:absolute;margin-left:120px;display:none;">
  254.       <input name="c" type="radio" value="0" checked >
  255.       首页      </td>
  256.     </tr>
  257.     <tr class="tdbg">
  258.     <tr class="tdbg">
  259.       <td align="center">代码:</td>
  260.       <td><textarea name="get_c" rows="6" class="inputs">{sdcms:ad_group(<%=id%>)}</textarea></td>
  261.     </tr>
  262.     <tr class="tdbg">
  263.       <td>&nbsp;</td>
  264.       <td><input name="Submit22" type="button"   class="bnt" value="复制" onClick="CopyUrl(get_c);">
  265.           <input name="Submit22" type="button" onClick="history.go(-1)" class="bnt" value="返 回"></td>
  266.     </tr>
  267. </table>
  268. <%
  269. end sub
  270. sub del
  271.         conn.execute("delete from "&sd_table&" where id="&id&"")
  272.         response.Redirect("?")
  273. end sub
  274. sub check_info
  275. with response
  276. .write("        <script>")
  277. .write("        function checkadd()")
  278. .write("        {")
  279. .write("        if (document.add.t0.value=='')")
  280. .write("        {")
  281. .write("        alert('名称不能为空');")
  282. .write("        document.add.t0.focus();")
  283. .write("        return false")
  284. .write("        }")
  285. .write("        if (document.add.t1.value=='')")
  286. .write("        {")
  287. .write("        alert('长不能为空');")
  288. .write("        document.add.t1.focus();")
  289. .write("        return false")
  290. .write("        }")
  291. .write("        if (document.add.t2.value=='')")
  292. .write("        {")
  293. .write("        alert('宽不能为空');")
  294. .write("        document.add.t2.focus();")
  295. .write("        return false")
  296. .write("        }")
  297. '.write("       if (document.add.t3.value=='')")
  298. '.write("       {")
  299. '.write("       alert('标题长度不能为空');")
  300. '.write("       document.add.t3.focus();")
  301. '.write("       return false")
  302. '.write("       }")
  303. .write("        }")
  304. .write("        </script>")
  305. end with
  306. end sub
  307. %>  
  308. </div>
  309. </body>
  310. </html>
downloadsdcms_ad_group.asp Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code
Related Source Codes/Software:
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
Jie Yang v0.6.3 article system - System functions: 1, the system settings A confi... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
C9 v2.1.1 static post system - Program USES ASP + ACC structure design and develo... 2016-09-21
Imitation green download station perfect version - Before increased | software home page, on the basi... 2016-09-21
Subdomain hosting edition v1.9 s taobao, pat - The background site admin 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top