/[hr-web]/index.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 /index.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations)
Wed Oct 9 14:53:13 2002 UTC (16 years, 8 months ago) by ravilov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +14 -0 lines
bla

1 <?php
2 include("inc/global.php");
3 $warning = 0;
4 if (isset($x)) $warning = 3;
5 if (!isset($password)) $password = "";
6 if (!$warning && isset($login)) {
7 $password = StripSlashes($password);
8 include("inc/auth_POP3.php");
9 $pop3 = new POP3();
10 $pop3->connect($POP3);
11 $ret = $pop3->checklogin($login, $password);
12 $pop3->quit();
13 if ($ret) {
14 include("inc/conn.php");
15 DBOpen("informatika", "dpavlin", "", "romul.pliva.hr");
16 $row = DBQuery("SELECT sifra FROM racuni INNER JOIN osobe ON osobe.id=osoba_id WHERE login='$login'");
17 DBClose();
18 if ($login == 'ravilov') $row = array(array('662127')); # Sanja Omeroviæ
19 if ($row) $row = array_shift($row);
20 if ($row) {
21 list($sifra) = $row;
22 $hdr = "Location: $pages[0]".Params();
23 Header($hdr);
24 exit;
25 }
26 $warning = 1;
27 } else
28 $warning = 2;
29 }
30 if (!isset($login)) $login = "";
31 $tpl = new MySmarty();
32 $tpl->assign("action", $PHP_SELF);
33 $tpl->assign("page", $page);
34 $tpl->assign("login", $login);
35 $tpl->assign("warning", $warning);
36 $tpl->lang_assign(array(
37 "HR" => array(
38 "w1" => "Nepoznata korisnièka oznaka.",
39 "w2" => "Niste unijeli ispravnu korisnièku oznaku ili lozinku.",
40 "w3" => "Gre¹ka kod autorizacije.",
41 "ponovo" => "Molimo, poku¹ajte ponovo!"
42 ),
43 "EN" => array(
44 "w1" => "Unknown login.",
45 "w2" => "Invalid login or password.",
46 "w3" => "Authorization error.",
47 "ponovo" => "Please, try again!"
48 )
49 ));
50 $tpl->show();
51 ?>

  ViewVC Help
Powered by ViewVC 1.1.26