BVB Source Codes

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

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download sdcms_editload.asp Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code - Type:.asp
  1. <!--#include file="sdcms_check.asp"-->
  2. <base target="_self">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  6. <title>附件</title>
  7. <style>
  8. body{margin:10px;padding:0;overflow:hidden;}
  9. table,td,div{font-size:12px;font-family:arial;}
  10. </style>
  11. <base target="_self">
  12. </head>
  13.  
  14. <body>
  15.  <form method=post name="Form1" id="Form1">
  16.         <input type="hidden" name="files" ID="Hidden1">
  17.         <input type="hidden" name="ffilter" ID="Hidden2">
  18.     </form>
  19. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  20.   <tr>
  21.     <td height="30">目录选择:
  22. <%
  23. response.Expires=0
  24. currFolder=request("files")
  25. ffilter=request("ffilter")
  26. filetype=",media,image,flash"
  27. if currFolder="" then currFolder=sdcms_upfiledir
  28. if currFolder<>"" then
  29.     if instr(currFolder,sdcms_upfiledir)=0 then
  30.                 currFolder=sdcms_root&sdcms_upfiledir
  31.         end if
  32. end if
  33.  
  34. set oFSO = server.CreateObject ("Scripting.FileSystemObject")
  35. set oFolder_base0 = oFSO.GetFolder(server.MapPath(sdcms_root&sdcms_upfiledir))
  36. response.Write "<select  name='selCurrFolder' id='selCurrFolder' onchange=""changeFolder()"">"
  37. recursive oFolder_base0,oFolder_base0,sdcms_upfiledir
  38. response.Write "</select>"
  39.  
  40. %></td>
  41.     <td align="right"><select name='file_type' id='file_type' onChange="changeFolder()">
  42. <%
  43. filetype=split(filetype,",")
  44. for i=0 to ubound(filetype)
  45.         select case filetype(i)
  46.                 case "media":title="多媒体"
  47.                 case "image":title="图象"
  48.                 case "flash":title="Flash"
  49.                 case else:title="全部文档"
  50.         end select
  51. %>
  52. <option value="<%=filetype(i)%>" <%if ffilter=filetype(i) then%>selected="selected"<%end if%>><%=title%></option>
  53. <%next%>
  54. </select></td>
  55.   </tr>
  56.   <tr>
  57.     <td width="24%"><div id="idPreview" style="text-align:center;overflow:auto;width:297px;height:245px;border:#d7d7d7 5px solid;border-bottom:#d7d7d7 3px solid;background:#ffffff;margin-right:2;"></div>
  58.                   <div align=center>
  59.                     <input type="text" id="inpSource" name="inpSource" style="border:#cfcfcf 1px solid;width:302px">
  60.     </div></td>
  61.     <td valign="top"><%writeFileSelections%></td>
  62.   </tr>
  63.     <tr>
  64.     <td height="30" colspan="2"><input name="btnOk" id="btnOk" type="button" value="确定" style="float:right" onClick="doOk()" ><%admin_upfile 0,"80%","30",1%></td>
  65.   </tr>
  66. </table>
  67. <%
  68.  
  69.  
  70. function recursive(oFolder,oFolder_base,sName)
  71.   set oSubFolders = oFolder.SubFolders
  72.  
  73.     if InStr(1,oFolder.path,"_vti_cnf")=0 then
  74.       sDisplayed = sName & Replace(Replace(oFolder.path,oFolder_base.path,""),"\","/")
  75.       if CStr(currFolder)=CStr(sDisplayed) then isselect="selected"
  76.         sOptions = sOptions & "<option value=""" & sDisplayed & """ "&isselect&">" & sDisplayed & "</option>" & vbCrLf
  77.     end if
  78.  
  79.   for each item in oSubFolders
  80.       recursive item,oFolder_base,sName
  81.     next
  82.  
  83.     sOptions = sOptions & vbCrLf
  84.     recursive = sOptions
  85.         response.Write sOptions
  86. end function
  87.  
  88. function getExt(sFile)'ffilter
  89.   dim sExt
  90.   sExt=""
  91.   for each Item In split(sFile,".")
  92.     sExt = Item
  93.   next
  94.   getExt=sExt
  95. end function
  96.  
  97. function writeFileSelections()
  98.   on error resume next
  99.   set oFolder = oFSO.GetFolder(Server.Mappath(sdcms_root&currFolder))
  100.   set oFiles = oFolder.files
  101.   if err then
  102.   response.Write("<br>请勿打歪注意")
  103.   response.End()
  104.   err.clear
  105.   end if
  106.   nIndex=0
  107.  
  108.   bFileFound=false
  109.  
  110.   Response.Write "<div style='overflow:auto;height:270px;width:100%;margin-top:3px;margin-bottom:2px;'>" & VbCrLf
  111.   sColor = "#e7e7e7"
  112.   for each oFile in oFiles
  113.  
  114.     bDisplay=false
  115.     sExt=getExt(oFile.path)
  116.     if ffilter="flash" then
  117.       if LCase(sExt)="swf" then bDisplay=true
  118.     elseif ffilter="media" then
  119.       if LCase(sExt)="avi" or LCase(sExt)="wmv" or LCase(sExt)="mpg" or _
  120.          LCase(sExt)="mpeg" or LCase(sExt)="wav" or LCase(sExt)="wma" or _
  121.          LCase(sExt)="mid" or LCase(sExt)="mp3" then bDisplay=true
  122.     elseif ffilter="image" then
  123.       if LCase(sExt)="gif" or LCase(sExt)="jpg" or LCase(sExt)="png" then bDisplay=true
  124.     else 'all
  125.       bDisplay=true
  126.     end if
  127.     '~~~~~~~~~~~~~~~~~~
  128.  
  129.     if bDisplay then
  130.  
  131.       bFileFound=true
  132.  
  133.       nIndex=nIndex+1
  134.  
  135.  
  136.       if sColor = "#EFEFF5" then
  137.         sColor = ""
  138.       else
  139.         sColor = "#EFEFF5"
  140.       end if
  141.  
  142.  
  143.       if(LCase(oFile.name)=LCase(sUploadedFile))then
  144.         sColorResult="yellow"
  145.         iSelected=nIndex
  146.       else
  147.         sColorResult=sColor
  148.       end if
  149.  
  150.       Response.Write "<div style='background:" & sColorResult & ";line-height:20px;cursor:pointer;margin:2px 10px;padding:0 6px;'  onclick=""selectFile(" & nIndex & ",0)"" align=""absmiddle"" ><span style=""float:right"">" & FormatNumber(oFile.size/1000,1) & " kb</span><u>" & oFile.name & "</u><input type=hidden name=inpFile" & nIndex & " id=inpFile" & nIndex & " value=""" & oFile.name & """></div>" & VbCrLf  
  151.      
  152.  
  153.    
  154.     end if
  155.   next
  156.   if bFileFound=false then
  157.     Response.Write "<div style='margin:2px 10px;padding:0 6px;color:#f30;'>没有内容</div></div>"
  158.   else
  159.     Response.Write "</div>"
  160.   end if
  161.  
  162. end function
  163. %>
  164. <script>
  165. function changeFolder()
  166.   {
  167.   var Form1 = document.forms.Form1;
  168.  
  169.   Form1.elements.files.value=document.getElementById("selCurrFolder").value;
  170.   Form1.elements.ffilter.value=document.getElementById("file_type").value;
  171.  
  172.   Form1.action="?";
  173.   Form1.submit();
  174.   }
  175. function upload(fpath)
  176.         {
  177.                 selectFile(fpath,1);
  178.         }
  179. function selectFile(index,ordnum)
  180.   {
  181.   if (ordnum==0)
  182.   {
  183.   sFile_RelativePath = document.getElementById("inpFile"+index).value;
  184.   sFile_RelativePath = '<%=sdcms_root%><%=CurrFolder%>/' + sFile_RelativePath
  185.   }
  186.   else
  187.   {sFile_RelativePath=index;}
  188.   document.getElementById("inpSource").value=sFile_RelativePath;
  189.  
  190.   var arrTmp = sFile_RelativePath.split(".");
  191.   var sFile_Extension = arrTmp[arrTmp.length-1]
  192.   var sHTML="";
  193.  
  194.   //Image
  195.   if(sFile_Extension.toUpperCase()=="GIF" || sFile_Extension.toUpperCase()=="JPG" || sFile_Extension.toUpperCase()=="PNG")
  196.     {
  197.     sHTML = "<img src=\"" + sFile_RelativePath + "\" onclick=window.open(this.src) style=cursor:pointer >"
  198.     }
  199.   //SWF
  200.   else if(sFile_Extension.toUpperCase()=="SWF")
  201.     {
  202.     sHTML = "<object "+
  203.       "classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' " +
  204.       "width='100%' "+
  205.       "height='100%' " +
  206.       "codebase='http://active.macromedia.com/flash6/cabs/swflash.cab#version=6.0.0.0'>"+
  207.       " <param name=movie value='"+sFile_RelativePath+"'>" +
  208.       " <param name=quality value='high'>" +
  209.       " <embed src='"+sFile_RelativePath+"' " +
  210.       "   width='100%' " +
  211.       "   height='100%' " +
  212.       "   quality='high' " +
  213.       "   pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>" +
  214.       " </embed>"+
  215.       "</object>";
  216.     }
  217.   //Video
  218.   else if(sFile_Extension.toUpperCase()=="WMV"||sFile_Extension.toUpperCase()=="AVI"||sFile_Extension.toUpperCase()=="MPG")
  219.     {
  220.     sHTML = "<embed src='"+sFile_RelativePath+"' hidden=false autostart='true' type='video/avi' loop='true'></embed>";
  221.     }
  222.   //Sound
  223.   else if(sFile_Extension.toUpperCase()=="WMA"||sFile_Extension.toUpperCase()=="WAV"||sFile_Extension.toUpperCase()=="MID")
  224.     {
  225.     sHTML = "<embed src='"+sFile_RelativePath+"' hidden=false autostart='true' type='audio/wav' loop='true'></embed>";
  226.     }
  227.   //Files (Hyperlinks)
  228.   else
  229.     {
  230.     sHTML = "<br><br><br><br><br><br>不可预览"
  231.     }
  232.  
  233.   document.getElementById("idPreview").innerHTML = sHTML;
  234.   }
  235.  
  236.  function doOk()
  237.   {
  238.   if(navigator.appName.indexOf('Microsoft')!=-1)
  239.     window.returnValue=inpSource.value;
  240.   else
  241.     window.opener.setAssetValue(document.getElementById("inpSource").value);
  242.   bOk=true;
  243.   self.close();
  244.   }
  245. </script>
  246. </body>
  247. </html>
  248.  
downloadsdcms_editload.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