<?php include('class.upload.php'); ?>
<?php include ("classified.inc.php") ?>
<?php include ("ebookssignup.inc.php") ?>
<?php include ("unsubscribe.inc.php") ?>
<?php include ("carraffle200803.inc.php") ?>
<?php include ("gasraffle200806.inc.php") ?>
<?php include ("onlinevideos.inc.php") ?>
<?php include ("7EverydayHero.inc.php") ?>
<?php include ("familyfestival2008.inc.php") ?>

<?php
//////////////////////////////////////////////////////////
//  1  Subscriptions
//  2  Incredibles
//  3  National Treasure
//  4  Son of the Mask
//  5  Heffalump
//  6  Madagascar
//  7  Dinner and Dish
//  8  Wallace & Gromit
//  9  Dreamer
// 10  Winnie the Pooh
// 11  Chicken Little
// 12  Frontier Airlines
// 13  Make Magic Happen
// 14  Zorro
// 15  Narnia
// 16  Your, Mine and Ours
// 17  Megan McDonald
// 18  Toy Contest - 2005
// 19  Cheaper by the Dozen
// 20  Disney on Ice - Princess Classics
// 21  Hammond's Candies
// 22  Figure Skating Museum
// 23  Aquamarine
// 24  SuperCuts
// 25  Lilly's Purple Plastic Purse
// 26  Colorado State Parks
//
// 27  Disney Stock
// 28  Dolphins
// 29  Rockies
//
// 30 Over the Hedge
// 31 Heritage Square Dinner Theater
// 32 Magic Birthday
// 33 Harkins Movie Theater
//
// 34 All Summer Long
// 35 Cars
// 36 Water Parks

// 37 The Ant Bully
// 38 How to Eat Fried Worms

// 39 Everyone's Hero

// 40 Manners Book
// 41 IHOP Gift Certificates
// 42 Teacher Basket
// 43 Circus Tickets

// 44 Reader Response

// 45 Denver Zoo
// 46 Rolling Scrapbook Tote
// 47 Old Chicago
// 48 Movie Tickets
// 49 CSO Tickets

// 50 Flicka

// 51 FlatIron Gift Card
// 52 Gingerbread House
// 53 Happy Feet Contest - Tickets & Prizes
// 54 Bowling with the Grinch Contest
// 55 Disney on Ice Contest - Win A Family Four-Pack of Tickets
// 56 Tattered Cover Gift Card

// 57 Charlotte's Web
// 58 Hammond's Candy
// 59 High-Tech Holiday Toys
// 60 Teacher Gifts
// 61 Momfidence!
// 62 Loveland Family 4-Pack

// 63 Night at the Museum

// 64 Bridge to Terabithia

// 65 My Little Pony
// 66 Check-Up Time Elmo
// 67 AllergyKids Med Case

// 68 Disney on Ice - Monsters Inc.
// 69 Fazolis
// 70 Movie Tickets 2
// 71 Snowbound Book
// 72 Wildlife Experience

// 73 Best Places for Families 2007

// 74 BOB TV Time Manager
// 75 Don't Just Kick it Book
// 76 Silicone Bakeware

// 77 Gimquat
// 78 On Deck Book
// 79 Shrek Swamp Party
// 80 Tattered Cover Gift Card - May 2005

// 81 Prizes All Summer Long
// 82 Harkins Movie Tickets
// 83 Ratatouille
// 84 Hairspray
// 85 Underdog
// 86 Arctic Tale

// 87 Color Bug
// 88 Spoil your Grandparents
// 89 Thomas Tank
// 90 FlatIron Crossing
// 91 Miss Nelson is Missing
// 92 Olympic Athlete Photo
// 93 The Outlets at Loveland
// 94 Knowledge Bound
// 95 Ringling Brothers Circus
// 96 The Game Plan

//  97 Butterfly Pavilion
//  98 Hannah Montana Contest
//  99 Movie Tix
// 100 Ringling Brothers Circus
// 101 Sesame Street
// 102 Tooth Brush

// 103 The Final Season

// 104 Martian Child

// 105 Enchanted
// 106 Mile High Magicians
// 107 Mr. Magorium's Wonder Emporium
// 108 My Little Pony Live
// 109 Restaurant Gift Certificates
// 110 The Great Train Expo
// 111 Loveland Family Four-Pack

// 112 Indiana Jones

// 113 How the Grinch Stole Christmas
// 114 Winter Skate
// 115 Emergency Car Kit
// 116 Disney On Ice Princess Wishes
// 117 Alien Encounter Family Concert
// 118 Germ Proof Your Kids
// 119 SolVista Family Four-Pack

// 120 Disney Live

// 121 Animal Planet DVDs
// 122 Baby Candy
// 123 Day With an Olympian
// 124 Disney On Ice - Nemo - Denver
// 125 Free Tax Preparation
// 126 Frog and Toad
// 127 New Baby Baby Basket
// 128 Tooth Fairy Basket
// 129 Disney On Ice - Nemo - NoCo

// 130 Museum Family Four-pack    - Denver only
// 131 Dan Zanes Family Four-pack - Denver only
// 132 Horton Hears a Who         - Denver only
// 133 Bicycle                    - Denver only
// 134 Family Movie Night Basket  - Denver and NoCo
// 135 Mo Willems Book & Puppet   - Denver and Noco
// 136 Harlem Globetrotters       - Noco only

// 137 Best Places for Families 2008

// 138 Nim's Island

// 139 Sesame Street - When Elmo Grows Up
// 140 Enstrom's
// 141 Olympic Photo
// 142 Digital Camera
// 143 Wiggles
// 144 Borders
// 145 Earthsacks
// 146 If You Give a Pig a Party
// 147 Extreme Rodeo Challenge


// 148 Win a Wii
// 149 Harkins Theatres
// 150 Narnia Tickets
// 151 Janet Stevens
// 152 Kung Fu Panda
// 153 My Mom's Not Cool
// 154 ICE Tickets
// 155 Annie

// 156 Nim's Island DVD
// 157 Elmo's World
// 158 Family Travel Pack
// 159 Prizes All Summer Long
// 160 WALL-E Screening


// Name must be <= 31 characters
// 1234567890123456789012345678901
// INSERT INTO kp_contest_names VALUES (50, '1234567890123456789012345678901');
// INSERT INTO kp_contest_names VALUES (50, 'Flicka');
// INSERT INTO kp_contest_names VALUES (25, 'Lilly''s Purple Plastic Purse');

//////////////////////////////////////////////////////////
/*
  $email="john@zend.com";

  if( !eregi( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email )
  {
    echo "The e-mail was not valid";
  }
  else
  {
    echo "The e-mail was valid";
  }
*/
// banned list
// Email
// ==================================
// anjent@comcast.net
// christine@anjphotography.com
// ken@anjentertainment.com

// $Id: pnuser.php,v 1.1.1.1 2002/09/15 22:26:15 root Exp $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2002 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WIthOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Jim McDonald
// Purpose of file:  SubmitStuff user display functions
// ----------------------------------------------------------------------

// db.php remote //
define("SUBMIT_HOST", "localhost");
// remote
define("SUBMIT_DB",   "kp_phoenix");
define("SUBMIT_USER", "kp_pnmonkey");
define("SUBMIT_PASS", "buster");
// db.php //
//////////////////////////////////////////////////////////////////////////

/*
// db.php local //
define("SUBMIT_HOST", "localhost");
// local
define("SUBMIT_DB", "phoenix");
define("SUBMIT_USER", "root");
define("SUBMIT_PASS", "");
// db.php local //
*/

global $pnuser_googleAd;

$pnuser_googleAd = "";

/*
global $pnuser_googleAd;

$pnuser_googleAd = <<<EOT
<div style="padding:40px;">
<br />

<script type="text/javascript"><!--
google_ad_client = "pub-2513317495040443";
google_alternate_ad_url = "http://kidspages.org/google_adsense_script.html";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>

EOT;

*/

/**
 * the main user function
 * This function is the default function, and is called whenever the module is
 * initiated without defining arguments.  As such it can be used for a number
 * of things, but most commonly it either just shows the module menu and
 * returns or calls whatever the module designer feels should be the default
 * function (often this is the view() function)
 */
function submitstuff_user_main()
{
  $baseurl = pnGetBaseURL();
  Header("Location: $baseurl");
  return true;

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();

  // Security check - important to do this as early as possible to avoid
  // potential security holes or just too much wasted processing.  For the
  // main function we want to check that the user has at least overview
  // privilege for some item within this component, or else they won't be
  // able to see anything and so we refuse access altogether.  The lowest
  // level of access for administration depends on the particular module, but
  // it is generally either 'overview' or 'read'
  if (!pnSecAuthAction(0, 'SubmitStuff::', '::', ACCESS_READ))
  {
      $output->Text(_SUBMITSTUFFNOAUTH);
      return $output->GetOutput();
  }

  // Add menu to output - it helps if all of the module pages have a standard
  // menu at their head to aid in navigation
  $output->SetInputMode(_PNH_VERBATIMINPUT);
  $output->Text(submitstuff_usermenu());
  $output->SetInputMode(_PNH_PARSEINPUT);

  // Return the output that has been generated by this function
  return $output->GetOutput();
}
//////////
// viewbusclass
// viewclass
// viewcal
////

