Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/05/2008, 23:51
Scarlet_781
 
Fecha de Ingreso: abril-2008
Mensajes: 9
Antigüedad: 16 años
Puntos: 0
Exclamación Re: Problema con el registro de usuario

Hola
el login 1
<?php require_once('Connections/mgold.php');
$midioma_objetos = $_GET['idioma'];

// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

$loginFormAction = $_SERVER['PHP_SELF']."?idioma=".$_GET['idioma']."&opcion=".$_GET['opcion']."";
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if ((isset($_POST["MM_login"])) && ($_POST["MM_login"] == "form1")) {
$loginUsername=$_POST['usuario'];
$password=$_POST['contrasena'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "home.php?idioma=" . $_GET['idioma'] . "&usuario=$loginUsername";
$MM_redirectLoginFailed = "login1.php?idioma=" . $_GET['idioma'] . "&opcion=" . $_GET['opcion'] ."";
$MM_redirecttoReferrer = false;
mysql_select_db($database_mgold, $mgold);

$LoginRS__query=sprintf("SELECT username, password FROM uuarios WHERE username='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

$LoginRS = mysql_query($LoginRS__query, $mgold) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";

//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;

if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}

mysql_select_db($database_mgold, $mgold);
$query_objetos = sprintf("SELECT * FROM objetos_login WHERE objetos_login.idioma='%s'", $midioma_objetos);
$objetos = mysql_query($query_objetos, $mgold) or die(mysql_error());
$row_objetos = mysql_fetch_assoc($objetos);
$totalRows_objetos = mysql_num_rows($objetos);

mysql_select_db($database_mgold, $mgold);
$query_princ = "SELECT * FROM objetos_princ where idioma='".$midioma_objetos."'";
$princ = mysql_query($query_princ, $mgold) or die(mysql_error());
$row_princ = mysql_fetch_assoc($princ);
?>

<html>
<head>
<title>Velas Club Members</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
background-color: #A9A381;
}
th {
color:#993300;
}
-->
</style>
<link href="estilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: underline;
color: #FFFFFF;
}
a:active {
text-decoration: none;
}
.Estilo1 {
color: #336633;
font-weight: bold;
font-style: italic;
font-family: 'Century Schoolbook';
font-size: 18px;
}
.Estilo3 {
font-size: 14px;
font-weight: bold;
font-style: italic;
}
.Estilo7 {font-size: 20px}
-->
</style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<table width="770" height="42" border="0" align="center">
<tr>
<th height="38" scope="col">
<table width="30%" border="0" align="right">
<tr>
<td width="29%" valign="bottom" ><span id="splogin" onMouseOver="splogin.style.cursor='pointer';splogi n.style.color='#0033FF'" onmouseout="splogin.style.color='#000000'" style="cursor:default" onClick="login.style.visibility='visible';forget.s tyle.visibility='hidden'"><font color="#993300" size="1" face="Geneva, Arial, Helvetica, sans-serif"><?php echo $row_princ['td_login']; ?></font></span></td>
<td width="30%" valign="bottom" ><span id="spremem" onMouseOver="spremem.style.cursor='pointer';spreme m.style.color='#0033FF'" onmouseout="spremem.style.color='#000000'" style="cursor:default" onClick="login.style.visibility='hidden';forget.st yle.visibility='visible'"><font color="#993300" size="1" face="Geneva, Arial, Helvetica, sans-serif"><?php echo $row_princ['td_remember']; ?></font></span></td>
<td width="30%" valign="bottom" ><span id="spregis" onMouseOver="spregis.style.cursor='pointer';spregi s.style.color='#0033FF'" onmouseout="spregis.style.color='#000000'" style="cursor:default" onClick="login.style.visibility='hidden';forget.st yle.visibility='visible'"><font color="#993300" size="1" face="Geneva, Arial, Helvetica, sans-serif"><?php echo $row_princ['td_register']; ?></font></span></td>
</tr>
</table></th>
</tr>
</table>
<table width="770" height="490" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th height="490" align="center" valign="top" scope="col"><table width="100%" height="225" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="225" align="center" valign="top" scope="col">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="220" align="baseline">
<param name="movie" value="flash/intro.swf"/>
<param name="quality" value="high" /><param name="SCALE" value="exactfit">
<embed src="flash/intro.swf" width="770" height="220" align="baseline" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit" ></embed>
</object> </th>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="280" align="center" valign="top" scope="col">
<table width="270" border="0" style="table-layout:fixed">
<tr>
<th width="900" height="50" class="Estilo1" scope="col"><div align="center" class="Estilo1 Estilo7"><?php echo $row_objetos['Bienvenido']; ?></div></th>
</tr>
</table>
<table style="table-layout:fixed" border="0" class="tit_login">
<tr>
<th width="495" valign="middle" style="font-Family:'Century Schoolbook';font-size:13px;" scope="col"><span class="Estilo3"><?php echo $row_objetos['tit_pag']; ?></span></th>
</tr>
</table>
<!--**************************** Div para el login -->
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
<form ACTION="" method="POST" name="form1" id="form1">
<script>
var ancho=document.body.offsetWidth;
left = (ancho-350)/2;
document.write('<div id="login" style="position:absolute; width:300; top:350px; left:'+left+'px; visibility:hidden" align="center">');
</script>
<p>&nbsp;</p>
<table style="table-layout:fixed" border="0" class="txt_login" >
<tr>
<th align="right" valign="middle" ><?php echo $row_objetos['usuario']; ?></th>
<th align="left" valign="middle" ><input name="usuario" type="text" class="formulario" id="usuario" size="10" maxlength="10" /></th>
</tr>
</table>
<table style="table-layout:fixed" border="0" class="txt_login" >
<tr>
<th align="right" valign="middle" ><?php echo $row_objetos['contrasena']; ?></th>
<th align="left" valign="middle" ><input name="contrasena" type="password" class="formulario" id="contrasena" size="10" maxlength="10" /></th>
</tr>
</table>
<table style="table-layout:fixed" border="0" class="formulario">
<tr>
<th width="182" height="37" align="center" valign="bottom" scope="col"><input name="Submit" type="submit" class="formulario" value="<?php echo $row_objetos['boton']; ?>" />
<input name="idioma" type="hidden" id="idioma" value="<?php echo $_POST['idioma']; ?>" />
<input name="idioma" type="hidden" id="opcion" value="<?php echo $_POST['opcion']; ?>" />
<input name="MM_login" type="hidden" id="MM_login" value="form1" /> </th></tr>
</table>

</div>
</form>