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

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

revision 1.14 by ravilov, Fri Oct 12 09:22:02 2001 UTC revision 1.15 by ravilov, Fri Oct 12 13:13:38 2001 UTC
# Line 3  Line 3 
3                  global $dbh;                  global $dbh;
4                  if (!isset($nid)) return array();                  if (!isset($nid)) return array();
5                  if (!$par) $par = "NULL";                  if (!$par) $par = "NULL";
6                  $sql = "SELECT paragraph_id, text, title, level, class, pic, alt, pos, hl, pic_title FROM paragraphs, par_levels WHERE (news_id = $nid) AND (level = level_id) AND (parent = $par)";                  $sql = "SELECT paragraph_id, text, title, level, class, pic, alt, pos, hl, pic_title, full_pic FROM paragraphs, par_levels WHERE (news_id = $nid) AND (level = level_id) AND (parent = $par)";
7                  $sth = $dbh->prepare($sql);                  $sth = $dbh->prepare($sql);
8                  if (!$sth) error("Cannot prepare query: \"$sql\"");                  if (!$sth) error("Cannot prepare query: \"$sql\"");
9                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
10                  while ($row = $sth->fetchrow_array()) {                  while ($row = $sth->fetchrow_array()) {
11                          $subs = get_sections($nid, $text, $row[0]);                          $subs = get_sections($nid, $text, $row[0]);
12                          list($w, $h) = PicSize($row[5]);                          list($w, $h) = PicSize($row[5]);
13                            list($w2, $h2) = PicSize($row[10]);
14                          array_push($text, array(                          array_push($text, array(
15                                  "id" => $row[0],                                  "id" => $row[0],
16                                  "text" => $row[1],                                  "text" => $row[1],
# Line 21  Line 22 
22                                  "pos" => $row[7],                                  "pos" => $row[7],
23                                  "hl" => $row[8],                                  "hl" => $row[8],
24                                  "exp" => $row[9],                                  "exp" => $row[9],
25                                    "full" => $row[10],
26                                    "fw" => $w2,
27                                    "fh" => $h2,
28                                  "subs" => $subs,                                  "subs" => $subs,
29                                  "w" => $w,                                  "w" => $w,
30                                  "h" => $h                                  "h" => $h

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.26