This commit is contained in:
@@ -116,7 +116,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Case "sendMailLPM"
|
||||
context.Response.Write(sendMailLPM(context))
|
||||
Case "getSATColomias"
|
||||
getSatColonias(context)
|
||||
getSATColonias(context)
|
||||
Case "GetFilesDirectory"
|
||||
GetFilesDirectory(context)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
@@ -1358,7 +1360,30 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Private Function GetFilesDirectory(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
Dim urlhost As String = context.Request.Url.Host.ToUpper()
|
||||
If (urlhost = "LOCALHOST") Then
|
||||
Dim directorio As String = IfNull(context.Request("directorio"), "").ToString()
|
||||
|
||||
Dim xmlarchivos As System.Xml.Linq.XDocument = New System.Xml.Linq.XDocument()
|
||||
Dim xfolder As XElement = New XElement("folder")
|
||||
For Each urfile In System.IO.Directory.GetFiles(directorio)
|
||||
Dim xfile As New XElement("archivo", urfile)
|
||||
xfile.SetAttributeValue("EXT", Path.GetExtension(urfile))
|
||||
xfolder.Add(xfile)
|
||||
|
||||
Next
|
||||
xmlarchivos.Add(xfolder)
|
||||
retorno = xmlarchivos.ToString()
|
||||
context.Response.ContentType = "text/xml"
|
||||
context.Response.Write(retorno)
|
||||
context.Response.StatusCode = 200
|
||||
Else
|
||||
context.Response.StatusCode = 500
|
||||
End If
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
#Region "Get SAT Colonmias"
|
||||
Private Function getSATColonias(ByVal context As HttpContext) As String
|
||||
|
||||
Reference in New Issue
Block a user