LOGO OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 开发文档 其他文档  
 
网站管理员

点晴ERP-还原图片路径函数

liguoquan
2023年7月6日 16:18 本文热度 419
:点晴ERP-还原图片路径函数

在ASP文件上添加以下函数代码:

'正则表达式匹配字符串函数

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=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,"\","/")

    img_html="<img src='"&file_physical_path&"' style=""width:100%;"">"

    Y_images_path=img_html

     end if

      rs_all.close

    end if

    end if

     decryption_imgpath=Y_images_path

      End Function

调用函数即可

Y_images=rs("Y_images")

Y_images=decryption_imgpath(Y_images)



该文章在 2023/7/6 16:18:06 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2024 ClickSun All Rights Reserved