Example #1
0
	<form action="reboot.php" method="post">
		<input name="Submit" type="hidden" value="Yes" />
		<?php 
    echo print_info_box(gettext("The firewall configuration has been changed.") . "<br />" . gettext("The firewall is now rebooting."));
    ?>
		<br />
	</form>
<?php 
}
$tab_array = array();
$tab_array[] = array(gettext("Config History"), false, "diag_confbak.php");
$tab_array[] = array(gettext("Backup/Restore"), true, "diag_backup.php");
display_top_tabs($tab_array);
require_once 'classes/Form.class.php';
$form = new Form(false);
$form->setMultipartEncoding();
// Allow file uploads
$section = new Form_Section('Backup configuration');
$section->addInput(new Form_Select('backuparea', 'Backup area', '', build_area_list(false)));
$section->addInput(new Form_Checkbox('nopackages', 'Skip packages', 'Do not backup package information.', false));
$section->addInput(new Form_Checkbox('donotbackuprrd', 'Skip RRD data', 'Do not backup RRD data (NOTE: RRD Data can consume 4+ megabytes of config.xml space!)', true));
$section->addInput(new Form_Checkbox('encrypt', 'Encryption', 'Encrypt this configuration file.', false));
$section->addInput(new Form_Input('encrypt_password', null, 'password', null, ['placeholder' => 'Password']));
$section->addInput(new Form_Input('encrypt_passconf', null, 'password', null, ['placeholder' => 'Confirm password']));
$group = new Form_Group('');
$group->add(new Form_Button('Submit', 'Download configuration as XML'));
$section->add($group);
$form->add($section);
$section = new Form_Section('Restore backup');
$section->addInput(new Form_StaticText(null, gettext("Open a ") . $g['[product_name'] . gettext(" configuration XML file and click the button below to restore the configuration.")));
$section->addInput(new Form_Select('restorearea', 'Restore area', '', build_area_list(false)));