点晴ERP-用于工单显示图片的还原路径函数
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
:点晴ERP-用于工单显示图片的还原路径函数 描述:只适用于显示一张图片,有多张图片时本函数不生效 Function regx(patrn, str) Dim regEx, Match, Matches Set regEx = New RegExp regEx.Pattern = patrn regEx.IgnoreCase = True regEx.Global = True Set Matches = regEx.execute(str) For Each Match in Matches RetStr = RetStr & Match.Value & " " Next regx = RetStr End Function Function decryption_imgpath (Y_images_path) if isNull(Y_images_path) then else if Instr(Y_images_path,"read.ashx")>0 then Y_images_path_copy=Y_images_path Y_images_path_out=Y_images_path Y_images_path_copy=regx("src=.*?border",Y_images_path_copy) Y_images_path_copy=replace(Y_images_path_copy,"border","") Y_images_path_copy=replace(Y_images_path_copy,"src=","") Y_images_path_copy=replace(Y_images_path_copy,"""","") Y_images_path_copy=replace(Y_images_path_copy," ","") 'response.write "11"&Y_images_path_copy Y_images_path=regx("img.*?uploadlog_code",Y_images_path) Y_images_path=regx("c=2.*?uploadlog_code",Y_images_path) Y_images_path=replace(Y_images_path,"c=","") Y_images_path=replace(Y_images_path,"uploadlog_code","") Y_images_path=replace(Y_images_path," ","") Y_images_path=replace(Y_images_path,"&","") Y_images_path=replace(Y_images_path,"amp;","") set rs_all=server.createobject("adodb.recordset") sql_all="select * from mis_uploader_fileinf where visitcode like" & sqlstr("%"&Y_images_path&"%") 'response.write sql_all rs_all.Open sql_all,conn,3,1 if rs_all.recordcount>0 then file_physical_path=rs_all("file_physical_path") file_physical_path=replace(file_physical_path,"C:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"D:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"E:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"F:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"G:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"H:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"I:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"J:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"K:\ClickSun","",1,-1,1) file_physical_path=replace(file_physical_path,"\","/") end if rs_all.close Y_images_path_output=Replace(Y_images_path_out,Y_images_path_copy,file_physical_path) decryption_imgpath=Y_images_path_output else decryption_imgpath=Y_images_path end if end if End Function 该文章在 2023/8/28 18:30:34 编辑过 |
关键字查询
相关文章
正在查询... |