function geodir_payment_manager_ajax() { if (isset($_REQUEST['gd_add_price']) && $_REQUEST['gd_add_price'] == 'addprice') { geodir_add_edit_price(); } if (isset($_REQUEST['action_del']) && $_REQUEST['action_del'] == 'true') { geodir_del_price(); } if (isset($_REQUEST['paymentsetting']) && $_REQUEST['paymentsetting'] == 'update_setting') { geodir_change_payment_method_setting(); } if (isset($_REQUEST['gdaction']) && $_REQUEST['gdaction'] == 'change_status') { geodir_change_payment_method_status(); } if (isset($_REQUEST['invoice_action']) && $_REQUEST['invoice_action'] == 'invoice') { geodir_change_invoice_status(); } if (isset($_REQUEST['gd_add_coupon']) && $_REQUEST['gd_add_coupon'] == 'addprice') { geodir_add_edit_coupon(); } if (isset($_REQUEST['coupon_del']) && $_REQUEST['coupon_del'] == 'true') { geodir_del_coupon(); } if (isset($_REQUEST['allow_coupon']) && $_REQUEST['allow_coupon'] == 'true') { geodir_allow_coupon_code(); } if (isset($_REQUEST['subtab']) && $_REQUEST['subtab'] == 'geodir_payment_general_options') { geodir_update_options(geodir_payment_general_options()); $msg = 'Your settings have been saved.'; $msg = urlencode($msg); $location = admin_url() . "admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_general_options&success_msg=" . $msg; wp_redirect($location); exit; } if (isset($_REQUEST['subtab']) && $_REQUEST['subtab'] == 'payment_notifications') { geodir_update_options(geodir_payment_notifications()); $msg = 'Notifications updated successfully.'; $msg = urlencode($msg); $location = admin_url() . "admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=payment_notifications&success_msg=" . $msg; wp_redirect($location); exit; } if (isset($_REQUEST['payment_ajax_data']) && $_REQUEST['payment_ajax_data'] != '') { geodir_fields_list_by_posttype($_REQUEST['post_type'], $_REQUEST['pkg_id'], $_REQUEST['cats'], $_REQUEST['payment_ajax_data']); exit; } if (isset($_REQUEST['payaction']) && $_REQUEST['payaction'] == 'trouble_shoot') { geodir_payment_method_update(); } }
function geodir_package_price_form() { global $wpdb, $price_db_table_name; $priceinfo = array(); if (isset($_REQUEST['id']) && $_REQUEST['id'] != '') { $pid = $_REQUEST['id']; $pricesql = $wpdb->prepare("select * from " . GEODIR_PRICE_TABLE . " where pid=%d", array($pid)); $priceinfo = $wpdb->get_results($pricesql); } $sub_num_trial_units = isset($priceinfo[0]->sub_num_trial_units) && !empty($priceinfo[0]->sub_num_trial_units) ? $priceinfo[0]->sub_num_trial_units : 'D'; $sub_num_trial_units = in_array($sub_num_trial_units, array('D', 'W', 'M', 'Y')) ? $sub_num_trial_units : 'D'; $sub_num_trial_units_options = geodir_payment_get_sub_num_trial_units($sub_num_trial_units); ?> <div class="gd-content-heading active"> <h3> <?php if (isset($_REQUEST['id']) && $_REQUEST['id'] != '') { _e('Edit Price', GEODIRPAYMENT_TEXTDOMAIN); } else { _e('Add Price', GEODIRPAYMENT_TEXTDOMAIN); } ?> </h3> <?php $nonce = wp_create_nonce('package_add_update'); ?> <input type="hidden" name="package_add_update_nonce" value="<?php echo $nonce; ?> " /> <input type="hidden" name="gd_add_price" value="addprice"> <input type="hidden" name="gd_id" value="<?php if (isset($_REQUEST['id'])) { echo $_REQUEST['id']; } ?> "> <input type="hidden" name="gd_exc_package_cat" value="<?php if (isset($priceinfo[0]->cat)) { echo $priceinfo[0]->cat; } else { echo ''; } ?> "> <table class="form-table"> <tbody> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Price title', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <input type="text" style="min-width:200px;" name="gd_title" id="title" value="<?php if (isset($priceinfo[0]->title)) { echo $priceinfo[0]->title; } ?> "> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Post type', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <select style="min-width:200px;" class="payment_gd_posting_type" name="gd_posting_type" > <?php $post_types = geodir_get_posttypes(); if (!empty($post_types)) { foreach ($post_types as $post_type) { ?> <option value="<?php echo $post_type; ?> " <?php if (isset($priceinfo[0]->post_type) && $priceinfo[0]->post_type == $post_type) { echo 'selected="selected"'; } ?> ><?php echo $post_type; ?> </option> <?php } } ?> </select> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Post fields', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield" id="show_fields"> <?php isset($priceinfo[0]->post_type) ? $post_type = $priceinfo[0]->post_type : ($post_type = 'gd_place'); $request_id = isset($_REQUEST['id']) ? $_REQUEST['id'] : ''; $post_type_array = geodir_fields_list_by_posttype($post_type, $request_id); echo $post_type_array['posttype']; ?> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Price amount', GEODIRPAYMENT_TEXTDOMAIN); ?> ( <?php if (get_option('geodir_currencysym')) { echo stripslashes(get_option('geodir_currencysym')); } else { echo '$'; } ?> )</th> <td class="forminp"><div class="gtd-formfield"> <input style="min-width:200px;" type="text" name="gd_amount" value="<?php if (isset($priceinfo[0]->amount)) { echo $priceinfo[0]->amount; } ?> "> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Recurring payment?', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"> <div class="gtd-formfield"> <input type="checkbox" name="gd_sub_active" id="payment_sub_active" value="1" <?php if (isset($priceinfo[0]->sub_active) && $priceinfo[0]->sub_active != '') { echo 'checked="checked"'; } ?> > <label> <?php $rec_pay_arr = apply_filters('geodir_subscription_supported_by', array('PayPal')); if (count($rec_pay_arr) > 1) { $last_element = array_pop($rec_pay_arr); $rec_pay = implode(',', $rec_pay_arr) . __(' and ', GEODIRPAYMENT_TEXTDOMAIN) . $last_element; } else { $rec_pay = $rec_pay_arr[0]; } echo sprintf(__('(Only supported by %s)', GEODIRPAYMENT_TEXTDOMAIN), $rec_pay); ?> </label> </div> </td> </tr> <tr valign="top" class="show_num_days single_select_page" <?php if (isset($priceinfo[0]->sub_active) && $priceinfo[0]->sub_active != '') { echo 'style="display:none"'; } ?> > <th class="titledesc" scope="row"><?php _e('Number of Days', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"> <div class=" single_select_page" > <input type="text" name="gd_days" id="days" value="<?php if (isset($priceinfo[0]->days)) { echo $priceinfo[0]->days; } ?> "> <br /><?php _e('(set to 0 to never expire)', GEODIRPAYMENT_TEXTDOMAIN); ?> </div> </td> </tr> <tr valign="top" class="show_recuring single_select_page" <?php if (!isset($priceinfo[0]->sub_active) || $priceinfo[0]->sub_active == '') { echo 'style="display:none"'; } ?> > <th class="titledesc" scope="row"></th> <td class="forminp"> <div class=" single_select_page" > <table cellspacing="0px" cellpadding="0px" style=" border:1px solid #ccc;"> <tr valign="top" class="show_recuring single_select_page" <?php if (!isset($priceinfo[0]->sub_active) || $priceinfo[0]->sub_active == '') { echo 'style="display:none"'; } ?> > <th style="border-bottom:solid 1px #CCCCCC;border-right:solid 1px #CCCCCC;"><b> <?php _e('Offer free trial', GEODIRPAYMENT_TEXTDOMAIN); ?> </b></th> <th style="border-bottom:solid 1px #CCCCCC;"><b><?php _e('Recuring payment option', GEODIRPAYMENT_TEXTDOMAIN); ?> </b></th> </tr> <tr valign="top" class="show_recuring single_select_page" <?php if (!isset($priceinfo[0]->sub_active) || ($priceinfo[0]->sub_active = '')) { echo 'style="display:none"'; } ?> > <td style="border-right:solid 1px #CCCCCC;" ><input type="checkbox" name="fordaysckbox" id="active_offer" value="1" <?php if (isset($priceinfo[0]->sub_num_trial_days) && $priceinfo[0]->sub_num_trial_days > 0) { echo 'checked="checked"'; } ?> > <?php _e('Offer free trail for', GEODIRPAYMENT_TEXTDOMAIN); ?> <input type="text" style="width:27px;" palceholder="0" name="sub_num_trial_days" id="sub_num_trial_days" value="<?php if (isset($priceinfo[0]->sub_num_trial_days)) { echo $priceinfo[0]->sub_num_trial_days; } ?> " /> <select id="gd_sub_num_trial_units" name="gd_sub_num_trial_units" ><?php echo $sub_num_trial_units_options; ?> </select><div class="clear"></div><?php _e('(Allowed Range: Days range 1-90 || Weeks range 1-52 || Months range 1-24 || Years range 1-5)', GEODIRPAYMENT_TEXTDOMAIN); ?> </td> <td width="550"> <?php _e('Renew', GEODIRPAYMENT_TEXTDOMAIN); ?> <select id="recurring_range" name="gd_sub_units" > <option value="D" <?php if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'D') { echo 'selected="selected"'; } ?> ><?php _e("Daily", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="W" <?php if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'W') { echo 'selected="selected"'; } ?> ><?php _e("Weekly", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="M" <?php if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'M') { echo 'selected="selected"'; } ?> ><?php _e("Monthly", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="Y" <?php if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'Y') { echo 'selected="selected"'; } ?> ><?php _e("Yearly", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> <br /><?php _e("Every", GEODIRPAYMENT_TEXTDOMAIN); ?> <select id="rangenumber" name="gd_sub_units_num"> <?php $i = 0; while ($i < 91) { $i++; ?> <option value="<?php echo $i; ?> " <?php if (isset($priceinfo[0]->sub_units_num) && $priceinfo[0]->sub_units_num == $i) { echo 'selected="selected"'; } ?> ><?php echo $i; ?> </option><?php } ?> </select><br /> <samp style="width:10px; height:10px;" id="subscription"> <?php if (!isset($priceinfo[0]->sub_units)) { echo ' <b>Day(s)</b>'; } if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'D') { echo '<b>' . __("Day(s)", GEODIRPAYMENT_TEXTDOMAIN) . '</b>'; } if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'W') { echo '<b>' . __("Week(s)", GEODIRPAYMENT_TEXTDOMAIN) . '</b>'; } if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'M') { echo '<b>' . __("Month(s)", GEODIRPAYMENT_TEXTDOMAIN) . '</b>'; } if (isset($priceinfo[0]->sub_units) && $priceinfo[0]->sub_units == 'Y') { echo '<b>' . __("year(s)", GEODIRPAYMENT_TEXTDOMAIN) . '</b>'; } ?> </samp> for <input style="width:40px;" type="text" name="sub_units_num_times" id="sub_units_num_times" value="<?php if (isset($priceinfo[0]->sub_units_num_times)) { echo $priceinfo[0]->sub_units_num_times; } ?> " /> <?php _e('time(s), (min:2, max:52, blank for no limit)', GEODIRPAYMENT_TEXTDOMAIN); ?> <br /> <?php _e('(Allowed Range: Days range 1-90 || Weeks range 2-52 || Months range 2-24 || Years range 2-5)', GEODIRPAYMENT_TEXTDOMAIN); ?> </td></tr> </table> </div> </td> </tr> </tbody> </table> <table class="form-table"><tbody><tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Status', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <select style="min-width:200px;" name="gd_status" > <option value="1" <?php if (isset($priceinfo[0]->status) && $priceinfo[0]->status == '1') { echo 'selected="selected"'; } ?> > <?php _e("Active", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="0" <?php if (!isset($priceinfo[0]->status) || $priceinfo[0]->status == '0') { echo 'selected="selected"'; } ?> > <?php _e("Inactive", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Is featured', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <select style="min-width:200px;" name="gd_is_featured" > <option value="0" <?php if (!isset($priceinfo[0]->is_featured) || $priceinfo[0]->is_featured == '0') { echo 'selected="selected"'; } ?> > <?php _e("No", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="1" <?php if (isset($priceinfo[0]->is_featured) && $priceinfo[0]->is_featured == '1') { echo 'selected="selected"'; } ?> > <?php _e("Yes", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Is default', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <select style="min-width:200px;" name="gd_is_default" > <option value="0" <?php if (!isset($priceinfo[0]->is_default) || $priceinfo[0]->is_default == '0') { echo 'selected="selected"'; } ?> > <?php _e("No", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="1" <?php if (isset($priceinfo[0]->is_default) && $priceinfo[0]->is_default == '1') { echo 'selected="selected"'; } ?> > <?php _e("Yes", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> </div></td> </tr> <tr valign="top" class="show_ordering single_select_page"> <th class="titledesc" scope="row"><?php _e('Display Order', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"> <div class="single_select_page"> <input type="text" name="gd_display_order" id="display_order" value="<?php if (isset($priceinfo[0]->display_order)) { echo (int) $priceinfo[0]->display_order; } else { echo 0; } ?> "> <br /><?php _e('(display sort order on front end package listing)', GEODIRPAYMENT_TEXTDOMAIN); ?> </div> </td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Exclude categories', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <?php if (!isset($priceinfo[0]->post_type) || $priceinfo[0]->post_type == '') { _e('You can only exclude categories once saved.', GEODIRPAYMENT_TEXTDOMAIN); } else { /*if($priceinfo[0]->cat) { $catarr = explode(',',$priceinfo[0]->cat); }*/ ?> <div id="show_categories"> <?php $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : ''; $post_type_array = geodir_fields_list_by_posttype($post_type, $_REQUEST['id'], $priceinfo[0]->cat); echo $post_type_array['html_cat']; ?> </div> <br /> <?php _e('Select multiple categories to exclude by holding down "Ctrl" key. <br />(if removing a parent category, you should remove its child categories.', GEODIRPAYMENT_TEXTDOMAIN); ?> <br /> <b> <?php _e(' (It is not recommended to exclude categories from live <br /> packages as users will not be able to remove that category from the frontend.)', GEODIRPAYMENT_TEXTDOMAIN); ?> </b> <?php } ?> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Expire, Downgrade to', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield" id="gd_downgrade_pkg"> <?php $request_id = isset($_REQUEST['id']) ? $_REQUEST['id'] : ''; $select_dpkg = isset($priceinfo[0]->downgrade_pkg) ? $priceinfo[0]->downgrade_pkg : ''; $post_type_array = geodir_fields_list_by_posttype($post_type, $request_id, $select_dpkg); echo $post_type_array['downgrade']; ?> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Title to be display while add listing', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <textarea name="gd_title_desc" cols="40" rows="5" id="title_desc"><?php if (isset($priceinfo[0]->title_desc)) { echo stripslashes($priceinfo[0]->title_desc); } ?> </textarea> <br /> <?php _e('Keep blank to reset default content.', GEODIRPAYMENT_TEXTDOMAIN); ?> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Image limit', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <input style="min-width:200px;" type="text" name="gd_image_limit" value="<?php if (isset($priceinfo[0]->image_limit)) { echo $priceinfo[0]->image_limit; } ?> "> <br /> <?php _e('(Leave blank for unlimited)', GEODIRPAYMENT_TEXTDOMAIN); ?> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Category limit', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <input style="min-width:200px;" type="text" name="gd_cat_limit" value="<?php if (isset($priceinfo[0]->cat_limit)) { echo $priceinfo[0]->cat_limit; } ?> "> <br /> <?php _e('(Leave blank for unlimited, can not be 0(ZERO))', GEODIRPAYMENT_TEXTDOMAIN); ?> </div></td> </tr> <?php $use_desc_limit = isset($priceinfo[0]->use_desc_limit) && $priceinfo[0]->use_desc_limit == 1 ? 1 : 0; $desc_limit = isset($priceinfo[0]->desc_limit) && (int) $priceinfo[0]->desc_limit > 0 ? (int) $priceinfo[0]->desc_limit : 0; $use_tag_limit = isset($priceinfo[0]->use_tag_limit) && $priceinfo[0]->use_tag_limit == 1 ? 1 : 0; $tag_limit = isset($priceinfo[0]->tag_limit) && (int) $priceinfo[0]->tag_limit > 0 ? (int) $priceinfo[0]->tag_limit : 0; ?> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Apply description limit?', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"> <div class="gtd-formfield"> <select style="min-width:100px;" name="gd_use_desc_limit" id="gd_use_desc_limit"> <option value="0" <?php if ($use_desc_limit != '1') { echo 'selected="selected"'; } ?> ><?php _e("No", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="1" <?php if ($use_desc_limit == '1') { echo 'selected="selected"'; } ?> ><?php _e("Yes", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> <br /><?php _e('("Yes" to apply description limit)', GEODIRPAYMENT_TEXTDOMAIN); ?> </div> </td> </tr> <tr valign="top" class="single_select_page" id="use_desc_limit_on" <?php if ($use_desc_limit != '1') { echo 'style="display:none"'; } ?> > <th class="titledesc" scope="row" style="padding-top:1px"><?php _e('Description limit', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp" style="padding-top:1px"> <div class="gtd-formfield"> <input style="max-width:100px;" type="text" name="gd_desc_limit" value="<?php echo (int) $desc_limit; ?> " /> <br /><?php _e('(Characters limit for listing description, ex: 140)', GEODIRPAYMENT_TEXTDOMAIN); ?> </div> </td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Apply tags limit?', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"> <div class="gtd-formfield"> <select style="min-width:100px;" name="gd_use_tag_limit" id="gd_use_tag_limit"> <option value="0" <?php if ($use_tag_limit != '1') { echo 'selected="selected"'; } ?> ><?php _e("No", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="1" <?php if ($use_tag_limit == '1') { echo 'selected="selected"'; } ?> ><?php _e("Yes", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select><br /><?php _e('(If set to NO the default limit of 40 will be used. Set to Yes to increase/decrease)', GEODIRPAYMENT_TEXTDOMAIN); ?> </div> </td> </tr> <tr valign="top" class="single_select_page" id="use_tag_limit_on" <?php if ($use_tag_limit != '1') { echo 'style="display:none"'; } ?> > <th class="titledesc" scope="row" style="padding-top:1px"><?php _e('Tags limit', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp" style="padding-top:1px"> <div class="gtd-formfield" style="display:inline-block"> <input style="max-width:100px;" type="text" name="gd_tag_limit" value="<?php echo (int) $tag_limit; ?> " /> <br /><?php _e('(Characters limit for listing tags, ex: 40)', GEODIRPAYMENT_TEXTDOMAIN); ?> </div> </td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php _e('Google analytics', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"><div class="gtd-formfield"> <select style="min-width:100px;" name="google_analytics" > <option value="0" <?php if (!isset($priceinfo[0]->google_analytics) || $priceinfo[0]->google_analytics == '0') { echo 'selected="selected"'; } ?> > <?php _e("No", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="1" <?php if (isset($priceinfo[0]->google_analytics) && $priceinfo[0]->google_analytics == '1') { echo 'selected="selected"'; } ?> > <?php _e("Yes", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> </div></td> </tr> <tr valign="top" class="single_select_page"> <th class="titledesc" scope="row"><?php echo SEND_TO_FRIEND; ?> </th> <td class="forminp"><div class="gtd-formfield"> <select style="min-width:100px;" name="geodir_sendtofriend" > <option value="0" <?php if (!isset($priceinfo[0]->sendtofriend) || $priceinfo[0]->sendtofriend == '0') { echo 'selected="selected"'; } ?> > <?php _e("No", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="1" <?php if (isset($priceinfo[0]->sendtofriend) && $priceinfo[0]->sendtofriend == '1') { echo 'selected="selected"'; } ?> > <?php _e("Yes", GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> </div></td> </tr> <?php $hide_related_tab = isset($priceinfo[0]->hide_related_tab) && (int) $priceinfo[0]->hide_related_tab == 1 ? 1 : 0; ?> <tr valign="top" class="single_select_page"> <th scope="row" class="titledesc"><?php _e('Hide related listing tab', GEODIRPAYMENT_TEXTDOMAIN); ?> </th> <td class="forminp"> <div class="gtd-formfield"> <select name="geodir_hide_related_tab" style="min-width:100px;"> <option value="0" <?php selected((int) $hide_related_tab, 0); ?> ><?php _e('No', GEODIRPAYMENT_TEXTDOMAIN); ?> </option> <option value="1" <?php selected((int) $hide_related_tab, 1); ?> ><?php _e('Yes', GEODIRPAYMENT_TEXTDOMAIN); ?> </option> </select> </div> <span class="description"><?php _e('Select "Yes" to hide related listing tab on listing detail page.', GEODIRPAYMENT_TEXTDOMAIN); ?> </span> </td> </tr> <?php do_action('geodir_payment_package_extra_fields', $priceinfo); /* EVENT-MANAGER */ ?> </tbody> </table> <script type="text/javascript"> jQuery(function(){ jQuery('#gd_use_desc_limit').change(function(){ if (jQuery(this).val()=='1') { jQuery('#use_desc_limit_on').fadeIn(); } else { jQuery('#use_desc_limit_on').fadeOut(); } }); jQuery('#gd_use_tag_limit').change(function(){ if (jQuery(this).val()=='1') { jQuery('#use_tag_limit_on').fadeIn(); } else { jQuery('#use_tag_limit_on').fadeOut(); } }); }) </script> <p class="submit" style="margin-top:10px; padding-left:15px;"> <input type="submit" class="button-primary" name="submit" value="<?php _e('Submit', GEODIRPAYMENT_TEXTDOMAIN); ?> " onclick="return check_frm();"> <input type="button" class="button-primary" name="gd_cancel" value="<?php _e('Cancel', GEODIRPAYMENT_TEXTDOMAIN); ?> " onClick="window.location.href='<?php echo admin_url(); ?> admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager'" > </p> </form> </div> <?php }