zoukankan      html  css  js  c++  java
  • 附件图片的显示公式

    REM   "First   check   to   see   if   the   file   can   be   viewed   as   an   image   in   the   browser ";
    NoPreviewMsg   :=   "无可用图片   -   附加文件的类型属于未知的图像类型。 ";
    SupportedImages   :=   ".gif ": ".jpeg ": ".jpg ": ".jpe ": ".jfif ": ".pjpeg ": ".pjp ";

    @If(@Ends(@LowerCase(FileUpFileName);   SupportedImages);   " ";   @Attachments   =   0;   @Return( " ");   @Return(NoPreviewMsg));

    REM   "Determine   the   directory   seperator   from   the   platform   that   we   are   running   on ";
    DirSep   :=   @If(@Contains(@Platform;   "Win "   :   "OS/2 ");   "\\ ";
                                                          @Contains(@Platform;   "UNIX ");   "/ ";
                                                          @Contains(@Platform;   "Mac ");     ": ";
                                                            " ");

    REM   "Construct   the   URL   to   preview   the   file   attachment ";
    DBPath   :=   @Subset(@DbName;   -1);
    DBPathFixed   :=   @ReplaceSubstring(DBPath;   DirSep;   "/ "   );
    View   :=   "LookupPersonalProfiles ";
    AbbrName   :=   @Name([Abbreviate];   Who);
    replspName   :=   @ReplaceSubstring(AbbrName;   "   ";   "# ");
    KeyName   :=   @ReplaceSubstring(replspName;   "/ ";   "_ ");

    key   :=   @Subset(@AttachmentNames;   1);

    DocID   :=   @Text(@DocumentUniqueID);
    URL   :=   "[ <img   src= "   +   "\ "/ "   +   DBPathFixed   +   "/ "   +   View   +   "/ "   +   KeyName   +   "/$file/ "   +   Key   +   "\ "> ] ";
    "[ <BR> ] "+U

  • 相关阅读:
    堆排序
    冒泡排序
    描述字符串写入文件
    Java Socket编程,读服务器几个字符,再写入本地显示。
    final,finally,finalize区别
    圆桌问题 (a)
    表达式
    计算系数
    乌龟棋
    显示图像(多源dfs)
  • 原文地址:https://www.cnblogs.com/hannover/p/2184812.html
Copyright © 2011-2022 走看看