$v ) { $$k = $v; } // Define useful constants: //define('STRIPE_PRIVATE_KEY', 'las;dkjf2l3;nslkj'); //define('STRIPE_PUBLIC_KEY', 'Lln;4k2;(jas;ldfkj)'); //define('STRIPE_PRIVATE_KEY', 'sk_test_Tsozpy1Q2sg867P6XIFskJVb' ); //define('STRIPE_PUBLIC_KEY', 'pk_test_a1OZTygWb3zPPwkA8zVfbAz8' ); define('STRIPE_PRIVATE_KEY', 'sk_live_f5WPLtmvk7QGsWiZe7T9na8z' ); define('STRIPE_PUBLIC_KEY', 'pk_live_UtCyfSwCiQAhtEuO0lDLJSvd' ); $dbhost = "localhost"; $dbuser = "database1"; $dbpass = "9sdqke3d"; //$debug = 1; $refresh = 86400; $ses = "daisy"; session_set_cookie_params( $refresh, "/", ".topekaduckrace.org", 1 ); session_name( $ses ); session_start( ); if ( isset( $_COOKIE[$ses] ) ) setcookie( $sees, $_COOKIE[$ses], time() + $refresh, "/", '.topekaduckrace.org', 1 ); define( "SITE", $site_base ); require_once( SITE . '/master.inc/db.php' ); require_once( SITE . '/master.inc/common.php' ); define( "DYN", SITE . '/dynamic.inc' ); define( "INC", SITE . '/includes' ); require_once( DYN . '/functions.php' ); require_once( DYN . '/15template.php' ); define( "MID", "1AE35B66-DF38-4B12-B953-6BAB0F92E88E" ); $prodDucks = array( 'lone' => 5, 'family' => 20, 'flock' => 50, 'oodles' => 100 ); $script_URI = '/rally/index.php'; $handler_script_URI = '/rally/submit_handler.php'; //if ($_SERVER['REMOTE_ADDR'] == "216.116.252.50") $debug = true; /* Fixing a wrong in the php.ini file */ /* Allowing reading of post variables */ /* Not necessary on datapipe if (empty($do) && empty($_SERVER['QUERY_STRING'])) { foreach($_POST as $key => $value) { $$key = $value; } } /* Allowing reading of query strings / /* Not necessary on datapipe / if (empty($do)) { $q_s = explode("&", $_SERVER['QUERY_STRING']); foreach($q_s as $key => $value) { list ($k, $v) = split("\=", $value); $$k = $v; } }*/ //if ( $_SERVER['REMOTE_ADDR'] == "157.130.160.46" ) $debug = true; //if ( date("Ymd") == 20110521 ) { //if ( $_SERVER['REMOTE_ADDR'] == '192.168.1.1' ) { if ($_SERVER['REMOTE_ADDR'] == "24.255.171.4" /* || $_SERVER['REMOTE_ADDR'] == "65.69.236.36" */ ) /* */ { // testing environment $debug = true; // $adopt_uri = '/adoptions_test.php'; $adopt_uri = '/adoptions'; $race_year = "20th"; $race_time = mktime (16, 0, 0, 9, 12, 2015); $race_date = date( "F jS, Y", $race_time ); $local = true; $endtime = mktime (15, 59, 0, 9, 11, 2016); // $rally_stage = true; // $sandbox_active = true; } else if ( date( "YmdHi" ) >= 201508311700 && date( "YmdHi" ) < 201508312000 ) { // maintenance environment $adopt_uri = '/adoptions'; $race_year = "20th"; $race_time = mktime (16, 0, 0, 9, 12, 2015 ); $race_date = date( "F jS, Y", $race_time ); $local = true; $endtime = mktime (1, 0, 0, 9, 12, 2015 ); $rally_stage = true; } else /* */ { // live environment $adopt_uri = '/adoptions'; $race_year = "20th"; $race_time = mktime (16, 0, 0, 9, 12, 2015 ); $race_date = date( "F jS, Y", $race_time ); $local = true; $endtime = mktime (8, 0, 0, 9, 12, 2015 ); // $rally_stage = true; } /* */ $init_goal = 150; if ( file_exists( SITE . '/die' ) ) { $endtime = mktime ( 0, 1, 0, 9, 11, 2009 ); // $ping = " o_O"; } if ( $sandbox_active ) $paypal_url = 'https://www.sandbox.paypal.com/'; else $paypal_url = 'https://www.paypal.com/'; //$race_grandprize = "2004 Mazda RX-8"; //$rally_grandprize = "a party for 50 people at the Blind Tiger Brewery & Restaurant"; //$rally_grandprize = "a party for your team at Texas Roadhouse"; //$rally_grandprize = "a party provided by Texas Roadhouse in Topeka, KS"; $market_href = "http://topekaduckrace.org/adoptions/index.php?cPath=21&sort=2a&action=buy_now&products_id="; $market_img = "http://topekaduckrace.org/adoptions/images"; $ducks = array( 'duck-0001' => array( 1, 5, 'The lone duck', '91e3ef128af3470aae18e848547768a8' ), 'duck-0002' => array( 2, 10, 'Pair of 2 ducks', '812ffe03b3a84e5d8db401acb60ebefc' ), 'duck-0003' => array( 12, 50, 'Flock of 12 ducks' ), 'duck-0004' => array( 27, 100, 'Oodles of ducks (27)' ), 'duck-0005' => array( 5, 20, 'Family of 5 ducks', 'e145e0d77e82495bac8ef943e94f877d' ), 'duck-0012' => array( 12, 50, 'Flock of 12 ducks', 'cb9828cb78eb414299d296427f5ab846' ), 'duck-0014' => array( 14, 100, 'Test of 14 ducks' ), 'duck-0020' => array( 20, 100, 'Score of 20 ducks' ), 'duck-0027' => array( 27, 100, 'Oodles of ducks (27)', 'fa2add80260c4c8984370e42fff0a5a1' ), 'race-0001' => array( 1, 10, '1 mi lone duck', '5039679c5dd44c549c22f3f762dab03b' ), 'race-0005' => array( 1, 15, '5k lone duck', '4a0d672552d74dd2ae5b6dcba2bfbe1b' ) ); if ( $itemnumber ) { $duck_qty = $ducks[$itemnumber][0]; $duck_pri = $ducks[$itemnumber][1]; $duck_nam = $ducks[$itemnumber][2]; } $tiers = array( 'platinum' => array( array( 'fn' => 'ksnt_2015.png', 'uri' => "http://www.ksnt.com/" ), array( 'fn' => 'pbpnation.gif', 'uri' => "http://www.pbpindiantribe.com/" ), array( 'fn' => 'am580_wibw.png', 'uri' => "http://www.wibwnewsnow.com/" ), array( 'fn' => 'noller_ford.gif', 'uri' => "http://www.nollerautos.com/" ), array( 'fn' => 'wibw_fm.png', 'uri' => "http://www.94country.com/" ) ), 'gold' => array( array( 'fn' => 'sncoparks180x180.png', 'uri' => "http://parks.snco.us/" ), array( 'fn' => 'walmart_180x180.png', 'uri' => "http://www.walmart.com/" ), /* */ /* array( 'fn' => 'tx_roadhouse.gif', 'uri' => "http://www.texasroadhouse.com/" ), /* */ array( 'fn' => 'pepsi.png', 'uri' => "http://www.pepsi.com/" ) /* , array( 'fn' => 'bww.png', 'uri' => "http://www.buffalowildwings.com/" ) */ ) ); $last_site = $_SERVER['HTTP_REFERER']; //($cooked[key] == $keys[0] || $cooked[key] == $keys[1]) && //$cooky = read_cooky_data($_COOKIE); if (empty($_COOKIE['cjdr_duck_purchase'])) { $last_site = "secure.cjonline.com"; } else { // User didn't complete the ezcart form $_COOKIE['cjdr_duck_order'] = ""; // echo "we'll kill the other cookie's data if this is effective
"; } //if (preg_match("/\?complete/",$_COOKIE if (!empty($_COOKIE['cjdr_duck_order']) && $do != "confirm" && preg_match("/\?complete/",$_COOKIE['cjdr_duck_goose'])) { $value = rawurldecode($_COOKIE['cjdr_duck_order']); $value = ereg_replace(":","=",$value); $cooked = explode("|", $value); if (preg_match("/secure\.cjonline\.com/",$last_site)) { $blob = "\n"; foreach ($cooked as $v1) { list($k,$v) = split("=",$v1); $$k = $v; $blob .= "\n"; } $db_key = rawurldecode($key); $team_id = $team; blank_cookie(); } else { $blob = "\n"; // echo "um... i'm not matching what you think i should be...
"; blank_cookie(); } } else { // echo "\n"; // echo "um... i appear to have lost my cookies!
"; blank_cookie(); } /* Variables for loading data from database */ $db_host = 'localhost'; $db_name = 'sertoma'; //$stage = array('','adopt.php','adopt.php'); /* $duck_types = array('Lone Duck','Family of Ducks','Flock of Ducks','Oodles of Ducks'); $duck_types_sm = array('Lone','Family','Flock','Oodles'); $duck_prod_no = array('dk001-rally','dk002-rally','dk003-rally','dk004-rally'); $duck_quan = array('1','5','12','27'); $duck_price = array('5','20','50','100'); */ // Format: mktime (hh, mm, ss, mo, dd, yy, isdst //$endtime = mktime (12, 00, 00, 8, 23, 2003, 1); //$endtime = mktime (0, 00, 00, 9, 10, 2005, 1); //$endtime = mktime (0, 1, 0, 9, 9, 2006, 1); /* /if ($override) if ($_SERVER['REMOTE_ADDR'] == "157.130.160.46" || $_SERVER['REMOTE_ADDR'] == "68.102.174.101") $endtime = mktime (0, 1, 0, 9, 8, 2007, 1); //$endtime = mktime (12, 00, 00, 1, 1, 2005, 1);*/ // Comment below line out to launch game /*if ($endtime < time() || $do == "redirect") header("Location: http://topekaduckrace.org/"); */ if (($do == "admin_sendmail" || $do == "invite_admin")) $do = NULL; $admin_name = "Quacky"; $admin_email = "topekaduckrace@cjonlinedesign.com"; $whatami = "index.php"; /* Messages for events in the page */ $err_already_signed_up = "Um... you're already signed up as: , so I've logged you in."; $err_team_exists = "\" has already been entered. Do you want to buy ducks for this team?"; $err_no_player = "Um... no player exists by that name."; /* Email variables for the viral mailing campaign */ $subject = "Topeka Duck Race"; $message = " () invites you to join Quacky's Web Rally - a duck adoption competition for the $race_year Annual Great Topeka Duck Race, presented by Sertoma Clubs of Topeka. The team that adopts the most ducks wins $rally_grandprize! Purchase your adoption certificates today at the official race Web site: http://www.topekaduckrace.org/. ------------------------------------------------- ------------------------------------------------- Even if your team doesn't win the Web Rally, your adopted duck(s) could claim a terrific prize - like a $race_grandprize, shopping spree, theatre tickets, or a night on the town, just to name a few. The $race_year Annual Great Topeka Duck Race is $race_date at Lake Shawnee in Topeka, Kansas. Proceeds benefit Big Brothers & Big Sisters of Topeka & Sertoma Sponsorships. ********************************** Your email address was submitted for use by and will not be archived, sold or provided to any other source. No other messages will be sent to you unless other participants of the Web Rally submit this email address."; $promotion = "Quacky's Web Rally"; /* Salt for encryption algorhythms */ $salt = array('qw','er','ty','ui','op','as','df','gh','jk','lz','xc','vb'); /* Duck ordering information */ $prodnumbers = array('001','002','003','004'); $prodnames = array('Lone Duck','Family of 5 Ducks','Flock of 12 Ducks','Oodles of Ducks (27 Total)'); // echo intval($prodnumbers[0]); /* Text for instructions in the game */ /* $default_instructions = "