function submitstuff_user_viewcal()
{
  global $page_title;
  $page_title = "Submissions :: Calendar Listings";

  list( $_submit_check,
        $eventorgname,
        $eventeventname,
        $eventaddress,
        $eventcity,
        $eventothercity,
        $eventwebsite,
        $eventdate,
        $eventtime,
        $eventages,
        $eventfree,
        $eventcost,
        $eventdescription,
        $eventcontactname,
        $eventcontactphone,
        $eventcontactemail ) = pnVarCleanFromInput( '_submit_check',
                                                    'eventorgname',
                                                    'eventeventname',
                                                    'eventaddress',
                                                    'eventcity',
                                                    'eventothercity',
                                                    'eventwebsite',
                                                    'eventdate',
                                                    'eventtime',
                                                    'eventages',
                                                    'eventfree',
                                                    'eventcost',
                                                    'eventdescription',
                                                    'eventcontactname',
                                                    'eventcontactphone',
                                                    'eventcontactemail' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $subject = "Calendar Submission - $eventeventname";

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "Organization Name: " . $eventorgname . "\n\n";
    $message .= "Event Name:        " . $eventeventname . "\n\n";
    $message .= "Address:           " . $eventaddress . "\n\n";
    $message .= "City:              " . $eventcity . "\n\n";
    $message .= "Other City:        " . $eventothercity . "\n\n";
    $message .= "Website:           " . $eventwebsite . "\n\n";
    $message .= "Date:              " . $eventdate . "\n\n";
    $message .= "Time:              " . $eventtime . "\n\n";
    $message .= "Ages:              " . $eventages . "\n\n";
    $message .= "Free:              " . $eventfree . "\n\n";
    $message .= "Cost:              " . $eventcost . "\n\n";
    $message .= "Description:       " . $eventdescription . "\n\n";
    $message .= "Contact Name:      " . $eventcontactname . "\n\n";
    $message .= "Contact Phone:     " . $eventcontactphone . "\n\n";
    $message .= "Contact E-Mail:    " . $eventcontactemail . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $eventeventname . "\n";
    $message .= $eventaddress . "\n";
    $message .= $eventcity . "\n";
    $message .= $eventothercity . "\n";
    $message .= $eventwebsite . "\n";
    $message .= $eventdate . "\n";
    $message .= $eventtime . "\n";
    $message .= $eventages . "\n";
    $message .= $eventfree . "\n";
    $message .= $eventcost . "\n";
    $message .= $eventdescription . "\n";
    $message .= $eventcontactname . "\n";
    $message .= $eventcontactphone . "\n";
    $message .= $eventcontactemail . "\n";

    /* To send HTML mail, you can set the Content-type header. */
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Website Submit <home@kidspages.org>\r\n";

    /* and now mail it */
    mail('calendar@kidspages.org', $subject, $message, $headers);

    $output->Text( '<font class="header">Submissions :: Calendar Listings</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span><br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $eventorgname      = htmlentities( $eventorgname );
  $eventeventname    = htmlentities( $eventeventname );
  $eventaddress      = htmlentities( $eventaddress );
  $eventcity         = htmlentities( $eventcity );
  $eventothercity    = htmlentities( $eventothercity );
  $eventwebsite      = htmlentities( $eventwebsite );
  $eventdate         = htmlentities( $eventdate );
  $eventtime         = htmlentities( $eventtime );
  $eventages         = htmlentities( $eventages );
  $eventfree         = htmlentities( $eventfree );
  $eventcost         = htmlentities( $eventcost );
  $eventdescription  = htmlentities( $eventdescription );
  $eventcontactname  = htmlentities( $eventcontactname );
  $eventcontactphone = htmlentities( $eventcontactphone );
  $eventcontactemail = htmlentities( $eventcontactemail );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}

div.class-container p {
  margin-top: 0px;
}

</style>
<font class="header">Submissions :: Calendar Listings</font>
<div class="class-container">
  <p>Colorado families depend on Kids' Pages Community Calendars to find family-friendly events.</p>
  <p>If you have an event you'd like us to consider for the print and/or web calendar please submit it using this form.</p>
  <p>We fulfill as many requests as possible, but can not guarantee your event will be published. Using a set criteria the calendar editor will determine which events are published in the magazine; free family events and advertisers receive first priority. Most submissions will be posted on our website.</p>
  <p>Events must be open to the public, of interest to Colorado families and cost no more than $25 per person. Information must be submitted 5 weeks prior to the month of publication. We reserve the right to edit or withhold all submissions.</p>

  <form action="/index.php" method="post">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewcal">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Name of Organization:</td><td><input name="eventorgname" size="50" maxlength="50" value="$eventorgname"></td></tr>

      <tr><td>Name of Event:</td><td><input name="eventeventname" size="50" maxlength="50" value="$eventeventname"></td></tr>

      <tr><td>Street Address of Event:</td><td><input name="eventaddress" size="50" maxlength="50" value="$eventaddress"></td></tr>

      <tr>
        <td>City or Area:</td>
        <td>
          <select name="eventcity">
EOT
);

$output->Text( '<option value="Arvada"' .            ( $eventcity == 'Arvada' ? ' selected' : '' ) .            '>Arvada</option>' );
$output->Text( '<option value="Aurora"' .            ( $eventcity == 'Aurora' ? ' selected' : '' ) .            '>Aurora</option>' );
$output->Text( '<option value="Boulder"' .           ( $eventcity == 'Boulder' ? ' selected' : '' ) .           '>Boulder</option>' );
$output->Text( '<option value="Broomfield"' .        ( $eventcity == 'Broomfield' ? ' selected' : '' ) .        '>Broomfield</option>' );
$output->Text( '<option value="Castle Rock"' .       ( $eventcity == 'Castle Rock' ? ' selected' : '' ) .       '>Castle Rock</option>' );
$output->Text( '<option value="Centennial"' .        ( $eventcity == 'Centennial' ? ' selected' : '' ) .        '>Centennial</option>' );
$output->Text( '<option value="Denver"' .            ( $eventcity == 'Denver' ? ' selected' : '' ) .            '>Denver</option>' );
$output->Text( '<option value="Englewood"' .         ( $eventcity == 'Englewood' ? ' selected' : '' ) .         '>Englewood</option>' );
$output->Text( '<option value="Erie"' .              ( $eventcity == 'Erie' ? ' selected' : '' ) .              '>Erie</option>' );
$output->Text( '<option value="Fort Collins"' .      ( $eventcity == 'Fort Collins' ? ' selected' : '' ) .      '>Fort Collins</option>' );
$output->Text( '<option value="Golden"' .            ( $eventcity == 'Golden' ? ' selected' : '' ) .            '>Golden</option>' );
$output->Text( '<option value="Greeley"' .           ( $eventcity == 'Greeley' ? ' selected' : '' ) .           '>Greeley</option>' );
$output->Text( '<option value="Highlands Ranch"' .   ( $eventcity == 'Highlands Ranch' ? ' selected' : '' ) .   '>Highlands Ranch</option>' );
$output->Text( '<option value="Ken-Caryl Ranch"' .   ( $eventcity == 'Ken-Caryl Ranch' ? ' selected' : '' ) .   '>Ken-Caryl Ranch</option>' );
$output->Text( '<option value="Lafayette"' .         ( $eventcity == 'Lafayette' ? ' selected' : '' ) .         '>Lafayette</option>' );
$output->Text( '<option value="Lakewood"' .          ( $eventcity == 'Lakewood' ? ' selected' : '' ) .          '>Lakewood</option>' );
$output->Text( '<option value="Littleton"' .         ( $eventcity == 'Littleton' ? ' selected' : '' ) .         '>Littleton</option>' );
$output->Text( '<option value="Lone Tree"' .         ( $eventcity == 'Lone Tree' ? ' selected' : '' ) .         '>Lone Tree</option>' );
$output->Text( '<option value="Longmont"' .          ( $eventcity == 'Longmont' ? ' selected' : '' ) .          '>Longmont</option>' );
$output->Text( '<option value="Louisville"' .        ( $eventcity == 'Louisville' ? ' selected' : '' ) .        '>Louisville</option>' );
$output->Text( '<option value="Loveland"' .          ( $eventcity == 'Loveland' ? ' selected' : '' ) .          '>Loveland</option>' );
$output->Text( '<option value="Northglenn"' .        ( $eventcity == 'Northglenn' ? ' selected' : '' ) .        '>Northglenn</option>' );
$output->Text( '<option value="Parker"' .            ( $eventcity == 'Parker' ? ' selected' : '' ) .            '>Parker</option>' );
$output->Text( '<option value="Superior"' .          ( $eventcity == 'Superior' ? ' selected' : '' ) .          '>Superior</option>' );
$output->Text( '<option value="Thornton"' .          ( $eventcity == 'Thornton' ? ' selected' : '' ) .          '>Thornton</option>' );
$output->Text( '<option value="Westminster"' .       ( $eventcity == 'Westminster' ? ' selected' : '' ) .       '>Westminster</option>' );
$output->Text( '<option value="Wheat Ridge"' .       ( $eventcity == 'Wheat Ridge' ? ' selected' : '' ) .       '>Wheat Ridge</option>' );
$output->Text( '<option value="Windsor"' .           ( $eventcity == 'Windsor' ? ' selected' : '' ) .           '>Windsor</option>' );

$output->Text( '<option value="Denver Metro"' .      ( $eventcity == 'Denver Metro' ? ' selected' : '' ) .      '>Denver Metro</option>' );
$output->Text( '<option value="Northern Colorado"' . ( $eventcity == 'Northern Colorado' ? ' selected' : '' ) . '>Northern Colorado</option>' );
$output->Text( '<option value="Statewide"' .         ( $eventcity == 'Statewide' ? ' selected' : '' ) .         '>Statewide</option>' );
$output->Text( '<option value="Other"' .             ( $eventcity == 'Other' ? ' selected' : '' ) .             '>Other</option>' );

$output->Text(
<<<EOT
          </select>
        </td>
      </tr>
      <tr><td>&nbsp</td><td>If Other, please enter city: <input name="eventothercity" size="25" maxlength="25" value="$eventothercity"></td></tr>
      <tr><td>Website:</td><td><input name="eventwebsite" size="50" maxlength="50"></td></tr>
      <tr><td>Date(s) of Event:</td><td><input name="eventdate" size="20" maxlength="20" value="$eventdate"></td></tr>
      <tr><td>Time(s) of Event:</td><td><input name="eventtime" size="20" maxlength="20" value ="$eventtime"></td></tr>
      <tr><td>For Age(s):</td><td><input name="eventages" size="20" maxlength="20" value="$eventages"></td></tr>

      <tr><td>Cost:</td><td>

          <select name="eventfree">
EOT
);

$output->Text( '<option value="Free"' .          ( $eventfree == 'Free' ? ' selected' : '' ) .          '>Free</option>' );
$output->Text( '<option value="NotFree"' .       ( $eventfree == 'NotFree' ? ' selected' : '' ) .          '>Not Free</option>' );

$output->Text(
<<<EOT
          </select>

</td></tr>

      <tr><td>If Not Free, enter cost:</td><td><input name="eventcost" size="50" maxlength="50" value="$eventcost"></td></tr>

      <tr><td valign="top">Description of Event:</td><td><textarea name="eventdescription" cols="50" rows="6">$eventdescription</textarea></td></tr>
      <tr><td style="font-weight:bold">Contact Info</td></tr>
      <tr><td>Name:</td><td><input name="eventcontactname" size="50" maxlength="50" value="$eventcontactname"></td></tr>
      <tr><td>Phone:</td><td><input name="eventcontactphone" size="20" maxlength="20" value="$eventcontactphone"></td></tr>
      <tr><td>E-Mail:</td><td><input name="eventcontactemail" size="50" maxlength="50" value="$eventcontactemail"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Calendar Entry">
  </form>
</div>
EOT
);

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );

  return $output->GetOutput();
}

function submitstuff_user_viewbizclass()
{
  global $page_title;
  $page_title = "Submissions :: Classifieds";

  list( $_submit_check,
        $contactemail,
        $contactwebsite,
        $contactname,
        $contactstreet,
        $contactcity,
        $contactstate,
        $contactzip,
        $contactphone,
        $eventdescription ) = pnVarCleanFromInput( '_submit_check',
                                                    'contactemail',
                                                    'contactwebsite',
                                                    'contactname',
                                                    'contactstreet',
                                                    'contactcity',
                                                    'contactstate',
                                                    'contactzip',
                                                    'contactphone',
                                                    'eventdescription' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $findstring1    = 'viagra';
    $findstring2    = 'cialis';
    $findstring3    = 'doxycycline';

    $pos1 = stristr( $contactname, $findstring1 );
    $pos2 = stristr( $contactname, $findstring2 );
    $pos3 = stristr( $contactname, $findstring3 );

    if ( $pos1 !== false || $pos2 !== false || $pos3 !== false )
    {
//      $output->Text( "pos1: $pos1 <br />" );
//      $output->Text( "pos2: $pos2 <br />" );
//      $output->Text( "pos3: $pos3 <br />" );
//      $output->Text( "<hr />" );
//      $output->Text( '<div style="font-size:30px;">bad</div>' );

      $output->Text( '<a href="/index.php">Back to the home page</a>' );
      return $output->GetOutput();
    }

    $subject = "Paid Classified Submission";

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "Name:              " . $contactname . "\n\n";
    $message .= "Street:            " . $contactstreet . "\n\n";
    $message .= "City:              " . $contactcity . "\n\n";
    $message .= "State:             " . $contactstate . "\n\n";
    $message .= "Zip:               " . $contactzip . "\n\n";
    $message .= "Phone:             " . $contactphone . "\n\n";
    $message .= "E-Mail:            " . $contactemail . "\n\n";
    $message .= "Website:           " . $contactwebsite . "\n\n";
    $message .= "Event Description: " . $eventdescription . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $contactname . "\n";
    $message .= $contactstreet . "\n";
    $message .= $contactcity . "\n";
    $message .= $contactstate . "\n";
    $message .= $contactzip . "\n";
    $message .= $contactphone . "\n";
    $message .= $contactemail . "\n";
    $message .= $contactwebsite . "\n";
    $message .= $eventdescription . "\n";

    /* To send HTML mail, you can set the Content-type header. */
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Website Submit <home@kidspages.org>\r\n";

    /* and now mail it */
    mail('classifieds@kidspages.org', $subject, $message, $headers);

    $output->Text( '<font class="header">Submissions :: Classifieds</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span><br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $contactemail     = htmlentities( $contactemail );
  $contactwebsite   = htmlentities( $contactwebsite );
  $contactname      = htmlentities( $contactname );
  $contactstreet    = htmlentities( $contactstreet );
  $contactcity      = htmlentities( $contactcity );
  $contactstate     = htmlentities( $contactstate );
  $contactzip       = htmlentities( $contactzip );
  $contactphone     = htmlentities( $contactphone );
  $eventdescription = htmlentities( $eventdescription );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px;
}

div.class-container p {
  margin-top: 0px;
}

</style>
<font class="header">Submissions :: Classifieds</font>
<div class="class-container">
<p>From childcare options and entertainment, to autos for sale and home services, our classified section works!</p>
<p>This online submission form is for one time text only classifieds to be printed in Kids' Pages Family Magazine. For ads that require artwork or classified packages that include multi-month print and web advertising and display rates please e-mail <a href="mailto:classifieds@kidspages.org">classifieds@kidspages.org</a>.</p>
<p>Availability of print classifieds is limited and filled on a first-come-first-served basis. Classifieds must include a business name and a contact name. The submission deadline is the 10th of the month prior to publication (e.g. February 10 for the March issue).</p>
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewbizclass">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Name:</td><td><input name="contactname" size="50" maxlength="50" value="$contactname"></td></tr>
      <tr><td>Street:</td><td><input name="contactstreet" size="50" maxlength="50" value="$contactstreet"></td></tr>
      <tr><td>City:</td><td><input name="contactcity" size="50" maxlength="50" value="$contactcity"></td></tr>
      <tr><td>State:</td><td><input name="contactstate" size="2" maxlength="2" value="$contactstate"></td></tr>
      <tr><td>Zip:</td><td><input name="contactzip" size="10" maxlength="10" value="$contactzip"></td></tr>
      <tr><td colspan="2">&nbsp;</td></tr>
      <tr><td>Phone:</td><td><input name="contactphone" size="15" maxlength="15" value="$contactphone"></td></tr>
      <tr><td>E-Mail:</td><td><input name="contactemail" size="50" maxlength="50" value="$contactemail"></td></tr>
      <tr><td>Website:</td><td><input name="contactwebsite" size="50" maxlength="50" value="$contactwebsite"></td></tr>
    </table>
    <br />
    Classified Text:<br />
    <span style="font-size:11px;font-weight:normal">$25 for up to 30 words.</span><br />
    <textarea name="eventdescription" cols="50" rows="10">$eventdescription</textarea>
    <br />
    <br />
    Call Colleen at 303-277-0053 with your credit card number or mail a check to:<br />
    <br />
    Kids' Pages<br />
    P.O. Box 745219<br />
    Arvada, CO  80006<br />
    <br />
    Payment must received within three days of submission.<br />
    <br />
    <input type="submit" value="Submit Classified">
  </form>
</div>
EOT
);

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );

  return $output->GetOutput();
}

