* Invision Power Services * IP.Board v3.4.9 * Setup skin file * Last Updated: $Date: 2013-01-03 20:08:10 -0500 (Thu, 03 Jan 2013) $ * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @license http://www.invisionpower.com/company/standards.php#license * @package IP.Board * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 * @version $Revision: 11784 $ */ class skin_setup extends output { /** * Show no button * */ private $_showNoButtons = FALSE; /** * Prevent our main destructor being called by this class * * @access public * @return @e void */ public function __destruct() { } /** * CSS for the database checker * * @access public * @return @e void */ public function db_checker_css() { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << .section_title { margin-bottom: 10px; } .warning, .information-box { padding: 10px 10px 10px 30px; } .warning { background: #f7e5e8 url( ../skin_cp/images/icons/exclamation.png ) no-repeat 9px 10px; border: 1px solid #f0c1cb; color: #92394d; } .warning h4 { color: #802200; font-weight: bold; } .information-box { background: #f0f6e2 url( ../skin_cp/images/icons/information.png ) no-repeat 9px 10px; border: 1px solid #d7e9a8; color: #5d8005; } .information-box h4 { color: #6c6141; } .acp-box h3 { font-size: 15px; font-weight: bold; } .ipsTable { width: 100%; } .ipsTable th { font-weight: bold; padding: 4px 4px 4px 0px; min-width: 50px; } .ipsTable th:nth-child(2) { text-align: center; } .ipsTable td { padding-top: 3px; padding-bottom: 3px; } .ipsTable td:nth-child(2) { text-align: center; } EOF; return $IPBHTML; } /** * Show install complete page * * @access public * @param array * @return string HTML */ public function upgrade_complete( $options ) { $IPBHTML = ""; //--starthtml--// $_productName = $this->registry->fetchGlobalConfigValue('name'); $IPBHTML .= << EOF; foreach( $options as $app => $_bleh ) { foreach( $options[ $app ] as $num => $data ) { if ( ! $data['out'] ) { continue; } if ( $data['app']['key'] == 'core' ) { $data['app']['name'] = 'IP.Board'; } $IPBHTML .= <<Messages

{$data['out']}

EOF; } } $IPBHTML .= <<Congratulations, your upgrade is complete!


