install/includes/stages/license.php
author Dan
Tue, 10 Jun 2008 10:51:44 -0400
changeset 569 6ba792bc9071
parent 536 218a627eb53e
child 685 17ebe24cdf85
permissions -rw-r--r--
Updated image tag parser a bit. Handles recursion of brackets properly now, allows custom parameters from plugins, and takes parameters in any order due to new keyword-based parser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     1
<?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     2
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     3
/*
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     4
 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
536
218a627eb53e Rebrand as 1.1.4 (Caoineag alpha 4)
Dan
parents: 396
diff changeset
     5
 * Version 1.1.4 (Caoineag alpha 4)
218a627eb53e Rebrand as 1.1.4 (Caoineag alpha 4)
Dan
parents: 396
diff changeset
     6
 * Copyright (C) 2006-2008 Dan Fuhry
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     7
 * Installation package
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     8
 * license.php - Installer license-agreement stage
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     9
 *
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    10
 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    11
 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    12
 *
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    13
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    14
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    15
 */
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    16
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    17
if ( !defined('IN_ENANO_INSTALL') )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    18
  die();
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    19
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    20
function show_license($fb = false)
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    21
{
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    22
  global $lang;
396
3289e4dcb4b8 Fixed some stray undefined-variable problems revealed as a result of testing on Windows Server '03, IIS6, PHP/FastCGI, and PostgreSQL 8.2.5.
Dan
parents: 348
diff changeset
    23
  global $installer_version;
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    24
  ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    25
  <div class="scroller">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    26
  <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    27
    if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    28
    {
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    29
      echo 'Cannot find the license files.';
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    30
    }
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    31
    echo file_get_contents('./language/english/install/license-deed.html');
396
3289e4dcb4b8 Fixed some stray undefined-variable problems revealed as a result of testing on Windows Server '03, IIS6, PHP/FastCGI, and PostgreSQL 8.2.5.
Dan
parents: 348
diff changeset
    32
    if ( $installer_version['type'] != 'stable' )
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    33
    {
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    34
      ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    35
      <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    36
      <p><?php echo $lang->get('license_info_unstable_body'); ?></p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    37
      <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    38
    }
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    39
    ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    40
    <h3><?php echo $lang->get('license_section_gpl_heading'); ?></h3>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    41
    <?php if ( $lang->lang_code != 'eng' ): ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    42
    <p><i><?php echo $lang->get('license_gpl_blurb_inenglish'); ?></i></p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    43
    <?php endif; ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    44
    <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    45
   <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    46
   global $template;
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    47
   if ( $fb )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    48
   {
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    49
     echo '<p style="text-align: center;">Because I could never find the Create a Page button in PHP-Nuke.</p>';
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    50
     echo '<p>' . str_replace('http://enanocms.org/', 'http://www.2robots.com/2003/10/15/web-portals-suck/', $template->fading_button) . '</p>';
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    51
     echo '<p style="text-align: center;">It\'s not a portal, my friends.</p>';
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    52
   }
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    53
   ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    54
 </div>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    55
 <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    56
}
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    57
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    58
function wikiFormat($message, $filter_links = true)
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    59
{
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    60
  $wiki = & Text_Wiki::singleton('Mediawiki');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    61
  $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
396
3289e4dcb4b8 Fixed some stray undefined-variable problems revealed as a result of testing on Windows Server '03, IIS6, PHP/FastCGI, and PostgreSQL 8.2.5.
Dan
parents: 348
diff changeset
    62
  $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', scriptPath . '/index.php?title=');
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    63
  $result = $wiki->transform($message, 'Xhtml');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    64
  
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    65
  // HTML fixes
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    66
  $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    67
  $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    68
  $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    69
  
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    70
  return $result;
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    71
}
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    72
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    73
?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    74
    <h3><?php echo $lang->get('license_heading'); ?></h3>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    75
     <p><?php echo $lang->get('license_blurb_thankyou'); ?></p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    76
     <p><?php echo $lang->get('license_blurb_pleaseread'); ?></p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    77
     <?php show_license(); ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    78
     <div class="pagenav">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    79
       <form action="install.php?stage=sysreqs" method="post">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    80
       <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    81
       echo '<input type="hidden" name="language" value="' . $lang_id . '" />';
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    82
       ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    83
         <table border="0">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    84
         <tr>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    85
           <td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    86
             <input type="submit" value="<?php echo $lang->get('license_btn_i_agree'); ?>" />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    87
           </td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    88
           <td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    89
             <p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    90
               <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    91
               &bull; <?php echo $lang->get('license_objective_ensure_agree'); ?><br />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    92
               &bull; <?php echo $lang->get('license_objective_have_db_info'); ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    93
             </p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    94
           </td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    95
         </tr>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    96
         </table>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    97
       </form>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    98
     </div>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    99
    <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   100
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   101
?>