/[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

Annotation of /inc/pgPrijava.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Sep 25 15:38:04 2001 UTC (22 years, 6 months ago) by ravilov
Branch: MAIN
Major changes. Too numeruous to mention all here.

1 ravilov 1.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("error", $error);
22     ?>

  ViewVC Help
Powered by ViewVC 1.1.26