<?php
	ob_start();
?>
<tr class="table-color2">
	<td class="text"><b>%s</b></td>
  	<td width="30" align="center">%s</td>
</tr>
<?php
	$folder_tpl = ob_get_clean();

	$writeable_base = $this->toolkit->getSystemConfig('Misc', 'WriteablePath');
	foreach ($this->writeableFolders as $folder_path) {
		$file_path =  str_replace('$1', $writeable_base, $folder_path);
		if (file_exists(FULL_PATH . $file_path)) {
			if (!is_writable(FULL_PATH . $file_path)) {
				$folder_status = '[<span class="error">FAILED</span>]';
				$error_message = ' (<span class="error">777 required</span>)';
			}
			else {
				$folder_status = '[<span style="color:green;">OK</span>]';
				$error_message = '';
			}
			echo sprintf($folder_tpl, $file_path . $error_message, $folder_status);
		}
	}
?>