<? 
$this->title->create($this->Language('Language'));

$list = '';
$language = $_GET['cur_language'] ? $_GET['cur_language'] : $_SESSION['language'];
while($row = $this->language_menus->Assoc()){

	$list .= '<a href="'.$this->Link('?cur_language='.$row['key'].($_GET['search'] ? '&search='.$_GET['search'] : '').($_GET['search_language'] ? '&search_language='.$_GET['search_language'] : '')).'" '.($row['key'] == $language ? 'style="color:red;"' : '').'>'.$row['language'].'</a> ';
}

?>

<form style="text-align:right;">
<input type="hidden" name="model" value="language">
<input type="hidden" name="page" value="language">
<input type="hidden" name="cur_language" value="<?=$language;?>">
<input type="text" name="search" value="<?=$_GET['search'];?>"/> <?=$this->Language('OR equal values');?> <input type="checkbox" name="equals" value="1" <?=($_GET['equals'] ? 'checked="checked"' : '')?>/> <input type="submit" name="search_language" value="<?=$this->Language('search');?>"/> <a href="?model=language&page=language"><?=$this->Language('Clear');?></a>
</form>

<form method="post">

	<table cellpadding="0" cellspacing="0" border="0" class="content">
		<thead>
			<!--
			HEADER ROW
			-->
			<tr>
				<th width="150px"><?=$this->Language('Name');?></th>
				<th width="350px"><?=$this->Language('In page');?></th>
				<th width="450px"><?=$this->Language('Value');?><span style="margin-left:385px;"><?=$this->Language('Delete');?></span></th>
			</tr>
			<tr>
				<td><?=$list_page;?></td>
				<td></td>
				<td><?=$list;?>
				<div class="buttons" style="margin-left:490px;position:fixed;">
					<input type="submit" name="update_language" value="<?=$this->Language('Update');?>"/><br/><br/><br/>
					<input type="submit" name="delete_language" value="<?=$this->Language('Delete');?>"/>
				</div>
				</td>
			</tr>
		</thead>
		<tbody>
		<?
		while($row = $this->language->Assoc()){
		?>
			<tr>
				<td><input type="hidden" name="name[]" value="<?=$row['name'];?>"/><?=$row['name'];?></td>
				<td style="color:blue;"><?=($row['model'] && $row['page'] ? $row['model'].' / '.$row['page'] : $row['model'].' '.$row['page']);?></td>
				<td>
				<?
				if(strlen($row['current_value']) > 100){

					echo '<textarea name="value['.$row['id'].']" style="width:400px;">'.$row['current_value'].'</textarea>';
				}
				else{

					echo '<input type="text" name="value['.$row['id'].']" value="'.$row['current_value'].'" style="width:400px;"/>';
				}
				?>
				<input type="checkbox" name="delete[]" value="<?=$row['id'];?>"/></td>
			</tr>
		<?
		}
		?>
		<tr>
			<td colspan="3" style="text-align:center;">
			<? $this->pageGenerator->page_generator($this->language->pageList, ''); ?>
			</td>
		</tr>
		</tbody>
	</table>
</form>