<?php
$SSL_ON = 0;
$SSL_PAGES = array('shop','register');


// END
define('SSL', $SSL_ON);

if(!defined('BASE_DIR')) exit;

if(in_array($_REQUEST['p'], $SSL_PAGES) && (defined('SSL') && SSL==1))
{
	$new = str_replace('&amp;','&',redir());
	if($_SERVER['SERVER_PORT']=='80') 
	{
		$new = str_replace('&amp;','&',redir());
		$new = str_replace('http://','https://',$new);
		refer($new);
		exit;
	}
} else {
	if($_SERVER['SERVER_PORT']=='443')
	{
		$new = str_replace('https://','http://',redir());
		$new = str_replace('&amp;','&',$new);
		refer($new);
		exit;
		header("HTTP/1.1 301 Moved Permanently");
		header("Location:$new");
		exit;
	}
}
?>