<?php
include "ddfuncs/newday.php";
include "ddfuncs/ad2.php";
check();
?>
<!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">
<link rel="stylesheet" type="text/css" href="/new.css">
<title>Dating Diversions &#9829; Online Dating Advice, Services, Quizzes, and More</title>
<script type="text/javascript">
var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-628020-4']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s);})();
</script>
</head>
<body>

<div class="box full" style="background-color: #fdc;">
<h1>Dating Diversions - Advice, Quiz, Jokes, Stories on Dating</h1>
<a href="/advice.html">Dating Advice</a> | 
<a href="/stories.mv">Dating Stories</a> | 
<a href="/dating_jokes.html">Dating Jokes</a> | 
<a href="/singles-US/main.html">Geographical Dating Tips</a> | 
<a href="/gift_ideas.html">Great Gift Ideas</a>
</div>

<div class="boxt full">
  <h3>Take the Famous Dating Profile Quiz:</h3>
  <form action="profquiz1.html" method="post">
  I am a <select name="msex"><option value="m">Male</option><option value="f" selected>Female</option></select> 
  seeking a <select name="osex"><option value="m">Male</option><option value="f">Female</option></select> 
  my age is <input type="text" size="2" maxlength="2" name="mage"> 
  <input type="submit" value="Start the Test">
  </form>
</div>

<div class="boxt fullnp">
  <div class="boxtr rside flr">
    <h3>Local Advice For:</h3>
    <ul>
      <li><a href="/singles-US-NY-new_york_city/main.html">New York City</a></li>
      <li><a href="/singles-US-CA-los_angeles/main.html">Los Angeles</a></li>
      <li><a href="/singles-US-IL-chicago/main.html">Chicago</a></li>
      <li><a href="/singles-US-TX-houston/main.html">Houston</a></li>
      <li><a href="/singles-US-PA-philadelphia/main.html">Philadelphia</a></li>
      <li><a href="/singles-US-AZ-phoenix/main.html">Phoenix</a></li>
      <li><a href="/singles-US-CA-san_diego/main.html">San Diego</a></li>
      <li><a href="/singles-US-TX-san_antonio/main.html">San Antonio</a></li>
      <li><a href="/singles-US-TX-dallas/main.html">Dallas</a></li>
      <li><a href="/singles-US-MI-detroit/main.html">Detroit</a></li>
      <li><a href="/singles-US-CA-san_jose/main.html">San Jose</a></li>
      <li><a href="/singles-US-IN-indianapolis/main.html">Indianapolis</a></li>
      <li><a href="/singles-US/main.html">More...</a></li>
    </ul>
    <br>

    <div class="ctr">
<?php
require_once('../setClassPath.php');
require_once('db/TransManager.php');
$trans = TransManager::getInstance();
if (!$trans->inTransaction())
    $trans->beginTrans();
echo getAd($_COOKIE['mystic'], '120x90', 'f', $trans->getPDO());
?>    
    </div>
  </div>
  <div class="main pad">
    <h2>Bringing You the Best in Online Dating</h2>
    
    <p>Welcome, kind internet visitor, to Dating Diversions - a growing site for all things dating.  
    New advice and content are added daily, so check back often (all visitor-submitted advice 
    and stories are manually approved by a Dating Diversions editor).  If you came 
    for the famous dating profile quiz, you can begin by entering your information in the form above. :)</p>

    <div style="float: left; padding-right: 10px;">
      <script type="text/javascript"><!--
google_ad_client = "pub-7795630243408100";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "dddddd";
google_color_bg = "ffffff";
google_color_link = "cc1111";
google_color_text = "000000";
google_color_url = "990033";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
    </div>

    <h2>New: Take the Compatibility Test</h2>

    <p>Wonder how well you match with your crush or significant other?  Our new 
    <a href="/dating_compatibility.html">Compatibility Test</a> uses a number of factors 
    to see how well two people match up.  You could even match yourself with celebrities, 
    or match your friends!</p>
    
    <h2>Dating Strengths and Weaknesses Quiz</h2>
    
    <p>The sister quiz to the Dating Profile Quiz is now complete.  Be one of the first to take the 
    <a href="dating_sw_quiz.html">Dating Strengths and Weaknesses Quiz</a> and discover your 
    personal strengths and weaknesses. You may also be interested in our other quiz, the 
    <a href="lq.html">Loneliness Quotient Test</a>.</p>
    
    <h2>Great Idea For This Winter</h2>
    
    <p>Plan a getaway trip for you and your significant other.  Escape the cold by exploring exotic, sun-drenched 
    locales.  Need more convincing?  Read <a href="http://www.10spot.net/articles/reasons_to_cruise.html">10 
    Reasons to Treat Yourself to a Cruise</a>.</p>
    
    <h2>Today's Articles of Interest</h2>

    <p>
<?php
     $pdo = $trans->getPDO();
     $stmt = $pdo->prepare('SELECT article_path, title, blurb FROM article ORDER BY last_display DESC LIMIT 4');
     $stmt->execute();
     while ($myrow = $stmt->fetch(PDO::FETCH_NUM))
         printf("<b><a href=\"%s/article.html\">%s</a></b><br>%s<br>\r\n", $myrow[0], $myrow[1], $myrow[2]);
?>
    </p>

    <h2>Most-Recently-Added Advice by a Dating Diversions Visitor</h2>

    <p>
<?php
     $stmt = $pdo->prepare('SELECT a.tip_id, a.body, a.name, a.location, c.loc_path, c.parent_path, c.country_path, c.loc_type, b.cat_path FROM tip a, location_cat b, location c WHERE a.admin_flag = \'A\' AND a.location_cat_id=b.location_cat_id AND b.loc_path=c.loc_path ORDER BY a.tip_id DESC LIMIT 1');
     $stmt->execute();
     while ($myrow = $stmt->fetch(PDO::FETCH_NUM)) {
         $path = '';
         if ($myrow[7] == 'COUNTRY')
             $path = $myrow[8] . '-' . $myrow[4];
         else if ($myrow[7] == 'STATE')
             $path = $myrow[8] . '-' . $myrow[6] . '-' . $myrow[4];
         else if ($myrow[7] == 'CITY')
             $path = $myrow[8] . '-' . $myrow[6] . '-' . $myrow[5] . '-' . substr($myrow[4], 0, strlen($myrow[4]) - 3);
         printf("\"%s\" -<i>%s, %s</i> (<a href=\"/%s/main.html\">more from this area</a>)", $myrow[1], $myrow[2], $myrow[3], $path);
     }
?>
    </p>

    <h2>First Comes Love, Then Comes Marriage, Then Comes...</h2>
    <p>The owner of this site has had a baby and started a <a href="/baby-blog/">dad's baby blog</a> you might be interested in.</p>
  </div>
</div>
<div style="text-align: center; color: #555; width: 800px;">Copyright 2010. <a href="/privacy.html">Privacy Policy</a></div>

</body></html>
<?php
$trans->commit();
$trans->disconnect();
?>
