Ver Mensaje Individual
  #7 (permalink)  
Antiguo 02/02/2009, 04:30
Avatar de NazcaiN
NazcaiN
 
Fecha de Ingreso: diciembre-2008
Ubicación: en mi pueblo
Mensajes: 228
Antigüedad: 15 años, 4 meses
Puntos: 8
Respuesta: por que se ve mi página asi?? (hay algo de urgencia)

el codigo que le tengo metido es éste y creo que si está cerrado y que tiene soporte php, las letras rojas son las que se ven en mi página:

<?php

include("config.php");

error_reporting(E_ALL ^ E_NOTICE);

session_start();

$msg = Array();
$error = Array();

function addUser(){
if (empty($_POST)) return false;
global $config, $msg, $error;
if (empty($_POST['login'])) $error[] = 'Error, You forgot to enter a account name!';
if (empty($_POST['password'][0]) || empty($_POST['password'][1])) $error[] = 'Error, You forgot to enter a password!';
if ($_POST['password'][0] !== $_POST['password'][1]) $error[] = 'Password does not match!';
if (!empty($error)) return false;
$db = @mysql_connect($config['mysql_host'], $config['mysql_user'], $config['mysql_pass']);
if (!$db) return $error[] = 'Database: '.mysql_error();
if (!@mysql_select_db($config['mysql_dbname'], $db)) return $error[] = 'Database: '.mysql_error();
$query = "SELECT `acct` FROM `accounts` WHERE `login` = '".mysql_real_escape_string($_POST['login'])."'";
$res = mysql_query($query, $db);
if (!$res) return $error[] = 'Database: '.mysql_error();
if (mysql_num_rows($res) > 0) return $error[] = 'Username already in use.';
//Modified by Jerq
$query = "INSERT INTO `accounts` (`login`,`password`,`lastip`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."','".mysql_real_escape_string($_POST['tbc'][0])."')";
//Modified by Jerq

$res = mysql_query($query, $db);
if (!$res) return $error[] = 'Database: '.mysql_error();
$msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POS T['login']).'</strong></span> has been created!';
mysql_close($db);
return true;
}

addUser();
{

?>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Pagina de registro de cuentas</title>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<style type="text/css" media="screen">
@import url(server_stats.css);.Estilo1 {color: #000000}
.Estilo2 {color: #1B1B1B}
</style>
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
</head>
<body>

<center>
<div class="logo">
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div style="width:300px">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr class="head"><th colspan="2"><span class="Estilo2">Creacion de Cuentas</span></th></tr>
<tr>
<th><span class="Estilo1">Nombre de usuario: </span></th>
<td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"/></td>
</tr>
<tr>
<th><span class="Estilo1">Contraseña: </span></th>
<td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
</tr>
<tr>
<th><input name="button" type="button" class="button" onClick="history.go(-1)" value="Atras" /></th>
<td align="center"><input name="Input" type="submit" class="button" onClick="go to lista de precios.php" value="entrar"/></td>
</tr>
<tr>
<th height="25">&nbsp;</th>
<td align="center">&nbsp;</td>
</tr>

<th height="25">&nbsp;</th>
<td align="center">&nbsp;</td>
</table>
</form>

<?php
if (!empty($error)){
echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">';
foreach($error as $text)
echo $text.'</br>';
echo '</td></tr></table>';
};
if (!empty($msg)){
echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">';
foreach($msg as $text)
echo $text.'</br>';
echo '</td></tr></table>';
exit();
};
?>

</div>
</center>

<p style="width: 220px; font-weight: bold; color: #29b503; font-family: tahoma, arial, sans; font-size: 13px;">

<p style="width: 220px; font-weight: bold; color: #29b503; font-family: tahoma, arial, sans; font-size: 13px;"><br />
<br />
<br />
</body>
</html>

Última edición por NazcaiN; 02/02/2009 a las 05:17