/[informatika.old]/html/oznaci.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 /html/oznaci.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Fri Jan 25 14:47:46 2002 UTC (22 years, 2 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +6 -0 lines
sap organizacijske jedinice

1 <?
2
3 // TODO: provjeravati da li kontakt osoba ima privilegije za upis
4 // statusa u bazu!!
5
6 $conn = pg_connect("dbname=informatika user=dpavlin");
7 if (isset($date_offset) && $date_offset!=0) {
8 $result = pg_Exec ($conn, "
9 insert into status (osoba_id,kontakt_osoba_id,datum,
10 status_tip_id)
11 values ($osoba_id,$kontakt_osoba_id,now()+$date_offset,
12 $status_tip_id)
13 ");
14 } else {
15 $result = pg_Exec ($conn, "
16 insert into status (osoba_id,kontakt_osoba_id,datum,
17 status_tip_id)
18 values ($osoba_id,$kontakt_osoba_id,'now'::datetime,
19 $status_tip_id)
20 ");
21 }
22
23 if ($result) {
24 if ($status_tip_id==4 | $status_tip_id==10) {
25 $sql1="update racuni set aktivan=false where osoba_id=$osoba_id";
26 $sql2="update osobe set aktivna=false where id=$osoba_id";
27 pg_Exec ($conn,"$sql1");
28 pg_Exec ($conn,"$sql2");
29 }
30 Header("Location: obavijest.php?id=$osoba_id");
31 } else {
32 include("inc/head.inc");
33 print "GreĀ¹ka kod upisa podataka u bazu!";
34 }
35
36 ?>

  ViewVC Help
Powered by ViewVC 1.1.26