<?php /* Smarty version 2.6.31, created on 2024-05-24 17:43:58
         compiled from db:d3downloads_admin_category_edit.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'regex_replace', 'db:d3downloads_admin_category_edit.html', 36, false),array('modifier', 'string_format', 'db:d3downloads_admin_category_edit.html', 286, false),array('function', 'html_options', 'db:d3downloads_admin_category_edit.html', 49, 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=jquery.textarearesizer.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 $this->_tpl_vars['formtitle']; ?>
</h2>
<?php if ($this->_tpl_vars['iserror']): ?>
	<div id="error_message" 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="user_access" id="user_access" action="<?php echo $this->_tpl_vars['mod_url']; ?>
/admin/index.php?page=<?php echo $this->_tpl_vars['page']; ?>
&amp;cid=<?php echo $this->_tpl_vars['categorydata']['cid']; ?>
" method="post">
	<?php echo $this->_tpl_vars['gticket_hidden']; ?>

	<input type="hidden" name="cid" value="<?php echo $this->_tpl_vars['categorydata']['cid']; ?>
" />
	<input type="hidden" name="old_pid" value="<?php echo $this->_tpl_vars['categorydata']['old_pid']; ?>
" />
	<input type="hidden" name="ajax_url" id="ajax_url" value="<?php echo $this->_tpl_vars['mod_url']; ?>
/index.php?page=ajax_load" />
	<table class="outer">
		<tr valign="top" align="left">
			<td class="head"><label for="title"><?php echo @_MD_D3DOWNLOADS_CATEGORYTITLE; ?>
</label></td>
			<td class="even">
				<input type="text" name="title" id="title" size="50" maxlength="50" value="<?php echo $this->_tpl_vars['categorydata']['title']; ?>
" />
				<div id="info" style="display:none;color: #CC0000;font-size:100%;font-weight:bold;margin:2px;padding:2px;"></div>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="imgurl"><?php echo @_MD_D3DOWNLOADS_CATEGORYIMGURL; ?>
</label><br />
				<span style="font-size: small;">
					<?php echo @_MD_D3DOWNLOADS_CATEGORYIMGURLDESC; ?>
</td>
				</span>
			</td>
			<td class="even">
				<?php if ($this->_tpl_vars['categorydata']['imgurl']): ?>
					<input type="text" name="imgurl" id="imgurl" size="100" maxlength="150" value="<?php echo $this->_tpl_vars['categorydata']['imgurl']; ?>
" />
				<?php else: ?>
					<input type="text" name="imgurl" id="imgurl" size="100" maxlength="150" value="http://" />
				<?php endif; ?>
				<div id="imgurl_info" style="display:none;color: #CC0000;font-size:100%;font-weight:bold;margin:2px;padding:2px;"></div>
				<?php if (((is_array($_tmp=$this->_tpl_vars['categorydata']['imgurl'])) ? $this->_run_mod_handler('regex_replace', true, $_tmp, '/^(https?|ftp):\/\/.+(\.gif|\.jpe?g|\.png)$/i', 'imgurl') : smarty_modifier_regex_replace($_tmp, '/^(https?|ftp):\/\/.+(\.gif|\.jpe?g|\.png)$/i', 'imgurl')) == 'imgurl'): ?>
					<br /><img src="<?php echo $this->_tpl_vars['categorydata']['imgurl']; ?>
" width="70" style="margin: 5 2px 3px;padding: 5px;border: 2px solid #CCC;background:#FFF;color:inherit;" align="middle" />
				<?php endif; ?>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="select_imgurl"><?php echo @_MD_D3DOWNLOADS_SELECT_IMGURL; ?>
</label><br />
				<span style="font-size: small;">
					<?php echo @_MD_D3DOWNLOADS_SELECT_IMGURLDESC; ?>

				</span>
			</td>
			<td class="even">
				<select name="select_img" id="select_img"><br />
					<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['select_imgurl']['img_ar']), $this);?>
<br />
				</select>
				<span style="cursor: pointer" id="insert_imgurl"><img src="<?php echo $this->_tpl_vars['xoops_url']; ?>
/images/imgsrc.gif" align="absbottom" /></span><br />
				<div id="showimgurl_line">
					<img src="" id="show_imgurl" width="120" style="margin: 5 2px 3px;padding: 5px;border: 1px solid #CCC;background:#FFF;color:inherit;">
				</div>
			</td>
		</tr>
		<?php if ($this->_tpl_vars['can_selectshotsdir']): ?>
			<tr valign="top" align="left">
				<td class="head"><label for="shotsdir"><?php echo @_MD_D3DOWNLOADS_CATEGORYSHOTSDIR; ?>
</label><br />
					<span style="font-size: small;">
						<?php echo @_MD_D3DOWNLOADS_CATEGORYSHOTSDIRDESC; ?>
</label>
					</span>
				</td>
				<td class="even">
					<input type="text" name="shotsdir" id="shotsdir" size="100" maxlength="150" value="<?php echo $this->_tpl_vars['categorydata']['shotsdir']; ?>
" /><br />
					<div id="shotsdir_info" style="display:none;color: #CC0000;font-size:100%;font-weight:bold;margin:2px;padding:2px;"></div>
					<span style="font-size: small;">
						<?php echo $this->_tpl_vars['shotsdirhelp']; ?>

					</span>
				</td>
			</tr>
		<?php endif; ?>
		<tr valign="top" align="left">
			<td class="head"><label for="cat_weight"><?php echo @_MD_D3DOWNLOADS_CATWEIGHT; ?>
</label></td>
			<td class="even">
				<input type="text" name="cat_weight" id="cat_weight" size="5" maxlength="5" value="<?php echo $this->_tpl_vars['categorydata']['cat_weight']; ?>
" />
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="maincategory"><?php echo @_MD_D3DOWNLOADS_MAINCATEGORY; ?>
</label></td>
			<td class="even">
				<select name="pid" id="pid"><br />
					<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['maincategory'],'selected' => $this->_tpl_vars['categorydata']['pid']), $this);?>
<br />
				</select>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="description"><?php echo @_MD_D3DOWNLOADS_CATDESCRIPTION; ?>
</label><br />
			</td>
			<td class="even">
				<textarea name="description" id="description" cols="60" rows="10"><?php echo $this->_tpl_vars['categorydata']['description']; ?>
</textarea>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="submit_message"><?php echo @_MD_D3DOWNLOADS_SUBMIT_MESSAGE; ?>
</label><br />
				<span style="font-size: small;">
					<?php echo @_MD_D3DOWNLOADS_SUBMIT_MESSAGE_HELP; ?>

				</span>
			</td>
			<td class="even">
				<textarea name="submit_message" id="submit_message" cols="60" rows="10"><?php echo $this->_tpl_vars['categorydata']['submit_message']; ?>
</textarea>
			</td>
		</tr>
	</table>
	<div align="right">
		<input type="submit" name="category_update" value="<?php echo @_MD_D3DOWNLOADS_MYTPLSFORM_BTN_MODIFYCONT; ?>
" />
	</div>
	<h2><?php echo $this->_tpl_vars['title_useraccess']; ?>
</h2>
	<div style="display: inline;" id="user_access_edit">
		<?php if ($this->_tpl_vars['categorydata']['cid'] > 0 && $this->_tpl_vars['categorydata']['pid'] != 0): ?>
			<div style="color:inherit;border: 1px inset #CCC;padding: 6px;with: 80%;font-size: small;">
				<?php echo @_MD_D3DOWNLOADS_HELP_USERACCESS_PID; ?>

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

			</div>
		<?php endif; ?>
		<table class="outer">
			<tr>
				<th colspan="2" style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_GROUPNAME; ?>

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

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_1_' )">
					<?php endif; ?>
				</th>
				<th style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_CAN_POST; ?>

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_2_' )">
					<?php endif; ?>
				</th>
				<th style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_CAN_EDIT; ?>

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_3_' )">
					<?php endif; ?>
				</th>
				<th style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_CAN_DELETE; ?>

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_4_' )">
					<?php endif; ?>
				</th>
				<th style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_POST_AUTO_APPROVED; ?>

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_5_' )">
					<?php endif; ?>
				</th>
				<th style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_EDIT_AUTO_APPROVED; ?>

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_6_' )">
					<?php endif; ?>
				</th>
				<th style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_CAN_HTML; ?>

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_7_' )">
					<?php endif; ?>
				</th>
				<th style="text-align:center;">
					<?php echo @_MD_D3DOWNLOADS_TH_CAN_UPLOAD; ?>

					<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
						<input type="checkbox" onclick="col_check_on_off( this, 'gcol_8_' )">
					<?php endif; ?>
				</th>
			</tr>
				<?php echo $this->_tpl_vars['group_trs']; ?>

			<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
				<tr>
					<td colspan="10" align="center" class="head">
						<input type="submit" name="group_update" value="<?php echo @_SUBMIT; ?>
" />
					</td>
				</tr>
			<?php endif; ?>
		</table>
		<br />
		<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
			<div style="color:inherit;border: 1px inset #CCC;padding: 6px;with: 80%;font-size: small;">
				<?php echo @_MD_D3DOWNLOADS_HELP_USERACCESS; ?>

			</div>
		<?php endif; ?>
		<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0 || ( $this->_tpl_vars['categorydata']['pid'] != 0 && $this->_tpl_vars['user_trs'] )): ?>
			<br />
			<table class="outer">
				<tr>
					<th style="text-align:center;"><?php echo @_MD_D3DOWNLOADS_TH_UID; ?>
</th>
					<th colspan="2" style="text-align:center;"><?php echo @_MD_D3DOWNLOADS_TH_UNAME; ?>
</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_CAN_READ; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_1_' );col_check_on_off( this, 'ncol_1_' );">
						<?php endif; ?>
					</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_CAN_POST; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_2_' );col_check_on_off( this, 'ncol_2_' );">
						<?php endif; ?>
					</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_CAN_EDIT; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_3_' );col_check_on_off( this, 'ncol_3_' );">
						<?php endif; ?>
					</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_CAN_DELETE; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_4_' );col_check_on_off( this, 'ncol_4_' );">
						<?php endif; ?>
					</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_POST_AUTO_APPROVED; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_5_' );col_check_on_off( this, 'ncol_5_' );">
						<?php endif; ?>
					</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_EDIT_AUTO_APPROVED; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_6_' );col_check_on_off( this, 'ncol_6_' );">
						<?php endif; ?>
					</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_CAN_HTML; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_7_' );col_check_on_off( this, 'ncol_7_' );">
						<?php endif; ?>
					</th>
					<th style="text-align:center;">
						<?php echo @_MD_D3DOWNLOADS_TH_CAN_UPLOAD; ?>

						<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
							<input type="checkbox" onclick="col_check_on_off( this, 'ucol_8_' );col_check_on_off( this, 'ncol_8_' );">
						<?php endif; ?>
					</th>
				</tr>
				<?php echo $this->_tpl_vars['user_trs']; ?>

				<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
					<?php echo $this->_tpl_vars['newuser_trs']; ?>

					<tr>
						<td colspan="11" align="center" class="head">
							<input type="submit" name="user_update" value="<?php echo @_SUBMIT; ?>
" />
						</td>
					</tr>
				<?php endif; ?>
			</table>
			<br />
		<?php endif; ?>
		<?php if ($this->_tpl_vars['categorydata']['cid'] == 0 || $this->_tpl_vars['categorydata']['pid'] == 0): ?>
			<div style="color:inherit;border: 1px inset #CCC;padding: 6px;with: 80%;font-size: small;">
				<?php echo @_MD_D3DOWNLOADS_HELP_USERACCESS_USER; ?>

			</div>
		<?php endif; ?>
		<br />
	</div>
	<?php if ($this->_tpl_vars['categorydata']['cid'] == 0): ?>
		<div style="display: none;" id="useraccess_edit_info">
			<div style="color:inherit;border: 1px inset #CCC;padding: 6px;with: 80%;font-size: small;">
				<?php echo @_MD_D3DOWNLOADS_HELP_USERACCESS_PID; ?>

			</div>
			<br />
		</div>
	<?php endif; ?>
	<table class="outer">
		<tr valign="top" align="center">
			<td colspan="5" class="even">
				<input type="submit" class="formButton" name="categoryform_post" id="categoryform_post" value="<?php echo @_MD_D3DOWNLOADS_BTN_SUBMITEDITING; ?>
" />
				<?php if ($this->_tpl_vars['categorydata']['cid'] != 0): ?>
					<input type="submit" name="categoryform_delete" id="categoryform_delete" value="<?php echo @_DELETE; ?>
" />
				<?php endif; ?>
				<input name="back" type="button" id="cansel" value="<?php echo @_MD_D3DOWNLOADS_BTN_CANSEL; ?>
" />
			</td>
		</tr>
	</table>
</form>
<script type="text/javascript">
category_edit_form_initialize() ;

jQuery( function($){
	$( 'form' ).submit(function() {
		var info = '<?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)); ?>
' ;
		var error = 0 ;
		error += form_validate_contentform( 'title','info', info ) ;
		error += category_form_validate( 'imgurl', 'imgurl_info', '<?php echo @_MD_D3DOWNLOADS_IMGURL_CHECK; ?>
' ) ;
 		error += category_form_validate( 'shotsdir', 'shotsdir_info', '<?php echo @_MD_D3DOWNLOADS_SHOTSDIR_CHECK; ?>
' ) ;
		return ( error == 0 ) ? true : false ;
    });

    $( '#categoryform_delete' ).click( function(){
		return confirm('<?php echo @_MD_D3DOWNLOADS_CONFIRM_CATEGORY_DEL; ?>
') ;
    });

    $( '#cansel' ).click( function(){
		location.href="<?php echo $this->_tpl_vars['mod_url']; ?>
/admin/index.php?page=categorymanager" ;
    });
});
//-->
</script>
<?php echo $this->_tpl_vars['select_imgurl']['showlogourlselected']; ?>

<script type="text/javascript">
<!--//
showlogourlSelected( 'showimgurl' , 'select_img', 'showimgurl_line' , '<?php echo $this->_tpl_vars['mod_url']; ?>
/index.php?page=ajax_load' )
//--></script>

<style type="text/css">
div.grippie {
	background:#EEEEEE url(<?php echo $this->_tpl_vars['mod_url']; ?>
/index.php?page=module_header&src=grippie.png) no-repeat scroll center 2px;
	border-color:#DDDDDD;
	border-style:solid;
	border-width:0pt 1px 1px;
	cursor:s-resize;
	height:9px;
	overflow:hidden;
}
.resizable-textarea textarea {
	display:block;
	margin-bottom:0pt;
}
</style>