<?php /* Smarty version 2.6.31, created on 2024-05-24 17:43:58
         compiled from db:d3downloads_admin_category_list.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'db:d3downloads_admin_category_list.html', 15, false),array('function', 'cycle', 'db:d3downloads_admin_category_list.html', 47, false),array('modifier', 'string_format', 'db:d3downloads_admin_category_list.html', 165, false),)), $this); ?>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['mod_url']; ?>
/index.php?page=module_header&src=jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['mod_url']; ?>
/index.php?page=module_header&src=d3downloads.js"></script>
<h2><?php echo @_MD_D3DOWNLOADS_H2CATEGORYMANAGER; ?>
</h2>
<?php if ($this->_tpl_vars['iserror']): ?>
	<div style="color: #CC0000;font-size:100%;font-weight:bold;margin:5px;padding:5px;border-width:1px;border-style:solid;border-color:#808080;">
		<?php echo $this->_tpl_vars['error_message']; ?>

	</div>
<?php endif; ?>
<form name="categorymanager" id="categorymanager" action="<?php echo $this->_tpl_vars['mod_url']; ?>
/admin/index.php?page=<?php echo $this->_tpl_vars['page']; ?>
" method="post">
<?php echo $this->_tpl_vars['gticket_hidden']; ?>

<div style="text-align:right;color:inherit;border: 1px inset #CCC;padding: 3px;with: 80%;font-size: small;">
	[<a href="<?php echo $this->_tpl_vars['mod_url']; ?>
/admin/index.php?page=categoryedit&amp;cid=0"><?php echo @_MD_D3DOWNLOADS_NEWCATEGORYEDITTITLE; ?>
</a>]&nbsp;
	<?php echo @_MD_D3DOWNLOADS_LABEL_PERPAGE; ?>
&nbsp;
	<select name="perpage" onchange="submit();">
		<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['perpage'],'selected' => $this->_tpl_vars['select_perpage']), $this);?>

	</select>
</div>
<table class="outer">
	<tr>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_TH_ID; ?>

		</th>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_TH_TITLE; ?>

		</th>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_TH_WEIGHT; ?>

		</th>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_FILES_SUM; ?>

		</th>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_SUBCATEGORY_SUM; ?>

		</th>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_MAINCATEGORY; ?>

		</th>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_CATEGORYIMG; ?>

		</th>
		<th style="text-align:center;">
			<?php echo @_MD_D3DOWNLOADS_TH_CONTENTSACTIONS; ?>

			<input type="checkbox" onclick="col_check_on_off( this, 'col_action_' )">
		</th>
	</tr>
	<?php $_from = $this->_tpl_vars['category']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['mycategory']):
?>
		<tr class="<?php echo smarty_function_cycle(array('values' => "even,odd"), $this);?>
">
			<td style="text-align:center;">
				<?php echo $this->_tpl_vars['mycategory']['cid']; ?>

			</td>
			<td nowrap="nowrap">
				<input type="text" size="35" maxlength="255" name="title[<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
]" id="col_title_<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
" value="<?php echo $this->_tpl_vars['mycategory']['title']; ?>
" />
				<div id="title_info_<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
" style="display:none;color: #CC0000;font-size:100%;font-weight:bold;margin:2px;padding:2px;"></div>
			</td>
			<td align="center">
				<input type="text" size="3" name="weights[<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
]" id="col_weight_<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
" value="<?php echo $this->_tpl_vars['mycategory']['cat_weight']; ?>
" style="text-align:right;" />
			</td>
			<td align="center">
				<?php echo $this->_tpl_vars['mycategory']['files']; ?>

			</td>
			<td align="center">
				<?php echo $this->_tpl_vars['mycategory']['subcategory']; ?>

			</td>
			<td align="center">
				<?php if ($this->_tpl_vars['mycategory']['parentid']): ?>
					<a href="<?php echo $this->_tpl_vars['mod_url']; ?>
/admin/index.php?page=categoryedit&amp;cid=<?php echo $this->_tpl_vars['mycategory']['parentid']; ?>
"><?php echo $this->_tpl_vars['mycategory']['parent_cat']; ?>
</a>
				<?php else: ?>
					<div alighn="center">-----------------</div>
				<?php endif; ?>
			</td>
			<td align="center">
				<?php if ($this->_tpl_vars['mycategory']['imgurl'] != ""): ?>
					<img src="<?php echo $this->_tpl_vars['mycategory']['imgurl']; ?>
" width="70" style="margin: 5 2px 3px;padding: 5px;border: 2px solid #CCC;background:#FFF;color:inherit;" align="middle" />
				<?php else: ?>
					<img src="<?php echo $this->_tpl_vars['mod_url']; ?>
/images/folder.gif" width="18" height="14" border="0" align="middle" />
				<?php endif; ?>
			</td>
			<td nowrap="nowrap" style="text-align:center;">
				<a href="<?php echo $this->_tpl_vars['mod_url']; ?>
/index.php?cid=<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
"><?php echo @_MD_D3DOWNLOADS_VISIBLE; ?>
</a> |
				<a href="<?php echo $this->_tpl_vars['mod_url']; ?>
/admin/index.php?page=categoryedit&amp;cid=<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
"><?php echo @_EDIT; ?>
</a> |
				<input type="checkbox" name="action_selects[<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
]" id="col_action_<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
" value="1" /><br />
				<span style="font-size: small;"><a href="<?php echo $this->_tpl_vars['mod_url']; ?>
/admin/index.php?page=categoryedit&amp;cid=0&amp;pid=<?php echo $this->_tpl_vars['mycategory']['cid']; ?>
"><?php echo @_MD_D3DOWNLOADS_MAKESUBCATEGORY; ?>
</a></span>
			</td>
		</tr>
	<?php endforeach; endif; unset($_from); ?>
	<tr>
		<td colspan="9" align="center" class="head">
			<input type="submit" name="category_update" id="category_update" value="<?php echo @_SUBMIT; ?>
" tabindex="0" />
		</td>
	</tr>
	<tr>
		<th colspan="9" style="text-align:right;">
			<?php echo @_MD_D3DOWNLOADS_LABEL_CATEGORYCHECKED; ?>

			<input type="submit" name="delete" id="delete" value="<?php echo @_MD_D3DOWNLOADS_BTN_DELETE; ?>
" /> | 
			<input type="submit" name="category_top_move" id="category_top_move" value="<?php echo @_MD_D3DOWNLOADS_CATEGORY_TOP_MOVE; ?>
" /> | 
			<input type="submit" name="category_move" id="category_move" value="<?php echo @_MD_D3DOWNLOADS_CATEGORY_MOVE; ?>
" /> 
			<?php echo @_MD_D3DOWNLOADS_SEL_CATEGORY; ?>

			<select name="move_select" id="move_select">
			<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['moveselect']), $this);?>

			</select><br />
		</th>
	</tr>
	<tr>
		<td colspan="9" align="right">
			<div style="color:inherit;border: 1px inset #CCC;padding: 3px;font-size: small;">
				<?php echo @_MD_D3DOWNLOADS_CATEGORY_CHECK; ?>

				<input type="submit" name="category_check" value="<?php echo @_SUBMIT; ?>
" />
			</div>
		</td>
	</tr>
</table>
</form>

<div align="right"><?php echo $this->_tpl_vars['pagenav']; ?>
</div>

<?php if ($this->_tpl_vars['sitemap']): ?>
	<h2><?php echo @_MD_D3DOWNLOADS_CATEGORY_TREE; ?>
</h2>
	<div style="color:inherit;border: 1px inset #CCC;padding: 6px;font-size: small;">
		<table border="0" width="100%" cellspacing="10" cellpadding="10" align="center">
			<tr>
			    <?php $_from = $this->_tpl_vars['sitemap']['parent']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['count'] => $this->_tpl_vars['parent']):
?>
		    	    <td valign="top" width="33%">
						<div style="border:dotted 1px #c0c0c0;padding:2px">
							<div style="border:dotted 1px #808080;padding:10px">
								<div>
									<img src="<?php echo $this->_tpl_vars['mod_url']; ?>
/images/folder.gif" width="18" height="14" border="0" />
									&nbsp;<a href="<?php echo $this->_tpl_vars['mod_url']; ?>
/<?php echo $this->_tpl_vars['parent']['url']; ?>
"><?php echo $this->_tpl_vars['parent']['title']; ?>
</a>
									&nbsp;<span style="font-size:smaller;">( <?php echo $this->_tpl_vars['parent']['files']; ?>
 )</span>
								</div>
								<?php $_from = $this->_tpl_vars['parent']['child']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['child']):
?>
									<div>
										&nbsp;<a href="<?php echo $this->_tpl_vars['mod_url']; ?>
/<?php echo $this->_tpl_vars['child']['url']; ?>
"><?php echo $this->_tpl_vars['child']['title']; ?>
</a>
										&nbsp;<span style="font-size:smaller;">( <?php echo $this->_tpl_vars['child']['files']; ?>
 )</span>
									</div>
								<?php endforeach; endif; unset($_from); ?>
								<div style="font-size:smaller;">
									( <?php echo @_MD_D3DOWNLOADS_BCAT_TOTAL; ?>
<?php echo $this->_tpl_vars['parent']['total_files']; ?>
 )
								</div>
							</div>
						</div>
					</td>
			<?php if (!(( $this->_tpl_vars['count']+1 ) % 3)): ?>
					</tr>
				<tr>
			<?php endif; ?>
			  <?php endforeach; endif; unset($_from); ?>
			</tr>
		</table>
	</div>
<?php endif; ?>
<br />

<div style="color:inherit;border: 1px inset #CCC;padding: 6px;with: 80%;font-size: small;">
	<?php echo @_MD_D3DOWNLOADS_HELP_CATEGORY_DEL; ?>

</div>

<script type="text/javascript">
<!--//
jQuery( function($){
	$( '#category_update' ).click( function(){
		validate_error = 0 ;
		$.each( $id_filter( 'col_title_' , '^=' ), function(){
			var targetId = this.id ;
			var info = 'title_info_' + targetId.slice( 10 ) ;
			var message = '<?php echo ((is_array($_tmp=@_MD_D3DOWNLOADS_SUBJECT)) ? $this->_run_mod_handler('string_format', true, $_tmp, @_FORM_ENTER) : smarty_modifier_string_format($_tmp, @_FORM_ENTER)); ?>
' ;
			validate_error += form_validate_contentform( targetId, info, message ) ;
		});
		return ( validate_error == 0 ) ? true : false ;
    });

    $( '#delete' ).click( function(){
		infoDom_initialize() ;
		col_action_check( 'col_action_' ) ;
		if( validate_checked > 0 ){
			return confirm('<?php echo @_MD_D3DOWNLOADS_CONFIRM_CATEGORY_DEL; ?>
') ;
		} else {
			popup_info( '<?php echo @_MD_D3DOWNLOADS_ERROR_SEL_CATEGORY; ?>
' )
			return false ;
		}
    });

    $( '#category_top_move' ).click( function(){
		infoDom_initialize() ;
		col_action_check( 'col_action_' ) ;
		if( validate_checked > 0 ){
			return confirm('<?php echo @_MD_D3DOWNLOADS_CONFIRMCATEGORY_TOP_MOVE; ?>
') ;
		} else {
			popup_info( '<?php echo @_MD_D3DOWNLOADS_ERROR_SEL_CATEGORY; ?>
' )
			return false ;
		}
    });

    $( '#category_move' ).click( function(){
		infoDom_initialize() ;
		col_action_check( 'col_action_' ) ;
		select_check( 'move_select' ) ;
		if( validate_checked > 0 && validate_selected > 0 ){
			return confirm('<?php echo @_MD_D3DOWNLOADS_CONFIRMCATEGORY_MOVE; ?>
') ;
		} else {
			popup_info( '<?php echo @_MD_D3DOWNLOADS_ERROR_SEL_CATEGORY; ?>
' )
			return false ;
		}
    });
});
//-->
</script>