Error:
Código HTML:
Ver originalWarning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/sidarco/public_html/intranet/cover/header.php:4) in /home/sidarco/public_html/intranet/sec/inicio.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sidarco/public_html/intranet/cover/header.php:4) in /home/sidarco/public_html/intranet/sec/inicio.php on line 2
Codigo:
INICIO.PHP
Código PHP:
Ver original<?php
require_once('Connections/config.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
doubleval($theValue) : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$query_Recordset1 = "SELECT * FROM FT_USUARIOS";
$colname_Recordset2 = "-1";
if (isset($_SESSION['MM_username'])) { $colname_Recordset2 = $_SESSION['MM_username'];
}
$query_Recordset2 = sprintf("SELECT usuario FROM FT_USUARIOS WHERE usuario = %s", GetSQLValueString
($colname_Recordset2, "text")); ?>
<?php
// *** Validate request to login to this site.
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['usuario'])) { $loginUsername=$_POST['usuario'];
$password=$_POST['pass'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "index.php?seccion=welcome";
$MM_redirectLoginFailed = "index.php?seccion=falleuser";
$MM_redirecttoReferrer = false;
$LoginRS__query=sprintf("SELECT id_cliente, primer_apellido FROM ft_clientes WHERE id_cliente=%s AND primer_apellido=%s", GetSQLValueString($loginUsername, "int"), GetSQLValueString($password, "text"));
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 ); }
}
?>
<div id="content-box">
<div class="padding">
<div class="login" id="element-box">
<div class="t">
<div class="t">
<div class="t"></div>
</div>
</div>
<div class="m">
<h1>Ingreso de Usuarios Registrados</h1>
<div id="section-box">
<div class="t">
<div class="t">
<div class="t"></div>
</div>
</div>
<div class="m">
<form ACTION="<?php echo $loginFormAction; ?>" style="clear: both;" id="form-login" name="login" method="POST">
<p id="form-login-username">
<label for="modlgn_username">Usuario</label>
<input type="text" size="15" class="inputbox" id="modlgn_username" name="usuario">
</p>
<p id="form-login-password">
<label for="modlgn_passwd">Contraseña</label>
<input type="password" size="15" class="inputbox" id="modlgn_passwd" name="pass">
</p>
<p style="clear: both;" id="form-login-lang">
<div class="button_holder">
<div class="button1">
<div class="next">
<a onclick="login.submit();">
Entrar</a>
</div>
</div>
</div>
<div class="clr"></div>
<input type="submit" value="Entrar" style="border: 0; padding: 0; margin: 0; width: 0px; height: 0px;">
</form>
<div class="clr"></div>
</div>
<div class="b">
<div class="b">
<div class="b"></div>
</div>
</div>
</div>
<p>Ingresa un nombre de usuario y contraseña validos para acceder al Sistema.</p>
<p>
<a href="javascript:history.back(1)">Regresar a la Pagina Anterior</a>
</p>
<div id="lock"></div>
<div class="clr"></div>
</div>
<div class="h_green" id="border-top">
<div>
<div>
<div class="adminform">Insurance Broker Sistem By ARTEM LABS, CA</div>
</div>
</div>
</div>
<div class="b">
<div class="b">
<div class="b"></div>
</div>
</div>
</div>
<div class="clr"></div>
</div>
</div>
<div id="border-bottom"><div><div></div></div>
</div>
</body><?php
?>