Quacky's Rally Rules

1 - Adopt as many ducks as you wish Done!

2 - Register to play

3 - Choose a team to play on, or create a new team for yourself

4 - Invite your friends, family & co-workers to join your team

5 - The team with the most duck adoptions on the day of the duck race WINS $rally_grandprize!

"; $default_right = "

\n "; $default_right = ( preg_match( "/purchased\.php$/", $PHP_SELF ) ) ? "

\n WAIT! Now that you've adopted, why not join a team or start your own?

" : "

\n Quacky's Web Rally

"; $default_right .= "

The team that adopts the most ducks for the $race_year Annual Sertoma Topeka Duck Race will win $rally_grandprize. So c'mon and join us for a little “fowl play”! NOTE: We are sorry, but if you fail to join a team, we cannot add you to one later.

"; $rally_instructions_09 = "

\nQuacky's Web Rally

\n\n"; $rally_instructions_09 .= "

The team that adopts the most ducks for the $race_year Annual Sertoma Topeka Duck Race will win $rally_grandprize. So c'mon and join us for a little “fowl play”!

\n\n"; $rally_instructions_09 .= "

\n
Proud Sponsor

\n\n"; $rally_instructions_09 .= "

NOTE: We are sorry, but if you fail to join a team, we cannot add you to one later.