Upgrade complete! EOF; $IPBHTML .= <<
  • Admin Control Panel
  • Client Area
  • Documentation
  • IPS Company Forum
  • EOF; return $IPBHTML; } /** * Show the page to manually run log query, with option to prune and run instead * * @access public * @return string HTML */ public function upgrade_manual_queries_logs( $queries, $id=1, $TABLE='' ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<Please run these queries before continuing
    You can click here to prune the log table '{$TABLE}' and let the upgrader apply the changes
    OR
    Run this query manually:
    EOF; return $IPBHTML; } /** * Show the install start page * * @access public * @return string HTML */ public function upgrade_manual_queries( $queries, $sourceFile='' ) { $IPBHTML = ""; //--starthtml--// $or = ''; $IPBHTML .= <<Please run these queries before continuing
    EOF; if ( $sourceFile ) { $or = 'OR '; $IPBHTML .= <<Run this source file
    EOF; } $IPBHTML .= <<{$or}Individual Queries
    EOF; return $IPBHTML; } /** * Show the install start page * * @access public * @return string HTML */ public function upgrade_ready( $name, $current, $latest) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<$name
    Current Version: v{$current}
    Latest Version: v{$latest}
    Upgrade Options
    • Show me manual upgrade steps for SQL queries to prevent PHP page timeouts. WARNING: If you select this option, you will be shown SQL queries that you must run at your mysql command line. If you are not comfortable doing this, please submit a ticket and our technicians will assist you, or contact your webhost for assistance.
    • Update my help files if changes are found

    EOF; return $IPBHTML; } /** * Show the upgrade app options * * @access public * @return string HTML */ public function upgrade_appsOptions( $options ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << EOF; foreach( $options as $app => $_bleh ) { foreach( $options[ $app ] as $num => $data ) { if ( $data['app']['key'] == 'core' ) { $data['app']['name'] = 'IP.Board'; } $IPBHTML .= <<{$data['app']['name']} {$data['long']} {$data['out']}
    EOF; } } $IPBHTML .= << EOF; return $IPBHTML; } /** * Show the DB override page * * @access public * @return string HTML */ public function upgrade_previousSession( $session=array() ) { $IPBHTML = ""; //--starthtml--// $url = IPSSetUp::getSavedData('install_url'); $date = gmdate( 'r', $session['session_start_time'] ); $IPBHTML .= <<

    Unfinished Upgrade Detected

    An unfinished upgrade from {$date} GMT has been detected.
    The upgrade was on section '{$session['session_section']} - {$session['_session_get']['do']}' upgrading apps '{$session['_sd']['install_apps']}', currently on app '{$session['_sd']['appdir']}'

    You can continue from this point by clicking here or you may click the NEXT button below to start a new upgrade session.

    EOF; return $IPBHTML; } /** * Show the upgrader applications page * * @access public * @param array Applications * @return string HTML */ public function upgrade_apps( $apps, $notices ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << Please select the applications you wish to upgrade. EOF; foreach( array( 'core', 'ips', 'other' ) as $type ) { switch( $type ) { case 'core': $title = "Default Applications"; break; case 'ips': $title = "IPS Applications"; break; case 'other': $title = "Third Party Applications"; break; } if ( count( $apps[ $type ] ) ) { $IPBHTML .= << {$title} EOF; foreach( $apps[ $type ] as $key => $data ) { if ( $type == 'core' ) { if ( $key == 'core' ) { $data['name'] = 'IP.Board'; } else { continue; } } $_upav = ( $data['_vnumbers']['current'][0] >= $data['_vnumbers']['latest'][0] ) ? 0 : 1; $upgrade = ( ! $_upav ) ? "Up To Date" : "Upgrade to {$data['_vnumbers']['latest'][1]}"; $_checked = ( $_upav and $data['_vnumbers']['current'][0] ) ? ' checked="checked"' : ''; $_style = ( ! $data['_vnumbers']['current'][0] OR ( ! $_upav ) ) ? 'display:none' : ''; /* Not installed? */ if ( ! $data['_vnumbers']['current'][0] ) { $upgrade = "Cannot upgrade. Not installed"; $data['_vnumbers']['current'][1] = ''; } //----------------------------------------- // Yes, I know this wouldn't work for "core" // apps, but we can just use the global folder // for them so it's irrelevant //----------------------------------------- $img = is_file( IPSLib::getAppDir( $key ) . '/skin_cp/appIcon.png' ) ? $this->settings['base_url'] . '/' . CP_DIRECTORY . '/applications_addon/' . $type . '/' . $key . '/skin_cp/appIcon.png' : "../skin_cp/images/applications/{$key}.png"; $IPBHTML .= << {$data['name']} {$data['_vnumbers']['current'][1]} $upgrade EOF; if ( count( $notices[ $key ] ) ) { $IPBHTML .= "
      "; foreach ( $notices[ $key ] as $n ) { $IPBHTML .= "
    • {$n}
    • "; } $IPBHTML .= "
    "; } } $IPBHTML .= << EOF; } } return $IPBHTML; } /** * Show the upgrade overview page * * @access public * @param bool Files ok * @param bool Extensions ok * @param array Extensions * @return string HTML */ public function upgrade_overview( $filesOK, $extensionsOK, $extensions=array()) { $minPHP = IPSSetUp::minPhpVersion; $minSQL = IPSSetUp::minDb_mysql; $prefPHP = IPSSetUp::prefPhpVersion; $prefSQL = IPSSetUp::prefDb_mysql; /* Memory warning */ $_memLimit = null; $_recLimit = 128; if( @ini_get('memory_limit') ) { $_memLimit = @ini_get('memory_limit'); } $_filesOK = ( $filesOK === NULL ) ? "Not yet checked" : ( ( $filesOK === FALSE ) ? "Failed" : "Passed" ); $_extensionsOK = ( $extensionsOK === FALSE ) ? "Failed" : "Passed"; $IPBHTML = ""; //--starthtml--// $IPBHTML .= << System Requirements
    PHP: v{$minPHP} or better
    SQL: MySQL v{$minSQL} ({$prefSQL} or better preferred)

    EOF; if( $_memLimit ) { $_intLimit = $_memLimit; $_intRec = $_recLimit * 1024 * 1024; preg_match( '#^(\d+)(\w+)$#', strtolower($_intLimit), $match ); if( $match[2] == 'g' ) { $_intLimit = intval( $_intLimit ) * 1024 * 1024 * 1024; } else if ( $match[2] == 'm' ) { $_intLimit = intval( $_intLimit ) * 1024 * 1024; } else if ( $match[2] == 'k' ) { $_intLimit = intval( $_intLimit ) * 1024; } else { $_intLimit = intval( $_intLimit ); } if( $_intLimit >= $_intRec ) { $IPBHTML .= <<Memory Limit: {$_recLimit}M or better recommended
    Your memory limit: {$_memLimit} EOF; } else { $IPBHTML .= <<Memory Limit: {$_recLimit}M or better recommended
    Your memory limit: {$_memLimit}.
    You can still proceed but we recommend you contact your host and request the memory limit be raised to {$_recLimit}M to prevent possible issues.
    EOF; } } else { $IPBHTML .= <<Memory Limit: {$_recLimit}M or better recommended
    Warning: Could not determine memory limit. EOF; } //----------------------------------------- // Suhosin //----------------------------------------- if( extension_loaded( 'suhosin' ) ) { $_postMaxVars = @ini_get('suhosin.post.max_vars'); $_reqMaxVars = @ini_get('suhosin.request.max_vars'); $_getMaxLen = @ini_get('suhosin.get.max_value_length'); $_postMaxLen = @ini_get('suhosin.post.max_value_length'); $_reqMaxLen = @ini_get('suhosin.request.max_value_length'); $_reqMaxVar = @ini_get('suhosin.request.max_varname_length'); $_indPMV = $_postMaxVars < 4096 ? "orange; font-weight: bold" : "green"; $_indRMV = $_reqMaxVars < 4096 ? "orange; font-weight: bold" : "green"; $_indGML = $_getMaxLen < 2000 ? "orange; font-weight: bold" : "green"; $_indPML = $_postMaxLen < 1000000 ? "orange; font-weight: bold" : "green"; $_indRML = $_reqMaxLen < 1000000 ? "orange; font-weight: bold" : "green"; $_indRMVL = $_reqMaxVar < 350 ? "orange; font-weight: bold" : "green"; $IPBHTML .= <<
    Suhosin:
    Some settings if set too low can cause problems.
    suhosin.post.max_vars: 4096 or better recommended
    Your value: {$_postMaxVars}.
    Can prevent some forms (especially in the ACP) from saving properly.

    suhosin.request.max_vars: 4096 or better recommended
    Your value: {$_reqMaxVars}.
    Can prevent some forms (especially in the ACP) from saving properly.

    suhosin.get.max_value_length: 2000 or better recommended
    Your value: {$_getMaxLen}.
    Can prevent very long URLs from loading correctly.

    suhosin.post.max_value_length: 1000000 or better recommended
    Your value: {$_postMaxLen}.
    Can prevent very large posts or other form submissions from saving properly.

    suhosin.request.max_value_length: 1000000 or better recommended
    Your value: {$_reqMaxLen}.
    Can prevent very large posts or other form submissions from saving properly.

    suhosin.request.max_varname_length: 350 or better recommended
    Your value: {$_reqMaxVar}.
    Can prevent long friendly URLs from loading correctly.

    EOF; } $IPBHTML .= <<
    Pre-Install Check: Files
    Required Files: {$_filesOK}

    Pre-Install Check: PHP Extensions
    PHP Extensions Overview: {$_extensionsOK} EOF; foreach( $extensions as $xt ) { if ( $xt['_ok'] !== TRUE ) { if ( $xt['_ok'] !== 1 ) { $IPBHTML .= "
    {$xt['prettyname']} ({$xt['extensionname']}): FAILED (Click for more info)"; } else { $IPBHTML .= "
    {$xt['prettyname']} ({$xt['extensionname']}) Recommended: WARNING (Click for more info)"; } } else { $IPBHTML .= "
    {$xt['prettyname']} ({$xt['extensionname']}): Passed"; } } $IPBHTML .= << EOF; return $IPBHTML; } /** * Log in page * * @access public * @return string HTML */ public function upgrade_login_200plus( $loginType ) { $IPBHTML = ""; //--starthtml--// $label = ( $loginType == 'username' ) ? 'User Name' : 'Email Address'; $IPBHTML .= <<
    Welcome to the upgrade system.

    This wizard will guide you through the upgrade process.


    Log In
    {$label}:
    Password
    EOF; return $IPBHTML; } /** * Log in page * * @access public * @return string HTML */ public function upgrade_login_300plus( $additional_data, $replace_form, $loginType='username' ) { $IPBHTML = ""; //--starthtml--// switch( $loginType ) { case 'either': $loginString = "Username or email"; break; case 'email': $loginString = "Email"; break; default: case 'username': $loginString = "Username"; break; } if( $replace_form ) { $IPBHTML .= $additional_data[0]; } else { $IPBHTML .= << EOF; if ( $this->request['_acpRedirect'] ) { $IPBHTML .= << A new version of an application has been detected but the upgrader has not ran yet.
    You must run the upgrader before you can access the Admin CP. EOF; } else { $IPBHTML .= <<Welcome to the upgrade system.

    This wizard will guide you through the upgrade process.

    EOF; } $IPBHTML .= <<
    Log In
    EOF; if( count($additional_data) > 0 ) { foreach( $additional_data as $form_html ) { $IPBHTML .= $form_html; } } $IPBHTML .= <<
    EOF; } return $IPBHTML; } /** * Show error page * * @access public * @param string Error message * @return string HTML */ public function page_error($msg) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << {$msg} EOF; return $IPBHTML; } /** * Show locked page * * @access public * @return string HTML */ public function page_locked() { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << INSTALLER LOCKED
    Please delete the file "cache/installer_lock.php" to continue. EOF; return $IPBHTML; } /** * Show install complete page * * @access public * @param bool Installer was locked successfully * @return string HTML */ public function page_installComplete( $installLocked ) { $IPBHTML = ""; //--starthtml--// $_productName = $this->registry->fetchGlobalConfigValue('name'); if ( ! $installLocked ) { $extra = "
    INSTALLER NOT LOCKED
    Please disable or remove 'admin/install/index.php' immediately!
    "; } $IPBHTML .= << Installation complete!

    Congratulations, your {$_productName} is now installed and ready to use! Below are some links you may find useful.


    {$extra} EOF; return $IPBHTML; } /** * Show the install start page * * @access public * @return string HTML */ public function page_install() { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<Start to begin the automatic process!

    EOF; return $IPBHTML; } /** * Show the admin info page * * @access public * @return string HTML */ public function page_admin() { $IPBHTML = ""; //--starthtml--// $username = htmlspecialchars($_REQUEST['username']); $email = htmlspecialchars($_REQUEST['email']); $IPBHTML .= << Please complete the form carefully.
    The details you enter here will be used to log into the board and ACP.
    Your administrative account
    Username:
    Password:
    Confirm Password:
    E-mail Address:
    EOF; return $IPBHTML; } /** * Show the DB override page * * @access public * @return string HTML */ public function page_dbOverride() { $IPBHTML = ""; //--starthtml--// $url = IPSSetUp::getSavedData('install_url'); $IPBHTML .= << The database ({$this->request['db_name']}) you are attempting to install into has existing tables using the same prefix ({$this->request['db_pre']}).
    You can either select to overwrite or choose a new database or table prefix.
    Or did you mean to upgrade
    Database Override
    Overwrite current database with new installation

    Or Modify Your Database Details
    SQL Host:
    Database Name:
    SQL Username:
    SQL Password:
    SQL Table Prefix:
    EOF; return $IPBHTML; } /** * Collect DB info * * @access public * @return string HTML */ public function page_db() { $IPBHTML = ""; //--starthtml--// /* 'lil hack here */ if ( is_file( DOC_IPS_ROOT_PATH . "conf_global.php" ) ) { $INFO = array(); require( DOC_IPS_ROOT_PATH . 'conf_global.php' );/*noLibHook*/ if ( is_array( $INFO ) && count($INFO) ) { $this->request['db_host'] = ( $this->request['db_host'] ) ? ( $this->request['db_host'] == 'localhost' ? ( $INFO['sql_host'] ? $INFO['sql_host'] : 'localhost' ) : $this->request['db_host'] ) : 'localhost'; $this->request['db_name'] = ( $this->request['db_name'] ) ? $this->request['db_name'] : $INFO['sql_database']; } } $IPBHTML .= << Ask your webhost if you are unsure about any of these settings. You must create the database before installing.
    Database details
    SQL Host:
    Database Name:
    SQL Username:
    SQL Password:
    SQL Table Prefix:
    EOF; return $IPBHTML; } /** * Check the database to use * * @access public * @param array Available DB drivers * @return string HTML */ public function page_check_db( $drivers ) { $_drivers = ''; foreach ($drivers as $k => $v) { $selected = ($v == "Mysql") ? " selected='selected'" : ""; $_drivers .= "\n"; } $IPBHTML = ""; //--starthtml--// $IPBHTML .= << Please select which database engine you wish to use.
    Database Engine
    SQL Driver:
    EOF; return $IPBHTML; } /** * Show the EULA * * @access public * @return string HTML */ public function page_eula() { $_eula = nl2br( $this->registry->fetchGlobalConfigValue('license') ); $IPBHTML = ""; //--starthtml--// $IPBHTML .= << check_eula = function() { if( document.getElementById( 'eula' ).checked == true ) { return true; } else { alert( 'You must agree to the license before continuing' ); return false; } } document.getElementById( 'install-form' ).onsubmit = check_eula; Please read and agree to the End User License Agreement before continuing.

    {$_eula}

    EOF; return $IPBHTML; } /** * Ask for license key * * @access public * @return string HTML */ public function page_license( $error ) { $IPBHTML = ""; //--starthtml--// if ( $error ) { $IPBHTML .= <<
    {$error}
    EOF; } $IPBHTML .= <<
    License Key
    License Key
    Entering your license key is optional but doing so entitles you to additional features and benefits.

    EOF; return $IPBHTML; } /** * Show the address info page * * @access public * @param string Directory * @param string URL * @return string HTML */ public function page_address( $dir, $url ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << Address details
    Install Directory:
    Install Address:
    EOF; return $IPBHTML; } /** * Show the applications page * * @access public * @param array Applications * @return string HTML */ public function page_apps( $apps ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << Please select the applications you wish to install.
    The following applications have been detected: EOF; foreach( array( 'core', 'ips', 'other' ) as $type ) { switch( $type ) { case 'core': $title = "Default Applications"; break; case 'ips': $title = "IPS Applications"; break; case 'other': $title = "Third Party Applications"; break; } if ( count( $apps[ $type ] ) ) { $IPBHTML .= << {$title} EOF; foreach( $apps[ $type ] as $key => $data ) { if ( isset( $this->request['apps'] ) ) { $_checked = isset( $this->request['apps'][ $key ] ) ? ' checked="checked" ' : ''; } else { $_checked = ( $type == 'core' OR $type == 'ips' ) ? ' checked="checked" ' : ''; } $_style = ( $type == 'core' ) ? 'display:none' : ''; //----------------------------------------- // Yes, I know this wouldn't work for "core" // apps, but we can just use the global folder // for them so it's irrelevant //----------------------------------------- $img = is_file( IPSLib::getAppDir( $key ) . '/skin_cp/appIcon.png' ) ? '../applications_addon/' . $type . '/' . $key . '/skin_cp/appIcon.png' : "../skin_cp/images/applications/{$key}.png"; $IPBHTML .= << {$data['name']} By: {$data['author']}
    {$data['description']}
    EOF; } $IPBHTML .= << EOF; } } return $IPBHTML; } /** * Show the requirements page * * @access public * @param bool Files ok * @param bool Extensions ok * @param array Extensions * @return string HTML */ public function page_requirements( $filesOK, $extensionsOK, $extensions=array(), $text='installation' ) { $minPHP = IPSSetUp::minPhpVersion; $minSQL = IPSSetUp::minDb_mysql; $prefPHP = IPSSetUp::prefPhpVersion; $prefSQL = IPSSetUp::prefDb_mysql; /* Memory warning */ $_memLimit = null; $_recLimit = 128; if( @ini_get('memory_limit') ) { $_memLimit = @ini_get('memory_limit'); } $_filesOK = ( $filesOK === NULL ) ? "Not yet checked" : ( ( $filesOK === FALSE ) ? "Failed" : "Passed" ); $_extensionsOK = ( $extensionsOK === FALSE ) ? "Failed" : ( $extensionsOK === TRUE ? "Passed" : "Warnings" ); $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<
    Welcome to the installer. This wizard will guide you through the {$text} process.
    EOF; if( $text == 'upgrade' ) { $IPBHTML .= << If you are not comfortable performing the upgrade yourself, please stop now and submit a technical support ticket so that our technicians can perform the upgrade for you.

    You should be certain that you have a complete database backup before proceeding. By continuing, you are certifying that you have saved a database backup.
    EOF; } $IPBHTML .= << If you need help using this installer, please see our installation guide.
    System Requirements
    PHP: v{$minPHP} or better
    SQL: MySQL v{$minSQL} ({$prefSQL} or better preferred)

    EOF; if( $_memLimit ) { $_intLimit = $_memLimit; $_intRec = $_recLimit * 1024 * 1024; preg_match( '#^(\d+)(\w+)$#', strtolower($_intLimit), $match ); if( $match[2] == 'g' ) { $_intLimit = intval( $_intLimit ) * 1024 * 1024 * 1024; } else if ( $match[2] == 'm' ) { $_intLimit = intval( $_intLimit ) * 1024 * 1024; } else if ( $match[2] == 'k' ) { $_intLimit = intval( $_intLimit ) * 1024; } else { $_intLimit = intval( $_intLimit ); } if( $_intLimit >= $_intRec ) { $IPBHTML .= <<Memory Limit: {$_recLimit}M or better recommended
    Your memory limit: {$_memLimit} EOF; } else { $IPBHTML .= <<Memory Limit: {$_recLimit}M or better recommended
    Your memory limit: {$_memLimit}.
    You can still proceed but we recommend you contact your host and request the memory limit be raised to {$_recLimit}M to prevent possible issues.
    EOF; } } else { $IPBHTML .= <<Memory Limit: {$_recLimit}M or better recommended
    Warning: Could not determine memory limit. EOF; } //----------------------------------------- // Suhosin //----------------------------------------- if( extension_loaded( 'suhosin' ) ) { $_postMaxVars = @ini_get('suhosin.post.max_vars'); $_reqMaxVars = @ini_get('suhosin.request.max_vars'); $_getMaxLen = @ini_get('suhosin.get.max_value_length'); $_postMaxLen = @ini_get('suhosin.post.max_value_length'); $_reqMaxLen = @ini_get('suhosin.request.max_value_length'); $_reqMaxVar = @ini_get('suhosin.request.max_varname_length'); $_indPMV = $_postMaxVars < 4096 ? "orange; font-weight: bold" : "green"; $_indRMV = $_reqMaxVars < 4096 ? "orange; font-weight: bold" : "green"; $_indGML = $_getMaxLen < 2000 ? "orange; font-weight: bold" : "green"; $_indPML = $_postMaxLen < 1000000 ? "orange; font-weight: bold" : "green"; $_indRML = $_reqMaxLen < 1000000 ? "orange; font-weight: bold" : "green"; $_indRMVL = $_reqMaxVar < 350 ? "orange; font-weight: bold" : "green"; $IPBHTML .= <<
    Suhosin:
    Some settings if set too low can cause problems.
    suhosin.post.max_vars: 4096 or better recommended
    Your value: {$_postMaxVars}.
    Can prevent some forms (especially in the ACP) from saving properly.

    suhosin.request.max_vars: 4096 or better recommended
    Your value: {$_reqMaxVars}.
    Can prevent some forms (especially in the ACP) from saving properly.

    suhosin.get.max_value_length: 2000 or better recommended
    Your value: {$_getMaxLen}.
    Can prevent very long URLs from loading correctly.

    suhosin.post.max_value_length: 1000000 or better recommended
    Your value: {$_postMaxLen}.
    Can prevent very large posts or other form submissions from saving properly.

    suhosin.request.max_value_length: 1000000 or better recommended
    Your value: {$_reqMaxLen}.
    Can prevent very large posts or other form submissions from saving properly.

    suhosin.request.max_varname_length: 350 or better recommended
    Your value: {$_reqMaxVar}.
    Can prevent long friendly URLs from loading correctly.

    EOF; } $IPBHTML .= <<
    Pre-Install Check: Files
    Required Files: {$_filesOK}

    Pre-Install Check: PHP Extensions
    PHP Extensions Overview: {$_extensionsOK} EOF; foreach( $extensions as $xt ) { if ( $xt['_ok'] !== TRUE ) { if ( $xt['_ok'] !== 1 ) { $IPBHTML .= "
    {$xt['prettyname']} ({$xt['extensionname']}): FAILED (Click for more info)"; } else { $IPBHTML .= "
    {$xt['prettyname']} ({$xt['extensionname']}) Recommended: FAILED (Click for more info)"; } } else { $IPBHTML .= "
    {$xt['prettyname']} ({$xt['extensionname']}): Passed"; } } $IPBHTML .= << EOF; return $IPBHTML; } /** * Global template/wrapper * * @access public * @param string Title * @param string Page content * @param array Data * @param array Errors * @param array Warnings * @param array Install step info * @return string HTML */ public function globalTemplate( $title, $content, $data=array(), $errors=array(), $warnings=array(), $messages=array(), $installStep=array(), $version, $appData ) { $IPBHTML = ""; //--starthtml--// $_cssPath = '../setup/public'; $_productVersion = $this->registry->fetchGlobalConfigValue('version'); $_productName = $this->registry->fetchGlobalConfigValue('name'); $app = ( IPS_IS_UPGRADER ) ? 'upgrade' : 'install'; $extraUrl = ( IPS_IS_UPGRADER ) ? '&s=' . $this->request['s'] : ''; $extraUrl .= ( IPS_IS_UPGRADER AND $this->request['workact'] ) ? '&workact=' . $this->request['workact'] : ''; $extraUrl .= ( IPS_IS_UPGRADER AND isset( $this->request['st'] ) ) ? '&st=' . $this->request['st'] : ''; $extraInfo = ( IPS_IS_UPGRADER AND $version ) ? 'This Module: ' . $version . '
    (' . $appData['name'] . ')' : ''; $IPBHTML .= << IPS SetUp: {$title}
      EOF; foreach( $data['progress'] as $p ) { $extra = ''; if ( $installStep[0] > 0 ) { $extra = ( $p[0] == 'step_doing' ) ? "

      Step {$installStep[0]}/{$installStep[1]}

      " : ''; } if ( $extraInfo ) { $extra .= ( $p[0] == 'step_doing' ) ? "

      {$extraInfo}

      " : ''; } $IPBHTML .= <<{$p[1]}{$extra} EOF; } $IPBHTML .= <<
    EOF; if ( count( $messages ) ) { $IPBHTML .= <<
    EOF; foreach( $messages as $msg ) { $IPBHTML .= "

    {$msg}

    \n"; } $IPBHTML.= <<
    EOF; } if ( count( $errors ) OR count( $warnings ) ) { $IPBHTML .= <<
    EOF; foreach( $errors as $msg ) { $IPBHTML .= "

    Error: {$msg}

    \n"; } foreach( $warnings as $msg ) { $IPBHTML .= "

    Warning: {$msg}

    \n"; } $IPBHTML.= <<
    EOF; } $IPBHTML .= <<

    {$_productName} {$_productVersion}

    {$content}
    EOF; if ( $data['hideButton'] !== TRUE AND $this->_showNoButtons !== TRUE ) { if ( $this->registry->output->nextAction == 'disabled' OR count( $errors ) ) { $IPBHTML .= << EOF; } else { if( ! $this->registry->output->nextAction ) { $back = my_getenv('HTTP_REFERER'); $IPBHTML .= << EOF; } $IPBHTML .= << EOF; } } $date = date("Y"); $IPBHTML .= <<


    EOF; /* Bit of a kludge */ if ( is_array( $errors ) AND count( $errors ) ) { $IPBHTML .= << // EOF; } $IPBHTML .= << EOF; return $IPBHTML; } /** * AJAX page refresh template * * @access public * @param string Output * @return string HTML */ public function page_refresh( $output ) { $this->_showNoButtons = TRUE; $output = ( is_array( $output ) AND count( $output ) ) ? $output : array( 0 => 'Proceeding..' ); $errors = array_merge( $this->registry->output->fetchWarnings(), $this->registry->output->fetchErrors() ); $HTML = << // EOF; if ( empty( $errors ) ) { $HTML .= <<
    Please wait...






      EOF; foreach( $output as $l ) { $HTML .= <<{$l} EOF; } $HTML .= <<
    EOF; } else { $HTML .= <<
    EOF; } return $HTML; } }