";
// foreach ($results as $key => $value)
// {
// echo "(results) ".$key.": ".$value."
";
// }
// echo '**********'."
";
// foreach ($_SESSION as $key => $value)
// {
// echo "(SESSION) ".$key.": ".$value."
";
// }
// foreach ($_POST as $key => $value)
// {
// echo "(POST) ".$key.": ".$value."
";
// }
$knv_host = $results['knv_host'];
if (array_key_exists('knv_center',$_SESSION))
{
$knv_center = $_SESSION['knv_center'];
}
else
{
$knv_center = 'UNKNOWN';
}
if (array_key_exists('redirect',$results))
{
if (!$results['redirect'] == "")
{
echo $results['redirect'];
header("Location: ".$results['redirect']);
exit;
}
}
// make sure the mdetect require is AFTER the redirect logic. Mdetect sends characters to the screen and causes the header command to not work.
require_once('../knvphp/mdetect.php');
if (array_key_exists('input',$results))
{
extract($results['input'], EXTR_PREFIX_ALL, "in");
}
if (array_key_exists('message',$results))
{
$in_message = $results['message'];
}
else
{
$in_message = '';
}
if (array_key_exists('template_message',$results))
{
$template_message = $results['template_message'];
}
else
{
$template_message = '';
}
if(!isset($in_userid))
{
$in_userid = "";
}
$size_adjust = 100;
$uagent_obj = new uagent_info();
if ($uagent_obj->DetectBlackberry() == $uagent_obj->true)
{
$in_message = 'Blackberry devices cannot access this web page. See Mobile Users Guide to install java application for Blackberry.';
$bad_bb = 1;
}
else
{
if ($uagent_obj->DetectOperaMobile() == $uagent_obj->true)
{
$in_message = "Opera browsers are not compatible with the Kids 'n Vue system. Please use another browser.";
$bad_bb = 1;
}
else
{
$bad_bb = 0;
}
}
if ($uagent_obj->DetectTierTablet() == $uagent_obj->true)
{
$size_adjust = 75;
}
else
{
//We can generally use the Quick Mobile detection method to save a couple of cycles.
if ($uagent_obj->DetectMobileQuick() == $uagent_obj->true)
{
$size_adjust = 100;
}
else
{
if ($uagent_obj->isTierIphone == $uagent_obj->true)
{
$size_adjust = 100;
}
else
{
//We'll assume that anything else not caught in the above filters is a desktop-class device.
$size_adjust = 60;
}
}
}
if ($size_adjust == 100)
{
$templateCode=@implode('', @file('./login_mobile.html'));
$templateCode=str_replace('<%%in_message%%>', $in_message, $templateCode);
$templateCode=str_replace('<%%size_adjust%%>', $size_adjust, $templateCode);
$templateCode=str_replace('<%%knv_host%%>', $knv_host, $templateCode);
$templateCode=str_replace('<%%in_userid%%>', $in_userid, $templateCode);
$templateCode=str_replace('<%%bad_bb%%>', $bad_bb, $templateCode);
}
else
{
$templateCode=@implode('', @file('./login_std.html'));
$templateCode=str_replace('<%%in_message%%>', $in_message, $templateCode);
$templateCode=str_replace('<%%knv_host%%>', $knv_host, $templateCode);
$templateCode=str_replace('<%%in_userid%%>', $in_userid, $templateCode);
$templateCode=str_replace('<%%bad_bb%%>', $bad_bb, $templateCode);
}
echo $templateCode;
?>