<%
Option Explicit
Session.LCID = 2058
'***** SI NO HA INICIADO SESION ***
If Session("Mybussiness") = "" then
Response.redirect("default.asp")
Else
Session.Timeout = 1200
'******* EN CASO DE ERROR ****
Err.Clear
On Error Resume Next
'*** REMPLAZA
Function Sanea(Texto)
Sanea = Replace(Texto, "'", "''")
End Function
%>
<!DOCTYPE html>
<HTML>
<HEAD>
<meta charset="ISO-8859-1" />
<TITLE>SISTEMA MIM <%= Session("Mybussiness") %> USUARIO: <%= Session("MyName") %></TITLE>
<link href="css/Modulos.css" rel="stylesheet" />
<link href="css/Buscador.css" rel="stylesheet" />
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>
</HEAD>
<BODY>
<%
'***** Variables a la base de datos ****
Dim Cn1
Dim Rs11, Rs12, Rs13, Rs14
Dim Sql11, Sql12, Sql13, Sql14
'***** Conexion a la Base de Datos
Set Cn1 = Server.CreateObject( "ADODB.Connection" )
Cn1.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database="& Session("Mybussiness") &""
'***** Conexion A la Tabla Empresa ****
Set Rs11 = Server.CreateObject("ADODB.Recordset")
Sql11="Select * from Empresa;"
Rs11.Open Sql11,Cn1,1,2
%>
<SECTION Class="HeaderGes">
<div Id="DivHeadGes">
<%= Rs11("Nombre") %><br>
<%= Rs11("Direccion") %>, <%= Rs11("colonia") %><br>
<%= Rs11("Poblacion") %>
</div>
</SECTION>
<SECTION>
<center>
<br>
<b>Etiqueta de Embarque</b>
<br><br>
<%
Dim PedidoNum
PedidoNum = request("PedidoNum")
If PedidoNum = "" or Isnull(PedidoNum) Then
PedidoNum = 0
Else
PedidoNum = PedidoNum
End If
%>
<Form action="EtiEmbarque.asp" method="Post" name="EtiEmbarque">
<Table Align="center">
<Tr>
<Td>
<input tabindex="1" type="text" placeholder="PedidoNum" Title="PedidoNum" name="PedidoNum" size="9px" id="PedidoNum" maxlength="150" value="<%= PedidoNum %>" onChange="javascript:this.value=this.value.toUpperCase();">
<input type="Submit" Value="Consultar" id="Detalles">
</Td>
</Tr>
</Table>
</Form>
<br><br>
<%
'***** Conexion a Encabezado de Pedidos ****
Set Rs12 = Server.CreateObject("ADODB.Recordset")
Sql12="Select Numfpede " &_
"from Fpedenc " &_
"Where Numfpede = "& PedidoNum &";"
Rs12.Open Sql12,Cn1,1,2
If Rs12.EOF Then
%>
<BR><BR><BR>
<b>***** NO EXISTE EL NUMERO DE PEDIDO ****</B>
<%
Else
%>
<Font Color="Red"><b>
<a href="EtiEmbarqueP.asp?PedidoNum=<%= Rs12("Numfpede") %>" onclick="NewWindow(this.href,'<%= Rs12("Numfpede") %>','800','600','yes');return false;">
<%= Rs12("Numfpede") %>
</a>
</b>
</Font>
<%
End If
%>
</SECTION>
<%
If Err.Number <> 0 Then
%>
<br><br>
Número de Error: <%= Err.Number %><BR>
Descripción: <%= Err.Description %><BR>
Origen: <%= Err.Source %><BR>
Linea: <%= Err.Line %><BR>
<br>
<%
Else
'****** FIN DE LOS ERRORES ***
End If
%>
</BODY>
</HTML>
<%
'FIN DE SESION
End If
%>