Location: PHPKode > projects > WWW-Admin > wwwadmin-0.1lt/tmp/lib.php
<?


if (!defined("GOOD_START")) {
  die ("You can't access this file directly.");
}


function write_sys_header() {
?>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1257" />
    -->
  </head>
  <body>
<?
}


function write_sys_footer() {
?>
  </body>
</html>
<?
}


function write_header($text) {
  echo "<h2>$text</h2>";
  write_menu();
}


function write_menu() {
?>
  <a href="index.php?target=pagr">Pagrindinis</a>
  <a href="index.php?target=komentarai">Komentarai</a>
  <a href="index.php?target=kontaktai">Kontaktai</a>
  <br>
  <br>
  <br>
<?
}




function pass_verify(){

$file="users.txt";
$fails="fails.txt";
$user_login=$_POST['user'];
$user_pass=$_POST['pass'];
$username_len=strlen($login);
$password_len=strlen($pass);



$cont=file_get_contents($file);

$user_start_pos=strpos($cont, $user_login, ":");
$pass_start_pos=strpos($cont, $user_pass, ":");

$required_user=substr($cont, $user_start_pos, $user_start_pos+$username_len);
$required_pass=substr($cont, $pass_start_pos, $pass_start_pos+$password_len);

var_dump($required_user);
var_dump($required_pass);

}

?>
Return current item: WWW-Admin