<? $this->load->view( $this->aSystemVar['template_viewer_root'] . 'admin/_header') ?>

	<div class="bigCaption">Static pages <span>( <?= anchor('page/create', 'add new' ) ?> )</span> </div>

	<?= form_open('admin/stat_list/', array( 'id' => 'stat_form') ); ?>
		<!-- <div class="tableSubmit"><input type="submit" value="submit" class="admSubmit" /></div> -->
		<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>
				<td class="title">title</td>
				<td class="desc">content</td>
				<td colspan="3" class="action">action</td>
			</tr>
			<?
			$i = 0;
			foreach( $Item['ItemList'] as $aItem )
			{

				if( ($i%2) == 0 )
				{
					$sClassName = 'odd';
				}
				else
				{
					$sClassName = 'even';
				}
			 ?>
			<tr class="<?= $sClassName ?>" style="<?=(!$aItem['Lang']?'background-color:#ffeeee;"':'')?>">
				<td class="id textCenter">
					<?= $aItem['Id'] ?>
				</td>
				<td><input type="checkbox" name="StatId[]" value="<?= $aItem['Id'] ?>" id="s<?= $aItem['Id'] ?>" /></td>
				<td class="desc">
					<?=$aItem['Title']?>
				</td>
				<td class="desc">
					<?= $aItem['Content'] ?>
				</td>
				<td class="view textCenter">
					<?= anchor('info/'.$aItem['BaseName'], 'view') ?>
				</td>
				<td class="textCenter edit">
					<?= anchor('page/edit/'.$aItem['BaseName'], 'edit') ?>
				</td>
				<td class="textCenter delete">
					<a href="#" onclick="javascript: document.getElementById('action').value='deleted'; document.getElementById('s<?= $aItem['Id'] ?>').checked = true; document.getElementById('stat_form').submit(); return false;">delete</a>
				</td>
			</tr>
			<?
				$i++;
			}
?>
		</table>
		<!-- <div class="tableSubmit"><input type="submit" value="submit" class="admSubmit" /></div> -->
	<?= form_close(); ?>
<? $this->load->view( $this->aSystemVar['template_viewer_root'] . 'admin/_footer') ?>