Ok so basically an old friend of mine rewrote my sites code (so its more professional) but I have no freaken idea whats what anymore and things always have errors now when I try to do the most basic functions.
So anyways here is my header file, I believe this is where I need to define the javascript...
<?php
if( !defined('IN_SITE') )
{
exit;
}
if( !defined('NO_ACCEPT_XHTML_HEADER') )
{
/* Accept-header Code by NeoThermic (www.neothermic.com). Modified as needed by MHobbit or David McKim. */
$accept_header = explode( ',', $_SERVER["HTTP_ACCEPT"]);
$xhtml_value = preg_grep( '/^application\/xhtml\+xml(;q=(0\.\d{1,5}|1\.0|[01]))?$/i', $accept_header);
$xhtml_value = array_values($xhtml_value); // reset the keys
if (count($xhtml_value) == 0)
{
$xhtmlxml = floatval(0.0); //if you're not specified anywhere, you don't support it
}
else
{
// now parse the XHTML value found for any q-value
if ( strpos($xhtml_value[0], 'q') === FALSE )
{
// with no q-value explicitly set, then your XHTML support is 1
$xhtmlxml = floatval(1.0);
}
else
{
// with one specified, lets obtain it
$qloc = strpos($xhtml_value[0], 'q');
$qvalue = substr($xhtml_value[0], $qloc + 2 ); //we add two to skip past the = sign
$xhtmlxml = floatval($qvalue);
}
}
//now do the above but for text/html
$html_value = preg_grep( '/^text\/html(;q=(0\.\d{1,5}|1\.0|[01]))?$/i', $accept_header);
$html_value = array_values($html_value); //reset the keys
if (count($html_value) == 0)
{
$texthtml = floatval(0.0); // if you're not specified anywhere, you dont' support it
}
else
{
// now parse the HTML value found for any q-value
if ( strpos($html_value[0], 'q') === FALSE )
{
// with no q-value explicitly set, then your HTML support is 1
$texthtml = floatval(1.0);
}
else
{
// with one specified, let's obtain it
$qloc = strpos($html_value[0], 'q');
$qvalue = substr($html_value[0], $qloc + 2 ); // we add two to skip past the = sign
$texthtml = floatval($qvalue);
}
}
if ($xhtmlxml > $texthtml || ($xhtmlxml == $texthtml && $texthtml > 0))
{
header("Content-type: application/xhtml+xml");
}
else
{
header("Content-type: text/html; charset=UTF-8");
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<!-- GWP Site -->
<!-- Copyright (c) 2006 GarbageWars Productions. All rights reserved. -->
<!-- http://www.garbagewars.com -->
<head>
<title><?php echo PAGE_TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="./css/main.css" />
<link rel="stylesheet" type="text/css" href="./css/advertise.css" />
<link rel="stylesheet" type="text/css" href="./css/art.css" />
<link rel="stylesheet" type="text/css" href="./css/comics.css" />
<link rel="stylesheet" type="text/css" href="./css/contacts.css" />
<link rel="stylesheet" type="text/css" href="./css/donate.css" />
<link rel="stylesheet" type="text/css" href="./css/fanwork.css" />
</head>
<body>
<div id="wrapper">
<div id="header" align="center">
<div id="topmenu">
<ul>
<li class="first-li">
<a href="http://www.garbagewars.com"><img src="./images/site/buttons/home.png" alt="Home" /></a></li>
<li><a href="./comics.php"><img src="./images/site/buttons/comics.png" alt="Comics" /></a></li>
<li><a href="./art.php"><img src="./images/site/buttons/art.png" alt="Art" /></a></li>
<li><a href="./shop/"><img src="./images/site/buttons/shop.png" alt="Shop" /></a></li>
<li><a href="./extras.php"><img src="./images/site/buttons/extras.png" alt="Extras" /></a></li>
<li><a href="./contacts.php"><img src="./images/site/buttons/contacts.png" alt="Contacts" /></a></li>
<li><a href="./links.php"><img src="./images/site/buttons/links.png" alt="Links" /></a></li>
</ul>
</div>
</div>
<div id="gutter"></div>
Ok so that was the header file, here is the actual javascript that I would like to get to work on my site... It's basically part of google ads...
<script type="text/javascript"><!--
google_ad_client = "pub-5156575382192626";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as_rimg";
google_cpa_choice = "CAAQhfCXhAIaCJM442ipyzWdKPG193M";
google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
I hope someone out there can help me, if someone really would like to help me even further so that I can actually update my site and understand things. Just pm me and I will give you temporary ftp access. Im seriously in need of assistance, I cant update my site at all anymore without getting freaking xml errors.