/[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.1 by ravilov, Fri Aug 3 10:02:49 2001 UTC revision 1.2 by ravilov, Tue Aug 7 13:55:51 2001 UTC
# Line 10  Line 10 
10                          newsDelete($del_id);                          newsDelete($del_id);
11                          unset($top_edit, $wn_edit, $pn_edit);                          unset($top_edit, $wn_edit, $pn_edit);
12                  }                  }
13                    if ($down_id) $dbh->dbh_do("UPDATE news SET ord = ord + 1 WHERE (news_id = $down_id)");
14                    if ($up_id) $dbh->dbh_do("UPDATE news SET ord = ord - 1 WHERE (news_id = $up_id)");
15                  $empty = array("category" => "t", "limit" => 1, "npar" => 1);                  $empty = array("category" => "t", "limit" => 1, "npar" => 1);
16                  $arts = newsLoad(-1, $empty["category"], $empty["limit"], $empty["npar"]);                  $arts = newsLoad(-1, $empty["category"], $empty["limit"], $empty["npar"]);
17                  $art = array_shift($arts);                  $art = array_shift($arts);
# Line 20  Line 22 
22                  }                  }
23                  if ($ed && is_string($ed)) $tpl->assign("EDIT", $ed);                  if ($ed && is_string($ed)) $tpl->assign("EDIT", $ed);
24                  else {                  else {
25                          if ($ed) $art = $ed;                          if ($ed && $ed["category"] == "t") $art = $ed;
26                          $tpl->assign("top_id", $art["id"]);                          $tpl->assign("top_id", $art["id"]);
27                          $tpl->assign("top_title", MyEscape($art["title"]));                          $tpl->assign("top_title", MyEscape($art["title"]));
28                          $tpl->assign("top_lead", MyEscape($art["lead"]));                          $tpl->assign("top_lead", MyEscape($art["lead"]));
# Line 34  Line 36 
36                          $tpl->assign("top_text", $art["text"]);                          $tpl->assign("top_text", $art["text"]);
37                          include_once("inc/links.php");                          include_once("inc/links.php");
38                          $tpl->assign("top_links", GetLinks($art["read"] && $art["id"],                          $tpl->assign("top_links", GetLinks($art["read"] && $art["id"],
39                                  MyEscape($art["more"]), $art["id"], $empty["category"], "top"));                                  MyEscape($art["more"]), $art["id"], $empty["category"], "top",
40                                    false, false, false));
41                  }                  }
42                  $empty = array("category" => "w", "limit" => ($wn_edit ? 4 : 5), "npar" => 0);                  $empty = array("category" => "w", "limit" => ($wn_edit ? 4 : 5), "npar" => 0);
43                    $ed = "";
44                  if ($wn_edit && $ed_id <= 0) {                  if ($wn_edit && $ed_id <= 0) {
45                          include_once("inc/newsEdit.php");                          include_once("inc/newsEdit.php");
46                          $ed = newsEdit($empty, "wn_edit");                          $ed = newsEdit($empty, "wn_edit");
# Line 50  Line 54 
54                          $ed = "";                          $ed = "";
55                          if ($wn_edit && $art["id"] == $ed_id) {                          if ($wn_edit && $art["id"] == $ed_id) {
56                                  include_once("inc/newsEdit.php");                                  include_once("inc/newsEdit.php");
57                                    $art["nlimit"] = count($arts);
58                                  $ed = newsEdit($art, "wn_edit");                                  $ed = newsEdit($art, "wn_edit");
59                          }                          }
60                          if ($ed && is_string($ed)) array_push($wn, array("EDIT" => $ed));                          if ($ed && is_string($ed)) array_push($wn, array("EDIT" => $ed));
61                          else {                          else {
62                                  if ($ed) $art = $ed;                                  if ($ed && $ed["category"] == "w") $art = $ed;
63                                  for ($j = 0; $j < count($art["text"]); $j++)                                  for ($j = 0; $j < count($art["text"]); $j++)
64                                          $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]));                                          $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]));
65                                  include_once("inc/links.php");                                  include_once("inc/links.php");
# Line 69  Line 74 
74                                          "height" => MyEscape($art["pic_h"]),                                          "height" => MyEscape($art["pic_h"]),
75                                          "links" => GetLinks($art["read"] && $art["id"],                                          "links" => GetLinks($art["read"] && $art["id"],
76                                                  MyEscape($art["more"]), $art["id"],                                                  MyEscape($art["more"]), $art["id"],
77                                                  $empty["category"], "wn"),                                                  $empty["category"], "wn", true, ($i > 0),
78                                                    ($i < count($arts) - 1)),
79                                          "text" => $art["text"]                                          "text" => $art["text"]
80                                  ));                                  ));
81                          }                          }
82                  }                  }
83                  $empty = array("category" => "p", "limit" => ($pn_edit ? 4 : 5), "npar" => 0);                  $empty = array("category" => "p", "limit" => ($pn_edit ? 4 : 5), "npar" => 0);
84                    $ed = "";
85                  if ($pn_edit && $ed_id <= 0) {                  if ($pn_edit && $ed_id <= 0) {
86                          include_once("inc/newsEdit.php");                          include_once("inc/newsEdit.php");
87                          $ed = newsEdit($empty, "pn_edit");                          $ed = newsEdit($empty, "pn_edit");
# Line 88  Line 95 
95                          $ed = "";                          $ed = "";
96                          if ($pn_edit && $art["id"] == $ed_id) {                          if ($pn_edit && $art["id"] == $ed_id) {
97                                  include_once("inc/newsEdit.php");                                  include_once("inc/newsEdit.php");
98                                    $art["nlimit"] = count($arts);
99                                  $ed = newsEdit($art, "pn_edit");                                  $ed = newsEdit($art, "pn_edit");
100                          }                          }
101                          if ($ed && is_string($ed)) array_push($pn, array("EDIT" => $ed));                          if ($ed && is_string($ed)) array_push($pn, array("EDIT" => $ed));
102                          else {                          else {
103                                  if ($ed) $art = $ed;                                  if ($ed && $ed["category"] == "p") $art = $ed;
104                                  for ($j = 0; $j < count($art["text"]); $j++)                                  for ($j = 0; $j < count($art["text"]); $j++)
105                                          $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]));                                          $art["text"][$j]["text"] = ParseNewline(MyEscape($art["text"][$j]["text"]));
106                                  include_once("inc/links.php");                                  include_once("inc/links.php");
# Line 107  Line 115 
115                                          "height" => MyEscape($art["pic_h"]),                                          "height" => MyEscape($art["pic_h"]),
116                                          "links" => GetLinks($art["read"] && $art["id"],                                          "links" => GetLinks($art["read"] && $art["id"],
117                                                  MyEscape($art["more"]), $art["id"],                                                  MyEscape($art["more"]), $art["id"],
118                                                  $empty["category"], "pn"),                                                  $empty["category"], "pn", true, ($i > 0),
119                                                    ($i < count($arts) - 1)),
120                                          "text" => MyEscape($art["text"])                                          "text" => MyEscape($art["text"])
121                                  ));                                  ));
122                          }                          }

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

  ViewVC Help
Powered by ViewVC 1.1.26