\n\n"; $rally_right_09 = ( preg_match( "/purchased_*\.php$/", $_SERVER['SCRIPT_NAME'] ) ) ? "

Yes!

" : "

No! (" . $_SERVER['SCRIPT_NAME'] . ")

"; /*

NOTE: Quacky's Web Rally uses cookies. If your Internet security settings are too strict, your duck purchase may not be linked to your team.

*/ //$default_right2 = "Even if your team doesn't win, your adopted duck(s) could claim a terrific prize - like a PT Cruiser, shopping spree, theatre tickets, or a night on the town, just to name a few.

//Best of all, the proceeds from the Web Rally and Duck Race benefit Big Brothers & Big Sisters of Topeka and the Sertoma Clubs Sponsorships.

//So c'mon and join us for a little \"fowl play\"!"; /* $player_instructions = "All that we require is your name and email address, and we promise not to send you anything that you haven't requested. Well, ok, we'll probably send you a reminder next year when it's time to play the game again."; $team_right = "

Here are your options:

"; $team_right2 = "

After adopting your ducks, you'll have the ability to email invitations to friends & family.

"; $team_instructions = "

Q: Why would you want to start your own team?

A: You might want to challenge another department within your building, another business, or even someone in your own family!

"; $addteam_instructions = "

After your initial adoption, you'll be able to sign-in anytime and send additional invitations to recruit more teammates.

