<?php
$version = isset($_GET['v']) ? $_GET['v'] : (isset($_POST['v']) ? $_POST['v'] : "");

switch($version)
{
case "wml":
define("VERSION", "wml");
break;

case "xhtml":
define("VERSION", "xhtml");
break;

default:
if((strpos(getenv('HTTP_ACCEPT'), "text/html") !== false) || (strpos(getenv('HTTP_USER_AGENT'), "Mozilla") !== false))
{
define("VERSION", "xhtml");
}
else
{
define("VERSION", "wml");
}
break;
}

?>