/[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

Contents of /index.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations)
Fri Jun 29 14:12:07 2001 UTC (18 years, 3 months ago) by dpavlin
Branch: MAIN
Changes since 1.4: +3 -1 lines
m=section support in URL

1 <?php
2 require("Smarty.class.php");
3 require("conn.inc");
4
5 $smarty = new Smarty;
6
7
8 $smarty->assign( array ( Title=>"PLIVA Ljubljana" ) );
9
10 $section=str_replace(".php","",basename($PHP_SELF));
11 $smarty->assign("section",$section);
12
13 $main_file=$section;
14
15 require("inc/section.php");
16
17 $smarty->assign("r1link", "#");
18 $smarty->assign("r1pic", "bisolex.jpg");
19 $smarty->assign("r2link", "#");
20 $smarty->assign("r2pic", "andol1.jpg");
21
22 include("common.inc");
23
24 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 } elseif (isset($p) && file_exists("sections/$p.inc")) {
38 include("sections/$p.inc");
39 } else {
40 $main="<b>can't find template or html file for section $section</b>";
41 }
42 $smarty->assign(array(section=>$section,
43 mpic=>$mpic,
44 Section_title=>$title,
45 rnd=>$rnd,
46 MAIN=>$main,
47 ));
48
49 $smarty->display("index.tpl");
50 ?>

  ViewVC Help
Powered by ViewVC 1.1.26