<?php /* Smarty version Smarty-3.1.19, created on 2020-06-11 14:00:13
         compiled from "template__system/admin_admin:/home/myjobsnearme/public_html/templates/_system/admin/payment/add_user_product.tpl" */ ?>
<?php /*%%SmartyHeaderCode:11999870775ee22adde5a6f5-47066766%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '6565a5472deec420bcd1d7817827147c687db5e3' => 
    array (
      0 => 'template__system/admin_admin:/home/myjobsnearme/public_html/templates/_system/admin/payment/add_user_product.tpl',
      1 => 1483999131,
      2 => 'template__system/admin_admin',
    ),
  ),
  'nocache_hash' => '11999870775ee22adde5a6f5-47066766',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'contract_added' => 0,
    'errors' => 0,
    'error_code' => 0,
    'GLOBALS' => 0,
    'products' => 0,
    'product' => 0,
    'user_sid' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5ee22addef3e43_50527505',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5ee22addef3e43_50527505')) {function content_5ee22addef3e43_50527505($_smarty_tpl) {?><script type="text/javascript">
	function formSubmit() {
		var options = {
		  target: "#user-product .modal-body",
		  url:  $("#addProductForm").attr("action")
		};

		$("#addProductForm").ajaxSubmit(options);

		return false;
	}

	<?php if ($_smarty_tpl->tpl_vars['contract_added']->value==1) {?>
		$("#user-produc").modal('hide');
		parent.document.location.reload();
	<?php }?>
</script>

<?php if ($_smarty_tpl->tpl_vars['errors']->value) {?>
    <?php  $_smarty_tpl->tpl_vars['error_message'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['error_message']->_loop = false;
 $_smarty_tpl->tpl_vars['error_code'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['errors']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['error_message']->key => $_smarty_tpl->tpl_vars['error_message']->value) {
$_smarty_tpl->tpl_vars['error_message']->_loop = true;
 $_smarty_tpl->tpl_vars['error_code']->value = $_smarty_tpl->tpl_vars['error_message']->key;
?>
		<p class="error">
			<?php if ($_smarty_tpl->tpl_vars['error_code']->value=='UNDEFINED_PRODUCT_SID') {?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Product ID is not defined<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
<?php }?>
		</p>
	<?php } ?>
<?php }?>

<form action="<?php echo $_smarty_tpl->tpl_vars['GLOBALS']->value['site_url'];?>
/add-user-product/" method="POST" id="addProductForm" onsubmit='return formSubmit();'>
	<?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Select Product:<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

	<select name="product_sid" id="product_sid">
		<?php  $_smarty_tpl->tpl_vars['product'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['product']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['products']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['product']->key => $_smarty_tpl->tpl_vars['product']->value) {
$_smarty_tpl->tpl_vars['product']->_loop = true;
?>
			<option value="<?php echo $_smarty_tpl->tpl_vars['product']->value['sid'];?>
"><?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['name'], ENT_QUOTES, 'UTF-8', true);?>
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
</option>
		<?php } ?>
	</select>
	<br/>
	<input type="hidden" name="user_sid" value="<?php echo $_smarty_tpl->tpl_vars['user_sid']->value;?>
" />
	<input type="hidden" name="action" value="add_product" />
	<input type="submit" id="add" name="add" value="<?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Add<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
" class="btn btn--secondary" />
</form>
<?php }} ?>
