Академический Документы
Профессиональный Документы
Культура Документы
php
<html>
<head>
<title>Control Dieta Batallon</title>
</head>
<body>
<center><h1>Broker's intranet</h1></center>
<form action="control.php" method="post">
<table align="center" width="225" cellspacing="2" cellpadding="2" border="0">
<tr>
<td colspan="2" align="center" bgcolor=#cccccc>Introduce nombre de usuario</td>
</tr>
<tr><td> </td></tr>
<tr>
<td align="right">USER: </td>
<td><input type="Text" name="user" size="14" maxlength="50"></td>
</tr>
<tr>
<td align="right">PASSWORD: </td>
<td><input type="password" name="password" size="14" maxlength="50"></td>
</tr>
<tr>
<BR>
<td colspan="2" align="center"><input type="Submit" value="Submit"></td>
</tr>
</table>
</form>
</body>
</html>
control.php
<html>
<head>
<title>Brokers OnLine</title>
</head>
<body>
<br>
<?php
$conexio = pg_connect("host=localhost port=5432 dbname=postgres password=marlon1
973
user=postgres") or die("<BR>ERROR accedint a la BD!<BR>");
$sql = "SELECT COUNT(*) FROM client WHERE nick = '".$_POST['user']."' AND
password = '".$_POST['password']."'";
$resultat_set = pg_Exec ($conexio, $sql);
$TotalRegistres = pg_result($resultat_set, 0);
pg_close($conexio);
if ($TotalRegistres == 0) {
echo "Autentication Error: ";
?> <a href="autentica.php">Back to home</a>
<?php
}
else {
header("location: captura.php");
}
?>
</body>
</html>
captura.php
<html>
<head>
<title>Control Dieta Ejercito</title>
</head>
<body>
<center><h1>Introduccion Datos</h1></center>
<form action="dietas.php" method="post">
<table align="center" width="250" cellspacing="2" cellpadding="2" border="0">
<tr>
<td colspan="2" align="center" bgcolor=#cccccc>Operation details</td>
</tr>
<tr>
<td align="right">Numero de Regimiento: </td>
<td><input type="Text" name="id" size="14" maxlength="50"></td>
</tr>
<tr>
<td align="right">Numero de Batallon: </td>
<td><input type="Text" name="id_reg" size="14" maxlength="50"></td>
</tr>
<tr>
<td align="right">Fecha: </td>
<td><input type="Text" name="fechapedido" size="14" maxlength="50"></td>
</tr>
<tr>
<td align="right">Id. Tipo de Comida: </td>
<td><input type="Text" name="tipocomida" size="14" maxlength="50"></td>
</tr>
<tr>
<td align="right">Id. Momento Comida: </td>
<td><input type="Text" name="nombremomento" size="14" maxlength="50"></td>
</tr>
<tr>
<td align="right">Numero de Soldados: </td>
<td><input type="Text" name="integrantes" size="14" maxlength="50"></td>
</tr>
</table>
</form>
</body>
</html>
dietas.php
<html>
<head>
<title>Control Dieta</title>
</head>
<body>
<br>
<?php
$conexio = pg_connect("host=localhost port=5432 dbname=postgres password=marlon1
973
user=postgres") or die("<BR>ERROR open BD!<BR>");
// Retrieve ticket id from short nom