/[scire]/webgli/extrapackages.php
Gentoo

Contents of /webgli/extrapackages.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (show annotations) (download)
Sun Apr 16 21:35:03 2006 UTC (11 years, 7 months ago) by codeman
File size: 1596 byte(s)
adding etc_portage and extrapackages screens
edited daemons and config files
added functions to webgliUtility


1 <?php
2 include('webgliIP.php');
3 include('webgliUtility.php');
4
5 include('Smarty.class.php');
6 $smarty = new Smarty;
7 #phpinfo();
8 $smarty->template_dir = './templates';
9 $smarty->compile_dir = './templates_c';
10 $smarty->cache_dir = './cache';
11 $smarty->config_dir = './configs';
12
13 $ip = new InstallProfile();
14 $ip->parse('test.xml');
15
16 $error_msg = "";
17
18 if ($_POST['packages']) {
19 $ip->set("install_packages", $_POST['packages']);
20 #SERIALIZE
21 $fh = fopen('test.xml','w');
22 fwrite($fh, $ip->serialize());
23 fclose($fh);
24 }
25 if ($_POST['manualpackages']) {
26 $packages = explode(',',$_POST['manualpackages']);
27 if ($packages) {
28 $ip->set("install_packages", $packages);
29 #SERIALIZE
30 $fh = fopen('test.xml','w');
31 fwrite($fh, $ip->serialize());
32 fclose($fh);
33 }
34 }
35 if (!$error_msg) {
36 $error_msg = "Values saved successfully";
37 }
38 $smarty->assign('error_msg',$error_msg);
39
40 $install_packages = array();
41 $install_packages = $ip->get("install_packages");
42 print "Install Packages:";
43 var_dump($install_packages);
44 $smarty->assign('install_packages',$install_packages);
45 $smarty->assign('current_package_list', join(',',$install_packages));
46
47 $grp_list = get_grp_pkgs_from_cd();
48 $package_list = get_install_package_list();
49 $smarty->assign('grp_list',$grp_list);
50 $smarty->assign('package_list',$package_list);
51
52 $show_groups = array();
53 #figure out how to show groups
54 foreach ($_POST as $item => $param) {
55 if( stristr($item,'show') and ($param == "Expand")) {
56 $show_groups[substr($item, 5)] = "Expand";
57 }
58 }
59 #print_r($show_groups);
60 $smarty->assign('show_groups',$show_groups);
61
62 $smarty->display('extrapackages.tpl');
63 ?>

  ViewVC Help
Powered by ViewVC 1.1.20