/[scire]/webgli/portagetree.php
Gentoo

Contents of /webgli/portagetree.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49 - (show annotations) (download)
Sun Apr 23 06:16:15 2006 UTC (11 years, 5 months ago) by codeman
File size: 987 byte(s)
webgli: adding portage screen

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 $error_msg = "";
18 if ($_POST['saveportage']) {
19 if ($_POST['portagetype']) {
20 $ip->set("portage_tree_sync_type", $_POST['portagetype']) or
21 $error_msg .= "ERROR: Could not set the portage tree sync type";
22 }
23 if ($_POST['snapshoturi']) {
24 $ip->set("portage_tree_snapshot_uri", $_POST['snapshoturi']) or
25 $error_msg .= "ERROR: Could not set the portage snapshot URI";
26 }
27 file_put_contents('test.xml', $ip->serialize()); #PHP 5 only
28 }
29
30 $smarty->assign('synctype',$ip->get("portage_tree_sync_type"));
31 $smarty->assign('snapshoturi',$ip->get("portage_tree_snapshot_uri"));
32 $smarty->assign('dynamic', $ip->get("dynamic_stage3"));
33
34 $smarty->display('portagetree.tpl');
35 ?>

  ViewVC Help
Powered by ViewVC 1.1.20