示例#1
0
function projectTheme_pricing_options()
{
    $id_icon = 'icon-options-general4';
    $ttl_of_stuff = 'ProjectTheme - ' . __('Pricing Settings', 'ProjectTheme');
    $arr = array("yes" => __("Yes", 'ProjectTheme'), "no" => __("No", 'ProjectTheme'));
    $sep = array("," => __('Comma (,)', 'ProjectTheme'), "." => __("Point (.)", 'ProjectTheme'));
    $frn = array("front" => __('In front of sum (eg: $50)', 'ProjectTheme'), "back" => __("After the sum (eg: 50\$)", 'ProjectTheme'));
    global $menu_admin_projecttheme_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", 'PLN' => 'Polish zloty', "SGD" => "Singapore Dollars", "SEK" => "Swidish Kroner", "NOK" => "Norwegian Kroner", "DKK" => "Danish Kroner", "MXN" => "Mexican Pesos", "JPY" => "Japanese Yen", "EUR" => "Euros", "ZAR" => "South Africa Rand", "NGN" => "Nigeria Naira", 'RUB' => 'Russian Ruble', "TRY" => "Turkish Lyra", "RON" => "Romanian Lei", "HUF" => "Hungarian Forint", 'PHP' => 'Philippine peso', 'INR' => 'Indian Rupee', 'LTL' => 'Lithuania Litas', 'MYR' => 'Malaysian ringgit', 'HKD' => 'HongKong Dollars', 'SEK' => 'Swedish Krona', 'ILS' => 'Israeli New Shekel', 'COP' => 'Colombian Peso', 'THB' => 'Thai Baht', 'CZK' => 'Czech Koruna', 'BTC' => 'Bitcoins');
    //------------------------------------------------------
    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['ProjectTheme_save1'])) {
        $ProjectTheme_currency = trim($_POST['ProjectTheme_currency']);
        $ProjectTheme_currency_symbol = trim($_POST['ProjectTheme_currency_symbol']);
        $ProjectTheme_currency_position = trim($_POST['ProjectTheme_currency_position']);
        $ProjectTheme_decimal_sum_separator = trim($_POST['ProjectTheme_decimal_sum_separator']);
        $ProjectTheme_thousands_sum_separator = trim($_POST['ProjectTheme_thousands_sum_separator']);
        update_option('ProjectTheme_currency', $ProjectTheme_currency);
        update_option('ProjectTheme_currency_symbol', $ProjectTheme_currency_symbol);
        update_option('ProjectTheme_currency_position', $ProjectTheme_currency_position);
        update_option('ProjectTheme_decimal_sum_separator', $ProjectTheme_decimal_sum_separator);
        update_option('ProjectTheme_thousands_sum_separator', $ProjectTheme_thousands_sum_separator);
        echo '<div class="saved_thing">' . __('Settings saved!', 'ProjectTheme') . '</div>';
    }
    if (isset($_POST['ProjectTheme_save2'])) {
        $projectTheme_base_fee = trim($_POST['projectTheme_base_fee']);
        $projectTheme_featured_fee = trim($_POST['projectTheme_featured_fee']);
        $projectTheme_sealed_bidding_fee = trim($_POST['projectTheme_sealed_bidding_fee']);
        $projectTheme_hide_project_fee = trim($_POST['projectTheme_hide_project_fee']);
        $projectTheme_fee_after_paid = trim($_POST['projectTheme_fee_after_paid']);
        $project_theme_min_withdraw = trim($_POST['project_theme_min_withdraw']);
        update_option('projectTheme_base_fee', $projectTheme_base_fee);
        update_option('projectTheme_featured_fee', $projectTheme_featured_fee);
        update_option('projectTheme_sealed_bidding_fee', $projectTheme_sealed_bidding_fee);
        update_option('projectTheme_hide_project_fee', $projectTheme_hide_project_fee);
        update_option('projectTheme_fee_after_paid', $projectTheme_fee_after_paid);
        update_option('project_theme_min_withdraw', $project_theme_min_withdraw);
        echo '<div class="saved_thing">' . __('Settings saved!', 'ProjectTheme') . '</div>';
    }
    ?>
    
        <div id="usual2" class="usual"> 
  <ul> 
    <li><a href="#tabs1"><?php 
    _e('Main Details', 'ProjectTheme');
    ?>
</a></li>  
    <li><a href="#tabs2"><?php 
    _e('Project Fees', 'ProjectTheme');
    ?>
</a></li>
    <li><a href="#tabs3"><?php 
    _e('Project Budgets', 'ProjectTheme');
    ?>
</a></li> 
  </ul> 
  <div id="tabs1" style="display: block; ">
    	
        <form method="post" action="<?php 
    echo get_admin_url();
    ?>
admin.php?page=pricing-settings&active_tab=tabs1">
            <table width="100%" class="sitemile-table">
    				
                     <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Site currency:', 'ProjectTheme');
    ?>
</td>
                    <td><?php 
    echo ProjectTheme_get_option_drop_down($arr_currency, 'ProjectTheme_currency');
    ?>
