/[scire]/webgli/globaluse.php
Gentoo

Contents of /webgli/globaluse.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (show annotations) (download)
Sun May 7 19:57:58 2006 UTC (11 years, 4 months ago) by codeman
File size: 1395 byte(s)
adding a lot of webgli screens, some of which are done
the details of the status of webgli is in /webgli/TODO

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 $etc_files = $ip->get("etc_files");
16 $smarty->assign('dynamic',$ip->get("dynamic_stage3"));
17
18 $error_msg = "";
19 $global_use_flags = "";
20 $original_flags = "";
21
22 /* This is done in localuse.php
23 if ($_POST['saveglobaluse']) {
24 if ($_POST['flags']) {
25 $global_use_flags = join(' ',$_POST['flags']);
26 $global_use_flags .= " "; #extra space for next screen.
27
28 $ip->set("etc_files",$etc_files);
29 file_put_contents('test.xml', $ip->serialize()); #PHP 5 only
30 }
31 }
32 */
33
34 #First set the USE flags, this is a biggie.
35 if (array_key_exists("make.conf",$etc_files) and $etc_files['make.conf']['USE']) {
36 $original_flags = $etc_files['make.conf']['USE'];
37 } else {
38 exec("portageq envvar USE",$output);
39 print $output;
40 #system_use_flags = GLIUtility.spawn("portageq envvar USE", return_output=True)[1].strip().split()
41 }
42
43
44 $use_flags = array();
45 $use_desc = get_global_use_flags();
46 #sort($use_desc);
47 $smarty->assign('use_desc',$use_desc);
48 #populate the choices list
49 #sorted_use = use_desc.keys()
50 #sorted_use.sort()
51 #present the GLOBAL checkbox list
52
53 $smarty->display('globaluse.tpl');
54 ?>

  ViewVC Help
Powered by ViewVC 1.1.20