<?php /* Smarty version 2.6.26, created on 2017-04-13 17:32:58
         compiled from /home3/bargaip4/public_html/gevimmo/plugins/bookmarks/admin/bookmarks.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'cat', '/home3/bargaip4/public_html/gevimmo/plugins/bookmarks/admin/bookmarks.tpl', 35, false),array('modifier', 'count', '/home3/bargaip4/public_html/gevimmo/plugins/bookmarks/admin/bookmarks.tpl', 52, false),array('modifier', 'implode', '/home3/bargaip4/public_html/gevimmo/plugins/bookmarks/admin/bookmarks.tpl', 77, false),array('modifier', 'in_array', '/home3/bargaip4/public_html/gevimmo/plugins/bookmarks/admin/bookmarks.tpl', 237, false),array('modifier', 'ceil', '/home3/bargaip4/public_html/gevimmo/plugins/bookmarks/admin/bookmarks.tpl', 368, false),)), $this); ?>
<!-- bookmarks tpl -->

<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
jquery/colorpicker/js/colorpicker.js"></script>

<style type="text/css">
  @import url("http://s7.addthis.com/static/r07/widget48.css");
  <?php echo '
  .at15t_google_plusone
  {
		background: url(\''; ?>
<?php echo @RL_PLUGINS_URL; ?>
<?php echo 'bookmarks/static/gallery.png\') 0 0 no-repeat;
  }
  .at15t_facebook_like
  {
		background: url(\''; ?>
<?php echo @RL_PLUGINS_URL; ?>
<?php echo 'bookmarks/static/gallery.png\') 0 -16px no-repeat;
  }
  .at15t_tweet
  {
		background: url(\''; ?>
<?php echo @RL_PLUGINS_URL; ?>
<?php echo 'bookmarks/static/gallery.png\') 0 -32px no-repeat;
  }
  '; ?>

</style> 

<!-- navigation bar -->
<div id="nav_bar">
	<a href="<?php echo $this->_tpl_vars['rlBaseC']; ?>
action=add" class="button_bar"><span class="left"></span><span class="center_add"><?php echo $this->_tpl_vars['lang']['bsh_add_block']; ?>
</span><span class="right"></span></a>
	<a href="<?php echo $this->_tpl_vars['rlBaseC']; ?>
" class="button_bar"><span class="left"></span><span class="center_list"><?php echo $this->_tpl_vars['lang']['items_list']; ?>
</span><span class="right"></span></a>
</div>
<!-- navigation bar end -->

<?php if ($_GET['action']): ?>

	<?php $this->assign('sPost', $_POST); ?>

	<!-- add new/edit block -->
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'm_block_start.tpl') : smarty_modifier_cat($_tmp, 'm_block_start.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<form action="<?php echo $this->_tpl_vars['rlBaseC']; ?>
action=<?php if ($_GET['action'] == 'add'): ?>add<?php elseif ($_GET['action'] == 'edit'): ?>edit&amp;item=<?php echo $_GET['item']; ?>
<?php endif; ?>" method="post" enctype="multipart/form-data">
		<input type="hidden" name="submit" value="1" />
		<?php if ($_GET['action'] == 'edit'): ?>
			<input type="hidden" name="fromPost" value="1" />
		<?php endif; ?>
		<table class="form">
		<tr>
			<td class="name"><span class="red">*</span><?php echo $this->_tpl_vars['lang']['key']; ?>
</td>
			<td class="field">
				<input <?php if ($_GET['action'] == 'edit'): ?>readonly="readonly"<?php endif; ?> <?php if ($_GET['action'] == 'edit'): ?>class="disabled"<?php endif; ?> name="key" type="text" value="<?php echo $this->_tpl_vars['sPost']['key']; ?>
" maxlength="30" />
			</td>
		</tr>
		
		<tr>
			<td class="name"><span class="red">*</span><?php echo $this->_tpl_vars['lang']['name']; ?>
</td>
			<td class="field">
				<?php if (count($this->_tpl_vars['allLangs']) > 1): ?>
					<ul class="tabs">
						<?php $_from = $this->_tpl_vars['allLangs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['langF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['langF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['language']):
        $this->_foreach['langF']['iteration']++;
?>
						<li lang="<?php echo $this->_tpl_vars['language']['Code']; ?>
" <?php if (($this->_foreach['langF']['iteration'] <= 1)): ?>class="active"<?php endif; ?>><?php echo $this->_tpl_vars['language']['name']; ?>
</li>
						<?php endforeach; endif; unset($_from); ?>
					</ul>
				<?php endif; ?>
				
				<?php $_from = $this->_tpl_vars['allLangs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['langF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['langF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['language']):
        $this->_foreach['langF']['iteration']++;
?>
					<?php if (count($this->_tpl_vars['allLangs']) > 1): ?><div class="tab_area<?php if (! ($this->_foreach['langF']['iteration'] <= 1)): ?> hide<?php endif; ?> <?php echo $this->_tpl_vars['language']['Code']; ?>
"><?php endif; ?>
					<input type="text" name="name[<?php echo $this->_tpl_vars['language']['Code']; ?>
]" value="<?php echo $this->_tpl_vars['sPost']['name'][$this->_tpl_vars['language']['Code']]; ?>
" maxlength="350" />
					<?php if (count($this->_tpl_vars['allLangs']) > 1): ?>
							<span class="field_description_noicon"><?php echo $this->_tpl_vars['lang']['name']; ?>
 (<b><?php echo $this->_tpl_vars['language']['name']; ?>
</b>)</span>
						</div>
					<?php endif; ?>
				<?php endforeach; endif; unset($_from); ?>
			</td>
		</tr>
		
		<tr>
			<td class="name"><span class="red">*</span><?php echo $this->_tpl_vars['lang']['bsh_bookmark_type']; ?>
</td>
			<td class="field">
				<div class="bookmarks">
					<?php $_from = $this->_tpl_vars['bookmarks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['bookmark']):
?>
						<div style="width: 218px;float: left;margin: 0 5px 5px 0;border: 2px #f2f2f2 solid;border-radius: 4px;" class="item <?php if ($this->_tpl_vars['sPost']['type'] && $this->_tpl_vars['bookmark']['Key'] != $this->_tpl_vars['sPost']['type']): ?> hide<?php endif; ?>" id="item_<?php echo $this->_tpl_vars['bookmark']['Key']; ?>
">
							<label for="input_<?php echo $this->_tpl_vars['bookmark']['Key']; ?>
" <?php if (is_array ( $this->_tpl_vars['bookmark']['Services'] )): ?>accesskey="<?php echo ((is_array($_tmp=',')) ? $this->_run_mod_handler('implode', true, $_tmp, $this->_tpl_vars['bookmark']['Services']) : implode($_tmp, $this->_tpl_vars['bookmark']['Services'])); ?>
"<?php endif; ?>><img alt="<?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['bookmark']['Name']]; ?>
" src="<?php echo @RL_PLUGINS_URL; ?>
bookmarks/examples/<?php echo $this->_tpl_vars['bookmark']['Key']; ?>
.jpg" /></label>
							<div class="controller_title" style="font-size: 13px;font-weight: bold;padding: 5px 0 10px;text-align: center;">
								<?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['bookmark']['Name']]; ?>

								<div>
									<input <?php if ($this->_tpl_vars['sPost']['type'] == $this->_tpl_vars['bookmark']['Key']): ?>checked="checked" class="hide"<?php endif; ?> id="input_<?php echo $this->_tpl_vars['bookmark']['Key']; ?>
" type="radio" name="type" value="<?php echo $this->_tpl_vars['bookmark']['Key']; ?>
" />
									<div style="padding: 5px 0 0 0;" <?php if ($this->_tpl_vars['bookmark']['Key'] != $this->_tpl_vars['sPost']['type']): ?>class="hide"<?php endif; ?>><a href="javascript:void(0)" class="static bsh_restore"><?php echo $this->_tpl_vars['lang']['bsh_choose_another']; ?>
</a></div>
								</div>
							</div>
						</div>
					<?php endforeach; endif; unset($_from); ?>
					<div class="clear"></div>
				</div>
				
				<script type="text/javascript">
				var bsh_bookmarks = new Array();
				<?php $_from = $this->_tpl_vars['bookmarks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['bookmark']):
?>
				bsh_bookmarks['<?php echo $this->_tpl_vars['bookmark']['Key']; ?>
'] = new Object(<?php echo '{'; ?>

					align: <?php if ($this->_tpl_vars['bookmark']['Align']): ?>true<?php else: ?>false<?php endif; ?>,
					services: <?php if ($this->_tpl_vars['bookmark']['Services']): ?>true<?php else: ?>false<?php endif; ?>,
					color: <?php if ($this->_tpl_vars['bookmark']['Color']): ?>true<?php else: ?>false<?php endif; ?>
				<?php echo '}'; ?>
);
				<?php endforeach; endif; unset($_from); ?>
				
				var current_bookmark = '<?php echo $this->_tpl_vars['sPost']['type']; ?>
';
				
				<?php echo '
				
				$(document).ready(function(){
				
					$(\'.bookmarks div.item input\').click(function(){
						var self = this;
						$(\'.bookmarks div.item\').fadeOut(\'fadeOut\', function(){
							$(self).hide(\'\');
							$(self).next().show(\'\');
						});
						$(this).parent().parent().parent().fadeIn(\'fadeOut\');
						flynax.slideTo(\'.bookmarks\');
						
						var services = $(this).parent().parent().prev().attr(\'accesskey\');
						var id = $(this).attr(\'id\').split(\'input_\')[1];
						
						bookmarksFieldsHandler(id, services);
					});
					
					$(\'a.bsh_restore\').click(function(){
						$(\'.bookmarks div.item\').fadeIn();
						$(this).parent().hide();
						$(this).parent().prev().show().attr(\'checked\', false);
					});
					
					$(\'select[name=view_mode]\').change(function(){
						viewModeHandler($(\'input#input_\'+current_bookmark).attr(\'id\').split(\'input_\')[1]);
					})
					
					if ( current_bookmark )
					{
						var id = $(\'input#input_\'+current_bookmark).attr(\'id\').split(\'input_\')[1];
						var services = $(\'input#input_\'+current_bookmark).parent().parent().prev().attr(\'accesskey\');
						
						bookmarksFieldsHandler(id, services);
					}
				
				});
				
				var bookmarksFieldsHandler = function(id, services){
					if ( services )
					{
						services = services.split(\',\');
						$(\'label.at15t\').parent().hide();
						
						for (var i = 0; i < services.length; i++)
						{
							$(\'label.at15t_\'+services[i]).parent().show();
						}
					}
					else
					{
						$(\'label.at15t\').parent().show();
					}
					
					if ( bsh_bookmarks[id].align )
					{
						$(\'#bsh_align\').slideDown();
					}
					else
					{
						$(\'#bsh_align\').slideUp();
					}
					
					if ( bsh_bookmarks[id].services )
					{
						$(\'#bsh_services\').slideDown();
					}
					else
					{
						$(\'#bsh_services\').slideUp();
					}
					
					if ( bsh_bookmarks[id].color )
					{
						$(\'#bsh_color\').slideDown();
					}
					else
					{
						$(\'#bsh_color\').slideUp();
					}
					
					if ( id == \'floating_bar\' )
					{
						$(\'.dynamic\').hide();
						$(\'#bsh_view_mode\').show();
					}
					else
					{
						$(\'.dynamic\').show();
						$(\'#bsh_view_mode\').hide();
					}
					
					viewModeHandler(id);
					
					$(\'label.at15t:hidden input\').attr(\'checked\', false);
				}
				
				var viewModeHandler = function(id){
					if ( id == \'floating_bar\' )
					{
						if ( $(\'select[name=view_mode]\').val() == \'large\' )
						{
							$(\'div.services > div.counter\').show();
							$(\'div.services > div.button\').hide();
							$(\'div.services > div.button input\').attr(\'checked\', false);
						}
						else
						{
							$(\'div.services > div.counter\').hide();
							$(\'div.services > div.button\').show();
							$(\'div.services > div.counter input\').attr(\'checked\', false);
						}
					}
					else
					{
						$(\'div.services > div.counter\').show();
						$(\'div.services > div.button\').show();
					}
				}
				
				'; ?>

				</script>
			</td>
		</tr>
		</table>
		
		<div id="bsh_services" class="hide">
			<table class="form">
			<tr>
				<td class="name"><?php echo $this->_tpl_vars['lang']['bookmarks_services']; ?>
</td>
				<td class="field">
					<div class="services" style="padding: 5px 0;">
					 	<?php $_from = $this->_tpl_vars['services']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['services'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['services']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['service_key'] => $this->_tpl_vars['service']):
        $this->_foreach['services']['iteration']++;
?>
				 			<div class="<?php if ($this->_foreach['services']['iteration'] <= 4): ?>counter<?php else: ?>button<?php endif; ?>"><label class="at15t at15t_<?php echo $this->_tpl_vars['service_key']; ?>
" style="float: left;width: 140px;margin: 0 0 5px 0;">
				 				<input <?php if (((is_array($_tmp=$this->_tpl_vars['service_key'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['sPost']['services']) : in_array($_tmp, $this->_tpl_vars['sPost']['services']))): ?>checked="checked"<?php endif; ?> style="margin: 2px 2px 8px 3px;" type="checkbox" value="<?php echo $this->_tpl_vars['service_key']; ?>
" name="services[]" /> <?php echo $this->_tpl_vars['service']; ?>

				 			</label></div>
				 			<?php if ($this->_foreach['services']['iteration'] == 4): ?>
				 			<div class="clear" style="height: 10px;"></div>
				 			<?php endif; ?>
					 	<?php endforeach; endif; unset($_from); ?>
					 	<div class="clear"></div>
				 	</div>
				</td>
			</tr>
			</table>
		</div>
		
		<div id="bsh_view_mode" class="hide">
			<table class="form">
			<tr>
				<td class="name"><span class="red">*</span><?php echo $this->_tpl_vars['lang']['bookmarks_view_mode']; ?>
</td>
				<td class="field">
					<select name="view_mode">
					 	<option value="0"><?php echo $this->_tpl_vars['lang']['select']; ?>
</option>
					 	<?php $_from = $this->_tpl_vars['view_modes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['modeF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['modeF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['mode_key'] => $this->_tpl_vars['mode_name']):
        $this->_foreach['modeF']['iteration']++;
?>
				 			<option <?php if ($this->_tpl_vars['sPost']['view_mode'] == $this->_tpl_vars['mode_key']): ?>selected="selected"<?php endif; ?> value="<?php echo $this->_tpl_vars['mode_key']; ?>
"><?php echo $this->_tpl_vars['mode_name']; ?>
</option>
					 	<?php endforeach; endif; unset($_from); ?>
				 	</select>
				</td>
			</tr>
			</table>
		</div>
		
		<div id="bsh_align" class="hide dynamic">
			<table class="form">
			<tr>
				<td class="name"><?php echo $this->_tpl_vars['lang']['bookmarks_align']; ?>
</td>
				<td class="field">
					<select name="align">
					 	<option value="0"><?php echo $this->_tpl_vars['lang']['select']; ?>
</option>
					 	<?php $_from = $this->_tpl_vars['aligns']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['align'] => $this->_tpl_vars['align_name']):
?>
					 		<option <?php if ($this->_tpl_vars['sPost']['align'] == $this->_tpl_vars['align']): ?>selected="selected"<?php endif; ?> value="<?php echo $this->_tpl_vars['align']; ?>
"><?php echo $this->_tpl_vars['align_name']; ?>
</option>
					 	<?php endforeach; endif; unset($_from); ?>
					</select>
				</td>
			</tr>
			</table>
		</div>
		
		<div id="bsh_color" class="hide">
			<table class="form">
			<tr>
				<td class="name"><?php echo $this->_tpl_vars['lang']['bookmarks_color']; ?>
</td>
				<td class="field">
					<input type="hidden" name="color" value="<?php if ($this->_tpl_vars['sPost']['color']): ?><?php echo $this->_tpl_vars['sPost']['color']; ?>
<?php else: ?>#89b0cb<?php endif; ?>" />
					<div id="colorSelector" class="colorSelector"><div style="background-color: #<?php if ($this->_tpl_vars['sPost']['color']): ?><?php echo $this->_tpl_vars['sPost']['color']; ?>
<?php else: ?>89b0cb<?php endif; ?>"></div></div>
	
					<script type="text/javascript">
					var bsh_color = '<?php if ($this->_tpl_vars['sPost']['color']): ?><?php echo $this->_tpl_vars['sPost']['color']; ?>
<?php else: ?>89b0cb<?php endif; ?>';
					<?php echo '
					
					$(document).ready(function(){
						
						$(\'#colorSelector\').ColorPicker({
							color: \'#\'+bsh_color,
							onShow: function (colpkr) {
								$(colpkr).fadeIn(500);
								return false;
							},
							onHide: function (colpkr) {
								$(colpkr).fadeOut(500);
								return false;
							},
							onChange: function (hsb, hex, rgb) {
								$(\'#colorSelector div\').css(\'backgroundColor\', \'#\' + hex);
								$(\'input[name=color]\').val(hex);
							}
						});
	
					});
					
					'; ?>

					</script>
				</td>
			</tr>
			</table>
		</div>
		
		<table class="form dynamic">
		<tr>
			<td class="name"><?php echo $this->_tpl_vars['lang']['use_block_design']; ?>
</td>
			<td class="field">
				<?php if ($this->_tpl_vars['sPost']['tpl'] == '1'): ?>
					<?php $this->assign('tpl_yes', 'checked="checked"'); ?>
				<?php elseif ($this->_tpl_vars['sPost']['tpl'] == '0'): ?>
					<?php $this->assign('tpl_no', 'checked="checked"'); ?>
				<?php else: ?>
					<?php $this->assign('tpl_no', 'checked="checked"'); ?>
				<?php endif; ?>
				<label><input <?php echo $this->_tpl_vars['tpl_yes']; ?>
 type="radio" name="tpl" value="1" /> <?php echo $this->_tpl_vars['lang']['yes']; ?>
</label>
				<label><input <?php echo $this->_tpl_vars['tpl_no']; ?>
 type="radio" name="tpl" value="0" /> <?php echo $this->_tpl_vars['lang']['no']; ?>
</label>
			</td>
		</tr>
		</table>
		
		<table class="form">
		<tr>
			<td class="name"><span class="red">*</span><?php echo $this->_tpl_vars['lang']['block_side']; ?>
</td>
			<td class="field">
				<select name="side">
					<option value=""><?php echo $this->_tpl_vars['lang']['select']; ?>
</option>
					<?php $_from = $this->_tpl_vars['l_block_sides']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['sides_f'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['sides_f']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['sKey'] => $this->_tpl_vars['block_side']):
        $this->_foreach['sides_f']['iteration']++;
?>
					<option <?php if ($this->_tpl_vars['sKey'] != 'left' && $this->_tpl_vars['sKey'] != 'right'): ?>class="dynamic"<?php endif; ?> value="<?php echo $this->_tpl_vars['sKey']; ?>
" <?php if ($this->_tpl_vars['sKey'] == $this->_tpl_vars['sPost']['side']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['block_side']; ?>
</option>
					<?php endforeach; endif; unset($_from); ?>
				</select>
			</td>
		</tr>
		
		<tr>
			<td class="name"><?php echo $this->_tpl_vars['lang']['show_on_pages']; ?>
</td>
			<td class="field" id="pages_obj">
				<fieldset class="light">
					<?php $this->assign('pages_phrase', 'admin_controllers+name+pages'); ?>
					<legend id="legend_pages" class="up"><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['pages_phrase']]; ?>
</legend>
					<div id="pages">
						<div id="pages_cont" <?php if (! empty ( $this->_tpl_vars['sPost']['show_on_all'] )): ?>style="display: none;"<?php endif; ?>>
							<?php $this->assign('bPages', $this->_tpl_vars['sPost']['pages']); ?>
							<table class="sTable" style="margin-bottom: 15px;">
							<tr>
								<td valign="top">
								<?php $_from = $this->_tpl_vars['pages']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['pagesF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['pagesF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['page']):
        $this->_foreach['pagesF']['iteration']++;
?>
								<?php $this->assign('pId', $this->_tpl_vars['page']['ID']); ?>
								<div style="padding: 2px 8px;">
									<input class="checkbox" <?php if (((is_array($_tmp=$this->_tpl_vars['page']['ID'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['sPost']['pages']) : in_array($_tmp, $this->_tpl_vars['sPost']['pages']))): ?>checked="checked"<?php endif; ?> id="page_<?php echo $this->_tpl_vars['page']['ID']; ?>
" type="checkbox" name="pages[<?php echo $this->_tpl_vars['page']['ID']; ?>
]" value="<?php echo $this->_tpl_vars['page']['ID']; ?>
" /> <label class="cLabel" for="page_<?php echo $this->_tpl_vars['page']['ID']; ?>
"><?php echo $this->_tpl_vars['page']['name']; ?>
</label>
								</div>
								<?php $this->assign('perCol', ((is_array($_tmp=$this->_foreach['pagesF']['total']/3)) ? $this->_run_mod_handler('ceil', true, $_tmp) : ceil($_tmp))); ?>
			
								<?php if ($this->_foreach['pagesF']['iteration'] % $this->_tpl_vars['perCol'] == 0): ?>
									</td>
									<td valign="top">
								<?php endif; ?>
								<?php endforeach; endif; unset($_from); ?>
								</td>
							</tr>
							</table>
						</div>
						
						<div class="grey_area" style="margin: 0 0 5px;">
							<label><input id="show_on_all" <?php if ($this->_tpl_vars['sPost']['show_on_all']): ?>checked="checked"<?php endif; ?> type="checkbox" name="show_on_all" value="true" /> <?php echo $this->_tpl_vars['lang']['sticky']; ?>
</label>
							<span id="pages_nav" <?php if ($this->_tpl_vars['sPost']['show_on_all']): ?>class="hide"<?php endif; ?>>
								<span onclick="$('#pages_cont input').attr('checked', true);" class="green_10"><?php echo $this->_tpl_vars['lang']['check_all']; ?>
</span>
								<span class="divider"> | </span>
								<span onclick="$('#pages_cont input').attr('checked', false);" class="green_10"><?php echo $this->_tpl_vars['lang']['uncheck_all']; ?>
</span>
							</span>
						</div>
					</div>
				</fieldset>
				
				<script type="text/javascript">
				<?php echo '
				
				$(document).ready(function(){
					$(\'#legend_pages\').click(function(){
						fieldset_action(\'pages\');
					});
					
					$(\'input#show_on_all\').click(function(){
						$(\'#pages_cont\').slideToggle();
						$(\'#pages_nav\').fadeToggle();
					});
					
					$(\'#pages input\').click(function(){
						if ( $(\'#pages input:checked\').length > 0 )
						{
							//$(\'#show_on_all\').prop(\'checked\', false);
						}
					});
				});
				
				'; ?>

				</script>
			</td>
		</tr>
		
		<tr>
			<td class="name"><span class="red">*</span><?php echo $this->_tpl_vars['lang']['status']; ?>
</td>
			<td class="field">
				<select name="status">
					<option value="active" <?php if ($this->_tpl_vars['sPost']['status'] == 'active'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['active']; ?>
</option>
					<option value="approval" <?php if ($this->_tpl_vars['sPost']['status'] == 'approval'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['approval']; ?>
</option>
				</select>
			</td>
		</tr>
		
		<tr>
			<td></td>
			<td class="field">
				<input type="submit" value="<?php if ($_GET['action'] == 'edit'): ?><?php echo $this->_tpl_vars['lang']['edit']; ?>
<?php else: ?><?php echo $this->_tpl_vars['lang']['add']; ?>
<?php endif; ?>" />
			</td>
		</tr>
		</table>
	</form>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'm_block_end.tpl') : smarty_modifier_cat($_tmp, 'm_block_end.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<!-- add new block end -->
	
	<!-- select category action -->
	<script type="text/javascript">
	
	<?php echo '
	function cat_chooser(cat_id){
		return true;
	}
	'; ?>

	
	<?php if ($_POST['parent_id']): ?>
		cat_chooser('<?php echo $_POST['parent_id']; ?>
');
	<?php elseif ($_GET['parent_id']): ?>
		cat_chooser('<?php echo $_GET['parent_id']; ?>
');
	<?php endif; ?>

	</script>
	<!-- select category action end -->
	
	<script type="text/javascript">
	<?php echo '
	function loadLevel(id)
	{
		if ($(\'#cat_\'+id).attr(\'class\').split(\' \').indexOf(\'working\') < 0)
		{
			if ($(\'#cat_\'+id).attr(\'class\').split(\' \').indexOf(\'expanded\') < 0)
			{
				$(\'#cat_loading_\'+id).fadeIn(\'notaml\');
				$(\'#cat_\'+id).removeClass(\'cat_item_plus\').addClass(\'cat_item_minus\').addClass(\'working\');
				xajax_getCatLevel(id, false, \'category_level_checkbox.tpl\');
			}
			else
			{
				if ($(\'#parent_\'+id).css(\'display\') == \'none\')
				{
					$(\'#parent_\'+id).slideDown(\'slow\');
					$(\'#cat_\'+id).removeClass(\'cat_item_plus\').addClass(\'cat_item_minus\');
				}
				else
				{
					$(\'#parent_\'+id).slideUp(\'normal\');
					$(\'#cat_\'+id).removeClass(\'cat_item_minus\').addClass(\'cat_item_plus\');
				}
			}
		}
	}
	'; ?>

	
	<?php if ($this->_tpl_vars['exp_cats']): ?>
		xajax_openTree('<?php echo $this->_tpl_vars['exp_cats']; ?>
', 'category_level_checkbox.tpl');
	<?php endif; ?>
	
	</script>
	
	<!-- additional JS -->
	<?php if ($this->_tpl_vars['sPost']['type']): ?>
	<script type="text/javascript">
	<?php echo '
	$(document).ready(function(){
			block_banner(\'btype_'; ?>
<?php echo $this->_tpl_vars['sPost']['type']; ?>
<?php echo '\', \'#btypes div\');
		}
	);
	
	'; ?>

	</script>
	<?php endif; ?>
	<!-- additional JS end -->

<?php else: ?>

	<!-- grid -->
	<div id="grid"></div>
	<script type="text/javascript">//<![CDATA[
	var listingGroupsGrid;
	
	<?php echo '
	$(document).ready(function(){
		
		bookmarkGrid = new gridObj({
			key: \'bookmarks\',
			id: \'grid\',
			ajaxUrl: rlPlugins + \'bookmarks/admin/bookmarks.inc.php?q=ext\',
			defaultSortField: \'Name\',
			title: lang[\'bookmarks_ext_caption\'],
			remoteSortable: false,
			fields: [
				{name: \'Name\', mapping: \'Name\', type: \'string\'},
				{name: \'Key\', mapping: \'Key\', typr: \'string\'},
				{name: \'Status\', mapping: \'Status\', type: \'string\'},
				{name: \'ID\', mapping: \'ID\'},
				{name: \'Type\', mapping: \'Type\', type: \'string\'},
				{name: \'Align\', mapping: \'Align\', type: \'string\'},
				{name: \'Tpl\', mapping: \'Tpl\', type: \'string\'}
			],
			columns: [
				{
					header: lang[\'ext_name\'],
					dataIndex: \'Name\',
					width: 20,
					id: \'rlExt_item_bold\'
				},{
					header: lang[\'ext_type\'],
					dataIndex: \'Type\',
					width: 20,
					id: \'rlExt_item\'
				},{
					header: lang[\'bsh_ext_align\'],
					dataIndex: \'Align\',
					width: 10,
					editor: new Ext.form.ComboBox({
						store: [
							[\'left\', lang[\'bsh_ext_left\']],
							[\'center\', lang[\'bsh_ext_center\']],
							[\'right\', lang[\'bsh_ext_right\']]
						],
						displayField: \'value\',
						valueField: \'key\',
						typeAhead: true,
						mode: \'local\',
						triggerAction: \'all\',
						selectOnFocus:true
					}),
					renderer: function(val){
						return \'<span ext:qtip="\'+lang[\'ext_click_to_edit\']+\'">\'+val+\'</span>\';
					}
				},{
					header: lang[\'ext_block_style\'],
					dataIndex: \'Tpl\',
					width: 10,
					editor: new Ext.form.ComboBox({
						store: [
							[\'1\', lang[\'ext_yes\']],
							[\'0\', lang[\'ext_no\']]
						],
						displayField: \'value\',
						valueField: \'key\',
						typeAhead: true,
						mode: \'local\',
						triggerAction: \'all\',
						selectOnFocus:true
					}),
					renderer: function(val){
						return \'<span ext:qtip="\'+lang[\'ext_click_to_edit\']+\'">\'+val+\'</span>\';
					}
				},{
					header: lang[\'ext_status\'],
					dataIndex: \'Status\',
					fixed: true,
					width: 100,
					editor: new Ext.form.ComboBox({
						store: [
							[\'active\', lang[\'ext_active\']],
							[\'approval\', lang[\'ext_approval\']]
						],
						displayField: \'value\',
						valueField: \'key\',
						typeAhead: true,
						mode: \'local\',
						triggerAction: \'all\',
						selectOnFocus:true
					})
				},{
					header: lang[\'ext_actions\'],
					width: 70,
					fixed: true,
					dataIndex: \'ID\',
					sortable: false,
					renderer: function(data) {
						var out = "<center>";
						out += "<a href=\'"+rlUrlHome+"index.php?controller="+controller+"&action=edit&item="+data+"\'><img class=\'edit\' ext:qtip=\'"+lang[\'ext_edit\']+"\' src=\'"+rlUrlHome+"img/blank.gif\' /></a>";
						out += "<img class=\'remove\' ext:qtip=\'"+lang[\'ext_delete\']+"\' src=\'"+rlUrlHome+"img/blank.gif\' onClick=\'rlConfirm( \\""+lang[\'ext_notice_\'+delete_mod]+"\\", \\"xajax_deleteBookmark\\", \\""+Array(data)+"\\" )\' />";
						out += "</center>";
						
						return out;
					}
				}
			]
		});
				
		bookmarkGrid.init();
		grid.push(bookmarkGrid.grid);
		
	});
	'; ?>

	//]]>
	</script>
	<!-- grid end -->
	
<?php endif; ?>

<!-- bookmarks tpl end -->