$Language->getText('admin_index','title')));
/**
* printSelection - prints the select box for the user to get the files to edit
*
* @param string the checked item (if any)
* @param string the path to the plugins conf dir
*/
function printSelection($checked,$pluginpath) {
global $Language,$feedback;
$config_files = array(); // array thatīll have the config files
$i = 0;
if (strlen($pluginpath)>=1){
if ($pluginpath[strlen($pluginpath)-1]!='/') {
$pluginpath .= '/';
}
}
// check if we can get local.inc
@$handle = fopen('/etc/gforge/local.inc','r+');
if (! $handle) {
// Open readonly but tell you can't write
$handle = fopen('/etc/gforge/local.inc','r');
$feedback .= $Language->getText('configman','notopenlocalinc');
}
if ($handle) {
$config_files['local.inc'] = '/etc/gforge/local.inc';
fclose($handle);
$i++;
} else {
// say we couldn't open local.inc
$feedback .= $Language->getText('configman','notopenlocalinc');
}
//get the directories from the plugins dir
/*if (chdir($pluginpath)) {
$handle = opendir('.');
$j = 0;
while ($filename = readdir($handle)) {
//Don't add special directories '..' or '.' to the list
if (($filename!='..') && ($filename!='.') && ($filename!="CVS") ) {
$handle2 = @opendir($filename); // open the etc dir of the plugin
if ($handle2){
while ($filename2 = readdir($handle2)) {
if (strstr($filename2,'.conf') || strstr($filename2,'.inc') || ($filename2=='config.php')) {
$config_files['(' . $filename . ') - ' . $filename2] = $pluginpath . $filename . '/' . $filename2;
$i++;
}
}
fclose($handle2);
}
}
}
fclose($handle);
} else {
// say we couldn't get into etc plugins dir
$feedback .= $Language->getText('configman','notopenplugindir');
}*/
echo '