en sidebar.php aun no hay nada
en sistem.php
Código PHP:
Ver original<?
if(empty($_GET['seccion'])) { include("sec/inicio.php");
} else {
include("sec/".basename($_GET['seccion']).".php"); } else {
echo '<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=85%><b>Error 404</b><br><br>No se encuentra el archivo, intentelo de nuevo o Pruebe mas tarde </b></td>
</tr>
</table>';
}
}
?>
inicio.php que es el de default ensistema.php
Código PHP:
Ver original<?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;
}
}
$colname_acceso_usuarios = "-1";
if (isset($_SESSION['MM_Username'])) { $colname_acceso_usuarios = $_SESSION['MM_Username'];
}
$query_acceso_usuarios = sprintf("SELECT id_usuario, primer_apellido, segundo_apellido, primer_nombre, segundo_nombre, usuario, pass, email, cargo, nivel FROM ft_usuarios WHERE usuario = %s", GetSQLValueString
($colname_acceso_usuarios, "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 usuario, pass FROM ft_usuarios WHERE usuario=%s AND pass=%s", GetSQLValueString($loginUsername, "text"), 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>
<?php
?>
welcome.php si el loguin esta bien
Código PHP:
Ver original<?php
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); $isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized
("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&"; $MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer); header("Location: ". $MM_restrictGoTo); }
?>
<center><table width="100%" border="0" cellspacing="0">
<tr>
<td><table border="0" cellspacing="0">
<tr>
<td><center><h1>Bienvenido</h1></center><br /><center><? echo "".$_SESSION['MM_Username'] ;?></center><br /></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="700px" border="0" cellspacing="0">
<tr>
<td><a href="index.php?seccion=buscar">Busqueda</td>
<td>Financiamiento</td>
<td>Siniestros</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
y luego el footer que hay ya no hay ningun error