logAdmin.php ( página de log in en php )
edtiableAdmin.php (página que edita el contenido de la ppagina)
solo se debería tener acceso a la página edtiableAdmin.php una ves logeado en la página logAdmin.php, después de probar mi log in y ver que si funcionaba intenté acceder a edtiableAdmin.php con solo poner el nombre en el link o sea :
http://localhost/SIBUS/admin/logAdmin.php
lo cambíe por http://localhost/SIBUS/admin/editableAdmin.php y me dí con la sorpresa de que pude tener acceso sin tener que logearme
mi pregunta es.. como puedo hacer para que esa página sea solo vista una ves logeado desde la página anterior y no sea vista com yo intenté hacerla?
logAdmin.php
Código PHP:
Ver original
<?php ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Design by Ing. Cristiam Alberto Girano Corbera and helped & Ing. Einstein Manuel Novoa Tafur --> <title>Login Admin</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" media="screen" href="css/reset.css"> <link rel="stylesheet" type="text/css" media="screen" href="css/style.css"> <link rel="stylesheet" type="text/css" media="screen" href="css/grid_12.css"> <link href='http://fonts.googleapis.com/css?family=Condiment' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Oxygen' rel='stylesheet' type='text/css'> <script src="js/jquery-1.7.min.js"></script> <script src="js/jquery.easing.1.3.js"></script> <!--[if lt IE 8]> <div style=' clear: both; text-align:center; position: relative;'> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"> <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /> </a> </div> <![endif]--> <!--[if lt IE 9]> <script type="text/javascript" src="js/html5.js"></script> <link rel="stylesheet" type="text/css" media="screen" href="css/ie.css"> <![endif]--> </head> <body> <div class="main"> <!--==============================header=================================--> <header> <h1><a href="index.html"><img src="images/logo.png" alt=""></a></h1> <div class="wrapper"> <?php echo '<b>'.$_SESSION['k_username'].'</b>.'; echo '<p><a href="logout.php">Salir</a></p>'; }else{ echo 'Inicie Sesión'; } ?> <!-- <form id="form-search" method="post"> <input type="text" value="Busqueda Rápida..." onBlur="if(this.value=='') this.value='Busqueda Rápida...'" onFocus="if(this.value =='Busqueda Rápida...' ) this.value=''" /> <a href="#" onClick="document.getElementById('form-search').submit()" class="search_button"></a> </form>--> </div> <div class="clear"></div> <nav class="box-shadow"> <div> <ul class="menu"> <li class="home-page"><a href="http://www.forosdelweb.com/f18/index.html"><span></span></a></li> <li class="current"><a href="logAdmin.html"> Administrador </a></li> <!-- <li><a href="about.html">Acerca</a></li> <li><a href="services.html">Servicios</a></li> <li><a href="projects.html">Directorio</a></li> <li><a href="clients.html">Interés</a></li> <li><a href="http://intranet.usmp.edu.pe/procesoAcademico/loginSecure.aspx" target="_blank">Intranet</a></li>--> </ul> <div class="social-icons"> <span>Siguenos:</span> <a href="#" class="icon-3"></a> <a href="http://www.facebook.com/pages/Lima-Peru/Sistema-de-Bibliotecas-USMP-SIBUS/210703675893" class="icon-2"></a> <!--<a href="#" class="icon-1"></a>--> </div> <div class="clear"></div> </div> </nav> </header> <!--==============================content================================--> <section id="content"><div class="ic"></div> <div class="container_12"> <div class="grid_12"> <div class="wrap pad-3"> <div class="block-5"> <h3 class="p5"> </h3> <div class=""><img src="images/adminLog.jpg"/> </div> <dl> <dt></dt> <dd><span></span></dd> <dd><span> </span></dd> <dd><span> </span></dd> <dd><span> </span> </dl> </div> <div class="block-6"> <p align="left"><br> <h3>Acceso a la Administración del SIBUS</h3></br> <?php echo 'Bienvenido '; echo '<b>'.$_SESSION['k_username'].'</b>.'; echo '<p><a href="logout.php">Salir</a></p>'; }else{ echo '<form id = "logIn" method="post" action="validar_usuario.php"> <table width="450" border="0" cellpadding="0" cellspacing="0" background="#68c1d1"> <tr> <th colspan="2" scope="row"></th> <td width="50"> </td> </tr> <tr> <th colspan="2" scope="row">ID</th> <td width="68"> </td> <td width="62"> </td> <td width="232"> </td> </tr> <tr> <th width="30" scope="row"> </th> <td colspan="3"><label for="ID"></label> <input type="text" name = "usuario" value=""></td> <div id = "errDiv"> </div> <td> </td> </tr> <tr> <th colspan="5" scope="row"> </th> </tr> <tr> <th colspan="2" scope="row">CLAVE</th> <td> </td> <td> </td> <td> </td> </tr> <tr> <th scope="row"> </th> <td colspan="3"><label for="CLAVE"></label> <input type="password" name = "password"></td> <td> </td> </tr> <tr> <th scope="row"> </th> <td width="58"> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <th scope="row"> </th> <td><a href="#" class="button"><input style="color: #003366; background-color: #68c1d1" type="submit" name="enviar" id="enviar" value="Enviar"></td> <td> </td> <td> </td> </tr> <tr> <th scope="row"> </th> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> </form>'; } ?> <div id = "errDiv"> </div> </div> </div> </div> <div class="clear"></div> </div> </section> </div> <!--==============================footer=================================--> <footer> <p>Sede Lima: Ciudad Universitaria Jr. Las Calandrias s/n Santa Anita Lima - Perú, <p>Teléfono: (511) 362-0064 anexo 3191, Correo: [email protected]</p> <p>Copyright © 2013 Todos los derechos reservados</p> </footer> </body> </html>