function submitstuff_user_viewclass()
{
  global $page_title;
  $page_title = "Submissions :: Nonprofit Classifieds";

  list( $_submit_check,
        $contactemail,
        $contactname,
        $contactphone,
        $eventdescription ) = pnVarCleanFromInput( '_submit_check',
                                                    'contactemail',
                                                    'contactname',
                                                    'contactphone',
                                                    'eventdescription' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $subject = "Nonprofit Classified Submission";

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "Name:              " . $contactname . "\n\n";
    $message .= "Phone:             " . $contactphone . "\n\n";
    $message .= "E-Mail:            " . $contactemail . "\n\n";
    $message .= "Event Description: " . $eventdescription . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $contactname . "\n";
    $message .= $contactphone . "\n";
    $message .= $contactemail . "\n";
    $message .= $eventdescription . "\n";

    /* To send HTML mail, you can set the Content-type header. */
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Website Submit <home@kidspages.org>\r\n";

    /* and now mail it */
    mail('classifieds@kidspages.org', $subject, $message, $headers);

    $output->Text( '<font class="header">Submissions :: Nonprofit Classifieds</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span><br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $contactemail     = htmlentities( $contactemail );
  $contactname      = htmlentities( $contactname );
  $contactphone     = htmlentities( $contactphone );
  $eventdescription = htmlentities( $eventdescription );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>
<font class="header">Submissions :: Nonprofit Classifieds</font>
<div class="class-container">
Nonprofit classifieds are published in Kids' Pages Family Magazine as a community service for public schools and nonprofit, 501(c)(3) organizations. Availability of free classifieds is limited. We will accommodate as many requests as possible, but cannot guarantee publication. Free classifieds must be resubmitted monthly. The submission deadline is the first of the month prior to publication (e.g. October 1 for the November issue). Please limit to 30 words.<br /><br />
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewclass">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Name:</td><td><input name="contactname" size="50" maxlength="50" value="$contactname"></td></tr>
      <tr><td>Phone:</td><td><input name="contactphone" size="15" maxlength="15" value="$contactphone"></td></tr>
      <tr><td>E-Mail:</td><td><input name="contactemail" size="50" maxlength="50" value="$contactemail"></td></tr>
    </table>
    <br />
    Classified Text:<br />
    <textarea name="eventdescription" cols="50" rows="10">$eventdescription</textarea>
    <br /><br />
    <input type="submit" value="Submit Classified">
  </form>
</div>
EOT
);

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );

  return $output->GetOutput();
}

/**
 * display item
 * This is a standard function to provide detailed informtion on a single item
 * available from the module.
 */
function submitstuff_user_display($args)
{
  // Get parameters from whatever input we need.  All arguments to this
  // function should be obtained from pnVarCleanFromInput(), getting them
  // from other places such as the environment is not allowed, as that makes
  // assumptions that will not hold in future versions of PostNuke.
  list($tid,
       $objectid) = pnVarCleanFromInput('tid',
                                        'objectid');

  // User functions of this type can be called by other modules.  If this
  // happens then the calling module will be able to pass in arguments to
  // this function through the $args parameter.  Hence we extract these
  // arguments *after* we have obtained any form-based input through
  // pnVarCleanFromInput().
  extract($args);

  // At this stage we check to see if we have been passed $objectid, the
  // generic item identifier.  This could have been passed in by a hook or
  // through some other function calling this as part of a larger module, but
  // if it exists it overrides $tid
  //
  // Note that this module couuld just use $objectid everywhere to avoid all
  // of this munging of variables, but then the resultant code is less
  // descriptive, especially where multiple objects are being used.  The
  // decision of which of these ways to go is up to the module developer
  if (!empty($objectid))
  {
    $tid = $objectid;
  }

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();

  // Add menu to output - it helps if all of the module pages have a standard
  // menu at their head to aid in navigation
  $output->SetInputMode(_PNH_VERBATIMINPUT);
  $output->Text(submitstuff_usermenu());
  $output->SetInputMode(_PNH_PARSEINPUT);

  // Load API.  All of the actual work for obtaining information on the items
  // is done within the API, so we need to load that in before we can do
  // anything.  If the API fails to load an appropriate error message is
  // posted and the function returns
  if (!pnModAPILoad('SubmitStuff', 'user'))
  {
    $output->Text(_LOADFAILED);
    return $output->GetOutput();
  }

  // The API function is called.  The arguments to the function are passed in
  // as their own arguments array
  $item = pnModAPIFunc('SubmitStuff',
                       'user',
                       'get',
                       array('tid' => $tid));

  // The return value of the function is checked here, and if the function
  // suceeded then an appropriate message is posted.  Note that if the
  // function did not succeed then the API function should have already
  // posted a failure message so no action is required
  if ($item == false)
  {
    $output->Text(_SUBMITSTUFFITEMFAILED);
    return $output->GetOutput();
  }

  // Display details of the item.  Note the use of pnVarCensor() to remove
  // any words from the name that the administrator has deemed unsuitable for
  // the site.  Also note that a module variable is used here to determine
  // whether not not parts of the item information should be displayed in
  // bold type or not
  $output->Text(_SUBMITSTUFFNAME . ': ');
  if (pnModGetVar('SubmitStuff', 'bold'))
  {
    $output->BoldText(pnVarCensor($item['name']));
  }
  else
  {
    $output->Text(pnVarCensor($item['name']));
  }
  $output->Linebreak(2);
  $output->Text(_SUBMITSTUFFNUMBER . ': ');
  $output->Text($item['number']);
  $output->Linebreak(2);

  // Let any hooks know that we are displaying an item.  As this is a display
  // hook we're passing a URL as the extra info, which is the URL that any
  // hooks will show after they have finished their own work.  It is normal
  // for that URL to bring the user back to this function
  $output->SetInputMode(_PNH_VERBATIMINPUT);
  $output->Text(pnModCallHooks('item',
                               'display',
                               $tid,
                               pnModURL('SubmitStuff',
                                        'user',
                                        'display',
                                        array('tid' => $tid))));
  $output->SetInputMode(_PNH_PARSEINPUT);

  // Return the output that has been generated by this function
  return $output->GetOutput();
}

/**
 * generate menu fragment
 */
function submitstuff_usermenu()
{
  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();

  // Display status message if any.  Note that in future this functionality
  // will probably be in the theme rather than in this menu, but this is the
  // best place to keep it for now

  // Start options menu
  $output->Text(pnGetStatusMsg());
  $output->Linebreak(2);

  // Menu options.  These options are all added in a single row, to add
  // multiple rows of options the code below would just be repeated
  $output->TableStart(_SUBMITSTUFF);
  $output->SetOutputMode(_PNH_RETURNOUTPUT);
  $columns = array();
  $columns[] = $output->URL(pnModURL('SubmitStuff',
                                     'user',
                                     'view'),
                            _SUBMITSTUFFVIEW);
  $output->SetOutputMode(_PNH_KEEPOUTPUT);
  $output->SetInputMode(_PNH_VERBATIMINPUT);
  $output->TableAddRow($columns);
  $output->SetInputMode(_PNH_PARSEINPUT);
  $output->TableEnd();

  // Return the output that has been generated by this function
  return $output->GetOutput();
}

/*
// todo: clean up
function submitstuff_user_viewsub()
{
  global $page_title;
  $page_title = "Subscriptions";

  list( $_submit_check,
        $contactname,
        $contactaddress,
        $contactcity,
        $contactstate,
        $contactzip,
        $contactphone,
        $contactemail ) = pnVarCleanFromInput( '_submit_check',
                                             'contactname',
                                             'contactaddress',
                                             'contactcity',
                                             'contactstate',
                                             'contactzip',
                                             'contactphone',
                                             'contactemail');

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $subject = "Subscription Submission";

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "contactname: " . $contactname . "\n\n";
    $message .= "contactaddress: " . $contactaddress . "\n\n";
    $message .= "contactcity: " . $contactcity . "\n\n";
    $message .= "contactstate: " . $contactstate . "\n\n";
    $message .= "contactzip: " . $contactzip . "\n\n";
    $message .= "contactphone: " . $contactphone . "\n\n";
    $message .= "contactemail: " . $contactemail . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $contactname . "\n";
    $message .= $contactaddress . "\n";
    $message .= $contactcity . "\n";
    $message .= $contactstate . "\n";
    $message .= $contactzip . "\n";
    $message .= $contactphone . "\n";
    $message .= $contactemail . "\n";

    $message .= "--- copy/paste 2 ---\n";
    $message .= date("n/j/Y g:i a") . "\t";
    $message .= $submitip . "\t";
    $message .= $contactname . "\t";
    $message .= $contactaddress . "\t";
    $message .= $contactcity . "\t";
    $message .= $contactstate . "\t";
    $message .= $contactzip . "\t";
    $message .= $contactphone . "\t";
    $message .= $contactemail . "\n";
    $message .= "--- end copy/paste 2 ---\n";

    // To send HTML mail, you can set the Content-type header.
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Subscription Submit <contest@kidspages.org>\r\n";

    // and now mail it
    mail('contest@kidspages.org', $subject, $message, $headers);

    $output->Text( '<font class="header">Subscriptions</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for subscribing to Kids\' Pages Magazine!</span><br /><br />' );

    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $contactname    = htmlentities( $contactname );
  $contactaddress = htmlentities( $contactaddress );
  $contactcity    = htmlentities( $contactcity );
  $contactstate   = htmlentities( $contactstate );
  $contactzip     = htmlentities( $contactzip );
  $contactphone   = htmlentities( $contactphone );
  $contactemail   = htmlentities( $contactemail );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding-left:15px;
  padding-right:15px;
  padding-top:15px;
  padding-bottom:0px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px;
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>

<div style="width:540px;">
  <div class="class-container">
    <font class="header">Subscriptions</font>
    <br /><br />
    <div style="font-size:20px;font-weight:bold;color:#03f">
      Have Kids' Pages Family Magazine<br />
      Delivered to Your Home!<br />

      <div style="font-size:13px">
        Only $14.95 per year for postage and handling
      </div>
    </div>

    <br />
    <div style="font-weight:normal">
      When you click on the button below, you will be sent to PayPal where you can order your subscription and start getting Kids' Pages Family Magazine delivered to you door.
     <div style="font-size:20px;font-weight:bold;color:#03f">Thanks!</div>
    </div>
    <br />

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <input type="image" src="/images/misc/SubBtn-Denver.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
      <input type="hidden" name="add" value="1">
      <input type="hidden" name="cmd" value="_cart">
      <input type="hidden" name="business" value="shopping@kidspages.org">
      <input type="hidden" name="item_name" value="Kids' Pages Family Magazine Subscription - Denver Edition">
      <input type="hidden" name="amount" value="14.95">
      <input type="hidden" name="no_shipping" value="2">
      <input type="hidden" name="return" value="http://kidspages.org">
      <input type="hidden" name="no_note" value="1">
      <input type="hidden" name="currency_code" value="USD">
      <input type="hidden" name="bn" value="PP-ShopCartBF">
    </form>

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <input type="image" src="/images/misc/SubBtn-NoCo.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
      <input type="hidden" name="add" value="1">
      <input type="hidden" name="cmd" value="_cart">
      <input type="hidden" name="business" value="shopping@kidspages.org">
      <input type="hidden" name="item_name" value="Kids' Pages Family Magazine Subscription - Northern Colorado Edition">
      <input type="hidden" name="amount" value="14.95">
      <input type="hidden" name="no_shipping" value="2">
      <input type="hidden" name="return" value="http://kidspages.org">
      <input type="hidden" name="no_note" value="1">
      <input type="hidden" name="currency_code" value="USD">
      <input type="hidden" name="bn" value="PP-ShopCartBF">
    </form>

  </div>
</div>

EOT
);
  return $output->GetOutput();
}
*/

function submitstuff_user_viewparentres()
{
  global $page_title;
  $page_title = "Submissions :: Parenting Resources";

  list( $_submit_check,
        $parentresorgname,
        $parentreswebsite,
        $parentreslocation,
        $parentrestimes,
        $parentresotherinfo,
        $parentresmissionstatement,
        $parentrescontactname,
        $parentrescontactphone,
        $parentrescontactemail ) = pnVarCleanFromInput( '_submit_check',
                                                        'parentresorgname',
                                                        'parentreswebsite',
                                                        'parentreslocation',
                                                        'parentrestimes',
                                                        'parentresotherinfo',
                                                        'parentresmissionstatement',
                                                        'parentrescontactname',
                                                        'parentrescontactphone',
                                                        'parentrescontactemail' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $subject = "Parenting Resources - $parentresorgname";

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "Organization Name: " . $parentresorgname . "\n\n";
    $message .= "Website:           " . $parentreswebsite . "\n\n";
    $message .= "Location:          " . $parentreslocation . "\n\n";
    $message .= "Times:             " . $parentrestimes . "\n\n";
    $message .= "Other Info:        " . $parentresotherinfo . "\n\n";
    $message .= "Mission Statement: " . $parentresmissionstatement . "\n\n";
    $message .= "Contact Name:      " . $parentrescontactname . "\n\n";
    $message .= "Contact Phone:     " . $parentrescontactphone . "\n\n";
    $message .= "Contact E-Mail:    " . $parentrescontactemail . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $parentresorgname . "\n";
    $message .= $parentreswebsite . "\n";
    $message .= $parentreslocation . "\n";
    $message .= $parentrestimes . "\n";
    $message .= $parentresotherinfo . "\n";
    $message .= $parentresmissionstatement . "\n";
    $message .= $parentrescontactname . "\n";
    $message .= $parentrescontactphone . "\n";
    $message .= $parentrescontactemail . "\n";

    /* To send HTML mail, you can set the Content-type header. */
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Website Submit <home@kidspages.org>\r\n";

    /* and now mail it */
    mail('ParentingResources@kidspages.org', $subject, $message, $headers);

    $output->Text( '<font class="header">Submissions :: Parenting Resources</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span><br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $parentresorgname          = htmlentities( $parentresorgname );
  $parentreswebsite          = htmlentities( $parentreswebsite );
  $parentreslocation         = htmlentities( $parentreslocation );
  $parentrestimes            = htmlentities( $parentrestimes );
  $parentresotherinfo        = htmlentities( $parentresotherinfo );
  $parentresmissionstatement = htmlentities( $parentresmissionstatement );
  $parentrescontactname      = htmlentities( $parentrescontactname );
  $parentrescontactphone     = htmlentities( $parentrescontactphone );
  $parentrescontactemail     = htmlentities( $parentrescontactemail );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}

div.class-container p {
  margin-top: 0px;
}

</style>
<font class="header">Submissions :: Parenting Resources</font>
<div class="class-container">
  <p>Parenting Resources include parenting organizations, support groups and education. We value our role as a comprehensive resource guide for Colorado Families. Family Resources will be printed in the magazine at the editor’s discretion and included on our website. Submissions will be edited for space and we reserve the right to edit or withhold all submissions.</p>
  To be included in our free Parent Resources section please fill out the following:
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewparentres">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Name of Organization:</td><td><input name="parentresorgname" size="50" maxlength="100" value="$parentresorgname"></td></tr>
      <tr><td>Website:</td><td><input name="parentreswebsite" size="50" maxlength="100" value="$parentreswebsite"></td></tr>
      <tr><td valign="top">Meeting Location:</td><td><textarea name="parentreslocation" cols="50" rows="3">$parentreslocation</textarea></td></tr>
      <tr><td valign="top">Time(s):</td><td><textarea name="parentrestimes" cols="50" rows="3">$parentrestimes</textarea></td></tr>
      <tr><td valign="top">Other Info:</td><td><textarea name="parentresotherinfo" cols="50" rows="6">$parentresotherinfo</textarea></td></tr>
      <tr><td valign="top">Mission Statement:</td><td><textarea name="parentresmissionstatement" cols="50" rows="6">$parentresmissionstatement</textarea></td></tr>

      <tr><td style="font-weight:bold">Contact Info</td></tr>
      <tr><td>Name:</td><td><input name="parentrescontactname" size="50" maxlength="50" value="$parentrescontactname"></td></tr>
      <tr><td>Phone:</td><td><input name="parentrescontactphone" size="20" maxlength="20" value="$parentrescontactphone"></td></tr>
      <tr><td>E-Mail:</td><td><input name="parentrescontactemail" size="50" maxlength="50" value="$parentrescontactemail"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Parenting Resource">
  </form>
</div>
EOT
);

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );

  return $output->GetOutput();
}

