Thanks for the help, i got the box to pull up the info I needed. Now the other problem I have is, when I add this code into my php page, it takes over the whole page and the other page just disappears, it doesnt seem to matter where i put it, its supposed to be a float box. I have it working on a test php page and it works fine, however i cant get it to work on this particular page
?>
<div id="floatdiv" style="
position:relative;
width:150px;height:150px;top:10px;left:10px;
padding:16px;background:#FF7722 ;
border:2px solid #2266AA;
z-index:100">
<?
echo "<b><strong><center><font size='3'>Click pic to connect to<br><font color='blue'> ".$uname." ".$ulname."<br><a href='http://en.gravatar.com/".$usname." ' target='_POP'>".$newimg."</a> <br>".$team."";
?></center>
I am trying to add it to something like this:
<?
require_once "inc/filter.php";
include "surfbarColors.php";
session_start();
include "inc/userauth.php";
include('getimage.php');
$userid = $_SESSION["userid"];
require_once "lhuntfunctions.php";
if ($_SESSION["refreshcount"] > 2) {
//Auto refresh detected
header("Location: members.php?mf=lo");
exit;
}
$getacctype = mysql_query("Select status, mtype, lastclick, clickstoday from `".$prefix."members` where Id=$userid limit 1");
$acctype = mysql_result($getacctype, 0, "mtype");
$accstatus = mysql_result($getacctype, 0, "status");
$lastclicktime = mysql_result($getacctype, 0, "lastclick");
$clickstoday = mysql_result($getacctype, 0, "clickstoday");
if ($accstatus == "Suspended") {
header("Location: members.php?suspended=yes");
exit;
}
$_SESSION["prefix"] = $prefix;
include("sfunctions.php"); //Main functions
include("smfunctions.php"); //Member functions
include("surfoutput.php"); //Output functions
$gettimer = mysql_query("Select surftimer from `".$prefix."membertypes` where mtid=$acctype limit 1");
$timer = mysql_result($gettimer, 0, "surftimer");
$getdefaults = mysql_query("Select defurl from `".$prefix."settings` limit 1");
$defaultsite = mysql_result($getdefaults, 0, "defurl");
$getframebreak = mysql_query("Select framebreakblock from `".$prefix."settings` limit 1");
$framebreakblock = mysql_result($getframebreak, 0, "framebreakblock");
if ($framebreakblock == 1 && $_GET['framecatch'] == "yes") {
//Frame Breaker Detected
$newsite = "framebreakcatch.php";
} else {
// Check the last click
checkautoassign($userid, $acctype);
if (!isset($_POST['x']) || !is_numeric($_POST['x'])) {
$_SESSION['sysmess'] = "<span style=\"color: blue;\"><b>Starting surf session</b></span>";
$_SESSION["refreshcount"] = $_SESSION["refreshcount"]+1;
$_SESSION["siteviewed"] = 0;
$_SESSION["clickcount"] = 0;
$_SESSION["checkletter"] = 0;
} elseif ($lastclicktime > (time()-$timer)) {
//Multiple browsers detected
@mysql_query("Update `".$prefix."members` set lastclick=0 where Id=$userid limit 1");
header("Location: members.php?mf=lo");
exit;
} elseif (($_POST['x'] < $_SESSION['mincorrect']) || ($_POST['x'] > $_SESSION['maxcorrect'])) {
$_SESSION["refreshcount"] = 0;
$_SESSION["checkletter"] = 0;
wrongclick($userid);
} elseif ($_POST['barcode'] != $_SESSION['surfbarkey']) {
$_SESSION['sysmess'] = "<span style=\"color: red;\"><b>Verification error</b></span>";
$_SESSION["refreshcount"] = 0;
$_SESSION["siteviewed"] = 0;
$_SESSION["checkletter"] = 0;
} elseif (($_POST['x'] >= $_SESSION['mincorrect']) && ($_POST['x'] <= $_SESSION['maxcorrect'])) {
$_SESSION["refreshcount"] = 0;
$_SESSION["clickcount"] = $_SESSION["clickcount"] + 1;
$_SESSION["checkletter"] = 1;
creditmember($userid, $acctype,$creditColor);
} else {
$_SESSION['sysmess'] = "<span style=\"color: blue;\"><b>Starting surf session</b></span>";
$_SESSION["refreshcount"] = $_SESSION["refreshcount"]+1;
$_SESSION["siteviewed"] = 0;
$_SESSION["clickcount"] = 0;
$_SESSION["checkletter"] = 0;
}
//Startpage
$url = '';
$startpageshow = "no";
if ($_SESSION['startpage']==0) {
$m = mysql_query("SELECT * FROM ".$prefix."startpage_settings;");
extract(mysql_fetch_array($m));
if($enable) {
$startpageshow = "yes";
$t = time();
$m = mysql_query("SELECT id,url,lastview FROM ".$prefix."startpage WHERE `from`<$t AND `to`>$t;");
$rows = mysql_num_rows($m);
if(mysql_num_rows($m)) {
// startpage found - get url and update stats
extract(mysql_fetch_array($m));
if($url>'') {
$_SESSION['startpage'] = 2;
if(date("j",$lastview)<>date("j",$t)) {
@mysql_query("Delete from ".$prefix."startpage_stats WHERE sid != $id");
@mysql_query("OPTIMIZE TABLE ".$prefix."startpage_stats");
mysql_query("UPDATE ".$prefix."startpage SET viewstoday=0, uniquetoday=0 WHERE id=$id;");
}
mysql_query("UPDATE ".$prefix."startpage SET viewstoday=viewstoday+1,views=views+1,lastview=$t,lastusrid=$userid WHERE id=$id;");
$m = mysql_query("SELECT id FROM ".$prefix."startpage_stats WHERE sid=$id AND usrid=$userid");
if(mysql_num_rows($m)) {
$sid = mysql_result($m,0);
mysql_query("UPDATE ".$prefix."startpage_stats SET views=views+1 WHERE id=$sid");
} else {
mysql_query("INSERT INTO ".$prefix."startpage_stats (sid,usrid,views,lastview) VALUES ($id,$userid,1,$t)");
mysql_query("UPDATE ".$prefix."startpage SET totalunique=totalunique+1, uniquetoday=uniquetoday+1 WHERE id=$id");
}
} else {
//Get Default
$getdefault = mysql_query("Select * from ".$prefix."startpage_settings");
$url = mysql_result($getdefault, 0, "default");
$_SESSION['startpage'] = 2;
//End Get Default
}
} else {
//Get Default
$getdefault = mysql_query("Select * from ".$prefix."startpage_settings");
$url = mysql_result($getdefault, 0, "default");
$_SESSION['startpage'] = 2;
//End Get Default
}
}
}
//End startpage
if ($url != "") {
//Show startpage
$newsite = $url;
$_SESSION['currentsite'] = $newsite;
$startpageshow = "yes";
@mysql_query("Update `".$prefix."members` set lastview=currentview, currentview=0 where Id=$userid limit 1");
} else {
//Check for a bonus page
$checkbonus = mysql_query("Select url from `".$prefix."bonuspages` where (accid=0 or accid=$acctype) and (shownum=$clickstoday or (showtype=1 and ($clickstoday%shownum=0))) limit 1");
if (mysql_num_rows($checkbonus) > 0) {
//Show Bonus
$_SESSION['bonuscode'] = rand(100,10000);
$sbonuscode = md5($_SESSION['bonuscode']);
$newsite = mysql_result($checkbonus, 0, "url");
if(strpos($newsite, "?") === false) {
$newsite .= "?securecode=".$sbonuscode;
} else {
$newsite .= "&securecode=".$sbonuscode;
}
$_SESSION['currentsite'] = $newsite;
@mysql_query("Update `".$prefix."members` set lastview=currentview, currentview=0 where Id=$userid limit 1");
} else {
//Check for a word search claim page
$checkclaimpage = mysql_query("Select value from ".$prefix."wssettings where field='claimpage' limit 1");
$claimpage = mysql_result($checkclaimpage, 0, "value");
if (($claimpage == 1) && (checkforclaimpage($userid) == 1)) {
$newsite = "letterhuntpage.php";
$_SESSION['currentsite'] = $newsite;
@mysql_query("Update `".$prefix."members` set lastview=currentview, currentview=0 where Id=$userid limit 1");
} else {
// Get a new site
$newsite = getsite($userid, $defaultsite);
$_SESSION['currentsite'] = $newsite;
$getnewsiteid = mysql_query("Select id from `".$prefix."msites` where url='".$newsite."' limit 1");
if (mysql_num_rows($getnewsiteid) > 0) {
$newsiteid = mysql_result($getnewsiteid, 0, "id");
@mysql_query("Update `".$prefix."members` set lastview=currentview, currentview=".$newsiteid." where Id=$userid limit 1");
} else {
@mysql_query("Update `".$prefix."members` set lastview=currentview, currentview=0 where Id=$userid limit 1");
}
}
}
}
} // End Frame Break Catch
$surfcode = md5(rand(100,10000));
$_SESSION['surfingkey'] = $surfcode;
$output = "<html>
<script language=\"javascript\">
if (top.location != self.location) {
top.location.href=location.href;
}
top.window.moveTo(0,0);
top.window.resizeTo(screen.availWidth,screen.availHeight);
";
if ($framebreakblock == 1) {
$output .= "var legitclick=0;
function frameCatcher() {
if (legitclick==0) {
window.top.location.href = 'surfing.php?framecatch=yes';
return false;
}
}
function addEvent (elm, evType, fn, useCapture) {
if (elm.addEventListener) {
elm.addEventListener (evType, fn, useCapture);
return true;
} else if (elm.attachEvent) {
var r = elm.attachEvent('on' + evType, fn);
return r;
} else {
elm['on' + evType] = fn;
}
}
addEvent (window, 'unload', frameCatcher, false);
";
}
$output .= "</script>";
if (($startpageshow == "yes") && ($showbar == 1)) {
$output .= "<frameset rows=\"80,40,*,47\" border=\"0\" >
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\" noresize border=\"0\" src=\"surfbar.php?surfcode=$surfcode\">
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\" noresize border=\"0\" src=\"startpagebar.php\">
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" noresize border=\"0\" src=\"$newsite\" />
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\" noresize border=\"0\" src=\"surfbarfooter.php\">
</frameset>
</html>";
} else {
$output .= "<frameset rows=\"80,20,*,47\" border=\"0\">
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\" noresize border=\"0\" src=\"surfbar.php?surfcode=$surfcode\">
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\" noresize border=\"0\" src=\"bar2.php\">
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"auto\" noresize border=\"0\" src=\"$newsite\">
<frame marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\" noresize border=\"0\" src=\"surfbarfooter.php\">
</frameset>
</html>";
}
$encryptsurf = mysql_result(mysql_query("Select encrypt from `".$prefix."anticheat` where id=1"), 0);
if ($encryptsurf == 1) {
$output = str_replace("
", "", $output);
surfoutput($output);
} else {
echo($output);
}
exit;
?>