function ihc_select_locker_settings_field($settings, $value) { $str = ''; $lockers = ihc_return_meta('ihc_lockers'); if ($lockers) { $str .= '<select value="' . $value . '" name="' . $settings['param_name'] . '" class="wpb_vc_param_value ' . $settings['param_name'] . ' ' . $settings['type'] . '_field" onChange="ihc_locker_preview_wi(this.value, 0);">'; $str .= '<option value="-1">...</option>'; foreach ($lockers as $k => $v) { $selected = $k == $value ? 'selected' : ''; $str .= '<option value="' . $k . '" ' . $selected . '>' . $v['ihc_locker_name'] . '</option>'; } $str .= '</select>'; } else { $str .= __('No Lockers Available.', 'ihc'); } return $str; }
function ihc_print_locker_template($id = false, $meta_arr = false, $preview = false) { //function that return html template for an id $str = ''; if ($id && $id != -1) { $meta_arr = ihc_return_meta('ihc_lockers', $id); } //gettings metas for id if ($meta_arr) { $login = ''; if ($meta_arr['ihc_locker_login_form']) { $meta_arr_login = ihc_return_meta_arr('login'); if ($meta_arr['ihc_locker_additional_links']) { $meta_arr_login['ihc_login_remember_me'] = 0; $meta_arr_login['ihc_login_register'] = 1; $meta_arr_login['ihc_login_pass_lost'] = 1; } else { $meta_arr_login['ihc_login_remember_me'] = 0; $meta_arr_login['ihc_login_register'] = 0; $meta_arr_login['ihc_login_pass_lost'] = 0; } $meta_arr_login['ihc_login_template'] = 'ihc-login-template-7'; //no template for login if (isset($meta_arr['ihc_locker_login_template']) && $meta_arr['ihc_locker_login_template']) { $meta_arr_login['ihc_login_template'] = $meta_arr['ihc_locker_login_template']; } if ($preview) { $meta_arr_login['preview'] = true; } $login = ihc_print_form_login($meta_arr_login); } elseif ($meta_arr['ihc_locker_additional_links']) { $login = ihc_print_links_login(); } $meta_arr['ihc_locker_custom_content'] = ihc_format_str_like_wp($meta_arr['ihc_locker_custom_content']); $meta_arr['ihc_locker_custom_content'] = stripslashes($meta_arr['ihc_locker_custom_content']); $meta_arr['ihc_locker_custom_content'] = htmlspecialchars_decode($meta_arr['ihc_locker_custom_content']); $str = ihc_locker_layout($meta_arr['ihc_locker_template'], $login, $meta_arr['ihc_locker_custom_content']); $str = '<div class="ihc-locker-wrap">' . $str . '</div>'; if ($meta_arr['ihc_locker_custom_css']) { $str = '<style>' . $meta_arr['ihc_locker_custom_css'] . '</style>' . $str; } } return $str; //if something goes wrong return blank string }
</option> <?php } ?> </select> <div id="ihc-popup-target-user-select-view"></div> <input type="hidden" id="ihc_mb_who-shortcode" /> </div> <div class="clear"></div> <div class="ihc-popup-label"> <div><?php _e('Choose Locker:', 'ihc'); ?> </div> <?php $lockers = ihc_return_meta('ihc_lockers'); if ($lockers) { ?> <select class="ihc-fullwidth ihc-select" id="ihc_mb_template-shortcode" onChange="ihc_locker_preview_wi(this.value, 0);"> <option value="-1">...</option> <?php foreach ($lockers as $k => $v) { ?> <option value="<?php echo $k; ?> "><?php echo $v['ihc_locker_name']; ?> </option> <?php
jQuery('#access_interval_start').datepicker({ dateFormat : 'dd-mm-yy' }); jQuery('#access_interval_end').datepicker({ dateFormat : 'dd-mm-yy' }); }); </script> <form method="post" action="<?php echo $url . '&tab=levels'; ?> "> <div class="ihc-stuffbox"> <?php if (isset($_REQUEST['edit_level'])) { $level_data = ihc_return_meta('ihc_levels', $_REQUEST['edit_level']); $label = __('Edit Level:', 'ihc'); } else { $order = 0; $level_arr = get_option('ihc_levels'); if ($level_arr && count($level_arr)) { $order = count($level_arr); } $level_data = array('name' => '', 'payment_type' => 'free', 'price' => '', 'label' => '', 'description' => '', 'price_text' => '', 'order' => $order, 'access_type' => 'unlimited', 'access_limited_time_type' => 'D', 'access_limited_time_value' => '', 'access_interval_start' => '', 'access_interval_end' => '', 'access_regular_time_type' => 'D', 'access_regular_time_value' => '', 'billing_type' => '', 'billing_limit_num' => '2'); $label = __('Add New Level:', 'ihc'); } /////////for old versions of indeed membership pro $check_arr = array('access_type' => 'unlimited', 'access_limited_time_type' => 'D', 'access_limited_time_value' => '', 'access_interval_start' => '', 'access_interval_end' => '', 'access_regular_time_type' => 'D', 'access_regular_time_value' => '', 'billing_type' => '', 'billing_limit_num' => 2); foreach ($check_arr as $k => $v) { if (!isset($level_data[$k])) { $level_data[$k] = $v;
</script> <?php } else { ?> <div class="iump-page-title">Ultimate Membership Pro - <span class="second-text"> <?php _e('Inside Lockers', 'ihc'); ?> </span> </div> <?php ////////////////// LIST LOCKER $templates = ihc_return_meta('ihc_lockers'); if ($templates) { ?> <div class="ihc-manage-templates"> <div class=""> <table class="wp-list-table widefat fixed tags"> <thead> <tr> <th class="manage-column" style="width:30px;"><?php _e('ID', 'ihc'); ?> </th> <th class="manage-column"><?php _e('Name', 'ihc'); ?>