<%
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" />
</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
Dim num_registros, num_campos, Campo, registros_mostrados
'Numero de Paginas
If Request.QueryString("pag")<>"" Then
Session("pagina")=Request.QueryString("pag")
Else
Session("pagina")=1
End If
'***** 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
'***** Conexion A la Tabla OPERADORES ****
Set Rs12 = Server.CreateObject("ADODB.Recordset")
Sql12="Select * from CPTRANSPORTE order by cptfolio desc;"
Rs12.Open Sql12,Cn1,1,2
If rs12.Eof then
Else
'Registros por Pagina
num_registros = 50
'Dimensionamos las paginas y determinamos la pagina actual
RS12.PageSize=num_registros
RS12.AbsolutePage=Session("pagina")
%>
<section id="main">
<!-- Highlight -->
<section class="box highlight">
<h3><!--#INCLUDE FILE="CPMenuCP.asp"--> </h3>
<BR>
<hr>
Pagina <b><%=Session("pagina")%></b> De <b><%=RS12.PageCount%></b>
<br>
Registros Encontrados: <b><%=RS12.RecordCount%></b>
<br><br>
<%
End If
registros_mostrados = 0
While (Not Rs12.EOF And registros_mostrados < num_registros)
registros_mostrados = registros_mostrados +1
%>
<h3><a href="CPCartaPorteView.asp?IDCPE=<%= Rs12("CPTFolio") %>"><%= Rs12("CPTFolio") %></a> ---
<!-- <a href="Francisco.asp?FolioFactura=<%= Rs12("CPTFolio") %>"><%= Rs12("CPTFolio") %></a> --->
<a href="FDTraslado.asp?FolioFactura=<%= Rs12("CPTFolio") %>"> REMISIONES <%= Rs12("CPTFolio") %></a> ---
<a href="FDTrasladoOrden.asp?FolioFactura=<%= Rs12("CPTFolio") %>"> ORDENES <%= Rs12("CPTFolio") %></a></h3>
<%
Rs12.Movenext
wend
%>
</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
%>