/[health_html]/inc/pgKnjiznica-leksikon.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/pgKnjiznica-leksikon.php

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

revision 1.2 by ravilov, Mon Sep 3 15:52:16 2001 UTC revision 1.3 by ravilov, Tue Sep 25 15:38:04 2001 UTC
# Line 1  Line 1 
1  <?php  <?php
2          include_once("inc/conn.php");          include("inc/conn.php");
3          include_once("inc/search.php");          include_once("inc/search.php");
4          $fields = array(          $fields = array(
5                  "pojam" => array("dbname" => "pojam", "caption" => "Pojam"),                  "pojam" => array("dbname" => "pojam", "caption" => "Pojam"),
6                  "opis" => array("dbname" => "opis", "caption" => "Opis")                  "opis" => array("dbname" => "opis", "caption" => "Opis")
7          );          );
8          list($srch, $qry_1, $qry_2) = Search($fields, array("pojam", "opis"), array(), "pojam");          if (!$id) {
9          # Win1250 -> ISO8859-2                  list($srch, $qry_1, $qry_2) = Search($fields, array("pojam", "opis"), array(), "pojam");
10          if ($qry_1) $qry_1 = strtr($qry_1, "Ǝ", "Ʈ");                  # Win1250 -> ISO8859-2
11          if ($qry_2) $qry_2 = strtr($qry_2, "Ǝ", "Ʈ");                  if ($qry_1) $qry_1 = strtr($qry_1, "Ǝ", "Ʈ");
12          $tpl->assign("index", $index);                  if ($qry_2) $qry_2 = strtr($qry_2, "Ǝ", "Ʈ");
13          $tpl->assign("srch", ($qry_1 || $qry_2) ? true : false);                  $tpl->assign("index", $index);
14          $tpl->assign("SEARCH", $srch);                  $tpl->assign("srch", ($qry_1 || $qry_2) ? true : false);
15                    $tpl->assign("SEARCH", $srch);
16            }
17          $letters = Slova();          $letters = Slova();
18          if (!$id && ($index || ($qry_1 || $qry_2))) {          if (!$id && ($index || ($qry_1 || $qry_2))) {
19                  $prvo_slovo = "UPPER(SUBSTRING(pojam FROM 1 FOR 1))";                  $prvo_slovo = "UPPER(SUBSTRING(pojam FROM 1 FOR 1))";
# Line 44  Line 46 
46                  $sth->finish();                  $sth->finish();
47                  if (isset($staro_slovo)) array_push($slova, array("l" => $staro_slovo, "pojmovi" => $pojmovi));                  if (isset($staro_slovo)) array_push($slova, array("l" => $staro_slovo, "pojmovi" => $pojmovi));
48                  $records = 0;                  $records = 0;
49                  for ($i = 0; $i < count($slova); $i++) $records += count($slova[$i]["ustanove"]);                  for ($i = 0; $i < count($slova); $i++) $records += count($slova[$i]["pojmovi"]);
50                  $tpl->assign("records", $records);                  $tpl->assign("records", $records);
51                  $tpl->assign("slova", $slova);                  $tpl->assign("slova", $slova);
52                  $tpl->assign("stype", $stype);                  $tpl->assign("stype", $stype);

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

  ViewVC Help
Powered by ViewVC 1.1.26