/[pliva-si]/index.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 /index.php

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

revision 1.2 by dpavlin, Thu Jun 28 13:33:04 2001 UTC revision 1.4 by dpavlin, Fri Jun 29 12:55:11 2001 UTC
# Line 4  require("conn.inc"); Line 4  require("conn.inc");
4    
5  $smarty = new Smarty;  $smarty = new Smarty;
6    
7  $smarty->assign( array ( Title=>"Pliva d.d." ) );  $smarty->assign( array ( Title=>"PLIVA Ljubljana" ) );
8    
9  $section=str_replace(".php","",basename($PHP_SELF));  $section=str_replace(".php","",basename($PHP_SELF));
10  $smarty->assign("section",$section);  $smarty->assign("section",$section);
# Line 13  $main_file=$section; Line 13  $main_file=$section;
13    
14  require("inc/section.php");  require("inc/section.php");
15    
 $smarty->assign(array(section=>$section, mpic=>$mpic, Section_title=>$title, rnd=>$rnd));  
16    
17  $smarty->assign("r1link", "#");  $smarty->assign("r1link", "#");
18  $smarty->assign("r1pic", "bisolex.jpg");  $smarty->assign("r1pic", "bisolex.jpg");
# Line 22  $smarty->assign("r2pic", "andol1.jpg"); Line 21  $smarty->assign("r2pic", "andol1.jpg");
21    
22  include("common.inc");  include("common.inc");
23    
24  $smarty->assign("MAIN",$smarty->fetch("$main_file.tpl"));  include("find_html_file.inc");
25    
26    if (isset($h) && file_exists(find_html_file("h/$section",$h))) {
27            $main=join('',file(find_html_file("h/$section",$h)));
28            if ($menu_item) {
29                    $title.=" : $menu_item";
30            }
31    } elseif (file_exists("template/$main_file.tpl")) {
32            $main=$smarty->fetch("$main_file.tpl");
33    } elseif (find_html_file("h",$section)) {
34            $main=join('',file(find_html_file("h",$section)));
35    } elseif (file_exists("sections/$section.inc")) {
36            include("sections/$section.inc");
37    } else {
38            $main="<b>can't find template or html file for section $section</b>";
39    }
40    $smarty->assign(array(section=>$section,
41            mpic=>$mpic,
42            Section_title=>$title,
43            rnd=>$rnd,
44            MAIN=>$main,
45            ));
46    
47  $smarty->display("index.tpl");  $smarty->display("index.tpl");
48  ?>  ?>

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

  ViewVC Help
Powered by ViewVC 1.1.26