function PricerrTheme_general_settings_main_details_options_fnc() { ?> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td width="320">Percent for Affiliates:</td> <td><input type="text" name="PricerrTheme_aff_percent" size="5" value="<?php echo get_option('PricerrTheme_aff_percent'); ?> " /> %</td> </tr> <?php }
function PricerrTheme_pricing_options() { $id_icon = 'icon-options-general4'; $ttl_of_stuff = 'PricerrTheme - ' . __('Pricing Settings', 'PricerrTheme'); $arr = array("yes" => __("Yes", 'PricerrTheme'), "no" => __("No", 'PricerrTheme')); $sep = array("," => __('Comma (,)', 'PricerrTheme'), "." => __("Point (.)", 'PricerrTheme')); $frn = array("front" => __('In front of sum (eg: $50)', 'PricerrTheme'), "back" => __("After the sum (eg: 50\$)", 'PricerrTheme')); global $menu_admin_pricerrtheme_theme_bull, $wpdb; $arr_currency = array("USD" => "US Dollars", "EUR" => "Euros", "CAD" => "Canadian Dollars", "CHF" => "Swiss Francs", "GBP" => "British Pounds", "AUD" => "Australian Dollars", "NZD" => "New Zealand Dollars", "BRL" => "Brazilian Real", "SGD" => "Singapore Dollars", "SEK" => "Swidish Kroner", "NOK" => "Norwegian Kroner", "DKK" => "Danish Kroner", 'PLN' => 'Polish zloty', "MXN" => "Mexican Pesos", "JPY" => "Japanese Yen", "EUR" => "Euros", "ZAR" => "South Africa Rand", 'RUB' => 'Russian Ruble', "TRY" => "Turkish Lyra", "RON" => "Romanian Lei", "RSD" => "Serbian Dinar", "COP" => "Colombian peso", 'INR' => 'Indian Rupee', 'MYR' => 'Malaysian Ringgit (MYR)', 'LTL' => 'Lithuania Litas', 'HKD' => 'HongKong Dollars', 'PHP' => 'Phillipine Peso', 'TWD' => 'Taiwan Dollar', 'BTC' => 'BitCoins'); $arr_currency = apply_filters('PricerrTheme_arr_curency', $arr_currency); //------------------------------------------------------ echo '<div class="wrap">'; echo '<div class="icon32" id="' . $id_icon . '"><br/></div>'; echo '<h2 class="my_title_class_sitemile">' . $ttl_of_stuff . '</h2>'; //------------------- if (isset($_POST['PricerrTheme_save1'])) { $PricerrTheme_currency = trim($_POST['PricerrTheme_currency']); $PricerrTheme_currency_symbol = trim($_POST['PricerrTheme_currency_symbol']); $PricerrTheme_currency_position = trim($_POST['PricerrTheme_currency_position']); $PricerrTheme_decimal_sum_separator = trim($_POST['PricerrTheme_decimal_sum_separator']); $PricerrTheme_thousands_sum_separator = trim($_POST['PricerrTheme_thousands_sum_separator']); update_option('PricerrTheme_currency', $PricerrTheme_currency); update_option('PricerrTheme_currency_symbol', $PricerrTheme_currency_symbol); update_option('PricerrTheme_currency_position', $PricerrTheme_currency_position); update_option('PricerrTheme_decimal_sum_separator', $PricerrTheme_decimal_sum_separator); update_option('PricerrTheme_thousands_sum_separator', $PricerrTheme_thousands_sum_separator); echo '<div class="saved_thing">' . __('Settings saved!', 'PricerrTheme') . '</div>'; } if (isset($_POST['PricerrTheme_save2'])) { $PricerrTheme_new_job_listing_fee = trim($_POST['PricerrTheme_new_job_listing_fee']); $PricerrTheme_new_job_feat_listing_fee = trim($_POST['PricerrTheme_new_job_feat_listing_fee']); $PricerrTheme_withdraw_limit = trim($_POST['PricerrTheme_withdraw_limit']); $PricerrTheme_percent_fee_taken = trim($_POST['PricerrTheme_percent_fee_taken']); $PricerrTheme_solid_fee_taken = trim($_POST['PricerrTheme_solid_fee_taken']); update_option('PricerrTheme_solid_fee_taken', $PricerrTheme_solid_fee_taken); update_option('PricerrTheme_percent_fee_taken', $PricerrTheme_percent_fee_taken); update_option('PricerrTheme_withdraw_limit', $PricerrTheme_withdraw_limit); update_option('PricerrTheme_new_job_listing_fee', $PricerrTheme_new_job_listing_fee); update_option('PricerrTheme_new_job_feat_listing_fee', $PricerrTheme_new_job_feat_listing_fee); echo '<div class="saved_thing">' . __('Settings saved!', 'PricerrTheme') . '</div>'; } if (isset($_POST['PricerrTheme_save3'])) { $PricerrTheme_job_fixed_amount = trim($_POST['PricerrTheme_job_fixed_amount']); $PricerrTheme_enable_free_input_box = trim($_POST['PricerrTheme_enable_free_input_box']); $PricerrTheme_enable_dropdown_values = trim($_POST['PricerrTheme_enable_dropdown_values']); update_option('PricerrTheme_job_fixed_amount', $PricerrTheme_job_fixed_amount); update_option('PricerrTheme_enable_free_input_box', $PricerrTheme_enable_free_input_box); update_option('PricerrTheme_enable_dropdown_values', $PricerrTheme_enable_dropdown_values); echo '<div class="saved_thing">' . __('Settings saved!', 'PricerrTheme') . '</div>'; } if (isset($_POST['PricerrTheme_addnewcost'])) { $cost = trim($_POST['newcost']); $ss = "insert into " . $wpdb->prefix . "job_var_costs (cost) values('{$cost}')"; $wpdb->query($ss); echo '<div class="saved_thing">' . __('Settings saved!', 'PricerrTheme') . '</div>'; } ?> <div id="usual2" class="usual"> <ul> <li><a href="#tabs1"><?php _e('Main Details', 'PricerrTheme'); ?> </a></li> <li><a href="#tabs2"><?php _e('Job Fees', 'PricerrTheme'); ?> </a></li> <li><a href="#tabs3"><?php _e('Job Values', 'PricerrTheme'); ?> </a></li> <li><a href="#tabs4"><?php _e('Dropdown Job Values', 'PricerrTheme'); ?> </a></li> </ul> <div id="tabs1"> <form method="post" action="<?php echo get_bloginfo('siteurl'); ?> /wp-admin/admin.php?page=pricing-settings&active_tab=tabs1"> <table width="100%" class="sitemile-table"> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Site currency:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($arr_currency, 'PricerrTheme_currency'); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td width="160"><?php _e('Currency symbol:', 'PricerrTheme'); ?> </td> <td><input type="text" size="6" name="PricerrTheme_currency_symbol" value="<?php echo get_option('PricerrTheme_currency_symbol'); ?> "/> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Currency symbol position:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($frn, 'PricerrTheme_currency_position'); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Decimals sum separator:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($sep, 'PricerrTheme_decimal_sum_separator'); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Thousands sum separator:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($sep, 'PricerrTheme_thousands_sum_separator'); ?> </td> </tr> <tr> <td ></td> <td ></td> <td><input type="submit" name="PricerrTheme_save1" value="<?php _e('Save Options', 'PricerrTheme'); ?> "/></td> </tr> </table> </form> </div> <div id="tabs2" style="display: none; "> <form method="post" action="<?php echo get_bloginfo('siteurl'); ?> /wp-admin/admin.php?page=pricing-settings&active_tab=tabs2"> <table width="100%" class="sitemile-table"> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td width="160"><?php _e('New job listing fee:', 'PricerrTheme'); ?> </td> <td><input type="text" size="15" name="PricerrTheme_new_job_listing_fee" value="<?php echo get_option('PricerrTheme_new_job_listing_fee'); ?> "/> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('New featured job listing fee:', 'PricerrTheme'); ?> </td> <td><input type="text" size="15" name="PricerrTheme_new_job_feat_listing_fee" value="<?php echo get_option('PricerrTheme_new_job_feat_listing_fee'); ?> "/> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Withdraw Limit:', 'PricerrTheme'); ?> </td> <td><input type="text" size="15" name="PricerrTheme_withdraw_limit" value="<?php echo get_option('PricerrTheme_withdraw_limit'); ?> "/> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(__('If the percent is empty then the fixed amount value will be considered.', 'PricerrTheme')); ?> </td> <td ><?php _e('Fee taken from each job:', 'PricerrTheme'); ?> </td> <td><input type="text" size="4" name="PricerrTheme_percent_fee_taken" value="<?php echo get_option('PricerrTheme_percent_fee_taken'); ?> "/>% or solid amount <input type="text" size="6" name="PricerrTheme_solid_fee_taken" value="<?php echo get_option('PricerrTheme_solid_fee_taken'); ?> "/><?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td ></td> <td ></td> <td><input type="submit" name="PricerrTheme_save2" value="<?php _e('Save Options', 'PricerrTheme'); ?> "/></td> </tr> </table> </form> </div> <div id="tabs3"> <form method="post" action="<?php echo get_bloginfo('siteurl'); ?> /wp-admin/admin.php?page=pricing-settings&active_tab=tabs3"> <table width="100%" class="sitemile-table"> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td width="160"><?php _e('Job fixed amount:', 'PricerrTheme'); ?> </td> <td><input type="text" size="15" name="PricerrTheme_job_fixed_amount" value="<?php echo get_option('PricerrTheme_job_fixed_amount'); ?> "/> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td colspan="3"><?php _e('OR', 'PricerrTheme'); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Enable free text input:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_free_input_box'); ?> </td> </tr> <tr> <td colspan="3">OR</td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Enable dropdown values:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_dropdown_values'); ?> </td> </tr> <tr> <td ></td> <td ></td> <td><input type="submit" name="PricerrTheme_save3" value="<?php _e('Save Options', 'PricerrTheme'); ?> "/></td> </tr> </table> </form> </div> <div id="tabs4"> <form method="post" action="<?php echo get_bloginfo('siteurl'); ?> /wp-admin/admin.php?page=pricing-settings&active_tab=tabs4"> <table width="100%" class="sitemile-table"> <tr> <td width="210"><?php _e('Add new cost:', 'PricerrTheme'); ?> </td> <td><input name="newcost" type="text" size="10" /> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td width="210"></td> <td><input type="submit" name="PricerrTheme_addnewcost" value="<?php _e('Add', 'PricerrTheme'); ?> " /></td> </tr> </table> </form> <script> $(document).ready(function() { $('.delete_job_cost').click(function() { var id = $(this).attr('rel'); $.ajax({ type: "POST", url: "<?php echo get_bloginfo('siteurl'); ?> /", data: "delete_variable_job_fee="+id, success: function(msg){ $("#job_cost_" + id).hide(); } }); }); }); </script> <?php global $wpdb; $ss = "select * from " . $wpdb->prefix . "job_var_costs order by cost asc"; $r = $wpdb->get_results($ss); if (count($r) > 0) { echo '<table width="400">'; echo '<tr>'; echo '<td><b>Cost</b></td>'; echo '<td><b>Options</b></td>'; echo '</tr>'; foreach ($r as $row) { echo '<tr id="job_cost_' . $row->id . '">'; echo '<td width="50">' . PricerrTheme_get_show_price($row->cost, 2) . '</td>'; echo '<td width="100"><a href="#" rel="' . $row->id . '" class="delete_job_cost">' . __('Delete', 'PricerrTheme') . '</a></td>'; echo '</tr>'; } echo '</table>'; } else { echo __('No values added yet.', 'PricerrTheme'); } ?> </div> <?php echo '</div>'; }
function PricerrTheme_add_new_alipay_cnt() { $arr = array("yes" => __("Yes", 'PricerrTheme'), "no" => __("No", 'PricerrTheme')); ?> <div id="tabs8" > <form method="post" action="<?php bloginfo('siteurl'); ?> /wp-admin/admin.php?page=payment-methods&active_tab=tabs8"> <table width="100%" class="sitemile-table"> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td width="200"><?php _e('Enable:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_alipay_enable'); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('AliPay Partner ID:', 'PricerrTheme'); ?> </td> <td><input type="text" size="45" name="PricerrTheme_alipay_partner_id" value="<?php echo get_option('PricerrTheme_alipay_partner_id'); ?> "/></td> </tr> <tr> <td ></td> <td ></td> <td><input type="submit" name="PricerrTheme_save_alipay" value="<?php _e('Save Options', 'PricerrTheme'); ?> "/></td> </tr> </table> </form> </div> <?php }
function PricerrTheme_add_new_coinbase_cnt() { $arr = array("yes" => __("Yes", 'PricerrTheme'), "no" => __("No", 'PricerrTheme')); $clientId = get_option('PricerrTheme_coinbase_id'); ?> <div id="tabs_coinbase" > <form method="post" action="<?php bloginfo('siteurl'); ?> /wp-admin/admin.php?page=payment-methods&active_tab=tabs_coinbase"> <?php if (!empty($clientId)) { $_CLIENT_ID = get_option('PricerrTheme_coinbase_id'); $_CLIENT_SECRET = get_option('PricerrTheme_client_secret_key'); include dirname(__FILE__) . '/coinbase_php/lib/coinbase.php'; //------------------------------------------------------------------------------------- $redirectUrl = str_replace("http://", "https://", plugins_url('PricerrTheme_gateways/coinbase/coinbase_redirect.php')); //get_bloginfo('siteurl') . "/?bitcoins=1"; echo 'Callback URL: '; echo $redirectUrl; echo '<br/> '; $coinbaseOauth = new Coinbase_OAuth($_CLIENT_ID, $_CLIENT_SECRET, $redirectUrl); ?> <?php $authorizeUrl = $coinbaseOauth->createAuthorizeUrl("buttons"); ?> <p>Please authorize this website with coinbase: <a href="<?php echo $authorizeUrl; ?> " class="button"><?php _e('Authorize Wordpress Plugin'); ?> </a></p> <?php } ?> First, create an OAuth2 application for this plugin at <a href="https://coinbase.com/oauth/applications">https://coinbase.com/oauth/applications</a> <br/><br/> <table width="100%" class="sitemile-table"> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td width="200"><?php _e('Enable:', 'PricerrTheme'); ?> </td> <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_coinbase_enable'); ?> </td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Client ID:', 'PricerrTheme'); ?> </td> <td><input type="text" size="45" name="PricerrTheme_coinbase_id" value="<?php echo get_option('PricerrTheme_coinbase_id'); ?> "/> find this on: https://coinbase.com/oauth/applications</td> </tr> <tr> <td valign=top width="22"><?php PricerrTheme_theme_bullet(); ?> </td> <td ><?php _e('Client Secret:', 'PricerrTheme'); ?> </td> <td><input type="text" size="45" name="PricerrTheme_client_secret_key" value="<?php echo get_option('PricerrTheme_client_secret_key'); ?> "/> find this on: https://coinbase.com/oauth/applications</td> </tr> <tr> <td ></td> <td ></td> <td><input type="submit" name="PricerrTheme_save_coinbase" value="<?php _e('Save Options', 'PricerrTheme'); ?> "/></td> </tr> </table> </form> </div> <?php }