Ayuda con Intranet en ASP 2 Ahora busque dentro del codigo fuente contenido en el servidor, el archivo referido como arbol.asp y esto fue lo que encontre:
------------------------------------------------
<!--#include file="Connections/datos.asp" -->
<%
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
<%
'queryString = "EXEC Opciones_Destacadas"
'response.write queryString
'Set rsHits = Server.CreateObject("ADODB.Recordset")
'rsHits.Open queryString , MM_datos_STRING
'destacados = "|"
'do while not rsHits.EOF
' destacados = destacados & rsHits("ID_ITEM") & "|"
'rsHits.MoveNext
'loop
%>
<% 'Busca el nombre de usuario
'sFullUser = trim(Request.ServerVariables("LOGON_USER"))
'iPos = InStr(sFullUser, "\")
'sDomain = Left(sFullUser, iPos - 1)
'sUser = Mid(sFullUser, iPos + 1)
%>
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found at: http://www.treeview.net
Author: Marcelino Alves Martins
Instructions:
- Through the style tag you can change the colors and types
of fonts to the particular needs of your site.
- A predefined block has been made for stylish people with
black backgrounds.
-->
<html>
<head>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<!-- if you want black backgound, remove this style block -->
<style>
TD {font-size: 10pt;
font-family: verdana,helvetica;
text-decoration: none;
white-space:nowrap;}
A {text-decoration: none;
font-size: 10pt;
color: #FFFFFF}
</style>
<!-- NO CHANGES PAST THIS LINE -->
<!-- Code for browser detection -->
<script src="js/ua.js"></script>
<!-- Infrastructure code for the tree -->
<script src="js/ftiens4.js"></script>
<!-- Execution of the code that actually builds the specific tree.
The variable foldersTree creates its structure with calls to
gFld, insFld, and insDoc -->
<script>
USETEXTLINKS = 1
USEICONS = 1
WRAPTEXT = 1
HIGHLIGHT = 1
HIGHLIGHT_COLOR = "#000000"
HIGHLIGHT_BG = "#FBCE69"
ICONPATH = "img/"
var pintado = ""
<%
Dim param_usuario
param_usuario = "a"
if (Request.Cookies("rut") <> "") then param_usuario = Request.Cookies("rut")
%>
<%
queryString = "dbo.Sp_ArbolCompletoOrdenado 9999,'" + Replace(param_usuario, "'", "''") + "'"
'queryString = "dbo.Sp_ArbolCompletoOrdenado null,'" + Replace(param_usuario, "'", "''") + "'"
'response.write "<!--"+ queryString +"-->"
'response.write Request.Cookies("uid") & ", " & Request.Cookies("pwd")
Set rsHits = Server.CreateObject("ADODB.Recordset")
rsHits.Open queryString , MM_datos_STRING
last_nivel = 1
imprimir = 1
do while not rsHits.EOF
'response.write "<!--" +rsHits("nodeName")+ "-->"
admin = rsHits("admin")
if isNull(rsHits("mensaje")) then
mensaje = trim(rsHits("mensaje"))
else
mensaje = Replace(trim(rsHits("mensaje")),vbNewLine,"<br>")
end if
pos=InStr(destacados,"|" & rsHits("nodeId") & "|")
if pos>0 then
descripcion = "<font color=#FF0000>" & trim(rsHits("nodeName")) & "</font>"
else
descripcion = trim(rsHits("nodeName"))
end if
'if ((trim(rsHits("nodeIsFolder")) = "1") or (rsHits("nodeId") = "1") or (trim(rsHits("F_TipoDoc")) = "D")) then
if ((trim(rsHits("nodeIsFolder")) = "1") or (rsHits("nodeId") = "1") ) then
if cint(rsHits("nodeId")) = "1" then
response.write "foldersTree = gFld('" & descripcion & "', '" & rsHits("link") & "', '" & rsHits("responsable") & "', '" & rsHits("nodeId") & "', '" & mensaje & "', '" & admin & "')" & VbCrLf
else
if (rsHits("ver") = "1") then
if imprimir = 1 then
response.write "foldersTree" & niveles(cint(rsHits("nivel"))-1) & " = insFld(foldersTree" & niveles(cint(rsHits("nivel"))-2) & ",gFld('" & descripcion & "', '" & rsHits("link") & "', '" & rsHits("responsable") & "', '" & rsHits("nodeId") & "', '" & mensaje & "', '" & admin & "'))" & VbCrLf
else
if cint(rsHits("nivel")) <= last_nivel then
imprimir = 1
response.write "foldersTree" & niveles(cint(rsHits("nivel"))-1) & " = insFld(foldersTree" & niveles(cint(rsHits("nivel"))-2) & ",gFld('" & descripcion & "', '" & rsHits("link") & "', '" & rsHits("responsable") & "', '" & rsHits("nodeId") & "', '" & mensaje & "', '" & admin & "'))" & VbCrLf
else
imprimir = 0
end if
end if
else
last_nivel = cint(rsHits("nivel"))
imprimir = 0
end if
end if
else
' if (rsHits("ver") = "1") then
if (rsHits("ver") = "1" or (trim(rsHits("F_TipoDoc")) = "D")) then
if imprimir = 1 then
response.write "insDoc(foldersTree" & niveles(cint(rsHits("nivel"))-2) & ",gLnk('" & rsHits("target") & rsHits("responsable") & "','" & descripcion & "', '" & rsHits("link") & "', '" & rsHits("nodeId") & "', '" & mensaje & "', '" & admin & "'))" & VbCrLf
else
if cint(rsHits("nivel")) <= last_nivel then
imprimir = 1
response.write "insDoc(foldersTree" & niveles(cint(rsHits("nivel"))-2) & ",gLnk('" & rsHits("target") & rsHits("responsable") & "','" & descripcion & "', '" & rsHits("link") & "', '" & rsHits("nodeId") & "', '" & mensaje & "', '" & admin & "'))" & VbCrLf
else
imprimir = 0
end if
end if
else
last_nivel = cint(rsHits("nivel"))
imprimir = 0
end if
end if
rsHits.MoveNext
loop
'response.write "<!-- se acabo el ciclo -->"
function niveles(n)
ntemp = ""
if n > 0 then
for i=1 to n
ntemp = ntemp & "Sub"
next
else
ntemp = ""
end if
niveles = ntemp
end function
%>
function upload() {
win('admin/asociar.asp?item='+pintado);
}
function win(fileName) {
myFloater = window.open('','myWindow','resizable=yes,scrollbar s=yes,status=no,width=400,height=300')
myFloater.location.href = fileName;
}
function flip(name,src1,src2) {
if (document.images[name].src.substring( document.images[name].src.length - 11 , document.images[name].src.length) == src1) {
document.images[name].src = src2;
parent.document.body.cols='300,*';
document.getElementById('tree').style.display = '';
}
else {
document.images[name].src = src1;
parent.document.body.cols='15,*';
document.getElementById('tree').style.display = 'none';
}
}
function admin() {
winadmin('admin/sub_index.asp?nodo='+pintado);
}
function winadmin(fileName) {
myFloater = window.open('','myWindow','scrollbars=yes,status=n o,width=400,height=300,resizable=1')
myFloater.location.href = fileName;
}
function nothing()
{
}
------------------------------------------------------------------------------
Va un tercer post para terminar este codigo
Última edición por sefirotxx; 07/02/2011 a las 06:59 |