/[corp_html]/new.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 /new.php

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

revision 1.10 by dpavlin, Mon Mar 5 12:34:12 2001 UTC revision 1.13 by dpavlin, Thu Apr 5 11:54:08 2001 UTC
# Line 76  if (file_exists(find_html_file("news",$m Line 76  if (file_exists(find_html_file("news",$m
76          }          }
77    
78    
79            if (isset($days)) {
80                    if ($days != 0) {
81                            $sql_where.=" and date(now())-date(date) > 0 and date(now())-date(date) < $days";
82                            $title.=" : News in last $days days";
83                    }
84                    $smarty->assign("days",$days);
85                    $smarty->assign("last_days",array(14,30,160,240,365));
86                    $smarty->assign("last_desc",array("two week","one month","four months","six months","one year"));
87            }
88    
89          $num_selected=0;          $num_selected=0;
90          $sql="select          $sql="select
91                          id,upper(title) as title,town_date,body,more,pdf,                          id,upper(title) as title,town_date,body,more,pdf,
# Line 111  if (file_exists(find_html_file("news",$m Line 121  if (file_exists(find_html_file("news",$m
121                          $title.=" : Community : ".$data[0][title_lc];                          $title.=" : Community : ".$data[0][title_lc];
122                  } elseif ($data[0][type] == "r") {                  } elseif ($data[0][type] == "r") {
123                          $title.=" : Result : ".$data[0][title_lc];                          $title.=" : Result : ".$data[0][title_lc];
124                    } elseif ($data[0][type] == "i") {
125                            $title.=" : Investors News : ".$data[0][title_lc];
126                    } elseif ($data[0][type] == "a") {
127                            $title.=" : Annual Report : ".$data[0][title_lc];
128                  }                  }
129          }          }
130    
131          $smarty->assign("data",$data);  
132            if (isset($days) && $num_selected == 0) {
133                    $warning = "There are no news for last $days days.";
134            }
135    
136            if ($main == "" && $num_selected == 0) {
137                    $warning = "This news item is no longer available";
138            }
139    
140            $smarty->assign(array(
141                    data=>$data,
142                    warning=>$warning
143                    ));
144    
145          $main=$smarty->fetch("new.tpl");          $main=$smarty->fetch("new.tpl");
146    
# Line 122  if (file_exists(find_html_file("news",$m Line 148  if (file_exists(find_html_file("news",$m
148                  $main=join('',file(find_html_file("news",$data[0][more])));                  $main=join('',file(find_html_file("news",$data[0][more])));
149          }          }
150    
         if ($main == "") {  
                 $main = "This news item is no longer available";  
         }  
151    
152  }  }
153    

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

  ViewVC Help
Powered by ViewVC 1.1.26