</td>
                    </tr>
                    
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td width="160"><?php 
    _e('Currency symbol:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" size="6" name="ProjectTheme_currency_symbol" value="<?php 
    echo get_option('ProjectTheme_currency_symbol');
    ?>
"/> </td>
                    </tr>
                    
                     <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Currency symbol position:', 'ProjectTheme');
    ?>
</td>
                    <td><?php 
    echo ProjectTheme_get_option_drop_down($frn, 'ProjectTheme_currency_position');
    ?>
</td>
                    </tr>
                    
                    
                     <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Decimals sum separator:', 'ProjectTheme');
    ?>
</td>
                    <td><?php 
    echo ProjectTheme_get_option_drop_down($sep, 'ProjectTheme_decimal_sum_separator');
    ?>
</td>
                    </tr>
                    
                     <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Thousands sum separator:', 'ProjectTheme');
    ?>
</td>
                    <td><?php 
    echo ProjectTheme_get_option_drop_down($sep, 'ProjectTheme_thousands_sum_separator');
    ?>
</td>
                    </tr>
      
                   
                    
        
                    <tr>
                    <td ></td>
                    <td ></td>
                    <td><input type="submit"  class="button button-primary button-large" name="ProjectTheme_save1" value="<?php 
    _e('Save Options', 'ProjectTheme');
    ?>
"/></td>
                    </tr>
            
            </table>      
          	</form>
          
  </div> 
  
  
  <div id="tabs3" style="display: none; ">
  
  <!-- ############# -->
            
            
            <h3>Define New Package</h3>
            
            
            <div class="MY_mo_gogo" id="">
                
                    <div class="go_go1">
                    <div class="go_go2_1">Price Range Name:</div> <div class="go_go2_2"><input id="bidding_interval_name_new" value="" /></div>
                    </div>
                    
                    
                    <div class="go_go1">
                    <div class="go_go2_1">Low Limit(<?php 
    echo ProjectTheme_currency();
    ?>
):</div> 
                    <div class="go_go2_2"><input id="low_limit_new" value="" /></div>
                    </div>
                    
                    
                    <div class="go_go1">
                    <div class="go_go2_1">High Limit(<?php 
    echo ProjectTheme_currency();
    ?>
):</div> 
                    <div class="go_go2_2"><input id="high_limit_new" value="" /> </div>
                    </div>
                
                	<div class="go_go1"><a href="#" id="new_package_action" rel="" class="green_btn2 button button-primary button-large">Add New Package</a>
                    </div>
                
                </div>
            
            
		<!-- ############### -->
        <h3>Current Defined Price Ranges</h3>
        <div id="my_packages_stuff">
        
		<?php 
    global $wpdb;
    $s = "select * from " . $wpdb->prefix . "project_bidding_intervals order by low_limit asc";
    $r = $wpdb->get_results($s);
    foreach ($r as $row) {
        ?>
            	<div class="MY_mo_gogo" id="my_pkg_cell<?php 
        echo $row->id;
        ?>
">
                
                    <div class="go_go1">
                    <div class="go_go2_1">Price Range Name:</div> 
                    <div class="go_go2_2"><input name="" id="bidding_interval_name_cell<?php 
        echo $row->id;
        ?>
" 
                    value="<?php 
        echo $row->bidding_interval_name;
        ?>
" /></div>
                    </div>
                    
                    
                    <div class="go_go1">
                    <div class="go_go2_1">Low Limit (<?php 
        echo ProjectTheme_currency();
        ?>
):</div> 
                    <div class="go_go2_2"><input name="" id="low_limit_cell<?php 
        echo $row->id;
        ?>
" value="<?php 
        echo $row->low_limit;
        ?>
" /></div>
                    </div>
                    
                    
                    <div class="go_go1">
                    <div class="go_go2_1">High Limit (<?php 
        echo ProjectTheme_currency();
        ?>
):</div> 
                    <div class="go_go2_2"><input name="" id="high_limit_cell<?php 
        echo $row->id;
        ?>
" value="<?php 
        echo $row->high_limit;
        ?>
" /> </div>
                    </div>
                
                	<div class="go_go1"><a href="#" rel="<?php 
        echo $row->id;
        ?>
" class="update_package green_btn2 button button-primary button-large">Update Package</a> 
                    <a href="#" rel="<?php 
        echo $row->id;
        ?>
" class="delete_package green_btn button button-primary button-large">Delete Package</a>
                    </div>
                
                </div>
            
            <?php 
    }
    ?>
  
  </div></div>
  
  <div id="tabs2" style="display: none; ">
  
  	<form method="post" action="<?php 
    echo get_admin_url();
    ?>
admin.php?page=pricing-settings&active_tab=tabs2">
            <table width="100%" class="sitemile-table">
    				
                
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td width="240" ><?php 
    _e('Base Listing Fee:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" name="projectTheme_base_fee" size="10" value="<?php 
    echo get_option('projectTheme_base_fee');
    ?>
"  /> <?php 
    echo projectTheme_currency();
    ?>
</td>
                    </tr>
                    
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Featured Listing Fee:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" name="projectTheme_featured_fee" size="10" value="<?php 
    echo get_option('projectTheme_featured_fee');
    ?>
"  /> <?php 
    echo projectTheme_currency();
    ?>
</td>
                    </tr>
                    
                    
         			<tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Sealed Bidding Fee:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" name="projectTheme_sealed_bidding_fee" size="10" value="<?php 
    echo get_option('projectTheme_sealed_bidding_fee');
    ?>
"  /> <?php 
    echo projectTheme_currency();
    ?>
</td>
                    </tr>
                    
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Hide Project from Search Engines Fee:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" name="projectTheme_hide_project_fee" size="10" value="<?php 
    echo get_option('projectTheme_hide_project_fee');
    ?>
"  /> <?php 
    echo projectTheme_currency();
    ?>
</td>
                    </tr>
                    
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Fee Taken out of Each Project: ', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" name="projectTheme_fee_after_paid" size="5" value="<?php 
    echo get_option('projectTheme_fee_after_paid');
    ?>
"  /> %</td>
                    </tr>
                    
                   
                    
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td width="240" ><?php 
    _e('Minimum Withdraw:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" name="project_theme_min_withdraw" size="10" value="<?php 
    echo get_option('project_theme_min_withdraw');
    ?>
"  /> <?php 
    echo projectTheme_currency();
    ?>
</td>
                    </tr>
                    
        
                    <tr>
                    <td ></td>
                    <td ></td>
                    <td><input type="submit"  class="button button-primary button-large" name="ProjectTheme_save2" value="<?php 
    _e('Save Options', 'ProjectTheme');
    ?>
"/></td>
                    </tr>
            
            </table>      
          	</form>
  
  
  </div> 
        </div> 
    
    
    <?php 
    echo '</div>';
}
示例#2
0
function ProjectTheme_add_new_epay_cnt()
{
    $arr = array("yes" => __("Yes", 'ProjectTheme'), "no" => __("No", 'ProjectTheme'));
    ?>

<div id="tabs_epay"  >	
          
          <form method="post" action="<?php 
    bloginfo('siteurl');
    ?>
/wp-admin/admin.php?page=payment-methods&active_tab=tabs_epay">
            <table width="100%" class="sitemile-table">
    				
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td width="200"><?php 
    _e('Enable:', 'ProjectTheme');
    ?>
</td>
                    <td><?php 
    echo ProjectTheme_get_option_drop_down($arr, 'ProjectTheme_epay_enable');
    ?>
</td>
                    </tr>

                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('ePay Merchant Number:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" size="45" name="ProjectTheme_epay_id" value="<?php 
    echo get_option('ProjectTheme_epay_id');
    ?>
"/></td>
                    </tr>
                  
                    
                   
        
                    <tr>
                    <td ></td>
                    <td ></td>
                    <td><input type="submit" name="ProjectTheme_save_epay" value="<?php 
    _e('Save Options', 'ProjectTheme');
    ?>
"/></td>
                    </tr>
            
            </table>      
          	</form>
          
          </div>

<?php 
}
示例#3
0
function ProjectTheme_add_new_pesapal_cnt()
{
    $arr = array("yes" => __("Yes", 'ProjectTheme'), "no" => __("No", 'ProjectTheme'));
    $arr2 = array("live" => __("LIVE", 'ProjectTheme'), "test" => __("TEST - DEMO", 'ProjectTheme'));
    ?>

<div id="tabs_pesapal"  >	
          
          <form method="post" action="<?php 
    bloginfo('siteurl');
    ?>
/wp-admin/admin.php?page=payment-methods&active_tab=tabs_pesapal">
            <table width="100%" class="sitemile-table">
    				
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td width="200"><?php 
    _e('Enable:', 'ProjectTheme');
    ?>
</td>
                    <td><?php 
    echo ProjectTheme_get_option_drop_down($arr, 'ProjectTheme_pesapal_enable');
    ?>
</td>
                    </tr>
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td width="200"><?php 
    _e('Working Mode:', 'ProjectTheme');
    ?>
</td>
                    <td><?php 
    echo ProjectTheme_get_option_drop_down($arr2, 'ProjectTheme_working_mode');
    ?>
</td>
                    </tr>

                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Consumer Key:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" size="45" name="ProjectTheme_pesapal_key" value="<?php 
    echo get_option('ProjectTheme_pesapal_key');
    ?>
"/></td>
                    </tr>
                    
                    <tr>
                    <td valign=top width="22"><?php 
    ProjectTheme_theme_bullet();
    ?>
</td>
                    <td ><?php 
    _e('Consumer Secret:', 'ProjectTheme');
    ?>
</td>
                    <td><input type="text" size="45" name="ProjectTheme_pesapal_secret" value="<?php 
    echo get_option('ProjectTheme_pesapal_secret');
    ?>
"/></td>
                    </tr>
                    
                    
                   
        
                    <tr>
                    <td ></td>
                    <td ></td>
                    <td><input type="submit" name="ProjectTheme_save_pesapal" value="<?php 
    _e('Save Options', 'ProjectTheme');
    ?>
"/></td>
                    </tr>
            
            </table>      
          	</form>
          
          </div>

<?php 
}