<%
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" />
<link href="css/Pestana.css" rel="stylesheet" />
<!-- Scripts para la grafica Meses -->
<script src="RGraph/RGraph.svg.common.core.js"></script>
<script src="RGraph/RGraph.svg.common.tooltips.js"></script>
<script src="RGraph/RGraph.svg.common.bar.js"></script>
<script src="RGraph/RGraph.svg.common.line.js"></script>
<script src="RGraph/RGraph.svg.common.pie.js"></script>
<script src="RGraph/RGraph.svg.bar.js"></script>
<script src="RGraph/RGraph.svg.Pie.js"></script>
<!-- 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>
<Form action="Prvnew.asp" name="prvnew" method="Post">
<!--TÃtulo-->
<h1>Alta de Proveedores</h1>
<br>
<!--Contenedor-->
<div id="container">
<!--Pestaña 1 activa por defecto-->
<input id="tab-1" type="radio" name="tab-group" checked="checked" readonly />
<label for="tab-1">Datos Fiscales</label>
<!--Pestaña 2 inactiva por defecto-->
<input id="tab-2" type="radio" name="tab-group" readonly />
<label for="tab-2">Datos Credito</label>
<!--Pestaña 3 inactiva por defecto-->
<input id="tab-3" type="radio" name="tab-group" readonly />
<label for="tab-3">Datos Generales</label>
<!--Contenido a mostrar/ocultar-->
<div id="content">
<!--Contenido de la Pestaña 1-->
<div id="content-1">
<Table Border="0">
<Tr>
<Td colspan="3">
<input tabindex="1" type="Text" placeholder="Clave" Title="Clave" name="Clave" id="TdProveedorLeft" value="" Size="10px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td colspan="3">
<input tabindex="2" type="Text" placeholder="Nombre" Title="Nombre" name="Nombre" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td colspan="3">
<input tabindex="3" type="Text" placeholder="Direccion" Title="Direccion" name="Direccion" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="4" type="Text" placeholder="Colonia" Title="Colonia" name="Colonia" id="TdProveedorLeft" value="" Size="30px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
<Td>
<input tabindex="5" type="Text" placeholder="Poblacion" Title="Poblacion" name="Poblacion" id="TdProveedorLeft" value="" Size="25px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td>
<%
Set Rs12 = Server.CreateObject("ADODB.Recordset")
Sql12="SELECT * " &_
"FROM Estados " &_
"Order by Nomedo;"
Rs12.Open Sql12,Cn1,1,2
If Rs12.EOF Then
Else
%>
<Select tabindex="6" Id="TdProveedorLeft" Name="Estado">
<optgroup label="Estado:">
<%
Do While Not Rs12.EOF
%>
<OPTION Id="TdMesLeft" value="<%= Rs12("Nomedo") %>"><%= Rs12("Nomedo") %></option>
<%
Rs12.Movenext
Loop
%>
</select>
<%
End If
%>
</Td>
<Td>
<%
Set Rs13 = Server.CreateObject("ADODB.Recordset")
Sql13="SELECT * " &_
"FROM Paises " &_
"Order by CvePais;"
Rs13.Open Sql13,Cn1,1,2
If Rs13.EOF Then
Else
%>
<Select tabindex="7" Id="TdProveedorLeft" Name="Pais">
<optgroup label="Pais:">
<%
Do While Not Rs13.EOF
%>
<OPTION Id="TdMesLeft" value="<%= Rs13("Nompais") %>"><%= Rs13("Nompais") %></option>
<%
Rs13.Movenext
Loop
%>
</select>
<%
End If
%>
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="8" type="Text" placeholder="Codigo Postal" Title="Codigo Postal" name="Cpostal" id="TdProveedorLeft" value="" Size="12px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
<Td>
<input tabindex="9" type="Text" placeholder="RFC" Title="RFC" name="RFC" id="TdProveedorLeft" value="" Size="14px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
</Table>
</div>
<!--Contenido de la Pestaña 2-->
<div id="content-2">
<Table Border="0">
<Tr>
<Td>
<input tabindex="10" type="Text" placeholder="Dias Cred." Title="Dias Cred." name="Dias" id="TdProveedorLeft" value="" Size="15px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
<Td>
<input tabindex="11" type="Text" placeholder="Limite Cred." Title="Limite Cred." name="Limite" id="TdProveedorLeft" value="" Size="15px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="12" type="Text" placeholder="Dias Revision" Title="Dias Revision" name="Revision" id="TdProveedorLeft" value="" Size="20px" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
<Td>
<input tabindex="13" type="Text" placeholder="Dias Cobro" Title="Dias Cobro" name="Cobro" id="TdProveedorLeft" value="" Size="20px" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="14" type="Text" placeholder="Vendedor" Title="Vendedor" name="Vendedor" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="15" type="Text" placeholder="Telefono" Title="Telefono" name="Telefono" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="16" type="Text" placeholder="E-mail" Title="E-mail" name="Email" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();" required/>
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="17" type="Text" placeholder="Pagos" Title="Pagos" name="Pagos" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="18" type="Text" placeholder="Telefono" Title="Telefono" name="TelefonoP" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
</Tr>
<Tr>
<Td>
<input tabindex="19" type="Text" placeholder="E-mail" Title="E-mail" name="EmailP" id="TdProveedorLeft" value="" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();">
</Td>
</Tr>
</Table>
</div>
<!--Contenido de la Pestaña 3-->
<div id="content-3">
<Table Border="0">
<Tr>
<Td>
<Select tabindex="20" Id="TdProveedorLeft" Name="Tipo">
<optgroup label="Tipo:">
<OPTION Id="TdMesLeft" value="P">Proveedor</option>
<OPTION Id="TdMesLeft" value="F">Filial</option>
<OPTION Id="TdMesLeft" value="S">Sucursal</option>
</select>
</Td>
</Tr>
<Tr>
<Td>
<textarea placeholder="Observaciones" Title="Observaciones" name="Observaciones" id="TdProveedorLeft" rows="10" cols="80" onChange="javascript:this.value=this.value.toUpperCase();"></textarea>
</Td>
</Tr>
</Table>
</div>
</div>
</div>
<input tabindex="21" type="Hidden" placeholder="Proceso" Title="Proceso" name="Proceso" id="TdProveedorLeft" value="0" Size="60px" onChange="javascript:this.value=this.value.toUpperCase();">
<button tabindex="4" type="submit" name="Buscar" id="TdProveedorLeft"/>Grabar</button>
</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
%>