Ver Mensaje Individual
  #6 (permalink)  
Antiguo 01/04/2004, 11:11
Avatar de DkarnDuuk
DkarnDuuk
 
Fecha de Ingreso: marzo-2004
Mensajes: 626
Antigüedad: 21 años, 1 mes
Puntos: 2
calendario y bd access

lo primero daros las gracias por ayudarme, no creia q iba a recibir tanta ayuda y tan rapido.

Lo primero decir q todavia ando muy perdido, pero bueno. luego a GustavoPY q no encuentro el articulo q me dice (si me dijera como llegar hasta ahi se lo agradeceria).

este es el codigo de la pagina manten.asp (krypton), a la q tengo acoplada calendario.asp por si le sirve para q pueda ayudarme:

y para acabar, si alguien me puede decir algun sitio web para bajarme un buen manual de asp o si me recomiendan comprarme un manual

<html>
<head>
<title></title>
<script language="javascript">
var paso=0
function eliminarregistro()
{
if (document.datos.dia.value=="")
{alert("ERROR: Debe seleccionar un menú/Aukera ezazu menu bat")}
else
{
document.datos.action="regezabatu.asp"
document.datos.submit()
}
}

function guardarcambios()
{
document.datos.action="eguneratu.asp"
document.datos.submit()
}

function cargar()
{
paso=paso+1
if (paso==2)
{
paso=0
document.datos.action="manten.asp"
document.datos.submit()
}
}

function nuevomenu()
{
window.location="nube.asp"
}

function borrartabla()
{
alert("AVISO: Eliminados todos los menus/Menu guztiak ezabatuta")
window.location="ezabatu.asp"
}
</script>

</head>
<body>
<%

Session("situacion")="manten.asp"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "alkartu"
Set Conn2 = Server.CreateObject("ADODB.Connection")

SQL="Select * from menu"
set RS = Conn.Execute(SQL)
%>

<table>
<tr>
<td>
<form name="datos" method="post" action="regezabatu.asp">
<table>
<tr align="center">
<td><b>Dia/Eguna</b>
<select name="dia" onClick="cargar()">
<option value="" width="300">.: Seleccione Fecha/Aukeratu Data :.</option>
<%Do While Not RS.Eof %>
<%if request.form("dia")=RS("dia") then%>
<option value="<%=RS("dia")%>" selected><%=RS("dia")%></option>
<%else%>
<option value="<%=RS("dia")%>"><%=RS("dia")%><%= + " " & RS("mes")%></option>
<% end if
RS.movenext
Loop
%>
</select>
</td>
</tr>
<%
if request.form("dia")<>"" then
SQL1="Select * from menu where dia='"&request.form("dia")&"'"
set RS1 = Conn.Execute(SQL1)
mes=RS1("mes")
primero=RS1("primero")
segundo=RS1("segundo")
postre=RS1("postre")
calorias=RS1("calorias")
proteinas=RS1("proteinas")
lipidos=RS1("lipidos")
hidratos=RS1("hidratos")

probar=request.form("dia")
egun=right(probar,2)
select case probar
case "lunes "&egun probar="astelehena "&egun
case "lunes"&egun probar="astelehena"&egun
case "martes "&egun probar="asteartea "&egun
case "martes"&egun probar="asteartea"&egun
case "miercoles "&egun probar="asteazkena "&egun
case "miercoles"&egun probar="asteazkena"&egun
case "jueves "&egun probar="osteguna "&egun
case "jueves"&egun probar="osteguna"&egun
case "viernes "&egun probar="ostirala "&egun
case "viernes"&egun probar="ostirala"&egun
case "sabado "&egun probar="larunbata "&egun
case "sabado"&egun probar="larunbata"&egun
case "domingo "&egun probar="igandea "&egun
case "domingo"&egun probar="igandea"&egun
end select

SQL2="Select * from menu where dia ='"&probar&"'"
set RS1 = Conn.Execute(SQL2)

hila=RS1("mes")
lehen=RS1("primero")
bigarren=RS1("segundo")
postrea=RS1("postre")
end if
%>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;Elige el dia en castellano/Aukera ezazu eguna erderaz
<tr align="center">
<td><b>Mes/Hila</b>
<input type="text" name="mes" value="<%=mes%>" size="20"> <b>/</b>
<input type="text" name="hila" value="<%=hila%>" size="20">
</td>
</tr>
<tr align="center">
<td><b>Primer Plato/Lehenengo Platerra</b>
<input type="text" name="primero" value="<%=primero%>" size="20"> <b>/</b>
<input type="text" name="lehen" value="<%=lehen%>" size="20"></td>
</tr>
<tr align="center">
<td><b>Segundo Plato/Bigarren Platerra</b>
<input type="text" name="segundo" value="<%=segundo%>" size="20"> <b>/</b>
<input type="text" name="bigarren" value="<%=bigarren%>" size="20"></td>
</tr>
<tr align="center">
<td><b>Postre/Postrea</b>
<input type="text" name="postre" value="<%=postre%>" size="20"> <b>/</b>
<input type="text" name="postrea" value="<%=postrea%>" size="20"></td>
</tr>
<tr align="center">
<td><b>Calorias/Kaloriak</b>
<input type="text" name="calorias" value="<%=calorias%>" size="20"></td>
</tr>
<tr align="center">
<td><b>Proteínas/Proteinak</b>
<input type="text" name="proteinas" value="<%=proteinas%>" size="20"></td>
</tr>
<tr align="center">
<td><b>Lípidos/Lipidoak</b>
<input type="text" name="lipidos" value="<%=lipidos%>" size="20"></td>
</tr>
<tr align="center">
<td><b>Hidratos/Hidratoak</b>
<input type="text" name="hidratos" value="<%=hidratos%>" size="20"></td>
</tr>
<tr>
<td colspan=2>
<center><table>
<tr align="center">
<td><input type="button" value="GUARDAR/GORDE" onclick="guardarcambios()"></td>
<td><input type="button" value="NUEVO/BERRI" onclick="nuevomenu()"></td>
<td><input type="button" value="ELIMINAR/KENDU" onclick="eliminarregistro()"></td>
</tr>
<tr align="center">
<td colspan=3><center><input type="button" value="BORRAR TODOS LOS MENUS/EZABATU MENU GUZTIAK" onclick="borrartabla()"></center></td>
</tr>
</table></center>
</td>
</tr>
</table>

</form>



</td>


<td valign="middle">
<!--#include file="calendario.asp"-->
</td>

</tr>
</table>
<%Conn.close

if Session("operacion")="eliminar" then
response.write("<script lenguaje='javascript'>alert('Menu Eliminado/Menua Ezabatuta')</script>")
Session("operacion")=""
end if
%>

<a href="../cast/comedor1.asp">SALIR AL MENU</a><B>/</B><a href="../eusk/jantoki1.asp">IRTEN MENURA</a>
</body>
</html>