XOOPS  2.6.0
install_tpl.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
28 defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
29 
30 $pageHasHelp = $_SESSION['pageHasHelp'];
31 $pageHasForm = $_SESSION['pageHasForm'];
32 $content = $_SESSION['content'];
33 
34 /* @var $wizard XoopsInstallWizard */
35 $wizard = $_SESSION['wizard'];
36 
37 $keys = array_keys($wizard->pages);
38 $current = $wizard->pageIndex;
39 if ($current == 0) {
40 
41  $pages = array(
42  array(
43  'name' => $wizard->pages[$wizard->currentPage]['name'], 'index' => $wizard->pageIndex + 1,
44  'current' => true, 'past' => false
45  ), array(
46  'name' => $wizard->pages[$keys[$current + 1]]['name'], 'index' => $wizard->pageIndex + 2,
47  'current' => false, 'past' => false
48  ), array(
49  'name' => $wizard->pages[$keys[$current + 2]]['name'], 'index' => $wizard->pageIndex + 3,
50  'current' => false, 'past' => false
51  ), array(
52  'name' => $wizard->pages[$keys[$current + 3]]['name'], 'index' => $wizard->pageIndex + 4,
53  'current' => false, 'past' => false
54  )
55  );
56 } elseif ($current > 0 && $current < count($keys) - 1) {
57  $pages = array(
58  array(
59  'name' => $wizard->pages[$keys[$current - 1]]['name'], 'index' => $wizard->pageIndex, 'current' => false,
60  'past' => true
61  ), array(
62  'name' => $wizard->pages[$wizard->currentPage]['name'], 'index' => $wizard->pageIndex + 1,
63  'current' => true, 'past' => false
64  ), array(
65  'name' => $wizard->pages[$keys[$current + 1]]['name'], 'index' => $wizard->pageIndex + 2,
66  'current' => false, 'past' => false
67  )/*, array(
68  'name' => $wizard->pages[$keys[$current + 2]]['name'], 'index' => $wizard->pageIndex + 3,
69  'current' => false, 'past' => false
70  ), array(
71  'name' => $wizard->pages[$keys[$current + 3]]['name'], 'index' => $wizard->pageIndex + 4,
72  'current' => false, 'past' => false
73  ) */
74  );
75 } else {
76  $pages = array();
77  for ($i = count($keys) - 3; $i < count($keys); ++$i) {
78  $pages[] = array(
79  'name' => $wizard->pages[$keys[$i]]['name'], 'index' => $i,
80  'current' => $i == $wizard->pageIndex ? true : false, 'past' => $i < $wizard->pageIndex ? true : false
81  );
82  }
83 }
84 
85 ?>
86 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
87  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
88 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo _LANGCODE; ?>" lang="<?php echo _LANGCODE; ?>">
89 
90 <head>
91  <title>
92  <?php echo XOOPS_VERSION . ' : ' . XOOPS_INSTALL_WIZARD; ?>
93  (<?php echo ($wizard->pageIndex + 1) . '/' . count($wizard->pages); ?>)
94  </title>
95  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _INSTALL_CHARSET ?>"/>
96  <link rel="shortcut icon" type="image/ico" href="../favicon.ico"/>
97  <link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="css/style.css"/>
98  <?php
99  if (file_exists('locale/' . $wizard->language . '/style.css')) {
100  echo '<link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="locale/' . $wizard->language . '/style.css" />';
101  }
102  ?>
103 
104  <script type="text/javascript" src="./js/prototype-1.6.0.3.js"></script>
105  <script type="text/javascript" src="./js/xo-installer.js"></script>
106 </head>
107 
108 <body>
109 <div id="xo-main-logo">
110  <img src="img/logo.png" alt="XOOPS"/>
111 </div>
112 <div id="xo-container-brd">&nbsp;</div>
113 <div id="xo-container">
114  <div id="xo-header" class="gradient_bar">
115  <!--<div class="xo_title_c"><div class="xo_title gradient_bar"><?php echo XOOPS_INSTALL_WIZARD; ?></div></div>-->
116  <ul>
117  <?php foreach ($pages as $page): ?>
118  <li<?php echo $page['current'] ? ' class="current"' : ''; ?><?php echo $page['past'] ? ' class="past"' : ''; ?>>
119  <?php echo $page['name']; ?>
120  <span><?php echo $page['index']; ?><?php if ($page['past']): ?><img src="./img/yes.png"
121  alt=""/><?php endif; ?></span>
122  </li>
123  <?php endforeach; ?>
124  </ul>
125  </div>
126  <form id='<?php echo $wizard->pages[$wizard->currentPage]['name']; ?>' action='<?php echo $_SERVER['PHP_SELF']; ?>'
127  method='post'>
128  <div id="xo-page-title">
129  <?php if (@$pageHasHelp) { echo "<img id=\"help_button\" src=\"./img/help.png\" alt=\"" . HELP_BUTTON_ALT . "\" title=\"" . HELP_BUTTON_ALT . "\" onclick=\"document.body.className = 'show-help';\" />"; }; ?>
130  <span class="index"><?php echo $wizard->pageIndex + 1; ?></span>
131  <span class="setup"><?php echo XOOPS_INSTALL_WIZARD; ?></span>
132  <span class="title"><?php echo $wizard->pages[$wizard->currentPage]['title']; ?></span>
133  </div>
134  <div id="xo-page">
135  <?php echo $content; ?>
136  </div>
137  <div id="buttons">
138  <?php if ($wizard->pageIndex != 0) { ?>
139  <button type="button" class="buttong" accesskey="p"
140  onclick="location.href='<?php echo $wizard->pageURI('-1'); ?>'">
141  <?php echo BUTTON_PREVIOUS; ?>
142  </button>
143  <?php } ?>
144  <?php if (@$pageHasForm) { ?>
145  <button type="submit" class="gradient_bar button">
146  <?php } else { ?>
147  <button type="button" class="gradient_bar button" accesskey="n"
148  onclick="location.href='<?php echo $wizard->pageURI('+1'); ?>'">
149  <?php } ?>
150  <?php echo BUTTON_NEXT; ?>
151  </button>
152  </div>
153  </form>
154 </div>
155 
156 
157 </body>
158 </html>
const HELP_BUTTON_ALT
Definition: install.php:68
$_SESSION['RF']["verify"]
Definition: dialog.php:4
$i
Definition: dialog.php:68
$page
Definition: help.php:31
const BUTTON_PREVIOUS
Definition: install.php:128
$wizard
Definition: install_tpl.php:35
const XOOPS_INSTALL_WIZARD
Definition: install.php:44
$wizard form
const XOOPS_VERSION
Definition: version.php:23
$pages
Definition: page.php:27
$keys
Definition: install_tpl.php:37
$pageHasHelp
Definition: install_tpl.php:30
$pageHasForm
Definition: install_tpl.php:31
$content
Definition: install_tpl.php:32
const BUTTON_NEXT
Definition: install.php:129
$current
Definition: install_tpl.php:38
if(!$helper)