/[health_html]/inc/pgBolesti-grupe.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

Diff of /inc/pgBolesti-grupe.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by ravilov, Fri Sep 28 23:34:37 2001 UTC revision 1.3 by ravilov, Sat Sep 29 00:57:58 2001 UTC
# Line 2  Line 2 
2          include("inc/conn.php");          include("inc/conn.php");
3          function myComp($a, $b) { return MyCompare($a["name"], $b["name"]); }          function myComp($a, $b) { return MyCompare($a["name"], $b["name"]); }
4          function escape_quote($str) { return str_replace('"', """, $str); }          function escape_quote($str) { return str_replace('"', """, $str); }
5          if ($id) {          $tpl->assign("ID", $gid);
6            if ($gid) {
7                  $grupe = array();                  $grupe = array();
8                  $sql = "SELECT naziv FROM grupe_bolesti WHERE (grupa_b_id = $id)";                  $sql = "SELECT naziv FROM grupe_bolesti WHERE (grupa_b_id = $gid)";
9                  $sth = $dbh->prepare($sql);                  $sth = $dbh->prepare($sql);
10                  if (!$sth) error("Cannot prepare query: \"$sql\"");                  if (!$sth) error("Cannot prepare query: \"$sql\"");
11                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
12                  $grupa = $sth->fetchrow_array();                  $grupa = $sth->fetchrow_array();
13                  $sth->finish();                  $sth->finish();
14                  if ($grupa) $grupa = array_shift($grupa);                  if ($grupa) $grupa = array_shift($grupa);
15                    array_push($PATH, MyUpper($grupa));
16                  $tpl->assign("naslov", $grupa);                  $tpl->assign("naslov", $grupa);
17                  $grupe = array();                  $grupe = array();
18                  $sql = "SELECT bolest_id, naziv FROM bolesti WHERE (grupa_bolesti_id = $id) AND (is_bolest)";                  $sql = "SELECT bolest_id, naziv FROM bolesti WHERE (grupa_bolesti_id = $gid) AND (is_bolest)";
19                  $sth = $dbh->prepare($sql);                  $sth = $dbh->prepare($sql);
20                  if (!$sth) error("Cannot prepare query: \"$sql\"");                  if (!$sth) error("Cannot prepare query: \"$sql\"");
21                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
# Line 57  Line 59 
59                  }                  }
60                  $tpl->assign("slova", $slova);                  $tpl->assign("slova", $slova);
61          }          }
         $tpl->assign("ID", $id);  
62          $dbh->disconnect();          $dbh->disconnect();
63  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26