<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>New</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="template_dir/script.js"></script>
</head>
<body>
<hr>type={$type}<hr>
{if $type=='main'}
<div class="main">
<div class="menu">
<a href="index.php?action=add">Add new record</a>
</div>
<div class="mainTable">
<form name="mainTable" method="post">
<table border="1">
<tr>
<td width="120px">
<input type="checkbox" name="selectAll" onClick="setChecked(this);">
<span id="text_checked">Note</span> All
</td>
<td>id</td>
{for $i=1 to 4}
<td>field_{$i}</td>
{/for}<td>Action</td>
</tr>
{foreach $table as $e_value}
<tr>
<td><input type="checkbox" name="checkbox[]" value="{$e_value['id']}" onClick=""></td>
{foreach $e_value as $i_value}
<td>{$i_value}</td>
{/foreach}
<td>
<a href="index.php?action=edit&id={$e_value['id']}">Edit</a>
<br>
<a href="index.php?action=delete&id={$e_value['id']}">Delete</a>
</td>
</tr>
{/foreach}
</table>
<input type="submit" name="submit" value="send">
</form>
</div>
</div>
{elseif $type=='add'}
<div class="add">
<p>Add new record</p>
<form name="addForms" method="post">
{for $i=1 to 3}
<p>field_{$i} : <input type="text" name="field[{$i}]"></p>
{/for}
<p><input type="submit" name="submit" value="add"></p>
</form>
</div>
{elseif $type=='edit'}
{/if}
</body>
</html>