function content_55d2f402ecd844_39235354($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } fn_preload_lang_vars(array('dear', 'update_profile_notification_header')); echo $_smarty_tpl->getSubTemplate("common/letter_header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->__("dear"); ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['firstname']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['user_data']->value['firstname'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars(mb_strtolower(fn_get_user_type_description($_smarty_tpl->tpl_vars['user_data']->value['user_type']), 'UTF-8'), ENT_QUOTES, 'UTF-8'); } ?> ,<br><br> <?php echo $_smarty_tpl->__("update_profile_notification_header"); ?> <br><br> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:update_profile")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:update_profile"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:update_profile"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->getSubTemplate("profiles/profiles_info.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("common/letter_footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); }
function content_55d2f3b104f8b0_98025960($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } if (!is_callable('smarty_modifier_date_format')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.date_format.php'; } fn_preload_lang_vars(array('id', 'username', 'person_name', 'email', 'registered', 'type', 'status', 'view', 'administrator', 'vendor_administrator', 'customer', 'affiliate', 'view_all_orders', 'act_on_behalf', 'edit', 'delete', 'notify_user', 'no_data', 'export_selected', 'users', 'add_user')); if (fn_allowed_for("MULTIVENDOR")) { ?> <?php $_smarty_tpl->tpl_vars["no_hide_input"] = new Smarty_variable("cm-no-hide-input", null, 0); } ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null); ob_start(); ?> <?php $_smarty_tpl->tpl_vars["c_icon"] = new Smarty_variable("<i class=\"exicon-" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev'] . "\"></i>", null, 0); $_smarty_tpl->tpl_vars["c_dummy"] = new Smarty_variable("<i class=\"exicon-dummy\"></i>", null, 0); ?> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post" name="userlist_form" id="userlist_form" class="<?php if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && !fn_allowed_for("ULTIMATE")) { ?> cm-hide-inputs<?php } ?> "> <input type="hidden" name="fake" value="1" /> <input type="hidden" name="user_type" value="<?php echo htmlspecialchars($_REQUEST['user_type'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('save_current_page' => true, 'save_current_url' => true, 'div_id' => $_REQUEST['content_id']), 0); ?> <?php $_smarty_tpl->tpl_vars["c_url"] = new Smarty_variable(fn_query_remove($_smarty_tpl->tpl_vars['config']->value['current_url'], "sort_by", "sort_order"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["rev"] = new Smarty_variable(($tmp = @$_REQUEST['content_id']) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['users']->value) { ?> <table width="100%" class="table table-middle"> <thead> <tr> <th width="1%" class="center <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php echo $_smarty_tpl->getSubTemplate("common/check_items.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </th> <th width="3%" class="nowrap"><a class="cm-ajax" href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=id&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8'); ?> ><?php echo $_smarty_tpl->__("id"); if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "id") { echo $_smarty_tpl->tpl_vars['c_icon']->value; } else { echo $_smarty_tpl->tpl_vars['c_dummy']->value; } ?> </a></th> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['use_email_as_login'] != "Y") { ?> <th width="18%"><a class="cm-ajax" href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=username&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8'); ?> ><?php echo $_smarty_tpl->__("username"); if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "username") { echo $_smarty_tpl->tpl_vars['c_icon']->value; } else { echo $_smarty_tpl->tpl_vars['c_dummy']->value; } ?> </a></th> <?php } ?> <th width="18%"><a class="cm-ajax" href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=name&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8'); ?> ><?php echo $_smarty_tpl->__("person_name"); if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "name") { echo $_smarty_tpl->tpl_vars['c_icon']->value; } else { echo $_smarty_tpl->tpl_vars['c_dummy']->value; } ?> </a></th> <th width="20%"><a class="cm-ajax" href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=email&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8'); ?> ><?php echo $_smarty_tpl->__("email"); if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "email") { echo $_smarty_tpl->tpl_vars['c_icon']->value; } else { echo $_smarty_tpl->tpl_vars['c_dummy']->value; } ?> </a></th> <th width="16%"><a class="cm-ajax" href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=date&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8'); ?> ><?php echo $_smarty_tpl->__("registered"); if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "date") { echo $_smarty_tpl->tpl_vars['c_icon']->value; } else { echo $_smarty_tpl->tpl_vars['c_dummy']->value; } ?> </a></th> <th><a class="cm-ajax" href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=type&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8'); ?> ><?php echo $_smarty_tpl->__("type"); if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "type") { echo $_smarty_tpl->tpl_vars['c_icon']->value; } else { echo $_smarty_tpl->tpl_vars['c_dummy']->value; } ?> </a></th> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:manage_header")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:manage_header"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:manage_header"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <th class="right"> </th> <th width="10%" class="right"><a class="cm-ajax" href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=status&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8'); ?> ><?php echo $_smarty_tpl->__("status"); if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "status") { echo $_smarty_tpl->tpl_vars['c_icon']->value; } else { echo $_smarty_tpl->tpl_vars['c_dummy']->value; } ?> </a></th> </tr> </thead> <?php $_smarty_tpl->tpl_vars['user'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['user']->_loop = false; $_from = $_smarty_tpl->tpl_vars['users']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['user']->key => $_smarty_tpl->tpl_vars['user']->value) { $_smarty_tpl->tpl_vars['user']->_loop = true; ?> <?php $_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(fn_allow_save_object($_smarty_tpl->tpl_vars['user']->value, "users"), null, 0); ?> <?php if (!$_smarty_tpl->tpl_vars['allow_save']->value && !defined("RESTRICTED_ADMIN") && $_smarty_tpl->tpl_vars['auth']->value['is_root'] != 'Y') { ?> <?php $_smarty_tpl->tpl_vars["link_text"] = new Smarty_variable($_smarty_tpl->__("view"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["popup_additional_class"] = new Smarty_variable('', null, 0); } elseif ($_smarty_tpl->tpl_vars['allow_save']->value || defined("RESTRICTED_ADMIN") || $_smarty_tpl->tpl_vars['auth']->value['is_root'] == 'Y') { ?> <?php $_smarty_tpl->tpl_vars["link_text"] = new Smarty_variable('', null, 0); ?> <?php $_smarty_tpl->tpl_vars["popup_additional_class"] = new Smarty_variable("cm-no-hide-input", null, 0); } else { ?> <?php $_smarty_tpl->tpl_vars["popup_additional_class"] = new Smarty_variable('', null, 0); ?> <?php $_smarty_tpl->tpl_vars["link_text"] = new Smarty_variable('', null, 0); } if (!fn_allowed_for("ULTIMATE")) { ?> <tr class="cm-row-status-<?php echo htmlspecialchars(mb_strtolower($_smarty_tpl->tpl_vars['user']->value['status'], 'UTF-8'), ENT_QUOTES, 'UTF-8'); ?> "> <?php } ?> <?php if (fn_allowed_for("ULTIMATE")) { ?> <tr class="cm-row-status-<?php echo htmlspecialchars(mb_strtolower($_smarty_tpl->tpl_vars['user']->value['status'], 'UTF-8'), ENT_QUOTES, 'UTF-8'); if (!$_smarty_tpl->tpl_vars['allow_save']->value || $_smarty_tpl->tpl_vars['user']->value['user_id'] == $_SESSION['auth']['user_id']) { ?> cm-hide-inputs<?php } ?> "> <?php } ?> <td class="center <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input']->value, ENT_QUOTES, 'UTF-8'); ?> "> <input type="checkbox" name="user_ids[]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['user_id'], ENT_QUOTES, 'UTF-8'); ?> " class="checkbox cm-item" /></td> <td><a class="row-status" href="<?php echo htmlspecialchars(fn_url("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'] . "&user_type=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_type']), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['user_id'], ENT_QUOTES, 'UTF-8'); ?> </a></td> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['use_email_as_login'] != "Y") { ?> <td><a class="row-status" href="<?php echo htmlspecialchars(fn_url("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'] . "&user_type=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_type']), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['user_login'], ENT_QUOTES, 'UTF-8'); ?> </a></td> <?php } ?> <td class="row-status"><?php if ($_smarty_tpl->tpl_vars['user']->value['firstname'] || $_smarty_tpl->tpl_vars['user']->value['lastname']) { ?> <a href="<?php echo htmlspecialchars(fn_url("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'] . "&user_type=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_type']), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['lastname'], ENT_QUOTES, 'UTF-8'); ?> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['firstname'], ENT_QUOTES, 'UTF-8'); ?> </a><?php } else { ?> -<?php } if ($_smarty_tpl->tpl_vars['user']->value['company_id']) { echo $_smarty_tpl->getSubTemplate("views/companies/components/company_name.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object' => $_smarty_tpl->tpl_vars['user']->value), 0); } ?> </td> <td><a class="row-status" href="mailto:<?php echo htmlspecialchars(rawurlencode($_smarty_tpl->tpl_vars['user']->value['email']), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['email'], ENT_QUOTES, 'UTF-8'); ?> </a></td> <td class="row-status"><?php echo htmlspecialchars(smarty_modifier_date_format($_smarty_tpl->tpl_vars['user']->value['timestamp'], (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['date_format'] . ", " . (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['time_format']), ENT_QUOTES, 'UTF-8'); ?> </td> <td class="row-status"><?php if ($_smarty_tpl->tpl_vars['user']->value['user_type'] == "A") { echo $_smarty_tpl->__("administrator"); } elseif ($_smarty_tpl->tpl_vars['user']->value['user_type'] == "V") { echo $_smarty_tpl->__("vendor_administrator"); } elseif ($_smarty_tpl->tpl_vars['user']->value['user_type'] == "C") { echo $_smarty_tpl->__("customer"); } elseif ($_smarty_tpl->tpl_vars['user']->value['user_type'] == "P") { echo $_smarty_tpl->__("affiliate"); } ?> </td> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:manage_data")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:manage_data"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:manage_data"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <td class="right nowrap"> <?php $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null); ob_start(); ?> <?php $_smarty_tpl->tpl_vars['list_extra_links'] = new Smarty_variable(false, null, 0); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:list_extra_links")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:list_extra_links"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['user']->value['user_type'] == "C") { ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("view_all_orders"), 'href' => "orders.manage?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'])); ?> </li> <?php $_smarty_tpl->tpl_vars['list_extra_links'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if (fn_user_need_login($_smarty_tpl->tpl_vars['user']->value['user_type']) && (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] == $_smarty_tpl->tpl_vars['auth']->value['company_id'] && fn_check_permission_act_as_user()) && $_smarty_tpl->tpl_vars['user']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] && !($_smarty_tpl->tpl_vars['user']->value['user_type'] == $_smarty_tpl->tpl_vars['auth']->value['user_type'] && $_smarty_tpl->tpl_vars['user']->value['is_root'] == 'Y' && (!$_smarty_tpl->tpl_vars['user']->value['company_id'] || $_smarty_tpl->tpl_vars['user']->value['company_id'] == $_smarty_tpl->tpl_vars['auth']->value['company_id']))) { ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'target' => "_blank", 'text' => __("act_on_behalf"), 'href' => "profiles.act_as_user?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'])); ?> </li> <?php $_smarty_tpl->tpl_vars['list_extra_links'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php $_smarty_tpl->tpl_vars["return_current_url"] = new Smarty_variable(rawurlencode($_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:list_extra_links"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php if ($_smarty_tpl->tpl_vars['list_extra_links']->value) { ?> <li class="divider"></li> <?php } ?> <?php if ($_REQUEST['user_type']) { ?> <?php $_smarty_tpl->tpl_vars["user_edit_link"] = new Smarty_variable("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'] . "&user_type=" . (string) $_REQUEST['user_type'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["user_edit_link"] = new Smarty_variable("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'] . "&user_type=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_type'], null, 0); ?> <?php } ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("edit"), 'href' => $_smarty_tpl->tpl_vars['user_edit_link']->value)); ?> </li> <?php $_smarty_tpl->_capture_stack[0][] = array("tools_delete", null, null); ob_start(); ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete"), 'class' => "cm-confirm", 'href' => "profiles.delete?user_id=" . (string) $_smarty_tpl->tpl_vars['user']->value['user_id'] . "&redirect_url=" . (string) $_smarty_tpl->tpl_vars['return_current_url']->value)); ?> </li> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if ($_smarty_tpl->tpl_vars['user']->value['user_id'] != $_SESSION['auth']['user_id']) { ?> <?php if (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] && !($_smarty_tpl->tpl_vars['user']->value['user_type'] == "A" && $_smarty_tpl->tpl_vars['user']->value['is_root'] == "Y")) { ?> <?php echo Smarty::$_smarty_vars['capture']['tools_delete']; ?> <?php } elseif ($_smarty_tpl->tpl_vars['allow_save']->value) { ?> <?php if (fn_allowed_for("MULTIVENDOR") && $_smarty_tpl->tpl_vars['user']->value['user_type'] == "V" && $_smarty_tpl->tpl_vars['user']->value['is_root'] == "N") { ?> <?php echo Smarty::$_smarty_vars['capture']['tools_delete']; ?> <?php } ?> <?php if (fn_allowed_for("ULTIMATE")) { ?> <?php echo Smarty::$_smarty_vars['capture']['tools_delete']; ?> <?php } ?> <?php } ?> <?php } ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <div class="hidden-tools"> <?php smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list'])); ?> </div> </td> <td class="right"> <input type="hidden" name="user_types[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['user_id'], ENT_QUOTES, 'UTF-8'); ?> ]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['user_type'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php if ($_smarty_tpl->tpl_vars['user']->value['is_root'] == "Y" && ($_smarty_tpl->tpl_vars['user']->value['user_type'] == "A" || $_smarty_tpl->tpl_vars['user']->value['user_type'] == "V" && $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['runtime']->value['company_id'] == $_smarty_tpl->tpl_vars['user']->value['company_id'])) { ?> <?php $_smarty_tpl->tpl_vars["u_id"] = new Smarty_variable('', null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["u_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['user']->value['user_id'], null, 0); ?> <?php } ?> <?php $_smarty_tpl->tpl_vars["non_editable"] = new Smarty_variable(false, null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['user']->value['is_root'] == "Y" && $_smarty_tpl->tpl_vars['user']->value['user_type'] == $_smarty_tpl->tpl_vars['auth']->value['user_type'] && (!$_smarty_tpl->tpl_vars['user']->value['company_id'] || $_smarty_tpl->tpl_vars['user']->value['company_id'] == $_smarty_tpl->tpl_vars['auth']->value['company_id']) || $_smarty_tpl->tpl_vars['user']->value['user_id'] == $_smarty_tpl->tpl_vars['auth']->value['user_id'] || fn_allowed_for("MULTIVENDOR") && $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && ($_smarty_tpl->tpl_vars['user']->value['user_type'] == 'C' || $_smarty_tpl->tpl_vars['user']->value['company_id'] && $_smarty_tpl->tpl_vars['user']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id'])) { ?> <?php $_smarty_tpl->tpl_vars["non_editable"] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/select_popup.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['u_id']->value, 'status' => $_smarty_tpl->tpl_vars['user']->value['status'], 'hidden' => '', 'update_controller' => "profiles", 'notify' => true, 'notify_text' => __("notify_user"), 'popup_additional_class' => (string) $_smarty_tpl->tpl_vars['popup_additional_class']->value . " dropleft", 'non_editable' => $_smarty_tpl->tpl_vars['non_editable']->value), 0); ?> </td> </tr> <?php } ?> </table> <?php } else { ?> <p class="no-items"><?php echo $_smarty_tpl->__("no_data"); ?> </p> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('div_id' => $_REQUEST['content_id']), 0); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null); ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['users']->value) { ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null); ob_start(); ?> <?php if (fn_allowed_for("ULTIMATE") || !$_smarty_tpl->tpl_vars['runtime']->value['company_id']) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:list_tools")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:list_tools"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("export_selected"), 'dispatch' => "dispatch[profiles.export_range]", 'form' => "userlist_form")); ?> </li> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:list_tools"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "delete_selected", 'dispatch' => "dispatch[profiles.m_delete]", 'form' => "userlist_form")); ?> </li> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list'])); ?> <?php } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> </form> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("adv_buttons", null, null); ob_start(); ?> <?php if ($_REQUEST['user_type']) { ?> <?php $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable(fn_get_user_type_description($_REQUEST['user_type'], true), null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_smarty_tpl->__("users"), null, 0); ?> <?php } ?> <?php if ($_REQUEST['user_type']) { ?> <?php if (!($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("MULTIVENDOR") && ($_REQUEST['user_type'] == 'C' || $_smarty_tpl->tpl_vars['auth']->value['is_root'] != 'Y'))) { ?> <a class="btn cm-tooltip" href="<?php echo htmlspecialchars(fn_url("profiles.add?user_type=" . (string) $_REQUEST['user_type']), ENT_QUOTES, 'UTF-8'); ?> " title="<?php echo $_smarty_tpl->__("add_user"); ?> "><i class="icon-plus"></i></a> <?php } ?> <?php } else { ?> <?php if (!empty($_smarty_tpl->tpl_vars['user_types']->value)) { ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null); ob_start(); ?> <?php $_smarty_tpl->tpl_vars["_p"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["_p"]->_loop = false; $_smarty_tpl->tpl_vars["_k"] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['user_types']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["_p"]->key => $_smarty_tpl->tpl_vars["_p"]->value) { $_smarty_tpl->tpl_vars["_p"]->_loop = true; $_smarty_tpl->tpl_vars["_k"]->value = $_smarty_tpl->tpl_vars["_p"]->key; ?> <?php if (!($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("MULTIVENDOR") && ($_REQUEST['user_type'] == 'C' || $_smarty_tpl->tpl_vars['auth']->value['is_root'] != 'Y'))) { ?> <li><a href="<?php echo htmlspecialchars(fn_url("profiles.add?user_type=" . (string) $_smarty_tpl->tpl_vars['_k']->value), ENT_QUOTES, 'UTF-8'); ?> "><?php echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['_p']->value); ?> </a></li> <?php } ?> <?php } ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list'], 'no_caret' => true, 'icon' => "icon-plus", 'placement' => "right")); ?> <?php } ?> <?php } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("sidebar", null, null); ob_start(); ?> <?php echo $_smarty_tpl->getSubTemplate("common/saved_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "profiles.manage", 'view_type' => "users"), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/users_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "profiles.manage"), 0); ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => $_smarty_tpl->tpl_vars['_title']->value, 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'content_id' => "manage_users"), 0); }
} exit; } } if ($mode == 'manage') { if (Registry::get('runtime.company_id') && !empty($_REQUEST['user_type']) && ($_REQUEST['user_type'] == 'P' || $_REQUEST['user_type'] == 'A' && !fn_check_permission_manage_profiles('A'))) { return array(CONTROLLER_STATUS_DENIED); } if (!empty($_REQUEST['user_type']) && $_REQUEST['user_type'] == 'V' && fn_allowed_for('ULTIMATE')) { return array(CONTROLLER_STATUS_NO_PAGE); } list($users, $search) = fn_get_users($_REQUEST, $auth, Registry::get('settings.Appearance.admin_elements_per_page')); Tygh::$app['view']->assign('users', $users); Tygh::$app['view']->assign('search', $search); if (!empty($search['user_type'])) { Tygh::$app['view']->assign('user_type_description', fn_get_user_type_description($search['user_type'])); } $user_types = fn_get_user_types(); if (Registry::get('runtime.company_id') && fn_allowed_for("MULTIVENDOR")) { unset($user_types['C']); } if (fn_is_restricted_admin(array('user_type' => 'V'))) { unset($user_types['V']); } Tygh::$app['view']->assign('user_types', $user_types); Tygh::$app['view']->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE)); Tygh::$app['view']->assign('states', fn_get_all_states()); Tygh::$app['view']->assign('usergroups', fn_get_usergroups(array('status' => array('A', 'H')), DESCR_SL)); } elseif ($mode == 'act_as_user' || $mode == 'view_product_as_user') { if (fn_is_restricted_admin($_REQUEST) == true) { return array(CONTROLLER_STATUS_DENIED);
function content_55e61e6bb11d10_64552035($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php'; } fn_preload_lang_vars(array('contact_information', 'user_profile_info', 'text_multiprofile_notice', 'billing_address', 'shipping_address', 'shipping_address', 'usergroup', 'status', 'no_data', 'allow_api_access', 'api_key', 'new_profile', 'editing_profile', 'editing_profile', 'editing_profile', 'view_all_orders', 'act_on_behalf', 'delete', 'create', 'notify_user')); if ($_smarty_tpl->tpl_vars['user_data']->value) { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['user_data']->value['user_id'], null, 0); } else { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0); } ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <form name="profile_form" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post" class="form-horizontal form-edit form-table <?php if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['id']->value && $_smarty_tpl->tpl_vars['user_data']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['id']->value != $_smarty_tpl->tpl_vars['auth']->value['user_id'] || $_smarty_tpl->tpl_vars['hide_inputs']->value) { ?> cm-hide-inputs<?php } ?> "> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null); ob_start(); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null); ob_start(); ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(false, null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['user_type'] == $_smarty_tpl->tpl_vars['auth']->value['user_type'] && $_smarty_tpl->tpl_vars['user_data']->value['is_root'] == 'Y' && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] && (!$_smarty_tpl->tpl_vars['user_data']->value['company_id'] || $_smarty_tpl->tpl_vars['user_data']->value['company_id'] == $_smarty_tpl->tpl_vars['auth']->value['company_id'])) { ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if (fn_allowed_for("ULTIMATE") && !fn_allow_save_object($_smarty_tpl->tpl_vars['user_data']->value, "users") && $_smarty_tpl->tpl_vars['id']->value && !fn_ult_check_users_usergroup_companies($_smarty_tpl->tpl_vars['id']->value) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id']) { ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if (fn_allowed_for("MULTIVENDOR") && (!fn_allow_save_object($_smarty_tpl->tpl_vars['user_data']->value, "users") || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && ($_REQUEST['user_type'] == 'C' || fn_string_not_empty($_smarty_tpl->tpl_vars['user_data']->value['company_id']) && $_smarty_tpl->tpl_vars['user_data']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id'])) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id']) { ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <input type="hidden" name="user_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" class="cm-no-hide-input" name="selected_section" id="selected_section" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_section']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" class="cm-no-hide-input" name="user_type" value="<?php echo htmlspecialchars($_REQUEST['user_type'], ENT_QUOTES, 'UTF-8'); ?> " /> <div id="content_general"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:general_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:general_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_account.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php if ((fn_allowed_for("ULTIMATE") || $_smarty_tpl->tpl_vars['user_type']->value == "V") && $_smarty_tpl->tpl_vars['id']->value != $_smarty_tpl->tpl_vars['auth']->value['user_id']) { ?> <?php $_smarty_tpl->tpl_vars['zero_company_id_name_lang_var'] = new Smarty_variable(false, null, 0); ?> <?php if (fn_allowed_for("ULTIMATE") && fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_type']->value)) { ?> <?php $_smarty_tpl->tpl_vars['zero_company_id_name_lang_var'] = new Smarty_variable('all_vendors', null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("views/companies/components/company_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('name' => "user_data[company_id]", 'id' => "user_data_company_id", 'selected' => $_smarty_tpl->tpl_vars['user_data']->value['company_id'], 'zero_company_id_name_lang_var' => $_smarty_tpl->tpl_vars['zero_company_id_name_lang_var']->value, 'disable_company_picker' => $_smarty_tpl->tpl_vars['hide_inputs']->value), 0); ?> <?php } else { ?> <input type="hidden" name="user_data[company_id]" value="<?php echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['user_data']->value['company_id']) === null || $tmp === '' ? 0 : $tmp, ENT_QUOTES, 'UTF-8'); ?> "> <?php } ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:general_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "C", 'title' => __("contact_information")), 0); ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['user_multiple_profiles'] == "Y" && $_smarty_tpl->tpl_vars['id']->value) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("user_profile_info")), 0); ?> <p class="form-note"><?php echo $_smarty_tpl->__("text_multiprofile_notice"); ?> </p> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/multiple_profiles.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value['B']) { ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "B", 'title' => __("billing_address")), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "S", 'title' => __("shipping_address"), 'body_id' => "sa", 'shipping_flag' => fn_compare_shipping_billing($_smarty_tpl->tpl_vars['profile_fields']->value)), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "S", 'title' => __("shipping_address"), 'shipping_flag' => false), 0); ?> <?php } ?> </div> <?php if (!fn_allowed_for("ULTIMATE:FREE")) { ?> <?php if ($_smarty_tpl->tpl_vars['id']->value && ((!fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_data']->value) || !$_smarty_tpl->tpl_vars['user_data']->value['user_id']) && !$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_data']->value) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] && $_smarty_tpl->tpl_vars['usergroups']->value && !$_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['auth']->value['is_root'] == 'Y' && ($_smarty_tpl->tpl_vars['user_data']->value['company_id'] != 0 || $_smarty_tpl->tpl_vars['user_data']->value['company_id'] == 0 && $_smarty_tpl->tpl_vars['user_data']->value['is_root'] != 'Y') || $_smarty_tpl->tpl_vars['user_data']->value['user_type'] == 'V' && $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['auth']->value['is_root'] == 'Y' && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] && $_smarty_tpl->tpl_vars['user_data']->value['company_id'] == $_smarty_tpl->tpl_vars['runtime']->value['company_id'])) { ?> <div id="content_usergroups" class="cm-hide-save-button"> <?php if ($_smarty_tpl->tpl_vars['usergroups']->value) { ?> <table width="100%" class="table table-middle"> <thead> <tr> <th width="50%"><?php echo $_smarty_tpl->__("usergroup"); ?> </th> <th class="right" width="10%"><?php echo $_smarty_tpl->__("status"); ?> </th> </tr> </thead> <?php $_smarty_tpl->tpl_vars['usergroup'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['usergroup']->_loop = false; $_from = $_smarty_tpl->tpl_vars['usergroups']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['usergroup']->key => $_smarty_tpl->tpl_vars['usergroup']->value) { $_smarty_tpl->tpl_vars['usergroup']->_loop = true; ?> <tr> <td><a href="<?php echo htmlspecialchars(fn_url("usergroups.manage#group" . (string) $_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['usergroup']->value['usergroup'], ENT_QUOTES, 'UTF-8'); ?> </a></td> <td class="right"> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]) { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]['status'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable("F", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/select_popup.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id'], 'status' => $_smarty_tpl->tpl_vars['ug_status']->value, 'hidden' => '', 'items_status' => fn_get_predefined_statuses("profiles"), 'extra' => "&user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'update_controller' => "usergroups", 'notify' => true, 'hide_for_vendor' => $_smarty_tpl->tpl_vars['runtime']->value['company_id']), 0); ?> </td> </tr> <?php } ?> </table> <?php } else { ?> <p class="no-items"><?php echo $_smarty_tpl->__("no_data"); ?> </p> <?php } ?> </div> <?php } ?> <?php } ?> <div id="content_addons"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:detailed_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:detailed_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:detailed_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> <?php if ($_smarty_tpl->tpl_vars['show_api_tab']->value) { ?> <div id="content_api"> <div class="control-group <?php if ($_smarty_tpl->tpl_vars['hide_api_checkbox']->value) { ?> hidden<?php } ?> "> <div class="controls"> <label class="checkbox" for="sw_api_container"> <input <?php if ($_smarty_tpl->tpl_vars['user_data']->value['api_key'] != '') { ?> checked="checked"<?php } ?> class="cm-combination" type="checkbox" name="user_api_status" value="Y" id="sw_api_container" /><?php echo $_smarty_tpl->__("allow_api_access"); ?> </label> </div> </div> <div id="api_container" <?php if ($_smarty_tpl->tpl_vars['user_data']->value['api_key'] == '') { ?> class="hidden"<?php } ?> > <div class="control-group"> <label class="control-label"><?php echo $_smarty_tpl->__("api_key"); ?> </label> <div class="controls"> <input type="text" class="input-large" name="user_data[api_key]" value="<?php if ($_smarty_tpl->tpl_vars['user_data']->value['api_key']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['user_data']->value['api_key'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars($_smarty_tpl->tpl_vars['new_api_key']->value, ENT_QUOTES, 'UTF-8'); } ?> " readonly="readonly"/> </div> </div> </div> </div> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:tabs_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:tabs_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:tabs_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php if (!fn_allow_save_object($_smarty_tpl->tpl_vars['user_data']->value, "users") && $_smarty_tpl->tpl_vars['id']->value && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] || $_smarty_tpl->tpl_vars['hide_inputs']->value) { ?> <?php $_smarty_tpl->tpl_vars["hide_first_button"] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['id']->value) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:tabs_extra")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:tabs_extra"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:tabs_extra"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], 'group_name' => $_smarty_tpl->tpl_vars['runtime']->value['controller'], 'active_tab' => $_smarty_tpl->tpl_vars['selected_section']->value, 'track' => true), 0); ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if (!$_smarty_tpl->tpl_vars['id']->value) { ?> <?php $_smarty_tpl->tpl_vars["_user_desc"] = new Smarty_variable(fn_get_user_type_description($_smarty_tpl->tpl_vars['user_type']->value), null, 0); ?> <?php ob_start(); echo $_smarty_tpl->__("new_profile"); $_tmp1 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp1 . " (" . (string) $_smarty_tpl->tpl_vars['_user_desc']->value . ")", null, 0); } else { ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['firstname']) { ?> <?php ob_start(); echo $_smarty_tpl->__("editing_profile"); $_tmp2 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp2 . ": " . (string) $_smarty_tpl->tpl_vars['user_data']->value['firstname'] . " " . (string) $_smarty_tpl->tpl_vars['user_data']->value['lastname'], null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['user_data']->value['b_firstname']) { ?> <?php ob_start(); echo $_smarty_tpl->__("editing_profile"); $_tmp3 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp3 . ": " . (string) $_smarty_tpl->tpl_vars['user_data']->value['b_firstname'] . " " . (string) $_smarty_tpl->tpl_vars['user_data']->value['b_lastname'], null, 0); ?> <?php } else { ?> <?php ob_start(); echo $_smarty_tpl->__("editing_profile"); $_tmp4 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp4 . ": " . (string) $_smarty_tpl->tpl_vars['user_data']->value['email'], null, 0); ?> <?php } } ?> <?php $_smarty_tpl->tpl_vars['_title'] = new Smarty_variable(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['_title']->value), null, 0); $_smarty_tpl->tpl_vars["redirect_url"] = new Smarty_variable("profiles.manage%26user_type=" . (string) $_smarty_tpl->tpl_vars['user_data']->value['user_type'], null, 0); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null); ob_start(); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null); ob_start(); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:update_tools_list")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:update_tools_list"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['user_type'] == "C") { ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("view_all_orders"), 'href' => "orders.manage?user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value)); ?> </li> <?php } ?> <?php if (fn_user_need_login($_smarty_tpl->tpl_vars['user_data']->value['user_type']) && (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] == $_smarty_tpl->tpl_vars['auth']->value['company_id']) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] && !($_smarty_tpl->tpl_vars['user_data']->value['user_type'] == 'A' && $_smarty_tpl->tpl_vars['user_data']->value['is_root'] == 'Y' && !$_smarty_tpl->tpl_vars['user_data']->value['company_id'])) { ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'target' => "_blank", 'text' => __("act_on_behalf"), 'href' => "profiles.act_as_user?user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value)); ?> </li> <li class="divider"></li> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete"), 'class' => "cm-confirm cm-post", 'href' => "profiles.delete?user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value . "&redirect_url=" . (string) $_smarty_tpl->tpl_vars['redirect_url']->value)); ?> </li> <?php } ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:update_tools_list"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if ($_smarty_tpl->tpl_vars['id']->value && trim(Smarty::$_smarty_vars['capture']['tools_list']) !== '') { ?> <?php smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list'])); ?> <?php } ?> <div class="btn-group btn-hover dropleft"> <?php if ($_smarty_tpl->tpl_vars['id']->value) { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/save_changes.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_meta' => "dropdown-toggle", 'but_role' => "submit-link", 'but_name' => "dispatch[profiles." . (string) $_smarty_tpl->tpl_vars['runtime']->value['mode'] . "]", 'but_target_form' => "profile_form", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_text' => __("create"), 'but_meta' => "dropdown-toggle", 'but_role' => "submit-link", 'but_name' => "dispatch[profiles." . (string) $_smarty_tpl->tpl_vars['runtime']->value['mode'] . "]", 'but_target_form' => "profile_form", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> <?php } ?> <ul class="dropdown-menu"> <li><a><input type="checkbox" name="notify_customer" value="Y" checked="checked" id="notify_customer" /> <?php echo $_smarty_tpl->__("notify_user"); ?> </a></li> </ul> </div> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => $_smarty_tpl->tpl_vars['_title']->value, 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons']), 0); ?> </form><?php }
} return array(CONTROLLER_STATUS_OK, "profiles." . (!empty($user_id) ? "update" : "add") . "?" . http_build_query($redirect_params)); } } if ($mode == 'manage') { if (Registry::get('runtime.company_id') && !empty($_REQUEST['user_type']) && ($_REQUEST['user_type'] == 'P' || $_REQUEST['user_type'] == 'A' && !fn_check_permission_manage_profiles('A'))) { return array(CONTROLLER_STATUS_DENIED); } if (!empty($_REQUEST['user_type']) && $_REQUEST['user_type'] == 'V' && fn_allowed_for('ULTIMATE')) { return array(CONTROLLER_STATUS_NO_PAGE); } list($users, $search) = fn_get_users($_REQUEST, $auth, Registry::get('settings.Appearance.admin_elements_per_page')); Registry::get('view')->assign('users', $users); Registry::get('view')->assign('search', $search); if (!empty($search['user_type'])) { Registry::get('view')->assign('user_type_description', fn_get_user_type_description($search['user_type'])); } $user_types = fn_get_user_types(); if (Registry::get('runtime.company_id') && fn_allowed_for("MULTIVENDOR")) { unset($user_types['C']); } if (fn_is_restricted_admin(array('user_type' => 'V'))) { unset($user_types['V']); } Registry::get('view')->assign('user_types', $user_types); Registry::get('view')->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE)); Registry::get('view')->assign('states', fn_get_all_states()); Registry::get('view')->assign('usergroups', fn_get_usergroups('F', DESCR_SL)); } elseif ($mode == 'act_as_user' || $mode == 'view_product_as_user') { if (fn_is_restricted_admin($_REQUEST) == true) { return array(CONTROLLER_STATUS_DENIED);
} else { $user_data = fn_get_user_info($uid, true, $profile_id); } if (empty($user_data)) { return array(CONTROLLER_STATUS_NO_PAGE); } } if ($mode == 'add' && !empty($_SESSION['cart']) && !empty($_SESSION['cart']['user_data']) && AREA != 'A') { $user_data = $_SESSION['cart']['user_data']; } } $user_type = !empty($_REQUEST['user_type']) ? $_REQUEST['user_type'] : (!empty($user_data['user_type']) ? $user_data['user_type'] : 'C'); if (AREA == 'A') { fn_add_breadcrumb(fn_get_lang_var('users'), "profiles.manage.reset_view"); fn_add_breadcrumb(fn_get_lang_var('search_results'), "profiles.manage.last_view"); fn_add_breadcrumb(fn_get_user_type_description($user_type, true), "profiles.manage?user_type=" . $user_type); } else { Registry::set('navigation.tabs.general', array('title' => fn_get_lang_var('general'), 'js' => true)); if ($mode == 'update' && Registry::get('settings.General.user_store_cc') == 'Y') { Registry::set('navigation.tabs.credit_cards', array('title' => fn_get_lang_var('credit_cards'), 'js' => true)); $credit_cards = fn_get_static_data_section('C', true, 'credit_card'); $view->assign('credit_cards', $credit_cards); $card_names = array(); foreach ($credit_cards as $val) { $card_names[$val['param']] = $val['descr']; } $view->assign('card_names', $card_names); $view->assign('profile_cards', empty($user_data['credit_cards']) ? array() : unserialize(fn_decrypt_text($user_data['credit_cards']))); } } $usergroups = fn_get_usergroups(!empty($user_data['user_type']) && $user_data['user_type'] == 'A' ? 'F' : 'C', CART_LANGUAGE);
function content_55d73f8b61fe43_23324476($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } if (!is_callable('smarty_function_set_id')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php'; } fn_preload_lang_vars(array('dear', 'update_profile_notification_header', 'dear', 'update_profile_notification_header')); if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") { $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null); ob_start(); echo $_smarty_tpl->getSubTemplate("common/letter_header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->__("dear"); ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['firstname']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['user_data']->value['firstname'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars(mb_strtolower(fn_get_user_type_description($_smarty_tpl->tpl_vars['user_data']->value['user_type']), 'UTF-8'), ENT_QUOTES, 'UTF-8'); } ?> ,<br><br> <?php echo $_smarty_tpl->__("update_profile_notification_header"); ?> <br><br> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:update_profile")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:update_profile"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:update_profile"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->getSubTemplate("profiles/profiles_info.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("common/letter_footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } if (trim(Smarty::$_smarty_vars['capture']['template_content'])) { if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") { ?> <span class="cm-template-box template-box" data-ca-te-template="profiles/update_profile.tpl" id="<?php echo smarty_function_set_id(array('name' => "profiles/update_profile.tpl"), $_smarty_tpl); ?> "><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php echo Smarty::$_smarty_vars['capture']['template_content']; ?> <!--[/tpl_id]--></span><?php } else { echo Smarty::$_smarty_vars['capture']['template_content']; } } } else { echo $_smarty_tpl->getSubTemplate("common/letter_header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->__("dear"); ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['firstname']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['user_data']->value['firstname'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars(mb_strtolower(fn_get_user_type_description($_smarty_tpl->tpl_vars['user_data']->value['user_type']), 'UTF-8'), ENT_QUOTES, 'UTF-8'); } ?> ,<br><br> <?php echo $_smarty_tpl->__("update_profile_notification_header"); ?> <br><br> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:update_profile")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:update_profile"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:update_profile"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->getSubTemplate("profiles/profiles_info.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("common/letter_footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); } }
} if (empty($_SESSION['export_ranges']['users'])) { $_SESSION['export_ranges']['users'] = array('pattern_id' => 'users'); } $_SESSION['export_ranges']['users']['data'] = array('user_id' => $_REQUEST['user_ids']); unset($_REQUEST['redirect_url']); return array(CONTROLLER_STATUS_REDIRECT, "exim.export?section=users&pattern_id=" . $_SESSION['export_ranges']['users']['pattern_id']); } } } if ($mode == 'manage') { list($users, $search) = fn_get_users($_REQUEST, $auth, Registry::get('settings.Appearance.admin_elements_per_page')); $view->assign('users', $users); $view->assign('search', $search); if (!empty($search['user_type'])) { $view->assign('user_type_description', fn_get_user_type_description($search['user_type'])); } $view->assign('user_types', fn_get_user_types()); $view->assign('countries', fn_get_countries(CART_LANGUAGE, true)); $view->assign('states', fn_get_all_states()); $view->assign('usergroups', fn_get_usergroups('F', DESCR_SL)); } elseif ($mode == 'act_as_user') { if (fn_is_restricted_admin($_REQUEST) == true) { return array(CONTROLLER_STATUS_DENIED); } $condition = fn_get_company_condition(); $user_data = db_get_row("SELECT * FROM ?:users WHERE user_id = ?i {$condition}", $_REQUEST['user_id']); if (!empty($user_data)) { $user_type = empty($_REQUEST['area']) ? $user_data['user_type'] == 'A' ? 'A' : 'C' : $_REQUEST['area']; // 'area' variable was used for loging in to the area different from the user type. $sess_data = array('auth' => fn_fill_auth($user_data, array(), true, $user_type));