/[health_html]/inc/pgPrijava.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /inc/pgPrijava.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Fri Sep 28 23:34:37 2001 UTC (22 years, 7 months ago) by ravilov
Branch: MAIN
Changes since 1.1: +1 -0 lines
Added some new pages to PLIVAmed. Some bugfixes.

1 <?php
2 $PMusername = $PMpassword = "";
3 $error = "";
4 if ($prijava) {
5 if ($password) $password = md5($password);
6 $ret = Auth($username, $password);
7 if ($ret == 1) $error = "Morate unijeti korisnièko ime.";
8 else if ($ret == 2) $error = "Nepostojeæe korisnièko ime.";
9 else if ($ret == 3) $error = "Neva¾eæa lozinka.";
10 }
11 if ($prijava && $error == "") {
12 $time = time() + (60 * 60 * 24 * 365 * 2); // Roughly 2 years from now
13 SetCookie("PMusername", $username, $time);
14 SetCookie("PMpassword", $password, $time);
15 Header("Location: ?");
16 } else {
17 SetCookie("PMusername");
18 SetCookie("PMpassword");
19 }
20 $tpl->assign("username", $username);
21 $tpl->assign("password", $password);
22 $tpl->assign("error", $error);
23 ?>

  ViewVC Help
Powered by ViewVC 1.1.26