Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/05/2002, 15:19
Owen-Bonilla
 
Fecha de Ingreso: mayo-2001
Ubicación: Monterrey, N.L.; México
Mensajes: 558
Antigüedad: 24 años
Puntos: 0
Re: Visualizar el contenido de un directorio con ASP

Código:
  Set MyFiles = MyFSO.GetFolder(MyPhysPath)
 MyDirName = MyFiles.Name
 MyURLPath = Replace(MyPhysPath, MyRootPath, "/")
 MyURLPath = Replace(MyURLPath, "\", "/")
 
 Response.Write "<style type=text/css>"& vbCrLf
 Response.Write "td { font-size:11px; font-family: verdana, arial; font-weight: normal; color: #666666; background-color: #ffffff; }"& vbCrLf
 Response.Write "a { font-size:11px; font-family: verdana, arial; font-weight: bold; color: #003366; }"& vbCrLf
 Response.Write "</style>"

Response.Write "<table border=0 cellspacing=1 cellpadding=5 align=center bgcolor=#cccccc>"& vbCrLf
 Response.Write "<tr><td colspan=3><b>Sitio:</b> "& Request.ServerVariables("SERVER_NAME") &"</td></tr>"& vbCrLf
 Response.Write "<tr><td colspan=3><b>Directorio Virtual:</b> "& MyURLPath &"</td></tr>"& vbCrLf
 Response.Write "<tr><td colspan=3><b>Directorio Fisico:</b> "& MyPhysPath &"</td></tr>"& vbCrLf
 
 Response.Write "<tr><td colspan=3>"& vbCrLf

Response.Write MyFileNum &" Archivos y "& MySubNum &" Sub Directorio en el Directorio Actual<br><br>"& vbCrLf
 

 Response.Write "<a href='"& MySelf &"'>Directorio del Servidor Remoto</a><br><p>"& vbCrLf
 Response.Write "<a href=javascript:history.go(-1);>Atras</a><br>"& vbCrLf
 Response.Write "</td></tr>"& vbCrLf

Response.Write "<tr><td colspan=3><a href='"& MySelf &"?Display=SerVars'>Información del Servidor...</a></td></tr>"& vbCrLf
 
 Display = Request("Display")
 Select Case Display
  Case "SerVars": SerVarsNFO()
  Case Else: 
   DisplayFolders()
   DisplayFiles()
 End Select

Public Function SerVarsNFO()
  For Each Item in Request.ServerVariables
   Response.Write "<tr><td>" & Item & "</td><td colspan=2> " & Request.ServerVariables(Item) & "</td></tr>"& vbCrLf
  Next
 End Function