]> src.bluestatic.org Git - viewsvn.git/blob - global.php
Moving dev/ to docs/
[viewsvn.git] / global.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 require_once('./includes/init.php');
23
24 $dochooser = ((defined('PATH_OVERRIDE') AND PATH_OVERRIDE == 1) ? false : true);
25 if ($dochooser)
26 {
27 require_once('./includes/cachev.php');
28 $cachev = new cacheV();
29 $cachev->set_hash();
30
31 if ($viewsvn->in['rebuild'] AND $viewsvn->get('debug') == true)
32 {
33 $cachev->build(null);
34 }
35 else
36 {
37 $cachev->exec_build();
38 }
39 }
40
41 $fetchtemplates[] = 'header';
42 $fetchtemplates[] = 'footer';
43 $fetchtemplates[] = 'doctype';
44 $fetchtemplates[] = 'headinclude';
45
46 $show['reposchooser'] = false;
47 if ($viewsvn->repos->container AND $dochooser)
48 {
49 $show['reposchooser'] = true;
50 $fetchtemplates[] = 'select_option';
51 }
52
53 $template->cache((array)$fetchtemplates);
54
55 $options = '';
56 if ($show['reposchooser'])
57 {
58 $html = '';
59 $options = $viewsvn->repos->fetch_list();
60 foreach ($options AS $option)
61 {
62 $value = $option;
63 $display = $option;
64 $selected = ($viewsvn->paths->repos == $option ? true : false);
65 eval('$html .= "' . $template->fetch('select_option') . '";');
66 }
67 $options = $html;
68 }
69
70 $year = date('Y');
71
72 eval('$header = "' . $template->fetch('header') . '";');
73 eval('$footer = "' . $template->fetch('footer') . '";');
74 eval('$doctype = "' . $template->fetch('doctype') . '";');
75 eval('$headinclude = "' . $template->fetch('headinclude') . '";');
76
77 /*=====================================================================*\
78 || ###################################################################
79 || # $HeadURL$
80 || # $Id$
81 || ###################################################################
82 \*=====================================================================*/
83 ?>