// http://kidspages.org/index.php?module=SubmitStuff&func=viewresponse
function submitstuff_user_viewresponse()
{
  global $page_title;
  $page_title = "Submissions :: Reader Response";

  list( $_submit_check,
        $readerresponsecontactname,
        $readerresponsecontactcity,
        $readerresponsecontactphone,
        $readerresponsecontactemail,
        $readerresponsecomments ) = pnVarCleanFromInput( '_submit_check',
                                                        'readerresponsecontactname',
                                                        'readerresponsecontactcity',
                                                        'readerresponsecontactphone',
                                                        'readerresponsecontactemail',
                                                        'readerresponsecomments' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $subject = "Parenting Resources - $readerresponsecontactname";

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "Contact Name:    " . $readerresponsecontactname . "\n\n";
    $message .= "Contact City:    " . $readerresponsecontactcity . "\n\n";
    $message .= "Contact Phone:   " . $readerresponsecontactphone . "\n\n";
    $message .= "Contact E-Email: " . $readerresponsecontactemail . "\n\n";
    $message .= "Comments:        " . $readerresponsecomments . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $readerresponsecontactname . "\n";
    $message .= $readerresponsecontactcity . "\n";
    $message .= $readerresponsecontactphone . "\n";
    $message .= $readerresponsecontactemail . "\n";
    $message .= $readerresponsecomments . "\n";

    /* To send HTML mail, you can set the Content-type header. */
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Website Submit <home@kidspages.org>\r\n";

    /* and now mail it */
    mail('ReaderRepsonse@kidspages.org', $subject, $message, $headers);

    $output->Text( '<font class="header">Submissions :: Reader Response</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span><br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $readerresponsecontactname  = htmlentities( $readerresponsecontactname );
  $readerresponsecontactcity  = htmlentities( $readerresponsecontactcity );
  $readerresponsecontactphone = htmlentities( $readerresponsecontactphone );
  $readerresponsecontactemail = htmlentities( $readerresponsecontactemail );
  $readerresponsecomments     = htmlentities( $readerresponsecomments );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}

div.class-container p {
  margin-top: 0px;
}

</style>
<font class="header">Submissions :: Reader Response</font>
<div class="class-container">
  <p>We want to hear from our readers. Your thoughts and comments and ideas, are important to us.</p>
  <p>Tell us about experiences that you have had with our advertisers, fun events that you have attended, family-friendly places we should know about, stories you'd like to see in the magazine and anything else your heart desires.</p>
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewresponse">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Name:</td><td><input name="readerresponsecontactname" size="50" maxlength="50" value="$readerresponsecontactname"></td></tr>
      <tr><td>City:</td><td><input name="readerresponsecontactcity" size="50" maxlength="50" value="$readerresponsecontactcity"></td></tr>
      <tr><td>Phone:</td><td><input name="readerresponsecontactphone" size="20" maxlength="20" value="$readerresponsecontactphone"></td></tr>
      <tr><td>E-Mail:</td><td><input name="readerresponsecontactemail" size="50" maxlength="50" value="$readerresponsecontactemail"></td></tr>
      <tr><td valign="top">Thoughts, comments and ideas:</td><td><textarea name="readerresponsecomments" cols="50" rows="20">$readerresponsecomments</textarea></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit">
  </form>
</div>
EOT
);

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );

  return $output->GetOutput();
}

///////////////////////////////////////////////
// Brain Boosters
///////////////////////////////////////////////
function submitstuff_user_viewbrainboosters_entry()
{
  $contestid = 50001;
  $email_subject = "Brain Boosters Submission";
  $thankyou_title = "Brain Boosters Entry";
  $contest_func = "viewbrainboosters_entry";

  $readerquestion = "Enter any notes";

  global $page_title;
  $page_title = $thankyou_title;

  list( $_submit_check,
        $entryname,
        $entryage,
        $entrygrade,
        $entryschool,
        $entryaddress,
        $entrycity,
        $entrystate,
        $entryzip,
        $entryphone,
        $entryemail,
        $readerresponse ) = pnVarCleanFromInput( '_submit_check',
                                                 'entryname',
                                                 'entryage',
                                                 'entrygrade',
                                                 'entryschool',
                                                 'entryaddress',
                                                 'entrycity',
                                                 'entrystate',
                                                 'entryzip',
                                                 'entryphone',
                                                 'entryemail',
                                                 'readerresponse');

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $subject = $email_subject;

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "entryname: " . $entryname . "\n\n";
    $message .= "entryage: " . $entryage . "\n\n";
    $message .= "entrygrade: " . $entrygrade . "\n\n";
    $message .= "entryschool: " . $entryschool . "\n\n";
    $message .= "entryaddress: " . $entryaddress . "\n\n";
    $message .= "entrycity: " . $entrycity . "\n\n";
    $message .= "entrystate: " . $entrystate . "\n\n";
    $message .= "entryzip: " . $entryzip . "\n\n";
    $message .= "entryphone: " . $entryphone . "\n\n";
    $message .= "entryemail: " . $entryemail . "\n\n";
    $message .= "readerquestion: " . $readerquestion . "\n\n";
    $message .= "readerresponse: " . $readerresponse . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $entryname . "\n";
    $message .= $entryage . "\n";
    $message .= $entrygrade . "\n";
    $message .= $entryschool . "\n";
    $message .= $entryaddress . "\n";
    $message .= $entrycity . "\n";
    $message .= $entrystate . "\n";
    $message .= $entryzip . "\n";
    $message .= $entryphone . "\n";
    $message .= $entryemail . "\n";
    $message .= $readerquestion . "\n";
    $message .= $readerresponse . "\n";

    $message .= "--- copy/paste 2 ---\n";
    $message .= date("n/j/Y g:i a") . "\t";
    $message .= $submitip . "\t";
    $message .= $entryname . "\t";
    $message .= $entryage . "\t";
    $message .= $entrygrade . "\t";
    $message .= $entryschool . "\t";
    $message .= $entryaddress . "\t";
    $message .= $entrycity . "\t";
    $message .= $entrystate . "\t";
    $message .= $entryzip . "\t";
    $message .= $entryphone . "\t";
    $message .= $entryemail . "\n";
    $message .= $readerquestion . "\n";
    $message .= $readerresponse . "\n";
    $message .= "--- end copy/paste 2 ---\n";

    /* To send HTML mail, you can set the Content-type header. */
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Contest Submit <contest@kidspages.org>\r\n";

    /* and now mail it */
    @mail('contest@kidspages.org', $subject, $message, $headers);

    // begin database

    // insert into database
    $strsql = "INSERT INTO `kp_contest` (";
    $strsql .= "contestid"  . ", ";
    $strsql .= "submitdate" . ", ";
    $strsql .= "ipaddress"  . ", ";
    $strsql .= "name"       . ", ";
    $strsql .= "address"    . ", ";
    $strsql .= "city"       . ", ";
    $strsql .= "state"      . ", ";
    $strsql .= "zip"        . ", ";
    $strsql .= "phone"      . ", ";
    $strsql .= "email"      . ", ";
    $strsql .= "age"        . ", ";
    $strsql .= "grade"      . ", ";
    $strsql .= "school"     . ", ";
    $strsql .= "question"   . ", ";
    $strsql .= "misc01";
    $strsql .= ") VALUES (";

    $strsql .= "$contestid, ";
    $strsql .= "'" . addslashes( $submitdate      ) . "', ";
    $strsql .= "'" . addslashes( $submitip        ) . "', ";
    $strsql .= "'" . addslashes( $entryname       ) . "', ";
    $strsql .= "'" . addslashes( $entryaddress    ) . "', ";
    $strsql .= "'" . addslashes( $entrycity       ) . "', ";
    $strsql .= "'" . addslashes( $entrystate      ) . "', ";
    $strsql .= "'" . addslashes( $entryzip        ) . "', ";
    $strsql .= "'" . addslashes( $entryphone      ) . "', ";
    $strsql .= "'" . addslashes( $entryemail      ) . "', ";
    $strsql .= "'" . addslashes( $entryage        ) . "', ";
    $strsql .= "'" . addslashes( $entrygrade      ) . "', ";
    $strsql .= "'" . addslashes( $entryschool     ) . "', ";
    $strsql .= "'" . addslashes( $readerquestion  ) . "', ";
    $strsql .= "'" . addslashes( $readerresponse  ) . "'";
    $strsql .= ")";

    // echo '<b style="font-size:30px;">' . $strsql . '</b><hr>'; // debug

    list($dbconn) = pnDBGetConn();
    $dbconn->Execute( $strsql );
    // end database

    $output->Text( '<font class="header">' . $thankyou_title . '</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span><br /><br />' );

    $output->Text( '<a href="/index.php?module=SubmitStuff&func=viewbrainboosters_entry">Enter another?</a>' );
    $output->Text( '<br /><br />' );

    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $entryname      = htmlentities( $entryname );
  $entryage       = htmlentities( $entryage );
  $entrygrade     = htmlentities( $entrygrade );
  $entryschool    = htmlentities( $entryschool );
  $entryaddress   = htmlentities( $entryaddress );
  $entrycity      = htmlentities( $entrycity );
  $entrystate     = htmlentities( $entrystate );
  $entryzip       = htmlentities( $entryzip );
  $entryphone     = htmlentities( $entryphone );
  $entryemail     = htmlentities( $entryemail );
  $readerresponse = htmlentities( $readerresponse );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding-left:15px;
  padding-right:15px;
  padding-top:15px;
  padding-bottom:0px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px;
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>

<div style="width:785px;">
  <div style="text-align:center;font-size:18px;font-weight:900;width:480px;">
    Enter a Brain Booster
  </div>

  <div class="class-container">
    For entry to be valid, fill out form completely.
    <br />
    <form action="/index.php" method="post">
      <input type="hidden" name="module" value="SubmitStuff">
      <input type="hidden" name="func" value="$contest_func">
      <input type="hidden" name="_submit_check" value="1"/>
      <table border="0">
        <tr><td>Name:</td><td><input name="entryname" size="50" maxlength="50" value="$entryname"></td></tr>
        <tr><td>Age:</td><td><input name="entryage" size="2" maxlength="2" value="$entryage"></td></tr>
        <tr><td>Grade:</td><td><input name="entrygrade" size="2" maxlength="2" value="$entrygrade"></td></tr>
        <tr><td>School:</td><td><input name="entryschool" size="50" maxlength="50" value="$entryschool"></td></tr>
        <tr><td>Address:</td><td><input name="entryaddress" size="50" maxlength="50" value="$entryaddress"></td></tr>
        <tr><td>City:</td><td><input name="entrycity" size="50" maxlength="50" value="$entrycity"></td></tr>
        <tr><td>State:</td><td><input name="entrystate" size="2" maxlength="2" value="$entrystate"></td></tr>
        <tr><td>Zip:</td><td><input name="entryzip" size="10" maxlength="10" value="$entryzip"></td></tr>
        <tr><td>Phone:</td><td><input name="entryphone" size="15" maxlength="15" value="$entryphone"></td></tr>
        <tr><td>E-Mail:</td><td><input name="entryemail" size="50" maxlength="50" value="$entryemail"></td></tr>

        <tr><td colspan="2">$readerquestion:<br />
        <textarea name="readerresponse" cols="60" rows="30">$readerresponse</textarea>
        </td></tr>

        <tr><td colspan="2">&nbsp;</td></tr>
        <tr><td colspan="2"><input type="submit" name="submit" value="submit"></td></tr>
      </table>
    </form>
<!--
    <div style="text-align:left;font-size:10px;font-weight:normal;width:500px;">
      The small print:<br />
      Winners will receive a restaurant gift certificate. Limit one entry per person per day.<br />
      <br />
      Contest sponsors and their dependants are not eligible. Winners will be<br />
      drawn at random and mailed their prize.
    </div>
-->
  </div>
</div>

EOT
);

  return $output->GetOutput();
}

///////////////////////////////////////////////
// Listings Input
///////////////////////////////////////////////

