Exemplo n.º 1
0
function ProjectTheme_admin_style_sheet()
{
    wp_enqueue_script("jquery-ui-widget");
    wp_enqueue_script("jquery-ui-mouse");
    wp_enqueue_script("jquery-ui-tabs");
    wp_enqueue_script("jquery-ui-datepicker");
    ?>
	

	

    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>

    

    <link rel="stylesheet" href="<?php 
    echo get_bloginfo('template_url');
    ?>
/css/tipTip.css" type="text/css" /> 

    <link rel="stylesheet" href="<?php 
    echo get_bloginfo('template_url');
    ?>
/css/admin.css" type="text/css" />    

    <link rel="stylesheet" href="<?php 
    bloginfo('template_url');
    ?>
/css/colorpicker.css" type="text/css" />

    <link rel="stylesheet" media="screen" type="text/css" href="<?php 
    bloginfo('template_url');
    ?>
/css/layout.css" />

	<link type="text/css" href="<?php 
    bloginfo('template_url');
    ?>
/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" />	

	

    <script type="text/javascript" src="<?php 
    bloginfo('template_url');
    ?>
/js/jquery_tip.js"></script>	

	<script type="text/javascript" src="<?php 
    bloginfo('template_url');
    ?>
/js/idtabs.js"></script>	

 

		

	<script type="text/javascript">

	

 var $ = jQuery;

 

 

     jQuery(function() {

        //jQuery( document ).tooltip();

    });

 

	

		<?php 
    $tb = "tabs1";
    if (isset($_GET['active_tab'])) {
        $tb = $_GET['active_tab'];
    }
    ?>
	

			

		jQuery(document).ready(function() {		

  			jQuery("#usual2 ul").idTabs("<?php 
    echo $tb;
    ?>
");

			jQuery(".tltp_cls").tipTip({maxWidth: "330"}); 

		});

		

		

		var SITE_URL = '<?php 
    bloginfo('siteurl');
    ?>
';

		var SITE_CURRENCY = '<?php 
    echo ProjectTheme_currency();
    ?>
';

		</script>

	

 

    <script type="text/javascript" src="<?php 
    bloginfo('template_url');
    ?>
/js/admin.js"></script>

    <?php 
}
Exemplo n.º 2
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>';
}