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

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

revision 1.1 by ravilov, Wed Oct 10 12:40:58 2001 UTC revision 1.2 by ravilov, Fri Oct 12 09:22:02 2001 UTC
# Line 4  Line 4 
4          $limit = 10;          $limit = 10;
5          include("inc/conn.php");          include("inc/conn.php");
6          if ($qa) {          if ($qa) {
7                  function MyConv($str) {                  function MyConv($str) { return strtr($str, "šðè枊ÐÈÆŽ", "¹ðè澩ÐÈÆ®"); }
                         return strtr($str, "šðè枊ÐÈÆŽ", "¹ðè澩ÐÈÆ®");  
                 }  
8                  $id2 = $qa;                  $id2 = $qa;
9                  $naslov = "";                  $naslov = "";
10                  while ($id2) {                  while ($id2) {
# Line 76  Line 74 
74                          $tema = array();                          $tema = array();
75                          while ($row = $sth->fetchrow_array()) {                          while ($row = $sth->fetchrow_array()) {
76                                  list($id2, $naz) = $row;                                  list($id2, $naz) = $row;
77                                  $sql = "SELECT count(qa_id) FROM qa WHERE (tema = $id2)";                                  $sql = "SELECT count(qa_id) FROM qa WHERE (tema = $id2) AND (display)";
78                                  $sth2 = $dbh->prepare($sql);                                  $sth2 = $dbh->prepare($sql);
79                                  if (!$sth2) error("Cannot prepare query: \"$sql\"");                                  if (!$sth2) error("Cannot prepare query: \"$sql\"");
80                                  if (!$sth2->execute()) error("Cannot execute query: \"$sql\"");                                  if (!$sth2->execute()) error("Cannot execute query: \"$sql\"");
# Line 95  Line 93 
93                  $tpl->assign("teme", $teme);                  $tpl->assign("teme", $teme);
94          }          }
95          $tpl->assign("qa", $qa);          $tpl->assign("qa", $qa);
96          // ...          $dbh->disconnect();
97  ?>  ?>

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

  ViewVC Help
Powered by ViewVC 1.1.26