/[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.4 - (show annotations)
Tue Oct 23 16:13:59 2001 UTC (17 years, 5 months ago) by ravilov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Added an author's CV. Added a secondary main article. Added the Related fields to news editor, and also fixed some bugs in it. Other bugfixes and improvements.

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

  ViewVC Help
Powered by ViewVC 1.1.26