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

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

revision 1.1 by ravilov, Wed Sep 19 12:23:57 2001 UTC revision 1.2 by ravilov, Tue Sep 25 15:38:04 2001 UTC
# Line 1  Line 1 
1  <?php  <?php
2          include_once("inc/conn.php");          include("inc/conn.php");
3          include_once("inc/newsShow.php");          include_once("inc/newsShow.php");
4          if ($show) {          if ($show) {
5                    $section_menu = "main";
6                  $arts = newsLoad($id, $cat);                  $arts = newsLoad($id, $cat);
7                  newsShow(array_shift($arts));                  newsShow(array_shift($arts));
8          } else {          } else {
9                  if ($del_id) {                  if ($isEdit) {
10                          include_once("inc/newsDelete.php");                          if ($del_id) {
11                          newsDelete($del_id);                                  include_once("inc/newsDelete.php");
12                          unset($top_edit, $wn_edit, $pn_edit);                                  newsDelete($del_id);
13                                    unset($top_edit, $wn_edit, $pn_edit);
14                            }
15                            if ($down_id) $dbh->dbh_do("UPDATE news SET ord = ord + 1 WHERE (news_id = $down_id)");
16                            if ($up_id) $dbh->dbh_do("UPDATE news SET ord = ord - 1 WHERE (news_id = $up_id)");
17                  }                  }
                 if ($down_id) $dbh->dbh_do("UPDATE news SET ord = ord + 1 WHERE (news_id = $down_id)");  
                 if ($up_id) $dbh->dbh_do("UPDATE news SET ord = ord - 1 WHERE (news_id = $up_id)");  
18                  $cat = "c";                  $cat = "c";
19                  if ($section_menu == "zensko") $cat = "z";                  if ($section_menu == "zensko") $cat = "z";
20                  if ($section_menu == "musko") $cat = "m";                  if ($section_menu == "musko") $cat = "m";
21                  if ($section_menu == "majkadijete") $cat = "d";                  if ($section_menu == "majkadijete") $cat = "d";
22                  if ($section_menu == "treca") $cat = "r";                  if ($section_menu == "treca") $cat = "r";
23                  if ($section_menu == "teen") $cat = "e";                  if ($section_menu == "mladi") $cat = "e";
24                    if ($section_menu == "ovisnosti") $cat = "o";
25                  if (!$offset) $offset = 0;                  if (!$offset) $offset = 0;
26                  $empty = array("category" => $cat, "limit" => 11, "offset" => $offset, "npar" => 1);                  $empty = array("category" => $cat, "limit" => 11, "offset" => $offset, "npar" => 0);
27                  if ($top_edit && $ed_id <= 0 && $isEdit) {                  if ($top_edit && $ed_id <= 0 && $isEdit) {
28                          include_once("inc/newsEdit.php");                          include_once("inc/newsEdit.php");
29                          $ed = newsEdit($empty, "top_edit");                          $ed = newsEdit($empty, "top_edit");
# Line 42  Line 46 
46                                  if ($ed && $ed["category"] == $cat) $art = $ed;                                  if ($ed && $ed["category"] == $cat) $art = $ed;
47                                  for ($j = 0; $j < count($art["text"]); $j++)                                  for ($j = 0; $j < count($art["text"]); $j++)
48                                          $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/links.php");  
49                                  array_push($a2, array(                                  array_push($a2, array(
50                                          "id" => $art["id"],                                          "id" => $art["id"],
51                                          "title" => MyEscape($art["title"]),                                          "title" => MyEscape($art["title"]),
# Line 54  Line 57 
57                                          "titlepic_height" => $art["pic_h"],                                          "titlepic_height" => $art["pic_h"],
58                                          "text" => $art["text"],                                          "text" => $art["text"],
59                                          "links" => GetLinks($art["read"] && $art["id"],                                          "links" => GetLinks($art["read"] && $art["id"],
60                                                  MyEscape($art["more"]), MyEscape($art["more_title"]),                                                  /* MyEscape($art["more"]) */ (count($art["text"]) > 0 && $art["id"]) ? $art["more"] : "",
61                                                  $art["id"], $empty["category"], "top", $isEdit, true,                                                  MyEscape($art["more_title"]), $art["id"], $empty["category"], "top",
62                                                  ($i > 0), ($i < count($arts) - 1))                                                  $isEdit, true, ($i > 0), ($i < count($arts) - 1))
63                                  ));                                  ));
64                          }                          }
65                  }                  }

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

  ViewVC Help
Powered by ViewVC 1.1.26