<?php
function getBar($value, $ext = false) {
    $width = $value * 20;
    if ($width == 0)
        $width = 1;
    $bar = 'redbar.gif';
    if ($width > 182)
        $bar = 'purbar.gif';
    else if ($width > 164)
        $bar = 'blupurbar.gif';
    else if ($width > 146)
        $bar = 'blubar.gif';
    else if ($width > 128)
        $bar = 'greblubar.gif';
    else if ($width > 110)
        $bar = 'grebar.gif';
    else if ($width > 92)
        $bar = 'yelgrebar.gif';
    else if ($width > 74)
        $bar = 'yelbar.gif';
    else if ($width > 56)
        $bar = 'oryelbar.gif';
    else if ($width > 38)
        $bar = 'orbar.gif';
    else if ($width > 20)
        $bar = 'redorbar.gif';

    return '<img src="'. ($ext ? 'http://www.monkeyquiz.com' : '') .'/img/'. $bar .'" height="12" width="'. $width .'" '. ($ext ? 'style="border: 1px solid #000000; border-left: none; vertical-align: middle; padding: 0px; margin: 0px;">' : 'class="bar">');
}

function sortCats(&$score, &$name) {
    $x = 0;
    while ($x < 1) {
        $y = $x + 1;
        while ($y < 7) {
            if ($score[$x] < $score[$y]) {
                $t1 = $score[$x];
                $t2 = $name[$x];
                $score[$x] = $score[$y];
                $name[$x] = $name[$y];
                $score[$y] = $t1;
                $name[$y] = $t2;
            }
            $y++;
        }
        $x++;
    }
}

