Exemplo n.º 1
0
									<th scope="row">
									<?php 
    echo TXT_WPSC_LANGUAGE;
    ?>
:
									</th>
									<td>
									<select name='language_setting'>
									<?php 
    if (get_option('language_setting') != '') {
        $language_setting = get_option('language_setting');
    } else {
        $language_setting = "EN_en.php";
    }
    $languages_directory = WPSC_FILE_PATH . '/languages';
    $language_files = nzshpcrt_listdir($languages_directory);
    //echo "<pre>".print_r($language_files,true)."</pre>";
    foreach ($language_files as $language_file) {
        switch ($language_file) {
            case "EN_en.php":
                $language = "English";
                break;
            case "DE_de.php":
                $language = "Deutsch";
                break;
            case "FR_fr.php":
                $language = "Français";
                break;
            case "IT_it.php":
                $language = "Italian";
                break;
Exemplo n.º 2
0
}
function nzshpcrt_product_list_rss_feed()
{
    // our custom rss feed
    echo "<link rel='alternate' type='application/rss+xml' title='Cartoonbank RSS' href='" . SITEURL . "/index.php?rss=true&amp;action=product_list&amp;type=rss'/>";
}
require_once 'processing_functions.php';
require_once 'product_display_functions.php';
/* 
 * This plugin gets the merchants from the merchants directory and
 * needs to search the merchants directory for merchants, the code to do this starts here
 */
// $gateway_basepath =  str_replace("/wp-admin", "" , getcwd());
// $gateway_directory = $gateway_basepath."/wp-content/plugins/wp-shopping-cart/merchants/";
$gateway_directory = ABSPATH . 'wp-content/plugins/wp-shopping-cart/merchants';
$nzshpcrt_merchant_list = nzshpcrt_listdir($gateway_directory);
$num = 0;
foreach ($nzshpcrt_merchant_list as $nzshpcrt_merchant) {
    if (strcmp($nzshpcrt_merchant, '.svn') && strcmp($nzshpcrt_merchant, 'library')) {
        require "merchants/" . $nzshpcrt_merchant;
        $num++;
    }
}
/* 
 * and ends here
 */
if (get_option('cart_location') == 4) {
    require_once 'shopping_cart_widget.php';
}
$nzshpcrt_basepath = str_replace("/wp-admin", "", getcwd());
$nzshpcrt_basepath = $nzshpcrt_basepath . "/wp-content/plugins/wp-shopping-cart/";
Exemplo n.º 3
0
function wpsc_list_product_themes($theme_name = null)
{
    global $wpdb;
    $selected_theme = get_option('wpsc_selected_theme');
    if ($selected_theme == '') {
        $selected_theme = 'default';
    }
    $theme_path = WPSC_FILE_PATH . '/themes/';
    $theme_list = nzshpcrt_listdir($theme_path);
    foreach ($theme_list as $theme_file) {
        if (is_dir($theme_path . $theme_file) && is_file($theme_path . $theme_file . "/" . $theme_file . ".css")) {
            $theme[$theme_file] = get_theme_data($theme_path . $theme_file . "/" . $theme_file . ".css");
        }
    }
    $output .= "<select name='wpsc_theme_list'>\n\r";
    foreach ((array) $theme as $theme_file => $theme_data) {
        if (stristr($theme_file, $selected_theme)) {
            $selected = "selected='true'";
        } else {
            $selected = "";
        }
        $output .= "<option value='{$theme_file}' {$selected}>" . $theme_data['Name'] . "</option>\n\r";
    }
    $output .= "</select>\n\r";
    return $output;
}