/[scire]/webgli/localuse.php
Gentoo

Contents of /webgli/localuse.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 40 - (show annotations) (download)
Sat Apr 22 16:06:25 2006 UTC (12 years, 2 months ago) by codeman
File size: 1445 byte(s)
updated globaluse and Utility
adding initial localuse screens

1 <?php
2
3 include('webgliIP.php');
4 include('webgliUtility.php');
5
6 include('Smarty.class.php');
7 $smarty = new Smarty;
8
9 $smarty->template_dir = './templates';
10 $smarty->compile_dir = './templates_c';
11 $smarty->cache_dir = './cache';
12 $smarty->config_dir = './configs';
13
14 $ip = new InstallProfile();
15 $ip->parse('test.xml');
16
17 $smarty->assign('dynamic',$ip->get("dynamic_stage3"));
18
19 $error_msg = "";
20 $global_use_flags = "";
21 $total_flags = "";
22 $original_flags = "";
23
24 if ($_POST['saveglobaluse']) {
25 if ($_POST['flags']) {
26 $global_use_flags = join(' ',$_POST['flags']);
27 $global_use_flags .= " "; #extra space for next screen.
28 $smarty->assign('global_use_flags',$global_use_flags);
29 # $ip->set("etc_files",$etc_files);
30 # file_put_contents('test.xml', $ip->serialize()); #PHP 5 only
31 }
32 }
33
34 if ($_POST['savelocaluse']) {
35 if ($_POST['flags']) {
36 $local_use_flags = join(' ',$_POST['flags']);
37 }
38 if ($_POST['globalflags']) {
39 $total_flags = $_POST['globalflags'] . $local_use_flags;
40 } else {
41 $total_flags = $local_use_flags;
42 }
43 #get the make.conf
44 $etc_files = $ip->get("etc_files");
45 if (array_key_exists("make.conf",$etc_files)) {
46 $etc_files['make.conf']['USE'] = $total_flags;
47 }
48 else {
49 $etc_files['make.conf'] = array();
50 $etc_files['make.conf']['USE'] = $total_flags;
51 }
52 $ip->set("etc_files",$etc_files);
53 }
54 $use_local_desc = get_local_use_flags();
55 $smarty->assign('use_local_desc',$use_local_desc);
56
57 $smarty->display('localuse.tpl');
58 ?>

  ViewVC Help
Powered by ViewVC 1.1.20