/[pliva-si]/sections/novosti.inc
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 /sections/novosti.inc

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

revision 1.7 by dpavlin, Wed Nov 7 14:24:02 2001 UTC revision 1.9 by dpavlin, Tue Nov 20 12:11:02 2001 UTC
# Line 4  include("news_sif.inc"); Line 4  include("news_sif.inc");
4    
5  $sql_where="where $visible_is_true";  $sql_where="where $visible_is_true";
6    
7    $smarty->assign("m_session","&m=o_nas&");
8    $smarty->assign("m_session_urlend","&m=o_nas&");
9    $smarty->assign("m_form_session",'<input type="hidden" name="m" value="o_nas">');
10    
11  if (file_exists(find_html_file("more",$more))) {  if (file_exists(find_html_file("more",$more))) {
12    
13          $main=join('',file(find_html_file("more",$more)));          $main=join('',file(find_html_file("more",$more)));
# Line 50  if (file_exists(find_html_file("more",$m Line 54  if (file_exists(find_html_file("more",$m
54          if (isset($days)) {          if (isset($days)) {
55                  if ($days != 0) {                  if ($days != 0) {
56                          $sql_where.=" and date(now())-date(date) > 0 and date(now())-date(date) < $days";                          $sql_where.=" and date(now())-date(date) > 0 and date(now())-date(date) < $days";
57                          $title.=" : News in last $days days";                          $title.=" : Pregled novic zadnjega $days dni";
58                  }                  }
59                  $smarty->assign("days",$days);                  $smarty->assign("days",$days);
60                  $smarty->assign("last_days",array(14,30,160,240,365));                  $smarty->assign("last_days",array(14,30,160,240,365));
61                  $smarty->assign("last_desc",array("two weeks","one month","four months","six months","one year"));                  $smarty->assign("last_desc",array("zadnjih dveh tednov","meseca","stirih mesecev","sestih mesecev","enega leta"));
62          }          }
63    
64          $num_selected=0;          $num_selected=0;
# Line 66  if (file_exists(find_html_file("more",$m Line 70  if (file_exists(find_html_file("more",$m
70          $sth = $dbh->prepare("$sql");          $sth = $dbh->prepare("$sql");
71          $sth->execute();          $sth->execute();
72          while ($row=$sth->fetchrow_hash()) {          while ($row=$sth->fetchrow_hash()) {
73                    if ($row[pdf]) $row[url]="blob/".$row[pdf];
74                  $data[]=$row;                  $data[]=$row;
75                  $num_selected++;                  $num_selected++;
76          }          }
# Line 94  if (file_exists(find_html_file("more",$m Line 99  if (file_exists(find_html_file("more",$m
99    
100    
101          if (isset($days) && $num_selected == 0) {          if (isset($days) && $num_selected == 0) {
102                  $warning = "There are no news for last $days days.";                  $warning = "Ni novic v zadnjih $days dmeh.";
103          } elseif ($main == "" && $num_selected == 0) {          } elseif ($main == "" && $num_selected == 0) {
104                  $warning = "This news item is no longer available";                  $warning = "Podatki niso vec dostopni.";
105          }          }
106    
107          $smarty->assign(array(          $smarty->assign(array(

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

  ViewVC Help
Powered by ViewVC 1.1.26