| 678 | | * first stage of Movable Type Backup File import process |
| 679 | | * |
| 680 | | * @access private |
| 681 | | * @return string The UI for the first stage of the import process |
| 682 | | */ |
| 683 | | private function backup_stage_1($inputs) |
| 684 | | { |
| 685 | | $default_values= array( |
| 686 | | 'db_name' => '', |
| 687 | | 'db_host' => 'localhost', |
| 688 | | 'db_user' => '', |
| 689 | | 'db_pass' => '', |
| 690 | | 'db_prefix' => 'mt_', |
| 691 | | 'warning' => '' |
| 692 | | ); |
| 693 | | $inputs= array_merge( $default_values, $inputs ); |
| 694 | | extract($inputs); |
| 695 | | |
| 696 | | ob_start(); |
| 697 | | ?> |
| 698 | | <p><?php echo _t('Habari will attempt to import from a Movable Type Backup File.', 'mtimport'); ?></p> |
| 699 | | <?php if (!empty($warning)): ?> |
| 700 | | <p class="warning"><?php echo htmlspecialchars($warning); ?></p> |
| 701 | | <?php endif; ?> |
| 702 | | <p><?php echo _t('Please provide the connection details for an existing Movable Type database:', 'mtimport'); ?></p> |
| 703 | | <table> |
| 704 | | <tr><td><?php echo _t('Backup File', 'mtimport'); ?></td><td><input type="text" name="db_name" value="<?php echo htmlspecialchars($db_name); ?>"></td></tr> |
| 705 | | </table> |
| 706 | | <input type="hidden" name="stage" value="2"> |
| 707 | | <p class="submit"><input type="submit" name="import" value="<?php echo _t('Next', 'mtimport'); ?>" /></p> |
| 708 | | <?php |
| 709 | | $output = ob_get_contents(); |
| 710 | | ob_end_clean(); |
| 711 | | return $output; |
| 712 | | } |
| 713 | | |
| 714 | | /** |