function submitstuff_user_viewweblisting()
{
  global $page_title;
  $page_title = "Avertisers Only";
  $listing_check = 'weblisting_check';

  list( $_submit_check,
        $ad_password ) = pnVarCleanFromInput( '_submit_check',
                                              'ad_password' );

  $advertisersonly_check = @$_SESSION[$listing_check];
  $error_text = "";

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    if ( !empty( $ad_password ) && $ad_password == "smile" )
    {
      $advertisersonly_check = '1';
      $_SESSION[$listing_check] = $advertisersonly_check;
    }
    else
    {
      $error_text = "Sorry, incorrect password.<br /><br />";
    }
  }

  $ad_password = htmlentities( $ad_password );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>
<font class="header">Kids' Pages Family Magazine :: Web Listing</font>
EOT
);

if ( !empty( $advertisersonly_check ) && $advertisersonly_check == "1" )
{
$output->Text(
<<<EOT
<div class="class-container">
  <b>Click here to</b>
  <a href="/newlisting/" target="_blank">Submit your Web Listing.</a><br /><br />
</div>
EOT
);
}
else
{
$output->Text(
<<<EOT
<div class="class-container">
$error_text
Please enter your password for access to the Web Listing entry.<br /><br />
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewweblisting">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Password:</td><td><input name="ad_password" size="30" maxlength="30" value="$ad_password"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Password">
  </form>
</div>
EOT
);
}

  return $output->GetOutput();
}

function submitstuff_user_viewprintlisting()
{
  global $page_title;
  $page_title = "Avertisers Only";
  $listing_check = 'printlisting_check';

  list( $_submit_check,
        $ad_password ) = pnVarCleanFromInput( '_submit_check',
                                              'ad_password' );

  $advertisersonly_check = @$_SESSION[$listing_check];
  $error_text = "";

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    if ( !empty( $ad_password ) && $ad_password == "special" )
    {
      $advertisersonly_check = '1';
      $_SESSION[$listing_check] = $advertisersonly_check;
    }
    else
    {
      $error_text = "Sorry, incorrect password.<br /><br />";
    }
  }

  $ad_password = htmlentities( $ad_password );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>
<font class="header">Kids' Pages Family Magazine :: Print Listing</font>
EOT
);

if ( !empty( $advertisersonly_check ) && $advertisersonly_check == "1" )
{
$output->Text(
<<<EOT
<div class="class-container">
  <b>Click here to</b>
  <a href="/medialisting/medialisting.php?listing_type=print" target="_blank">Submit your Print Listing.</a><br /><br />
</div>
EOT
);
}
else
{
$output->Text(
<<<EOT
<div class="class-container">
$error_text
Please enter your password for access to the Print Listing entry.<br /><br />
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewprintlisting">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Password:</td><td><input name="ad_password" size="30" maxlength="30" value="$ad_password"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Password">
  </form>
</div>
EOT
);
}
  return $output->GetOutput();
}

function submitstuff_user_viewpsdlisting()
{
  global $page_title;
  $page_title = "Avertisers Only";
  $listing_check = 'psdlisting_check';

  list( $_submit_check,
        $ad_password ) = pnVarCleanFromInput( '_submit_check',
                                              'ad_password' );

  $advertisersonly_check = @$_SESSION[$listing_check];
  $error_text = "";

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    if ( !empty( $ad_password ) && $ad_password == "lucky" )
    {
      $advertisersonly_check = '1';
      $_SESSION[$listing_check] = $advertisersonly_check;
    }
    else
    {
      $error_text = "Sorry, incorrect password.<br /><br />";
    }
  }

  $ad_password = htmlentities( $ad_password );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>
<font class="header">Kids' Pages Family Magazine :: PSD Activity Guide Listing</font>
EOT
);

if ( !empty( $advertisersonly_check ) && $advertisersonly_check == "1" )
{
$output->Text(
<<<EOT
<div class="class-container">
  <b>Click here to</b>
  <a href="/medialisting/medialisting.php?listing_type=psd" target="_blank">Submit your PSD Activity Guide Listing.</a><br /><br />
</div>
EOT
);
}
else
{
$output->Text(
<<<EOT
<div class="class-container">
$error_text
Please enter your password for access to the PSD Activity Guide Listing entry.<br /><br />
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewpsdlisting">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Password:</td><td><input name="ad_password" size="30" maxlength="30" value="$ad_password"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Password">
  </form>
</div>
EOT
);
}

// debug
// $list_type = @$_GET['list'];
//
// $psdlisting_check = @$_SESSION['psdlisting_check'];
// $printlisting_check = @$_SESSION['printlisting_check'];
//
// $x_media_id = @$_GET["media"];
//
// echo "list_type: " . $list_type . "<br />";
// echo "psdlisting_check: " . $psdlisting_check . "<br />";
// echo "printlisting_check: " . $printlisting_check . "<br />";
// echo "x_media_id: " . $x_media_id . "<br />";
// echo "<hr />";

  return $output->GetOutput();
}

function submitstuff_user_vieweventregistration()
{
  global $page_title;
  $page_title = "Avertisers Only";
  $listing_check = 'eventregistration_check';

  list( $_submit_check,
        $ad_password ) = pnVarCleanFromInput( '_submit_check',
                                              'ad_password' );

  $advertisersonly_check = @$_SESSION[$listing_check];
  $error_text = "";

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    if ( !empty( $ad_password ) && $ad_password == "family" )
    {
      $advertisersonly_check = '1';
      $_SESSION[$listing_check] = $advertisersonly_check;
    }
    else
    {
      $error_text = "Sorry, incorrect password.<br /><br />";
    }
  }

  $ad_password = htmlentities( $ad_password );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>
<font class="header">Kids' Pages Family Magazine :: Event Registration</font>
EOT
);

if ( !empty( $advertisersonly_check ) && $advertisersonly_check == "1" )
{
$output->Text(
<<<EOT
<div class="class-container">
  <div style="font-size: 170%">
    Click here to download, print and fax in the<br /> <a href="/pdf/KidsPagesFamilyFestivals-2008.pdf"><img src="/pdf/pdficon_large.gif" border="0" align="top">&nbsp;Space Registration Form</a>.
    <br style="clear: both;" />
  </div>

  <br /><br />
  <br /><br />
  <br /><br />
  <br /><br />
  <br /><br />

  <div style="font-size: 80%">
    The Space Registration Form needs Acrobat Reader. If you do not have a copy of Acrobat Reader,<br />
    you may download it free from Adobe. Just click on the icon below.<br />
    <div style="padding-top:5px;">
      <a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank"><img src="/pdf/get_adobe_reader.gif" width="112" height="33" border="0"></a>
    </div>
  </div>

</div>
EOT
);
}
else
{
$output->Text(
<<<EOT
<div class="class-container">
$error_text
Please enter your password for access to the Event Registration form. Call Kids' Pages at 303-277-0053 if you haven't already received your password.<br /><br />
  <form action="/index.php" method="get">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="vieweventregistration">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Password:</td><td><input name="ad_password" size="30" maxlength="30" value="$ad_password"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Password">
  </form>
</div>
EOT
);
}

  return $output->GetOutput();
}

//////////////////////////////////////////////////////////////////////////////
/* Begin of Grand Slam */
//////////////////////////////////////////////////////////////////////////////

