install.php
changeset 254 2b48ca9ce4d3
parent 252 96b72228bda0
child 266 917dcc6c4ceb
equal deleted inserted replaced
253:da982928e56a 254:2b48ca9ce4d3
   124   }
   124   }
   125 }
   125 }
   126 
   126 
   127 function start_install_table()
   127 function start_install_table()
   128 {
   128 {
   129   echo '<table border="0" cellspacing="0" cellpadding="0">' . "\n";
   129   echo '<table border="0" cellspacing="0" cellpadding="0" style="margin-top: 10px;">' . "\n";
   130   ob_start();
   130   ob_start();
   131 }
   131 }
   132 
   132 
   133 function close_install_table()
   133 function close_install_table()
   134 {
   134 {
   146 }
   146 }
   147 
   147 
   148 function echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack)
   148 function echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack)
   149 {
   149 {
   150   global $neutral_color;
   150   global $neutral_color;
       
   151   global $lang;
   151   
   152   
   152   $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
   153   $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
   153   echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="images/bad.gif" /></td></tr>' . "\n";
   154   echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="images/bad.gif" /></td></tr>' . "\n";
   154   ob_flush();
   155   ob_flush();
   155   flush();
   156   flush();
   163     $post_data .= "          <input type=\"hidden\" name=\"$key\" value=\"$value\" />\n";
   164     $post_data .= "          <input type=\"hidden\" name=\"$key\" value=\"$value\" />\n";
   164   }
   165   }
   165   echo '<form action="install.php?mode=install&amp;stage=' . $stage_id . '" method="post">
   166   echo '<form action="install.php?mode=install&amp;stage=' . $stage_id . '" method="post">
   166           ' . $post_data . '
   167           ' . $post_data . '
   167           <input type="hidden" name="resume_stack" value="' . htmlspecialchars(implode('|', $resume_stack)) . '" />
   168           <input type="hidden" name="resume_stack" value="' . htmlspecialchars(implode('|', $resume_stack)) . '" />
   168           <h3>Enano installation failed.</h3>
   169           <h3>' . $lang->get('meta_msg_err_stagefailed_title') . '</h3>
   169            <p>' . $failure_explanation . '</p>
   170            <p>' . $failure_explanation . '</p>
   170            ' . ( !empty($mysql_error) ? "<p>The error returned from MySQL was: $mysql_error</p>" : '' ) . '
   171            ' . ( !empty($mysql_error) ? "<p>" . $lang->get('meta_msg_err_stagefailed_mysqlerror') . " $mysql_error</p>" : '' ) . '
   171            <p>When you have corrected the error, click the button below to attempt to continue the installation.</p>
   172            <p>' . $lang->get('meta_msg_err_stagefailed_body') . '</p>
   172            <p style="text-align: center;"><input type="submit" value="Retry installation" /></p>
   173            <p style="text-align: center;"><input type="submit" value="' . $lang->get('meta_btn_retry_installation') . '" /></p>
   173         </form>';
   174         </form>';
   174   global $template, $template_bak;
   175   global $template, $template_bak;
   175   if ( is_object($template_bak) )
   176   if ( is_object($template_bak) )
   176     $template_bak->footer();
   177     $template_bak->footer();
   177   else
   178   else