<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 9/25/2014	ELL
// Modified: 2/12/2015	ELL
// Added reCAPTCHA API v.2.
// Moved definition of JS vars for public keys to this file.

	$mollom_path = $doc_root . "/php/mollom.php";
	$captchakeys_path = $doc_root . "/connect/captchakeys.php";
	
	include($captchakeys_path);
	echo "<script>\n";
	echo "	var recaptcha_site_key = '" . RECAPTCHA_SITE_KEY . "';\n";
	echo "	var recaptcha_public_key = '" . RECAPTCHA_PUBLIC_KEY . "';\n";
	echo "</script>\n";
	
	if ((defined('MOLLOM_PUBLIC_KEY')) && (defined('MOLLOM_PRIVATE_KEY')))
	{
		if ((MOLLOM_PUBLIC_KEY != '') && (MOLLOM_PRIVATE_KEY != ''))
		{
			require_once($mollom_path);
			
			// Set keys from connect/captchakeys.php
			Mollom::setPublicKey(MOLLOM_PUBLIC_KEY);
			Mollom::setPrivateKey(MOLLOM_PRIVATE_KEY);
		
			$servers = Mollom::getServerList();
			Mollom::setServerList($servers);
		
			// Get captcha
			$captcha = Mollom::getImageCaptcha();
		}
	}
?>