<?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">');
}
?>
<!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 - Post Your Results</title>
<link rel="stylesheet" type="text/css" href="life.css">
</head>
<body>

<h1>Rate My Life Quiz Results Code</h1>

<p>The HTML code below will display your results box from the Rate My Life Quiz.  Just copy the 
code and paste it into your blog, journal, or message board.</p>

<?php
$life = $_GET['li'];
$mind = $_GET['m'];
$body = $_GET['b'];
$spirit = $_GET['s'];
$friends = $_GET['fr'];
$love = $_GET['lo'];
$finance = $_GET['fi'];

$paste = '<table cellspacing="0" style="border: 1px solid #333333; margin: 10px;"><tr><td colspan="2" style="border: none; font: bold 16px sans-serif; background: #ffddbb; color: #000000; padding: 5px; margin: 0px; text-align: center;">This Is My Life, Rated</td></tr>';
$paste .= '<tr><td style="width: 85px; padding: 5px; font: bold 18px sans-serif; text-align: left; border: 1px solid #333333; border-left: none; background-image: none; background: #ffffcc; color: #000000;">Life:'. "\r\n" .'</td>';
$paste .= '<td style="width: 240px; padding: 5px; padding-left: 0px; font: bold 18px sans-serif; text-align: left; border: 1px solid #333333; border-left: none; border-right: none; vertical-align: middle; background-image: none; background: #ffffff; color: #000000;">';
if ($life != -1)
    $paste .= getBar($life, true) .' '. $life .'</td></tr>';
else
    $paste .= '<i>Not enough information</i></td></tr>';
$paste .= '<tr><td style="width: 85px; padding: 5px; font: bold 12px sans-serif; text-align: left; border: none; border-right: 1px solid #333333; background-image: none; background: #ffffcc; color: #000000;">Mind:'. "\r\n" .'</td>';
$paste .= '<td style="width: 240px; padding: 5px; padding-left: 0px; font: bold 12px sans-serif; text-align: left; border: none; vertical-align: middle; background-image: none; background: #ffffff; color: #000000;">';
if ($mind != -1)
    $paste .= getBar($mind, true) .' '. $mind .'</td></tr>';
else
    $paste .= '<i>Not enough information</i></td></tr>';
$paste .= '<tr><td style="width: 85px; padding: 5px; font: bold 12px sans-serif; text-align: left; border: none; border-right: 1px solid #333333; background-image: none; background: #ffffcc; color: #000000;">Body:'. "\r\n" .'</td>';
$paste .= '<td style="width: 240px; padding: 5px; padding-left: 0px; font: bold 12px sans-serif; text-align: left; border: none; vertical-align: middle; background-image: none; background: #ffffff; color: #000000;">';
if ($body != -1)
    $paste .= getBar($body, true) .' '. $body .'</td></tr>';
else
    $paste .= '<i>Not enough information</i></td></tr>';
$paste .= '<tr><td style="width: 85px; padding: 5px; font: bold 12px sans-serif; text-align: left; border: none; border-right: 1px solid #333333; background-image: none; background: #ffffcc; color: #000000;">Spirit:'. "\r\n" .'</td>';
$paste .= '<td style="width: 240px; padding: 5px; padding-left: 0px; font: bold 12px sans-serif; text-align: left; border: none; vertical-align: middle; background-image: none; background: #ffffff; color: #000000;">';
if ($spirit != -1)
    $paste .= getBar($spirit, true) .' '. $spirit .'</td></tr>';
else
    $paste .= '<i>Not enough information</i></td></tr>';
$paste .= '<tr><td style="width: 85px; padding: 5px; font: bold 12px sans-serif; text-align: left; border: none; border-right: 1px solid #333333; background-image: none; background: #ffffcc; color: #000000;">Friends/Family:'. "\r\n" .'</td>';
$paste .= '<td style="width: 240px; padding: 5px; padding-left: 0px; font: bold 12px sans-serif; text-align: left; border: none; vertical-align: middle; background-image: none; background: #ffffff; color: #000000;">';
if ($friends != -1)
    $paste .= getBar($friends, true) .' '. $friends .'</td></tr>';
else
    $paste .= '<i>Not enough information</i></td></tr>';
