<?php 
exit();
error_reporting(0);
// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
//error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// this block here deals with the massive amount of hits from iambored.com
/*
$ref	= $_SERVER['HTTP_REFERER'];
$findme  = 'i-am-bored';
$pos = strpos($ref, $findme);
if ($pos > 0)
	{
   	echo "<h1>boredom is always counter-revolutionary.</h1>";
	exit;
	}
*/
include("deebee.php");
$mode = ($_POST['mode']);
$phrase = $_POST['phrase'];
if (!$phrase) { $phrase = $_GET['phrase']; }
$dbg = $_GET['dbg'];
if (!$dbg) {
	$dbg = 0;
}//
$phrase = stripslashes($phrase);
$font = "/var/www/html/CA/arial.ttf";
$sources = 21; // number of cartoon blocks
$phrases = array();
$redo = 0;
$fails = 0;
$attempts = 0;
include("functions.php");
	
if (!$phrase && !$dbg)
	{
	include("normal.php");
	
	exit;
	} 
//No Phrase, No cartoon!
$used = array();

if (!insertPhrase($phrase) && !$dbg)
	{
		include "nophrase.php";
		exit;
	}


include("classes.php");

$finished=1;
if ($mode == "pdf")
	{
	include("printit.php");
	}
else if ($dbg)
	{
	include("dbgtract.php");
	}
else
	{
include("anttract.php");
	}
mysqli_close($db);

?>
