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

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

revision 1.11 by ravilov, Thu Oct 4 14:59:35 2001 UTC revision 1.12 by ravilov, Wed Oct 10 12:40:58 2001 UTC
# Line 13  Line 13 
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                  $empty = array("category" => "t", "limit" => 1, "offset" => 0, "npar" => 0);                  $empty = array("category" => "t", "limit" => 1, "offset" => 0, "npar" => 0);
19                  $arts = newsLoad(-1, $empty["category"], $empty["limit"], $empty["offset"], $empty["npar"]);                  if ($top_edit && $ed_id <= 0 && $isEdit) {
                 $art = array_shift($arts);  
                 $ed = "";  
                 if ($top_edit && ($art["id"] == $ed_id || $ed_id <= 0) && $isEdit) {  
20                          include_once("inc/newsEdit.php");                          include_once("inc/newsEdit.php");
21                          $ed = newsEdit(($ed_id > 0) ? $art : $empty, "top_edit");                          $ed = newsEdit($empty, "top_edit");
22                            if ($ed && is_string($ed)) $tpl->assign("EDIT", $ed);
23                                    else $top_edit = false;
24                  }                  }
25                  if ($ed && is_string($ed)) $tpl->assign("EDIT", $ed);                  $arts = newsLoad(-1, $empty["category"], $empty["limit"], $empty["offset"], $empty["npar"]);
26                  else {                  $ed = "";
27                          if ($ed && $ed["category"] == "t") $art = $ed;                  $a2 = array();
28                          $tpl->assign("top_id", $art["id"]);                  for ($i = 0; $i < count($arts); $i++) {
29                          $tpl->assign("top_title", MyEscape($art["title"]));                          $art = $arts[$i];
30                          $tpl->assign("top_lead", MyEscape($art["lead"]));                          $ed = "";
31                          $tpl->assign("top_pgfs", (count($art["text"]) > 0) ? true : false);                          if ($top_edit && ($art["id"] == $ed_id)) {
32                          $tpl->assign("top_titlepic_url", MyEscape($art["pic_url"]));                                  include_once("inc/newsEdit.php");
33                          $tpl->assign("top_titlepic_alt", MyEscape($art["pic_alt"]));                                  $ed = newsEdit($art, "top_edit");
34                          $tpl->assign("top_titlepic_type", $art["pic_pos"]);                          }
35                          $tpl->assign("top_titlepic_width", $art["pic_w"]);                          if ($ed && is_string($ed)) array_push($a2, array("EDIT" => $ed));
36                          $tpl->assign("top_titlepic_height", $art["pic_h"]);                          else {
37                          for ($j = 0; $j < count($art["text"]); $j++)                                  if ($ed && $ed["category"] == $cat) $art = $ed;
38                                  $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]), true);                                  for ($j = 0; $j < count($art["text"]); $j++)
39                          $tpl->assign("top_text", $art["text"]);                                          $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]), true);
40                          include_once("inc/author.php");                                  array_push($a2, array(
41                          $tpl->assign("AUTHOR", GetAuthor($art["au_pic"],                                          "id" => $art["id"],
42                                  $art["au_alt"], $art["au_info"],                                          "title" => MyEscape($art["title"]),
43                                  $art["au_w"], $art["au_h"]));                                          "lead" => MyEscape($art["lead"]),
44                          $tpl->assign("top_links", GetLinks($art["read"] && $art["id"],                                          "pgfs" => (count($art["text"]) > 0) ? true : false,
45                                  /* MyEscape($art["more"]) */ (count($art["text"]) > 0 && $art["id"]) ? $art["more"] : "",                                          "titlepic_url" => MyEscape($art["pic_url"]),
46                                  MyEscape($art["more_title"]), $art["id"], $empty["category"],                                          "titlepic_alt" => MyEscape($art["pic_alt"]),
47                                  "top", $isEdit, false, false, false));                                          "titlepic_type" => $art["pic_pos"],
48                          $tpl->assign("top_read", $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "");                                          "titlepic_width" => $art["pic_w"],
49                                            "titlepic_height" => $art["pic_h"],
50                                            "text" => $art["text"],
51                                            "links" => GetLinks((($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"]) ? $art["read"] : "",
52                                                    /* MyEscape($art["more"]) */ /* ((count($art["text"]) > 0 || strstr("?", $art["more"]) == 0) && $art["id"]) ? $art["more"] : "" */ "",
53                                                    MyEscape($art["more_title"]), $art["id"], $empty["category"], "top",
54                                                    true, ($i > 0), ($i < count($arts) - 1), $art["show"]),
55                                            "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "",
56                                            "AUTHOR" => GetAuthor($art["au_pic"], $art["au_alt"], $art["au_info"], $art["au_w"], $art["au_h"])
57                                    ));
58                            }
59                  }                  }
60                    $tpl->assign("top", $a2);
61                  $menu2 = array();                  $menu2 = array();
62                  $empty = array("category" => "w", "limit" => $isEdit ? 0 : ($wn_edit && !$ed_id ? 9 : 10), "offset" => 0, "npar" => 0);                  $empty = array("category" => "w", "limit" => ($wn_edit && !$ed_id ? 9 : 10), "offset" => 0, "npar" => 0);
63                  $ed = "";                  $ed = "";
64                  if ($wn_edit && $ed_id <= 0 && $isEdit) {                  if ($wn_edit && $ed_id <= 0 && $isEdit) {
65                          include_once("inc/newsEdit.php");                          include_once("inc/newsEdit.php");
# Line 83  Line 94 
94                                          "pos" => MyEscape($art["pic_pos"]),                                          "pos" => MyEscape($art["pic_pos"]),
95                                          "width" => $art["pic_w"],                                          "width" => $art["pic_w"],
96                                          "height" => $art["pic_h"],                                          "height" => $art["pic_h"],
97                                          "links" => GetLinks(($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"],                                          "links" => GetLinks((($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"]) ? $art["read"] : "",
98                                                  MyEscape($art["more"]), MyEscape($art["more_title"]),                                                  /* MyEscape($art["more"]) */ "", MyEscape($art["more_title"]),
99                                                  $art["id"], $empty["category"], "wn", $isEdit, true,                                                  $art["id"], $empty["category"], "wn", true,
100                                                  ($i > 0), ($i < count($arts) - 1)),                                                  ($i > 0), ($i < count($arts) - 1), $art["show"]),
101                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "",                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "",
102                                          "text" => $art["text"]                                          "text" => $art["text"]
103                                  ));                                  ));
104                                  array_push($tmp2, array(                                  array_push($tmp2, array(
105                                          "cat" => $empty["category"],                                          "cat" => $empty["category"],
106                                          "id" => $art["id"],                                          "id" => $art["id"],
107                                          "title" => MyEscape($art["title"]),                                          "title" => MyEscape($art["title"])
                                         "url" => MyEscape($art["more"]),  
                                         "more" => ($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"] ? $art["read"] : ""  
108                                  ));                                  ));
109                          }                          }
110                  }                  }
# Line 105  Line 114 
114                          "pre" => "wn-",                          "pre" => "wn-",
115                          "items" => $tmp2                          "items" => $tmp2
116                  ));                  ));
117                  $empty = array("category" => "p", $isEdit ? 0 : "limit" => ($pn_edit && !$ed_id ? 9 : 10), "offset" => 0, "npar" => 0);                  $empty = array("category" => "p", "limit" => ($pn_edit && !$ed_id ? 9 : 10), "offset" => 0, "npar" => 0);
118                  $ed = "";                  $ed = "";
119                  if ($pn_edit && $ed_id <= 0 && $isEdit) {                  if ($pn_edit && $ed_id <= 0 && $isEdit) {
120                          include_once("inc/newsEdit.php");                          include_once("inc/newsEdit.php");
# Line 140  Line 149 
149                                          "pos" => MyEscape($art["pic_pos"]),                                          "pos" => MyEscape($art["pic_pos"]),
150                                          "width" => MyEscape($art["pic_w"]),                                          "width" => MyEscape($art["pic_w"]),
151                                          "height" => MyEscape($art["pic_h"]),                                          "height" => MyEscape($art["pic_h"]),
152                                          "links" => GetLinks(($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"],                                          "links" => GetLinks((($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"]) ? $art["read"] : "",
153                                                  MyEscape($art["more"]), MyEscape($art["more_title"]),                                                  MyEscape($art["more"]), MyEscape($art["more_title"]),
154                                                  $art["id"], $empty["category"], "pn", $isEdit, true,                                                  $art["id"], $empty["category"], "pn", true,
155                                                  ($i > 0), ($i < count($arts) - 1)),                                                  ($i > 0), ($i < count($arts) - 1), $art["show"]),
156                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "",                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "",
157                                          "text" => MyEscape($art["text"])                                          "text" => MyEscape($art["text"])
158                                  ));                                  ));
159                                  array_push($tmp2, array(                                  array_push($tmp2, array(
160                                          "cat" => $empty["category"],                                          "cat" => $empty["category"],
161                                          "id" => $art["id"],                                          "id" => $art["id"],
162                                          "title" => MyEscape($art["title"]),                                          "title" => MyEscape($art["title"])
                                         "url" => MyEscape($art["more"]),  
                                         "more" => ($art["read"] || $art["au_pic"] || $art["au_info"]) && $art["id"] ? $art["read"] : ""  
163                                  ));                                  ));
164                          }                          }
165                  }                  }

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

  ViewVC Help
Powered by ViewVC 1.1.26