$paste .= '<tr><td style="width: 85px; padding: 5px; font: bold 12px sans-serif; text-align: left; border: none; border-right: 1px solid #333333; background-image: none; background: #ffffcc; color: #000000;">Love:'. "\r\n" .'</td>';
$paste .= '<td style="width: 240px; padding: 5px; padding-left: 0px; font: bold 12px sans-serif; text-align: left; border: none; vertical-align: middle; background-image: none; background: #ffffff; color: #000000;">';
if ($love != -1)
    $paste .= getBar($love, true) .' '. $love .'</td></tr>';
else
    $paste .= '<i>Not enough information</i></td></tr>';
$paste .= '<tr><td style="width: 85px; padding: 5px; font: bold 12px sans-serif; text-align: left; border: none; border-right: 1px solid #333333; background-image: none; background: #ffffcc; color: #000000;">Finance:'. "\r\n" .'</td>';
$paste .= '<td style="width: 240px; padding: 5px; padding-left: 0px; font: bold 12px sans-serif; text-align: left; border: none; vertical-align: middle; background-image: none; background: #ffffff; color: #000000;">';
if ($finance != -1)
    $paste .= getBar($finance, true) .' '. $finance .'</td></tr>';
else
    $paste .= '<i>Not enough information</i></td></tr>';

$paste .= '<tr><td colspan="2" style="border: none; border-top: 1px solid #333333; font: bold 14px sans-serif; background: #ffeedd; padding: 5px; margin: 0px; text-align: center;"><a href="http://www.monkeyquiz.com/life/rate_my_life.html" style="color: #0000ff;">Take the Rate My Life Quiz</a></td></tr></table>';
?>

<textarea cols="70" rows="8" onclick="this.focus();this.select()">
<?= $paste ?>
</textarea><br>

<div class="super">
  <div class="note">Advertisement</div>
<?php
if (strstr($_GET['xyz'], 'gm'))
    echo 'Friendship and Dating: <a href="http://www.dpbolvw.net/hg116p-85-7NPVSSXTWNPOQXQPSP" target="_blank" onmouseover="window.status=\'http://www.glimpse.com/Applications/MemberProfile/RegistrationStep1.aspx?PRM=11514\';return true;" onmouseout="window.status=\' \';return true;">Find Guys</a> at Glimpse&reg;.com <img src="http://www.tqlkg.com/cg66ax0pvtEGMJJOKNEGFHOHGJG" width="3" height="3" border="0">';
else if (strstr($_GET['xyz'], 'm'))
    echo 'Free Registration: <a href="http://www.jdoqocy.com/47102xdmjdl02855A69021479463" target="_blank" onmouseover="window.status=\'http://www.americansingles.com/default.asp?p=7090&prm=44816\';return true;" onmouseout="window.status=\' \';return true;">Find a Girlfriend</a> <img src="http://www.awltovhc.com/86104ltxlrpACIFFKGJACBEHJEGD" width="3" height="3" border="0">';
else if (strstr($_GET['xyz'], 'gf'))
    echo 'Find <a href="http://www.jdoqocy.com/sm68iqzwqyDFLIINJMDFEGNGFIG" target="_blank" onmouseover="window.status=\'http://www.glimpse.com/Applications/MemberProfile/RegistrationStep1.aspx?PRM=11514\';return true;" onmouseout="window.status=\' \';return true;">Single Girls</a> at Glimpse@reg;.com <img src="http://www.awltovhc.com/ep122xjnbhf02855A690213A3253" width="3" height="3" border="0">';    
else if (strstr($_GET['xyz'], 'f'))
    echo 'Free Registration: <a href="http://www.anrdoezrs.net/76116xdmjdl02855A69021479468" target="_blank" onmouseover="window.status=\'http://www.americansingles.com/default.asp?p=7090&prm=44816\';return true;" onmouseout="window.status=\' \';return true;">Find a Boyfriend</a> <img src="http://www.awltovhc.com/1r101bosgmk57DAAFBE5769CE9BD" width="3" height="3" border="0">';
else
    echo 'Try <a href="http://www.dpbolvw.net/1c74kjspjr68EBBGCF687B78ADD" target="_blank" onmouseover="window.status=\'http://www.myYearbook.com\';return true;" onmouseout="window.status=\' \';return true;">myYearbook.com</a>, Free Online Community <img src="http://www.afcyhf.com/pa117r6Az42OQWTTYUXOQPTPQSVV" width="3" height="3" border="0">';
?>
</div>

<br><br>
</body></html>
