/[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.12 by ravilov, Fri Oct 5 15:10:53 2001 UTC revision 1.13 by ravilov, Wed Oct 10 12:40:58 2001 UTC
# Line 36  Line 36 
36                  if ($id > 0) $sql .= " AND (news.news_id = $id)";                  if ($id > 0) $sql .= " AND (news.news_id = $id)";
37                  if ($ct) $sql .= " AND ((category = '$ct') OR ((cat_news.cat_id = '$ct') AND (cat_news.news_id = news.news_id)))";                  if ($ct) $sql .= " AND ((category = '$ct') OR ((cat_news.cat_id = '$ct') AND (cat_news.news_id = news.news_id)))";
38                  if ($spec) $sql .= " AND (spec_news.news_id = news.news_id) AND (spec_news.spec_id = $spec)";                  if ($spec) $sql .= " AND (spec_news.news_id = news.news_id) AND (spec_news.spec_id = $spec)";
39                    if ($limit && $isEdit) $sql .= "";
40                  $sql .= " ORDER BY d_orig DESC";                  $sql .= " ORDER BY d_orig DESC";
41                  if ($limit) $sql .= " LIMIT $limit OFFSET $offset";                  if ($limit && !$isEdit) $sql .= " LIMIT $limit";
42                    if ($offset) $sql .= " OFFSET $offset";
43                  $sth = $dbh->prepare($sql);                  $sth = $dbh->prepare($sql);
44                  if (!$sth) error("Cannot prepare query: \"$sql\"");                  if (!$sth) error("Cannot prepare query: \"$sql\"");
45                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
# Line 99  Line 101 
101                  $tpl->assign("titlepic_width", $art["pic_w"]);                  $tpl->assign("titlepic_width", $art["pic_w"]);
102                  $tpl->assign("titlepic_height", $art["pic_h"]);                  $tpl->assign("titlepic_height", $art["pic_h"]);
103                  $tpl->assign("date", $art["date"] ? strftime("%d.%m.%Y.", strtotime($art["date"])) : "");                  $tpl->assign("date", $art["date"] ? strftime("%d.%m.%Y.", strtotime($art["date"])) : "");
                 include_once("author.php");  
104                  $tpl->assign("AUTHOR", GetAuthor($art["au_pic"],                  $tpl->assign("AUTHOR", GetAuthor($art["au_pic"],
105                          $art["au_alt"], $art["au_info"],                          $art["au_alt"], $art["au_info"],
106                          $art["au_w"], $art["au_h"]));                          $art["au_w"], $art["au_h"]));
# Line 117  Line 118 
118                  $tpl->assign("cat", $art["category"]);                  $tpl->assign("cat", $art["category"]);
119                  $tpl->assign("acat", $acat);                  $tpl->assign("acat", $acat);
120                  $tpl->assign("acat2", $acat2);                  $tpl->assign("acat2", $acat2);
121                    $tpl->assign("pgfs", count($art["text"]));
122                  global $PATH;                  global $PATH;
123                  if (is_array($PATH)) array_push($PATH,                  if (is_array($PATH)) array_push($PATH,
124                          MyUpper(MyEscape(convert_html($art["title"]))));                          MyUpper(MyEscape(convert_html($art["title"]))));

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.26