function getDisplayName($name) {
    switch ($name) {
    case 'life':
        return 'Life';
    case 'mind':
        return 'Mind';
    case 'body':
        return 'Body';
    case 'spirit':
        return 'Spirit';
    case 'friends':
        return 'Friends/Family';
    case 'love':
        return 'Love';
    case 'finance':
        return 'Finance';
    default:
        return 'Error';
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Rate My Life Quiz - Final Results</title>
<link rel="stylesheet" type="text/css" href="life.css">
</head>
<body>
<?php
if ($_POST['ms'] == 't') {
?>
<a href="http://www.anrdoezrs.net/qb98r09608OQWTTYUXOQPTPRSQT" target="_top" onmouseover="window.status='http://www.myYearbook.com';return true;" onmouseout="window.status=' ';return true;">
<img src="http://www.lduhtrp.net/ng122y7B-53PRXUUZVYPRQUQSTRU" alt="Join the Ultimate Yearbook!" border="0"></a>
<br>
<?php
    sleep(3);
}
else if ($_POST['age'] == '17') {
?>
<a href="http://www.tkqlhce.com/cn117tenkem13966B7A132624535" target="_top" onmouseover="window.status='http://www.myYearbook.com';return true;" onmouseout="window.status=' ';return true;">
<img src="http://www.tqlkg.com/a6106xjnbhf02855A69021513424" alt="Join the Ultimate Yearbook!" border="0"></a>
<?php
    sleep(3);
}
?>
<h1>Final Results: Your Life, Rated</h1>

<?php
if (!$_POST['age'] || $_POST['age'] == 'x' || !$_POST['gender'] || $_POST['gender'] == 'x') {
?>
<p>You did not answer the first two questions, which are mandatory for this quiz.  Please go back 
to Part 1 and select an answer to those questions.  Without answering the questions, the quiz 
cannot generate your scores!</p>
<?php
    exit();
}
?>

<p>The results of your quiz are in.  Below you will find your life rated, along with a break-down 
of mind, body, spirit, love, friends and family, and finances. Then scroll down to read an analysis of
your results.  This is your life, rated.</p>

<?php
$life = 0;
$lifet = 0;
$mind = 0;
$mindt = 0;
$body = 0;
$bodyt = 0;
$spirit = 0;
$spiritt = 0;
$friends = 0;
$friendst = 0;
$love = 0;
$lovet = 0;
$finance = 0;
$financet = 0;
$age = intval($_POST['age']);
$gender = $_POST['gender'];

$bodyt++;
$mindt++;
if ($age < 40)
    $body++;
if ($age > 23)
    $mind++;

if ($_POST['orientation'] != 'x') {
    $lifet += 4;
    $mindt += 2;
    if ($_POST['orientation'] == 's')
        $life += 4;
    else if ($_POST['orientation'] != 'u') {
        $life += 2;
        $mind += 2;
    }
}

if ($_POST['gparents'] != 'x') {
    $lifet += 2;
    $friendst += 3;
    if ($_POST['gparents'] == '3' || $_POST['gparents'] == '4') {
        $life += 2;
        $friends += 3;
    }
    else if ($_POST['gparents'] == '2') {
        $life++;
        $friends += 2;
    }
    else if ($_POST['gparents'] == '1') {
        $life++;
        $friends++;
    }
}

if ($_POST['children'] != 'x') {
    if ($age == 17) {
        $lifet += 3;
        $financet++;
        $friendst++;
        if ($_POST['children'] == '0') {
            $life += 3;
            $finance++;
        }
        if ($_POST['children'] == '1') {
            $life++;
            $friends++;
        }
        else
            $friends++;
    }
    else if ($age == 18) {
        $lifet += 2;
        $financet++;
        $friendst += 2;
        if ($_POST['children'] == '0') {
            $life += 2;
            $finance++;
        }
        else
            $friends += 2;
    }
    else if ($age == 23) {
        $friendst += 2;
        if ($_POST['children'] != '0')
            $friends += 2;
    }
    else if ($age == 30) {
        $friendst += 3;
        $lifet += 3;
        if ($_POST['children'] == '1') {
            $friends += 2;
            $lifet += 2;
        }
        else if ($_POST['children'] == '5') {
            $friends += 3;
            $lifet += 2;
        }
        else if ($_POST['children'] != '0') {
            $friends += 3;
            $life += 3;
        }
    }
    else if ($age == 40 || $age == 50) {
        $friendst += 5;
        $lifet += 5;
        if ($_POST['children'] == '1') {
            $friends += 3;
            $lifet += 3;
        }
        else if ($_POST['children'] == '4' || $_POST['children'] == '5') {
            $friends += 5;
            $lifet += 5;
        }
        else if ($_POST['children'] != '0') {
            $friends += 4;
            $life += 5;
        }
    }
}

if ($_POST['marital'] != 'x') {
    if ($age == 40 || $age == 50) {
        $lifet += 5;
        $friendst += 3;
        $lovet += 2;
        if ($_POST['marital'] == 'm') {
            $life += 5;
            $friends += 4;
            $love += 2;
        }
        else if ($_POST['marital'] == 'r') {
            $life += 4;
            $friends += 3;
            $love += 2;
        }
        else if ($_POST['marital'] == 'n')
            $life++;
    }
    else if ($age != 17) {
        $lifet += 4;
        $friendst += 4;
        $lovet += 2;
        if ($_POST['marital'] == 'm') {
            $life += 4;
            $friends += 4;
            $love += 2;
        }
        else if ($_POST['marital'] == 'r') {
            $life += 3;
            $friends += 3;
            $love += 2;
        }
        else if ($_POST['marital'] == 'n')
            $life += 3;
    }
    else {
        $lifet += 3;
        $friendst++;
        $lovet += 2;
        if ($_POST['marital'] == 'n')
            $life += 3;
        else if ($_POST['marital'] != 'd') {
            $life++;
            $friends++;
            $love += 2;
        }
    }
}

if ($_POST['marital'] == 'd' && $_POST['children'] != 'x') {
    $lifet += 2;
    if($_POST['children'] == '0')
        $life += 2;
}

if ($_POST['siblings'] != 'x') {
    $friendst += 4;
    $lifet++;
    if ($_POST['siblings'] == '5')
        $friends += 4;
    else if ($_POST['siblings'] == '3' || $_POST['siblings'] == '4')
        $friends += 3;
    else if ($_POST['siblings'] == '2')
        $friends += 2;
    else if ($_POST['siblings'] == '1')
        $friends++;
    if ($_POST['siblings'] != '0')
        $life++;
}

if ($_POST['friends'] != 'x') {
    $friendst += 5;
    $lifet++;
    if ($_POST['friends'] == '10')
        $friends += 5;
    else if ($_POST['friends'] == '6')
        $friends += 4;
    else if ($_POST['friends'] == '3')
        $friends += 3;
    else if ($_POST['friends'] == '1')
        $friends += 2;
    if ($_POST['friends'] != '0')
        $life++;
}

if ($_POST['fitness'] != 'x') {
    if ($gender == 'm' && $age < 40) {
        $bodyt += 5;
        $lifet += 2;
        if ($_POST['fitness'] == 'u')
            $body += 2;
        else if ($_POST['fitness'] == 'h') {
            $life += 2;
            $body += 5;
        }
        else if ($_POST['fitness'] == 'so')
            $body += 2;
    }
    else if ($gender == 'm') {
        $bodyt += 5;
        $life++;
        if ($_POST['fitness'] == 'u' || $_POST['fitness'] == 'so')
            $body += 2;
        else if ($_POST['fitness'] == 'h') {
            $body += 5;
            $life++;
        }
    }
    if ($gender == 'f' && $age < 40) {
        $bodyt += 5;
        $lifet += 3;
        if ($_POST['fitness'] == 'u') {
            $body += 2;
            $life += 2;
        }
        else if ($_POST['fitness'] == 'h') {
            $life += 3;
            $body += 5;
        }
        else if ($_POST['fitness'] == 'so') {
            $life++;
            $body += 2;
        }
    }
    else {
        $lifet++;
        $bodyt += 5;
        if ($_POST['fitness'] == 'u')
            $body += 2;
        else if ($_POST['fitness'] == 'h') {
            $body += 5;
            $life++;
        }
        else if ($_POST['fitness'] == 'so')
            $body += 2;
    }
}

if ($_POST['died'] != 'x') {
    $lifet += 5;
    $mindt += 2;
    if ($_POST['died'] == '6y') {
        $life += 5;
        $mind += 2;
    }
    else if ($_POST['died'] == '3') {
        $life += 4;
        $mind += 2;
    }
    else if ($_POST['died'] == '1') {
        $life += 2;
        $mind++;
    }
    else if ($_POST['died'] == '6m')
        $life++;
}

if ($_POST['trauma']) {
    $lifet += 3;
    $mindt += 2;
    if ($_POST['trauma'] == 'n') {
        $life += 3;
        $mind += 2;
    }
}

if ($_POST['prison']) {
    $lifet += 2;
    $spiritt++;
    if ($_POST['prison'] == 'n') {
        $life += 2;
        $spirit++;
    }
    
}

if ($_POST['travel']) {
    $lifet += 2;
    $financet++;
    if ($_POST['travel'] == 'y') {
        $life += 2;
        $finance++;
    }
}

if ($_POST['ill']) {
    $lifet += 5;
    $financet += 2;
    $bodyt += 4;
    $mindt += 2;
    if ($_POST['ill'] == 'n') {
        $life += 5;
        $finance += 2;
        $body += 4;
        $mind += 2;
    }
}

if ($_POST['chronic']) {
    $lifet += 2;
    $bodyt += 2;
    if ($_POST['chronic'] == 'n') {
        $life += 2;
        $body += 2;
    }
}

if ($_POST['disabled']) {
    $lifet += 2;
    $bodyt += 2;
    $financet++;
    if ($_POST['disabled'] == 'n') {
        $life += 2;
        $body += 2;
        $finance++;
    }
}

if ($_POST['employed']) {
    $lifet++;
    $financet += 3;
    $friendst++;
    if ($_POST['employed'] == 'y') {
        $life++;
        $finance += 3;
        $friends++;
    }
}

if ($_POST['enlisted']) {
    $lifet++;
    $friendst++;
    if ($_POST['enlisted'] == 'n')
        $life++;
    else
        $friends++;
}

if ($_POST['pollution']) {
    $lifet++;
    $bodyt++;
    if ($_POST['pollution'] == 'n') {
        $life++;
        $body++;
    }
}

if ($_POST['fruits']) {
    $lifet++;
    $bodyt += 2;
    if ($_POST['fruits'] == 'y') {
        $life++;
        $body += 2;
    }
}

if ($_POST['finance']) {
    $lifet += 2;
    $financet += 3;
    if ($_POST['finance'] == 'y') {
        $life += 2;
        $finance += 3;
    }
}

if ($_POST['character']) {
    $lifet++;
    $spiritt += 2;
    if ($_POST['character'] == 'y') {
        $life++;
        $spirit += 2;
    }
}

if ($_POST['desire']) {
    $lifet++;
    $lovet += 2;
    if ($_POST['desire'] == 'y') {
        $life++;
        $love += 2;
    }
}

$lifet += 3;
$friendst++;
if (count($_POST['pet']) > 2) {
    $life += 3;
    $friends++;
}
else {
    $life += count($_POST['pet']);
    if (count($_POST['pet']) > 0)
        $friends++;
}

$lifet += 5;
$mindt += 3;
$bodyt++;
$giftd = $_POST['gifted'];
for ($i = 0; $i < count($giftd); $i++) {
    switch ($gifted[$i]) {
    case 'mu':
        $life++;
        $mind++;
        break;
    case 'si':
        $life++;
        break;
    case 'a':
        $life++;
        break;
    case 'ma':
        $mind += 2;
        break;
    case 'com':
        $mind += 2;
        break;
    case 'so':
        $life++;
        $body++;
        break;
    case 'coo':
        $life++;
    }
}

$lifet += 10;
$life += 10;
$body += 7;
$bodyt += 7;
$addic = $_POST['addict'];
for ($i = 0; $i < count($addic); $i++) {
    switch ($addic[$i]) {
    case 'co':
        $life--;
        break;
    case 'a':
        $life -= 2;
        $body--;
        break;
    case 'm':
        $life -= 2;
        break;
    case 'i':
        $life -= 4;
        $body--;
        break;
    case 'j':
        $body -= 2;
        break;
    case 'ci':
        $life--;
        $body -= 3;
    }
}

$life += 5;
$lifet += 5;
$sens = $_POST['sense'];
for ($i = 0; $i < count($sens); $i++) {
    switch ($sens[$i]) {
    case 'sm':
        $life--;
        break;
    default:
        $life -= 2;
    }
}

if ($_POST['education'] != 'x') {
    if ($age == 17 || $age == 18) {
        $mindt += 2;
        if ($_POST['education'] == 'h')
            $mind++;
        else if ($_POST['education'] == 'sc')
            $mind += 2;
    }
    else {
        $mindt += 4;
        $lifet += 2;
        if ($_POST['education'] == 'sc')
            $mind++;
        else if ($_POST['education'] == 'cb') {
            $mind += 2;
            $life += 2;
        }
        else if ($_POST['education'] == 'cm') {
            $mind += 3;
            $life += 2;
        }
        else if ($_POST['education'] == 'd') {
            $mind += 4;
            $life += 2;
        }
    }
}

if ($_POST['gpclose'] && $_POST['gpclose'] != 'x') {
    $friendst += 4;
    $lifet++;
    if ($_POST['gpclose'] == 'vc' && intval($_POST['gparents']) > 1) {
        $friends += 4;
        $life++;
    }
    else if ($_POST['gpclose'] == 'vc') {
        $friends += 3;
        $life++;
    }
    else if ($_POST['gpclose'] == 'sc')
        $friends += 2;
    else if ($_POST['gpclose'] == 'sd')
        $friends++;
}

if ($_POST['living'] != 'x') {
   if ($age < 23) {
       $financet += 2;
       if ($_POST['living'] == 'm')
           $finance++;
       else if ($_POST['living'] == 'p')
           $finance += 2;
   }
   else if ($age == 23) {
       $financet += 4;
       $lifet += 2;
       if ($_POST['living'] == 'r')
           $finance += 2;
       else if ($_POST['living'] == 'm') {
           $finance += 3;
           $life++;
       }
       else if ($_POST['living'] == 'p') {
           $finance += 4;
           $life += 2;
       }
   }
   else {
       $financet += 5;
       $lifet += 2;
       if ($_POST['living'] == 'd')
           $finance++;
       if ($_POST['living'] == 'r')
           $finance += 2;
       else if ($_POST['living'] == 'm') {
           $finance += 4;
           $life++;
       }
       else if ($_POST['living'] == 'p') {
           $finance += 5;
           $life += 2;
       }
   }
}

if ($_POST['relationship'] && $_POST['relationship'] != 'x') {
    $lifet++;
    $lovet += 3;
    if ($_POST['relationship'] == 'sns')
        $life++;
    else if ($_POST['relationship'] == 'sr') {
        $love += 2;
        $life++;
    }
    else if ($_POST['relationship'] == 'em') {
        $life++;
        $love += 3;
    }
    else if ($_POST['relationship'] == 'da') {
        $life++;
        $love += 2;
    }
}

if ($_POST['exercise'] != 'x') {
    $bodyt += 4;
    $lifet++;
    switch ($_POST['exercise']) {
    case 'oc':
        $body++;
        break;
    case 'of':
        $body += 3;
        break;
    case 'p':
        $body += 4;
        $life++;
        break;
    }
}

if ($_POST['x1'] && $_POST['employed'] == 'y') {
    $lifet += 4;
    $mindt++;
    $life += 5 - intval($_POST['x1']);
    if ($_POST['x1'] == '1')
        $mind++;
}
else if ($_POST['x1'] && $_POST['employed'] == 'n') {
    $lifet += 3;
    $mindt++;
    $financet += 2;
    switch ($_POST['x1']) {
    case '2':
        $life++;
        break;
    case '3':
        $life += 2;
        break;
    case '4':
        $life += 2;
        $mind++;
        $finance++;
        break;
    case '5':
        $life += 3;
        $mind++;
        $finance += 2;
    }
}

if ($_POST['x2'] && ($_POST['marital'] == 'm' || $_POST['marital'] == 'r')) {
    $lifet += 5;
    $mindt++;
    $spiritt++;
    $financet++;
    $friendst++;
    $lovet += 6;
    $life += 5 - intval($_POST['x2']);
    $love += 5 - intval($_POST['x2']);
    if ($_POST['x2'] == '1') {
        $love += 2;
        $life++;
        $mind++;
        $spirit++;
        $finance++;
        $friends++;
    }
    else if ($_POST['x2'] == '2') {
        $love++;
        $mind++;
        $finance++;
        $friends++;
    }
    else if ($_POST['x2'] == '3')
        $friends++;
    else if ($_POST['x2'] == '4')
        $love--;
    else if ($_POST['x2'] == '5')
        $love -= 2;
}
else if ($_POST['x2']) {
    $lifet += 4;
    $lovet += 5;
    $friendst++;
    $mindt++;
    switch ($_POST['x2']) {
    case '1':
        $life += 4;
        $love += 5;
        $mind++;
        $friends += 2;
        break;
    case '2':
        $life += 3;
        $love += 4;
        $friends++;
        break;
    case '3':
        $life++;
        $love += 2;
        break;
    case '4':
        $love++;
    }
}

if ($_POST['x3']) {
    $mindt += 2;
    $lifet += 2;
    $spiritt++;
    switch ($_POST['x3']) {
    case '1':
        $mind += 2;
        $life += 2;
        $spirit++;
        break;
    case '2':
        $mind += 2;
        $life++;
        $spirit++;
        break;
    case '3':
        $mind++;
        $life++;
        break;
    case '4':
        $mind++;
    }
}

if ($_POST['x4']) {
    $financet += 5;
    $lifet += 2;
    $finance += 5 - intval($_POST['x4']);
    if ($_POST['x4'] == '1')
        $life += 2;
    else if ($_POST['x4'] == '2')
        $life++;
}

if ($_POST['x5']) {
    $lifet += 3;
    $mindt += 3;
    switch ($_POST['x5']) {
    case '1':
        $life += 3;
        $mind += 3;
        break;
    case '2':
        $life += 3;
        $mind += 2;
        break;
    case '3':
        $life++;
        $mind += 2;
        break;
    case '4':
        $life++;
        $mind++;
    }
}

if ($_POST['x6']) {
    $lifet += 3;
    $bodyt += 3;
    $mindt += 3;
    $lovet++;
    switch ($_POST['x6']) {
    case '1':
        $life += 3;
        $body += 3;
        $mind += 3;
        $love++;
        break;
    case '2':
        $life += 3;
        $body += 3;
        $mind += 2;
        break;
    case '3':
        $life += 2;
        $body += 2;
        $mind++;
        break;
    case '4':
        $life++;
        $body++;
        break;
    }
}

if ($_POST['x7']) {
    $lifet += 2;
    $mindt += 3;
    $spiritt++;
    switch ($_POST['x7']) {
    case '1':
        $life += 2;
        $mind += 3;
        $spirit++;
        break;
    case '2':
        $life += 2;
        $mind += 2;
        break;
    case '3':
        $life++;
        $mind++;
        break;
    case '4':
        $mind++;
    }
}

if ($_POST['x8']) {
    $lifet += 3;
    $financet++;
    switch ($_POST['x8']) {
    case '1':
        $life += 3;
        $finance++;
        break;
    case '2':
        $life += 2;
        $finance++;
        break;
    case '3':
        $life++;
        break;
    case '4':
        $life++;
    }
}

if ($_POST['x9']) {
    $lifet += 2;
    $mindt++;
    $bodyt += 2;
    switch ($_POST['x9']) {
    case '1':
        $life += 2;
        $mind++;
        $body += 2;
        break;
    case '2':
        $life++;
        $mind++;
        $body += 2;
        break;
    case '3':
        $life++;
        $body++;
        break;
    case '4':
        $body++;
    }
}

if ($_POST['x10']) {
    $lifet += 5;
    $bodyt += 3;
    $mindt += 4;
    $life += 5 - intval($_POST['x10']);
    $mind += 5 - intval($_POST['x10']);
    $body += 4 - intval($_POST['x10']);
    if ($_POST['x10'] == '5')
        $body++;
    if ($_POST['x10'] == '1')
        $life++;
}

if ($_POST['x11']) {
    $lifet += 3;
    $mindt++;
    switch ($_POST['x11']) {
    case '1':
        $life += 3;
        $mind++;
        break;
    case '2':
        $life += 2;
        $mind++;
        break;
    case '3':
        $life++;
        break;
    case '4':
        $life++;
        break;
    }
}

if ($_POST['x12']) {
    $lifet += 2;
    $mindt += 2;
    switch ($_POST['x12']) {
    case '1':
        $life += 2;
        $mind += 2;
        break;
    case '2':
        $life++;
        $mind += 2;
        break;
    case '3':
        $life++;
        $mind++;
        break;
    }
}

if ($_POST['x13'] && $_POST['religion'] == 'ag') {
    $lifet += 2;
    $mindt += 2;
    $spiritt += 2;
    switch ($_POST['x13']) {
    case '1':
        $spirit += 2;
        $mind += 2;
        $life += 2;
        break;
    case '2':
        $spirit += 2;
        $mind++;
        $life += 2;
        break;
    case '3':
        $spirit++;
        $mind++;
        $life++;
    case '4':
        $mind++;
        $life++;
    }
}
else if ($_POST['x13']) {
    $lifet += 3;
    $mindt += 2;
    $spiritt += 4;
    $spirit += 5 - intval($_POST['x13']);
    switch ($_POST['x13']) {
    case '1':
        $life += 3;
        $mind += 2;
        break;
    case '2':
        $life += 2;
        $mind += 2;
        break;
    case '3':
        $life++;
        $mind++;
    }
}

if ($_POST['x14']) {
    $friendst += 4;
    $lifet += 3;
    $friends += 5 - intval($_POST['x14']);
    $life += 4 - intval($_POST['x14']);
    if ($_POST['x14'] == '5')
        $life++;
}

if ($_POST['x15']) {
    $lifet += 4;
    $mindt++;
    $life += 5 - intval($_POST['x15']);
    if ($_POST['x15'] == '1' || $_POST['x15'] == '2')
        $mind++;
}

if ($_POST['x16']) {
    $financet += 5;
    $lifet += 3;
    $finance += 5 - intval($_POST['x16']);
    switch ($_POST['x16']) {
    case '1':
        $life += 3;
        $finance++;
        break;
    case '2':
        $life += 2;
    case '3':
        $life++;
    }
}

if ($_POST['x17']) {
    $lifet += 2;
    $mindt += 2;
    switch ($_POST['x17']) {
    case '1':
    case '2':
        $life += 2;
        $mind += 2;
        break;
    case '3':
    case '4':
        $life++;
        $mind++;
    }
}

if ($_POST['x18']) {
    $lifet += 4;
    $mindt += 2;
    $spiritt++;
    switch ($_POST['x18']) {
    case '2':
        $life++;
        $mind++;
        break;
    case '3':
        $life += 2;
        $mind++;
        $spirit++;
        break;
    case '4':
        $life += 3;
        $mind += 2;
        $spirit++;
        break;
    case '5':
        $life += 4;
        $mind += 2;
        $spirit++;
    }
}

if ($_POST['x19']) {
    $spiritt += 4;
    $lifet++;
    $spirit += 5 - intval($_POST['x19']);
    if (intval($_POST['x19']) < 3)
        $life++;
}

if ($_POST['deployed']) {
    $friendst++;
    $lifet += 3;
    $mindt++;
    $lovet++;
    if ($_POST['deployed'] == 'n') {
        $life += 3;
        $mind++;
        $love++;
    }
    else 
        $friends++;
}

if ($_POST['grades']) {
    $financet++;
    $mindt += 2;
    $lifet++;
    if ($_POST['grades'] == 'y') {
        $finance++;
        $mind += 2;
        $life++;
    }
}

if ($_POST['career']) {
    if ($age < 23) {
        $lifet++;
        $mindt++;
        if ($_POST['career'] == 'y') {
            $life++;
            $mind++;
        }
    }
    else {
        $lifet++;
        $mindt++;
        $financet++;
        if ($_POST['career'] == 'y') {
            $life++;
            $mind++;
            $finance++;
        }
    }
}

if ($_POST['reason']) {
    $spiritt += 2;
    if ($_POST['reason'])
        $spirit += 2;
}

$lifet += 3;
$paren = $_POST['parents'];
for ($i = 0; $i < count($paren); $i++) {
    switch ($paren[$i]) {
    case 'l':
        $life++;
        break;
    case 'di':
        $life--;
    case 'de':
        $life++;
        break;
    case 's':
        $life++;
        break;
    case 'h':
        $life--;
        if ($age < 23)
            $mind--;
        break;
    case 'a':
        $life--;
        break;
    case 'f':
        $life--;
        if ($age < 23)
            $mind--;
    }
}

$spiritt++;
$spirit++;
$friendst += 2;
$friends += 2;
$lifet += 15;
$life += 15;
$mindt += 12;
$mind += 12;
$bodyt += 3;
$body += 3;
$psy = $_POST['psych'];
for ($i = 0; $i < count($psy); $i++) {
    switch ($psy[$i]) {
    case 'h':
        $life -= 2;
        $mind -= 2;
        break;
    case 'i':
        $life -= 2;
        $mind--;
        $body--;
        break;
    case 'o':
        $life -= 2;
        $mind -= 2;
        break;
    case 'p':
        $life -= 2;
        $mind -= 2;
        break;
    case 'd':
        $life -= 3;
        $mind -= 2;
        $spirit--;
        break;
    case 'l':
        $friends -= 3;
        $life -= 2;
        $mind--;
        break;
    case 'e':
        $life -= 2;
        $body -= 2;
        $mind -= 2;
    }
}

$lifet += 7;
$bodyt += 2;
$financet++;
$spiritt += 7;
$mindt += 5;
$friendst += 2;
$appl = $_POST['apply'];
for ($i = 0; $i < count($appl); $i++) {
    switch ($appl[$i]) {
    case 'm':
        $life++;
        $body += 2;
        break;
    case 'l':
        $life++;
        $mind += 2;
        break;
    case 'h':
        $life++;
        $spirit += 2;
        $mind++;
        break;
    case 'c':
        $spirit += 2;
        $finance++;
        $life++;
        break;
    case 'f':
        $life++;
        $friends += 2;
        break;
    case 'u':
        $mind += 2;
        $spirit++;
        $life++;
        break;
    case 'n':
        $spirit += 2;
        $life++;
    }
}


// Question Combos!

if ($_POST['x4'] && $_POST['x16']) {
    $financet += 3;
    $finance += 3;
    if (intval($_POST['x4']) > 3 && intval($_POST['x16']) > 3)
        $finance -= 3;
    else if (($_POST['x4'] == '3' || $_POST['x16'] == '3') && (intval($_POST['x4']) > 3 || intval($_POST['x16']) > 3))
        $finance -= 2;
}

if ($_POST['fitness'] && $_POST['exercise']) {
    $bodyt += 2;
    $body += 2;
    if (($_POST['fitness'] == 'vo' || $_POST['fitness'] == 'so') && ($_POST['exercise'] == 'n' || $_POST['exercise'] == 'oc'))
        $body -= 2;
}

if ($age > 23 && $_POST['travel'] == 'y' && intval($_POST['x16']) > 3)
    $financet += 2;

if ($_POST['fitness'] == 'u' || $_POST['ill'] == 'y') {
    $lifet++;
    $bodyt += 2;
}

if (($_POST['trauma'] == 'y' || $_POST['died'] == '6m') && $_POST['x7']) {
    $lifet += 4;
    $mindt += 2;
    if (intval($_POST['x7']) < 3) {
        $life += 4;
        $mind += 2;
    }
    else if ($_POST['x7'] == '3') {
        $life += 3;
        $mind += 2;
    }
}

if ($_POST['desire'] == 'y' && ($_POST['relationship'] == 'ss' || $_POST['relationship'] == 'sns'))
    $lovet++;

if ($_POST['marital'] != 'm' && $_POST['marital'] != 'r' && $_POST['relationship']) {
    if ($_POST['relationship'] == 'sr' || $_POST['relationship'] == 'da')
        $love++;
    else if ($_POST['relationship'] == 'em')
        $love += 2;
}

if ($_POST['orientation'] == 'u' && ($_POST['marital'] == 'm' || $_POST['marital'] == 'r' || $_POST['relationship'] == 'em')) {
    $lovet++;
    $mindt++;
    $lifet += 2;
}

/*
echo 'life: '. $life .'/'. $lifet .'<br>';
echo 'mind: '. $mind .'/'. $mindt .'<br>';
echo 'body: '. $body .'/'. $bodyt .'<br>';
echo 'spirit: '. $spirit .'/'. $spiritt .'<br>';
echo 'friends: '. $friends .'/'. $friendst .'<br>';
echo 'love: '. $love .'/'. $lovet .'<br>';
echo 'finance: '. $finance .'/'. $financet .'<br>';
*/


if ($mindt < 44)
    $mind = -1;
else
    $mind = round(10 * $mind / $mindt, 1);
if ($bodyt < 36)
    $body = -1;
else
    $body = round(10 * $body / $bodyt, 1);
if ($spiritt < 18)
    $spirit = -1;
else
    $spirit = round(10 * $spirit / $spiritt, 1);
if ($friendst < 20)
    $friends = -1;
else
     $friends = round(10 * $friends / $friendst, 1);
if ($lovet < 10)
    $love = -1;
else
    $love = round(10 * $love / $lovet, 1);
if ($financet < 22)
    $finance = -1;
else
    $finance = round(10 * $finance / $financet, 1);

// life corrections
$shave = 1.00;
$talkback = 'f';
if ($mind != -1 && $mind < 2.2)
    $shave -= 0.04;
else if ($mind != -1 && $mind < 3.3)
    $shave -= 0.03;
else if ($mind != -1 && $mind < 5.5)
    $shave -= 0.02;
else if ($mind > 8) {
    $shave += 0.01;
    $talkback = 't';
}
if ($body != -1 && $body < 2.2)
    $shave -= 0.04;
else if ($body != -1 && $body < 3.3)
    $shave -= 0.03;
else if ($body != -1 && $body < 5.5)
    $shave -= 0.02;
else if ($body > 8.1) {
    $shave += 0.01;
    $talkback = 't';
}
if ($spirit != -1 && $spirit < 2.2)
    $shave -= 0.04;
else if ($spirit != -1 && $spirit < 3.3)
    $shave -= 0.03;
else if ($spirit != -1 && $spirit < 5.5)
    $shave -= 0.02;
else if ($spirit > 8.1) {
    $shave += 0.01;
    $talkback = 't';
}
if ($friends != -1 && $friends < 2.2)
    $shave -= 0.04;
else if ($friends != -1 && $friends < 3.3)
    $shave -= 0.03;
else if ($friends != -1 && $friends < 5.5)
    $shave -= 0.02;
else if ($friends > 7.8) {
    $shave += 0.01;
    $talkback = 't';
}
if ($love != -1 && $love < 2.2)
    $shave -= 0.04;
else if ($love != -1 && $love < 3.3)
    $shave -= 0.03;
else if ($love != -1 && $love < 5.5)
    $shave -= 0.02;
else if ($love > 8.1) {
    $shave += 0.01;
    $talkback = 't';
}
if ($finance != -1 && $finance < 2.2)
    $shave -= 0.04;
else if ($finance != -1 && $finance < 3.3)
    $shave -= 0.03;
else if ($finance != -1 && $finance < 5.5)
    $shave -= 0.02;
else if ($finance > 8) {
    $shave += 0.01;
    $talkback = 't';
}

if ($lifet < 100)
    $life = -1;
else
    $life = round(10 * $life * $shave / $lifet, 1);

if ($life > 8.7)
    $talkback = 't';


if ($life != -1 && $life < 0)
    $life = 0;
else if ($life > 10)
    $life = 10;
if ($mind != -1 && $mind < 0)
    $mind = 0;
else if ($mind > 10)
    $mind = 10;
if ($body != -1 && $body < 0)
    $body = 0;
else if ($body > 10)
    $body = 10;
if ($spirit != -1 && $spirit < 0)
    $spirit = 0;
else if ($spirit > 10)
    $spirit = 10;
if ($love != -1 && $love < 0)
    $love = 0;
else if ($love > 10)
    $love = 10;
if ($friends != -1 && $friends < 0)
    $friends = 0;
else if ($friends > 10)
    $friends = 10;
if ($finance != -1 && $finance < 0)
    $finance = 0;
else if ($finance > 10)
    $finance = 10;


//log this result!
$pdo = new PDO('mysql:host=localhost;dbname=monkey_monkeyquiz', 'monkey_dbuser', 'xrWill0');

$stmt = $pdo->prepare("INSERT INTO life_results (life, mind, body, spirit, friends, love, finance, gender_id, age_group_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bindValue(1, $life);
$stmt->bindValue(2, $mind);
$stmt->bindValue(3, $body);
$stmt->bindValue(4, $spirit);
$stmt->bindValue(5, $friends);
$stmt->bindValue(6, $love);
$stmt->bindValue(7, $finance);
$stmt->bindValue(8, $gender);
$stmt->bindValue(9, $age);
$stmt->execute();
$pdo = null;

$nodatingads = ($age == 17 || $_POST['marital'] == 'm' || $_POST['marital'] == 'r' || $_POST['relationship'] == 'em' || $_POST['relationship'] == 'sr');
$xyz = '';
if (!$nodatingads && $gender == 'f') {
    if ($_POST['orientation'] == 's' || $_POST['orientation'] == 'x')
        $xyz = 'f';
    else
        $xyz = 'gf';
}
else if (!$nodatingads && $gender == 'm') {
    if ($_POST['orientation'] == 's' || $_POST['orientation'] == 'x')
        $xyz = 'm';
    else
        $xyz = 'gm';
}
if (!$nodatingads)
    $xyz .= 'd';
if ($age < 23)
    $xyz .= 'y';
if ($_POST['children'] != 'x' && $_POST['children'] != '0')
    $xyz .= 'k';
if ($_POST['religion'] == 'j')
    $xyz .= 'j';
// uncomment for Christmas
//if ($_POST['religion'] != 'h' && $_POST['religion'] != 'i' && $_POST['religion'] != 'j' && $_POST['religion'] != 'si')
//    $xyz .= 'c';
if ($_POST['enlisted'] == 'y')
    $xyz .= 'e';
if ($_POST['travel'] == 'y')
    $xyz .= 't';
if ($finance > 7.6 && $age > 18)
    $xyz .= 'r';


//Display an ad!
echo '<div style="width: 637px; padding: 0px; margin: 0px;"><div style="float: right; width: 265px; vertical-align: middle;">';
if ($nodatingads && strstr($xyz, 'k')) {
    echo '<a href="http://www.dpbolvw.net/a5100ft1zt0GIOLLQMPGIHKOIJPK" target="_top" onmouseover="window.status=\'http://www.santa-letters.net\';return true;" onmouseout="window.status=\' \';return true;">';
    echo '<img src="http://www.lduhtrp.net/bj108z15u-yJLROOTPSJLKNRLMSN" alt="Personalized Santa Letters" border="0" style="margin-left: 50px; margin-top: 30px;"></a>';
}
else if ($_POST['travel'] == 'y' && $age > 17 && $nodatingads) {
    echo '<a href="http://www.anrdoezrs.net/k9122nmvsmu9BHEEJFI9BADJCEBC" target="_top" onmouseover="window.status=\'http://www.carnival.com\';return true;" onmouseout="window.status=\' \';return true;">';
    echo '<img src="http://www.awltovhc.com/hj115vvzntrCEKHHMILCEDGMFHEF" alt="" border="0" style="margin-left: 60px;"></a>';
}
else if ($age < 30 && $nodatingads) {
    echo '<a href="http://www.kqzyfj.com/4d81nmvsmu9BHEEJFI9BADJJFJD" target="_top" onmouseover="window.status=\'http://music.yahoo.com/unlimited/affiliate/cj\';return true;" onmouseout="window.status=\' \';return true;">';
    echo '<img src="http://www.awltovhc.com/ff108r6Az42OQWTTYUXOQPSYYUYS" alt="Yahoo! Music" border="0" style="margin-left: 20px;"></a>';
}
else if ($nodatingads && ($_POST['religion'] == 'b' || $_POST['religion'] == 'n')) {
    echo '<a href="http://www.dpbolvw.net/fe103p-85-7NPVSSXTWNTTQRSSQ" target="_top" onmouseover="window.status=\'http://www.wailana.com\';return true;" onmouseout="window.status=\' \';return true;">';
    echo '<img src="http://www.lduhtrp.net/cf81y7B-53PRXUUZVYPVVSTUUS" alt="Health, Relaxation" border="0" style="margin-left: 60px;"></a>';
}
else if ($age < 23) {
    echo '<a href="http://www.jdoqocy.com/4m115zw41w3JLROOTPSJLKOKLNRQ" target="_top" onmouseover="window.status=\'http://www.myYearbook.com\';return true;" onmouseout="window.status=\' \';return true;">';
    echo '<img src="http://www.lduhtrp.net/oj105p59y31NPVSSXTWNPOSOPRVU" alt="Join the Ultimate Yearbook!" border="0" style="margin-left: 60px; margin-top: 40px;"></a>';
}
else if ($_POST['religion'] == 'j') {
    echo '<a href="http://www.dpbolvw.net/qh105gv30v2IKQNNSORIKJMPLOMJ" target="_top" onmouseover="window.status=\'http://www.jdate.com/default.asp?prm=41330\';return true;" onmouseout="window.status=\' \';return true;">';
    echo '<img src="http://www.tqlkg.com/fn101iw-ousDFLIINJMDFEHKGJHE" alt="" border="0" style="margin-left: 15px;"></a>';
}
else if ($_POST['orientation'] == 'g' && $gender == 'm') {
    echo '<a href="http://www.dpbolvw.net/hq105xdmjdl02855A690AA44233" target="_top" onmouseover="window.status=\'http://www.gay.com\';return true;" onmouseout="window.status=\' \';return true;">';
    echo '<img src="http://www.awltovhc.com/km121drvjpn8AGDDIEH8IICCABB" alt="Gay.com Personals" border="0" style="margin-left: 15px;"></a>';
}
else if ($_POST['orientation'] != 's' && $_POST['orientation'] != 'x') {
    if ($gender == 'f') {
        echo '<a href="http://www.anrdoezrs.net/sa101mu2-u1HJPMMRNQHJIKRKKOR" target="_top" onmouseover="window.status=\'http://www.glimpse.com/Applications/MemberProfile/RegistrationStep1.aspx?PRM=11514\';return true;" onmouseout="window.status=\' \';return true;">';
        echo '<img src="http://www.afcyhf.com/n9121bosgmk57DAAFBE5768F88CF" alt="Love, Romance and Dating" border="0" style="margin-left: 20px;"></a>';
    }
    else {
        echo '<a href="http://www.jdoqocy.com/db111ar-xrzEGMJJOKNEGFHOHHLI" target="_top" onmouseover="window.status=\'http://www.glimpse.com/Applications/MemberProfile/RegistrationStep1.aspx?PRM=11514\';return true;" onmouseout="window.status=\' \';return true;">';
        echo '<img src="http://www.afcyhf.com/2a110drvjpn8AGDDIEH8A9BIBBFC" alt="Love, Romance and Dating" border="0" style="margin-left: 60px;"></a>';
    }
}
else {
    if ($gender == 'm') {
        echo '<a href="http://www.anrdoezrs.net/3q122zw41w3JLROOTPSJLKNQRMNK" target="_top" onmouseover="window.status=\'http://www.americansingles.com/default.asp?p=7090&prm=44816\';return true;" onmouseout="window.status=\' \';return true;">';
        echo '<img src="http://www.awltovhc.com/lr82nswkqo9BHEEJFI9BADGHCDA" alt="" border="0" style="margin-left: 15px;"></a>';
    }
    else {
        echo '<a href="http://www.anrdoezrs.net/aj103ar-xrzEGMJJOKNEGFILMGOH" target="_top" onmouseover="window.status=\'http://www.americansingles.com/default.asp?p=7090&prm=44816\';return true;" onmouseout="window.status=\' \';return true;">';
        echo '<img src="http://www.lduhtrp.net/rb101elpdjh24A77C8B24369A4C5" alt="Free Registration" border="0" style="margin-left: 23px;"></a>';
    }

}

echo '</div>';
?>

<h2>Here Are Your Results:</h2>

<table cellspacing="0" class="fin">
  <tr>
    <td class="finc life"><b>Life: </b></td>
<?php
if ($life != -1)
    echo '<td class="fin life">'. getBar($life) .' <b>'. $life .'</b></td>';
else
    echo '<td class="fin life"><i>Not enough information</i></td>';
?>
  </tr>
  <tr>
    <td class="finc"><b>Mind: </b></td>
<?php
if ($mind != -1)
    echo '<td class="fin">'. getBar($mind) .' <b>'. $mind .'</b></td>';
else
    echo '<td class="fin"><i>Not enough information</i></td>';
?>
  </tr>
  <tr>
    <td class="finc"><b>Body: </b></td>
<?php
if ($body != -1)
    echo '<td class="fin">'. getBar($body) .' <b>'. $body .'</b></td>';
else
    echo '<td class="fin"><i>Not enough information</i></td>';
?>
  </tr>
  <tr>
    <td class="finc"><b>Spirit: </b></td>
<?php
if ($spirit != -1)
    echo '<td class="fin">'. getBar($spirit) .' <b>'. $spirit .'</b></td>';
else
    echo '<td class="fin"><i>Not enough information</i></td>';
?>
  </tr>
  <tr>
    <td class="finc"><b>Friends/Family: </b></td>
<?php
if ($friends != -1)
    echo '<td class="fin">'. getBar($friends) .' <b>'. $friends .'</b></td>';
else
    echo '<td class="fin"><i>Not enough information</i></td>';
?>
  </tr>
  <tr>
    <td class="finc"><b>Love: </b></td>
<?php
if ($love != -1)
    echo '<td class="fin">'. getBar($love) .' <b>'. $love .'</b></td>';
else
    echo '<td class="fin"><i>Not enough information</i></td>';
?>
  </tr>
  <tr>
    <td class="finc"><b>Finance: </b></td>
<?php
if ($finance != -1)
    echo '<td class="fin">'. getBar($finance) .' <b>'. $finance .'</b></td>';
else
    echo '<td class="fin"><i>Not enough information</i></td>';
?>
  </tr>
</table>

<br>
<h2>Put the Above Results Box on Your Blog, Journal, or Message Board</h2>

<p>It's easy to <b>post your quiz results</b>.  
<script LANGUAGE="JavaScript">
<!--
function showCode()  { window.open("life_result_codej.php?li=<?= $life ?>&m=<?=$mind ?>&b=<?= $body ?>&s=<?= $spirit ?>&fr=<?= $friends?>&lo=<?= $love ?>&fi=<?= $finance ?>&xyz=<?= xyz ?>","result","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width=660,height=360" ); }
document.write('Just <a href="javascript:showCode();">click here to get the HTML code</a>.');
-->
</script>
<noscript>
  Just click this button to get the HTML code: 
  <form action="life_result_code.php" method="post" target="_blank" style="display: inline; margin: 0px;">
    <input type="hidden" name="li" value="<?= $life ?>">
    <input type="hidden" name="m" value="<?= $mind ?>">
    <input type="hidden" name="b" value="<?= $body ?>">
    <input type="hidden" name="s" value="<?= $spirit ?>">
    <input type="hidden" name="fr" value="<?= $friends ?>">
    <input type="hidden" name="lo" value="<?= $love ?>">
    <input type="hidden" name="fi" value="<?= $finance ?>">
    <input type="hidden" name="xyz" value="<?= $xyz ?>">
    <input type="submit" value="Click Here">
  </form>
</noscript>
<br>
Also, compare your scores with your friends, parents, or coworkers!<br>
You can even <a href="life_stats.html?xyz=<?= $xyz ?>">view statistics</a> that have been 
generated, based on the results of thousands of people taking this quiz. See 
how men differ from women and how older people differ from younger.
<?php
if ($talkback == 't') {
    $sc[] = $life;
    $na[] = 'life';
    $sc[] = $mind;
    $na[] = 'mind';
    $sc[] = $body;
    $na[] = 'body';
    $sc[] = $spirit;
    $na[] = 'spirit';
    $sc[] = $friends + 0.3;
    $na[] = 'friends';
    $sc[] = $love;
    $na[] = 'love';
    $sc[] = $finance;
    $na[] = 'finance';
    if ($life < 8.8)
        sortCats($sc, $na);
?>
<br><br>
<b>Your <?= getDisplayName($na[0]) ?> score is very high</b>, much higher than the average.  
If you wouldn't mind, please take a little time to explain how you manage to succeed 
so well <?= ($na[0] == 'life' ? 'in all you do.' : 'at this aspect of your life.') ?> 
Your words may be read by someone else who scored very low. 
Take a moment to give them some useful advice.  Your thoughts are very much appreciated.<br>
<form action="talk_back.html" method="post" style="display: inline; margin: 0px; padding: 0px;">
<?php
    if ($age == 18 || $age == 23)
        echo '<input type="hidden" name="fourth" value="yes">';
?>
    <input type="hidden" name="cat" value="<?= $na[0] ?>">
    <input type="text" maxlength="30" name="name" value="" size="15"> &lt;--Your name (optional)<br>
    <input type="text" maxlength="40" name="location" value="" size="15"> &lt;--Where are you from? (optional)<br>
    <input type="text" maxlength="40" name="email" value="" size="15"> &lt;--Your email address (optional)<br>
    <b>Please Share Your Thoughtful Advice:</b><br>
    <textarea name="body" cols="55" rows="7"></textarea><br>
    <input type="submit" value="Submit">
</form>
<?php
}
?>
</p>
<br style="clear: both;">

<h2>Analysis of Your Life Score Results</h2>

<div style="width: 180px; float: left; background: url(../img/rainbow.gif); margin: 5px; margin-top: 0px; padding: 6px; border: 1px solid #ddbb88; background-color: #ffffcc;">
<b>Consider These Links:</b><br><br>
<b><a href="http://www.gotoquiz.com/">Take More Quizzes</a></b><br>
GotoQuiz lets you make and take quizzes. Easier than Quizilla!<br><br>

<?php
if ($age < 23) {
    echo '<b><a href="http://www.tkqlhce.com/qt119ar-xrzEGMJJOKNEGFJFGILO" target="_top" onmouseover="window.status=\'http://www.myYearbook.com\';return true;" onmouseout="window.status=\' \';return true;">myYearbook.com</a></b><br>';
    echo 'Online community, better than MySpace. Try it out. <img src="http://www.tqlkg.com/nc117ax0pvtEGMJJOKNEGFJFGILO" width="5" height="4" border="0"><br><br>';
}
if ($_POST['religion'] == 'j' && !$nodatingads) {
    echo '<b><a href="http://www.jdoqocy.com/o1117iqzwqyDFLIINJMDFEHKGJJM" target="_top" onmouseover="window.status=\'http://www.jdate.com/default.asp?prm=41330\';return true;" onmouseout="window.status=\' \';return true;">Jewish Singles</a></b><br>';
    echo 'Try JDate.com today. Free to join. <img src="http://www.afcyhf.com/24106p59y31NPVSSXTWNPORUQTTW" width="1" height="4" border="0"><br><br>';
}
else if (!$nodatingads && $_POST['orientation'] != 'g') {
    echo '<b><a href="http://www.jdoqocy.com/c581cy63y5LNTQQVRULNMPTMUUS" target="_top" onmouseover="window.status=\'http://www.americansingles.com/default.asp?p=7090&prm=44816\';return true;" onmouseout="window.status=\' \';return true;">Chat With Single ';
    if ($gender == 'm' && $age < 30)
        echo 'Girls';
    else if ($gender == 'm')
        echo 'Women';
    else if ($age < 30)
        echo 'Guys';
    else
        echo 'Men';
    echo '</a></b><br>';
    echo 'Register free and start chatting right now at AmericanSingles. <img src="http://www.awltovhc.com/ch103wquiom79FCCHDG798BF8GGE" width="3" height="4" border="0"><br><br>';
}
if ($_POST['enlisted'] == 'y') {
    echo '<b><a href="http://www.kqzyfj.com/56102p-85-7NPVSSXTWNPOQXUTUU" target="_top" onmouseover="window.status=\'http://www.military.com/\';return true;" onmouseout="window.status=\' \';return true;">GI Bill Made Easy</a></b><br>';
    echo 'Request free information from Military.com on your GI benefits. </a><img src="http://www.tqlkg.com/6s79r6Az42OQWTTYUXOQPRYVUVV" width="5" height="4" border="0"><br><br>';
}
if (strstr($xyz, 'g')) {
    echo '<b><a href="http://www.tkqlhce.com/2l116y1A719PRXUUZVYPXRQQWYZ" target="_top" onmouseover="window.status=\'http://www.glimpse.com/Applications/MemberProfile/RegistrationStep1.aspx?PRM=11514\';return true;" onmouseout="window.status=\' \';return true;">Glimpse&reg;.com</a></b><br>';
    echo 'Premier gay and lesbian singles network. Free registration. <img src="http://www.afcyhf.com/2h103xjnbhf02855A690821179A" width="5" height="4" border="0"><br><br>';
}
if (strstr($xyz, 'k')) {
    echo '<b><a href="http://www.jdoqocy.com/np82r09608OQWTTYUXOQPTPRPQQ" target="_top" onmouseover="window.status=\'http://www.StuffKidsLike.com\';return true;" onmouseout="window.status=\' \';return true;">Shop StuffKidsLike.com</a></b><br>';
    echo 'Science, educational, learning toys and games. ';
    if (strstr($xyz, 'c'))
        echo 'Great Christmas gift ideas. ';
    echo '<img src="http://www.lduhtrp.net/36103m-3sywHJPMMRNQHJIMIKIJJ" width="4" height="3" border="0"><br><br>';
}
if ($_POST['travel'] == 'y') {
    echo '<b><a href="http://www.jdoqocy.com/sb122uoxuowBDJGGLHKBDCFLEHKI" target="_top" onmouseover="window.status=\'http://www.carnival.com\';return true;" onmouseout="window.status=\' \';return true;">Visit Carnival.com Now</a></b><br>';
    echo 'For specials on cruises to The Bahamas, Caribbean, Mexico and more. <img src="http://www.tqlkg.com/q0115tkocig13966B7A1325B47A8" width="1" height="3" border="0"><br><br>';
}
if ($nodatingads) {
    echo '<b><a href="http://www.gotoquiz.com/which_animal_are_you">Which Animal Are You?</a></b><br>';
    echo 'Take a quiz to find out which animal you are<br><br>';
}
if (strstr($xyz, 'c')) {
    echo '<b><a href="http://www.10spot.net/articles/unique_christmas_gift_ideas.html" target="_top">Christmas Gift Ideas</a></b><br>';
    echo 'Need some unique ideas? This article has ten!<br><br>';
}
else {
    echo '<b><a href="http://www.10spot.net/articles/sensible_weight_loss_tips.html" target="_top">Sensible Weight-Loss Ideas</a></b><br>';
    echo '10 smart ways to stick to your resolution.<br><br>';
}
if ($age > 17 && $age < 30) {
    echo '<b><a href="http://www.4thkingdom.com/index.html" target="_top">4thKingdom Community</a></b><br>';
    echo 'Quirky young adult community. Come see how we\'re different.<br><br>';
}
/*
?>
<b style="font-size: 14px;">Get These Ringtones:</b> <img src="http://www.tqlkg.com/6h116p59y31NPVSSXTWNPOSOVRRS" width="2" height="3" border="0"><br>
<div style="width: 165px; margin: 4px; border: none; padding: 0px;">
  <b><a href="http://www.anrdoezrs.net/dg103qgpmgo35B88D9C35484B778?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dsystem%2520of%2520a%2520down%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/SOAD';return true;" onmouseout="window.status=' ';return true;">System of a Down</a></b><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.dpbolvw.net/k0108mu2-u1HJPMMRNQHJIMIPLLM?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dhypnotize%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/SOAD/hypnotize';return true;" onmouseout="window.status=' ';return true;">Hypnotize</a>
</div>
<div style="width: 165px; margin: 4px; border: none; padding: 0px;">
  <b><a href="http://www.tkqlhce.com/29102y1A719PRXUUZVYPRQUQXTTU?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3DD4L%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/D4L';return true;" onmouseout="window.status=' ';return true;">D4L</a></b><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.jdoqocy.com/en98nmvsmu9BHEEJFI9BAEAHDDE?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dlaffy%2520taffy%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/D4L/laffy_taffy';return true;" onmouseout="window.status=' ';return true;">Laffy Taffy</a>
</div>
<div style="width: 165px; margin: 4px; border: none; padding: 0px;">
  <b><a href="http://www.anrdoezrs.net/ag106y1A719PRXUUZVYPRQUQXTTU?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dsean%2520paul%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/sean_paul';return true;" onmouseout="window.status=' ';return true;">Sean Paul</a></b><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.tkqlhce.com/i5116ox52x4KMSPPUQTKMLOTLOOR?url=http%3A%2F%2Fwww.jamster.com%2Fjiw%2Fgo%2Frmc%2F%3Fsearch%3Dwe%2520be%2520burnin%27%2520%28legalize%2520it%29%26amp%3Bdisplay%3Ddirect_link&cjsku=715352362" target="_top" onmouseover="window.status='http://www.jamster.com/rt/we_burnin';return true;" onmouseout="window.status=' ';return true;">We Be Burnin' (Legalize It)</a>
</div>
<div style="width: 165px; margin: 4px; border: none; padding: 0px;">
  <b><a href="http://www.anrdoezrs.net/5m98biroiq57DAAFBE576A6D99A?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dkelly%2520clarkson%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/kelly_clarkson';return true;" onmouseout="window.status=' ';return true;">Kelly Clarkson</a></b><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.anrdoezrs.net/l965ar-xrzEGMJJOKNEGFJFMIIJ?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dbecause%2520of%2520you%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/kelly_clarkson/because_of_you';return true;" onmouseout="window.status=' ';return true;">Because of You</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.tkqlhce.com/ra98dlurlt8AGDDIEH8A9CH9CCF?url=http%3A%2F%2Fwww.jamster.com%2Fjiw%2Fgo%2Frmc%2F%3Fsearch%3Dbehind%2520these%2520hazel%2520eyes%26amp%3Bdisplay%3Ddirect_link&cjsku=715372750" target="_top" onmouseover="window.status='http://www.jamster.com/rt/kelly_clarkson/behind_these_hazel_eyes';return true;" onmouseout="window.status=' ';return true;">Behind These Hazel Eyes</a>
</div>
<div style="width: 165px; margin: 4px; border: none; padding: 0px;">
  <b><a href="http://www.kqzyfj.com/q7105wktqks79FCCHDG798C8FBBC?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dshakira%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/shakira';return true;" onmouseout="window.status=' ';return true;">Shakira</a></b><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.tkqlhce.com/eq65uoxuowBDJGGLHKBDCFKCFFI?url=http%3A%2F%2Fwww.jamster.com%2Fjiw%2Fgo%2Frmc%2F%3Fsearch%3Dla%2520tortura%26amp%3Bdisplay%3Ddirect_link&cjsku=715376321" target="_top" onmouseover="window.status='http://www.jamster.com/shakira/la_tortura';return true;" onmouseout="window.status=' ';return true;">La Tortura</a>
</div>
<div style="width: 165px; margin: 4px; border: none; padding: 0px;">
  <b><a href="http://www.dpbolvw.net/1g81wktqks79FCCHDG798C8FBBC?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dgreen%2520day%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/green_day';return true;" onmouseout="window.status=' ';return true;">Green Day</a></b><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.kqzyfj.com/jg117uoxuowBDJGGLHKBDCFKCFFI?url=http%3A%2F%2Fwww.jamster.com%2Fjiw%2Fgo%2Frmc%2F%3Fsearch%3Dholiday%26amp%3Bdisplay%3Ddirect_link&cjsku=715374628" target="_top" onmouseover="window.status='http://www.jamster.com/green_day/holiday';return true;" onmouseout="window.status=' ';return true;">Holiday</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.jdoqocy.com/rn68mu2-u1HJPMMRNQHJIMIPLLM?url=http%3A%2F%2Fwww.jamster.com%2Fjcw%2Fgo%3Fsearch%3Dseptember%26display%3Doverview%26co%3DUS%26la%3Den" target="_top" onmouseover="window.status='http://www.jamster.com/green_day/september';return true;" onmouseout="window.status=' ';return true;">When September Ends</a>
</div>
<a href="http://www.dpbolvw.net/na116js0ys-FHNKKPLOFHGJOJKGL" target="_top" onmouseover="window.status=\'http://www.jamster.com\';return true;" onmouseout="window.status=\' \';return true;">Search for More</a> <img src="http://www.lduhtrp.net/m865qmqeki35B88D9C3547C7849" width="3" height="1" border="0"><br><br>
<?php
*/
?>
<b style="font-size: 14px; margin-bottom: 5px;">Pick Your Quiz:</b><br>

<b><a href="http://www.gotoquiz.com/the_myspace_fiend_quiz">The MySpace Fiend Quiz</a></b><br>
Are you addicted to MySpace? Find out if you're a fiend!<br><br>

<b><a href="http://www.datingdiversions.com/dating_sw_quiz.html">Dating Quiz</a></b><br>
Discover your dating strengths and weaknesses with this quiz.<br><br>

<b><a href="http://www.depressedtest.com/">DepressedTest.com</a></b><br>
Test yourself for six different kinds of depression.<br><br>

<b><a href="http://www.gotoquiz.com/how_strange_are_you_1">How Strange Are You?</a></b><br>
See how strange you are -- a popular quiz at GoToQuiz.com<br><br>

<b><a href="http://www.gotoquiz.com/are_you_capable_of_killing">Are You Capable of Killing?</a></b><br>
Learn something new about yourself..<br><br>

<b><a href="http://www.gotoquiz.com/four_horsemen_of_the_apocalypse">Four Horsemen of the Apocalypse</a></b><br>
Which one of the four horsemen are you? Take this quiz.<br><br>

<b><a href="http://www.gotoquiz.com/how_popular_are_you_1">How Popular Are You?</a></b><br>
A fun quiz, see how high you score
</div>

<p style="width: 404px; margin-left: 208px;">
<b style="font-size: 16px;">Your Life Analysis:</b><br><br>

<b><a href="advice-life.html">Life</a>:</b> Your life rating is a score of the sum total of your life, and accounts for how 
satisfied, successful, balanced, capable, valuable, and happy you are.  The quiz attempts to 
put a number on the summation of all of these things, based on your answers. 
<?php
if ($life == -1)
    echo 'The quiz was not able to calculate your life score.';
if ($life < 3.1)
    echo 'Your life score came out low, and this indicates that you need to make a holistic change. What you\'re doing is not working. You must focus on the areas that pain you most and fix your determination on improving them.  Also, seeking external help is not an indicator of weakness but one of strength.  And remember, there is always time to turn things around.';
else if ($life < 5)
    echo 'Your life score is on the low end.  Making key changes to different aspects of your life will bring you greater fulfillment. Do not be discouraged.  Seek help outside yourself if need be.  There is always time to change, and change will bring many rewards.';
else if ($life < 7)
    echo 'Your life score leaves room for improvement.  You can make changes to improve your trouble areas, and this will bring you greater satisfaction. Focus on your weakest points and set about to change them.  Do not delay your happiness and success.';
else if ($life < 8.5)
    echo 'Your life score is reasonably high.  This means that you are on a good path. Continue doing what is working and set about to improve in areas which continue to lag.  Do this starting today and you will begin to reap the benefits immediately.';
else
    echo 'Your life score is amazingly high.  This means that you are in tune with your needs and on a path toward great personal fulfillment. Despite the challenges of life, you have achieved harmony and balance. Continue doing what you are doing right; do not allow yourself to slip or falter.';
?>
 (Read more on <a href="life.html">improving your life</a>)
<br><br>

<b>Mind:</b> Your mind rating is a score of your mind's clarity, ability, and health.  Higher scores 
indicate an advancement in knowledge, clear and capable thinking, high mental health, and pure thought 
free of interference. 
<?php
if ($mind == -1)
    echo 'The quiz was not able to calculate your mind score.';
if ($mind < 3)
    echo 'Your mind score is quite low, which indicates that your mind is not functioning in a life-affirming way. Learn to simplify and unclutter your mind.  Unplug technology, relax in bed with a good book.  Learn to meditate, or take walks away from the everyday hustle.  Take up a new area of study.  These things will improve the functioning of your mind.';
else if ($mind < 5)
    echo 'Your mind score is rather low, which means that your mental state is not in tune. Learn to filter out the noise of everyday life.  Unplug, relax, read a good book.  Take up a new area of study.  Simplify and focus your mental energy and your mind function will improve.';
else if ($mind < 7.1)
    echo 'Your mind score is not bad, but could be improved upon.  Your mental health is not weak, but you are not achieving full mental clarity and function. Learn how to unclutter your mind. Keep learning, keep improving, continue moving forward.';
else if ($mind < 8.6)
    echo 'Your mind score is within a healthy zone. This means you have achieved a level of mental balance and harmony consistent with living a healthy, happy life.  Continue doing what works, and keep your focus.  In our fast-paced world, mental clutter is all too common.  Be vigilant in maintaining healthy mental function.';
else
    echo 'Your mind score is quite high, meaning you possess a high degree of mental clarity, ability, and health.  You clearly understand what is required to maintain optimum mental function.  Continue doing what works, and avoid pitfalls which may come along.';
?>
 <a href="advice-mind.html">Read advice from other quiz-takers on improving the mind.</a>
<br><br>

<b>Body:</b> Your body rating measures your body's health, fitness, and general wellness. A healthy 
body contributes to a happy life, however many of us are lacking in this area. 
<?php
if ($body == -1)
    echo 'The quiz was not able to calculate your body score.';
if ($body < 3) {
    echo 'You have a very low body score, indicating that your physical health is not in a good condition. ';
    if ($_POST['illness'] == 'y')
        echo 'Do your best to get the proper nutrition and follow doctor\'s orders at all times.';
    else
        echo 'You must redouble your focus on improving your body, through nutrition, exercise, and stress reduction. Bodily damage accumulates, so do not delay your healing.';
}
else if ($body < 4.9) {
    echo 'You have a rather low body score, which means that your physical health is not in a good condition. ';
    if ($_POST['illness'] == 'y')
        echo 'Do your best to get the proper nutrition, proper exercise, and follow doctor\'s orders at all times.';
    else
        echo 'You must put a higher priority on your body, focusing on nutrition, exercise, and stress reduction. Proper focus will lead to great improvement, leaving you feeling energetic and happy.';
}
else if ($body < 6.8) {
    echo 'Your body score is fairly average, which means there is room for improvement. ';
    if ($_POST['illness'] == 'y')
        echo 'Keep up your focus on your health and do not falter.  Follow doctor\'s orders and feel better.';
    else
        echo 'Keep a focus on your physical health.  Protect your body as it is your most valuable physical asset.  Nutrition, stress reduction, and exercise are key.';
}
else if ($body < 8.4)
    echo 'You have a rather good body score, which is an indication that you take care of yourself.  There is room for improvement, however.  Please keep doing what works.  Eat right, exercise, reduce your stress, treat any illness.  Doing these things will help ensure your body will be in good working order for a long time to come.';
else
    echo 'You have an excellent body score, which means you are incredibly focused on maintaining a healthy lifestyle.  Continue in that focus, and your body will remain healthy and strong.';
?>
 <a href="advice-body.html">Read advice from other quiz-takers on improving the body.</a>
<br><br>

<b>Spirit:</b> Your spirit rating seeks to capture in a number that elusive quality which 
is found in your faith, your attitude, and your philosophy on life. A higher score indicates 
a greater sense of inner peace and balance. 
<?php
if ($spirit == -1)
    echo 'The quiz was not able to calculate your spirit score.';
if ($spirit < 2.9)
    echo 'Your spirit score is dramatically low.  This means there is great potential for improvement.  If you are feeling a hollowness, consider realigning your beliefs and changing your outlook.  Doing so will contribute to greater peace of mind.';
else if ($spirit < 4.9)
    echo 'You seem to be lacking in spirit.  Improve your score by refining your beliefs and searching for answers to philosophical questions.  Consider new belief systems if your current beliefs are not rewarding you.';
else if ($spirit < 6.7)
    echo 'Your spirit score leaves room for improvement.  Consider making a concerted effort to redefine your attitudes and focus your beliefs.  Boosting your spirit will lead to greater life satisfaction.';
else if ($spirit < 8.6)
    echo 'Your spirit score is relatively high, which means you are rewarded by your beliefs.  Spirituality is clearly important to do.  Never let it slip, and continue to learn and grow.';
else
    echo 'Your spirit score is dramatic.  Continue on your path, do not stray.  Continue to reap the rewards which your spirituality brings forth.';
?>
 <a href="advice-spirit.html">Read advice from other quiz-takers on improving the spirit.</a>
<br><br>

<b>Friends/Family:</b> Your friends and family rating measures your relationships with those 
around you, and is based on how large, healthy, and dependable your social network is.
<?php
if ($friends == -1)
    echo 'The quiz was not able to calculate your friends and family score.';
if ($friends < 3)
    echo 'You scored at the very low end for friends and family.  This means that your social network is weak and not functioning.  Consider re-establishing old bonds as you work on forging new ones.  You will be greatly rewarded in return.  Try using <a href="http://www.kqzyfj.com/7l101biroiq57DAAFBE5769FC877" target="_top" onmouseover="window.status=\'http://www.meetup.com/\';return true;" onmouseout="window.status=\' \';return true;">MeetUp.com</a> to find people near you who share your interests. <img src="http://www.tqlkg.com/mj70r6Az42OQWTTYUXOQPSYVRQQ" width="4" height="4" border="0">';
else if ($friends < 4.8)
    echo 'Your friends and family score suffers, yet it does not need to be this way.  Strengthen your social network by reaffirming old bonds.  Seek out new friendships, and they will provide you the reward you need. Try using <a href="http://www.kqzyfj.com/7l101biroiq57DAAFBE5769FC877" target="_top" onmouseover="window.status=\'http://www.meetup.com/\';return true;" onmouseout="window.status=\' \';return true;">MeetUp.com</a> to find people near you who share your interests. <img src="http://www.tqlkg.com/mj70r6Az42OQWTTYUXOQPSYVRQQ" width="4" height="4" border="0">';
else if ($friends < 6.9)
    echo 'Your friends and family score is not bad but can be improved.  Maintain your current social net, while you try to expand it.  Try new things and form new friendships.  You will be rewarded greatly.';
else if ($friends < 8.5)
    echo 'Your friends and family score is quite healthy.  You have a social network you can depend upon.  Count your blessings, but never forget that these bonds need to be maintained.  Keep your friends and family close.';
else
    echo 'Your friends and family score is high, so you are doing all the right things in this area.  Continue to maintain your social connections and reap the rewards.';
?>
<br><br>

<b>Love:</b> Your love rating is a measure of your current romantic situation. Sharing your 
heart with another person is one of life's most glorious, terrifying, rewarding experiences. 
<?php
if ($love == -1)
    echo 'The quiz was not able to calculate your love score.';
if ($love < 3) {
    echo 'Your love score is very low, indicating trouble. ';
    if ($_POST['marital'] == 'm' || $_POST['marital'] == 'r')
        echo 'If your marriage is not in good shape, consider which options can help you get back on the right track.  This will bring you a tremendous life improvement.';
    else if ($_POST['relationship'] == 'em' || $_POST['relationship'] == 'sr')
        echo 'Consider what is hurting your current relationship and find solutions.  If there are no solutions, consider the possibility of seeking love elsewhere.  Do not stay in a harmful situation.';
    else
        echo 'There is love out there for you.  Seek the advice of wise people on how to go about finding it.  Do not lose hope.';
}
else if ($love < 5) {
    echo 'You have a rather low love score. ';
    if ($_POST['marital'] == 'm' || $_POST['marital'] == 'r')
        echo 'You can bring it up by ensuring that your marriage is on a positive track and bringing the romance back.  Don\'t put off the healing and you will be rewarded.';
    else if ($_POST['relationship'] == 'em' || $_POST['relationship'] == 'sr')
        echo 'Your current relationship issues must be resolved.  Delay will only worsen the problems.  Turn things around starting today and you will be glad you did.';
    else
        echo 'While some are lucky, for most of us love doesn\'t fall in our laps. You must actively work on improving this area. Do not despair, there is someone out there for you.';
}
else if ($love < 6.7)
    echo 'Your love score is fairly average.  Things could be worse, and thankfully they aren\'t.  But you must work to improve this area, turn an average score into a great score.';
else if ($love < 8.5)
    echo 'Your love score is in good shape, meaning that things are going well.  Do all you can to maintain it, and continue to grow and move ahead.';
else
    echo 'Your love score is very high, which means you are in a very happy situation right now.  Do all you can to keep it strong.';
?>
 <a href="advice-love.html">Read advice from other quiz-takers on finding and maintaining love.</a>
<br><br>

<b>Finance:</b> Your finance rating is a score that rates your current financial health and 
stability.
<?php
if ($finance == -1)
    echo 'The quiz was not able to calculate your finance score.';
if ($finance < 3)
    echo 'Your finance score indicates that your financial situation is in disarray. This is an all-too-common problem.  Do what you can to live within your means while improving your financial prospects for the future.';
else if ($finance < 5)
    echo 'Your financial score indicates some trouble.  Raise your score over time by making changes which will lead to greater prosperity in the future.  Be sure to live within your means today.';
else if ($finance < 6.8)
    echo 'Your finances are somewhat in the middle, neither bad or exceptional.  Keep doing what works for you, and improve what doesn\'t. Focus on long-term financial stability as your goal.';
else if ($finance < 8.6)
    echo 'You have a rather good financial score, which is not all that common these days. Keep doing what works.  Avoid common pitfalls and save for the future.  You will be glad you did.';
else
    echo 'Your financial score is impressive.  You seem to be doing everything right in this area, so keep up what you\'re doing.  Do not fall into common traps and continue planning for long-term stability.';
?>
 <a href="advice-mind.html">Read advice from other quiz-takers on improving your finances.</a>
<br><br>

<?php
if (($age == 18 || $age == 23) && $mind > 6.4 && $life > 6.4 && $spirit > 3.4 && $finance > 5.4)
    echo 'Consider joining the <a href="http://www.4thkingdom.com/index.html">4thKingdom.com community</a>, a private young adult message board community with high standards and no advertisements.';
else if ($age < 23)
    echo 'Create your own quiz easily at <a href="http://www.gotoquiz.com/">GoToQuiz.com</a>.';
else if ($nodatingads)
    echo 'Create your own quiz easily at <a href="http://www.gotoquiz.com/">GoToQuiz.com</a>.';
else if ($age > 23)
    echo 'Try the match-making site that works. Try <a href="http://www.kqzyfj.com/90103nmvsmu9BHEEJFI9EAGBEFJ" target="_top" onmouseover="window.status=\'http://www.eharmony.com\';return true;" onmouseout="window.status=\' \';return true;">eharmony.com</a>.<img src="http://www.afcyhf.com/7s97r6Az42OQWTTYUXOTPVQTUY" width="5" height="4" border="0">';
else if ($_POST['relationship'] != 'sns')
    echo 'Get matched with someone today: <a href="http://www.jdoqocy.com/gf102kjspjr68EBBGCF687ADE9FC" target="_top" onmouseover="window.status=\'http://www.americansingles.com/default.asp?p=7090&prm=44816\';return true;" onmouseout="window.status=\' \';return true;">Free Online Singles</a> by AmericanSingles <img src="http://www.ftjcfx.com/27103m-3sywHJPMMRNQHJILOPKQN" width="2" height="5" border="0">';
else if ($gender == 'm' && ($_POST['marital'] == 'm' || $_POST['marital'] == 'r'))
    echo 'Send your wife <a href="http://www.jdoqocy.com/je116zw41w3JLROOTPSJLKNKPKNO" target="_top" onmouseover="window.status=\'http://www.JustFlowers.com/affiliates\';return true;" onmouseout="window.status=\' \';return true;">Romantic Flowers</a> <img src="http://www.tqlkg.com/te105m-3sywHJPMMRNQHJILINILM" width="2" height="3" border="0">';
else if ($_POST['children'] != 'x' && $_POST['children'] != '0')
    echo 'The largest variety of games, toys, and puzzles are available at <a href="http://www.tkqlhce.com/k0108biroiq57DAAFBE5769FEDD8" target="_top" onmouseover="window.status=\'http://www.kazootoys.com\';return true;" onmouseout="window.status=\' \';return true;">KazooToys.Com</a>.  Voted <a href="http://www.tkqlhce.com/k0108biroiq57DAAFBE5769FEDD8" target="_top" onmouseover="window.status=\'http://www.kazootoys.com\';return true;" onmouseout="window.status=\' \';return true;">Toy Store of the Year</a><img src="http://www.tqlkg.com/jd77tkocig13966B7A1325BA994" width="2" height="5" border="0">';
else
    echo 'Browse pictures of singles in your area: <a href="http://www.anrdoezrs.net/9a103wktqks79FCCHDG798AFGA8G" target="_top" onmouseover="window.status=\'http://personals.yahoo.com\';return true;" onmouseout="window.status=\' \';return true;">Find love at Yahoo! Personals</a><img src="http://www.afcyhf.com/tq119o26v0zKMSPPUQTKMLNSTNLT" width="3" height="5" border="0">';
?>
</p>

</div>
<br>

<p>That's not all.  You can also see how your scores compare with the average. 
<form action="life_compare.html" method="post" style="display: inline; margin: 0px;">
<input type="hidden" name="li" value="<?= $life ?>">
<input type="hidden" name="m" value="<?= $mind ?>">
<input type="hidden" name="b" value="<?= $body ?>">
<input type="hidden" name="s" value="<?= $spirit ?>">
<input type="hidden" name="fr" value="<?= $friends ?>">
<input type="hidden" name="lo" value="<?= $love ?>">
<input type="hidden" name="fi" value="<?= $finance ?>">
<input type="hidden" name="a" value="<?= $age ?>">
<input type="hidden" name="g" value="<?= $gender ?>">
<input type="hidden" name="xyz" value="<?= $xyz ?>">
<input type="submit" value="Compare My Scores">
</form>
</p>

Also, try the <a href="/">Monkey Quiz Trivia Challenge</a> or the <a href="http://www.datingdiversions.com/dating_sw_quiz.html">Dating Strengths and Weaknesses Quiz</a>!
<br><br>
View the <a href="/privacy.html">Privacy Policy</a>
</body></html>
