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_affiliates_admin() { $id_icon = 'icon-options-general-withdr'; $ttl_of_stuff = 'PricerrTheme - ' . __('Affiliates', 'PricerrTheme'); global $wpdb; //------------------------------------------------------ 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($_GET['tid'])) { $tm = current_time('timestamp', 0); //(); $ids = $_GET['tid']; echo '<div class="saved_thing"><div class="padd10">' . __('Payment accepted!', 'PricerrTheme') . '</div></div>'; $ss = "update " . $wpdb->prefix . "job_affiliate_commissions set paid='1', datepaid='{$tm}' where id='{$ids}'"; $wpdb->query($ss); } if (isset($_GET['hide_id'])) { $tm = time(); $ids = $_GET['hide_id']; echo '<div class="saved_thing"><div class="padd10">' . __('Payment hidden!', 'PricerrTheme') . '</div></div>'; $ss = "update " . $wpdb->prefix . "job_affiliate_commissions set showme='0' where id='{$ids}'"; $wpdb->query($ss); } if (isset($_GET['show_id'])) { $tm = time(); $ids = $_GET['show_id']; echo '<div class="saved_thing"><div class="padd10">' . __('Payment shown!', 'PricerrTheme') . '</div></div>'; $ss = "update " . $wpdb->prefix . "job_affiliate_commissions set showme='1' where id='{$ids}'"; $wpdb->query($ss); } //--------------------------------------- ?> <div id="usual2" class="usual"> <ul> <li><a href="#tabs1"><?php _e('Unpaid Commissions', 'PricerrTheme'); ?> </a></li> <li><a href="#tabs2"><?php _e('Paid Commissions', 'PricerrTheme'); ?> </a></li> <!-- <li><a href="#tabs3"><?php _e('Search Unpaid', 'PricerrTheme'); ?> </a></li> <li><a href="#tabs4"><?php _e('Search Paid', 'PricerrTheme'); ?> </a></li> --> </ul> <div id="tabs1"> <?php $s = "select * from " . $wpdb->prefix . "job_affiliate_commissions where paid='0' order by id desc"; $r = $wpdb->get_results($s); if (count($r) > 0) { ?> <table class="widefat post fixed" cellspacing="0"> <thead> <tr> <th width="12%" ><?php _e('Username', 'PricerrTheme'); ?> </th> <th><?php _e('Related Job', 'PricerrTheme'); ?> </th> <th width="20%"><?php _e('Amount', 'PricerrTheme'); ?> </th> <th><?php _e('Date', 'PricerrTheme'); ?> </th> <th width="25%"><?php _e('Options', 'PricerrTheme'); ?> </th> </tr> </thead> <tbody> <?php foreach ($r as $row) { $user = get_userdata($row->uid); $post_au = get_post($row->pid); echo '<tr>'; echo '<th>' . $user->user_login . '</th>'; echo '<th><a href="' . get_permalink($row->pid) . '">' . $post_au->post_title . '</a></th>'; echo '<th>' . pricerrtheme_get_show_price($row->amount) . '</th>'; echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>'; echo '<th>' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Paid', 'PricerrTheme') . '</a>' . ' | ' . ($row->showme == 1 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&hide_id=' . $row->id . '" class="awesome">' . __('Hide Request', 'PricerrTheme') . '</a>' : '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&show_id=' . $row->id . '" class="awesome">' . __('Show Request', 'PricerrTheme') . '</a>') . '</th>'; echo '</tr>'; } ?> </tbody> </table> <?php } else { ?> <div class="padd101"> <?php _e('There are no unpaid commissions.', 'PricerrTheme'); ?> </div> <?php } ?> </div> <div id="tabs2"> <?php $s = "select * from " . $wpdb->prefix . "job_affiliate_commissions where paid='1' order by id desc"; $r = $wpdb->get_results($s); if (count($r) > 0) { ?> <table class="widefat post fixed" cellspacing="0"> <thead> <tr> <th width="12%" ><?php _e('Username', 'PricerrTheme'); ?> </th> <th><?php _e('Related Job', 'PricerrTheme'); ?> </th> <th width="20%"><?php _e('Amount', 'PricerrTheme'); ?> </th> <th><?php _e('Date', 'PricerrTheme'); ?> </th> <th><?php _e('Date Paid', 'PricerrTheme'); ?> </th> <th width="25%"><?php _e('Options', 'PricerrTheme'); ?> </th> </tr> </thead> <tbody> <?php foreach ($r as $row) { $user = get_userdata($row->uid); $post_au = get_post($row->pid); echo '<tr>'; echo '<th>' . $user->user_login . '</th>'; echo '<th><a href="' . get_permalink($row->pid) . '">' . $post_au->post_title . '</a></th>'; echo '<th>' . pricerrtheme_get_show_price($row->amount) . '</th>'; echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>'; echo '<th>' . date('d-M-Y H:i:s', $row->datepaid) . '</th>'; echo '<th>' . ($row->showme == 1 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&hide_id=' . $row->id . '" class="awesome">' . __('Hide Request', 'PricerrTheme') . '</a>' : '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&show_id=' . $row->id . '" class="awesome">' . __('Show Request', 'PricerrTheme') . '</a>') . '</th>'; echo '</tr>'; } ?> </tbody> </table> <?php } else { ?> <div class="padd101"> <?php _e('There are no paid commissions.', 'PricerrTheme'); ?> </div> <?php } ?> </div> <div id="tabs3" style="display:none"> <form method="get" action="<?php bloginfo('siteurl'); ?> /wp-admin/admin.php"> <input type="hidden" value="withdraw-req" name="page" /> <input type="hidden" value="tabs3" name="active_tab" /> <table width="100%" class="sitemile-table"> <tr> <td><?php _e('Search User', 'PricerrTheme'); ?> </td> <td><input type="text" value="<?php echo $_GET['search_user']; ?> " name="search_user" size="20" /> <input type="submit" name="PricerrTheme_save3" value="<?php _e('Search', 'PricerrTheme'); ?> "/></td> </tr> </table> </form> <?php if (isset($_GET['PricerrTheme_save3'])) { $search_user = trim($_GET['search_user']); $user = get_userdatabylogin($search_user); $uid = $user->ID; $s = "select * from " . $wpdb->prefix . "job_withdraw where done='0' AND uid='{$uid}' order by id desc"; $r = $wpdb->get_results($s); if (count($r) > 0) { ?> <table class="widefat post fixed" cellspacing="0"> <thead> <tr> <th width="12%" ><?php _e('Username', 'PricerrTheme'); ?> </th> <th><?php _e('Method', 'PricerrTheme'); ?> </th> <th width="20%"><?php _e('Details', 'PricerrTheme'); ?> </th> <th><?php _e('Date Requested', 'PricerrTheme'); ?> </th> <th ><?php _e('Amount', 'PricerrTheme'); ?> </th> <th width="25%"><?php _e('Options', 'PricerrTheme'); ?> </th> </tr> </thead> <tbody> <?php foreach ($r as $row) { $user = get_userdata($row->uid); echo '<tr>'; echo '<th>' . $user->user_login . '</th>'; echo '<th>' . $row->methods . '</th>'; echo '<th>' . $row->payeremail . '</th>'; echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>'; echo '<th>' . PricerrTheme_get_show_price($row->amount) . '</th>'; echo '<th>' . ($row->done == 0 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'PricerrTheme') . '</a>' . ' | ' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'PricerrTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'PricerrTheme') : __("Rejected", 'PricerrTheme'))) . '</th>'; echo '</tr>'; } ?> </tbody> </table> <?php } else { ?> <div class="padd101"> <?php _e('There are no results for your search.', 'PricerrTheme'); ?> </div> <?php } } ?> </div> <div id="tabs4" style="display:none"> <form method="get" action="<?php bloginfo('siteurl'); ?> /wp-admin/admin.php"> <input type="hidden" value="withdraw-req" name="page" /> <input type="hidden" value="tabs4" name="active_tab" /> <table width="100%" class="sitemile-table"> <tr> <td><?php _e('Search User', 'PricerrTheme'); ?> </td> <td><input type="text" value="<?php echo $_GET['search_user4']; ?> " name="search_user4" size="20" /> <input type="submit" name="PricerrTheme_save4" value="<?php _e('Search', 'PricerrTheme'); ?> "/></td> </tr> </table> </form> <?php if (isset($_GET['PricerrTheme_save4'])) { $search_user = trim($_GET['search_user4']); $user = get_userdatabylogin($search_user); $uid = $user->ID; $s = "select * from " . $wpdb->prefix . "job_withdraw where done='1' AND uid='{$uid}' order by id desc"; $r = $wpdb->get_results($s); if (count($r) > 0) { ?> <table class="widefat post fixed" cellspacing="0"> <thead> <tr> <th width="12%" ><?php _e('Username', 'PricerrTheme'); ?> </th> <th><?php _e('Method', 'PricerrTheme'); ?> </th> <th width="20%"><?php _e('Details', 'PricerrTheme'); ?> </th> <th><?php _e('Date Requested', 'PricerrTheme'); ?> </th> <th ><?php _e('Amount', 'PricerrTheme'); ?> </th> <th width="25%"><?php _e('Options', 'PricerrTheme'); ?> </th> </tr> </thead> <tbody> <?php foreach ($r as $row) { $user = get_userdata($row->uid); echo '<tr>'; echo '<th>' . $user->user_login . '</th>'; echo '<th>' . $row->methods . '</th>'; echo '<th>' . $row->payeremail . '</th>'; echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>'; echo '<th>' . PricerrTheme_get_show_price($row->amount) . '</th>'; echo '<th>' . ($row->done == 0 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'PricerrTheme') . '</a>' . ' | ' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'PricerrTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'PricerrTheme') : __("Rejected", 'PricerrTheme'))) . '</th>'; echo '</tr>'; } ?> </tbody> </table> <?php } else { ?> <div class="padd101"> <?php _e('There are no results for your search.', 'PricerrTheme'); ?> </div> <?php } } ?> </div> <?php echo '</div>'; }
<li> <h2> <?php _e("Feature job?", 'PricerrTheme'); ?> :</h2> <p><input type="checkbox" class="do_input" name="featured" value="1" <?php if ($featured == "1") { echo 'checked="checked"'; } ?> /> <?php $PricerrTheme_new_job_feat_listing_fee = get_option('PricerrTheme_new_job_feat_listing_fee'); $PricerrTheme_new_job_feat_listing_fee = PricerrTheme_get_show_price($PricerrTheme_new_job_feat_listing_fee); echo sprintf(__("By clicking this checkbox you mark your job as featured. Extra fee of %s is applied.", 'PricerrTheme'), $PricerrTheme_new_job_feat_listing_fee); ?> </p> </li> <?php $PricerrTheme_enable_extra = get_option('PricerrTheme_enable_extra'); if ($PricerrTheme_enable_extra != "no") { ?> <li class="xtra_stuff"><div class="padd10"> <table width="100%"> <?php $sts = get_option('PricerrTheme_get_total_extras');
$mypost = array(); $mypost['ID'] = $pid; $mypost['post_status'] = 'publish'; wp_update_post($mypost); } } ?> <?php } else { ?> <span class="skl_pay_feat"> <?php echo sprintf(__('You are about to pay for the listing fee using your balance. <br/>The fee is <b>%s</b>. Your current credit amount is %s.', 'PricerrTheme'), PricerrTheme_get_show_price($prc), $cr); ?> </span> <br/><br/> <?php $using_permalinks = PricerrTheme_using_permalinks(); if ($using_permalinks) { $bklnk = get_permalink(get_option('PricerrTheme_pay_for_posting_job_page_id')) . "?jobid=" . $pid; } else { $bklnk = get_bloginfo('siteurl') . "/?page_id=" . get_option('PricerrTheme_pay_for_posting_job_page_id') . "&jobid=" . $pid; } //------------------------------------------------------------------------------------------------------------------------------ echo '<a class="payment_feat" href="' . get_bloginfo('siteurl') . '/?jb_action=pay_featured_credits&confirm=yes&jobid=' . $pid . '">' . __('Confirm Payment', 'PricerrTheme') . '</a> '; echo '<a class="payment_feat" href="' . $bklnk . '">' . __('Go Back', 'PricerrTheme') . '</a> ';
?> <div id="content"> <div class="my_box3"> <div class="padd10"> <div class="box_title"><?php echo __("Purchase with your balance", 'PricerrTheme'); ?> </div> <div class="box_content"> <?php echo sprintf(__('You have %s in your balance. Click confirm now to pay using your balance.', 'PricerrTheme'), PricerrTheme_get_show_price($crds)); ?> <br/><br/> <?php echo '<a href="' . get_bloginfo('siteurl') . '/?pay_for_item=credits&jobid=' . $pid . '&confirm=1&extras=' . $_GET['extras'] . '">' . __('Confirm Purchase', 'PricerrTheme') . '</a>'; ?> </div> </div> </div> </div>
function PricerrTheme_show_sale($row) { $pid = $row->pid; $post = get_post($row->pid); $max_days = get_post_meta($pid, 'max_days', true); $date_made = $row->date_made; $sold = date("D jS \\of F Y", $date_made); $expected = date("D jS \\of F Y", $date_made + 24 * 3600 * $max_days); global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $delivered = 0; if ($row->done_seller == 1) { $delivered = 1; } $id = $row->id; $closed = $row->closed; $completed = 0; if ($row->done_buyer == 1) { $completed = 1; } $can_request_closed = 1; if ($closed == 1) { $can_request_closed = 0; } //--------------------------------- ?> <div class="post" id="post-<?php echo $id; ?> "> <div class="padd10_only"> <div class="image_holder3"> <a href="<?php the_permalink(); ?> "><img width="65" height="50" class="<?php echo $img_class; ?> " src="<?php echo PricerrTheme_get_first_post_image($pid, 65, 50); ?> " /></a> </div> <div class="title_holder3" > <h2> <?php $days_needed = get_post_meta($pid, 'max_days', true); $instant = get_post_meta($pid, 'instant', true); if ($days_needed == 1) { echo '<span class="express_job_spn">' . __('Express', 'PricerrTheme') . '</span>'; } if ($instant == 1) { echo '<span class="instant_job_spn">' . __('Instant Delivery', 'PricerrTheme') . '</span>'; } ?> <a href="<?php echo get_permalink($pid); ?> " rel="bookmark" title=""> <?php echo PricerrTheme_wrap_the_title($post->post_title, $pid); ?> </a> </h2> <div class="sold_on"><?php echo sprintf(__("Sold on: %s", "PricerrTheme"), $sold); ?> ♦ <?php echo sprintf(__(" Expected Delivery: %s", "PricerrTheme"), $expected); ?> ♦ <?php echo sprintf(__("Order ID: #%s", "PricerrTheme"), $row->id); ?> </div> <?php if ($can_request_closed == 1) { if ($row->accept_cancellation_request != -1) { if ($row->request_cancellation_from_seller == 0 and $row->request_cancellation_from_buyer == 0) { ?> <a href="<?php echo get_bloginfo('siteurl'); ?> /?jb_action=request_mutual_cancelation&orderid=<?php echo $row->id; ?> " class="show_status"><?php _e("Request Mutual Cancelation", "PricerrTheme"); ?> </a> <?php } ?> <?php if ($row->request_cancellation_from_buyer == 1) { ?> <br/> <?php $using_perm = PricerrTheme_using_permalinks(); if ($using_perm) { $lnk7 = get_permalink(get_option('PricerrTheme_my_account_mutual_cancellation')) . "?oid=" . $row->id; } else { $lnk7 = get_permalink(get_option('PricerrTheme_my_account_mutual_cancellation')) . "&oid=" . $row->id; } $ss = $row->message_to_seller; $dt = date_i18n('d-M-Y H:i:s', $row->date_request_cancellation); printf(__('The buyer of this job has requested a mutual cancellation for this job on %s. <br/>Buyer\'s Message: <span class="en_em">%s</span> <br/><br/> <b><a href="%s">Answer this request</a></b>.', 'PricerrTheme'), $dt, $ss, $lnk7); ?> <br/><br/> <?php } ?> <?php if ($row->request_cancellation_from_seller == 1) { $dt = date_i18n('d-M-Y H:i:s', $row->date_request_cancellation); printf(__('You have requested a mutual cancellation on this job on %s. Waiting the buyer\' reply.', 'PricerrTheme'), $dt); echo '<br/><br/>'; } ?> <?php } } ?> <?php if ($delivered == 0 && $closed != 1) { if ($row->request_cancellation_from_seller == 0 and $row->request_cancellation_from_buyer == 0) { ?> <a href="<?php echo get_bloginfo('siteurl'); ?> /?jb_action=mark_delivered&oid=<?php echo $row->id; ?> " class="show_status"><?php _e("Mark as Delivered", "PricerrTheme"); ?> </a> <a href="#" class="show_status cancel_order" rel="<?php echo $row->id; ?> "><?php _e("Cancel Order", "PricerrTheme"); ?> </a> <?php } } elseif ($completed != 1 && $closed != 1) { ?> <span style="font-size:10px;"><em> <?php _e('Waiting for the buyer to confirm.', 'PricerrTheme'); ?> </em></span> <?php } ?> <a href="<?php echo get_permalink(get_option('PricerrTheme_my_account_priv_mess_page_id')); ?> ?priv_act=send&pid=<?php echo $row->pid; ?> &uid=<?php echo $row->uid; ?> " class="show_status"><?php _e("Contact Buyer", "PricerrTheme"); ?> </a> <a href="<?php bloginfo('siteurl'); ?> ?jb_action=chat_box&oid=<?php echo $row->id; ?> " class="show_buyer_notes" rel="<?php echo $id; ?> "><?php _e("Conversation Page", "PricerrTheme"); ?> </a> <br/><br/> <?php $instruction_box = get_post_meta($pid, 'instruction_box', true); if (!empty($instruction_box)) { echo '<br/><br/>' . sprintf(__('Instructions for the buyer: %s', 'PricerrTheme'), $instruction_box); } $instant = get_post_meta($pid, 'instant', true); if ($instant == "1") { $args = array('order' => 'ASC', 'orderby' => 'post_date', 'post_type' => 'attachment', 'post_parent' => $pid, 'post_mime_type' => 'application/zip', 'numberposts' => -1); $i = 0; $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { $url = wp_get_attachment_url($attachment->ID); $dnls = "<a href='" . $url . "' target='_blank'>" . $attachment->post_title . "</a>"; } } echo ' ' . sprintf(__('Download File: <b>%s</b>', 'PricerrTheme'), $dnls) . " <br/>"; } if ($row->extra1 == 1) { $extra_price = get_post_meta($pid, 'extra1_price', true); $extra_content = get_post_meta($pid, 'extra1_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra2 == 1) { $extra_price = get_post_meta($pid, 'extra2_price', true); $extra_content = get_post_meta($pid, 'extra2_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra3 == 1) { $extra_price = get_post_meta($pid, 'extra3_price', true); $extra_content = get_post_meta($pid, 'extra3_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra4 == 1) { $extra_price = get_post_meta($pid, 'extra4_price', true); $extra_content = get_post_meta($pid, 'extra4_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra5 == 1) { $extra_price = get_post_meta($pid, 'extra5_price', true); $extra_content = get_post_meta($pid, 'extra5_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra6 == 1) { $extra_price = get_post_meta($pid, 'extra6_price', true); $extra_content = get_post_meta($pid, 'extra6_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra7 == 1) { $extra_price = get_post_meta($pid, 'extra7_price', true); $extra_content = get_post_meta($pid, 'extra7_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra8 == 1) { $extra_price = get_post_meta($pid, 'extra8_price', true); $extra_content = get_post_meta($pid, 'extra8_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra9 == 1) { $extra_price = get_post_meta($pid, 'extra9_price', true); $extra_content = get_post_meta($pid, 'extra9_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } if ($row->extra10 == 1) { $extra_price = get_post_meta($pid, 'extra10_price', true); $extra_content = get_post_meta($pid, 'extra10_content', true); echo '<span class="my_extr_sh">' . $extra_content . " - " . PricerrTheme_get_show_price($extra_price) . "</span><br/>"; } ?> </div></div> <div class="close_order_div" id="cancel_order_div_id_<?php echo $row->id; ?> "><div class="padd10"> <!-- <div class="box_title_special"><?php _e('Request Cancellation', 'PricerrTheme'); ?> </div> <form method="post" action="<?php bloginfo('siteurl'); ?> /?jb_action=cancel_job_request"> <input type="hidden" value="<?php echo $row->id; ?> " name="orderid" /> <table> <tr><td colspan="2"><?php _e('By using this option you are asking the buyer to cancel the order. If he agrees with this, and cancels the order, the money gets refunded into his account and you will not get a bad review over it.', 'PricerrTheme'); ?> </td></tr> <tr> <td valign="top" width="120"><?php _e('Message for Buyer', 'PricerrTheme'); ?> :</td> <td><textarea rows="3" cols="50" name="message_to_buyer" ></textarea></td> </tr> <tr> <td valign="top" width="120"> </td> <td><input type="submit" name="request_cancellation" value="<?php _e('Submit', 'PricerrTheme'); ?> " /></td> </tr> </table> </form> --> <div class="clear10"></div> <div class="box_title_special"><?php _e('Force Cancellation', 'PricerrTheme'); ?> </div> <form method="post" action="<?php bloginfo('siteurl'); ?> /?jb_action=cancel_job_request"> <input type="hidden" value="<?php echo $row->id; ?> " name="orderid" /> <table> <tr><td colspan="2"><?php _e("By using this option you are forcing cancelling this order. The money gets refunded into the buyer's account, and you will get a bad review over the job.", 'PricerrTheme'); ?> </td></tr> <tr> <td valign="top" width="120"> </td> <td><input type="submit" name="force_cancellation" value="<?php _e('Submit', 'PricerrTheme'); ?> " /></td> </tr> </table> </form> </div></div> </div> <?php }
function PricerrTheme_post_new_area_function() { global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $PricerrTheme_post_new_page_id = get_option('PricerrTheme_post_new_page_id'); //-******************************************************************************* $pid = $_GET['jobid']; global $post_PID, $post_new_error, $adOK; $post_PID = $pid; $post = get_post($pid); $location = wp_get_object_terms($pid, 'job_location'); $cat = wp_get_object_terms($pid, 'job_cat'); global $current_user; get_currentuserinfo(); $cid = $current_user->ID; $post = get_post($pid); //-********************************************************************************* $shipping = trim($_POST['shipping']); $max_days = trim($_POST['max_days']); $ttl = empty($_SESSION['i_will']) ? $post->post_title : $_SESSION['i_will']; //--------------------- ?> <?php $ttl = empty($_SESSION['i_will']) ? $post->post_title == "Auto Draft" ? "" : get_post_meta($post->ID, 'title_variable', true) : $_SESSION['i_will']; ?> <div class="my_new_box_title"><?php echo __("Host New Listing", 'PricerrTheme'); ?> </div> <div id="content"> <div class="my_box3" style="overflow:hidden"> <div class="box_content" id="post_new_divs"> <?php if (is_array($post_new_error)) { if ($adOK == 0) { echo '<div class="errrs">'; foreach ($post_new_error as $e) { echo '<div class="newad_error">' . $e . '</div>'; } echo '</div>'; } } ?> <script type="text/javascript"> function delete_this(id) { $.ajax({ method: 'get', url : '<?php echo get_bloginfo('siteurl'); ?> /index.php/?_ad_delete_pid='+id, dataType : 'text', success: function (text) { $('#image_ss'+id).remove(); window.location.reload(); } }); //alert("a"); } </script> <ul class="post-new"> <form method="post" enctype="multipart/form-data" action="<?php echo PricerrTheme_post_new_with_pid_stuff_thg($pid); ?> "> <li> <h2><?php echo __('Listing Title', 'PricerrTheme'); ?> :</h2> <p><textarea rows="3" class="do_input" name="job_title" cols="40"><?php echo stripslashes($ttl); ?> </textarea> </p> </li> <li> <h2><?php echo __('Pre-Screen Criteria', 'PricerrTheme'); ?> :</h2> <p> <select name="pre_screen_type" id="pre_screen_type" class="do_input"> <option value>Select Minimum Accepted Badge Level</option> <option value="Level 1 - Identity Verified">Level 1: Identity Verified</option> <option value="Level 2 - Insurance Verified">Level 2: Insurance Verified</option> <option value="Level 3 - Average 4-Star Community Rating or Better">Level 3: Average 4-Star Community Rating or Better</option> <option value="Level 4 - Power User (10+ 5-Star Reviews) ">Level 4: Power User (10+ 5-Star Reviews) </option> <option value="Private Network - By Host Invite Only">Private Network: By Host Invite Only</option> </select> </p> </li> <li> <h2><?php echo __('Cancellation Policy', 'PricerrTheme'); ?> :</h2> <p> <select name="instrument_type" id="instrument_type" class="do_input"> <option value>Choose Cancellation Policy</option> <option value="Flexible">Flexible</option> <option value="Moderate">Moderate</option> <option value="Strict">Strict</option> <option value="Very Strict">Very Strict</option> <option value="Other">Other</option> </select> </p> </li> <li> <h2><?php echo __('Price:', 'PricerrTheme'); ?> </h2> <p> <?php $PricerrTheme_enable_dropdown_values = get_option('PricerrTheme_enable_dropdown_values'); $PricerrTheme_enable_free_input_box = get_option('PricerrTheme_enable_free_input_box'); $x = isset($_POST['job_cost']) ? $_POST['job_cost'] : $_SESSION['job_cost']; if ($PricerrTheme_enable_free_input_box == "yes") { if (PricerrTheme_show_price_in_front() == true) { echo PricerrTheme_get_currency(); } echo ' <input type="text" name="price_per_hour" class="do_input" value="0" size="5" /> / hour </br>'; echo PricerrTheme_get_currency(); echo ' <input type="text" name="price_per_day" class="do_input" value="0" size="5" /> / day </br>'; echo PricerrTheme_get_currency(); echo ' <input type="text" name="price_per_week" class="do_input" value="0" size="5" /> / week </br>'; echo PricerrTheme_get_currency(); echo ' <input type="text" name="price_per_month" class="do_input" value="0" size="5" /> / month </br>'; echo ' $0 = inactive'; //echo ' <input type="text" name="job_cost" class="do_input" value="'.$_SESSION['job_cost'].'" size="5" /> / hour'; if (PricerrTheme_show_price_in_front() == false) { echo PricerrTheme_get_currency(); } } elseif ($PricerrTheme_enable_dropdown_values == "yes") { echo PricerrTheme_get_variale_cost_dropdown('do_input', $x); } else { echo PricerrTheme_get_show_price(get_option('PricerrTheme_job_fixed_amount')); } ?> </li> <script> function display_subcat(vals) { $.post("<?php bloginfo('siteurl'); ?> /?get_subcats_for_me=1", {queryString: ""+vals+""}, function(data){ if(data.length >0) { $('#sub_cats').html(data); } }); } </script> <li> <h2><?php echo __('Category', 'PricerrTheme'); ?> :</h2> <p><?php echo PricerrTheme_get_categories_clck("job_cat", !isset($_POST['job_cat_cat']) ? is_array($cat) ? $cat[0]->term_id : "" : htmlspecialchars($_POST['job_cat_cat']), __('Select Category', 'PricerrTheme'), "do_input", 'onchange="display_subcat(this.value)"'); echo '<br/><span id="sub_cats">'; if (!empty($cat[1]->term_id)) { $args2 = "orderby=name&order=ASC&hide_empty=0&parent=" . $cat[0]->term_id; $sub_terms2 = get_terms('job_cat', $args2); $ret = '<select class="do_input" name="subcat">'; $ret .= '<option value="">' . __('Select Subcategory', 'PricerrTheme') . '</option>'; $selected1 = $cat[1]->term_id; foreach ($sub_terms2 as $sub_term2) { $sub_id2 = $sub_term2->term_id; $ret .= '<option ' . ($selected1 == $sub_id2 ? "selected='selected'" : " ") . ' value="' . $sub_id2 . '">' . $sub_term2->name . '</option>'; } $ret .= "</select>"; echo $ret; } echo '</span>'; ?> </p> </li> <li> <h2><?php echo __('Hosting Location:', 'PricerrTheme'); ?> </h2> <p> <?php $locs = get_user_meta($uid, 'user_location', true); echo PricerrTheme_get_categories("job_location", !isset($_POST['job_location_cat']) ? $locs : htmlspecialchars($_POST['job_location_cat']), __('Select Location', 'PricerrTheme'), "do_input"); ?> </p> </li> <li> <h2><?php echo __('Manufacturer (if applicable):', 'PricerrTheme'); ?> </h2> <p> <input type="text" size="35" class="do_input" name="manufacturer" value="" placeholder="e.g. Illumina" /> </p> </li> <li> <h2><?php echo __('Model (if applicable):', 'PricerrTheme'); ?> </h2> <p> <input type="text" size="35" class="do_input" name="model" value="" placeholder="e.g. MiSeq" /> </p> </li> <li> <h2><?php echo __('Applications:', 'PricerrTheme'); ?> </h2> <p> <input type="text" size="35" class="do_input" name="applications" value="" placeholder="e.g. High-Speed, Multiplexed 16S Amplicon Sequencing" /> </p> </li> <li><h2><?php echo __('Description:', 'PricerrTheme'); ?> </h2> <p><textarea rows="6" cols="45" class="do_input" name="job_description"><?php echo empty($_POST['job_description']) ? stripslashes($post->post_content) : stripslashes($_POST['job_description']); ?> </textarea><br/> <?php _e('Min: 100 chars. Max: 500', 'PricerrTheme'); ?> </p> </li> <?php $instruction_box = get_post_meta($pid, 'instruction_box', true); ?> <li><h2><?php echo __('Additional Terms:', 'PricerrTheme'); ?> </h2> <p><textarea rows="6" cols="45" class="do_input" name="instruction_box"><?php echo empty($_POST['instruction_box']) ? trim(stripslashes($instruction_box)) : htmlspecialchars(stripslashes($_POST['instruction_box'])); ?> </textarea></p> </li> <li> <h2><?php echo __('Keywords', 'PricerrTheme'); ?> :</h2> <p><input type="text" size="50" class="do_input" name="job_tags" value="<?php echo $job_tags; ?> " /> <br/>*<?php _e('separate your keywords by commas', 'PricerrTheme'); ?> </p> </li> <?php $PricerrTheme_enable_shipping = get_option('PricerrTheme_enable_shipping'); if ($PricerrTheme_enable_shipping == "yes") { ?> <!--li> <h2><?php // echo __('Requires shipping?', 'PricerrTheme'); ?> </h2> <p> <?php //if(PricerrTheme_show_price_in_front()) //echo PricerrTheme_get_currency(); ?> <input type="text" size="5" class="do_input" name="shipping" value="<?php //echo (empty($shipping) ? get_post_meta($pid,'shipping',true) : $shipping ); ?> " /> <?php //if(!PricerrTheme_show_price_in_front()) // echo PricerrTheme_get_currency(); ?> </p> </li--> <?php //do_action('PricerrTheme_after_shipping_field',$pid); ?> <?php } ?> <!--li> <h2><?php //echo __('Max Days to Deliver', 'PricerrTheme'); ?> </h2> <p><input type="text" size="10" class="do_input" name="max_days" value="<?php //echo (empty($max_days) ? get_post_meta($pid,'max_days',true) : $max_days ); ?> " /> </p> </li--> <?php $pricerrtheme_enable_instant_deli = get_option('pricerrtheme_enable_instant_deli'); if ($pricerrtheme_enable_instant_deli != "no") { ?> <li> <h2><?php echo __('Attach Own Legal Docs (if preferred)', 'PricerrTheme'); ?> </h2> <p> <?php $args = array('order' => 'ASC', 'orderby' => 'post_date', 'post_type' => 'attachment', 'post_parent' => $pid, 'post_mime_type' => 'application/zip', 'numberposts' => -1); $i = 0; $attachments = get_posts($args); if (count($attachments) == 0) { ?> <input type="file" class="do_input" name="file_instant" /> (<?php _e('Only ZIP Files', 'PricerrTheme'); ?> ) <?php } else { if ($attachments) { foreach ($attachments as $attachment) { $url = wp_get_attachment_url($attachment->ID); echo '<p class="div_div2" id="image_ss' . $attachment->ID . '">' . $attachment->post_title . ' <a href="javascript: void(0)" onclick="delete_this(\'' . $attachment->ID . '\')"><img border="0" src="' . get_bloginfo('template_url') . '/images/delete_icon.png" /></a> </p>'; } } } ?> </p> </li> <?php } ?> <li> <h2><?php echo __('Photos', 'PricerrTheme'); ?> :</h2> <p> <?php $args = array('order' => 'ASC', 'orderby' => 'post_date', 'post_type' => 'attachment', 'post_parent' => $pid, 'post_mime_type' => 'image', 'numberposts' => -1); $i = 0; $attachments = get_posts($args); $default_nr = get_option('PricerrTheme_default_nr_of_pics'); if (empty($default_nr)) { $default_nr = 5; } $actual_nr = count($attachments); $dis = $default_nr - $actual_nr; for ($i = 1; $i <= $dis; $i++) { ?> <input type="file" class="do_input" name="file_<?php echo $i; ?> " /> <?php } ?> </p> </li> <li> <div id="thumbnails" style="overflow:hidden;"> <?php if ($pid > 0) { if ($attachments) { foreach ($attachments as $attachment) { $url = wp_get_attachment_url($attachment->ID); echo '<div class="div_div" id="image_ss' . $attachment->ID . '"><img width="70" class="image_class" height="70" src="' . PricerrTheme_generate_thumb($url, 70, 70) . '" /> <a href="javascript: void(0)" onclick="delete_this(\'' . $attachment->ID . '\')"><img border="0" src="' . get_bloginfo('template_url') . '/images/delete_icon.png" /></a> </div>'; } } } ?> </div> </li> <?php do_action('PricerrTheme_before_youtube_links'); ?> <?php global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $user_level = PricerrTheme_get_user_level($uid); $sts = get_option('PricerrTheme_level' . $user_level . '_vds'); if ($sts > 3) { $sts = 3; } for ($i = 1; $i <= $sts; $i++) { ?> <li> <h2><?php echo sprintf(__('Youtube Video Link #%s', 'PricerrTheme'), $i); ?> :</h2> <p><input type="text" size="50" name="youtube_link<?php echo $i; ?> " class="do_input" value="<?php echo get_post_meta($pid, 'youtube_link' . $i, true); ?> " /></p> </li> <?php } ?> <?php do_action('PricerrTheme_after_youtube_links'); ?> <li> <h2> <?php _e("Feature Listing?", 'PricerrTheme'); ?> </h2> <p><input type="checkbox" class="do_input" name="featured" value="1" <?php $featured = get_post_meta($pid, 'featured', true); echo $featured == "1" ? 'checked="checked"' : ""; ?> /> <?php $PricerrTheme_new_job_feat_listing_fee = get_option('PricerrTheme_new_job_feat_listing_fee'); $PricerrTheme_new_job_feat_listing_fee = PricerrTheme_get_show_price($PricerrTheme_new_job_feat_listing_fee); echo sprintf(__("By clicking this checkbox you mark your listing as featured. Extra fee of %s is applied.", 'PricerrTheme'), $PricerrTheme_new_job_feat_listing_fee); ?> </p> </li> <li> <h1><?php echo __('<h1><u><i>Labmenities™</i></u></h1>', 'PricerrTheme'); ?> </h1> </li> <li> <h2><?php echo __('Concierge Services', 'PricerrTheme'); ?> :</h2> <p> <input type="checkbox" name="lbcs_training" value="1" />Training<br> <input type="checkbox" name="lbcs_setup" value="1">Setup<br> <input type="checkbox" name="lbcs_sample_presentation" value="1" />Sample Presentation<br> <input type="checkbox" name="lbcs_sample_storage" value="1" />Sample Storage<br> <input type="checkbox" name="lbcs_troubleshooting" value="1" />Troubleshooting<br> <input type="checkbox" name="lbcs_decontamination" value="1" />Decontamination<br> <input type="checkbox" name="lbcs_experimental_design" value="1" />Experimental Design<br> <input type="checkbox" name="lbcs_data_analysis" value="1" />Data Analysis </p> </li> <li> <h2><?php echo __('Reagents & Consumables', 'PricerrTheme'); ?> :</h2> <p> <input type="checkbox" name="rac_stock_buffers" value="1" />Stock Buffers<br> <input type="checkbox" name="rac_liquid_nitrogen" value="1">Liquid Nitrogen<br> <input type="checkbox" name="rac_eaft" value="1" />Eppi & Falcon Tubes<br> <input type="checkbox" name="rac_other" value="1" />Other </p> </li> <li> <h2><?php echo __('Workstation Software', 'PricerrTheme'); ?> :</h2> <p> <input type="checkbox" name="wsa_pipeline_pilot" value="1" />Bioinformatics<br> <input type="checkbox" name="wsa_chemdraw" value="1">Structure Drawing Package<br> <input type="checkbox" name="wsa_nmr_processor" value="1" />Spectral Processing<br> <input type="checkbox" name="wsa_other" value="1" />Other </p> </li> <?php $PricerrTheme_enable_extra = get_option('PricerrTheme_enable_extra'); if ($PricerrTheme_enable_extra != "no") { $sts = get_option('PricerrTheme_get_total_extras'); if (empty($sts)) { $sts = 3; } global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $user_level = PricerrTheme_get_user_level($uid); $sts = get_option('PricerrTheme_level' . $user_level . '_extras'); if ($sts > 0) { ?> <!--li class="xtra_stuff"><div class="padd10"> <table width="100%"> <?php for ($i = 1; $i <= $sts; $i++) { ?> <tr><td> <?php _e('For an extra', 'PricerrTheme'); ?> <?php if (PricerrTheme_show_price_in_front() == true) { echo PricerrTheme_get_currency(); } ?> <input type="text" size="3" name="extra<?php echo $i; ?> _price" value="<?php echo stripslashes(get_post_meta($pid, 'extra' . $i . '_price', true)); ?> " /> <?php if (PricerrTheme_show_price_in_front() == false) { echo PricerrTheme_get_currency(); } ?> <?php _e('I will:', 'PricerrTheme'); ?> </td><td> <textarea name="extra<?php echo $i; ?> _content" cols="40" rows="2"><?php echo stripslashes(get_post_meta($pid, 'extra' . $i . '_content', true)); ?> </textarea> </td></tr> <?php } ?> </table> </div> </li--> <?php } } ?> <li> <h2> </h2> <p><input type="submit" name="Pricerr_post_new_job" value="<?php _e("Submit Rental", 'PricerrTheme'); ?> " /></p> </li> </form> </ul> </div></div> </div> <!-- ################### --> <div id="right-sidebar"> <ul class="xoxo"> <?php dynamic_sidebar('other-page-area'); ?> </ul> </div> <?php }
function PricerrTheme_my_account_payments_area_function() { global $current_user, $wpdb; get_currentuserinfo(); $uid = $current_user->ID; $using_perm = PricerrTheme_using_permalinks(); if ($using_perm) { $pay_pg_lnk = get_permalink(get_option('PricerrTheme_my_account_payments_page_id')) . "/?"; } else { $pay_pg_lnk = get_bloginfo('siteurl') . "/?page_id=" . get_option('PricerrTheme_my_account_payments_page_id') . "&"; } //------------------------------------- ?> <div id="content"> <!-- page content here --> <div class="my_box3"> <div class="padd10"> <div class="box_title3"><?php _e("My Payments", 'PricerrTheme'); ?> </div> <div class="padd10"> <a class="green_btn" href="<?php echo $pay_pg_lnk; ?> pg=withdraw"><?php _e('Withdraw Money', 'PricerrTheme'); ?> </a> <a class="green_btn" href="<?php echo $pay_pg_lnk; ?> pg=transactions"><?php _e('Transactions', 'PricerrTheme'); ?> </a> </div> <div class="clear10"></div> <div class="clear10"></div> <?php $pg = $_GET['pg']; if (!isset($pg)) { $pg = 'home'; } global $wpdb; if ($_GET['pg'] == 'closewithdrawal') { $id = $_GET['id']; $s = "select * from " . $wpdb->prefix . "job_withdraw where id='{$id}' AND uid='{$uid}'"; $r = $wpdb->get_results($s); if (count($r) == 1) { $row = $r[0]; $amount = $row->amount; $cr = PricerrTheme_get_credits($uid); PricerrTheme_update_credits($uid, $cr + $amount); $s = "delete from " . $wpdb->prefix . "job_withdraw where id='{$id}' AND uid='{$uid}'"; $wpdb->query($s); echo __('Request canceled!', 'PricerrTheme') . '<br/><br/>'; } } if ($pg == 'home') { ?> <?php $bal = PricerrTheme_get_credits($uid); echo '<h1 class="balance">' . sprintf(__("Your Current Balance is: %s", "PricerrTheme"), PricerrTheme_get_show_price($bal)) . "</h1>"; ?> <div class="clear10"></div> <div class="box_title"><?php _e('Pending Withdrawals', 'PricerrTheme'); ?> </div> <div class="padd10"> <?php global $wpdb; //---------------- $s = "select * from " . $wpdb->prefix . "job_withdraw where done='0' AND uid='{$uid}' order by id desc"; $r = $wpdb->get_results($s); if (count($r) == 0) { echo __('No withdrawals pending yet.', 'PricerrTheme'); } else { echo '<table width="100%">'; foreach ($r as $row) { echo '<tr>'; echo '<td>' . date('d-M-Y H:i:s', $row->datemade) . '</td>'; echo '<td>' . PricerrTheme_get_show_price($row->amount) . ' ' . '</td>'; echo '<td>' . $row->payeremail . '</td>'; echo '<td><a href="' . $pay_pg_lnk . 'pg=closewithdrawal&id=' . $row->id . '" class="green_btn">' . __('Close Request', 'PricerrTheme') . '</a></td>'; echo '</tr>'; } echo '</table>'; } ?> </div> <!-- ###################### --> <div class="clear10"></div> <div class="box_title"><?php _e("Pending Incoming Payments", "PricerrTheme"); ?> </div> <div class="padd10"> <?php global $current_user; get_currentuserinfo(); $uid = $current_user->ID; global $wpdb; $prefix = $wpdb->prefix; $s = "select distinct * from " . $prefix . "job_orders orders, " . $prefix . "posts posts\r\n\t\t\t\t\t where posts.post_author='{$uid}' AND posts.ID=orders.pid AND orders.done_seller='0' AND \r\n\t\t\t\t\t orders.done_buyer='0' AND orders.date_finished='0' AND orders.closed='0' order by orders.id desc"; $r = $wpdb->get_results($s); if (count($r) == 0) { echo __('No payments pending yet.', 'PricerrTheme'); } else { echo '<table width="100%">'; foreach ($r as $row) { $post = get_post($row->pid); $from = get_userdata($row->uid); echo '<tr>'; echo '<td>' . $from->user_login . '</td>'; echo '<td><a href="' . get_permalink($row->pid) . '">' . $post->post_title . '</a></td>'; echo '<td>' . date_i18n('d-M-Y H:i:s', $row->date_made) . '</td>'; echo '<td>' . PricerrTheme_get_show_price($row->mc_gross) . '</td>'; echo '</tr>'; } echo '</table>'; } ?> </div> <?php } elseif ($pg == 'withdraw') { ?> <div class="box_title"><?php _e("Request Withdrawal", "PricerrTheme"); ?> </div> <div class="padd10"> <?php $bal = PricerrTheme_get_credits($uid); echo '<span class="balance">'; printf(__('Your Current Balance is: %s', 'PricerrTheme'), PricerrTheme_get_show_price($bal)); echo "</span><br/><br/>"; if (isset($_POST['withdraw']) or isset($_POST['withdraw2']) or isset($_POST['withdraw3']) or isset($_POST['withdraw4']) or isset($_POST['withdraw5']) or isset($_POST['withdraw6']) or isset($_POST['withdraw7'])) { $amount = trim($_POST['amount']); $paypal = trim($_POST['paypal']); if (isset($_POST['withdraw2'])) { $amount = trim($_POST['amount2']); } if (isset($_POST['withdraw3'])) { $amount = trim($_POST['amount3']); } if (isset($_POST['withdraw4'])) { $amount = trim($_POST['amount4']); } if (isset($_POST['withdraw5'])) { $amount = trim($_POST['amount5']); } if (isset($_POST['withdraw6'])) { $amount = trim($_POST['amount6']); } if (isset($_POST['withdraw7'])) { $amount = trim($_POST['amount7']); } $PricerrTheme_withdraw_limit = get_option('PricerrTheme_withdraw_limit'); if (empty($PricerrTheme_withdraw_limit) or !is_numeric($PricerrTheme_withdraw_limit)) { $PricerrTheme_withdraw_limit = 10; } if (!is_numeric($amount) || $amount < 0) { echo '<span class="error">' . __('ERROR: Provide a well formated amount.', 'PricerrTheme') . '</span>'; } else { if (PricerrTheme_isValidEmail($paypal) == false) { echo '<span class="error">' . __('ERROR: Invalid email provided.', 'PricerrTheme') . '</span>'; } else { if ($amount < $PricerrTheme_withdraw_limit) { echo '<span class="error">' . sprintf(__('ERROR: The amount must be higher than: %s.', 'PricerrTheme'), PricerrTheme_get_show_price($PricerrTheme_withdraw_limit)) . '</span>'; } else { $min = get_option('PricerrTheme_withdraw_limit'); if ($min == 0) { $min = "0"; } if (empty($min)) { $min = 10; } if ($bal < $amount) { echo '<span class="error">' . __('ERROR: Your balance is smaller than the amount requested.', 'PricerrTheme') . '</span>'; } else { $method = "PayPal"; if (isset($_POST['withdraw2'])) { $method = "Moneybookers"; } if (isset($_POST['withdraw3'])) { $method = "Payza"; } $method = apply_filters('PricerrTheme_withdraw_method', $method); $tm = current_time('timestamp', 0); global $wpdb; if (!empty($_POST['tm_tm'])) { $tm = $_POST['tm_tm']; } $s = "select * from " . $wpdb->prefix . "job_withdraw where uid='{$uid}' AND datemade='{$tm}'"; $r = $wpdb->get_results($s); if (count($r) == 0) { $s = "insert into " . $wpdb->prefix . "job_withdraw (payeremail, methods, amount, datemade, uid) \r\n\t\t\t\t\t\t\t\tvalues('{$paypal}', '{$method}','{$amount}','{$tm}','{$uid}')"; $wpdb->query($s); $cr = PricerrTheme_get_credits($uid); PricerrTheme_update_credits($uid, $cr - $amount); //----------------------- PricerrTheme_send_email_when_withdraw_requested($uid, $method, PricerrTheme_get_show_price($amount)); //----------------------- } echo '<span class="balance">' . __('Your request has been queued. Redirecting...', 'PricerrTheme') . '</span>'; $url_redir = $pay_pg_lnk; echo '<meta http-equiv="refresh" content="2;url=' . $url_redir . '" />'; } } } } } global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $opt = get_option('PricerrTheme_paypal_enable'); if ($opt == "yes") { ?> <br /><br /> <table> <form method="post" enctype="application/x-www-form-urlencoded"> <input type="hidden" value="<?php echo current_time('timestamp', 0); ?> " name="tm_tm" /> <tr> <td><?php _e('Withdraw amount:', 'PricerrTheme'); ?> </td><td> <input value="<?php echo $_POST['amount']; ?> " type="text" size="10" name="amount" /> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td><?php _e('PayPal Email:', 'PricerrTheme'); ?> </td><td><input value="<?php echo get_user_meta($uid, 'paypal_email', true); ?> " type="text" size="30" name="paypal" /></td> </tr> <tr> <td></td> <td> <input type="submit" name="withdraw" value="<?php _e('Withdraw', 'PricerrTheme'); ?> " /></td></tr></form></table> <?php } $opt = get_option('PricerrTheme_moneybookers_enable'); if ($opt == "yes") { ?> <br/><br/> <table> <form method="post" enctype="application/x-www-form-urlencoded"> <input type="hidden" value="<?php echo current_time('timestamp', 0); ?> " name="tm_tm" /> <tr> <td><?php _e('Withdraw amount:', 'PricerrTheme'); ?> </td><td> <input value="<?php echo $_POST['amount2']; ?> " type="text" size="10" name="amount2" /> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td><?php _e('Moneybookers Email:', 'PricerrTheme'); ?> </td><td><input value="" type="text" size="30" name="paypal" /></td> </tr> <tr> <td></td> <td> <input type="submit" name="withdraw2" value="<?php _e('Withdraw', 'PricerrTheme'); ?> " /></td></tr></form></table> <?php } $opt = get_option('PricerrTheme_alertpay_enable'); if ($opt == "yes") { ?> <br/><br/> <table> <form method="post" enctype="application/x-www-form-urlencoded"> <input type="hidden" value="<?php echo current_time('timestamp', 0); ?> " name="tm_tm" /> <tr> <td><?php _e('Withdraw amount:', 'PricerrTheme'); ?> </td><td> <input value="<?php echo $_POST['amount3']; ?> " type="text" size="10" name="amount3" /> <?php echo PricerrTheme_get_currency(); ?> </td> </tr> <tr> <td><?php _e('Payza Email:', 'PricerrTheme'); ?> </td><td><input value="" type="text" size="30" name="paypal" /></td> </tr> <tr> <td></td> <td> <input type="submit" name="withdraw3" value="<?php _e('Withdraw', 'PricerrTheme'); ?> " /></td></tr></form></table> <?php } do_action('PricerrTheme_payments_withdraw_options'); ?> </div> <?php } elseif ($pg == 'transactions') { ?> <div class="my_box3"> <div class="padd10"> <div class="box_title"><?php _e("Transactions", "PricerrTheme"); ?> </div> <div class="padd10"> <?php $s = "select * from " . $wpdb->prefix . "job_payment_transactions where uid='{$uid}' order by id desc"; $r = $wpdb->get_results($s); if (count($r) == 0) { echo __('No activity yet.', 'PricerrTheme'); } else { $i = 0; echo '<table width="100%" cellpadding="5">'; foreach ($r as $row) { if ($row->tp == 0) { $class = "redred"; $sign = "-"; } else { $class = "greengreen"; $sign = "+"; } echo '<tr style="background:' . ($i % 2 ? "#f2f2f2" : "#f9f9f9") . '" >'; echo '<td>' . $row->reason . '</td>'; echo '<td width="25%">' . date('d-M-Y H:i:s', $row->datemade) . '</td>'; echo '<td width="20%" class="' . $class . '"><b>' . $sign . PricerrTheme_get_show_price($row->amount) . '</b></td>'; echo '</tr>'; $i++; } echo '</table>'; } ?> </div> </div> </div> <?php } ?> <!-- page content here --> </div> </div> </div> <?php PricerrTheme_get_users_links(); }
} ?> <?php $shipping = get_post_meta(get_the_ID(), 'shipping', true); if (!empty($shipping)) { echo '<div class="shipping_box"> ' . sprintf(__('Shipping Cost: %s', 'PricerrTheme'), PricerrTheme_get_show_price($shipping)) . '</div>'; } ?> <a href="#" onclick="document.myFormPurchase.submit(); return false;" class="purchase_now_btn"><?php _e("Purchase Now", "PricerrTheme"); ?> <?php echo PricerrTheme_get_show_price($prc); ?> </a> <?php $using_perm = PricerrTheme_using_permalinks(); if ($using_perm) { $privurl_m = get_permalink(get_option('PricerrTheme_my_account_priv_mess_page_id')) . "/?"; } else { $privurl_m = get_bloginfo('siteurl') . "/?page_id=" . get_option('PricerrTheme_my_account_priv_mess_page_id') . "&"; } ?> <p class="contact-seller-wrap"><a href="<?php echo $privurl_m; ?> priv_act=send&pid=<?php the_ID();
} } ?> <tr> <td> </td> <td> </td> </tr> <tr> <td><b><?php _e('Total Price to Pay', 'PricerrTheme'); ?> </b></td> <td><b><?php echo PricerrTheme_get_show_price($prc + $partial_ttl + $shipping); ?> </b></td> </tr> </table> </div></div> <?php $extrs = ''; if ($extra_job_arr['extra_job' . $pid]) {
function PricerrTheme_pay_for_job_area_function() { global $current_user, $wpdb; get_currentuserinfo(); $uid = $current_user->ID; $pid = trim($_GET['jobid']); $post = get_post($_GET['jobid']); $jbnm = PricerrTheme_wrap_the_title($post->post_title, $pid); $prc = get_option('PricerrTheme_new_job_feat_listing_fee'); if (get_post_meta($pid, 'featured', true) != "1") { $prc = 0; } $PricerrTheme_new_job_listing_fee = get_option('PricerrTheme_new_job_listing_fee'); $prc += $PricerrTheme_new_job_listing_fee; ?> <div id="content"> <div class="box_title"><?php echo sprintf(__('Pay for job: %s', 'PricerrTheme'), $jbnm); ?> </div> <div class="box_content"> <span class="skl_pay_feat"> <?php echo sprintf(__('You are about to pay for the listing fees for your new job. <br/>The fee is <b>%s</b>. Please use the following payment methods.', 'PricerrTheme'), PricerrTheme_get_show_price($prc)); ?> </span> <br/><br/> <?php $PricerrTheme_paypal_enable = get_option('PricerrTheme_paypal_enable'); if ($PricerrTheme_paypal_enable == "yes") { echo '<a class="payment_feat" href="' . get_bloginfo('siteurl') . '/?jb_action=pay_featured&method=paypal&jobid=' . $pid . '">' . __('Pay with PayPal', 'PricerrTheme') . '</a> '; } ?> <?php $PricerrTheme_moneybookers_enable = get_option('PricerrTheme_moneybookers_enable'); if ($PricerrTheme_moneybookers_enable == "yes") { echo '<a class="payment_feat" href="' . get_bloginfo('siteurl') . '/?jb_action=pay_featured&method=moneybookers&jobid=' . $pid . '">' . __('Pay with Moneybookers', 'PricerrTheme') . '</a> '; } ?> <?php $PricerrTheme_alertpay_enable = get_option('PricerrTheme_alertpay_enable'); if ($PricerrTheme_alertpay_enable == "yes") { echo '<a class="payment_feat" href="' . get_bloginfo('siteurl') . '/?jb_action=pay_featured&method=payza&jobid=' . $pid . '">' . __('Pay with Payza', 'PricerrTheme') . '</a> '; } $PricerrTheme_get_credits = PricerrTheme_get_credits($uid); if ($PricerrTheme_get_credits >= $prc) { echo '<a class="payment_feat" href="' . get_bloginfo('siteurl') . '/?jb_action=pay_featured_credits&jobid=' . $pid . '">' . __('Pay by Virtual Currency', 'PricerrTheme') . '</a> '; } do_action('PricerrTheme_pay_for_featured_job', $pid); ?> </div> </div> <div id="right-sidebar"> <ul class="xoxo"> <?php dynamic_sidebar('other-page-area'); ?> </ul> </div> <?php }
<td> </td> </tr> <tr> <td><b><?php _e('Total Price to Pay', 'PricerrTheme'); ?> </b></td> <td><b><?php echo PricerrTheme_get_show_price($total_fee); ?> </b></td> </tr> </table> </div></div>