<%
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 lang="es">
<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" />
<style>
h1.title {
font-size: 20px;
color: #333;
margin-top: 25px;
}
form {
background: white;
padding: 20px;
border: 1px solid #ddd;
border-radius: 6px;
width: 420px;
margin: 0 auto;
box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
}
table.normal {
width: 100%;
}
td {
padding: 6px;
}
input[type="text"], select {
width: 95%;
padding: 5px;
border: 1px solid #bbb;
border-radius: 4px;
font-size: 13px;
}
input[type="submit"] {
background: #003366;
color: white;
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
}
input[type="submit"]:hover {
background: #005599;
}
hr {
margin: 25px 0;
}
.errorBox {
background: #fee;
color: #900;
border: 1px solid #c00;
padding: 12px;
width: 420px;
margin: 20px auto;
border-radius: 6px;
}
</style>
<!--- PARA ABRIR LAS VENTANAS EMERGENTES --->
<script>
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
var win = window.open(mypage, myname, winprops);
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
</script>
</head>
<body>
<%
'***** Variables a la base de datos ****
Dim Cn1, Rs11, Rs12
Dim Sql11, Sql12
Dim ClaveCli
ClaveCli = Ucase(Request("ClaveCli"))
'***** 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">
<strong><%= Rs11("Nombre") %></strong><br>
<%= Rs11("Direccion") %>, <%= Rs11("colonia") %><br>
<%= Rs11("Poblacion") %>
</div>
</section>
<h1 class="title" align="center">Reporte de Efectividad en Cotizaciones</h1>
<form action="Fcotlefe.asp" name="FindCli" method="post">
<table class="normal">
<%
Set Rs12 = server.CreateObject("ADODB.Recordset")
Sql12="SELECT CVEVEND, NOMVEND FROM VENDEDORES ORDER BY NOMVEND;"
Rs12.Open Sql12,cn1,1,2
%>
<tr>
<td colspan="2" align="center"><strong>Fecha:</strong></td>
</tr>
<tr>
<td>Del:
<input type="text" name="Finicial" id="Finicial" value="<%= date() - (day(date() -1)) %>">
</td>
<td>Al:
<input type="text" name="Ffinal" id="Ffinal" value="<%= date() %>">
</td>
</tr>
<tr>
<td colspan="2" align="center"><strong>Vendedor:</strong></td>
</tr>
<tr>
<td colspan="2">
<%
If Rs11.Eof Then
Response.Write("***** No Existe el Catálogo de Vendedores")
Else
%>
<select name="VENDEDOR">
<option value="0">Todos</option>
<%
Do While not Rs12.EOF
%>
<option value="<%= Rs12("CVEVEND") %>"><%= Rs12("NOMVEND") %></option>
<%
Rs12.MoveNext
Loop
%>
</select>
<% End If %>
</td>
</tr>
<tr>
<td colspan="2" align="center"><strong>
Descripcion del Producto:</strong><br>
<input type="text" name="CodLike" id="CodLike" size="25" value="">
</td>
</tr>
<tr>
<td colspan="2" align="center"><br>
<input type="submit" value="Buscar">
</td>
</tr>
</table>
</form>
<hr>
<%
Rs11.close
If Err.Number <> 0 Then
%>
<div class="errorBox">
<strong>Error:</strong><br>
Número: <%= Err.Number %><br>
Descripción: <%= Err.Description %><br>
Origen: <%= Err.Source %><br>
LÃnea: <%= Err.Line %><br>
</div>
<%
Else
'****** FIN DE LOS ERRORES ***
End If
%>
</body>
</html>
<%
'FIN DE SESION
End If
%>