This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > April 2004 > I'm lost my template ...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
I'm lost my template ...
|
|
| alfreus 2004-04-23, 5:31 pm |
| Hello all,
I have a big problem. I have a web where all the pages are based on a
template, I don't know how, but I'm lost the template. There's some manner to
recovery the template? maybe from a page based in?
Best regards,
Alfredo Mar?n
| |
| Murray *TMM* 2004-04-23, 5:31 pm |
| Alfredo:
Please show me one of the child pages. It may be trivial, or it may be
impossible. A look at a child page will suggest what that might be.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"alfreus" <webforumsuser@macromedia.com> wrote in message
news:c6bhbp$1gj$1@forums.macromedia.com...
> Hello all,
> I have a big problem. I have a web where all the pages are based on a
> template, I don't know how, but I'm lost the template. There's some manner
to
> recovery the template? maybe from a page based in?
> Best regards,
>
> Alfredo Mar?n
>
| |
| alfreus 2004-04-26, 7:28 am |
| Hello Murray,
next I send you the code of a page based in template ...
Best regards,
Alfredo Mar?n
<%@LANGUAGE="VBSCRIPT"%>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
Session.Contents.Remove("MM_Username")
Session.Contents.Remove("MM_UserAuthorization")
'***********************************
'Borro todas las variables de sesi?n
Session.Contents.RemoveAll()
'***********************************
MM_logoutRedirectPage = "../default.asp"
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage =
CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow") Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & "=" &
Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage
& MM_newQS
End If
Response.Redirect(MM_logoutRedirectPage)
End If
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL=PATH_ABSOLUTE_SERVER & DIRECTORY_BASE_IN_SERVER &"error.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" &
Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" &
Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="../Connections/SuasorWEB.asp" -->
<!--#include file="../Include/lib.asp"-->
<!--#include file="../Include/config.asp"-->
<%
Dim ServiciosAsignados__ElCliente
ServiciosAsignados__ElCliente = "4"
If (Session ("Cliente") <> "") Then
ServiciosAsignados__ElCliente = Session ("Cliente")
End If
%>
<%
Dim ServiciosAsignados
Dim ServiciosAsignados_numRows
Set ServiciosAsignados = Server.CreateObject("ADODB.Recordset")
ServiciosAsignados.ActiveConnection = MM_SuasorWEB_STRING
ServiciosAsignados.Source = "SELECT C?d_cliente, C?d_servicio, Nom_servicio
AS Descripci?n FROM Asig_serviciousuarioweb WHERE C?d_cliente = '" +
Replace(ServiciosAsignados__ElCliente, "'", "''") + "' AND
usuario='"+Replace(Session("MM_Username"), "'", "''") +"'"
ServiciosAsignados.CursorType = 0
ServiciosAsignados.CursorLocation = 2
ServiciosAsignados.LockType = 1
ServiciosAsignados.Open()
if (ServiciosAsignados.EOF) then
ServiciosAsignados.Close()
Set ServiciosAsignados = Server.CreateObject("ADODB.Recordset")
ServiciosAsignados.ActiveConnection = MM_SuasorWEB_STRING
ServiciosAsignados.Source = "SELECT C?d_cliente, C?d_servicio, Nom_servicio
AS Descripci?n FROM Asig_servicioclienteweb WHERE C?d_cliente = '" +
Replace(ServiciosAsignados__ElCliente, "'", "''") + "'"
ServiciosAsignados.CursorType = 0
ServiciosAsignados.CursorLocation = 2
ServiciosAsignados.LockType = 1
ServiciosAsignados.Open()
end if
ServiciosAsignados_numRows = 0
%>
<%
Dim rsUsuEmp__ElUsuario
rsUsuEmp__ElUsuario = "''"
If (Session("MM_Username") <> "") Then
rsUsuEmp__ElUsuario = Session("MM_Username")
End If
%>
<%
Dim rsUsuEmp
Dim rsUsuEmp_numRows
Set rsUsuEmp = Server.CreateObject("ADODB.Recordset")
rsUsuEmp.ActiveConnection = MM_SuasorWEB_STRING
rsUsuEmp.Source = "SELECT Usuarioclienteweb.C?d_cliente,
Usuarioclienteweb.Usuario, Cliente.C?d_cliente,Cliente.Persona,
Cliente.Denominaci?n FROM Usuarioclienteweb, Cliente WHERE
Usuarioclienteweb.C?d_cliente = Cliente.C?d_cliente AND
Usuarioclienteweb.Usuario = '" + Replace(rsUsuEmp__ElUsuario, "'", "''") + "'
ORDER BY Cliente.Denominaci?n"
rsUsuEmp.CursorType = 0
rsUsuEmp.CursorLocation = 2
rsUsuEmp.LockType = 1
rsUsuEmp.Open()
rsUsuEmp_numRows = 0
%>
<%
Dim rsTopCli__C
rsTopCli__C = "111"
If (Session("Cliente") <> "") Then
rsTopCli__C = Session("Cliente")
End If
%>
<%
Dim rsTopCli
Dim rsTopCli_numRows
Set rsTopCli = Server.CreateObject("ADODB.Recordset")
rsTopCli.ActiveConnection = MM_SuasorWEB_STRING
rsTopCli.Source = "SELECT Top 10 Nombre, FacturadoDL-AbonosDL AS
VolVentCliente FROM Clientecontabilidad WHERE C?d_empresa='" +
Replace(rsTopCli__C, "'", "''") + "' ORDER BY VolVentCliente DESC"
rsTopCli.CursorType = 0
rsTopCli.CursorLocation = 2
rsTopCli.LockType = 1
rsTopCli.Open()
rsTopCli_numRows = 0
%>
<%
Dim rsTotalVolVentas__C
rsTotalVolVentas__C = "111"
If (Session("Cliente") <> "") Then
rsTotalVolVentas__C = Session("Cliente")
End If
%>
<%
Dim rsTotalVolVentas
Dim rsTotalVolVentas_numRows
Set rsTotalVolVentas = Server.CreateObject("ADODB.Recordset")
rsTotalVolVentas.ActiveConnection = MM_SuasorWEB_STRING
rsTotalVolVentas.Source = "SELECT SUM(FacturadoDL - AbonosDL) AS VolVentTotal
FROM Clientecontabilidad WHERE C?d_empresa='" + Replace(rsTotalVolVentas__C,
"'", "''") + "'"
rsTotalVolVentas.CursorType = 0
rsTotalVolVentas.CursorLocation = 2
rsTotalVolVentas.LockType = 1
rsTotalVolVentas.Open()
rsTotalVolVentas_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rsTopCli_numRows = rsTopCli_numRows + Repeat1__numRows
%>
<html><!-- InstanceBegin template="/Templates/plantilla.dwt.asp"
codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Suasor Web</title>
<!-- InstanceEndEditable -->
<meta http-equiv="" content="text/html; charset=iso-8859-1">
<script language="JScript">
<!-- // DDMenu
var eOpenMenu = null;
function OpenMenu(eSrc,eMenu){
eMenu.style.left = eSrc.parentElement.offsetLeft + divMenuBar.offsetLeft;
eMenu.style.top = divMenuBar.offsetHeight + divMenuBar.offsetTop;
eMenu.style.visibility = "visible";
eOpenMenu = eMenu;
}
function CloseMenu(eMenu){
eMenu.style.visibility = "hidden";
eOpenMenu = null;
}
function MenuBar_over(){
var eSrc = window.event.srcElement;
if ("A" == eSrc.tagName.toUpperCase()){
var eMenu =
document.all[eSrc.parentElement.id.replace("tdMenuBarItem","divMenu")];
if (eOpenMenu && eOpenMenu != eMenu){
CloseMenu(eOpenMenu);}
if (eMenu){
OpenMenu(eSrc,eMenu);}
}
}
function MenuBar_out(){
var eTo = window.event.toElement;
if (eOpenMenu && eTo && !eOpenMenu.contains(eTo) && "tblMenuBar" !=
eTo.id){
CloseMenu(eOpenMenu)}
}
function Menu_out(){
var eSrc = window.event.toElement;
if (eOpenMenu && !eOpenMenu.contains(eSrc) && !divMenuBar.contains(eSrc)){
CloseMenu(eOpenMenu)}
}
//-->
</script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<script language="JavaScript" type="text/JavaScript"
src="js/funciones.js"></script>
<link href="estilos/estilo.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable -->
<tr>
<td width="320" height="69" align="center" valign="middle"><img
src="Imagenes/<% response.write(IMAGE_NAME_LOGO) %>" width="320"
height="66"></td>
<td width="505" align="center" valign="middle"><div align="center"><img
src="Imagenes/M%2Bsuasor.jpg" width="400" height="80"></div></td>
</tr>
<tr valign="middle">
<td height="43" colspan="2">
<table width="100%" border="0">
<tr>
<td width="46%"><script language="JavaScript" type="text/JavaScript">
document.write("<b><FONT SIZE='1' FACE='Verdana' color='black'>" + Fecha() +
"</font></b>")
</script></td>
<td width="54%" align="right">
<% if Session("DATE_UPDATE") <> NULL or Session("DATE_UPDATE") <> "" then%>
<b><FONT SIZE='1' FACE='Verdana' color='black'>Última
actualización :<% response.write(Session("DATE_UPDATE")) %></font></b>
<%else%>
<%end if%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="43" colspan="2" valign="top"><div align="right"> </div>
<div align="right"></div></td>
</tr>
</table>
<ddMenu>
<div id="ddMenuLayer" style="position:absolute; left:9px; top:122px;
width:100%; height:35px; z-index:1">
<div id="divMenuBar" onMouseOver="if (document.all) MenuBar_over();"
onMouseOut="if (document.all) MenuBar_out();" onselectstart="return false;">
<table id="tblMenuBar" border="0" width="100%">
<tr>
<td class="clsMenuBarItem" id="tdMenuBarItemInicio"> <a target=""
href="inicio.asp">Inicio</a>
</td>
<td>|</td>
<% 'Menu opcion Modulo Laboral ***************** %>
<% ServiciosAsignados.MoveFirst %>
<% OtraOPcion=False %>
<% while Not ServiciosAsignados.EOF AND Not OtraOpcion %>
<% If (Trim(ServiciosAsignados.Fields.Item("C?d_servicio").Value) =
Trim("NOM")) OR (Trim(ServiciosAsignados.Fields.Item("C?d_servicio").Value) =
Trim("TRA")) Then %>
<td class="clsMenuBarItem" id="tdMenuBarItemM?dulo Laboral"> <a
target="" href="#">M?d. Laboral</a>
</td>
<% OtraOpcion=True %>
<% End If %>
<% If Not ServiciosAsignados.EOF Then %>
<% ServiciosAsignados.MoveNext %>
<% End If %>
<% wend %>
<% If Not OtraOpcion Then %>
<td class="clsMenuBarItem" id="tdMenuBarItemM?dulo
Laboral">M?d. Laboral</td>
<% End If %>
<% 'Fin opcion Modulo Labora
| |
| Murray *TMM* 2004-04-26, 9:28 am |
| Are all the pages based on this same template?
/Templates/plantilla.dwt.asp
If they are, then here's what you need to do -
1. MAKE A BACKUP of the site.
2. Open this page and use MODIFY | Templates > Detach from Template (remove
all template markup)
3. Then use FILE | Save As Template, and save as the old template name
"plantilla.dwt.asp"
4. Then select that portion of the content that you want to be editable and
use INSERT | Templates > Editable Region - give it the same name as before -
repeat this for each editable region.
5. For clarity, remove the content from each editable region and replace it
with something like "Edit here" just to make it easy to see on the page
6. Save, and allow the site to update
I think you will have your template back now.
Just a comment - you are using some methods that are risky in my opinion -
all javascript menus, and event handlers on <div> tags, for example....
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"alfreus" <webforumsuser@macromedia.com> wrote in message
news:c6ie32$7kq$1@forums.macromedia.com...
> Hello Murray,
> next I send you the code of a page based in template ...
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|