BVB Source Codes

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

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download sdcms_skins.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 11
  6. set sdcms=nothing
  7. select case action
  8. case "add":title="添加风格"
  9. case "edit":stype="main":title="修改风格"
  10. case else:title="风格管理"
  11. end select
  12. sd_table="sd_skins"
  13. sdcms_head
  14. %>
  15.  
  16. <div class="sdcms_notice"><span>管理操作:</span><a href="?action=add">添加风格</a> ┊ <a href="?">风格管理</a></div>
  17. <br>
  18. <ul id="sdcms_sub_title">
  19.         <li class="sub"><a<%if stype="main" then%> href="javascript:void(0)" onClick="selectTag('tagContent0',this)"<%end if%>><%=title%></a></li>
  20.         <%if stype="main" then%>
  21.         <li class="unsub"><a href="javascript:void(0)" onClick="selectTag('tagContent1',this)">风格信息</a></li>
  22.         <%end if%>
  23. </ul>
  24. <div id="sdcms_right_b">
  25. <%
  26. select case action
  27. case "add":add
  28. case "edit":edit
  29. case "save":save
  30. case "del":del
  31. case "onskins":onskins
  32. case else:main
  33. end select
  34. closedb
  35. sub main
  36. %>
  37.   <table border="0" align="center" cellpadding="3" cellspacing="1" width="99%" >
  38.     <tr>
  39.         <%
  40.         page=request.querystring("page")
  41.         if page="" or not isnumeric(page) then
  42.         page=1
  43.         end if
  44.         pages = 20
  45.         set rs=server.CreateObject("adodb.recordset")
  46.         sql="select id,title,pic,author,url,"
  47.         if Is_sql=0 then
  48.         sql=sql&"(iif(isused=0,'#ddd','#f30')),(iif(isused=0,'','disabled')),(iif(isused=0,'','此风格正在使用'))"
  49.         else
  50.         sql=sql&"(case isused when 0 then'#ddd'else'#f30'end),"
  51.         sql=sql&"(case isused when 0 then''else'disabled'end),(case isused when 0 then''else'此风格正在使用'end)"
  52.         end if
  53.         sql=sql&" from "&sd_table&" order by id desc"
  54.         rs.open sql,conn,1,1   
  55.         if rs.eof then
  56.         else
  57.         rs.pagesize = pages
  58.         maxpagecount=rs.pagecount
  59.         rs.absolutepage = page
  60.         rcount1=0
  61.         pagestart=page-5
  62.         pageend=page+5
  63.         if pagestart<1 then
  64.         pagestart=1
  65.         end if
  66.         if pageend>maxpagecount then
  67.         pageend=maxpagecount
  68.         end if
  69.         rcount=rs.RecordCount
  70.         i=0
  71.         do while not rs.eof and rcount1 <rs.pagesize  
  72.         %>
  73.    
  74.          
  75.       <td align="center" valign="top" width="25%">
  76.           <table border="0" cellspacing="0" cellpadding="0" style="margin:6px;">
  77.   <tr>
  78.     <td align="center"><img src="<%=rs(2)%>" alt="<%=rs(7)%>" width="150" height="120" style="border:1px solid <%=rs(5)%>;"></td>
  79.          </tr>
  80.          <tr>
  81.         <td height="40" align="center"><input type="button" <%=rs(6)%> class="bnt01" value="应用" onClick="if(confirm('确定要使用该风格么!'))location.href='?action=onskins&id=<%=rs(0)%>';return false;"> <input type="button" onClick="location.href='?action=edit&id=<%=rs(0)%>';" class="bnt01" value="编辑"> <input type="button" <%=rs(6)%> onClick="if(confirm('真的要删除?不可恢复!'))location.href='?action=del&id=<%=rs(0)%>';return false;" class="bnt01" value="删除"></td>
  82.   </tr>
  83.   <tr>
  84.         <td style="padding-left:8px;">名称:<%=rs(1)%><br>作者:<a href="<%=rs(4)%>" target="_blank"><%=rs(3)%></a></td>
  85.   </tr>
  86. </table>
  87.  
  88.           </td>
  89.         <%
  90.         i=i+1
  91.         if i=4 then
  92.         i=0
  93.         echo "</tr><tr>"
  94.         end if
  95.         rs.movenext
  96.         rcount1=rcount1+1
  97.         loop
  98.         end if        
  99.         %>
  100.     </tr>
  101.         <%if rcount>0 then%>
  102.         <tr>
  103.       <td colspan="4" class="tdbg" >
  104.           <span class="right">转到第
  105.                  <select onChange="location.href='?page='+this.value+''">
  106.                  <%for i=1 to maxpagecount%>
  107.                  <option value="<%=i%>" <%if clng(page)=clng(i) then echo "selected" end if%>><%=i%></option>
  108.                  <%next%>
  109.                  </select>页</span>
  110. <%
  111. if page<>"1" then
  112. echo "<a href=?page="&page-1&">上一页</a> "
  113. else
  114. echo "上一页 "
  115. end if
  116. for i=pagestart to pageend
  117. if i=0 then
  118. i=1
  119. end if
  120. if i=clng(page) then
  121. str="<font color=red><b>"&i&"</b></font>"
  122. else
  123. str=i
  124. end if
  125. strurl="[<a href=?page="&i&">"&str&"</a>]"
  126. echo strurl
  127. next
  128. if page=maxpagecount then
  129. echo " 下一页"
  130. elseif  page<>""&maxpagecount&"" then
  131. echo " <a href=?page="&page+1&"&stype="&stype&"&classid="&classid&">下一页</a>"
  132. else
  133. echo " 下一页"
  134. end if
  135. echo " 页次:"&page&"/"&maxpagecount&" 页   每页: "&pages&" 条  总数: "&rcount&" 条"
  136. %></td>
  137.     </tr>
  138.         <%end if%>
  139.   </table>
  140.  
  141. <%
  142. end sub
  143. sub add
  144. check_info
  145. %>
  146.   <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  147.   <form name="add" method="post" action="?action=save&act=add" onSubmit='return checkadd()'>
  148.     <tr>
  149.       <td width="12%" align="center" class="tdbg">风格名称:      </td>
  150.       <td class="tdbg"><input name="t0" type="text" class="input" id="t0" size="40"></td>
  151.     </tr>
  152.     <tr class="tdbg">
  153.       <td align="center">风格作者:      </td>
  154.       <td><input name="t1" value="<%=sdcms_adminname%>" type="text" class="input" id="t1" size="40"></td>
  155.     </tr>
  156.     <tr class="tdbg">
  157.       <td align="center">官方网站:</td>
  158.       <td><input name="t2" type="text" class="input"   value="http://www.sdcms.cn" size="40"></td>
  159.     </tr>
  160.         <tr class="tdbg">
  161.       <td align="center">效果图片:</td>
  162.       <td><input name="t3" type="text" class="input"   size="40">
  163.       <span>
  164.       <select onChange="t3.value=this.value">
  165.           <option>选择图片</option>
  166.         <option value="images/nopic.gif">没有图片</option>
  167.       </select>
  168.       尺寸:150*120</span><br><%admin_upfile 2,"40%","30",1%></td>
  169.     </tr>
  170.     <tr class="tdbg">
  171.       <td align="center">风格目录:</td>
  172.       <td><input name="t4" type="text" class="input"  size="40"></td>
  173.     </tr>
  174.    
  175.     <tr class="tdbg">
  176.           <td>&nbsp;</td>
  177.       <td><input name="Submit" type="submit" class="bnt" value="添 加">
  178.         <input name="Submit2" type="button" onClick="history.go(-1)" class="bnt" value="返 回"></td>
  179.     </tr>
  180.         </form>
  181.   </table>
  182. <%
  183. end sub
  184. sub edit
  185. set rs=conn.execute("select id,title,author,url,pic,root from "&sd_table&" where id="&id&"")
  186. if rs.eof then
  187. echo "请勿非法提交参数":Died
  188. end if
  189. check_info
  190. %>
  191. <form name="add" method="post" action="?action=save&act=save&id=<%=id%>" onSubmit='return checkadd()'>
  192.   <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" id="tagContent1" class="dis">
  193.     <tr>
  194.       <td width="9%" align="center" class="tdbg">风格名称:      </td>
  195.       <td width="91%" class="tdbg"><input name="t0" type="text" class="input" value="<%=rs(1)%>" id="t0" size="30"></td>
  196.     </tr>
  197.     <tr class="tdbg">
  198.       <td align="center">风格作者:      </td>
  199.       <td><input name="t1" type="text" class="input" value="<%=rs(2)%>" id="t1" size="30"></td>
  200.     </tr>
  201.     <tr class="tdbg">
  202.       <td align="center">官方网站:</td>
  203.       <td><input name="t2" type="text" class="input"  value="<%=rs(3)%>" size="40"></td>
  204.     </tr>
  205.         <tr class="tdbg">
  206.       <td align="center">效果图片:</td>
  207.       <td><input name="t3" type="text" class="input"  value="<%=rs(4)%>"   size="40">
  208.       <span>尺寸:150*120</span><br><%admin_upfile 2,"40%","30",1%></td>
  209.     </tr>
  210.     <tr class="tdbg">
  211.       <td align="center">风格目录:</td>
  212.       <td><input name="t4" type="text" class="input"  value="<%=rs(5)%>" size="40">
  213.           <span>将风格放置系统路径../skins/下,直接输入模板文件夹名 如"default"</span></td>  
  214.     </tr>
  215.    </table>
  216.    <%
  217.    set sdcms=new Sdcms_Function
  218.    skin_tmp="../skins/"&rs(5)&"/"
  219.    %>
  220.    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" id="tagContent0">
  221.         <tr class="tdbg">
  222.       <td align="center" width="12%"><input name="up1" id="up1" type="checkbox" value="1" checked="checked" /><label for="up1">首页风格:<br>sdcms_index.htm</label></td>
  223.       <td><textarea name="s0" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_index.htm"))%></textarea></td>
  224.     </tr>
  225.         <tr class="tdbg">
  226.       <td align="center" width="9%"><input name="up2" id="up2" type="checkbox" value="1" checked="checked" /><label for="up2">公告列表:<br>sdcms_notice.htm</label></td>
  227.       <td><textarea name="s1" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_notice.htm"))%></textarea></td>
  228.     </tr>
  229.         <tr class="tdbg">
  230.       <td align="center" width="9%"><input name="up3" id="up3" type="checkbox" value="1" checked="checked" /><label for="up3">公告信息:<br>sdcms_notice_info.htm</label></td>
  231.       <td><textarea name="s2" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_notice_info.htm"))%></textarea></td>
  232.     </tr>
  233.         <tr class="tdbg">
  234.       <td align="center" width="9%"><input name="up4" id="up4" type="checkbox" value="1" checked="checked" /><label for="up4">信息列表:<br>(文字类)</label><br>sdcms_info_text.htm</td>
  235.       <td><textarea name="s3" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_info_text.htm"))%></textarea></td>
  236.     </tr>
  237.         <tr class="tdbg">
  238.       <td align="center" width="9%"><input name="up5" id="up5" type="checkbox" value="1" checked="checked" /><label for="up5">信息列表:<br>(图片类)</label><br>sdcms_info_pic.htm</td>
  239.       <td><textarea name="s4" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_info_pic.htm"))%></textarea></td>
  240.     </tr>
  241.         <tr class="tdbg">
  242.       <td align="center" width="9%"><br /><input name="up6" id="up6" type="checkbox" value="1" checked="checked" /><label for="up6">信息显示:</label><br>sdcms_info_show.htm</td>
  243.       <td><textarea name="s5" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_info_show.htm"))%></textarea></td>
  244.     </tr>
  245.          
  246.         <tr class="tdbg">
  247.       <td align="center" width="9%"><input name="up7" id="up7" type="checkbox" value="1" checked="checked" /><label for="up7">投票页面:</label><br>sdcms_vote.htm</td>
  248.       <td><textarea name="s6" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_vote.htm"))%></textarea></td>
  249.     </tr>
  250.         <tr class="tdbg">
  251.       <td align="center" width="9%"><input name="up8" id="up8" type="checkbox" value="1" checked="checked" /><label for="up8">搜索页面:</label><br>sdcms_search.htm</td>
  252.       <td><textarea name="s7" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_search.htm"))%></textarea></td>
  253.     </tr>
  254.         <tr class="tdbg">
  255.       <td align="center" width="9%"><input name="up9" id="up9" type="checkbox" value="1" checked="checked" /><label for="up9">单 页 面:</label><br>sdcms_page.htm</td>
  256.       <td><textarea name="s8" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_page.htm"))%></textarea></td>
  257.     </tr>
  258.         <tr class="tdbg">
  259.       <td align="center" width="9%"><input name="up10" id="up10" type="checkbox" value="1" checked="checked" /><label for="up10">标签页面:</label><br>sdcms_tag.htm</td>
  260.       <td><textarea name="s9" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_tag.htm"))%></textarea></td>
  261.     </tr>
  262.         <tr class="tdbg">
  263.       <td align="center" width="9%"><input name="up11" id="up11" type="checkbox" value="1" checked="checked" /><label for="up11">标签列表:</label><br>sdcms_tag_list.htm</td>
  264.       <td><textarea name="s10" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_tag_list.htm"))%></textarea></td>
  265.     </tr>
  266.         <tr class="tdbg">
  267.       <td align="center" width="9%"><input name="up12" id="up12" type="checkbox" value="1" checked="checked" /><label for="up12">插件页面:</label><br>sdcms_plug.htm</td>
  268.       <td><textarea name="s11" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_plug.htm"))%></textarea></td>
  269.     </tr>
  270.         <tr class="tdbg">
  271.       <td align="center" width="9%"><input name="up13" id="up13" type="checkbox" value="1" checked="checked" /><label for="up13">站点地图:</label><br>sdcms_map.htm</td>
  272.       <td><textarea name="s12" rows="10" class="inputs"><%=sdcms.TempEncode(sdcms.LoadFile(""&skin_tmp&"sdcms_map.htm"))%></textarea></td>
  273.     </tr>
  274.         </table>
  275.         <%set sdcms=nothing%>
  276.         <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" >
  277.     <tr class="tdbg">
  278.           <td>&nbsp;</td>
  279.       <td><input name="Submit" type="submit" class="bnt" value="保 存">
  280.       <input name="Submit2" type="button" onClick="history.go(-1)" class="bnt" value="返 回"></td>
  281.     </tr>
  282.   </table>
  283.    
  284. <%
  285. set sdcms=nothing
  286. end sub
  287. sub save
  288.  
  289. t0=trim(request("t0"))
  290. t1=trim(request("t1"))
  291. t2=trim(request("t2"))
  292. t3=trim(request("t3"))
  293. t4=trim(request("t4"))
  294. s0=trim(request("s0"))
  295. s1=trim(request("s1"))
  296. s2=trim(request("s2"))
  297. s3=trim(request("s3"))
  298. s4=trim(request("s4"))
  299. s5=trim(request("s5"))
  300. s6=trim(request("s6"))
  301. s7=trim(request("s7"))
  302. s8=trim(request("s8"))
  303. s9=trim(request("s9"))
  304. s10=trim(request("s10"))
  305. s11=trim(request("s11"))
  306. s12=trim(request("s12"))
  307.  
  308. up1=trim(request("up1"))
  309. up2=trim(request("up2"))
  310. up3=trim(request("up3"))
  311. up4=trim(request("up4"))
  312. up5=trim(request("up5"))
  313. up6=trim(request("up6"))
  314. up7=trim(request("up7"))
  315. up8=trim(request("up8"))
  316. up9=trim(request("up9"))
  317. up10=trim(request("up10"))
  318. up11=trim(request("up11"))
  319. up12=trim(request("up12"))
  320. up13=trim(request("up13"))
  321. t4=dir_check(t4)
  322.  
  323. sysfile="../skins/"&t4&"/"
  324.  
  325. set rs=server.CreateObject("adodb.recordset")
  326. sql="select title,author,url,pic,root from "&sd_table&""
  327. if act="save" then
  328.  sql=sql&" where id="&id&""
  329. end if
  330. rs.open sql,conn,1,3
  331.  
  332. if act="add" then
  333.   rs.addnew
  334. else
  335.   rs.update
  336. end if
  337. rs(0)=left(t0,255)
  338. rs(1)=left(t1,50)
  339. rs(2)=t2
  340. rs(3)=left(t3,255)
  341. if t4<>rs(4) then remove_app "systempdir"
  342. rs(4)=t4
  343. rs.update
  344. if act="add" then
  345. conn.execute("Insert into sd_log (sdcms_name,ip,content) values('"&sdcms_adminname&"','"&sdcms_adminip&"','添加风格:"&rs(0)&"')")
  346. else
  347. conn.execute("Insert into sd_log (sdcms_name,ip,content) values('"&sdcms_adminname&"','"&sdcms_adminip&"','修改风格:"&rs(0)&"')")
  348. end if
  349. if act="save" then
  350. set sdcms=new Sdcms_Function
  351. files="sdcms_index.htm|sdcms_notice.htm|sdcms_notice_info.htm|sdcms_info_text.htm|sdcms_info_pic.htm|sdcms_info_show.htm|sdcms_vote.htm|sdcms_search.htm|sdcms_page.htm|sdcms_tag.htm|sdcms_tag_list.htm|sdcms_plug.htm|sdcms_map.htm"
  352. files=split(files,"|")
  353. for i=0 to ubound(files)
  354.         if len(eval("up"&i+1))>0 then sdcms.savefile sysfile,files(i),eval("s"&i)
  355. next
  356. set sdcms=nothing
  357. end if
  358. response.Redirect("?")
  359. end sub
  360. sub del
  361.   if conn.execute("select isused from "&sd_table&"  where id="&id&"")(0)=1 then
  362.   echo "该风格正在使用,不能删除":Died
  363.   end if
  364.   conn.execute("Insert into sd_log (sdcms_name,ip,content) values('"&sdcms_adminname&"','"&sdcms_adminip&"','删除风格:"&conn.execute("select title from "&sd_table&" where id="&id&"")(0)&"')")
  365.   conn.execute("delete from "&sd_table&" where id="&id&"")
  366.   response.Redirect("?")
  367. end sub
  368.  
  369. sub onskins
  370.   conn.execute("update   "&sd_table&" set isused=0 ")
  371.   conn.execute("update   "&sd_table&" set isused=1 where id="&id&"")
  372.   conn.execute("Insert into sd_log (sdcms_name,ip,content) values('"&sdcms_adminname&"','"&sdcms_adminip&"','应用风格:"&conn.execute("select title from "&sd_table&" where id="&id&"")(0)&"')")
  373.   application.Contents.Remove(sdcms_cookies&"systempdir")
  374.   response.Redirect("?")
  375. end sub
  376.  
  377. sub check_info
  378. with response
  379. .write("        <script>")
  380. .write("        function checkadd()")
  381. .write("        {")
  382. .write("        if (document.add.t0.value=='')")
  383. .write("        {")
  384. .write("        alert('风格名称不能为空');")
  385. .write("        document.add.t0.focus();")
  386. .write("        return false")
  387. .write("        }")
  388. .write("        if (document.add.t3.value=='')")
  389. .write("        {")
  390. .write("        alert('效果图片不能为空');")
  391. .write("        document.add.t3.focus();")
  392. .write("        return false")
  393. .write("        }")
  394. .write("        if (document.add.t4.value=='')")
  395. .write("        {")
  396. .write("        alert('风格目录不能为空');")
  397. .write("        document.add.t4.focus();")
  398. .write("        return false")
  399. .write("        }")
  400. .write("        }")
  401. .write("        </script>")
  402. end with
  403. end sub
  404. %>  
  405. </div>
  406. </body>
  407. </html>
downloadsdcms_skins.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