Ir para conteúdo
Fórum Script Brasil
  • 0

Banco de imagens - Simple Online Photo Catalog


Danyllo

Pergunta

Bom dia Pessoal,

Estou precisando de uma grande ajuda.

Baixei o código desse Simple Online Photo Catalog para criar um banco de imagens. O problema é que fiz um teste de comentário nas imagens e desde segunda-feira (12) estou recebendo os emails teste. Meu outlook chegou a mostrar status de recebimento de mais de 50.000 mensagens, nesse momento tenho 18.589 email para receber sobre o mesmo assunto. Já retirei meu email do set no código, mas mesmo assim as mensagens não param de chegar..OBS: Já retirei o script do servidor e ainda sim estou sendo bombardeado por emails...

Alguém tem alguma idéia???.....Por favor....

Segue o código index.asp

<%@LANGUAGE="vb script:void(0)"" onclick=""ToogleDisplay(" & IDcounter & ");"">"
                            preHtml = preHtml + "<img border=0 id=""i" & IDCounter & """ src=""" & cimgPlus & """></a>"
                            tempWriter=tempWriter & "<span class=S> [" & subfolder.SubFolders.count & " " & cSub & "]</span>"
                        elseif subfolder.Files.Count = 0 then
                            If tempWriter="" Then
                                tempWriter=" " & cEmpty
                            End If
                        end if
                        Prt "<li>" & preHtml & linktext  &  tempWriter & "<div style=""display:none"" id=""l" & IDcounter & """>"
                        DisplaySubFolders(Item & subfolder.Name &"/")
                        Prt "</div>"
                    end if
                end if
            Next
            Prt "</ul>"
    end if
End Sub






Sub CreateFramesBody()
%>
<frameset border="0" frameborder="0" rows="105,*">
<noframes>
<body>
    <h1>Tempo Imagens</h1>
<p>
    <!--This photo album has been generated using the free ASP script <a href="http://www.iloire.com/vbscript/online_photo_catalog_vbscript.asp">ASP Simple Online Photo Album</a>.
    If you are interested in the AJAX version of this rated as the <strong>best photo gallery software</strong>, please go to <a href="http://www.aspphotogallery.net/">AJAX Photo Gallery homepage</a>.
    <br><br>We are sorry but in order to view this photo album you a web browser that display frames.-->
</p>

</body>
</noframes>
    <frame frameborder=0 name=frm_header scrolling=no src="?action=title">
    <frameset cols="27%,*"  border="1" frameborder="yes">
        
        <frameset rows="30%,*,54" border="0" frameborder="0">
            <frame frameborder=no bordercolor="#e48423" name=frm_folders scrolling=Auto src="?action=displayfolders">
            <frame FRAMEBORDER="no" BORDER="0" name=frm_files src="?action=empty">
            <frame FRAMEBORDER="no" BORDER="0" name=frm_search scrolling=no src="?action=search">
        </frameset>
        
        <frameset rows="*,25" frameborder=yes border=1>
            <frame FRAMEBORDER="no" BORDER="0"  name=frm_bottom scrolling=Auto src="?action=start">
            <frame FRAMEBORDER="no" BORDER="0"  name=frm_filesd src="?action=copyright">    <!-- Removing or modifying this line without a license is an illegal action-->        
        </frameset>

    </frameset>
</frameset>

<%
End Sub