function processgrandslamform()
{
  $email_subject = "Grand Slam Submission";
  $thankyou_title = "Get the Hottest Discount of the Summer!";
  $contest_func = "viewgrandslam";

  global $page_title;
  $page_title = $thankyou_title;

  list( $_submit_check2,
        $entryname,
        $company,
        $type_of_business,
        $address,
        $city,
        $state,
        $zip,
        $phone,
        $email,
        $advertising_interest,
        $monthly_budget,
        $contact_you,
        $comments ) = pnVarCleanFromInput( '_submit_check2',
                                           'entryname',
                                           'company',
                                           'type_of_business',
                                           'address',
                                           'city',
                                           'state',
                                           'zip',
                                           'phone',
                                           'email',
                                           'advertising_interest',
                                           'monthly_budget',
                                           'contact_you',
                                           'comments' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check2 == '1' )
  {
    $subject = $email_subject;

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

//    $eol = "<br />";
    $eol = "\n";
    $message = "";
    $message .= $submitdate . "$eol";
    $message .= $submitip . "$eol";
    $message .= "$eol$eol";

    $message .= "Name:$eol"                                                       . $entryname . "$eol$eol";
    $message .= "Company:$eol"                                                    . $company . "$eol$eol";
    $message .= "Type of Business:$eol"                                           . $type_of_business . "$eol$eol";
    $message .= "Address:$eol"                                                    . $address . "$eol$eol";
    $message .= "City:$eol"                                                       . $city . "$eol$eol";
    $message .= "State:$eol"                                                      . $state . "$eol$eol";
    $message .= "Zip:$eol"                                                        . $zip . "$eol$eol";
    $message .= "Phone:$eol"                                                      . $phone . "$eol$eol";
    $message .= "E-Mail:$eol"                                                     . $email . "$eol$eol";
    $message .= "Advertising Interest:$eol";

    switch ( $advertising_interest )
    {
      case 0:
        $message .= "Print";
        break;
      case 1:
        $message .= "Online";
        break;
      case 2:
        $message .= "Both Print & Online";
        break;
    }
    $message .= "$eol$eol";

    $message .= "Approximate Monthly Budget:$eol"                                 . $monthly_budget . "$eol$eol";
    $message .= "Would you like an Account Manager to contact you?$eol"           . ( $contact_you == 1 ? "Yes" : "No" ) . "$eol$eol";
    $message .= "Comments or Questions:$eol"                                      . $comments . "$eol$eol";

// echo "<hr />";
// echo $message;
// echo "<hr />";

    // To send HTML mail, you can set the Content-type header.
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Grand Slam Entry <grandslam@kidspages.org>\r\n";

    // and now mail it
    @mail('contest@kidspages.org', $subject, $message, $headers);
    @mail('home@kidspages.org', $subject, $message, $headers);

    // begin database

    // insert into database
    $strsql = "INSERT INTO `kp_grandslam` (";
    $strsql .= "submitdate"            . ", ";
    $strsql .= "ipaddress"             . ", ";
    $strsql .= "source"                . ", ";

    $strsql .= "name"                  . ", ";
    $strsql .= "company"               . ", ";
    $strsql .= "type_of_business"      . ", ";
    $strsql .= "address"               . ", ";
    $strsql .= "city"                  . ", ";
    $strsql .= "state"                 . ", ";
    $strsql .= "zip"                   . ", ";
    $strsql .= "phone"                 . ", ";
    $strsql .= "email"                 . ", ";
    $strsql .= "advertising_interest"  . ", ";
    $strsql .= "monthly_budget"        . ", ";
    $strsql .= "contact_you"           . ", ";
    $strsql .= "comments";
    $strsql .= ") VALUES (";

    $strsql .= "'" . addslashes( $submitdate           ) . "', ";
    $strsql .= "'" . addslashes( $submitip             ) . "', ";
    $strsql .= "'" . addslashes( 2                     ) . "', ";

    $strsql .= "'" . addslashes( $entryname            ) . "', ";
    $strsql .= "'" . addslashes( $company              ) . "', ";
    $strsql .= "'" . addslashes( $type_of_business     ) . "', ";
    $strsql .= "'" . addslashes( $address              ) . "', ";
    $strsql .= "'" . addslashes( $city                 ) . "', ";
    $strsql .= "'" . addslashes( $state                ) . "', ";
    $strsql .= "'" . addslashes( $zip                  ) . "', ";
    $strsql .= "'" . addslashes( $phone                ) . "', ";
    $strsql .= "'" . addslashes( $email                ) . "', ";
    $strsql .= "'" . addslashes( $advertising_interest ) . "', ";
    $strsql .= "'" . addslashes( $monthly_budget       ) . "', ";
    $strsql .= "'" . addslashes( $contact_you          ) . "', ";
    $strsql .= "'" . addslashes( $comments             ) . "'";
    $strsql .= ")";

    // echo '<b style="font-size:30px;">' . $strsql . '</b><hr>'; // debug
// echo "<hr />";
// echo $strsql;
// echo "<hr />";

    list($dbconn) = pnDBGetConn();
    $dbconn->Execute( $strsql );
    // end database

    $output->Text( '<font class="header">' . $thankyou_title . '</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span>' );

    if ( $contact_you == 1 )
    {
      $output->Text( '<br /><br />' );
      $output->Text( 'An Account Manager will contact you shortly.' );
    }

    $output->Text( '<br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  // Send e-mail when some views the form.
  // To send HTML mail, you can set the Content-type header.
  $headers  = "MIME-Version: 1.0\r\n";
  $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
  $headers .= "From: Grand Slam View <grandslam@kidspages.org>\r\n";
  $subject = "Grand Slam View";
  $message = date("F j, Y, g:i a") . "\n" . getenv("REMOTE_ADDR") . "\n";
  @mail('contest@kidspages.org', $subject, $message, $headers);

  $entryname            = htmlentities( $entryname );
  $company              = htmlentities( $company );
  $type_of_business     = htmlentities( $type_of_business );
  $address              = htmlentities( $address );
  $city                 = htmlentities( $city );
  $state                = htmlentities( $state );
  $zip                  = htmlentities( $zip );
  $phone                = htmlentities( $phone );
  $email                = htmlentities( $email );
  $advertising_interest = htmlentities( $advertising_interest );
  $monthly_budget       = htmlentities( $monthly_budget );
  $contact_you          = htmlentities( $contact_you );
  $comments             = htmlentities( $comments );

$output->Text(
<<<EOT
<style>
div.class-container {
  width:515px;
  border: 2px dashed #fff;
  background-color: #b4a0c5;
  padding-left:15px;
  padding-right:15px;
  padding-top:15px;
  padding-bottom:0px;
  margin: 20px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px;
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>

<div style="background-color:#b4a0c5;color:#201877;padding:20px">

<!--
  <div style="float: right;text-align:left;font-size:18px;font-weight:900;color:#264ba0;width:300px;">
    <img src="/images/contests/ArcticTale-display.jpg" width="300" height="444" border="0" style="padding-top:5px;">
  </div>
-->

  <div><img src="/images/cover/2007-06/GrandSlam-banner.gif" width="600" height="200" border="0" style="padding-top:5px;"></div>

  <div style="text-align:left;font-size:14px;">
    <h2 style="font-size:150%;">Kids' Pages Family is Colorado's Number One<br />family-focused magazine.</h2>
    <b>In Size...</b> Not one to shrink year after year. Kids' Pages Family has remained a full 8.25" x 10.75". We offer you bigger ad space to highlight ALL your company needs.<br />
    <br />
    <b>In Pages...</b> 88+ pages packed full of entertaining, educational, and informative articles laid out in an eye-captivating way.<br />
    <br />
    <b>In Readers...</b> Approximately 200,000 readers who patronize our advertisers and meet with them at the annual Kids' Pages Family Festivals.<br />
    <br />
    <b>In Distribution...</b> 100,000 copies distributed with every issue (combined Northern Colorado & Metro Denver) and the only family magazine being distributed to every student in hundreds of Colorado public, private and charter schools.<br />
    <br />
    <b>In Advertisers...</b> Kids' Pages Family advertisers cover every segment of family needs. Our advertisers are loyal and we maintain a 95% retention rate. Advertisers enjoy getting the most for their marketing dollar with print ads, web exposure, materials distribution and participation in Kids' Pages events!<br />
    <br />
    <b>In Web Hits...</b> More than a million hits per month! KidsPages.org- A user-friendly website that's a comprehensive resource full of valuable information that families have come to depend on year after year.<br />
    <br />
    <b>and in HEART...</b> Kids' Pages Cares is a 501(c)(3) nonprofit charity that has given more than a half million dollars worth of assistance to deserving children in the Denver Metro Area helping them succeed beyond their family circumstances.<br />
    <br />
    <b>
    If you want to be or remain the biggest player in your field, team-up with Kids' Pages Family Magazine and KidsPages.org!<br />
    <br />
    When you sign a 3, 6 or 9 month contract with Kids' Pages Family by September 1, you will receive 10% off your ENTIRE contract!<br />
    </b>
  </div>

  <div class="class-container">
    <span style="font-size:20px">Get the Hottest Discount of the Summer!<br /></span>
    Tell us about your business:<br />
    <form action="/index.php" method="post">
      <input type="hidden" name="module" value="SubmitStuff">
      <input type="hidden" name="func" value="$contest_func">
      <input type="hidden" name="_submit_check2" value="1"/>
      <table border="0">
        <tr><td>Name:</td><td><input name="entryname" size="50" maxlength="50" value="$entryname"></td></tr>
        <tr><td>Company:</td><td><input name="company" size="50" maxlength="50" value="$company"></td></tr>
        <tr><td>Type of Business:</td><td><input name="type_of_business" size="50" maxlength="50" value="$type_of_business"></td></tr>
        <tr><td>Address:</td><td><input name="address" size="50" maxlength="50" value="$address"></td></tr>
        <tr><td>City:</td><td><input name="city" size="50" maxlength="50" value="$city"></td></tr>
        <tr><td>State:</td><td><input name="state" size="2" maxlength="2" value="$state"></td></tr>
        <tr><td>Zip:</td><td><input name="zip" size="10" maxlength="10" value="$zip"></td></tr>
        <tr><td>Phone:</td><td><input name="phone" size="15" maxlength="15" value="$phone"></td></tr>
        <tr><td>E-Mail:</td><td><input name="email" size="50" maxlength="50" value="$email"></td></tr>

        <tr>
          <td valign="top">Advertising Interest:</td>
          <td>
            <input type="radio" name="advertising_interest" checked value="0">Print
            &nbsp;&nbsp;
            <input type="radio" name="advertising_interest"         value="1">Online
            &nbsp;&nbsp;
            <input type="radio" name="advertising_interest"         value="2">Both Print & Online
          </td>
        </tr>

        <tr><td>Approximate Monthly Budget:</td><td><input name="monthly_budget" size="50" maxlength="50" value="$monthly_budget"></td></tr>

        <tr>
          <td>Would you like an Account Manager to contact you?</td>
          <td>
            <input type="radio" name="contact_you" checked value="1">Yes
            &nbsp;&nbsp;
            <input type="radio" name="contact_you"         value="0">No
          </td>
        </tr>

        <tr>
          <td valign="top">Comments or Questions:</td>
          <td>
            <textarea name="comments" cols="50" rows="5">$comments</textarea>
          </td>
        </tr>

        <tr><td colspan="2">&nbsp;</td></tr>
        <tr><td colspan="2"><input type="submit" name="submit" value="submit"></td></tr>
      </table>
    </form>
  </div>
</div>

EOT
);

/*
Also on "Contact the marketing department

Get the Hottest Discount of the Summer!
Tell us about your business:

Name:
Company:
Type of Business:
Address:
City:
State:
Zip:
Phone:
E-Mail:

Advertising Interest:
xPrint xOnline xBoth.

Approximate Monthly Budget

Would you like an account manager to contact you?
xYes  xNo

Comments or Questions
*/

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );
  return $output->GetOutput();
}

function submitstuff_user_viewgrandslam()
{
  global $page_title;
  $page_title = "Hottest Discount of the Summer";
  $listing_check = 'grandslam_check';

  list( $_submit_check,
        $ad_password ) = pnVarCleanFromInput( '_submit_check',
                                              'ad_password' );

  $ad_password = strtolower( $ad_password );
  $advertisersonly_check = @$_SESSION[$listing_check];
  $error_text = "";

  if ( $_submit_check == '1' )
  {
    if ( !empty( $ad_password ) && $ad_password == "grandslam" )
    {
      $advertisersonly_check = '1';
      $_SESSION[$listing_check] = $advertisersonly_check;
    }
    else
    {
      $error_text = "Sorry, incorrect password.<br /><br />";
    }
  }

  $ad_password = htmlentities( $ad_password );

// Create output object - this object will store all of our output so that
// we can return it easily when required
$output = new pnHTML();
$output->SetInputMode(_PNH_VERBATIMINPUT);

if ( !empty( $advertisersonly_check ) && $advertisersonly_check == "1" )
{
  $output->Text( processgrandslamform() );
}
else
{

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>
<font class="header">Kids' Pages Family Magazine :: Hottest Discount of the Summer</font>
EOT
);

$output->Text(
<<<EOT
<div class="class-container">
$error_text
Please enter your password for access to the Hottest Discount of the Summer.<br /><br />
  <form action="/index.php" method="post">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewgrandslam">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Password:</td><td><input name="ad_password" size="30" maxlength="30" value="$ad_password"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Password">
  </form>
</div>
EOT
);

}

  return $output->GetOutput();
}

//////////////////////////////////////////////////////////////////////////////
/* End of Grand Slam */
//////////////////////////////////////////////////////////////////////////////

function submitstuff_user_viewmarketingdepartment()
{
  global $page_title;
  $page_title = "Advertising :: Contact the Marketing Department";

  $email_subject = "Contact the Marketing Department Submission";
  $thankyou_title = "Contact the Marketing Department";

  list( $_submit_check2,
        $entryname,
        $company,
        $type_of_business,
        $address,
        $city,
        $state,
        $zip,
        $phone,
        $email,
        $advertising_interest,
        $monthly_budget,
        $contact_you,
        $comments ) = pnVarCleanFromInput( '_submit_check2',
                                           'entryname',
                                           'company',
                                           'type_of_business',
                                           'address',
                                           'city',
                                           'state',
                                           'zip',
                                           'phone',
                                           'email',
                                           'advertising_interest',
                                           'monthly_budget',
                                           'contact_you',
                                           'comments' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check2 == '1' )
  {
    $subject = $email_subject;

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

//    $eol = "<br />";
    $eol = "\n";
    $message = "";
    $message .= $submitdate . "$eol";
    $message .= $submitip . "$eol";
    $message .= "$eol$eol";

    $message .= "Name:$eol"               . $entryname . "$eol$eol";
    $message .= "Company:$eol"            . $company . "$eol$eol";
    $message .= "Type of Business:$eol"   . $type_of_business . "$eol$eol";
    $message .= "Address:$eol"            . $address . "$eol$eol";
    $message .= "City:$eol"               . $city . "$eol$eol";
    $message .= "State:$eol"              . $state . "$eol$eol";
    $message .= "Zip:$eol"                . $zip . "$eol$eol";
    $message .= "Phone:$eol"              . $phone . "$eol$eol";
    $message .= "E-Mail:$eol"             . $email . "$eol$eol";
    $message .= "Advertising Interest:$eol";

    switch ( $advertising_interest )
    {
      case 0:
        $message .= "Print";
        break;
      case 1:
        $message .= "Online";
        break;
      case 2:
        $message .= "Both Print & Online";
        break;
    }
    $message .= "$eol$eol";

    $message .= "Approximate Monthly Budget:$eol"                        . $monthly_budget . "$eol$eol";
    $message .= "Would you like an Account Manager to contact you?$eol"  . ( $contact_you == 1 ? "Yes" : "No" ) . "$eol$eol";
    $message .= "Comments or Questions:$eol"                             . $comments . "$eol$eol";

    // To send HTML mail, you can set the Content-type header.
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Contact the Marketing Department <grandslam@kidspages.org>\r\n";

    // and now mail it
    @mail('contest@kidspages.org', $subject, $message, $headers);
    @mail('home@kidspages.org', $subject, $message, $headers);

    // begin database

    // insert into database
    $strsql = "INSERT INTO `kp_grandslam` (";
    $strsql .= "submitdate"            . ", ";
    $strsql .= "ipaddress"             . ", ";
    $strsql .= "source"                . ", ";

    $strsql .= "name"                  . ", ";
    $strsql .= "company"               . ", ";
    $strsql .= "type_of_business"      . ", ";
    $strsql .= "address"               . ", ";
    $strsql .= "city"                  . ", ";
    $strsql .= "state"                 . ", ";
    $strsql .= "zip"                   . ", ";
    $strsql .= "phone"                 . ", ";
    $strsql .= "email"                 . ", ";
    $strsql .= "advertising_interest"  . ", ";
    $strsql .= "monthly_budget"        . ", ";
    $strsql .= "contact_you"           . ", ";
    $strsql .= "comments";
    $strsql .= ") VALUES (";

    $strsql .= "'" . addslashes( $submitdate           ) . "', ";
    $strsql .= "'" . addslashes( $submitip             ) . "', ";
    $strsql .= "'" . addslashes( 1                     ) . "', ";

    $strsql .= "'" . addslashes( $entryname            ) . "', ";
    $strsql .= "'" . addslashes( $company              ) . "', ";
    $strsql .= "'" . addslashes( $type_of_business     ) . "', ";
    $strsql .= "'" . addslashes( $address              ) . "', ";
    $strsql .= "'" . addslashes( $city                 ) . "', ";
    $strsql .= "'" . addslashes( $state                ) . "', ";
    $strsql .= "'" . addslashes( $zip                  ) . "', ";
    $strsql .= "'" . addslashes( $phone                ) . "', ";
    $strsql .= "'" . addslashes( $email                ) . "', ";
    $strsql .= "'" . addslashes( $advertising_interest ) . "', ";
    $strsql .= "'" . addslashes( $monthly_budget       ) . "', ";
    $strsql .= "'" . addslashes( $contact_you          ) . "', ";
    $strsql .= "'" . addslashes( $comments             ) . "'";
    $strsql .= ")";

    // echo '<b style="font-size:30px;">' . $strsql . '</b><hr>'; // debug
    // echo "<hr />";
    // echo $strsql;
    // echo "<hr />";

    list($dbconn) = pnDBGetConn();
    $dbconn->Execute( $strsql );
    // end database

    $output->Text( '<font class="header">' . $thankyou_title . '</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span>' );

    if ( $contact_you == 1 )
    {
      $output->Text( '<br /><br />' );
      $output->Text( 'An Account Manager will contact you shortly.' );
    }

    $output->Text( '<br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  return $output->GetOutput();
}

//////////////////////////////////////////////////////////////////////////////
/* Begin of Family Festivals */
//////////////////////////////////////////////////////////////////////////////

function processfamilyfestivalsform()
{
  $email_subject = "Family Festivals Submission";
  $thankyou_title = "Family Festivals";
  $contest_func = "viewfamilyfestivals";

  global $page_title;
  $page_title = $thankyou_title;

  list( $_submit_check2,
        $entryname,
        $company,
        $phone,
        $email,
        $flatiron1st,
        $flatiron2nd,
        $flatiron3rd,
        $wildlife1st,
        $wildlife2nd,
        $wildlife3rd ) = pnVarCleanFromInput( '_submit_check2',
                                              'entryname',
                                              'company',
                                              'phone',
                                              'email',
                                              'flatiron1st',
                                              'flatiron2nd',
                                              'flatiron3rd',
                                              'wildlife1st',
                                              'wildlife2nd',
                                              'wildlife3rd' );

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check2 == '1' )
  {
    $subject = $email_subject;

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

//    $eol = "<br />";
    $eol = "\n";
    $message = "";
    $message .= $submitdate . "$eol";
    $message .= $submitip . "$eol";
    $message .= "$eol$eol";

    $message .= "Name:$eol"    . $entryname . "$eol$eol";
    $message .= "Company:$eol" . $company . "$eol$eol";
    $message .= "Phone:$eol"   . $phone . "$eol$eol";
    $message .= "E-Mail:$eol"  . $email . "$eol$eol";

    $message .= "Flatiron 1st:$eol"  . $flatiron1st . "$eol$eol";
    $message .= "Flatiron 2nd:$eol"  . $flatiron2nd . "$eol$eol";
    $message .= "Flatiron 3rd:$eol"  . $flatiron3rd . "$eol$eol";
    $message .= "Wildlife 1st:$eol"  . $wildlife1st . "$eol$eol";
    $message .= "Wildlife 2nd:$eol"  . $wildlife2nd . "$eol$eol";
    $message .= "Wildlife 3rd:$eol"  . $wildlife3rd . "$eol$eol";

    $message .= "$eol$eol";

// echo "<hr />";
// echo $message;
// echo "<hr />";

    // To send HTML mail, you can set the Content-type header.
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Family Festivals Entry <familyfestivals@kidspages.org>\r\n";

    // and now mail it
    @mail('contest@kidspages.org', $subject, $message, $headers);
    @mail('home@kidspages.org', $subject, $message, $headers);

    // begin database

    // insert into database
    $strsql = "INSERT INTO `kp_familyfestivals` (";
    $strsql .= "submitdate"            . ", ";
    $strsql .= "ipaddress"             . ", ";

    $strsql .= "name"                  . ", ";
    $strsql .= "company"               . ", ";
    $strsql .= "phone"                 . ", ";
    $strsql .= "email"                 . ", ";

    $strsql .= "flatiron1st"                 . ", ";
    $strsql .= "flatiron2nd"                 . ", ";
    $strsql .= "flatiron3rd"                 . ", ";
    $strsql .= "wildlife1st"                 . ", ";
    $strsql .= "wildlife2nd"                 . ", ";
    $strsql .= "wildlife3rd";
    $strsql .= ") VALUES (";

    $strsql .= "'" . addslashes( $submitdate           ) . "', ";
    $strsql .= "'" . addslashes( $submitip             ) . "', ";

    $strsql .= "'" . addslashes( $entryname            ) . "', ";
    $strsql .= "'" . addslashes( $company              ) . "', ";
    $strsql .= "'" . addslashes( $phone                ) . "', ";
    $strsql .= "'" . addslashes( $email                ) . "', ";

    $strsql .= "'" . addslashes( $flatiron1st          ) . "', ";
    $strsql .= "'" . addslashes( $flatiron2nd          ) . "', ";
    $strsql .= "'" . addslashes( $flatiron3rd          ) . "', ";
    $strsql .= "'" . addslashes( $wildlife1st          ) . "', ";
    $strsql .= "'" . addslashes( $wildlife2nd          ) . "', ";
    $strsql .= "'" . addslashes( $wildlife3rd          ) . "'";
    $strsql .= ")";

    // echo '<b style="font-size:30px;">' . $strsql . '</b><hr>'; // debug
// echo "<hr />";
// echo $strsql;
// echo "<hr />";

    list($dbconn) = pnDBGetConn();
    $dbconn->Execute( $strsql );
    // end database

    $output->Text( '<font class="header">' . $thankyou_title . '</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">We appreciate your input. You are automatically entered to win a Free Table at the Family Festival of your choice, and will be the first to be notified of the Festival dates.</span>' );
    $output->Text( '<br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you!</span>' );

    $output->Text( '<br /><br />' );
    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  // Send e-mail when some views the form.
  // To send HTML mail, you can set the Content-type header.
  $headers  = "MIME-Version: 1.0\r\n";
  $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
  $headers .= "From: Family Festivals View <familyfestivals@kidspages.org>\r\n";
  $subject = "Family Festivals View";
  $message = date("F j, Y, g:i a") . "\n" . getenv("REMOTE_ADDR") . "\n";
  @mail('contest@kidspages.org', $subject, $message, $headers);

$output->Text(
<<<EOT

<style>
div.class-container {
  width: 515px;
  border: 2px dashed #fff;
  background-color: yellow;
  padding-left:15px;
  padding-right:15px;
  padding-top:15px;
  padding-bottom:0px;
  margin: 20px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px;
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px;
  }

div.class-container select {
  font-size: 15px;
  }

div.class-container input {
  font-size: 15px;
  }

</style>

<div style="background-color: yellow; color: #201877; padding:20px;">

  <div style="float: left; padding: 0px 20px 5px 0px;">
    <img src="/images/cover/2007-06/FamilyFestivals-Family.gif" width="142" height="200" border="0">
  </div>

  <div style="float: right; padding: 0px 20px 5px 0px;">
    <img src="/images/cover/2007-06/FamilyFestivals-Logo.gif" width="282" height="80" border="0">
  </div>

  <div style="text-align:left;font-size:16px;">
    <h2 style="font-size:180%;">Family Festivals</h2>
    Flatiron Crossing and the Wildlife Experience both want Kids' Pages Family Festivals back for another successful year. With thousands of families in attendance, Kids' Pages Family Festivals are the largest events of their type in Colorado and one stop shopping for Summer Camps, Birthday Parties and Family Friendly Businesses that cater to these high demographic markets.
    <br />
  </div>

  <div class="class-container">
    <span style="font-size:20px">We want you to pick the dates that work best for your company for the 2008 Kids' Pages Family Festivals!<br /></span>

    <form action="/index.php" method="post">
      <input type="hidden" name="module" value="SubmitStuff">
      <input type="hidden" name="func" value="viewfamilyfestivals">
      <input type="hidden" name="_submit_check2" value="1"/>
      <table border="0">
        <tr><td colspan="2"><div style="height:7px;"></div></td></tr>
        <tr><td colspan="2"><b>Interested in Flatiron?</b></td></tr>

        <tr>
          <td><b>First&nbsp;Choice:</b></td>
          <td>
            <select name="flatiron1st">
              <option value="No Choice">Please Choose</option>
              <option value="Sunday, February 24">Sunday, February 24</option>
              <option value="Sunday, April 6">Sunday, April 6</option>
              <option value="Sunday, April 13">Sunday, April 13</option>
            </select>
          </td>
        </tr>

        <tr>
          <td><b>Second&nbsp;Choice:</b></td>
          <td>
            <select name="flatiron2nd">
              <option value="No Choice">Please Choose</option>
              <option value="Sunday, February 24">Sunday, February 24</option>
              <option value="Sunday, April 6">Sunday, April 6</option>
              <option value="Sunday, April 13">Sunday, April 13</option>
            </select>
          </td>
        </tr>

        <tr>
          <td><b>Third&nbsp;Choice:</b></td>
          <td>
            <select name="flatiron3rd">
              <option value="No Choice">Please Choose</option>
              <option value="Sunday, February 24">Sunday, February 24</option>
              <option value="Sunday, April 6">Sunday, April 6</option>
              <option value="Sunday, April 13">Sunday, April 13</option>
            </select>
          </td>
        </tr>

        <tr><td colspan="2">&nbsp;</td></tr>

        <tr><td colspan="2"><b>Interested in Wildlife?</b></td></tr>

        <tr>
          <td><b>First&nbsp;Choice:</b></td>
          <td>
            <select name="wildlife1st">
              <option value="No Choice">Please Choose</option>
              <option value="Sunday, February 24">Sunday, February 24</option>
              <option value="Sunday, March 2">Sunday, March 2</option>
              <option value="Sunday, March 30">Sunday, March 30</option>
              <option value="Sunday, April 6">Sunday, April 6</option>
              <option value="Sunday, April 13">Sunday, April 13</option>
            </select>
          </td>
        </tr>

        <tr>
          <td><b>Second&nbsp;Choice:</b></td>
          <td>
            <select name="wildlife2nd">
              <option value="No Choice">Please Choose</option>
              <option value="Sunday, February 24">Sunday, February 24</option>
              <option value="Sunday, March 2">Sunday, March 2</option>
              <option value="Sunday, March 30">Sunday, March 30</option>
              <option value="Sunday, April 6">Sunday, April 6</option>
              <option value="Sunday, April 13">Sunday, April 13</option>
            </select>
          </td>
        </tr>

        <tr>
          <td><b>Third&nbsp;Choice:</b></td>
          <td>
            <select name="wildlife3rd">
              <option value="No Choice">Please Choose</option>
              <option value="Sunday, February 24">Sunday, February 24</option>
              <option value="Sunday, March 2">Sunday, March 2</option>
              <option value="Sunday, March 30">Sunday, March 30</option>
              <option value="Sunday, April 6">Sunday, April 6</option>
              <option value="Sunday, April 13">Sunday, April 13</option>
            </select>
          </td>
        </tr>

        <tr><td colspan="2">&nbsp;</td></tr>

        <tr><td>Name:</td><td><input name="entryname" size="40" maxlength="50" value=""></td></tr>
        <tr><td>Company:</td><td><input name="company" size="40" maxlength="50" value=""></td></tr>
        <tr><td>Phone:</td><td><input name="phone" size="15" maxlength="15" value=""></td></tr>
        <tr><td>E-Mail:</td><td><input name="email" size="40" maxlength="50" value=""></td></tr>

        <tr><td colspan="2">&nbsp;</td></tr>
        <tr><td colspan="2"><input type="submit" name="submit" value="submit"></td></tr>
      </table>
    </form>
  </div>
</div>

EOT
);

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );
  return $output->GetOutput();
}

function submitstuff_user_viewfamilyfestivals()
{
  global $page_title;
  $page_title = "Family Festivals";
  $listing_check = 'familyfestivals_check';

  list( $_submit_check,
        $ad_password ) = pnVarCleanFromInput( '_submit_check',
                                              'ad_password' );

  $ad_password = strtolower( $ad_password );
  $advertisersonly_check = @$_SESSION[$listing_check];
  $error_text = "";

  if ( $_submit_check == '1' )
  {
    if ( !empty( $ad_password ) && $ad_password == "free table" )
    {
      $advertisersonly_check = '1';
      $_SESSION[$listing_check] = $advertisersonly_check;
    }
    else
    {
      $error_text = "Sorry, incorrect password.<br /><br />";
    }
  }

  $ad_password = htmlentities( $ad_password );

// Create output object - this object will store all of our output so that
// we can return it easily when required
$output = new pnHTML();
$output->SetInputMode(_PNH_VERBATIMINPUT);

if ( !empty( $advertisersonly_check ) && $advertisersonly_check == "1" )
{
  $output->Text( processfamilyfestivalsform() );
}
else
{

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding:15px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>
<font class="header">Kids' Pages Family Magazine :: Family Festivals</font>
EOT
);

$output->Text(
<<<EOT
<div class="class-container">
$error_text
Please enter your password for a chance to win a Free Table at the Family Festival of your choice!<br /><br />
  <form action="/index.php" method="post">
    <input type="hidden" name="module" value="SubmitStuff">
    <input type="hidden" name="func" value="viewfamilyfestivals">
    <input type="hidden" name="_submit_check" value="1"/>
    <table border="0">
      <tr><td>Password:</td><td><input name="ad_password" size="30" maxlength="30" value="$ad_password"></td></tr>
    </table>
    <br />
    <input type="submit" value="Submit Password">
  </form>
</div>
EOT
);

}

  return $output->GetOutput();
}

//////////////////////////////////////////////////////////////////////////////
/* End of Family Festivals */
//////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////
// Contests
///////////////////////////////////////////////

function submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print )
{
  $email_subject = "$contest_name Submission";
  $thankyou_title = "$contest_name Contest";

  $display_image_anchor_begin = "";
  $display_image_anchor_end = "";

  if ( !empty( $display_image_link ) )
  {
    $display_image_anchor_begin = "<a href=\"$display_image_link\" target=\"_blank\">";
    $display_image_anchor_end = "</a>";
  }

  global $page_title;
  $page_title = $thankyou_title;

  list( $_submit_check,
        $entryname,
        $entryage,
        $entrygrade,
        $entryschool,
        $entryaddress,
        $entrycity,
        $entrystate,
        $entryzip,
        $entryphone,
        $entryemail ) = pnVarCleanFromInput( '_submit_check',
                                             'entryname',
                                             'entryage',
                                             'entrygrade',
                                             'entryschool',
                                             'entryaddress',
                                             'entrycity',
                                             'entrystate',
                                             'entryzip',
                                             'entryphone',
                                             'entryemail');

  // Create output object - this object will store all of our output so that
  // we can return it easily when required
  $output = new pnHTML();
  $output->SetInputMode(_PNH_VERBATIMINPUT);

  if ( $_submit_check == '1' )
  {
    $subject = $email_subject;

    $submitdate = date("F j, Y, g:i a");
    $submitip = getenv("REMOTE_ADDR");

    $message = "";
    $message .= $submitdate . "\n";
    $message .= $submitip . "\n";
    $message .= "\n\n";

    $message .= "entryname: " . $entryname . "\n\n";
    $message .= "entryage: " . $entryage . "\n\n";
    $message .= "entrygrade: " . $entrygrade . "\n\n";
    $message .= "entryschool: " . $entryschool . "\n\n";
    $message .= "entryaddress: " . $entryaddress . "\n\n";
    $message .= "entrycity: " . $entrycity . "\n\n";
    $message .= "entrystate: " . $entrystate . "\n\n";
    $message .= "entryzip: " . $entryzip . "\n\n";
    $message .= "entryphone: " . $entryphone . "\n\n";
    $message .= "entryemail: " . $entryemail . "\n\n";

    $message .= "--- copy/paste ---\n";
    $message .= $entryname . "\n";
    $message .= $entryage . "\n";
    $message .= $entrygrade . "\n";
    $message .= $entryschool . "\n";
    $message .= $entryaddress . "\n";
    $message .= $entrycity . "\n";
    $message .= $entrystate . "\n";
    $message .= $entryzip . "\n";
    $message .= $entryphone . "\n";
    $message .= $entryemail . "\n";

    $message .= "--- copy/paste 2 ---\n";
    $message .= date("n/j/Y g:i a") . "\t";
    $message .= $submitip . "\t";
    $message .= $entryname . "\t";
    $message .= $entryage . "\t";
    $message .= $entrygrade . "\t";
    $message .= $entryschool . "\t";
    $message .= $entryaddress . "\t";
    $message .= $entrycity . "\t";
    $message .= $entrystate . "\t";
    $message .= $entryzip . "\t";
    $message .= $entryphone . "\t";
    $message .= $entryemail . "\n";
    $message .= "--- end copy/paste 2 ---\n";

    // To send HTML mail, you can set the Content-type header.
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Contest Submit <contest@kidspages.org>\r\n";

    // and now mail it
    @mail('contest@kidspages.org', $subject, $message, $headers);

    // begin database
    $entryquestion  = '';  // no question

    // insert into database
    $strsql = "INSERT INTO `kp_contest` (";
    $strsql .= "contestid"  . ", ";
    $strsql .= "submitdate" . ", ";
    $strsql .= "ipaddress"  . ", ";
    $strsql .= "name"       . ", ";
    $strsql .= "address"    . ", ";
    $strsql .= "city"       . ", ";
    $strsql .= "state"      . ", ";
    $strsql .= "zip"        . ", ";
    $strsql .= "phone"      . ", ";
    $strsql .= "email"      . ", ";
    $strsql .= "age"      . ", ";
    $strsql .= "grade"      . ", ";
    $strsql .= "school"      . ", ";
    $strsql .= "question";
    $strsql .= ") VALUES (";

    $strsql .= "$contestid, ";
    $strsql .= "'" . addslashes( $submitdate     ) . "', ";
    $strsql .= "'" . addslashes( $submitip       ) . "', ";
    $strsql .= "'" . addslashes( $entryname      ) . "', ";
    $strsql .= "'" . addslashes( $entryaddress   ) . "', ";
    $strsql .= "'" . addslashes( $entrycity      ) . "', ";
    $strsql .= "'" . addslashes( $entrystate     ) . "', ";
    $strsql .= "'" . addslashes( $entryzip       ) . "', ";
    $strsql .= "'" . addslashes( $entryphone     ) . "', ";
    $strsql .= "'" . addslashes( $entryemail     ) . "', ";
    $strsql .= "'" . addslashes( $entryage       ) . "', ";
    $strsql .= "'" . addslashes( $entrygrade     ) . "', ";
    $strsql .= "'" . addslashes( $entryschool    ) . "', ";
    $strsql .= "'" . addslashes( $entryquestion  ) . "'";
    $strsql .= ")";

//    echo '<b style="font-size:30px;">' . $strsql . '</b><hr>'; // debug

    list($dbconn) = pnDBGetConn();
    $dbconn->Execute( $strsql );
    // end database

    $output->Text( '<font class="header">' . $thankyou_title . '</font><br /><br />' );
    $output->Text( '<span style="font-size:18px">Thank you for your submission!</span><br /><br />' );

    $output->Text( '<a href="/index.php">Back to the home page</a>' );
    return $output->GetOutput();
  }

  $entryname    = htmlentities( $entryname );
  $entryage     = htmlentities( $entryage );
  $entrygrade   = htmlentities( $entrygrade );
  $entryschool  = htmlentities( $entryschool );
  $entryaddress = htmlentities( $entryaddress );
  $entrycity    = htmlentities( $entrycity );
  $entrystate   = htmlentities( $entrystate );
  $entryzip     = htmlentities( $entryzip );
  $entryphone   = htmlentities( $entryphone );
  $entryemail   = htmlentities( $entryemail );

$output->Text(
<<<EOT
<style>
div.class-container {
  border: 2px dashed #fff;
  background-color: #fff;
  padding-left:15px;
  padding-right:15px;
  padding-top:15px;
  padding-bottom:0px;
  font-family: geneva, verdana, trebuchet MS, trebuchet, verdana, arial, sans-serif;
  font-size: 15px;
  font-weight:bold;
  }

div.class-container table {
  font-size: 15px
}
</style>

<div style="width:785px;">
  <div style="float: right;text-align:left;font-size:18px;font-weight:900;color:#264ba0;width:300px;">
    $display_image_anchor_begin<img src="/images/contests/$display_image" width="$display_image_width" height="$display_image_height" border="0" style="padding-top:5px;">$display_image_anchor_end
  </div>

  <div style="text-align:center;font-size:18px;font-weight:900;font-style:italic;width:480px;">
    $the_big_print
  </div>

  <div class="class-container">
    <span style="font-size:20px">Enter to win now!<br /></span>
    For entry to be valid, fill out form completely.

    <br />
    <form action="/index.php" method="post">
      <input type="hidden" name="module" value="SubmitStuff">
      <input type="hidden" name="func" value="$contest_func">
      <input type="hidden" name="_submit_check" value="1"/>
      <table border="0">
        <tr><td>Name:</td><td><input name="entryname" size="50" maxlength="50" value="$entryname"></td></tr>
        <tr><td>Age:</td><td><input name="entryage" size="2" maxlength="2" value="$entryage"></td></tr>
        <tr><td>Grade:</td><td><input name="entrygrade" size="2" maxlength="2" value="$entrygrade"></td></tr>
        <tr><td>School:</td><td><input name="entryschool" size="50" maxlength="50" value="$entryschool"></td></tr>
        <tr><td>Address:</td><td><input name="entryaddress" size="50" maxlength="50" value="$entryaddress"></td></tr>
        <tr><td>City:</td><td><input name="entrycity" size="50" maxlength="50" value="$entrycity"></td></tr>
        <tr><td>State:</td><td><input name="entrystate" size="2" maxlength="2" value="$entrystate"></td></tr>
        <tr><td>Zip:</td><td><input name="entryzip" size="10" maxlength="10" value="$entryzip"></td></tr>
        <tr><td>Phone:</td><td><input name="entryphone" size="15" maxlength="15" value="$entryphone"></td></tr>
        <tr><td>E-Mail:</td><td><input name="entryemail" size="50" maxlength="50" value="$entryemail"></td></tr>
        <tr><td colspan="2">&nbsp;</td></tr>
        <tr><td colspan="2"><input type="submit" name="submit" value="submit"></td></tr>
      </table>
    </form>
    <div style="text-align:left;font-size:10px;font-weight:normal;width:430px;">
      The small print:<br />
      $the_small_print
    </div>
  </div>
</div>

EOT
);

  global $pnuser_googleAd;
  $output->Text( $pnuser_googleAd );

  return $output->GetOutput();
}

