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

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

revision 1.4 by ravilov, Fri Oct 5 15:10:53 2001 UTC revision 1.5 by ravilov, Wed Oct 10 12:40:58 2001 UTC
# Line 9  Line 9 
9                          if ($del_id) {                          if ($del_id) {
10                                  include_once("inc/newsDelete.php");                                  include_once("inc/newsDelete.php");
11                                  newsDelete($del_id);                                  newsDelete($del_id);
12                                  unset($top_edit, $wn_edit, $pn_edit);                                  unset($top_edit);
13                          }                          }
14                          if ($down_id) $dbh->dbh_do("UPDATE news SET ord = ord + 1 WHERE (news_id = $down_id)");                          if ($down_id) $dbh->dbh_do("UPDATE news SET ord = ord + 1 WHERE (news_id = $down_id)");
15                          if ($up_id) $dbh->dbh_do("UPDATE news SET ord = ord - 1 WHERE (news_id = $up_id)");                          if ($up_id) $dbh->dbh_do("UPDATE news SET ord = ord - 1 WHERE (news_id = $up_id)");
16                            if ($flip_id) $dbh->dbh_do("UPDATE news SET prikazi = NOT prikazi WHERE (news_id = $flip_id)");
17                  }                  }
18                  $cat = "i"; $acat = "z";                  $cat = "i"; $acat = "z";
19                  if (!$offset) $offset = 0;                  if (!$offset) $offset = 0;
20                  $empty = array("category" => $cat, "limit" => 11, "offset" => $offset, "npar" => 0);                  $empty = array("category" => $cat, "limit" => 10, "offset" => $offset, "npar" => 0);
21                  if ($top_edit && $ed_id <= 0 && $isEdit) {                  if ($top_edit && $ed_id <= 0 && $isEdit) {
22                          include_once("inc/newsEdit.php");                          include_once("inc/newsEdit.php");
23                          $ed = newsEdit($empty, "top_edit");                          $ed = newsEdit($empty, "top_edit");
24                          if ($ed && is_string($ed)) $tpl->assign("EDIT", $ed);                          if ($ed && is_string($ed)) $tpl->assign("EDIT", $ed);
25                                  else $top_edit = false;                                  else $top_edit = false;
26                  }                  }
27                  $arts = newsLoad(-1, $empty["category"], $empty["limit"], $empty["offset"], $empty["npar"]);                  $arts = newsLoad(-1, $empty["category"], $empty["limit"] + 1, $empty["offset"], $empty["npar"]);
28                  $a2 = array();                  $a2 = array();
29                  $lm = count($arts);                  $lm = count($arts);
30                  if ($lm > $empty["limit"]) $lm = $empty["limit"];                  if ($lm > $empty["limit"]) $lm = $empty["limit"];
# Line 39  Line 40 
40                                  if ($ed && $ed["category"] == $cat) $art = $ed;                                  if ($ed && $ed["category"] == $cat) $art = $ed;
41                                  for ($j = 0; $j < count($art["text"]); $j++)                                  for ($j = 0; $j < count($art["text"]); $j++)
42                                          $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]), true);                                          $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]), true);
                                 include_once("inc/author.php");  
43                                  array_push($a2, array(                                  array_push($a2, array(
44                                          "id" => $art["id"],                                          "id" => $art["id"],
45                                          "title" => MyEscape($art["title"], false),                                          "title" => MyEscape($art["title"]),
46                                          "lead" => MyEscape($art["lead"], false),                                          "lead" => MyEscape($art["lead"]),
47                                          "pgfs" => (count($art["text"]) > 0) ? true : false,                                          "pgfs" => (count($art["text"]) > 0) ? true : false,
48                                          "titlepic_url" => MyEscape($art["pic_url"]),                                          "titlepic_url" => MyEscape($art["pic_url"]),
49                                          "titlepic_alt" => MyEscape($art["pic_alt"]),                                          "titlepic_alt" => MyEscape($art["pic_alt"]),
# Line 51  Line 51 
51                                          "titlepic_width" => $art["pic_w"],                                          "titlepic_width" => $art["pic_w"],
52                                          "titlepic_height" => $art["pic_h"],                                          "titlepic_height" => $art["pic_h"],
53                                          "text" => $art["text"],                                          "text" => $art["text"],
54                                          "links" => GetLinks($art["read"] && $art["id"],                                          "links" => GetLinks((($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"]) ? $art["read"] : "",
55                                                  /* MyEscape($art["more"]) */ ((count($art["text"]) > 0 || strstr("?", $art["more"]) == 0) && $art["id"]) ? $art["more"] : "",                                                  /* MyEscape($art["more"]) */ /* ((count($art["text"]) > 0 || strstr("?", $art["more"]) == 0) && $art["id"]) ? $art["more"] : "", */ "",
56                                                  MyEscape($art["more_title"]), $art["id"], $empty["category"], "top",                                                  MyEscape($art["more_title"]), $art["id"], $empty["category"], "top",
57                                                  $isEdit, true, ($i > 0), ($i < count($arts) - 1)),                                                  true, ($i > 0), ($i < count($arts) - 1), $art["show"]),
58                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "",                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : ""
                                         "AUTHOR" => GetAuthor($art["au_pic"],  
                                                 $art["au_alt"], $art["au_info"],  
                                                 $art["au_w"], $art["au_h"])  
59                                  ));                                  ));
60                          }                          }
61                  }                  }
62                  $tpl->assign("top", $a2);                  $tpl->assign("top", $a2);
63                  $tpl->assign("cat", $cat);                  $tpl->assign("cat", $cat);
64                  $tpl->assign("next", (count($arts) > 10) ? ($offset + 10) : 0);                  $tpl->assign("next", (count($arts) > 10) ? ($offset + 10) : 0);
65                  $tpl->assign("prev", ($offset > 0) ? ($offset - 10) : false);                  $tpl->assign("prev", $offset ? ($offset - 10) : 0);
66                    $tpl->assign("offset", $offset);
67          }          }
68          $dbh->disconnect();          $dbh->disconnect();
69  ?>  ?>

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.26