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&stage=' . $stage_id . '" method="post"> |
166 echo '<form action="install.php?mode=install&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 |