<?php /* Smarty version 2.6.26, created on 2017-04-13 04:48:42
         compiled from /home3/bargaip4/public_html/gevimmo/plugins/autoRegPrevent/admin/auto_reg_prevent.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/autoRegPrevent/admin/auto_reg_prevent.tpl', 13, false),)), $this); ?>
<!-- auto reg prevent -->

<!-- navigation bar -->
<div id="nav_bar"><?php echo '<a href="javascript:void(0)" onclick="show(\'add_prevent\', \'#action_blocks div\');" class="button_bar"><span class="left"></span><span class="center_add">'; ?><?php echo $this->_tpl_vars['lang']['add']; ?><?php echo '</span><span class="right"></span></a>'; ?>
</div>
<!-- navigation bar end -->

<div id="action_blocks">
	<div id="add_prevent" class="hide">
		<?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('block_caption' => $this->_tpl_vars['lang']['autoRegPrevent_addItem'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
		<form onsubmit="addSpamers();return false;" action="" method="post">
		<table class="form">
		<tr>
			<td class="name"><?php echo $this->_tpl_vars['lang']['username']; ?>
</td>
			<td class="field">
				<input type="text" id="arp_username" style="width: 200px;" maxlength="60" />
			</td>
		</tr>
		<tr>
			<td class="name"><?php echo $this->_tpl_vars['lang']['mail']; ?>
</td>
			<td class="field">
				<input type="text" id="arp_mail" style="width: 200px;" maxlength="60" />
			</td>
		</tr>
		<tr>
			<td class="name"><?php echo $this->_tpl_vars['lang']['autoRegPrevent_ext_ip']; ?>
</td>
			<td class="field">
				<input type="text" id="arp_ip" style="width: 200px;" maxlength="60" />
			</td>
		</tr>
		<tr>
			<td></td>
			<td class="field">
				<input type="submit" name="item_submit" value="<?php echo $this->_tpl_vars['lang']['add']; ?>
" />
				<a onclick="$('#add_prevent').slideUp('normal')" href="javascript:void(0)" class="cancel"><?php echo $this->_tpl_vars['lang']['close']; ?>
</a>
			</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);
 ?>

		<script type="text/javascript">
		<?php echo '
			var addSpamers = function() {
				var username = $.trim($(\'input#arp_username\').val());
				var email = $.trim($(\'input#arp_mail\').val());
				var ip = $.trim($(\'input#arp_ip\').val());

				if ( username == \'\' && email == \'\' && ip == \'\' ) {
					printMessage(\'error\', lang[\'autoRegPrevent_fillOutNotice\']);
				}
				else {
					var ipPattent = /[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}/;
					if ( ip && !ipPattent.test(ip) ) {
						printMessage(\'error\', lang[\'autoRegPrevent_invalidIp\']);
					}
					else {
						$(\'input[name=item_submit]\').val(lang[\'ext_loading\']);
						xajax_addSpamers(username, email, ip);
					}
				}
			}
		'; ?>

		</script>
	</div>
</div>

<div id="grid"></div>
<script type="text/javascript">//<![CDATA[
var autoRegPrevent;

<?php echo '
$(document).ready(function(){
	autoRegPrevent = new gridObj({
		key: \'autoRegPrevent\',
		id: \'grid\',
		ajaxUrl: rlPlugins + \'autoRegPrevent/admin/auto_reg_prevent.inc.php?q=ext\',
		defaultSortField: \'Date\',
		title: lang[\'autoRegPrevent_ext_manager\'],
		fields: [
			{name: \'ID\', mapping: \'ID\'},
			{name: \'Username\', mapping: \'Username\'},
			{name: \'Mail\', mapping: \'Mail\'},
			{name: \'IP\', mapping: \'IP\'},
			{name: \'Reason\', mapping: \'Reason\'},
			{name: \'Date\', mapping: \'Date\', type: \'date\', dateFormat: \'Y-m-d H:i:s\'},
			{name: \'Status\', mapping: \'Status\'}
		],
		columns: [
			{
				header: lang[\'ext_username\'],
				dataIndex: \'Username\',
				width: 50
			},{
				header: lang[\'ext_email\'],
				dataIndex: \'Mail\',
				width: 50
			},{
				header: \''; ?>
<?php echo $this->_tpl_vars['lang']['autoRegPrevent_ext_ip']; ?>
<?php echo '\',
				dataIndex: \'IP\',
				width: 30
			},{
				header: lang[\'autoRegPrevent_ext_reason\'],
				dataIndex: \'Reason\',
				width: 30,
				id: \'rlExt_item\'
			},{
				header: lang[\'autoRegPrevent_ext_date_reg\'],
				dataIndex: \'Date\',
				width: 20,
				renderer: Ext.util.Format.dateRenderer(rlDateFormat.replace(/%/g, \'\').replace(\'b\', \'M\'))
			},{
				header: lang[\'ext_status\'],
				dataIndex: \'Status\',
				width: 20,
				editor: new Ext.form.ComboBox({
					'; ?>

					store: [
						['block', '<?php echo $this->_tpl_vars['lang']['autoRegPrevent_status_block']; ?>
'],
						['unblock', '<?php echo $this->_tpl_vars['lang']['autoRegPrevent_status_unblock']; ?>
']
					],
					<?php echo '
					mode: \'local\',
					typeAhead: true,
					triggerAction: \'all\',
					selectOnFocus: true
				}),
				renderer: function(val) {
					return \'<div ext:qtip="\'+lang[\'ext_click_to_edit\']+\'">\'+val+\'</div>\';
				}
			}
		]
	});

	autoRegPrevent.init();
	grid.push(autoRegPrevent.grid);
});
'; ?>

//]]>
</script>

<!-- auto reg prevent end -->