12 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
12 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
14 */ |
14 */ |
15 |
15 |
16 if ( !defined('IN_ENANO_INSTALL') ) |
16 if ( !defined('IN_ENANO_INSTALL') ) |
17 die(); |
17 die(); |
18 |
18 |
19 function show_license($fb = false) |
19 function show_license($fb = false) |
20 { |
20 { |
21 global $lang; |
21 global $lang; |
22 global $installer_version; |
22 global $installer_version; |
23 ?> |
23 ?> |
24 <div class="scroller"> |
24 <div class="scroller"> |
25 <?php |
25 <?php |
26 if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') ) |
26 if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') ) |
27 { |
27 { |
28 echo 'Cannot find the license files.'; |
28 echo 'Cannot find the license files.'; |
29 } |
29 } |
30 echo file_get_contents('./language/english/install/license-deed.html'); |
30 echo file_get_contents('./language/english/install/license-deed.html'); |
31 if ( $installer_version['type'] != 'stable' ) |
31 if ( $installer_version['type'] != 'stable' ) |
32 { |
32 { |
33 ?> |
33 ?> |
34 <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3> |
34 <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3> |
35 <p><?php echo $lang->get('license_info_unstable_body'); ?></p> |
35 <p><?php echo $lang->get('license_info_unstable_body'); ?></p> |
36 <?php |
36 <?php |
37 } |
37 } |
38 ?> |
38 ?> |
39 <h3><?php echo $lang->get('license_section_gpl_heading'); ?></h3> |
39 <h3><?php echo $lang->get('license_section_gpl_heading'); ?></h3> |
40 <?php if ( $lang->lang_code != 'eng' ): ?> |
40 <?php if ( $lang->lang_code != 'eng' ): ?> |
41 <p><i><?php echo $lang->get('license_gpl_blurb_inenglish'); ?></i></p> |
41 <p><i><?php echo $lang->get('license_gpl_blurb_inenglish'); ?></i></p> |
42 <?php endif; ?> |
42 <?php endif; ?> |
43 <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?> |
43 <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?> |
44 <?php |
44 <?php |
45 global $template; |
45 global $template; |
46 if ( $fb ) |
46 if ( $fb ) |
47 { |
47 { |
48 echo '<p style="text-align: center;">Because I could never find the Create a Page button in PHP-Nuke.</p>'; |
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>'; |
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>'; |
50 echo '<p style="text-align: center;">It\'s not a portal, my friends.</p>'; |
51 } |
51 } |
52 ?> |
52 ?> |
53 </div> |
53 </div> |
54 <?php |
54 <?php |
55 } |
55 } |
56 |
56 |
57 function wikiFormat($text) |
57 function wikiFormat($text) |
58 { |
58 { |
59 require_once( ENANO_ROOT . '/includes/render.php' ); |
59 require_once( ENANO_ROOT . '/includes/render.php' ); |
60 require_once( ENANO_ROOT . '/includes/wikiformat.php' ); |
60 require_once( ENANO_ROOT . '/includes/wikiformat.php' ); |
61 require_once( ENANO_ROOT . '/includes/wikiengine/TagSanitizer.php' ); |
61 require_once( ENANO_ROOT . '/includes/wikiengine/TagSanitizer.php' ); |
62 require_once( ENANO_ROOT . '/includes/wikiengine/Tables.php' ); |
62 require_once( ENANO_ROOT . '/includes/wikiengine/Tables.php' ); |
63 |
63 |
64 $carpenter = new Carpenter(); |
64 $carpenter = new Carpenter(); |
65 // disable rules that require the DB |
65 // disable rules that require the DB |
66 $carpenter->disable_rule('templates'); |
66 $carpenter->disable_rule('templates'); |
67 $carpenter->disable_rule('internallink'); |
67 $carpenter->disable_rule('internallink'); |
68 $carpenter->disable_rule('image'); |
68 $carpenter->disable_rule('image'); |
69 |
69 |
70 $text = $carpenter->render($text); |
70 $text = $carpenter->render($text); |
71 |
71 |
72 return $text; |
72 return $text; |
73 } |
73 } |
74 |
74 |
75 ?> |
75 ?> |
76 <h3><?php echo $lang->get('license_heading'); ?></h3> |
76 <h3><?php echo $lang->get('license_heading'); ?></h3> |
77 <p><?php echo $lang->get('license_blurb_thankyou'); ?></p> |
77 <p><?php echo $lang->get('license_blurb_thankyou'); ?></p> |
78 <p><?php echo $lang->get('license_blurb_pleaseread'); ?></p> |
78 <p><?php echo $lang->get('license_blurb_pleaseread'); ?></p> |
79 <?php show_license(); ?> |
79 <?php show_license(); ?> |
80 <div class="pagenav"> |
80 <div class="pagenav"> |
81 <form action="install.php?stage=sysreqs" method="post"> |
81 <form action="install.php?stage=sysreqs" method="post"> |
82 <?php |
82 <?php |
83 echo '<input type="hidden" name="language" value="' . $lang_id . '" />'; |
83 echo '<input type="hidden" name="language" value="' . $lang_id . '" />'; |
84 ?> |
84 ?> |
85 <table border="0"> |
85 <table border="0"> |
86 <tr> |
86 <tr> |
87 <td> |
87 <td> |
88 <input type="submit" value="<?php echo $lang->get('license_btn_i_agree'); ?>" /> |
88 <input type="submit" value="<?php echo $lang->get('license_btn_i_agree'); ?>" /> |
89 </td> |
89 </td> |
90 <td> |
90 <td> |
91 <p> |
91 <p> |
92 <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br /> |
92 <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br /> |
93 • <?php echo $lang->get('license_objective_ensure_agree'); ?><br /> |
93 • <?php echo $lang->get('license_objective_ensure_agree'); ?><br /> |
94 • <?php echo $lang->get('license_objective_have_db_info'); ?> |
94 • <?php echo $lang->get('license_objective_have_db_info'); ?> |
95 </p> |
95 </p> |
96 </td> |
96 </td> |
97 </tr> |
97 </tr> |
98 </table> |
98 </table> |
99 </form> |
99 </form> |
100 </div> |
100 </div> |
101 <?php |
101 <?php |
102 |
102 |
103 ?> |
103 ?> |