// connect to the database include("../../../dbscripts/dbConnect.php"); // we want a fresh load each time header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past // set this to change page title and database search! $projectTitle = 'Public Secrets'; // google analytics $googleAnalyticsCode = 'UA-767625-1'; // default: vectors.usc.edu if (strstr($_SERVER["HTTP_HOST"], "vectorsjournal.org")) $googleAnalyticsCode = 'UA-767625-2'; if (strstr($_SERVER["HTTP_HOST"], "vectorsjournal.net")) $googleAnalyticsCode = 'UA-767625-3'; if (strstr($_SERVER["HTTP_HOST"], "vectors.iml.annenberg.edu")) $googleAnalyticsCode = 'UA-767625-4'; $phpIsReferrerVectors = FALSE; if ($_GET['overrideReferrer'] == '1') $phpIsReferrerVectors = TRUE; if (!isset($_SERVER['HTTP_REFERER']) || empty($_SERVER['HTTP_REFERER'])) $phpIsReferrerVectors = TRUE; if (stristr($_SERVER['HTTP_REFERER'], "vectors.iml.annenberg.edu")) $phpIsReferrerVectors = TRUE; if (!$phpIsReferrerVectors && stristr($_SERVER['HTTP_REFERER'], "vectorsjournal.net")) $phpIsReferrerVectors = TRUE; if (!$phpIsReferrerVectors && stristr($_SERVER['HTTP_REFERER'], "vectorsjournal.org")) $phpIsReferrerVectors = TRUE; if (!$phpIsReferrerVectors && stristr($_SERVER['HTTP_REFERER'], "vectors.usc.edu")) $phpIsReferrerVectors = TRUE; if (!$phpIsReferrerVectors) { $projectW = $projectH = 0; $result = mysql_query("SELECT id, projectW, projectH, scrollbars, windowSameSize FROM projects WHERE title LIKE '%$projectTitle%' ORDER BY id DESC LIMIT 1"); $row = mysql_fetch_array($result); if (!empty($row['projectW'])) $projectW = $row['projectW']; if (!empty($row['projectH'])) $projectH = $row['projectH']; $scrollbars = $row['scrollbars']; $windowSameSize = $row['windowSameSize']; } ?>