PageRenderTime 335ms CodeModel.GetById 181ms app.highlight 72ms RepoModel.GetById 65ms app.codeStats 1ms

/wp-content/plugins/wp-shopping-cart/options.php

https://github.com/alx/barceloneta
PHP | 1731 lines | 1466 code | 239 blank | 26 comment | 250 complexity | e5eece5ebaf4e0669757870648f19273 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1<?php
   2if(preg_match("/[a-zA-Z]{2,4}/",$_GET['isocode'])) {
   3  include('tax_and_shipping.php');
   4} else {
   5  if($_POST != null) {
   6    if($_POST['product_list_url'] != null) {
   7      update_option('product_list_url', $_POST['product_list_url']);
   8    }
   9  
  10    if($_POST['shopping_cart_url'] != null) {
  11      update_option('shopping_cart_url', $_POST['shopping_cart_url']);
  12    }
  13  
  14    if($_POST['checkout_url'] != null) {
  15      update_option('checkout_url', $_POST['checkout_url']);
  16    }
  17  
  18    if($_POST['transact_url'] != null) {
  19      update_option('transact_url', $_POST['transact_url']);
  20    }
  21  
  22    if($_POST['user_account_url'] != null) {
  23      update_option('user_account_url', $_POST['user_account_url']);
  24    }
  25  
  26    if($_POST['gst_rate'] != null) {
  27      $gst_rate = ($_POST['gst_rate']/100) + 1;
  28      update_option('gst_rate', $gst_rate);
  29    }
  30  
  31    if($_POST['wpsc_theme_list'] != '') {
  32      update_option('wpsc_selected_theme', $_POST['wpsc_theme_list']);
  33    }
  34  
  35    if($_POST['purch_log_email'] != null) {
  36      update_option('purch_log_email', $_POST['purch_log_email']);
  37    }
  38  
  39    if($_POST['return_email'] != null) {
  40      update_option('return_email', $_POST['return_email']);
  41    }
  42  
  43    if($_POST['terms_and_conditions'] != get_option('terms_and_conditions')) {
  44      update_option('terms_and_conditions', $_POST['terms_and_conditions']);
  45    }
  46  
  47    if($_POST['product_image_height'] != get_option('product_image_height')) {
  48      update_option('product_image_height', $_POST['product_image_height']);
  49    }
  50      
  51    if($_POST['product_image_width'] != get_option('product_image_width')) {
  52      update_option('product_image_width', $_POST['product_image_width']);
  53    }
  54  
  55    if($_POST['category_image_height'] != get_option('category_image_height')) {
  56      update_option('category_image_height', $_POST['category_image_height']);
  57    }
  58  
  59    if($_POST['category_image_width'] != get_option('category_image_width')) {
  60      update_option('category_image_width', $_POST['category_image_width']);
  61    }
  62  
  63    if($_POST['single_view_image_height'] != get_option('single_view_image_height')) {
  64      update_option('single_view_image_height', $_POST['single_view_image_height']);
  65    }
  66  
  67    if($_POST['single_view_image_width'] != get_option('single_view_image_width')) {
  68      update_option('single_view_image_width', $_POST['single_view_image_width']);
  69		}
  70  
  71    if(is_numeric($_POST['max_downloads'])) {
  72      update_option('max_downloads', $_POST['max_downloads']);
  73		}
  74  
  75    if(is_numeric($_POST['postage_and_packaging'])) {
  76      update_option('postage_and_packaging', $_POST['postage_and_packaging']);
  77		}
  78  
  79    if(is_numeric($_POST['currency_type'])) {
  80      update_option('currency_type', $_POST['currency_type']);
  81		}
  82  
  83    if(is_numeric($_POST['currency_sign_location'])) {
  84      update_option('currency_sign_location', $_POST['currency_sign_location']);
  85		}
  86  
  87    if(is_numeric($_POST['cart_location'])) {
  88      update_option('cart_location', $_POST['cart_location']);
  89		}
  90
  91    if(is_numeric($_POST['show_gallery'])) {
  92      update_option('show_gallery', $_POST['show_gallery']);
  93		}
  94
  95    // pe.{
  96    if(is_numeric($_POST['cat_brand_loc'])) {
  97      update_option('cat_brand_loc', $_POST['cat_brand_loc']);
  98		}
  99
 100    if(is_numeric($_POST['show_categorybrands'])) {
 101      update_option('show_categorybrands', $_POST['show_categorybrands']);
 102		}
 103  
 104    if( isset($_POST['wpsc_default_category']) && ($_POST['wpsc_default_category'] != get_option('wpsc_default_category'))) {
 105      //echo $_POST['wpsc_default_category'];
 106     delete_option('wpsc_default_category');
 107      update_option('wpsc_default_category', (string)$_POST['wpsc_default_category']);
 108      //echo get_option('wpsc_default_category');
 109		}
 110
 111
 112    if($_POST['product_view'] != get_option('product_view')) {
 113      update_option('product_view', $_POST['product_view']);
 114		}
 115
 116    if($_POST['show_thumbnails'] == 1) {
 117      update_option('show_thumbnails', 1);
 118		} else {
 119			update_option('show_thumbnails', 0);
 120		}
 121    
 122    if($_POST['wpsc_also_bought'] == 1) {
 123      update_option('wpsc_also_bought', 1);
 124		} else {
 125			update_option('wpsc_also_bought', 0);
 126		}
 127
 128
 129    if($_POST['show_category_thumbnails'] == 1) {
 130      update_option('show_category_thumbnails', 1);
 131		} else {
 132			update_option('show_category_thumbnails', 0);
 133		}
 134		
 135		if($_POST['addtocart_or_buynow'] == 1) {
 136      update_option('addtocart_or_buynow', 1);
 137		} else {
 138			update_option('addtocart_or_buynow', 0);
 139		}
 140
 141		if($_POST['hide_name_link'] == 1) {
 142      update_option('hide_name_link', 1);
 143		} else {
 144			update_option('hide_name_link', 0);
 145		}
 146  
 147    if($_POST['display_pnp'] == 1) {
 148      update_option('display_pnp', 1);
 149		} else {
 150			update_option('display_pnp', 0);
 151		}
 152    
 153    if($_POST['wpsc_dropshop_display'] != get_option('dropshop_display')) {
 154      update_option('dropshop_display', $_POST['wpsc_dropshop_display']);
 155    }
 156    
 157    if($_POST['wpsc_dropshop_theme'] != get_option('wpsc_dropshop_theme')) {
 158      update_option('wpsc_dropshop_theme', $_POST['wpsc_dropshop_theme']);
 159    }
 160      
 161		if($_POST['hide_addtocart_button'] == 1) {
 162			update_option('hide_addtocart_button', 1);
 163		} else {
 164			update_option('hide_addtocart_button', 0);
 165		}
 166	
 167		
 168		if($_POST['checkbox_variations'] == 1) {
 169			update_option('checkbox_variations', 1);
 170		} else {
 171			update_option('checkbox_variations', 0);
 172		}
 173		
 174		if(isset($_POST['usps_user_id'])) {
 175			update_option('usps_user_id', $_POST['usps_user_id']);
 176		}
 177		
 178		if(isset($_POST['usps_user_password'])) {
 179			update_option('usps_user_password', $_POST['usps_user_password']);
 180		}
 181
 182    if($_POST['use_pagination'] == 1) {
 183      update_option('use_pagination', $_POST['use_pagination']);
 184		} else {
 185			update_option('use_pagination', 0);
 186		}
 187  
 188    if(is_numeric($_POST['wpsc_products_per_page'])) {
 189      update_option('wpsc_products_per_page', $_POST['wpsc_products_per_page']);
 190		} else {
 191			update_option('wpsc_products_per_page', 0);
 192		}
 193  
 194    if($_POST['show_sliding_cart'] == 1) {
 195      update_option('show_sliding_cart', 1);
 196		} else {
 197			update_option('show_sliding_cart', 0);
 198		}
 199  
 200    if($_POST['fancy_notifications'] == 1) {
 201      update_option('fancy_notifications', 1);
 202		} else {
 203			update_option('fancy_notifications', 0);
 204		}
 205		
 206	if($_POST['add_plustax'] == 1) {
 207      update_option('add_plustax', 1);
 208		} else {
 209			update_option('add_plustax', 0);
 210		}
 211        
 212    // Adrian - used for displaying product count next to categories
 213    if($_POST['show_category_count'] == 1) {
 214      update_option('show_category_count', 1);
 215		} else {
 216			update_option('show_category_count', 0);
 217		}
 218    // Adrian - used for storing the category display type, just categories and multiple products per page, or a sliding menu with all products listed under each category and one (1) product per page    
 219    if($_POST['catsprods_display_type'] == 0) {
 220      update_option('catsprods_display_type', 0);
 221		} else {
 222			update_option('catsprods_display_type', 1);
 223		}
 224    
 225    if($_POST['require_register'] == 1) {
 226      update_option('require_register', 1);
 227		} else {
 228			update_option('require_register', 0);
 229		}
 230        
 231    
 232    if($_POST['do_not_use_shipping'] == 1) {
 233      update_option('do_not_use_shipping', 1);
 234		} else {
 235			update_option('do_not_use_shipping', 0);
 236		}
 237    // End of Adrian's additions - more further down page
 238    
 239    if(is_numeric($_POST['product_ratings'])) {
 240      update_option('product_ratings', $_POST['product_ratings']);
 241    }
 242        
 243    if(isset($_POST['language_setting'])) {
 244      update_option('language_setting', $_POST['language_setting']);
 245    }
 246      
 247    if(isset($_POST['base_local_shipping'])) {
 248      update_option('base_local_shipping', $_POST['base_local_shipping']);
 249    }
 250      
 251    if(isset($_POST['base_international_shipping'])) {
 252      update_option('base_international_shipping', $_POST['base_international_shipping']);
 253    }
 254      
 255    if(isset($_POST['base_country'])) {
 256      update_option('base_country', $_POST['base_country']);
 257    }
 258        
 259    if(is_numeric($_POST['country_id']) && is_numeric($_POST['country_tax'])) {
 260      $wpdb->query("UPDATE `".$wpdb->prefix."currency_list` SET `tax` = '".$_POST['country_tax']."' WHERE `id` = '".$_POST['country_id']."' LIMIT 1 ;");
 261    }
 262        
 263    if(isset($_POST['base_region'])) {
 264      update_option('base_region', $_POST['base_region']);
 265    }
 266	
 267		if(isset($_POST['usps_user_id'])) {
 268			update_option('usps_user_id', $_POST['usps_user_id']);
 269		}
 270      
 271    if(is_numeric($_POST['country_form_field'])) {
 272      update_option('country_form_field', $_POST['country_form_field']);
 273    }
 274      
 275    if(is_numeric($_POST['email_form_field'])) {
 276      update_option('email_form_field', $_POST['email_form_field']);
 277    }
 278    
 279    if($_POST['list_view_quantity'] == 1) {
 280      update_option('list_view_quantity', 1);
 281    } else {
 282      update_option('list_view_quantity', 0);
 283    }
 284    
 285    if($_POST['show_breadcrumbs'] == 1) {
 286      update_option('show_breadcrumbs', 1);
 287    } else {
 288      update_option('show_breadcrumbs', 0);
 289    }
 290    
 291    if($_POST['display_variations'] == 1) {
 292      update_option('display_variations', 1);
 293		} else {
 294			update_option('display_variations', 0);
 295    }
 296    
 297    if($_POST['show_images_only'] == 1) {
 298      update_option('show_images_only', 1);
 299		} else {
 300			update_option('show_images_only', 0);
 301    }
 302    
 303    if($_POST['show_search'] == 1) {
 304      update_option('show_search', 1);
 305		} else {
 306			update_option('show_search', 0);
 307		}
 308		
 309	if($_POST['show_advanced_search'] == 'on') {
 310		update_option('show_advanced_search', 1);
 311	} else {
 312		update_option('show_advanced_search', 0);
 313  }
 314  
 315	if($_POST['show_live_search'] == 'on') {
 316		update_option('show_live_search', 1);
 317	} else {
 318		update_option('show_live_search', 0);
 319	}
 320
 321	if($_POST['googleStoreLocator'] == 1) {
 322		update_option('googleStoreLocator', 1);
 323	} else {
 324		update_option('googleStoreLocator', 0);
 325	}
 326    
 327	if($_POST['wpsc_category_description'] == 1) {
 328		update_option('wpsc_category_description', 'true');
 329	} else {
 330		update_option('wpsc_category_description', 'false');
 331	}
 332	
 333	if(is_numeric($_POST['wpsc_page_number_position'])) {
 334		update_option('wpsc_page_number_position', (int)$_POST['wpsc_page_number_position']);
 335	} else {
 336		update_option('wpsc_page_number_position', 1);
 337	}
 338	
 339	if($_POST['shipwire'] == 1) {
 340		update_option('shipwire', 1);
 341	} else {
 342	update_option('shipwire', 0);
 343	}
 344	
 345	if($_POST['wpsc_ip_lock_downloads'] == 1) {
 346		update_option('wpsc_ip_lock_downloads', 1);
 347	} else {
 348		update_option('wpsc_ip_lock_downloads', 0);
 349	}
 350	
 351	
 352	if($_POST['shipwireemail'] != null) {
 353		update_option('shipwireemail', $_POST['shipwireemail']);
 354	}
 355	
 356	if($_POST['shipwirepassword'] != null) {
 357		update_option('shipwirepassword', $_POST['shipwirepassword']);
 358	}
 359
 360	
 361	
 362	echo "<div class='updated'><p align='center'>".TXT_WPSC_THANKSAPPLIED."</p></div>";
 363}
 364    
 365  if(get_option('nzshpcrt_first_load') == 0) {
 366    echo "<div class='updated'><p align='center'>".TXT_WPSC_INITIAL_SETUP."</p></div>";
 367    update_option('nzshpcrt_first_load', 1);
 368	}
 369
 370
 371
 372if($_GET['update_page_urls'] == 'true') {
 373  $wpsc_pageurl_option['product_list_url'] = '[productspage]';
 374  $wpsc_pageurl_option['shopping_cart_url'] = '[shoppingcart]';
 375  $check_chekout = $wpdb->get_var("SELECT `guid` FROM `".$wpdb->prefix."posts` WHERE `post_content` LIKE '%[checkout]%' LIMIT 1");
 376  if($check_chekout != null) {
 377		$wpsc_pageurl_option['checkout_url'] = '[checkout]';
 378	} else {
 379		$wpsc_pageurl_option['checkout_url'] = '[checkout]';
 380	}
 381  $wpsc_pageurl_option['transact_url'] = '[transactionresults]';
 382  $wpsc_pageurl_option['user_account_url'] = '[userlog]';
 383  $changes_made = false;
 384  foreach($wpsc_pageurl_option as $option_key => $page_string) {
 385    $post_id = $wpdb->get_var("SELECT `ID` FROM `".$wpdb->prefix."posts` WHERE `post_type` IN('page','post') AND `post_content` LIKE '%$page_string%' LIMIT 1");
 386    $the_new_link = get_permalink($post_id);
 387    if(stristr(get_option($option_key), "https://")) {
 388      $the_new_link = str_replace('http://', "https://",$the_new_link);
 389    }    
 390    update_option($option_key, $the_new_link);
 391	}
 392  if($changes_made === true)  {
 393    echo "<div class='updated'><p align='center'>".TXT_WPSC_THANKSAPPLIED."</p></div>";    
 394	}
 395}
 396
 397
 398
 399
 400if($_GET['clean_categories'] == 'true') {
 401  //exit("<pre>".print_r($check_category_names,true)."</pre>");
 402  $sql_query = "SELECT `id`, `name`, `active` FROM `".$wpdb->prefix."product_categories`";
 403	$sql_data = $wpdb->get_results($sql_query,ARRAY_A);
 404	foreach((array)$sql_data as $datarow) {
 405	
 406	  if($datarow['active'] == 1) {
 407	    $tidied_name = trim($datarow['name']);
 408			$tidied_name = strtolower($tidied_name);
 409			$url_name = preg_replace(array("/(\s)+/","/[^\w-]+/"), array("-", ''), $tidied_name);            
 410			$similar_names = $wpdb->get_row("SELECT COUNT(*) AS `count`, MAX(REPLACE(`nice-name`, '$url_name', '')) AS `max_number` FROM `{$wpdb->prefix}product_categories` WHERE `nice-name` REGEXP '^($url_name){1}(\d)*$' AND `id` NOT IN ('{$datarow['id']}') ",ARRAY_A);
 411			$extension_number = '';
 412			if($similar_names['count'] > 0) {
 413				$extension_number = (int)$similar_names['max_number']+2;
 414			}
 415			$url_name .= $extension_number;
 416			$wpdb->query("UPDATE `{$wpdb->prefix}product_categories` SET `nice-name` = '$url_name' WHERE `id` = '{$datarow['id']}' LIMIT 1 ;");
 417	  } else if($datarow['active'] == 0) {
 418		  $wpdb->query("UPDATE `{$wpdb->prefix}product_categories` SET `nice-name` = '' WHERE `id` = '{$datarow['id']}' LIMIT 1 ;");
 419	  }
 420	}
 421	$wp_rewrite->flush_rules();
 422}
 423
 424
 425
 426  function options_categorylist() {
 427    global $wpdb;
 428    $current_default = get_option('wpsc_default_category');
 429    $group_sql = "SELECT * FROM `".$wpdb->prefix."wpsc_categorisation_groups` WHERE `active`='1'";
 430    $group_data = $wpdb->get_results($group_sql,ARRAY_A);
 431    $categorylist .= "<select name='wpsc_default_category'>";
 432    $categorylist .= "<option value='none' ".$selected." >".TXT_WPSC_SELECTACATEGORY."</option>";
 433    
 434		if(get_option('wpsc_default_category') == 'all')  {
 435				$selected = "selected='true'";
 436			}
 437    
 438    $categorylist .= "<option value='all' ".$selected." >".TXT_WPSC_SELECTALLCATEGORIES."</option>";
 439    foreach($group_data as $group) {
 440			$cat_sql = "SELECT * FROM `".$wpdb->prefix."product_categories` WHERE `group_id` IN ({$group['id']}) AND `active`='1'";
 441			$category_data = $wpdb->get_results($cat_sql,ARRAY_A);
 442			if($category_data != null) {
 443		    	  			
 444				
 445				$categorylist .= "<optgroup label='{$group['name']}'>";;
 446				foreach((array)$category_data as $category)  {
 447					if(get_option('wpsc_default_category') == $category['id'])  {
 448						$selected = "selected='true'";
 449					} else {
 450						$selected = "";
 451					}
 452					$categorylist .= "<option value='".$category['id']."' ".$selected." >".$category['name']."</option>";
 453				}
 454				$categorylist .= "</optgroup>";
 455			}
 456		}
 457
 458    $categorylist .= "</select>";
 459    return $categorylist;
 460	}
 461    
 462  function country_list($selected_country = null) {
 463      global $wpdb;
 464      $output = "";
 465      $output .= "<option value=''></option>";
 466      $country_data = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix."currency_list` ORDER BY `country` ASC",ARRAY_A);
 467      foreach ((array)$country_data as $country) {
 468        $selected ='';
 469        if($selected_country == $country['isocode']) {
 470          $selected = "selected='true'";
 471				}
 472        $output .= "<option value='".$country['isocode']."' $selected>".$country['country']."</option>";
 473			}
 474      return $output;
 475		}
 476  ?>
 477				<form name='cart_options' id='cart_options' method='POST' action='admin.php?page=<?php echo WPSC_DIR_NAME; ?>/options.php'>
 478					<div id="wpsc_options" class="wrap">
 479            <ul id="tabs">
 480                <li><a href="#options_general"><?php echo TXT_WPSC_OPTIONS_GENERAL_TAB; ?></a></li>
 481                <li><a href="#options_presentation"><?php echo TXT_WPSC_OPTIONS_PRESENTATION_TAB; ?></a></li>
 482								<li><a href="#options_shipping"><?php echo TXT_WPSC_OPTIONS_SHIPPING_TAB; ?></a></li>
 483								<!-- <li><a href="#wpsc_options_payment"><?php echo TXT_WPSC_OPTIONS_PAYMENT_TAB; ?></a></li> -->
 484                <li><a href="#options_admin"><?php echo TXT_WPSC_OPTIONS_ADMIN_TAB; ?></a></li>
 485								<!-- <li><a href="#wpsc_options_marketing"><?php echo TXT_WPSC_OPTIONS_MARKETING_TAB; ?></a></li> -->
 486            </ul>
 487            
 488            
 489						<div id="options_general">
 490						  <h2><?php echo TXT_WPSC_OPTIONS_GENERAL_HEADER; ?></h2>
 491						  <?php
 492						  /* here start the general options */						  
 493						  ?>
 494							<table class='wpsc_options form-table'>
 495								<tr>
 496									<th scope="row">
 497									<?php echo TXT_WPSC_BASE_COUNTRY;?>:
 498									</th>
 499									<td>
 500									<select name='base_country' onChange='submit_change_country();'>
 501									<?php echo country_list(get_option('base_country')); ?>
 502									</select>
 503									<span id='options_region'>
 504									<?php
 505									$region_list = $wpdb->get_results("SELECT `".$wpdb->prefix."region_tax`.* FROM `".$wpdb->prefix."region_tax`, `".$wpdb->prefix."currency_list`  WHERE `".$wpdb->prefix."currency_list`.`isocode` IN('".get_option('base_country')."') AND `".$wpdb->prefix."currency_list`.`id` = `".$wpdb->prefix."region_tax`.`country_id`",ARRAY_A) ;
 506									if($region_list != null) {
 507										echo "<select name='base_region'>\n\r";
 508										foreach($region_list as $region) {
 509											if(get_option('base_region')  == $region['id']) {
 510												$selected = "selected='true'";
 511											} else {
 512												$selected = "";
 513											}
 514											echo "<option value='".$region['id']."' $selected>".$region['name']."</option>\n\r";
 515										}
 516										echo "</select>\n\r";    
 517									}
 518									?>
 519									</span>
 520									</td>
 521								</tr>
 522								<tr>
 523									<th scope="row">
 524									<?php echo TXT_WPSC_TAX_SETTINGS;?>:
 525									</th>
 526									<td>
 527									<span id='options_region'>
 528									<?php
 529									$country_data = $wpdb->get_row("SELECT * FROM `".$wpdb->prefix."currency_list` WHERE `isocode`='".get_option('base_country')."' LIMIT 1",ARRAY_A);
 530									echo $country_data['country'];
 531									
 532									$region_count = $wpdb->get_var("SELECT COUNT(*) AS `count` FROM `".$wpdb->prefix."region_tax`, `".$wpdb->prefix."currency_list`  WHERE `".$wpdb->prefix."currency_list`.`isocode` IN('".get_option('base_country')."') AND `".$wpdb->prefix."currency_list`.`id` = `".$wpdb->prefix."region_tax`.`country_id`") ;
 533									
 534									if($country_data['has_regions'] == 1) {
 535										echo "&nbsp;&nbsp;&nbsp;&nbsp;<a href='?page=".WPSC_DIR_NAME."/options.php&isocode=".get_option('base_country')."'>".$region_count." Regions</a>";
 536									} else {
 537										echo "<input type='hidden' name='country_id' value='".$country_data['id']."'>";
 538										echo "&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='country_tax' class='tax_forms' maxlength='5' size='5' value='".$country_data['tax']."'>%";
 539									}
 540									?>
 541									</span>
 542									</td>
 543								</tr>
 544								
 545								
 546								<tr>
 547									<th scope="row">
 548									<?php echo TXT_WPSC_LANGUAGE;?>:
 549									</th>
 550									<td>
 551									<select name='language_setting'>
 552									<?php
 553									if(get_option('language_setting') != '') {
 554										$language_setting = get_option('language_setting');
 555									} else {
 556										$language_setting = "EN_en.php";
 557									}
 558									$languages_directory = WPSC_FILE_PATH.'/languages';
 559									$language_files = nzshpcrt_listdir($languages_directory);
 560									//echo "<pre>".print_r($language_files,true)."</pre>";
 561									foreach($language_files as $language_file) {
 562										switch($language_file) {
 563											case "EN_en.php";
 564											$language = "English";
 565											break;
 566											
 567											case "DE_de.php";
 568											$language = "Deutsch";
 569											break;
 570											
 571											case "FR_fr.php";
 572											$language = "Français";
 573											break;
 574											
 575											case "IT_it.php";
 576											$language = "Italian";
 577											break;
 578											
 579											case "BG_bg.php";
 580											$language = 'български';
 581											break;
 582											
 583											case "JP_jp.php";
 584											$language = "日本語";
 585											break;
 586											
 587											case "pt_BR.php";
 588											$language = "Brazilian Portuguese";
 589											break;
 590																
 591											case "RU_ru.php";
 592											$language = "Russian";
 593											break;
 594											
 595											case "SP_sp.php";
 596											$language = "Spanish";
 597											break;
 598											
 599											case "HU_hu.php";
 600											$language = "Hungarian";
 601											break;
 602											
 603											case "SV_sv.php";
 604											$language = "Swedish";
 605											break;
 606															
 607											case "TR_tr.php";
 608											$language = "Türkçe";
 609											break; 
 610						
 611											case "EL_el.php";
 612											$language = "Ελληνικά";
 613											break;
 614						
 615											case "KO_ko.php";
 616											$language = "Korean";
 617											break;
 618											
 619											case "ZH_zh.php";
 620											$language = "Chinese";
 621											break;
 622											
 623											case "DK_da.php";
 624											$language = "Danish";
 625											break;
 626											
 627											case "DK_da.php";
 628											$language = "Danish";
 629											break;
 630											
 631											case "nn_NO.php";
 632											$language = "Norwegian";
 633											break;
 634																	
 635											default:
 636											continue 2;
 637											break;
 638										}
 639										if($language_setting == $language_file) {
 640											echo "<option selected='true' value='".$language_file."'>".$language."</option>";
 641										} else {
 642											echo "<option value='".$language_file."'>".$language."</option>";            
 643										}
 644									}
 645									?>
 646									</select>
 647									</td>
 648								</tr>
 649								
 650					
 651								<tr>      
 652									<th scope="row">
 653									<?php echo TXT_WPSC_HIDEADDTOCARTBUTTON;?>:
 654									</th>
 655									<td>
 656									<?php
 657								$hide_addtocart_button = get_option('hide_addtocart_button');
 658								$hide_addtocart_button1 = "";
 659								$hide_addtocart_button2 = "";
 660								switch($hide_addtocart_button) {
 661									case 0:
 662									$hide_addtocart_button2 = "checked ='checked'";
 663									break;
 664									
 665									case 1:
 666									$hide_addtocart_button1 = "checked ='checked'";
 667									break;
 668								}
 669						
 670									?>
 671									<input type='radio' value='1' name='hide_addtocart_button' id='hide_addtocart_button1' <?php echo $hide_addtocart_button1; ?> /> <label for='hide_addtocart_button1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
 672									<input type='radio' value='0' name='hide_addtocart_button' id='hide_addtocart_button2' <?php echo $hide_addtocart_button2; ?> /> <label for='hide_addtocart_button2'><?php echo TXT_WPSC_NO;?></label>
 673									</td>
 674								</tr>
 675								<tr>      
 676									<th scope="row">
 677									<?php echo TXT_WPSC_HIDEADDNAMELINK;?>:
 678									</th>
 679									<td>
 680									<?php
 681								$hide_name_link = get_option('hide_name_link');
 682								$hide_name_link1 = "";
 683								$hide_name_link2 = "";
 684								switch($hide_name_link) {
 685									case 0:
 686									$hide_name_link2 = "checked ='checked'";
 687									break;
 688									
 689									case 1:
 690									$hide_name_link1 = "checked ='checked'";
 691									break;
 692								}
 693						
 694									?>
 695									<input type='radio' value='1' name='hide_name_link' id='hide_name_link1' <?php echo $hide_name_link1; ?> /> <label for='hide_name_link1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
 696									<input type='radio' value='0' name='hide_name_link' id='hide_name_link2' <?php echo $hide_name_link2; ?> /> <label for='hide_name_link2'><?php echo TXT_WPSC_NO;?></label>
 697									</td>
 698								</tr>
 699								<tr>
 700									<th scope="row">
 701									<?php echo TXT_WPSC_BUTTONTYPE;?>:
 702									</th>
 703									<td>
 704									<?php
 705								$addtocart_or_buynow = get_option('addtocart_or_buynow');
 706								$addtocart_or_buynow1 = "";
 707								$addtocart_or_buynow2 = "";
 708								switch($addtocart_or_buynow) {
 709									case 0:
 710									$addtocart_or_buynow1 = "checked ='checked'";
 711									break;
 712									
 713									case 1:
 714									$addtocart_or_buynow2 = "checked ='checked'";
 715									break;
 716								}
 717						
 718									?>
 719									<input type='radio' value='0' name='addtocart_or_buynow' id='addtocart_or_buynow1' <?php echo $addtocart_or_buynow1; ?> /> <label for='addtocart_or_buynow1'><?php echo TXT_WPSC_ADDTOCART;?></label> &nbsp;
 720									<input type='radio' value='1' name='addtocart_or_buynow' id='addtocart_or_buynow2' <?php echo $addtocart_or_buynow2; ?> /> <label for='addtocart_or_buynow2'><?php echo TXT_WPSC_BUYNOW;?></label>
 721									</td>
 722								</tr>
 723							</table> 
 724							
 725							<h3 class="form_group"><?php echo TXT_WPSC_CURRENCYSETTINGS;?>:</h3>
 726							<table class='wpsc_options form-table'>
 727								<tr>
 728									<th scope="row">
 729									<?php echo TXT_WPSC_CURRENCYTYPE;?>:
 730									</th>
 731									<td>
 732									<select name='currency_type' onChange='getcurrency(this.options[this.selectedIndex].value);'>
 733									<?php
 734									
 735									$currency_data = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix."currency_list` ORDER BY `country` ASC",ARRAY_A);
 736									foreach($currency_data as $currency) {
 737										if(get_option('currency_type') == $currency['id']) {
 738											$selected = "selected='true'";
 739										} else {
 740											$selected = "";
 741										}
 742										echo "        <option value='".$currency['id']."' ".$selected." >".$currency['country']." (".$currency['currency'].")</option>";
 743									}
 744									
 745									$currency_data = $wpdb->get_row("SELECT `symbol`,`symbol_html`,`code` FROM `".$wpdb->prefix."currency_list` WHERE `id`='".get_option('currency_type')."' LIMIT 1",ARRAY_A) ;
 746									if($currency_data['symbol'] != '') {
 747										$currency_sign = $currency_data['symbol_html'];
 748									} else {
 749										$currency_sign = $currency_data['code'];
 750									}
 751									?>
 752									</select>
 753									</td>
 754								</tr>
 755								<tr>
 756									<th scope="row">
 757									<?php echo TXT_WPSC_CURRENCYSIGNLOCATION;?>:
 758									</th>
 759									<td>
 760									<?php
 761									$currency_sign_location = get_option('currency_sign_location');
 762									$csl1 = "";
 763									$csl2 = "";
 764									$csl3 = "";
 765									$csl4 = "";
 766									switch($currency_sign_location) {
 767										case 1:
 768										$csl1 = "checked ='true'";
 769										break;
 770									
 771										case 2:
 772										$csl2 = "checked ='true'";
 773										break;
 774									
 775										case 3:
 776										$csl3 = "checked ='true'";
 777										break;
 778									
 779										case 4:
 780										$csl4 = "checked ='true'";
 781										break;
 782									}
 783									?>
 784									<input type='radio' value='1' name='currency_sign_location' id='csl1' <?php echo $csl1; ?> /> <span for='csl1'>100<span id=cslchar1><?php echo $currency_sign; ?></span></label> &nbsp;
 785									<input type='radio' value='2' name='currency_sign_location' id='csl2' <?php echo $csl2; ?> /> <label for='csl2'>100 <span id=cslchar2><?php echo $currency_sign; ?></span></label> &nbsp;
 786									<input type='radio' value='3' name='currency_sign_location' id='csl3' <?php echo $csl3; ?> /> <label for='csl3'><span id=cslchar3><?php echo $currency_sign; ?></span>100</label> &nbsp;
 787									<input type='radio' value='4' name='currency_sign_location' id='csl4' <?php echo $csl4; ?> /> <label for='csl4'><span id=cslchar4><?php echo $currency_sign; ?></span> 100</label>
 788									</td>
 789								</tr>
 790							</table> 
 791							<?php
 792						  /* here end the general options */						  
 793						  ?>
 794							<div class="submit">
 795								<input type="submit" value="Update »" name="updateoption"/>
 796							</div>
 797						</div>
 798						
 799						
 800						
 801						
 802						<div id="options_presentation">
 803						  <h2><?php echo TXT_WPSC_OPTIONS_PRESENTATION_HEADER; ?></h2>
 804						  
 805							<?php
 806						  /* here start the presentation options */						  
 807						  ?>
 808						  
 809							<table class='wpsc_options form-table'>		
 810							<?php
 811							// if(function_exists('product_display_list') || function_exists('product_display_grid')) {
 812								?>    
 813								<tr>
 814									<th scope="row">
 815									<?php echo TXT_WPSC_PRODUCT_DISPLAY;?>:
 816									</th>
 817									<td>
 818									<?php
 819									$display_pnp = get_option('product_view');
 820									$product_view1 = null;
 821									$product_view2 = null;
 822									$product_view3 = null;
 823									switch($display_pnp) {
 824										case "grid":
 825										if(function_exists('product_display_grid')) {
 826											$product_view3 = "selected ='true'";
 827											break;
 828										}
 829										
 830										case "list":
 831										if(function_exists('product_display_list')) {
 832											$product_view2 = "selected ='true'";
 833											break;
 834										}
 835										
 836										default:
 837										$product_view1 = "selected ='true'";
 838										break;
 839									}
 840									
 841									if(get_option('list_view_quantity') == 1) {
 842										$list_view_quantity_value = "checked='true'";
 843									} else {
 844										$list_view_quantity_value = '';
 845									}
 846						
 847									if(get_option('show_images_only') == 1) {
 848										$show_images_only_value = "checked='true'";
 849									} else {
 850										$show_images_only_value = '';
 851									}
 852									if(get_option('display_variations') == 1) {
 853										$display_variations = "checked='true'";
 854									} else {
 855										$display_variations = '';
 856									}
 857									?>
 858									<select name='product_view' onchange="toggle_display_options(this.options[this.selectedIndex].value)">
 859									<option value='default' <?php echo $product_view1; ?>><?php echo TXT_WPSC_DEFAULT;?></option>
 860									<?php
 861									if(function_exists('product_display_list')) {
 862										?>
 863										<option value='list' <?php echo $product_view2; ?>><?php echo TXT_WPSC_LIST;?></option>
 864										<?php      
 865									}  else {
 866										?>
 867										<option value='list' disabled='disabled' <?php echo $product_view2; ?>><?php echo TXT_WPSC_LIST;?></option>
 868										<?php      
 869									  
 870									}
 871									
 872									if(function_exists('product_display_grid')) {
 873										?>
 874									<option value='grid' <?php echo $product_view3; ?>><?php echo TXT_WPSC_GRID;?></option>
 875										<?php   
 876									} else {
 877										?>
 878									<option value='grid' disabled='disabled' <?php echo $product_view3; ?>><?php echo TXT_WPSC_GRID;?></option>
 879										<?php 
 880									}
 881									?>
 882									</select>
 883									<?php 
 884									if(!function_exists('product_display_grid')) {
 885									?><a href='http://www.instinct.co.nz/e-commerce/shop/'><?php echo TXT_WPSC_PURCHASE_UNAVAILABLE; ?></a> <?php 
 886									}
 887									?>
 888										<div id='list_view_options' <?php if(is_null($product_view2)) { echo "style='display:none;'";} ?> >
 889											<input type='checkbox' value='1' name='list_view_quantity' id='list_view_quantity' <?php echo $list_view_quantity_value;?> />
 890											<label for='list_view_options'><?php echo TXT_WPSC_ADJUSTABLE_QUANTITY;?></label>
 891										</div>
 892										<div id='grid_view_options' <?php echo $list_view_quantity_style;?> <?php if(is_null($product_view3)) { echo "style='display:none;'";} ?>>
 893											<input type='checkbox' value='1' name='show_images_only' id='show_images_only' <?php echo $show_images_only_value;?> />
 894											<label for='show_images_only'><?php echo TXT_SHOW_IMAGES_ONLY;?></label><br />
 895											<input type='checkbox' value='1' name='display_variations' id='display_variations' <?php echo $display_variations;?> />
 896											<label for='display_variations'><?php echo TXT_DISPLAY_VARIATIONS;?></label>
 897										</div>
 898									</td>
 899								</tr>
 900								<?php
 901								//  }
 902								?>			
 903													
 904								<tr>
 905									<th scope="row">
 906									<?php echo TXT_WPSC_SELECT_THEME;?>:
 907									</th>
 908									<td>
 909									<?php
 910									echo wpsc_list_product_themes();
 911									?>
 912									</td>
 913								</tr>
 914								
 915								<tr>
 916									<th scope="row">
 917									<?php echo TXT_WPSC_CARTLOCATION;?>:
 918									</th>
 919									<td>
 920									<?php
 921									$cart_location = get_option('cart_location');
 922									$cart1 = "";
 923									$cart2 = "";
 924									switch($cart_location) {
 925										case 1:
 926										$cart1 = "checked ='true'";
 927										break;
 928										
 929										case 2:
 930										$cart2 = "checked ='true'";
 931										break;
 932										
 933										case 3:
 934										$cart3 = "checked ='true'";
 935										break;
 936										
 937										case 4:
 938										$cart4 = "checked ='true'";
 939										break;
 940										
 941										case 5:
 942										$cart5 = "checked ='true'";
 943										break;
 944									} 
 945									if(function_exists('register_sidebar_widget')) {
 946										?>
 947										<input type='radio' value='1' onclick='hideelement1("dropshop_option", this.value)' disabled='true'  name='cart_location' id='cart1' <?php echo $cart1; ?> /> <label style='color: #666666;' for='cart1'><?php echo TXT_WPSC_SIDEBAR;?></label> &nbsp;
 948										<?php
 949									} else {
 950										?>
 951										<input type='radio' value='1' name='cart_location' id='cart1' <?php echo $cart1; ?> /> <label for='cart1'><?php echo TXT_WPSC_SIDEBAR;?></label> &nbsp;
 952										<?php
 953									}
 954									?>
 955									<input type='radio' onclick='hideelement1("dropshop_option", this.value)' value='2' name='cart_location' id='cart2' <?php echo $cart2; ?> /> <label for='cart2'><?php echo TXT_WPSC_PAGE;?></label> &nbsp;
 956									<?php
 957									if(function_exists('register_sidebar_widget')) {
 958										?>
 959										<input type='radio' value='4' onclick='hideelement1("dropshop_option", this.value)' name='cart_location' id='cart4' <?php echo $cart4; ?> /> <label for='cart4'><?php echo TXT_WPSC_WIDGET;?></label> &nbsp;
 960										<?php
 961									} else {
 962										?>
 963										<input type='radio'  disabled='true' value='4' name='cart_location' id='cart4' alt='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET;?>' title='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET;?>' <?php echo $cart4; ?> /> <label style='color: #666666;' for='cart4' title='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET;?>'><?php echo TXT_WPSC_WIDGET;?></label> &nbsp;
 964										<?php
 965									}
 966									
 967									if(function_exists('drag_and_drop_cart')) {
 968										?>
 969										<input type='radio' onclick='hideelement1("dropshop_option", this.value)' value='5' name='cart_location' id='cart5' <?php echo $cart5; ?> /> <label for='cart5'><?php echo TXT_WPSC_GOLD_DROPSHOP;?></label> &nbsp;
 970										<?php
 971									} else {
 972										?>
 973										<input type='radio' disabled='true' value='5' name='cart_location' id='cart5' alt='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET;?>' title='<?php echo TXT_WPSC_NEEDTOENABLEDROPSHOP;?>' <?php echo $cart5; ?> /> <label style='color: #666666;' for='cart5' title='<?php echo TXT_WPSC_NEEDTOENABLEDROPSHOP;?>'><?php echo TXT_WPSC_GOLD_DROPSHOP;?></label> &nbsp;
 974										<?php
 975									}
 976										?>
 977									<input type='radio' onclick='hideelement1("dropshop_option", this.value)' value='3' name='cart_location' id='cart3' <?php echo $cart3; ?> /> <label for='cart3'><?php echo TXT_WPSC_MANUAL;?> <span style='font-size: 7pt;'>(PHP code: &lt;?php echo nzshpcrt_shopping_basket(); ?&gt; )</span></label>
 978							<div  style='display: <?php if (isset($cart5)) { echo "block"; } else { echo "none"; } ?>;'  id='dropshop_option'>
 979							<p>
 980							<input type="radio" id="drop1" value="all" <?php if (get_option('dropshop_display') == 'all') { echo "checked='checked'"; } ?> name="wpsc_dropshop_display" /><label for="drop1"><?php echo TXT_WPSC_SHOW_DROPSHOP_ALL;?></label>
 981							<input type="radio" id="drop2" value="product" <?php if (get_option('dropshop_display') == 'product') { echo "checked='checked'"; } ?> name="wpsc_dropshop_display"/><label for="drop2"><?php echo TXT_WPSC_SHOW_DROPSHOP_PRODUCT;?></label>
 982							</p>
 983							<p>
 984							<input type="radio" id="wpsc_dropshop_theme1" value="light" <?php if (get_option('wpsc_dropshop_theme') != 'dark') { echo "checked='checked'"; } ?> name="wpsc_dropshop_theme" /><label for="wpsc_dropshop_theme1"><?php echo TXT_WPSC_DROPSHOP_LIGHT;?></label>
 985							<input type="radio" id="wpsc_dropshop_theme2" value="dark" <?php if (get_option('wpsc_dropshop_theme') == 'dark') { echo "checked='checked'"; } ?> name="wpsc_dropshop_theme"/><label for="wpsc_dropshop_theme2"><?php echo TXT_WPSC_DROPSHOP_DARK;?></label>
 986							
 987							</p>
 988							</div>
 989									</td>
 990								</tr>
 991 
 992								<tr>
 993									<th scope="row">
 994									<?php echo TXT_WPSC_DEFAULTCATEGORY; ?>:
 995									</th>
 996									<td>
 997									<?php echo options_categorylist(); ?>
 998									</td>
 999								</tr>
