function arp_load_pricing_table() { global $wpdb, $arp_mainoptionsarr; require_once PRICINGTABLE_DIR . '/core/classes/class.arprice_preview_editor.php'; $template_id = $_REQUEST['id']; $template = $_REQUEST['template']; $skin = $_REQUEST['skin']; $ref_template = $_REQUEST['ref_temp']; $is_clone = $_REQUEST['is_clone']; $sql = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'arp_arprice WHERE ID = %d ', $template_id)); $table_name = $sql[0]->table_name; $general_options = json_encode(maybe_unserialize(stripslashes($sql[0]->general_options))); $opt = maybe_unserialize($sql[0]->general_options); $is_animated = $sql[0]->is_animated; $columns = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'arp_arprice_options WHERE table_id = %d', $template_id)); $column_options = json_encode(maybe_unserialize(stripslashes($columns[0]->table_options))); $table = arp_get_pricing_table_string_editor($template_id, $table_name, 2, '', '', $is_clone); $template_skins = json_encode($arp_mainoptionsarr['general_options']['template_options']['skins'][$ref_template]); $template_skin_codes = json_encode($arp_mainoptionsarr['general_options']['template_options']['skin_color_code'][$ref_template]); $options = json_decode($general_options, true); $general_settings = json_encode($options['general_settings']); $template_settings = json_encode($options['template_setting']); $template_type = $this->arp_choose_template_type($ref_template); $columns = maybe_unserialize(stripslashes($columns[0]->table_options)); $total_columns = count($columns['columns']); $json_array = array('table' => $table, 'table_name' => $table_name, 'general_settings' => $general_settings, 'template_settings' => $template_settings, 'column_options' => $column_options, 'template_skins' => $template_skins, 'template_skin_codes' => $template_skin_codes, 'template_type' => $template_type, 'total_columns' => $total_columns, 'is_animated' => $is_animated); $json_array = json_encode($json_array); echo $json_array; die; }
<div id="main_package_div"> <div class="main_package" id="main_package"> <div class="ex" style=""> <ul id="packages"> <?php if ($arpaction == 'create_new') { global $arprice_form; $columns = $has_caption != "" ? $table_cols + 1 : $table_cols; $arprice_form->arp_pricing_table_new_form($columns, $table_rows, $has_caption, $arp_template); } else { if ($arpaction == 'edit') { require_once PRICINGTABLE_DIR . '/core/classes/class.arprice_preview_editor.php'; global $arprice_form; echo arp_get_pricing_table_string_editor($id, $table_name, 2); } } ?> </ul> <div style="height:auto;width:10px;float:left;"></div> <div id="addnewpackage_loader"> </div> <div class="add_new_package enabled" align="center" id="addnewpackage"> <label class="add_new_package_label"><?php _e('Add New Column', ARP_PT_TXTDOMAIN); ?> </label> </div>