<%
Option Explicit
Session.LCID = 2058
'***** SI NO HA INICIADO SESION ***
If Session("Mybussiness") = "" then
Response.redirect("default.asp")
Session("ID")=Cint(0)
Else
Session("ID")= 1000
Session.Timeout = 1200
'******* EN CASO DE ERROR ****
Err.Clear
On Error Resume Next
'*** REMPLAZA
Function Sanea(Texto)
Sanea = Replace(Texto, "'", "''")
End Function
%>
<html>
<head>
<title>Sistema MIM </title>
<meta charset="ISO-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<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 class="homepage is-preload">
<!-- Header -->
<header id="header">
<div class="logo container">
<div>
<h1><a href="" id="logo">CARTA PORTE</a></h1>
</div>
</div>
</header>
<!-- Menu -->
<nav id="nav">
<!--#INCLUDE FILE="CPMenu.asp"-->
</nav>
<%
'***** 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 id="main">
<%
Dim CPTFolio, CPTRuta
CPTFolio = Request("CPTFolio")
CPTRuta = Request("CPTRuta")
%>
<section class="box highlight">
<H1>2.-Ruta</H1>
Folio <%= CPTFolio %> <BR>
<%
'***** CPORIGEN ****
Set Rs12 = Server.CreateObject("ADODB.Recordset")
Sql12="select cpoid, CPOSECOR " &_
"FROM CPORIGEN " &_
"Where CPOFOLIO = "& CPTFolio &";"
Rs12.Open Sql12,Cn1,1,2
If Rs12.EOF Then
Else
Do while Not Rs12.EOF
%>
<a href="CPAddD.asp?CPTFolio=<%= CPTFolio %>&CPTRuta=<%= CPTRuta %>&IdOrigen=<%= Rs12("cpoid") %>" onclick="NewWindow(this.href,'Distro','600','600','yes');return false;">
<%= Rs12("CPOSECOR") %></a>
<br>
<%
Rs12.Movenext
Loop
End If
%>
<BR>
<Form action="CPADDE.asp" method="post">
<input tabindex="1" type="Hidden" placeholder="CPTFolio" Title="CPTFolio" name="CPTFolio" Size="15" id="CPTFolio" value="<%= CPTFolio %>" maxlength="8" onChange="javascript:this.value=this.value.toUpperCase();">
<input tabindex="2" type="Hidden" placeholder="CPTRuta" Title="CPTRuta" name="CPTRuta" Size="15" id="CPTRuta" value="<%= CPTRuta %>" maxlength="8" onChange="javascript:this.value=this.value.toUpperCase();">
<button tabindex="20" type="submit" name="Grabar" id="Grabar"/>SIGUIENTE</button>
</Form>
</section>
</section>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.dropotron.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
<%
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
%>