<?php if(!defined('IN_RAINTPL')){exit('Hacker attempt');}?><!-- template_manager | generated by RainTPL v 1.7.5 | www.RainTPL.com -->
<?php
$RainTPL_include_obj = new RainTPL();
$RainTPL_include_obj->assign( $var );
$RainTPL_directory_template_temp = $RainTPL_include_obj->tpl_dir;
$this->tpl_dir = $GLOBALS[ 'RainTPL_tpl_dir' ] = $RainTPL_include_obj->tpl_dir . "/" . dirname( "global_header" );
$RainTPL_include_obj->draw( "global_header" );
$this->tpl_dir = $GLOBALS[ 'RainTPL_tpl_dir' ] = $RainTPL_directory_template_temp;
?>
<h3><center><?php echo $var["message"];?></center></h3>
<?php
	if( $var["no_add"] == FALSE ){
?>
<center>
	<h3><?=_('Add New Template')?>:</h3><form action="config.php?display=epm_templates&Submit=EditTemplate" method="POST">
	  <?=_('Template Name')?>:
	  <label>
	    <input type="text" name="template_name" id="template_name">
		<input type="hidden" name="page" value="template_manager">
	  </label>
	<?=_('Product Select')?>: 
	<label>
	  <select name="model_class" id="model_class">
		<?php
		if( isset( $var["class_list"] ) ){
			$counter1 = 0;
			foreach( $var["class_list"] as $key1 => $value1 ){ 
?>
	    <option value="<?php echo $value1["value"];?>"><?php echo $value1["text"];?></option>
		<?php
				$counter1++;
			}
		}
?>
	  </select>
	</label>
        Clone Template From:
        <label>
	  <select name="model_clone" id="model_clone">
	  </select>
	</label>
	<label>
	  <input type="submit" name="button_save" value="<?=_('Save')?>">
	</label>
	</form>
<table width="80%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h3><?=_('Template Name')?></h3></td>
    <td><h3><?=_('Model Classification')?></h3></td>
    <td><h3><?=_('Model Clone')?></h3></td>
    <td><h3><?=_('Edit')?></h3></td>
    <td><h3><?=_('Delete')?></h3></td>
  </tr>
<?php
		if( isset( $var["templates_list"] ) ){
			$counter1 = 0;
			foreach( $var["templates_list"] as $key1 => $value1 ){ 
?>
  <tr>
    <td><?php echo $value1["name"];?></td>
    <td><?php echo $value1["model_class"];?></td>
    <td><?php echo $value1["model_clone"];?></td>

	<td align='center' width='9%'><a href="config.php?edit_template=true&display=epm_templates&custom=<?php echo $value1["custom"];?>&id=<?php echo $value1["id"];?>"><img src='<?=WEB_PATH?>templates/images/edit.gif' ALT='<?=_('Edit')?>' border='0'></a></td>
	<td align='center' width='5%'><?php
			if( $value1["custom"] == 0 ){
?>
	<a href="config.php?delete_template=true&display=epm_templates&id=<?php echo $value1["id"];?>"><img src='<?=WEB_PATH?>templates/images/delete.gif' ALT='<?=_('Delete')?>' border='0'></a><?php
			}
?></td>
  </tr>
<?php
				$counter1++;
			}
		}
?>
</table>
</center>
<?php
	}
?>
<?php
$RainTPL_include_obj = new RainTPL();
$RainTPL_include_obj->assign( $var );
$RainTPL_directory_template_temp = $RainTPL_include_obj->tpl_dir;
$this->tpl_dir = $GLOBALS[ 'RainTPL_tpl_dir' ] = $RainTPL_include_obj->tpl_dir . "/" . dirname( "global_footer" );
$RainTPL_include_obj->draw( "global_footer" );
$this->tpl_dir = $GLOBALS[ 'RainTPL_tpl_dir' ] = $RainTPL_directory_template_temp;
?>
<!--/ template_manager -->
