<%
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/Modulo5.css" rel="stylesheet" />
<link href="css/Buscador.css" rel="stylesheet" />
<script src="RGraph/RGraph.common.core.js"></script>
<script src="RGraph/RGraph.gauge.js"></script>
<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
Dim Porcentaje
'***** 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
Porcentaje = Rs11("Porcentaje")
%>
<Header>
<%= Rs11("Nombre") %><br>
<%= Rs11("Direccion") %>, <%= Rs11("colonia") %><br>
<%= Rs11("Poblacion") %>
</header>
<nav>
<!--#INCLUDE FILE="menuh.asp"-->
<br>
<!--#INCLUDE FILE="MenuCat.asp"-->
</nav>
<SECTION>
<CENTER>
<b>*** MODULO DE FACTURAS ***</B>
<br>
<br>
<Table id="KardexTd">
<Tr>
<Td Valign="Top" Align="Center">
<B>**** TIPO DE CAMBIO *****</B>
<%
'***** Conexion A la Tabla Empresa ****
Set Rs12 = Server.CreateObject("ADODB.Recordset")
Sql12="Select * from monedas;"
Rs12.Open Sql12,Cn1,1,2
%>
<Table id="BuscarCli">
<Tr Bgcolor="#76F99E">
<Td><B>Moneda</Td>
<Td><B>T_Cambio</Td>
</Tr>
<%
Do While Not Rs12.EOF
%>
<Tr Bgcolor="#76F99E">
<Td><B><%= Rs12("Desdiv") %></Td>
<Td Align="Right"><B><%= Rs12("Tcaven") %></Td>
</Tr>
<%
Rs12.Movenext
Loop
%>
</Table>
</Td>
<Td Valign="Top" Align="Center">
<canvas id="cvs" width="350" height="350">
[No canvas support]
</canvas>
<script>
new RGraph.Gauge({
id: 'cvs',
min: 0,
max: 100,
value: [<%= Porcentaje %>,0],
options: {
marginLeft: 15,
marginRight: 15,
marginTop: 15,
marginBottom: 15,
// Configure the top titles appearance
titleTop: '% Para enviar',
titleTopSize: 22,
titleTopFont: 'Impact',
titleTopColor: 'white',
titleTopSize: 24,
titleTopItalic: true,
// Configure the bottom titles appearance
titleBottom: 'Knots',
titleBottomSize: 14,
titleBottomItalic: true,
titleBottomFont: 'Impact',
titleBottomColor: '#ccc',
titleBottomPos: 0.4,
// The rest of the configuration for the Gauge chart - the needle,
// centerpin, tickmarks and the border
colorsRanges: [[120,215,'rgba(255,255,0,0.95)'], [120,70,'rgba(255,0,0,1']],
backgroundColor: 'black',
backgroundGradient: true,
centerpinColor: '#666',
needleSize: [null, 50],
needleColors: ['Gradient(transparent:white:white:white:white:white)', 'Gradient(transparent:#d66:#d66:#d66:#d66)'],
textColor: 'white',
tickmarksLargeColor: 'white',
tickmarksMediumColor: 'white',
tickmarksSmallColor: 'white',
borderOuter: '#666',
borderInner: '#333'
}
}).draw().responsive([
{maxWidth:null,css:{'float':'right'},parentCss:{textAlign:'none','float': 'right'}},
{maxWidth:300,css:{'float':'none'},parentCss:{textAlign:'center','float': 'none'}}
]);
</script>
<BR>
<b> <%= Porcentaje %> % </b>
</Td>
<Td Valign="Top" Align="Center">
<%
'***** Conexion A la Tabla Empresa ****
Set Rs14 = Server.CreateObject("ADODB.Recordset")
Sql14="Select * from galva;"
Rs14.Open Sql14,Cn1,1,2
%>
<b>*** COSTOS GALVANIZADOS ***</B>
<br>
<Table id="KardexTd">
<%
Do While Not Rs14.EOF
%>
<Tr Bgcolor="#9AF8F7">
<Td><B><%= Rs14("CampoLibre0") %></Td>
<Td><B><%= Rs14("CampoLibre1") %></Td>
<Td><B><%= Rs14("CampoLibre2") %></Td>
<Td><B><%= Rs14("CampoLibre3") %></Td>
</Tr>
<%
Rs14.Movenext
Loop
%>
</Table>
</Td>
</Tr>
</Table>
</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
%>