Exemplo n.º 1
0
function getLatestBackupFolder($labConfigId)
{
    $folderList = get_backup_folders($labConfigId);
    if (count($folderList) > 0) {
        end($folderList);
        $key = key($folderList);
        return $key;
    } else {
        return "notFound";
    }
}
Exemplo n.º 2
0
	public function getBackupRevertRadio($field_name, $lab_config_id)
	{
		# Returns radio options for selecting one among existing backup directories
		$folder_list = get_backup_folders($lab_config_id);
		if($folder_list === null || count($folder_list) == 0)
		{
			echo LangUtil::$generalTerms['MSG_NOTFOUND'];			
			return;
		}
		$count = 0;
		foreach($folder_list as $key=>$value)
		{
			echo "<input type='radio' name='$field_name' value='$key'";
			/*if($count == count($folder_list) - 1)
				echo " checked ";
			echo ">$value</option><br>";
			$count++;
			*/
			if($count == 0)
				echo " checked ";
			echo ">$value</option><br>";
			$count++;
		}
	}