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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations)
Wed Oct 9 14:53:13 2002 UTC (21 years, 5 months ago) by ravilov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +40 -2 lines
bla

1 <?php
2 include("inc/global.php");
3 if (!Auth()) exit;
4 $page = CalcPage($PHP_SELF);
5 $p = $page;
6 if (isparam("wb_p")) $p--;
7 if (isparam("wb_OK")) $p++;
8 if (isparam("wb_h")) $p = $PG_HOME;
9 if (isparam("wb_o")) $p = $PG_OVERVIEW;
10 include("inc/conn.php");
11 DBOpen();
12 if ($p != $page) {
13 DBQuery("UPDATE osoba SET smjer='".ISO_Win($smjer)."',titula='".ISO_Win($zvanje)."',language='$language' WHERE (sif_radnika='$sifra')");
14 $ret = $DBH->errstr;
15 DBClose();
16 if (!$ret) {
17 Header("Location: $pages[$p]".Params($p));
18 exit;
19 }
20 }
21 $row = DBQuery("SELECT sif_radnika,ime,prezime,datum_rodjenja,spol,naziv_struke,smjer,stupanj_str_spreme,titula,org_jed.opis,radna_jedinica,radno_mjesto,telefon,email FROM osoba,org_jed WHERE (osoba.sif_org_jed=org_jed.sifra) AND (sif_radnika='$sifra') AND (org_jed.language=osoba.language)");
22 DBClose();
23 $row = array_shift($row);
24 for ($i = 0; $i < count($row); $i++) {
25 $row[$i] = HTML_escape(Win_ISO($row[$i]));
26 if ($i != 6 && $i != 8) nepoznato($row[$i]);
27 }
28 $tpl = new MySmarty(-1, array(), array(
29 "HR" => "Opæi podaci",
30 "EN" => "General data"
31 ));
32 $tpl->assign("sifra", $row[0]);
33 $tpl->assign("ime", $row[1]);
34 $tpl->assign("prezime", $row[2]);
35 $row[3] = ParseDate($row[3]);
36 $tpl->assign("dat_rod_d", $row[3]["mday"]);
37 $tpl->assign("dat_rod_m", $row[3]["mon"]);
38 $tpl->assign("dat_rod_g", $row[3]["year"]);
39 $tpl->assign("dat_rod", sprintf("%02d.%02d.%04d.", $row[3]["mday"], $row[3]["mon"], $row[3]["year"]));
40 $spol = $row[4];
41 if (ereg("^[mM]$", $row[4])) $spol = 'M';
42 if (ereg("^[zZ¾®žŽfF]$", $row[4])) $spol = 'F';
43 $tpl->assign("spol", $spol);
44 $tpl->assign("naziv_struke", $row[5]);
45 $tpl->assign("smjer", $row[6]);
46 $tpl->assign("strucna_sprema", $row[7]);
47 $tpl->assign("zvanje", $row[8]);
48 $tpl->assign("org_jedinica", nl2br($row[9]));
49 $tpl->assign("radna_jedinica", nl2br($row[10]));
50 $tpl->assign("radno_mjesto", $row[11]);
51 $tpl->assign("telefon", $row[12]);
52 $tpl->assign("email", $row[13]);
53 $tpl->lang_assign(array(
54 "HR" => array(
55 "csifra" => "©ifra radnika",
56 "cime" => "Ime",
57 "cprezime" => "Prezime",
58 "cdatrodj" => "Datum roðenja",
59 "cspol" => "Spol",
60 "cstruka" => "Naziv struke",
61 "csmjer" => "Smjer (zavr¹eni)",
62 "cstupanj" => "Stupanj struène spreme",
63 "czvanje" => "Zvanje",
64 "corg" => "Organizacijska jedinica",
65 "crad" => "Radna jedinica",
66 "crmj" => "Radno mjesto",
67 "ctel" => "Telefon",
68 "cemail" => "E-mail adresa"
69 ),
70 "EN" => array(
71 "csifra" => "Personal number",
72 "cime" => "First name",
73 "cprezime" => "Last name",
74 "cdatrodj" => "Date of birth",
75 "cspol" => "Sex",
76 "cstruka" => "Field of study(s)",
77 "csmjer" => "Major(s)",
78 "cstupanj" => "Educational degree",
79 "czvanje" => "Professional title",
80 "corg" => "Organisational unit",
81 "crad" => "Work unit",
82 "crmj" => "Position",
83 "ctel" => "Phone",
84 "cemail" => "E-mail"
85 )
86 ));
87 $tpl->show();
88 ?>

  ViewVC Help
Powered by ViewVC 1.1.26