error_reporting(E_ALL);
	include '../php/filestorage.class.php';
	include '../preferences.php';
	include '../php/json.class.php';
	include '../php/functions.php';
	include '../php/yshout.class.php';
	$html = '
';
	$admin = loggedIn();
	
	if (isset($_GET['log']))
		$log = $_GET['log'];
	
	if (isset($_POST['log']))
		$log = $_POST['log'];
	if (!isset($log))
		$log = 1;
		
	$ys = ys($log);
	$posts = $ys->posts();
	if (sizeof($posts) == 0)
		$html .= '
			
				13:37
				Yurivish:
				Hey, there aren\'t any posts in this log.
			
		';
	$id = 0;
	foreach($posts as $post) {
		$id++;
		$banned = $ys->banned($post['adminInfo']['ip']);
		$html .= '
' . "\n";
			switch($prefs['timestamp']) {
				case 12:
					$ts = date('h:i', $post['timestamp']);
					break;
				case 24:
					$ts = date('H:i', $post['timestamp']);
					break;
				case 0:
					$ts = '';
					break;
			}
			$html .= '	
' . $ts . ' ' . "\n";
			$html .= '	
' . $post['nickname'] . '' . $prefs['nicknameSeparator'] . ' ' . "\n";
			$html .= '	
' . $post['message'] . '' . "\n";
			$html .= '	
' . ($admin ? 'IP: ' . $post['adminInfo']['ip'] . ', ' : '') . 'Posted: ' . date('l M. j, Y \a\t ' . ($prefs['timestamp'] > 12 ? 'G:i' : 'g:i')) .'.' . "\n";
			$html .= '	
' . "\n";
			$html .= '		Info' . ($admin ? ' | Delete | ' . ($banned ? 'Unban' : 'Ban') : '') . "\n";
			$html .= '	' . "\n";
			if ($admin) {
				$html .= '
';
				$html .= '	' . $post['adminInfo']['ip'] . '';
				$html .= '	' . $post['nickname'] . '';
				$html .= '	' . $post['uid'] . '';
				$html .= '
';
			}
		$html .= '
' . "\n";
	}
	$html .=	'