sub displayMainImage()
    'create resize image select box
    Dim selectHtml,i,theNext,thePrev
    selectHtml="<select name=targetimgsize onchange=""document.getElementById('formChangeSize').submit()"">"
    for i=0 to ubound(sizeValues)
        if (cstr(sizeValues(i)) = "original") and (cstr(session("targetimgsize"))=cstr(sizeValues(i))) then 'original item and current value
            selectHtml=selectHtml& "<option selected value=""original"">original</option>"
        elseif cstr(sizeValues(i)) = "original" then
            selectHtml=selectHtml& "<option value=""original"">original</option>"
        elseif cstr(session("targetimgsize"))=cstr(sizeValues(i)) then  'current one
            selectHtml=selectHtml& "<option selected value=""" & sizeValues(i) & """>" & sizeValues(i) & "px</option>"
        else
            selectHtml=selectHtml& "<option value=""" & sizeValues(i) & """>" & sizeValues(i) & "px</option>"
        end if
    next
    selectHtml=selectHtml & "</select>"
    'end select box creation

    if cUseThumbnailFile and cstr(session("targetimgsize"))<>"original" then 
        tempWriter=cUseThumbnailFilePath & "?ForceAspect=False&Width=" & session("targetimgsize") & "&Height=" & session("targetimgsize") & "&image=" & Server.URLEncode(request("item"))
    else : tempWriter=request("item"): end if
    Prt "<center>"

    Prt "<div class=MainImage>"
        Prt "<div class=MainImageDim>"
            Prt "<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td>"
            thePrev=FindThePrev (request("item"))

            If len(thePrev) Then Prt "<a class=arrow target=frm_bottom href=""?action=displayimage&item=" & Server.URLencode(fs.GetParentFolderName(request("item")) & "/" & thePrev) & """>" &  " <img border=""0"" title=""" & cPrevPicText & """ alt=""" & cPrevPicText & """ src=""graphics/1leftarrow.gif"" /></a>"

            Prt "</td><td align=center>"
            Prt cFileName & " <b>" & fs.GetFilename(request("item")) & "</b>"
            if cUseThumbnailFile then Prt " - <form style=""display:inline"" id=""formChangeSize"" method=post action=""" & strThispage & "?action=displayimage&item=" & Server.URLencode(request("item")) &  """>" & cSetMaximumsize & " " & selectHtml & "</form>"
            Prt "</td><td align=right>"
            theNext=FindTheNext (request("item"))

            If len(theNext) Then Prt "<a class=arrow target=frm_bottom href=""?action=displayimage&item=" & Server.URLencode(fs.GetParentFolderName(request("item")) & "/" &  theNext) & """><img border=""0"" title=""" & cNextPicText & """ alt=""" & cNextPicText & """ src=""graphics/1rightarrow.gif"" /></a>"
            Prt "</td></tr></table>"
        Prt "</div>"

        

        Prt ("<img id=""MainImage"" alt=""" & fs.GetFilename(request("item")) & """ src=""" & tempWriter & """>")

        WriteCopyRightText()

        'comments
        tempWriter=GetComment (request("item"))
        if len(tempWriter)>0 then Prt "<div class=comments id=author><h2>" & cAuthorComments & "</h2><div class=body>" & tempWriter & "</div></div>"
        if cAllowUserEnterComments then Call UserCommentsEngine()
    Prt "</div>"
    Prt "</center>"

end sub

'END FUNCTIONS










'MAIN

On error resume next 'comment this line for debugging purposes

Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")

Dim strThispage 'important to avoid 405 errors in "post"
strThispage= Request.ServerVariables ("SCRIPT_NAME")

Dim sizeValues
sizeValues = split(cAvailableThumbnailSizes,",") 'converting valid image values to array

Dim tempWriter 'use to store temporal values along the script
Dim IDcounter 'to assing unique ID's
IDcounter=0


if isnumeric(request("picsperrow")) and len(request("picsperrow")) > 0 then session("picsperrow")=cint(request("picsperrow"))
if not isnumeric(session("picsperrow")) or len(session("picsperrow"))=0 then session("picsperrow")=cNumberPicturesPerRowDefault

if len(request("targetimgsize")) > 0 then session("targetimgsize")=request("targetimgsize")
if len(session("targetimgsize"))=0 then session("targetimgsize")=cDefaultThumbnailSize

%>
<html>
<head>
    <title><%=cPageTitle%></title>
    <link rel="stylesheet" href="css/online_photo_catalog_vbscript.css" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    &lt;script language=javascript>

    function SetDisplay(elementid,displayvalue,imgsrc){
        if (document.getElementById('i' + elementid) !=null) document.getElementById('i' + elementid).src=imgsrc;
        document.getElementById('l' + elementid).style.display=displayvalue;
    }


    function ToogleDisplay(elementid){
        //alert(document.getElementById(elementid).style.display);
        if (document.getElementById('l' + elementid).style.display=='none'){ //it is contracted
            SetDisplay(elementid,'','<%=cimgMinus%>');
        }
        else{
            SetDisplay(elementid,'none','<%=cimgPlus%>');
        }
    }
    </script>
</head>
<%

Select case request("action")
  case "displayfolders"
    Prt("<body class=folders>")
    DisplaySubFolders(cVirtualPath)
    Prt("</body>")
  case "displayfiles"
    Prt("<body class=files>")    
    Call DisplayFiles(request("item"))
    Prt("</body>")
  Case "recent"
    Prt("<body class=image>")
    displayRecentComments
    Prt("</body>")
  case "title"   
    Prt "<body class=title>"
    %>
    <!--#include file="header.txt"-->
    <%
    Prt "<table width=100% cellpadding=0 cellspacing=0>"
    Prt "<tr>"
    Prt "<td class=titlebar align=right>"            
    If (cNumberRecentComments > 0) and (cAllowUserEnterComments=true) Then Prt("<a target=frm_bottom href=""" & strThispage & "?action=recent"">" & cNumberRecentComments & " " & cRecentComments  & "</a> | ")
    Prt"<a target=frm_bottom href=""" & strThispage & "?action=start"">" & cGalleryHome & "</a>  "
    
    'Script credits. To remove this, you need to buy a commercial license.
    'Prt "<a target=frm_bottom href=""http://www.iloire.com/vbscript/online_photo_catalog_vbscript.asp"">" & 'cScriptHomepage & "</a> | "        
    
    'Prt "<a target=_blank href=""http://www.aspphotogallery.net"">AJAX Version here!</a>"            
    Prt "</td></tr></table>"    
    Prt "</body>"
  case "start"
    Prt "<body>"
    WriteMainText()
    Prt("</body>")
  case "empty"
  case "search"
      Prt("<body class=search>")
      displaysearch
      dosearch
    Prt("</body>")
  case "displayimage"
    Prt "<body class=image>"
    DisplayMainImage
    Prt "</body>"
  case "copyright"    
    'ALERT: Removing or modifying this part without a license is an illegal action. Visit the software homepage in order to purchase a license.
    %>    
    <body class=copyright style="margin:0px">
    <div>
    <!--Created with the free software <a title="Free ASP online photo album (image gallery)" href="http://www.iloire.com/vbscript/online_photo_catalog_vbscript.asp">ASP Simple Online Photo Album</a>. Check also the <a title="Free ASP online photo album (image gallery)" href="http://www.aspphotogallery.net">AJAX Version</a>-->
    </div>
    <%
    Prt "</body>"
  case else
    CreateFramesBody
End select


Set fs=nothing
if err then
    Prt "<p class=error>Error: " & err.description + ".</p>"
end if
%>

</html>

Editado por Danyllo
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0
Tentou rodar isso localmente? Server de empresa ou host na web?

O jeito é em primeiro momento resetar o server ou pelo menos dar um shutdown na execução desse script ou domínio.

Depois rever a rotina por que certamente deve ter um loop infinito.

[]'s

Então Rafael...rodei localmente...o server é da empresa...

O fluxo de recebimento das mensagens ficou menor agora....

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,3k
×
×
  • Criar Novo...