<? $this->load->view( $this->aSystemVar['template_viewer_root'] . 'admin/_header') ?>
	<div class="bigCaption">Posts</div>
		<?
			$aPagination['Pagination'] = $Post_list['Pagination'];
			$this->load->view( $this->aSystemVar['template_viewer_root'] . 'design_items/pagination', $aPagination );
		?>
		<div class="filter">
			<?= form_open('admin/post_lang/', array( 'id' => 'filter_post_form') ) ?>
			<table cellpadding="4" cellspacing="1" border="0">
				<tr>
					<td>
						<select name="Status">
							<option value=""<?= empty($Post_list['Status']) ? ' selected="selected" ' : ''; ?>>-= status =-</option>
							<option value="inactive"<?= 'inactive' == $Post_list['Status'] ? ' selected="selected" ' : ''; ?>>inactive</option>
							<option value="active"<?= 'active' == $Post_list['Status'] ? ' selected="selected" ' : ''; ?>>active</option>
						</select>
					</td>
					<td>
						<select name="SubType">
							<option value=""<?= empty($Post_list['SubType']) ? ' selected="selected" ' : ''; ?>>-= type =-</option>
							<option value="regular"<?= 'regular' == $Post_list['SubType'] ? ' selected="selected" ' : ''; ?>>regular</option>
							<option value="featured"<?= 'featured' == $Post_list['SubType'] ? ' selected="selected" ' : ''; ?>>featured</option>
							<option value="news"<?= 'news' == $Post_list['SubType'] ? ' selected="selected" ' : ''; ?>>news</option>
						</select>
					</td>
					<td>
						<select name="Category">
							<option value=""<? empty($Post_list['Category']) ? ' selected="selected" ' : '' ?>>-= category =-</option>
							<? foreach($Post_list['category_list'] as $aCategory): ?>
								<option value="<?= $aCategory['Id'] ?>"<?= $aCategory['Id'] == $Post_list['Category'] ? ' selected="selected" ' : ''  ?>><?= $aCategory['Title'] ?></option>
							<? endforeach; ?>
						</select>
					</td>
					<td>
						<input type="submit" value="filter" class="submit" />
					</td>
				</tr>
			</table>

			<?= form_close() ?>
		</div>
	<?= form_open('admin/post_lang/' . $Post_list['Status'] . '/' . $Post_list['SubType'], array( 'id' => 'approve_post_form') ) ?>
		<div><input type="hidden" id="action" name="action" value="" /></div>
		<table cellpadding="0" cellspacing="1" width="100%" class="contentList">
			<tr class="head">
				<td class="id">id</td>
				<td class="checkbox"><input type="checkbox" disabled="disabled" /></td>
				<? foreach ( $this->aSystemVar['lang_list'] as $aItem ) : ?>
					<td class="textCenter">
						<strong><?=$aItem['Title']?></strong>
					</td>
				<? endforeach; ?>
			</tr>
			<? $i = 0; ?>
		<? foreach( $Post_list['PostList'] as $aPost ): ?>
			<?
				if( ($i%2) == 0 )
				{
					$sClassName = 'odd';
				}
				else
				{
					$sClassName = 'even';
				}
			?>

			<tr class="<?= $sClassName ?>" >
				<td class="id"><?= $aPost['Id'] ?></td>
				<td class="checkbox"><input type="checkbox" name="PostId[]" value="<?= $aPost['Id'] ?>" id="p<?= $aPost['Id'] ?>" class="checkbox" /></td>
				<? foreach ( $this->aSystemVar['lang_list'] as $aItem ) : ?>
				<td class="title">
					<? 
						if ( empty($Post_lang['LangList'][$aPost['Id']][$aItem['BaseName']]['Title'] ) )
						{
							echo '<strong>'.anchor('admin/post_trans/'.$aPost['Id'].'/'.$aItem['BaseName'], 'no', array('style'=>'color:#ff0000;')).'</strong>';
						}
						else
						{
							echo anchor('admin/post_trans/'.$aPost['Id'].'/'.$aItem['BaseName'],$Post_lang['LangList'][$aPost['Id']][$aItem['BaseName']]['Title']);
						}
					?>
				</td>
				<? endforeach; ?>
			</tr>
			<? $i++; ?>
		<? endforeach; ?>
		</table>

			<?
				$aPagination['Pagination'] = $Post_list['Pagination'];
				$this->load->view( $this->aSystemVar['template_viewer_root'] . 'design_items/pagination', $aPagination );
			?>
	<?= form_close(); ?>
<? $this->load->view( $this->aSystemVar['template_viewer_root'] . 'admin/_footer') ?>