// ============================================================================================================
// ============================================================================================================
// ==  CONTESTS  ==============================================================================================
// ============================================================================================================
// ============================================================================================================

// 118 -- Germ Proof Your Kids
function submitstuff_user_viewgermproofyourkids()
{
  $contestid = 118;
  $contest_name = "Germ Proof Your Kids";
  $contest_func = "viewgermproofyourkids";

  //                1234567890123456789012345678901
  $display_image = "GermProof-display.gif";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "http://www.germproofyourkids.com";

  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win an autographed copy of<br />
    <i>Germ Proof Your Kids</i>
EOT;

  $the_small_print = <<<EOT
Winner will receive an autographed copy of <i>Germ Proof Your Kids - The Complete Guide to Protecting (Without Overprotecting) Your Family from Infection</i>.
No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian's permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. Winner will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}

/*
// 92 Olympic Athlete Photo
// olympicathletephoto
function submitstuff_user_viewolympicathletephoto()
{
  $contestid = 92;
  $contest_name = "Olympic Athlete Photo";
  $contest_func = "viewolympicathletephoto";

  //                1234567890123456789012345678901
  $display_image = "OlympicAthletePhoto-display.gif";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "";

  $the_big_print = <<<EOT
    Fill out this entry form and enter to win<br />
    an autographed photo of an Olympic Athlete!
EOT;

  $the_small_print = <<<EOT
    Winner will receive an autographed photo of an Olympic Athlete.
    No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. Winner will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}
*/

// 138 -- Nim's Island
function submitstuff_user_viewnimsisland()
{
  $contestid = 138;
  $contest_name = "Nim's Island Tickets";
  $contest_func = "viewnimsisland";

  //                1234567890123456789012345678901
  $display_image = "NimsIsland-display.jpg";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "http://www.nimsisland.com";

//           1         2         3         4
//  1234 67890 234 67890 234 67890 234 67890
  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win a Four-Pack of Tickets<br />
    to the preview of Nim's Island!
EOT;

  $the_small_print = <<<EOT
Winners will receive a family four-pack of tickets to a preview screening of Nim's Island at a local theater. No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Contest Sponsors and their dependants are not eligible to win. Winners will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below. <b>Please arrive to the theater at least one hour early! Seating is NOT guaranteed.</b>
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}

// ======================================================================================================================
// Contests May 2008
// ======================================================================================================================
// 148 Win a Wii           - Denver/Noco
// 149 Harkins Theatres    - Denver
// 150 Narnia Tickets      - Denver
// 151 Janet Stevens       - Denver/Noco
// 152 Kung Fu Panda       - Denver
// 153 My Mom's Not Cool   - Denver
// 154 ICE Tickets         - Noco only
// 155 Annie               - Noco only

// 155 -- Annie
function submitstuff_user_viewannie()
{
  $contestid = 155;
  $contest_name = "Annie";
  $contest_func = "viewannie";

  //                1234567890123456789012345678901
  $display_image = "Annie-display.gif";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "http://www.greeleygov.com/UCCC/Events.aspx";

//           1         2         3         4
//  1234 67890 234 67890 234 67890 234 67890
  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win a pair of tickets<br />
    to the Broadway Musical "Annie"<br />
    at the Union Colony Center in Greeley!
EOT;

  $the_small_print = <<<EOT
Ten winners will each receive a pair of tickets to the Broadway Musical "Annie" at the Union Colony Center in Greeley. No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. Winners will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}



// 156 -- Nim's Island DVD
function submitstuff_user_viewnimsislanddvd()
{
  $contestid = 156;
  $contest_name = "Nim's Island DVD";
  $contest_func = "viewnimsislanddvd";

  //                1234567890123456789012345678901
  $display_image = "NimsIslandDVD-display.jpg";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "http://www.nimsisland.com";

//           1         2         3         4
//  1234 67890 234 67890 234 67890 234 67890
  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win Nim's Island on DVD!<br />
EOT;

  $the_small_print = <<<EOT
Five Winners will each receive a copy of Nim's Island on DVD from FOX Entertainment, to be released this August. No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. Winners will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}

// 157 -- Elmo's World: Summer Vacation DVD
function submitstuff_user_viewelmosworldsummervacationdvd()
{
  $contestid = 157;
  $contest_name = "Elmo's World: Summer Vacation DVD";
  $contest_func = "viewelmosworldsummervacationdvd";

  //                1234567890123456789012345678901
  $display_image = "ElmosWorld-display.jpg";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "http://www.sesameworkshop.org/sesamestreet/elmosworld/";

//           1         2         3         4
//  1234 67890 234 67890 234 67890 234 67890
  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win Elmo's World:<br >
    Summer Vacation DVD<br />
EOT;

  $the_small_print = <<<EOT
Five Winners will each receive a copy of Elmo's World: Summer Vacation bouncing onto DVD June 24 from Genius Products and Sesame Workshop No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. Winners will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}

// 158 -- Family Travel Pack
function submitstuff_user_viewfamilytravelpack()
{
  $contestid = 158;
  $contest_name = "Family Travel Pack";
  $contest_func = "viewfamilytravelpack";

  //                1234567890123456789012345678901
  $display_image = "FamilyTravelPack-display.gif";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "";

//           1         2         3         4
//  1234 67890 234 67890 234 67890 234 67890
  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win a Family Travel Pack<br />
    filled with goodies for the road!
EOT;

  $the_small_print = <<<EOT
Two Winners will each receive a family travel pack filled with goodies for the road. No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. Winners will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}

// 159 -- Prizes All Summer Long!
function submitstuff_user_viewprizesallsummerlong()
{
  $contestid = 159;
  $contest_name = "Prizes All Summer Long!";
  $contest_func = "viewprizesallsummerlong";

  //                1234567890123456789012345678901
  $display_image = "PrizesAllSummerLong-display.jpg";
  $display_image_width = "300";
  $display_image_height = "388";

  $display_image_link = "";

//           1         2         3         4
//  1234 67890 234 67890 234 67890 234 67890
  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win great prizes<br />
    All Summer Long!
EOT;

  $the_small_print = <<<EOT
Winners will each receive passes/gift certificates to a local venue, theatre, show, museum, retail shop, restaurant and more! No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. One winner will be drawn at random on Friday of each week June 6 through August 29, and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}

// 160 -- WALL-E Screening & Prize Package!
function submitstuff_user_viewwallescreening()
{
  $contestid = 160;
  $contest_name = "WALL-E Screening & Prize Package!";
  $contest_func = "viewwallescreening";

  //                1234567890123456789012345678901
  $display_image = "WallE-display.jpg";
  $display_image_width = "300";
  $display_image_height = "450";

  $display_image_link = "http://www.wall-e.com";

//           1         2         3         4
//  1234 67890 234 67890 234 67890 234 67890
  $the_big_print = <<<EOT
    Fill out this entry form and<br />
    enter to win a Family Four-Pack of <br />
    Tickets to a WALL-E Screening!<br />
    You could also win a WALL-E prize package!
EOT;

  $the_small_print = <<<EOT
Enter to win a family four-pack of tickets to the WALL-E Screening! You could also win a WALL-E prize package! Winners will receive a family four pack of tickets to a pre-screening of Wall-E. One winner will also receive a Wall-E prize pack. Seating is not guaranteed. Please arrive to the theatre at least one hour before showtime. No purchase necessary to enter. Legal residents of the 50 United States may enter. Entrants under age 18 must have a parent or legal guardian’s permission to enter. Limit one online entry per person or email address per day per internet location. Contest Sponsors and their dependants are not eligible to win. Winners will be drawn at random and mailed their prize. For complete Official Rules for Online Contests, please click on the link below.
EOT;

  return submitstuff_user_handle_contest( $contestid, $contest_name, $contest_func, $display_image_link,
                                          $display_image, $display_image_width, $display_image_height,
                                          $the_big_print, $the_small_print );
}

?>
