Foros del Web » Programando para Internet » ASP Clásico »

Ayuda con Intranet en ASP 1

Estas en el tema de Ayuda con Intranet en ASP 1 en el foro de ASP Clásico en Foros del Web. Buenas: Mi problema es el siguiente, estoy con el tema de mi practica y en la empresa donde trabajo me encomendaron arreglar una intranet que ...
  #1 (permalink)  
Antiguo 07/02/2011, 06:18
 
Fecha de Ingreso: febrero-2011
Mensajes: 108
Antigüedad: 13 años, 2 meses
Puntos: 4
Ayuda con Intranet en ASP 1

Buenas:
Mi problema es el siguiente, estoy con el tema de mi practica y en la empresa donde trabajo me encomendaron arreglar una intranet que habian adquirido hace tiempo. Me puse a modificarla y no se que parametro movi que me genera un error donde no puedo ver parte de la pagina, el error en internet explorer es el siguiente:
Es posible que la pagina web no funcione correctamente debido a errores:

'foldersTreeSub' no esta definido
arbol.asp linea: 61
código: 0 caracter: 1
URI: http://www.gamo.cl/arbol.asp

revise el codigo fuente desde la pagina y la linea 61 es la marcada en negrita a continuacion:

------------------------------------------------------------------------------

<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 = ""
foldersTree = gFld('Intranet', 'javascript:void(0)', '0', '1', '', '0')
insDoc(foldersTree,gLnk('R0','Documentos de Interes', 'itemopen.asp?item=227', '227', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Sitio Cecinas Llanquihue', 'itemopen.asp?item=251', '251', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Sitio Cecinas Venta Internet', 'itemopen.asp?item=254', '254', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Sitio Ruta de la Cecina', 'itemopen.asp?item=253', '253', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Servicio Reservas', 'javascript:void(0)', '0', '211', '', '0'))
insDoc(foldersTreeSub,gLnk('R1','Administrador Lista Recursos', 'itemopen.asp?item=214', '214', '', '0'))
insDoc(foldersTreeSub,gLnk('R1','Administrador Tipo Uso Recurso', 'itemopen.asp?item=215', '215', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Informe de Reservas', 'itemopen.asp?item=213', '213', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Reservador de Recursos', 'itemopen.asp?item=212', '212', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area RRII', 'javascript:void(0)', '0', '39', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Cumpleaños', 'itemopen.asp?item=226', '226', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Admin Ficha Personal', 'itemopen.asp?item=139', '139', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Tabla de Parentescos', 'itemopen.asp?item=146', '146', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Tabla de Cargos', 'itemopen.asp?item=145', '145', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Tabla AFP', 'itemopen.asp?item=153', '153', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Tabla Isapres', 'itemopen.asp?item=154', '154', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Tabla de Areas', 'itemopen.asp?item=147', '147', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Tabla Departamentos', 'itemopen.asp?item=148', '148', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Cubix Web', 'itemopen.asp?item=248', '248', 'Inteligencia de Negocios', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Administración Intranet', 'javascript:void(0)', '0', '237', '', '0'))
insDoc(foldersTreeSub,gLnk('B0','Administración', 'itemopen.asp?item=238', '238', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Administrador Areas Noticias', 'itemopen.asp?item=239', '239', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Administrador de Noticias', 'itemopen.asp?item=240', '240', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Administrador Sistemas', 'itemopen.asp?item=241', '241', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Adm. y Finanzas', 'javascript:void(0)', '0', '246', '', '0'))
insDoc(foldersTreeSub,gLnk('B0','Cubix Web', 'itemopen.asp?item=249', '249', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Aseguramiento de Calidad', 'javascript:void(0)', '0', '257', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Documentos', 'itemopen.asp?item=258', '258', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Casino', 'javascript:void(0)', '0', '270', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Menu', 'itemopen.asp?item=271', '271', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Cobranzas', 'javascript:void(0)', '0', '247', '', '0'))
insDoc(foldersTreeSub,gLnk('B0','Cubix Web', 'itemopen.asp?item=250', '250', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Comercial', 'javascript:void(0)', '0', '235', '', '0'))
insDoc(foldersTreeSub,gLnk('B0','Cubix Web', 'itemopen.asp?item=242', '242', 'Inteligencia de Negocios', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Informática', 'javascript:void(0)', '0', '232', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Política Uso Computadores', 'itemopen.asp?item=234', '234', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Mantención Fábrica', 'javascript:void(0)', '0', '259', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Documentos Instructivos', 'javascript:void(0)', '260', '', '0'))
foldersTreeSub = insFld(foldersTree,gFld('Area Producción', 'javascript:void(0)', '0', '261', '', '0'))
insDoc(foldersTreeSub,gLnk('R0','Documentos', 'javascript:void(0)', '262', '', '0'))

_________________________________________________
No copie las partes finales pero es ahi donde esta el error, envio un segundo posteo para terminar la idea
  #2 (permalink)  
Antiguo 07/02/2011, 06:20
 
Fecha de Ingreso: febrero-2011
Mensajes: 108
Antigüedad: 13 años, 2 meses
Puntos: 4
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
  #3 (permalink)  
Antiguo 07/02/2011, 07:01
 
Fecha de Ingreso: febrero-2011
Mensajes: 108
Antigüedad: 13 años, 2 meses
Puntos: 4
Ayuda con intranet en ASP 3

</script>
<STYLE TYPE="text/css">
<!--
#dek {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE>
<link href="css/Plantilla.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#6699CC" background="img/fdgde.jpg" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- td><%=Request.Cookies("uid")%></td><td>&nbsp;</td><td align="right"><a href="javascript:location.reload()"><img src="img/reload2.jpg" border="0"></a></td -->
<td><font color="#FFFFFF"><%=Request.Cookies("uid")%></font></td><td>&nbsp;</td><td align="center"><a href="javascript:location.reload()"><img src="img/reload2.jpg" border="0" align="texttop"></a></td>
</tr>
</table>
<div id="upload" style="position:absolute; left:220px; top:9px; width:16px; height:18px; z-index:2; display:none"><a href="javascript:upload();"><img src="img/upload.gif" width="16" height="18" border="0"></a></div>
<div id="admin" style="position:absolute; left:200px; top:9px; width:16px; height:18px; z-index:2; display:none"><a href="javascript:admin();"><img src="img/admin.gif" width="16" height="18" border="0"></a></div>

<!-- By making any changes to this code you are violating your user agreement.
Corporate users or any others that want to remove the link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->

<a style="font-size:7pt;text-decoration:none;color:silver" href=http://www.treeview.net/treemenu/userhelp.asp target=_top>&nbsp;</a>


<!-- Build the browser's objects and display default view of the
tree. -->
<div id="tree">
<script>initializeDocument()</script>
</div>

<DIV ID="dek"></DIV>
<SCRIPT TYPE="text/javascript">
<!--

//Pop up information box II (Mike McGrath ([email protected], http://website.lineone.net/~mike_mcgrath))
//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit http://dynamicdrive.com

Xoffset=-60; // modify these values to ...
Yoffset= 20; // change the popup position.

var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;

function popup(msg,bak){
if (msg != '') {
var content="<TABLE WIDTH=150 BORDER=1 CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=#000000 SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.c lose();skn.visibility="visible"}
if(ns6){document.getElementById("dek").innerHTML=c ontent;skn.display=''}
if(ie4){document.all("dek").innerHTML=content;skn. display=''}
}
}

function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollL eft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollT op;
skn.top=y+yyy;
}

function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}

//-->
</SCRIPT>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>

</html>

----------------------------------------------------------------------------

Por favor ayudenme a encontrar el error, estare atento a sus comentarios...

Cesar Faundez
  #4 (permalink)  
Antiguo 08/02/2011, 08:41
Avatar de Myakire
Colaborador
 
Fecha de Ingreso: enero-2002
Ubicación: Centro de la república
Mensajes: 8.849
Antigüedad: 22 años, 2 meses
Puntos: 146
Respuesta: Ayuda con Intranet en ASP 1

Por favor, no hagas temas diferentes para una misma duda.

Pregunta si hay un respaldo o el original del script javascript que tocaste
  #5 (permalink)  
Antiguo 08/02/2011, 11:50
 
Fecha de Ingreso: febrero-2011
Mensajes: 108
Antigüedad: 13 años, 2 meses
Puntos: 4
Respuesta: Ayuda con Intranet en ASP 1

Gracias..
Logre solucionar mi problema. Ademas de poder modificarlo en codigo, esta intranet tiene una opcion de administracion para agregarle datos a la intranet, es alli donde modifique algo de la parte de arriba del arbol, y me borro todo el arbol hacia abajo, solo abri la pagina en asp del arbon en el navegador y me mostro el arbol completo... mi duda ahora seria la siguiente...
Indudablemente esta intranet tiene base de datos, por que todo se referencia a algo y ademas hay conexiones evidentes a base de datos a traves de ADO. Pero no logro encontrar esa base de datos en el servidor.. alguna idea?? la necesito para saber donde se guardan los cambios, usuarios, y datos que agrego a la intranet

Estare atento a sus comentarios

Etiquetas: asp, experto, programacion, solucion, webmaster
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:22.