"; //$addteam_right = "If your team wins the Rally, you'll enjoy a party for 50 people at the Blind Tiger Brewery & Restaurant!"; $addteam_right = "

Bravo! You've chosen to captain your own Web Rally team! Just set an adoption goal (we're confident you'll take in 40 ducks or more under your wing), purchase at least one duck, and then start recruiting teammates.

"; $adopt_instructions = "

Your team is competing to win $rally_grandprize.

The team that adopts the most ducks wins!

"; /* ";*/ /* $adopt_right = "Waddle it be?"; $confirm_instructions = "

After placing your order through iShopTopeka.com, your browser will return to this site allowing you to invite friends & family to join Quacky's Web Rally.

"; $confirm_right = "

Please confirm your adoption request, or click \"modify order\" to make any necessary changes.

"; $confirm_right2 = "

After clicking \"place this order\", your browser will be forwarded to the secure shopping cart at iShopTopeka.com to place your order with a credit or debit card.

"; $invite_instructions = "Your adoptions have been added to the totals below."; $invite_right = "

Thank you for your order.

Now it's time to invite a flock of your friends to join the game. Just enter their email addresses, add a message if you wish (each invitation will include a brief explanation of the game) and click \"send invitations\".

The addresses you provide are used only one time and are not archived, sold, or provided to any other source. If you're a team captain, you can sign-in anytime and send additional invitations.

"; $invite_right2 = "

Ready to expand your flock?

Just enter their email addresses, add a message if you wish (each invitation will include a brief explanation of the game) and click \"send invitations\".

The addresses you provide are used only one time and are not archived, sold, or provided to any other source. If you're a team captain, you can sign-in anytime and send additional invitations.

"; $results_right = "

Your invitations are on their way!

Best of luck to you and your flock, and thanks again for helping the Sertoma Clubs of Topeka.

Team standings are updated every 15 minutes at www.TopekaDuckRace.org. Don't let your competition get ahead of you!

You can sign-in anytime to adopt more ducks... and if you happen to find yourself between \"a duck and hard place\" when someone else invites you to help their team, don't fret: you CAN adopt ducks for multiple teams.

"; $endgame_right = "

\n\nThank you for your interest in The Great Topeka Duck Race.

Online adoptions are now closed for the " . date( "Y", $race_time ) . " race.

Please join us next year!"; */ ?>