<?php if (!defined('access')) {die("Die gesuchte Ressource wurde entfernt oder umbenannt, oder sie steht vorübergehend nicht zur Verfügung.");} ?>
<?php
function cutFileContentInParts($arrayFileContent) {
	global $_CONFIG, $_LANG;
	
	if(!$arrayFileContent) {
		echo createMessage($_LANG['no_entry'], 'hint');
	}
	else {
		$thisZaehler = 0;
		
		foreach($arrayFileContent as $arrayNewsEntries) {
			$mixedNewsEntry = explode('[;]', $arrayNewsEntries);
			echo '
			<p class="newsTitle" style="background: url(\'images/icons/news/' . $mixedNewsEntry[2] . '\') no-repeat right center;">
				' . $mixedNewsEntry[0] . '
			</p>
			<div class="newsContent">
				<p class="body">
					' . nl2br($mixedNewsEntry[5]) . '
				</p>
				<div class="additionalInformation">
					<p>
						' . $_LANG['publish_date'] . ': ' . date($_CONFIG['web_date_format']['full'], strtotime($mixedNewsEntry[3])) . ' ' . $_LANG['oclock_optional'] . '
					</p>';
				
			if(!empty($mixedNewsEntry[4])) {
				echo '
					<p>
						' . $_LANG['news_link_to_forum'] . ': <a href="' . htmlspecialchars($mixedNewsEntry[4]) . '" title="Forum" target="_blank">Link</a>.
					</p>';
			}
			echo '
				</div>
			</div>';
			$thisZaehler++;
		}
	}
}

cutFileContentInParts(cutTxtInParts('site_news'));