1000								
1001								
1002								<tr>
1003									<th scope="row">
1004									<?php echo TXT_WPSC_SHOW_CATEGORY_DESCRIPTION;?>:
1005									</th>
1006									<td>
1007									<?php
1008									$wpsc_category_description = get_option('wpsc_category_description');
1009									$wpsc_category_description1 = "";
1010									$wpsc_category_description2 = "";
1011									switch($wpsc_category_description) {    
1012										case 'true':
1013										$wpsc_category_description1 = "checked ='true'";
1014										break;
1015										
1016										case 'false':
1017										default:
1018										$wpsc_category_description2 = "checked ='true'";
1019										break;
1020									}
1021						
1022									?>
1023									<input type='radio' value='1' name='wpsc_category_description' id='wpsc_category_description1' <?php echo $wpsc_category_description1; ?> /> <label for='wpsc_category_description1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1024									<input type='radio' value='0' name='wpsc_category_description' id='wpsc_category_description2' <?php echo $wpsc_category_description2; ?> /> <label for='wpsc_category_description2'><?php echo TXT_WPSC_NO;?></label>
1025									</td>
1026								</tr>
1027								
1028								
1029							<tr>
1030									<th scope="row">
1031									<?php echo TXT_WPSC_SHOWPOSTAGEANDPACKAGING;?>:
1032									</th>
1033									<td>
1034									<?php
1035									$display_pnp = get_option('display_pnp');
1036									$display_pnp1 = "";
1037									$display_pnp2 = "";
1038									switch($display_pnp) {
1039										case 0:
1040										$display_pnp2 = "checked ='true'";
1041										break;
1042										
1043										case 1:
1044										$display_pnp1 = "checked ='true'";
1045										break;
1046									}
1047						
1048									?>
1049									<input type='radio' value='1' name='display_pnp' id='display_pnp1' <?php echo $display_pnp1; ?> /> <label for='display_pnp1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1050									<input type='radio' value='0' name='display_pnp' id='display_pnp2' <?php echo $display_pnp2; ?> /> <label for='display_pnp2'><?php echo TXT_WPSC_NO;?></label>
1051									</td>
1052								</tr>
1053								
1054								<tr>
1055									<th scope="row">
1056									<?php echo TXT_WPSC_SHOW_BREADCRUMBS;?>:
1057									</th>
1058									<td>
1059									<?php
1060									$show_breadcrumbs = get_option('show_breadcrumbs');
1061									$show_breadcrumbs1 = "";
1062									$show_breadcrumbs2 = "";
1063									switch($show_breadcrumbs) {
1064										case 0:
1065										$show_breadcrumbs2 = "checked ='true'";
1066										break;
1067										
1068										case 1:
1069										$show_breadcrumbs1 = "checked ='true'";
1070										break;
1071									}
1072						
1073									?>
1074									<input type='radio' value='1' name='show_breadcrumbs' id='show_breadcrumbs1' <?php echo $show_breadcrumbs1; ?> /> <label for='show_breadcrumbs1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1075									<input type='radio' value='0' name='show_breadcrumbs' id='show_breadcrumbs2' <?php echo $show_breadcrumbs2; ?> /> <label for='show_breadcrumbs2'><?php echo TXT_WPSC_NO;?></label>
1076									</td>
1077								</tr>							
1078								
1079								<tr>
1080									<th scope="row">
1081									<?php echo TXT_WPSC_SHOWPRODUCTRATINGS;?>:
1082									</th>
1083									<td>
1084									<?php
1085									$display_pnp = get_option('product_ratings');
1086									$product_ratings1 = "";
1087									$product_ratings2 = "";
1088									switch($display_pnp) {
1089										case 0:
1090										$product_ratings2 = "checked ='true'";
1091										break;
1092										
1093										case 1:
1094										$product_ratings1 = "checked ='true'";
1095										break;
1096									}
1097						
1098									?>
1099									<input type='radio' value='1' name='product_ratings' id='product_ratings1' <?php echo $product_ratings1; ?> /> <label for='product_ratings1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1100									<input type='radio' value='0' name='product_ratings' id='product_ratings2' <?php echo $product_ratings2; ?> /> <label for='product_ratings2'><?php echo TXT_WPSC_NO;?></label>
1101									</td>
1102								</tr>
1103								
1104								<tr>
1105									<th scope="row">
1106									<?php echo TXT_WPSC_SHOW_SLIDING_CART;?>:
1107									</th>
1108									<td>
1109									<?php
1110									$display_pnp = get_option('show_sliding_cart');
1111									$show_sliding_cart1 = "";
1112									$show_sliding_cart2 = "";
1113									switch($display_pnp) {
1114										case 0:
1115										$show_sliding_cart2 = "checked ='true'";
1116										break;
1117										
1118										case 1:
1119										$show_sliding_cart1 = "checked ='true'";
1120										break;
1121									}
1122						
1123									?>
1124									<input type='radio' value='1' name='show_sliding_cart' id='show_sliding_cart1' <?php echo $show_sliding_cart1; ?> /> <label for='show_sliding_cart1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1125									<input type='radio' value='0' name='show_sliding_cart' id='show_sliding_cart2' <?php echo $show_sliding_cart2; ?> /> <label for='show_sliding_cart2'><?php echo TXT_WPSC_NO;?></label>
1126									</td>
1127								</tr>
1128					<!-- // Adrian - options for displaying number of products per category -->      
1129								
1130								<tr>
1131									<th scope="row">
1132									<?php echo TXT_WPSC_SHOW_CATEGORY_COUNT;?>:
1133									</th>
1134									<td>
1135									<?php
1136									$display_pnp = get_option('show_category_count');
1137									$show_category_count1 = "";
1138									$show_category_count2 = "";
1139									switch($display_pnp) {
1140										case 0:
1141										$show_category_count2 = "checked ='true'";
1142										break;
1143										
1144										case 1:
1145										$show_category_count1 = "checked ='true'";
1146										break;
1147									}
1148						
1149									?>
1150									<input type='radio' value='1' name='show_category_count' id='show_category_count1' <?php echo $show_category_count1; ?> /> <label for='show_category_count1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1151									<input type='radio' value='0' name='show_category_count' id='show_category_count2' <?php echo $show_category_count2; ?> /> <label for='show_category_count2'><?php echo TXT_WPSC_NO;?></label>
1152									</td>
1153								</tr>
1154								
1155					<!-- // Adrian - options for displaying category display type -->      
1156								
1157								<tr>
1158									<th scope="row">
1159									<?php echo TXT_WPSC_CATSPRODS_DISPLAY_TYPE;?>:
1160									</th>
1161									<td>
1162									<?php
1163									$display_pnp = get_option('catsprods_display_type');
1164									$catsprods_display_type1 = "";
1165									$catsprods_display_type2 = "";
1166									switch($display_pnp) {
1167										case 0:
1168										$catsprods_display_type1 = "checked ='true'";
1169										break;
1170										
1171										case 1:
1172										$catsprods_display_type2 = "checked ='true'";
1173										break;
1174									}
1175						
1176									?>
1177									<input type='radio' value='0' name='catsprods_display_type' id='catsprods_display_type1' <?php echo $catsprods_display_type1; ?> /> <label for='catsprods_display_type1'><?php echo TXT_WPSC_CATSPRODS_TYPE_CATONLY;?></label> &nbsp;
1178									<input type='radio' value='1' name='catsprods_display_type' id='catsprods_display_type2' <?php echo $catsprods_display_type2; ?> /> <label for='catsprods_display_type2'><?php echo TXT_WPSC_CATSPRODS_TYPE_SLIDEPRODS;?></label>
1179									</td>
1180								</tr>
1181								
1182					<?php
1183					if(function_exists('gold_shpcrt_search_form')) {
1184						?>
1185								<tr>
1186									<th scope="row">
1187									<?php echo TXT_WPSC_SHOW_SEARCH;?>:
1188									</th>
1189									<td>
1190									<?php
1191									$display_pnp = get_option('show_search');
1192									$show_search1 = "";
1193									$show_search2 = "";
1194									switch($display_pnp) {
1195										case 0:
1196										$show_search2 = "checked ='true'";
1197										break;
1198										
1199										case 1:
1200										$show_search1 = "checked ='true'";
1201										break;
1202									}
1203								
1204									$display_ad_pnp = get_option('show_advanced_search');
1205									$show_advanced_search = "";
1206									if($display_ad_pnp == 1) {
1207										$show_advanced_search = "checked ='true'";
1208									}
1209								
1210									$display_live_pnp = get_option('show_live_search');
1211									if($display_ad_pnp == 1) {
1212										$show_live_search = "checked ='true'";
1213									}
1214								
1215									if ($show_search1 != "checked ='true'") {
1216										$dis = "style='display:none;'";
1217									}
1218									?>
1219									<input type='radio' onclick='jQuery("#wpsc_advanced_search").show()' value='1' name='show_search' id='show_search1' <?php echo $show_search1; ?> /> <label for='show_search1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1220									<input type='radio' onclick='jQuery("#wpsc_advanced_search").hide()' value='0' name='show_search' id='show_search2' <?php echo $show_search2; ?> /> <label for='show_search2'><?php echo TXT_WPSC_NO;?></label>
1221									
1222								<div <?=$dis?> id='wpsc_advanced_search'>
1223									<input  type='checkbox' name='show_advanced_search' id='show_advanced_search' <?php echo $show_advanced_search; ?> />
1224									<?php echo TXT_WPSC_SHOWADVANCEDSEARCH;?><br>
1225									<input type='checkbox' name='show_live_search' id='show_live_search' <?php echo $show_live_search; ?> />
1226									<?php echo TXT_WPSC_SHOWLIVESEARCH;?>
1227								</div>
1228								
1229									</td>
1230								</tr>
1231						<?php
1232						}
1233					if(function_exists('gold_shpcrt_display_gallery')) {
1234						?>
1235								<tr>
1236									<th scope="row">
1237									<?php echo TXT_WPSC_SHOW_GALLERY;?>:
1238									</th>
1239									<td>
1240									<?php
1241									$display_pnp = get_option('show_gallery');
1242									$show_gallery1 = "";
1243									$show_gallery2 = "";
1244									switch($display_pnp) {
1245										case 0:
1246										$show_gallery2 = "checked ='true'";
1247										break;
1248										
1249										case 1:
1250										$show_gallery1 = "checked ='true'";
1251										break;
1252									}
1253									?>
1254									<input type='radio' value='1' name='show_gallery' id='show_gallery1' <?php echo $show_gallery1; ?> /> <label for='show_gallery1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1255									<input type='radio' value='0' name='show_gallery' id='show_gallery2' <?php echo $show_gallery2; ?> /> <label for='show_gallery2'><?php echo TXT_WPSC_NO;?></label>
1256									</td>
1257								</tr>
1258						<?php
1259						}
1260					?>
1261					
1262							<tr>
1263								<th scope="row">
1264								<?php echo TXT_WPSC_DISPLAY_FANCY_NOTIFICATIONS;?>:
1265								</th>
1266								<td>
1267								<?php
1268					$fancy_notifications = get_option('fancy_notifications');
1269					$fancy_notifications1 = "";
1270					$fancy_notifications2 = "";
1271					switch($fancy_notifications)
1272						{
1273						case 0:
1274						$fancy_notifications2 = "checked ='true'";
1275						break;
1276						
1277						case 1:
1278						$fancy_notifications1 = "checked ='true'";
1279						break;
1280						}
1281								?>
1282								<input type='radio' value='1' name='fancy_notifications' id='fancy_notifications1' <?php echo $fancy_notifications1; ?> /> <label for='fancy_notifications1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1283								<input type='radio' value='0' name='fancy_notifications' id='fancy_notifications2' <?php echo $fancy_notifications2; ?> /> <label for='fancy_notifications2'><?php echo TXT_WPSC_NO;?></label>
1284								</td>
1285							</tr>  
1286					
1287							<tr>
1288								<th scope="row">
1289								<?php echo TXT_WPSC_DISPLAY_PLUSTAX;?>:
1290								</th>
1291								<td>
1292								<?php
1293								$add_plustax = get_option('add_plustax');
1294								$add_plustax1 = "";
1295								$add_plustax2 = "";
1296								switch($add_plustax) {
1297									case 0:
1298									$add_plustax2 = "checked ='true'";
1299									break;
1300									
1301									case 1:
1302									$add_plustax1 = "checked ='true'";
1303									break;
1304								}
1305								?>
1306								<input type='radio' value='1' name='add_plustax' id='add_plustax1' <?php echo $add_plustax1; ?> /> <label for='add_plustax1'><?php echo TXT_WPSC_YES;?></label> &nbsp;
1307								<input type='radio' value='0' name='add_plustax' id='add_plustax2' <?php echo $add_plustax2; ?> /> <label for='add_plustax2'><?php echo TXT_WPSC_NO;?></label>
1308								</td>
1309							</tr>
1310					
1311							</table> 
1312							
1313							
1314							<h3 class="form_group"><?php echo TXT_WPSC_THUMBNAILSETTINGS;?></h3>
1315							<table class='wpsc_options form-table'>
1316							<?php
1317								if(function_exists("getimagesize")) {
1318								?>
1319								<tr>
1320									<th scope="row">
1321									<?php echo TXT_WPSC_PRODUCTTHUMBNAILSIZE;?>:
1322									</th>
1323									<td>
1324									<?php echo TXT_WPSC_HEIGHT;?>:<input type='text' size='6' name='product_image_height' value='<?php echo get_option('product_image_height'); ?>' /> <?php echo TXT_WPSC_WIDTH;?>:<input type='text' size='6' name='product_image_width' value='<?php echo get_option('product_image_width'); ?>' /> <br /><span class='small'></span>
1325									Changing this will only set the default size for images uploaded in future, to resize your current images, click <a href='#'>here</a> (this needs to be made to work, and this text needs adding to the language file)</span>
1326									</td>
1327								</tr>
1328								<tr>
1329									<th scope="row">
1330									<?php echo TXT_WPSC_CATEGORYTHUMBNAILSIZE;?>:
1331									</th>
1332									<td>
1333									<?php echo TXT_WPSC_HEIGHT;?>:<input type='text' size='6' name='category_image_height' value='<?php echo get_option('category_image_height'); ?>' /> <?php echo TXT_WPSC_WIDTH;?>:<input type='text' size='6' name='category_image_width' value='<?php echo get_option('category_image_width'); ?>' /> <span class='small'></span>
1334									</td>
1335								</tr>
1336								
1337								<tr>
1338									<th scope="row">
1339									<?php echo TXT_WPSC_SINGLE_PRODUCTTHUMBNAILSIZE;?>:
1340									</th>
1341									<td>
1342									<?php echo TXT_WPSC_HEIGHT;?>:<input type='text' size='6' name='single_view_image_height' value='<?php echo get_option('single_view_image_height'); ?>' /> <?php echo TXT_WPSC_WIDTH;?>:<input type='text' size='6' name='single_view_image_width' value='<?php echo get_option(

Large files files are truncated, but you can click here to view the full file