0) { document.getElementById('bct-'+bcid).style.display=""; } else { document.getElementById('bct-'+bcid).style.display="none"; } tfound+=bfound; } document.getElementById('zero').style.display=(tfound || !q.length?'none':''); } JS; $css=<< 'Step 2 - Choose Extra Packages', 'head_scripts' => array($js), 'head_css' => array($css)); } 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: Clear'; echo '
'; $i=0; foreach ($bcs as $bc => $lcs) { echo '
'.htmlentities($bc).'
'."\n"; foreach ($lcs as $lc => $packages) { echo '
± '.htmlentities("$bc$lc").'
'."\n"; } echo '
'."\n"; } echo '
'; } 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(); } } ?>