1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<?php
$title='Choose Extra Packages';
$scripts='wlca';
$profile=new sql_gentoo_profile($this->get_opt('profile'));
$pkgs=$profile->get_packages();
$meta=array(
array('id' => 'plist', 'autosize'=> true),
array('delim' => '', 'tag' => 'div', 'label' => '%n', 'collapsed' => true),
array('delim' => '/', 'tag' => 'div', 'label' => '%p', 'collapsed' => true),
array('delim' => '-', 'tag' => 'div', 'label' => '%p: $desc', 'checkbox' => '%p', 'collapsed' => true, 'search' => true),
array('tag' => 'div', 'label' => '=%p', 'checkbox' => '=%p', 'search' => true)
);
$this->layered_checkbox_array('install_packages', 'p', null, $pkgs, ' ', $meta);
/*function gentoo_body_step2() {
global $S;
$configuration=&$S['wizard']['configuration'];
$opts=$configuration->get_configopts();
$profile=new sql_gentoo_profile($opts['profile']);
$bcs=$profile->get_packages();
echo 'Search packages: <input id="psearch" onkeyup="packagesearch(this)" /> <a href="javascript:var e=document.getElementById(\'psearch\'); e.value=\'\'; e.onkeyup()">Clear</a>';
echo '<div id="plist"><div id="zero" style="display: none">'.print_error('No results found.').'</div>';
$i=0;
foreach ($bcs as $bc => $lcs) {
echo '<div class="bct" id="bct-'.$bc.'">'.htmlentities($bc).'</div><div class="bc" id="bc-'.$bc.'">'."\n";
foreach ($lcs as $lc => $packages) {
echo '<div class="lct" id="lct-'.$bc.$lc.'"><a href="javascript:tog_show_pkgs(\''.$bc.$lc.'\')">±</a> '.htmlentities("$bc$lc").'</div><div class="lc" id="lc-'.$bc.$lc.'" style="display: none">'."\n";
foreach ($packages as $name => $vers) {
foreach ($vers as $ver => $attrs) {
$safename=htmlentities("$bc$lc/$name-$ver");
echo '<div class="pkg'.($attrs['masked']?' masked':'').'"><input id="p'.$i.'" type="checkbox" name="expkgs['.$safename.']" /><label class="pd" for="p'.$i++.'">'.htmlentities("$name-$ver").' - '.htmlentities($attrs['desc']).($attrs['masked']?' [MASKED]':'').'</label></div>'."\n";
}
}
echo '</div>'."\n";
}
echo '</div>'."\n";
}
echo '</div>';
}
function gentoo_process_step2() {
global $S, $request;
if (isset($request['expkgs'])) {
$packages=array();
foreach ($request['expkgs'] as $name => $null) {
$packages[]='='.$name;
}
$packages=implode(' ', $packages);
$opt=new sql_configopt($S['wizard']['configuration']->id, 'install_packages', $packages);
$opt->write();
}
}*/
?>
|