function wpsc_settings_page_ajax() { global $wpdb; $modified_page_title = $_POST['page_title']; check_admin_referer($modified_page_title); $page_title = str_replace("tab-", "", $modified_page_title); //require_once('includes/settings-pages/'.$functionname1.'.php'); //$functionname = "wpsc_options_".$functionname1; //$html = $functionname(); switch ($page_title) { case "checkout": require_once 'includes/settings-pages/checkout.php'; wpsc_options_checkout(); break; case "gateway": require_once 'includes/settings-pages/gateway.php'; wpsc_options_gateway(); break; case "shipping": require_once 'includes/settings-pages/shipping.php'; wpsc_options_shipping(); break; case "admin": require_once 'includes/settings-pages/admin.php'; wpsc_options_admin(); break; case "presentation": require_once 'includes/settings-pages/presentation.php'; wpsc_options_presentation(); break; case "import": require_once 'includes/settings-pages/import.php'; wpsc_options_import(); break; default: case "general": require_once 'includes/settings-pages/general.php'; wpsc_options_general(); break; } $_SESSION['wpsc_settings_curr_page'] = $page_title; exit($html); }
function wpsc_display_settings_page() { ?> <div id="wpsc_options" class="wrap"> <div id="icon_card"><br /></div> <h2><?php _e('Store Settings', 'wpsc'); ?> </h2> <?php wpsc_the_settings_tabs(); if (isset($_GET['tab'])) { $page = $_GET['tab']; } else { $page = 'general'; } if (!isset($_GET['isocode'])) { $_GET['isocode'] = ''; } if (preg_match("/[a-zA-Z]{2,4}/", $_GET['isocode'])) { include WPSC_FILE_PATH . '/wpsc-admin/includes/tax_and_shipping.php'; return; } if (isset($_GET['googlecheckoutshipping'])) { include WPSC_FILE_PATH . '/wpsc-merchants/library/google_shipping_country.php'; return; exit; } if (isset($_GET['selected_all'])) { wpsc_submit_options($_GET['selected_all']); } ?> <div id='wpsc_options_page'> <?php switch ($page) { case 'checkout': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/checkout.php'; wpsc_options_checkout(); break; case 'gateway': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/gateway.php'; wpsc_options_gateway(); break; case 'shipping': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/shipping.php'; wpsc_options_shipping(); break; case 'admin': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/admin.php'; wpsc_options_admin(); break; case 'presentation': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/presentation.php'; wpsc_options_presentation(); break; case 'taxes': wpec_taxes_settings_page(); break; case 'marketing': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/marketing.php'; wpsc_options_marketing(); break; case 'import': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/import.php'; wpsc_options_import(); break; case 'general': default: require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/general.php'; wpsc_options_general(); break; } $_SESSION['wpsc_settings_curr_page'] = $page; ?> </div> </div> <?php }
function wpsc_display_settings_page() { ?> <div id="wpsc_options" class="wrap"> <?php wpsc_the_settings_tabs(); if (isset($_GET['tab'])) { $page = $_GET['tab']; } else { $page = 'general'; } if (preg_match("/[a-zA-Z]{2,4}/", $_GET['isocode'])) { include WPSC_FILE_PATH . '/tax_and_shipping.php'; return; } if (isset($_GET['googlecheckoutshipping'])) { include WPSC_FILE_PATH . '/google_shipping_country.php'; return; exit; } if (isset($_GET['selected_all'])) { wpsc_submit_options($_GET['selected_all']); } if ($_SESSION['wpsc_thumbnails_resized'] == true) { ?> <div class="updated fade below-h2" id="message" style="background-color: rgb(255, 251, 204);"> <p><?php _e("Thanks, your thumbnail images have been resized."); ?> </p> </div> <?php $_SESSION['wpsc_thumbnails_resized'] = false; } ?> <div id='wpsc_options_page'> <?php switch ($page) { case "checkout": require_once 'includes/settings-pages/checkout.php'; wpsc_options_checkout(); break; case "gateway": require_once 'includes/settings-pages/gateway.php'; wpsc_options_gateway(); break; case "shipping": require_once 'includes/settings-pages/shipping.php'; wpsc_options_shipping(); break; case "admin": require_once 'includes/settings-pages/admin.php'; wpsc_options_admin(); break; case "presentation": require_once 'includes/settings-pages/presentation.php'; wpsc_options_presentation(); break; case "import": require_once 'includes/settings-pages/import.php'; wpsc_options_import(); break; default: case "general": require_once 'includes/settings-pages/general.php'; wpsc_options_general(); break; } $_SESSION['wpsc_settings_curr_page'] = $page; ?> </div> </div> <?php }
function wpsc_settings_page_ajax() { $html = ''; $modified_page_title = $_POST['page_title']; $page_title = str_replace("tab-", "", $modified_page_title); check_admin_referer($modified_page_title); switch ($page_title) { case 'checkout': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/checkout.php'; wpsc_options_checkout(); break; case 'gateway': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/gateway.php'; wpsc_options_gateway(); break; case 'shipping': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/shipping.php'; wpsc_options_shipping(); break; case 'admin': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/admin.php'; wpsc_options_admin(); break; case 'presentation': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/presentation.php'; wpsc_options_presentation(); break; case 'taxes': wpec_taxes_settings_page(); //see wpec-taxes view break; case 'marketing': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/marketing.php'; wpsc_options_marketing(); break; case 'import': require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/import.php'; wpsc_options_import(); break; case 'general': default: require_once WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/general.php'; wpsc_options_general(); break; } $_SESSION['wpsc_settings_curr_page'] = $page_title; exit($html); }
function wpsc_display_settings_page() { ?> <div id="wpsc_options" class="wrap"> <?php if (wpsc_check_theme_versions()) { ?> <div class="updated fade below-h2" id="message" style="background-color: rgb(255, 251, 204);"> <p><?php _e("It looks like your wp-e-commerce theme files are out of date, this can cause potential problems with some gateways and the appearances of the front end of your shop. <br /><strong>We recommend you download the latest version of wp-e-commerce unzip it, and copy the new themes folder into your 'uploads/wpsc/themes' folder on your site. Or port your changes across.</strong>", "wpsc"); ?> </p> </div> <?php } wpsc_the_settings_tabs(); if (isset($_GET['tab'])) { $page = $_GET['tab']; } else { $page = 'general'; } if (preg_match("/[a-zA-Z]{2,4}/", $_GET['isocode'])) { include WPSC_FILE_PATH . '/tax_and_shipping.php'; return; } if (isset($_GET['googlecheckoutshipping'])) { include WPSC_FILE_PATH . '/google_shipping_country.php'; return; exit; } if (isset($_GET['selected_all'])) { wpsc_submit_options($_GET['selected_all']); } if ($_SESSION['wpsc_thumbnails_resized'] == true) { ?> <div class="updated fade below-h2" id="message" style="background-color: rgb(255, 251, 204);"> <p><?php _e("Thanks, your thumbnail images have been resized."); ?> </p> </div> <?php $_SESSION['wpsc_thumbnails_resized'] = false; } ?> <div id='wpsc_options_page'> <?php switch ($page) { case "checkout": require_once 'includes/settings-pages/checkout.php'; wpsc_options_checkout(); break; case "gateway": require_once 'includes/settings-pages/gateway.php'; wpsc_options_gateway(); break; case "shipping": require_once 'includes/settings-pages/shipping.php'; wpsc_options_shipping(); break; case "admin": require_once 'includes/settings-pages/admin.php'; wpsc_options_admin(); break; case "presentation": require_once 'includes/settings-pages/presentation.php'; wpsc_options_presentation(); break; case "import": require_once 'includes/settings-pages/import.php'; wpsc_options_import(); break; default: case "general": require_once 'includes/settings-pages/general.php'; wpsc_options_general(); break; } $_SESSION['wpsc_settings_curr_page'] = $page; ?> </div> </div> <?php }