Hi
Sorry about all the code but thought I should include it to show you what I mean. I'm in the process of optomising a new site to include Adsense - the problem is that my Meta tags are positioned near the bottom of the page [i've hightlighted these in bold] with a load of php code on top of them.
I'm concerned that the Ads I will get will be based on the php and will not be influenced by my meta tags. I've run an Adsense test at
Adsense Sandbox and it returns ads for authentication and password protection which is not what I want.
Does the position of the meta tags effect the ads adsense returns and if so are the metatags better at the top of the page?
Is it possible to move the meta tags and what code would I need to include and where should I put it?
Hope this make sense and thanks for any help.
__________________________________________________ ______________
<?
include("connection.php");
include("functions.php");
$ses_username=$HTTP_SESSION_VARS["ses_username"];
$subscribed=$HTTP_SESSION_VARS["subscribed"];
$windows=0;
if(!isset($cmd))$cmd=1;
switch($cmd)
{
case 1:$file="mainpage.php";
if(!empty($vote)&&(!empty($photoid)))
{
$id=$photoid;
if(isset($ratingcookie))
{
if(!(strpos($ratingcookie,"*$id*")===false))
{
$msg="You have already rated this!";
}
}
if(isset($vote))
{
if(isset($ratingcookie))
{
$ratingcookie=$ratingcookie."*$id*";
setcookie("ratingcookie",$ratingcookie);
}
else
{
$ratingcookie="*$id*";
setcookie("ratingcookie",$ratingcookie);
}
submitRating($id,$vote);
$msg="Your rating has been submitted!";
}
$username="";
}
break;
case 2:$file="signup.php";
if(isset($username))
{
$validcode="";
$sql="select * from members where username='$username'";
$res=mysql_query($sql);
if(mysql_num_rows($res))
{
$err=true;
}
else
{
$act=getSetting("AUTOSIGNUP");
if($act=="Y")
{
$active=1;
}
else
{
$active=0;
$validcode=generateCode();
}
$sql="insert into members(username,password,email,age,gender,about,c ity,country,msn,active,aol,yahoo,icq,fname,lname,c ommentemail,messageemail,validcode,joindate) values('$username','$password','$email',$age,'$gen der','$about','$city','$country','$msn',$active,'$ aol','$yahoo','$icq','$fname','$lname','$commentem ail','$messageemail','$validcode',now())";
$res=mysql_query($sql);
$uniqid=mysql_insert_id();
if($act=="Y")
{
$template=getTemplate("NEWMEMBER");
$template=str_replace("%username%",$username,$template);
$template=str_replace("%password%",$password,$template);
sendHTMLmail($adminemail,$email,"Welcome to $urldomain",$template);
$newmember=true;
$file="login.php";
}
else
{
$template=getTemplate("EMAILVALIDATION");
$template=str_replace("%username%",$username,$template);
$template=str_replace("%password%",$password,$template);
$template=str_replace("%validcode%",$validcode,$template);
sendHTMLmail($adminemail,$email,"Validation Code from $urldomain",$template);
$file="validcode.php";
}
}
}
break;
case 3:$file="login.php";
if(isset($username))
{
$sql="select password,active,subscribed from members where username='$username'";
$result=mysql_query($sql);
while($row=mysql_fetch_array($result))
{
$dbpass=$row[0];
$active=$row[1];
$subscribed=$row[2];
}
if($dbpass==$password)
{
if($active==2)
{
$error="wu";
$file="login.php";
}
else if($active==0)
{
$file="validcode.php";
}
else
{
session_start();
$ses_username=$username;
if($subscribed=="")$subscribed="N";
session_register("ses_username");
session_register("subscribed");
if(empty($repusername)&&empty($rphid))
{
$username="";
$file="mainpage.php";
}
else if(!empty($repusername))
{
$username=$repusername;
$file="sendmessage.php";
}
else if(!empty($rphid))
{
$phid=$rphid;
$file="postcomment.php";
}
}
}
else
{
$error="wu";
$file="login.php";
}
}
break;
case 4:$file="validcode.php";
if(isset($username))
{
$sql="select * from members where username='$username' and password='$password' and validcode='$validcode'";
$result=mysql_query($sql);
if(mysql_num_rows($result))
{
$sql="update members set active=1 where username='$username'";
$updated=true;
mysql_query($sql);
session_start();
$ses_username=$username;
$subscribed="N";
session_register("ses_username");
session_register("subscribed");
$username="";
$file="mainpage.php";
}
else
{
$error="wu";
}
}
break;
case 5:$file="editprofile.php";
include("checksession.php");
if(isset($password))
{
if($commentemail=="")$commentemail="N";
if($messageemail=="")$messageemail="N";
$sql="update members set password='$password',email='$email',age=$age,gende r='$gender',about='$about',city='$city',country='$ country',msn='$msn',aol='$aol',yahoo='$yahoo',icq= '$icq',fname='$fname',lname='$lname',commentemail= '$commentemail',messageemail='$messageemail' where username='$ses_username'";
$updated=true;
mysql_query($sql);
}
break;
case 6:$file="myphotos.php";
include("checksession.php");
$cntarr=getPics($ses_username);
$totcnt=$cntarr[0]+$cntarr[1];
$maxpics=getSetting("MAXPICTURES");
if(($subscribed=="Y")&&(getSetting("SUBSCRIPTIONS")=="Y"))
{
$maxpics=getSetting("SUBSCRIBERMAXPICTURES");
}
if(isset($addpic)&&($totcnt<$maxpics))
{
$approved=getSetting("APPROVEPIC");
if(!empty($url))
{
$sql="insert into photos(url,filename,username,upldate,approved) values('$url','$filename','$ses_username',now(),'$ approved')";
$res=mysql_query($sql);
}
else if(!empty($uppic_name))
{
$maxpicsize=getSetting("MAXPICSIZE");
$allowable=getSetting("ALLOWEDFORMATS");
$allowablearr=split(",",$allowable);
$allowedType=0;
$ext=strchr($uppic_name,".");
if(in_array($ext,$allowablearr)){$allowedType=1;}e lse {$uperror="Format Not Supported!";}
if((filesize($uppic)>($maxpicsize*1024))&&($allowedType==1))
{
$allowedType=0;
$uperror="The size of the image is above the limit!";
}
if($allowedType==1)
{
$fileid=generateShortCode();
$filename=$ses_username.$fileid.$ext;
$copytofile="pics/$filename";
if((getSetting("WATERMARKIMAGES")=="N"))
{
copy($uppic,$copytofile);
}
else
{
require("phpWatermark.inc.php");
$wm = new watermark($uppic);
$wm->setPosition(getSetting("WATERMARKPOS"));
$color[0]=0;
$color[1]=0;
$color[2]=0;
$wm->setFixedColor($color);
$wm->addWatermark("images/watermark.gif","IMAGE");
$im = $wm->getMarkedImage();
if(($ext==".gif")||($ext==".GIF"))
{
imagePNG($im,$copytofile);
}
else
{
imagejpeg($im,$copytofile);
}
}
if($windows==0)
{
require("hft_image.php");
$original_image =$copytofile;
$desired_width =getSetting("MAXPICWIDTH");
$image = new hft_image($original_image);
if($image->image_original_width>$desired_width)
{
$image->resize($desired_width, "*", '-');
if(($ext==".gif")||($ext==".GIF"))
{
$image->output_resized($copytofile, "GIF");
}
else
{
$image->output_resized($copytofile, "JPG");
}
}
}
@unlink($uppic);
$sql="insert into photos(url,filename,username,upldate,approved) values('$url','$filename','$ses_username',now(),'$ approved')";
$res=mysql_query($sql);
}
}
if($approved=="Y")
{
$error="Image has been added.";
}
else if($error=="")
{
$error="Image is awaiting approval.";
}
}
break;
case 7:$file="inbox.php";
include("checksession.php");
if(($subscribed=="N")&&(getSetting("SUBSCRIPTIONS")=="Y")&&(getSetting("INBOXONLYFORSUBSCRIBERS")=="Y"))
{
$file="upgrade.php";
}
if(isset($rowcount))
{
for($i=0;$i<$rowcount;$i++)
{
if(isset($chk[$i]))
{
$sql="delete from messages where messagesid=$chk[$i]";
mysql_query($sql);
}
}
}
break;
case 8:$file="viewmessage.php";
if(isset($delid))
{
$sql="delete from messages where messagesid=$delid";
mysql_query($sql);
$cnarr=getPrevNextMessages($delid);
$nextid=$cnarr[1];
if($nextid==0)
{
$file="inbox.php";
}
else
{
$msgid=$nextid;
}
}
include("checksession.php");
break;
case 9:$file="replymessage.php";
include("checksession.php");
if(isset($tousername))
{
$sql="insert into messages(message,fromusername,tousername,upldate,s ubject) values('$message','$ses_username','$tousername',no w(),'$subject')";
newMessageSent($ses_username,$tousername);
$res=mysql_query($sql);
$mheading="Message sent";
$mmessage="Your message has been sent to $tousername";
$file="displaymessage.php";
}
break;
case 10:$file="viewpics.php";
break;
case 11:$file="searchresults.php";
break;
case 12:$file="postcomment.php";
$rphid=$phid;
include("checksession.php");
if(isset($comment))
{
$approved=getSetting("APPROVECOMMENTS");
$sql="insert into comments(comment,photosid,byusername,approved,post date) values('$comment',$phid,'$ses_username','$approved ',now())";
newCommentPosted($ses_username,$phid);
$res=mysql_query($sql);
$mheading="Comments saved";
$mmessage="Your comments has been saved!";
$file="displaymessage.php";
}
break;
case 19:$file="sendmessage.php";
$repusername=$username;
include("checksession.php");
break;
case 20:$file="viewprofile.php";
if(($subscribed=="N")&&(getSetting("SUBSCRIPTIONS")=="Y")&&(getSetting("PROFILEONLYFORSUBSCRIBERS")=="Y"))
{
$file="upgrade.php";
}
if($subscribed=="")
{
include("checksession.php");
}
break;
case 21:$file="myphotos.php";
include("checksession.php");
$sql="select * from photos where photosid=$id";
$res=mysql_query($sql);
while($obj=mysql_fetch_object($res))
{
if($obj->filename!="")@unlink("pics/$obj->filename");
}
$sql="delete from photos where photosid=$id";
$res=mysql_query($sql);
break;
case 22:
session_destroy();
$ses_username="";
$username="";
$file="mainpage.php";
break;
case 23:
$file="upgrade.php";
break;
}
?>
<html>
<head>
<title>India Beauty and Love</title>
<meta name="keywords" content="india,dating,matrimony,bride,love,beauty,digital camera,cool">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="stylesheet.css" type="text/css">
</head>
<body leftmargin="0" rightmargin="0" bottommargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div align="left">
<? include("header.php"); ?>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="30%" align="left" valign="top">
<? include("sidelinks.php"); ?>
</td>
<td width="80%" align="left" valign="top">
<? include($file);
?>
</td>
</tr>
</table>
<br>
</div>
<div align="left">
<? include("footer.php"); ?>
</body>
</html>
<? include("conclose.php"); ?>