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

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

revision 1.9 by ravilov, Tue Oct 2 16:18:09 2001 UTC revision 1.10 by ravilov, Thu Oct 4 14:59:35 2001 UTC
# Line 14  Line 14 
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                  }                  }
17                  $cat = "l";                  $cat = "l"; $acat = "l";
18                  if ($section_menu == "sex") {                  if ($section_menu == "sex") {
19                          $cat = "x";                          $cat = "x"; $acat2 = "x";
                         # if ($section_menu2 == "qa") $cat = "q";  
20                          if ($section_menu2 == "rjecnik") $cat = "j";                          if ($section_menu2 == "rjecnik") $cat = "j";
21                  }                  }
22                  if ($section_menu == "zdrava") {                  if ($section_menu == "zdrava") {
23                          $cat = "h";                          $cat = "h"; $acat2 = "z";
24                          if ($section_menu2 == "tema") $cat = "a";                          if ($section_menu2 == "tema") $cat = "a";
25                          if ($section_menu2 == "nutri") $cat = "n";                          if ($section_menu2 == "nutri") $cat = "n";
                         # if ($section_menu2 == "qa") $cat = "a";  
26                          if ($section_menu2 == "kuhanje") $cat = "v";                          if ($section_menu2 == "kuhanje") $cat = "v";
                         # if ($section_menu2 == "dtd") $cat = "y";  
                         # if ($section_menu2 == "vrijednosti") $cat = "i";  
27                  }                  }
28                  if ($section_menu == "fitness") {                  if ($section_menu == "fitness") {
29                          $cat = "f";                          $cat = "f"; $acat2 = "f";
30                          if ($section_menu2 == "tema") $cat = "1";                          if ($section_menu2 == "tema") $cat = "1";
                         # if ($section_menu2 == "qa") $cat = "1";  
31                          if ($section_menu2 == "trening") $cat = "g";                          if ($section_menu2 == "trening") $cat = "g";
32                          if ($section_menu2 == "istezanje") $cat = "s";                          if ($section_menu2 == "istezanje") $cat = "s";
33                          if ($section_menu2 == "ozljede") $cat = "2";                          if ($section_menu2 == "ozljede") $cat = "2";
34                          # if ($section_menu2 == "trener") $cat = "b";                          # if ($section_menu2 == "trener") $cat = "b";
35                          if ($section_menu2 == "vjezbe") $cat = "u";                          if ($section_menu2 == "vjezbe") $cat = "u";
                         # if ($section_menu2 == "fitcenter") $cat = "k";  
36                  }                  }
37                  if ($cat == "x") {                  if ($cat == "x") {
38                          $empty = array("category" => "y", "limit" => 1, "offset" => 0, "npar" => 0);                          $empty = array("category" => "y", "limit" => 1, "offset" => 0, "npar" => 0);
# Line 73  Line 67 
67                                          /* MyEscape($art["more"]) */ (count($art["text"]) > 0 && $art["id"]) ? $art["more"] : "",                                          /* MyEscape($art["more"]) */ (count($art["text"]) > 0 && $art["id"]) ? $art["more"] : "",
68                                          MyEscape($art["more_title"]), $art["id"], $empty["category"],                                          MyEscape($art["more_title"]), $art["id"], $empty["category"],
69                                          "kol", $isEdit, false, false, false));                                          "kol", $isEdit, false, false, false));
70                                  $tpl->assign("kol_read", $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? true : false);                                  $tpl->assign("kol_read", $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : "");
71                          }                          }
72                  }                  }
73                  if (!$offset) $offset = 0;                  if (!$offset) $offset = 0;
# Line 115  Line 109 
109                                                  /* 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"] : "",
110                                                  MyEscape($art["more_title"]), $art["id"], $empty["category"], "top",                                                  MyEscape($art["more_title"]), $art["id"], $empty["category"], "top",
111                                                  $isEdit, true, ($i > 0), ($i < count($arts) - 1)),                                                  $isEdit, true, ($i > 0), ($i < count($arts) - 1)),
112                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? true : false                                          "read" => $art["read"] || ($art["more"] && !strstr($art["more"], "?")) ? $art["read"] : ""
113                                  ));                                  ));
114                          }                          }
115                  }                  }
116                  $tpl->assign("top", $a2);                  $tpl->assign("top", $a2);
117                  $tpl->assign("cat", $cat);                  $tpl->assign("cat", $cat);
118                  $tpl->assign("next", (count($arts) > 10) ? ($offset + 10) : 0);                  $tpl->assign("next", (count($arts) > 10) ? ($offset + 10) : 0);
119                  $tpl->assign("prev", ($offset > 0) ? ($offset - 10) : false);                  $tpl->assign("prev", $offset ? ($offset - 10) : 0);
120                    $tpl->assign("offset", $offset);
121          }          }
122          $dbh->disconnect();          $dbh->disconnect();
123  ?>  ?>

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26