<%
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/IndicadorA.css" rel="stylesheet" />
<!-- JavaScript para enviar a una pagina emergente -->
<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, Cn2
Dim Rs11, Rs12, Rs13, Rs14, Rs15, Rs16, Rs17, Rs18, Rs19, Rs20, Rs21, Rs22, Rs23, Rs24, Rs25, Rs26, Rs27, Rs28, Rs29
Dim Sql11, Sql12, Sql13, Sql14, Sql15, Sql16, Sql17, Sql18, Sql19, Sql20, Sql21, Sql22, Sql23, Sql24, Sql25, Sql26, Sql27, Sql28, Sql29
'***** 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 Base de Datos
Set Cn2 = Server.CreateObject( "ADODB.Connection" )
Cn2.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID=ADMINDMEX;PWD=IW2BF01;Database="& Session("Mybussiness") &""
'***** Conexion A la Tabla Empresa ****
Set Rs11 = Server.CreateObject("ADODB.Recordset")
Sql11="Select * from Empresa;"
Rs11.Open Sql11,Cn1,1,2
%>
<Header>
<%= Rs11("Nombre") %><br>
<%= Rs11("Direccion") %>, <%= Rs11("colonia") %><br>
<%= Rs11("Poblacion") %>
</header>
<SECTION>
<CENTER>
<BR><BR>
<%
Dim Folio
Dim Area
Folio = Request("Folio")
Set Rs12 = server.CreateObject("ADODB.Recordset")
Sql12 = "Select Numlog, Arealog, Favlog, Ftllog, Plalog, Peslog, VolLog, Comlog " &_
"From Logistica " &_
"where Numlog = "& Folio &" " &_
"Order by Numlog;"
Rs12.Open Sql12,Cn1,1,2
If Rs12("Arealog") = 1 Then
Area = "Almacen"
Else If Rs12("Arealog") = 2 Then
Area = "Internacional"
Else If Rs12("Arealog") = 3 Then
Area = "Nacional"
Else If Rs12("Arealog") = 4 Then
Area = "Ventas"
Else If Rs12("Arealog") = 5 Then
Area = "Victaulic"
End If
End If
End If
End If
End If
%>
Folio: <%= Folio %>
<Form action="LogUp.asp" name="LogUp" method="Post">
<Table Id="TbLinea">
<Tr>
<Td Id="TdLineaHeader">Area</Td>
<Td Id="TdLineaHeader">Dia</Td>
<Td Id="TdLineaHeader">Peso</Td>
<Td Id="TdLineaHeader">Plataformas</Td>
</Tr>
<Tr>
<Td Id="TdLineaHeader">
<SELECT NAME="AreaLog" Id="TdProveedorLeft">
<optgroup label="Area">
<OPTION Id="TdMesLeft" value="<%= Rs12("Arealog") %>"><%= Area %></option>
<optgroup label="Cambiar:">
<OPTION value="1">Almacen</option>
<OPTION value="2">Internacional</option>
<OPTION value="3">Nacional</option>
<OPTION value="4">Ventas</option>
<OPTION value="5">Victaulic</option>
</select>
</Td>
<Td Id="TdLineaHeader">
<input Type="Text" Value="<%= Rs12("Ftllog") %>" name="Ftllog" Id="TdProveedorRight" onChange="javascript:this.value=this.value.toUpperCase();">
<input Type="Hidden" Value="<%= Rs12("Numlog") %>" name="Folio" Id="TdProveedorRight" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
<Td Id="TdLineaHeader">
<input Type="Text" Value="<%= Rs12("Peslog") %>" name="PesoLog" size="10" Id="TdProveedorRight" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
<Td Id="TdLineaHeader">
<input Type="Text" Value="<%= Rs12("Plalog") %>" name="Platalog" size="7" Id="TdProveedorRight" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
</Tr>
<Tr>
<Td Id="TdLineaHeader" Colspan="2">Volumen</Td>
<Td Id="TdLineaHeader" Colspan="2">Comentarios</Td>
</Tr>
<Tr>
<Td Id="TdLineaHeader" Colspan="2">
<textarea Id="TdProveedorLeft" name="VolumenLog" cols="50" rows="8" onChange="javascript:this.value=this.value.toUpperCase();"><%= Rs12("Vollog") %></textarea>
</Td>
<Td Id="TdLineaHeader" Colspan="2">
<textarea Id="TdProveedorLeft" name="ComentaLog" cols="50" rows="8" onChange="javascript:this.value=this.value.toUpperCase();"><%= Rs12("Comlog") %></textarea>
</Td>
</Tr>
<Tr>
<Td Colspan="4" Align="Center">
<button type="submit" name="Buscar" id="TdProveedorLeft"/> Grabar </button>
</Td>
</tr>
</Table>
</Form>
</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
%>