diff options
author | Preston Cody <codeman@gentoo.org> | 2006-05-05 14:40:27 +0000 |
---|---|---|
committer | Preston Cody <codeman@gentoo.org> | 2006-05-05 14:40:27 +0000 |
commit | 9e7ab3075209a3580f60dac9e31e85c2ec68cdcf (patch) | |
tree | 796c24c85cd27f0c5896c2af18ed7dd29c420dec /webgli | |
parent | in_array goodness (diff) | |
download | scire-9e7ab3075209a3580f60dac9e31e85c2ec68cdcf.tar.gz scire-9e7ab3075209a3580f60dac9e31e85c2ec68cdcf.tar.bz2 scire-9e7ab3075209a3580f60dac9e31e85c2ec68cdcf.zip |
adding a few documents to moria since that seems like a good
place to put them
svn path=/; revision=51
Diffstat (limited to 'webgli')
-rw-r--r-- | webgli/bootloader.php | 59 |
1 files changed, 23 insertions, 36 deletions
diff --git a/webgli/bootloader.php b/webgli/bootloader.php index cd210ca..719042d 100644 --- a/webgli/bootloader.php +++ b/webgli/bootloader.php @@ -1,56 +1,43 @@ <?php + include('webgliIP.php'); -if (!isset($_SESSION['install_profile'])) { - print "must set install profile. doing so now."; - session_start(); - $_SESSION['install_profile'] = new InstallProfile; - session_write_close(); -} -print_r( $_SESSION); -#return 0; -#session_unset(); -$ip = $_SESSION['install_profile']; -print "<br><br>".$ip->boot_loader_pkg; +include('webgliUtility.php'); include('Smarty.class.php'); $smarty = new Smarty; -#phpinfo(); + $smarty->template_dir = './templates'; $smarty->compile_dir = './templates_c'; $smarty->cache_dir = './cache'; $smarty->config_dir = './configs'; - + +$ip = new InstallProfile(); +$ip->parse('test.xml'); + $error_msg = ""; + if ($_POST['setbootloader']) { if ($_POST['bootloader']) { - //try: - $_SESSION['install_profile']->set_boot_loader_pkg($_POST['bootloader']) or - // except: - $error_msg .= "ERROR: Could not set the bootloader pkg!"; + $ip->set("bootloader_pkg",$_POST['bootloader']) or + $error_msg .= "ERROR: Could not set the bootloader pkg!"; } if ($_POST['bootmbr']) { - //try: - $_SESSION['install_profile']['bootmbr'] = $_POST['bootmbr'] or - $error_msg .= "ERROR: Could not set the bootloader MBR flag to TRUE"; - if ($_POST['boot_drive_choice']) { - //try: - $_SESSION['install_profile']['boot_drive_choice'] = $_POST['boot_drive_choice'] or - $error_msg .= "ERROR! Could not set the boot device! ".$_POST['boot_drive_choice']; - //except: - } + $ip->set("bootloader_mbr",True) or + $error_msg .= "ERROR: Could not set the bootloader MBR flag to TRUE"; + if ($_POST['boot_drive_choice']) { + $ip->set("boot_device",$_POST['boot_drive_choice']) or + $error_msg .= "ERROR! Could not set the boot device! ".$_POST['boot_drive_choice']; + } } else { - //try: - $_SESSION['install_profile']['bootmbr'] = False or - //except: - $error_msg .= "ERROR: Could not set the bootloader MBR flag to FALSE."; - if ($_POST['bootargs']) { - //try: - $_SESSION['install_profile']['bootargs'] = $_POST['bootargs'] or - //except: - $error_msg .= "ERROR: Could not set the bootloader kernel arguments!"; - } + $ip->set("bootloader_mbr",False) or + $error_msg .= "ERROR: Could not set the bootloader MBR flag to FALSE."; } + if ($_POST['bootargs']) { + $ip->set("bootloader_kernel_args",$_POST['bootargs']) or + $error_msg .= "ERROR: Could not set the bootloader kernel arguments!"; + } + if (!$error_msg) { $error_msg = "Values saved successfully"; } |