edi Posted November 17, 2009 Report Share Posted November 17, 2009 index.php <?php session_name (md5('SSS')); session_start (); $view = isset ( $_GET['view'] ) ? $_GET['view'] : NULL; require_once('header.php'); require_once('functions.php'); switch ($view) { default: echo "hellow world :D"; break; case pirmais: ..... break; case lalala: .... break; case login: echo '<center><form action="" method="POST" name="login" > Login<br/><input type="text" class="inp" name="eml" size="23" value="" /><br /> Password<br/><input type="password" size="23" /><br /> <input id="" class="" type="submit" name="login" value="Ienākt"/> </form></center>'; break; } require_once('footer.php'); ?> kā uztaisti tā, ja lietotājs nav ielogojies ar savu vai arī kādu cita loginu, tad vinam tiek atverta case "login"; + lietotājs ievadot savus datus formā un nospiežot pogu tiek parmests uz default un sanem savu sessiju. + neautorizēts lietotājs nevarētu atvērt citas lapas neautorizējoties .. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 17, 2009 Report Share Posted November 17, 2009 Paskaties cauri tēmas "Drošības" sadaļā. Quote Link to comment Share on other sites More sharing options...
edi Posted November 17, 2009 Author Report Share Posted November 17, 2009 Paskaties cauri tēmas "Drošības" sadaļā. neko interesantu un noderīgu pašlaik neesmu tur ieraudzījis Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.