(2003-2009) * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions * @version $Id$ */ /** * Returns a valid html tag for the choosen $fieldType for pathes * * @param string path The path to start searching in * @param integer uid The uid which must match the found directories * @param integer gid The gid which must match the found direcotries * @param string fieldType Either "Manual" or "Dropdown" * @return string The html tag for the choosen $fieldType * * @author Martin Burchert * @author Manuel Bernhardt */ function makePathfield($path, $uid, $gid, $fieldType, $value = '') { global $lng; $value = str_replace($path, '', $value); $field = ''; if($fieldType == 'Manual') { $field = ''; } elseif($fieldType == 'Dropdown') { $dirList = findDirs($path, $uid, $gid); natcasesort($dirList); if(sizeof($dirList) > 0) { if(sizeof(dirList) <= 100) { $field = ''; } else { $field = $lng['panel']['toomanydirs']; $field.= ''; } } else { $field = $lng['panel']['dirsmissing']; $field.= ''; } } return $field; }