|
1 <?php |
|
2 |
|
3 /* |
|
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
5 * Version 1.1.1 |
|
6 * Copyright (C) 2006-2007 Dan Fuhry |
|
7 * Installation package |
|
8 * license.php - Installer license-agreement stage |
|
9 * |
|
10 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
11 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
12 * |
|
13 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
14 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
15 */ |
|
16 |
|
17 if ( !defined('IN_ENANO_INSTALL') ) |
|
18 die(); |
|
19 |
|
20 function show_license($fb = false) |
|
21 { |
|
22 global $lang; |
|
23 ?> |
|
24 <div class="scroller"> |
|
25 <?php |
|
26 if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') ) |
|
27 { |
|
28 echo 'Cannot find the license files.'; |
|
29 } |
|
30 echo file_get_contents('./language/english/install/license-deed.html'); |
|
31 if ( defined('ENANO_BETA_VERSION') || $branch == 'unstable' ) |
|
32 { |
|
33 ?> |
|
34 <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3> |
|
35 <p><?php echo $lang->get('license_info_unstable_body'); ?></p> |
|
36 <?php |
|
37 } |
|
38 ?> |
|
39 <h3><?php echo $lang->get('license_section_gpl_heading'); ?></h3> |
|
40 <?php if ( $lang->lang_code != 'eng' ): ?> |
|
41 <p><i><?php echo $lang->get('license_gpl_blurb_inenglish'); ?></i></p> |
|
42 <?php endif; ?> |
|
43 <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?> |
|
44 <?php |
|
45 global $template; |
|
46 if ( $fb ) |
|
47 { |
|
48 echo '<p style="text-align: center;">Because I could never find the Create a Page button in PHP-Nuke.</p>'; |
|
49 echo '<p>' . str_replace('http://enanocms.org/', 'http://www.2robots.com/2003/10/15/web-portals-suck/', $template->fading_button) . '</p>'; |
|
50 echo '<p style="text-align: center;">It\'s not a portal, my friends.</p>'; |
|
51 } |
|
52 ?> |
|
53 </div> |
|
54 <?php |
|
55 } |
|
56 |
|
57 function wikiFormat($message, $filter_links = true) |
|
58 { |
|
59 $wiki = & Text_Wiki::singleton('Mediawiki'); |
|
60 $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename'); |
|
61 $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', contentPath); |
|
62 $result = $wiki->transform($message, 'Xhtml'); |
|
63 |
|
64 // HTML fixes |
|
65 $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result); |
|
66 $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result); |
|
67 $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result); |
|
68 |
|
69 return $result; |
|
70 } |
|
71 |
|
72 ?> |
|
73 <h3><?php echo $lang->get('license_heading'); ?></h3> |
|
74 <p><?php echo $lang->get('license_blurb_thankyou'); ?></p> |
|
75 <p><?php echo $lang->get('license_blurb_pleaseread'); ?></p> |
|
76 <?php show_license(); ?> |
|
77 <div class="pagenav"> |
|
78 <form action="install.php?stage=sysreqs" method="post"> |
|
79 <?php |
|
80 echo '<input type="hidden" name="language" value="' . $lang_id . '" />'; |
|
81 ?> |
|
82 <table border="0"> |
|
83 <tr> |
|
84 <td> |
|
85 <input type="submit" value="<?php echo $lang->get('license_btn_i_agree'); ?>" /> |
|
86 </td> |
|
87 <td> |
|
88 <p> |
|
89 <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br /> |
|
90 • <?php echo $lang->get('license_objective_ensure_agree'); ?><br /> |
|
91 • <?php echo $lang->get('license_objective_have_db_info'); ?> |
|
92 </p> |
|
93 </td> |
|
94 </tr> |
|
95 </table> |
|
96 </form> |
|
97 </div> |
|
98 <?php |
|
99 |
|
100 ?> |