lmcgr44 Posted March 30, 2011 Share Posted March 30, 2011 helllo when people visit my site the background of my site isnt there, but then the log in, it appears, so it only works when thye are logged in, can someone please look over y code and see why this is happening, i have been stuck on this for 1 week now <?php // Start_session, check if user is logged in or not, and connect to the database all in one included file include_once("scripts/checkuserlog.php"); // Include the class files for auto making links out of full URLs and for Time Ago date formatting include_once("wi_class_files/autoMakeLinks.php"); include_once ("wi_class_files/agoTimeFormat.php"); // Create the two objects before we can use them below in this script $activeLinkObject = new autoActiveLink; $myObject = new convertToAgo; ?> <?php // Include this script for random member display on home page include_once "scripts/homePage_randomMembers.php"; ?> <?php $sql_blabs = mysql_query("SELECT id, mem_id, send_id, the_blab, blab_date FROM blabbing ORDER BY blab_date DESC LIMIT 30"); $blabberDisplayList = ""; // Initialize the variable here while($row = mysql_fetch_array($sql_blabs)){ $blabid = $row["id"]; $uid = $row['send_id'] != 0 ? $row['send_id'] : $row['mem_id'] ; $the_blab = $row["the_blab"]; $notokinarray = array("fag", "gay", "shit", "fuck", "stupid", "idiot", "asshole", "cunt", "douche"); $okinarray = array("gaybo", "homosexual", "poo", "bugger", "dumb", "jerk", "sphincter", "vagina", "douche"); $the_blab = str_replace($notokinarray, $okinarray, $the_blab); $the_blab = ($activeLinkObject -> makeActiveLink($the_blab)); $blab_date = $row["blab_date"]; $convertedTime = ($myObject -> convert_datetime($blab_date)); $whenBlab = ($myObject -> makeAgo($convertedTime)); //$blab_date = strftime("%b %d, %Y %I:%M:%S %p", strtotime($blab_date)); // Inner sql query $sql_mem_data = mysql_query("SELECT id, username, firstname, lastname FROM myMembers WHERE id='$uid' LIMIT 1"); while($row = mysql_fetch_array($sql_mem_data)){ $uid = $row["id"]; $username = $row["username"]; $firstname = $row["firstname"]; if ($firstname != "") {$username = $firstname; } // (I added usernames late in my system, this line is not needed for you) /////// Mechanism to Display Pic. See if they have uploaded a pic or not ////////////////////////// $ucheck_pic = "members/$uid/image01.jpg"; $udefault_pic = "members/0/image01.jpg"; if (file_exists($ucheck_pic)) { $blabber_pic = '<div style="overflow:hidden; width:40px; height:40px;"><img src="' . $ucheck_pic . '" width="40px" border="0" /></div>'; // forces picture to be 100px wide and no more } else { $blabber_pic = "<img src=\"$udefault_pic\" width=\"40px\" height=\"40px\" border=\"0\" />"; // forces default picture to be 100px wide and no more } $blabberDisplayList .= ' <table width="100%" align="center" cellpadding="4" bgcolor="#CCCCCC"> <tr> <td width="7%" bgcolor="#FFFFFF" valign="top"><a href="profile.php?id=' . $uid . '">' . $blabber_pic . '</a> </td> <td width="93%" bgcolor="#EFEFEF" style="line-height:1.5em;" valign="top"><span class="greenColor textsize10">' . $whenBlab . ' <a href="profile.php?id=' . $uid . '">' . $username . '</a> said: </span><br /> ' . $the_blab . '</td> </tr> </table>'; } } ?> <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="Description" content="Cookbookers is a community website for people to create and share recipies, make friends or join up with old friends" /> <meta name="Keywords" content="cookbookers, cook, cookbook, cooks, chefs, chef, cookery, book, books, cooking, community, share, communicate,recipies, free, friends, register, shareing, " /> <meta name="author" content="lachlan mcgrath"/> <meta name="ROBOTS" content="INDEX,FOLLOW"/> <meta name="google-site-verification" content="fbI5fgCcTZh3cTw3deqVLevmvZkSOj3C-EwMDS7XMPI" /> <title>CookBookers - Your online cooking community</title> <link href="style/main.css" rel="stylesheet" type="text/css" /> <link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <script src="js/jquery-1.4.2.js" type="text/javascript"></script> <style type="text/css"> .style1 { font-family: Arial; font-size: 18px; } #Layer1 { height:210px; background-image: url(images/top_container_bg_recipes_new.gif); } body { margin-bottom: 0px; background-image: url(images/bg.jpg); background-repeat: repeat-x; background-color: #360904; } .boxHeader { border:#999 1px solid; background-color: #FFF; background-image:url(style/accountStrip1.jpg); background-repeat:repeat-x; padding:5px; margin-left:19px; margin-right:20px; margin-top:6px; color:#060; text-decoration:none; } .style3 {font-size: 20px} #apDiv1 { left:294px; top:308px; width:848px; height:59px; z-index:1; } #apDiv2 { left:283px; top:159px; width:288px; height:126px; z-index:2; } #filter td { filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5; } </style> <script language="javascript" type="text/javascript"> function toggleSlideBox(x) { if ($('#'+x).is(":hidden")) { $(".editBox").slideUp(200); $('#'+x).slideDown(300); } else { $('#'+x).slideUp(300); } } </script> </head> <body> <p> <?php include_once "header_template.php"; ?> </p> <center> <table cellpadding="0px" cellspacing="0px" style="border:0px solid #666666;" width="75%"> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <table cellspacing="0px" border="0" align="center" width="54%" height="25%" style="background-color:transparent"> <tr> <td><a href="http://www.facebook.com/pages/Cookbookers/140615036007324"><img src="images/facebook_button.png" width="87" height="87" align="absmiddle" /></a> <a href="http://twitter.com/cookbookers"><img src="images/Twitter_button.png" width="87" height="87" align="absmiddle"/></a></td> <tr> <td><img src="images/banner_catering.jpg" width="835" height="262" /></td> </tr> </table> <tr></tr> <tr> <td><table width="59%" height="22" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color:#F2F2F2; border:0px solid #666666;"> <tr> <td valign="top" colspan="2" style="background-color:#F2F2F2; border:0px; padding:10px;"> <table border="0" cellpadding="6"> <tr> <td class="style1">Newest Members:</td> <td> <?php print "$MemberDisplayList"; ?> </td> </tr> </table> </td> </tr> <tr> <td width="358" valign="top" style="width:250px; overflow:auto;"> <table width="358" height="152" align="center" cellpadding="4" bgcolor="#F2F2F2" style="border: 0px;"> <tr><td width="344" colspan="2">Recent Posts</td></tr> <tr> <td bgcolor="#F2F2F2" valign="top"><?php print "$blabberDisplayList"; ?></td> </tr> </table> </span> </td> <td width="557" valign="top"> <p>Hello and welcome to cookbookers.com! We are an online cooking community where you can share recipes and communicate with others that love to cook. In your account you can add recipes to share with the public or you can just keep them for yourself inside you own personal cookbook. There'll be more work happening to the website during the next couple of weeks, we're gonna be enhancing the website a bit more, adding garnishes, making it a bit more appealing for everyone. We'll be adding a few new features shortly as well: a forum, you'll be able to comment on recipes and have yours commented, a live chat. But that's just a few of them.</p> <p>If you have any suggestions for the site or any questions; feel free to contact me thought the website, send me a private message or just blab on my page. My name is Lachlan Mcgrath.</p> <p>So please join up, add recipes and make new friends on cookbookers.com today!</p> <p> </p> <p>Happy Sharing!</br> </p> <p>Lachlan McGrath</br> </p> <p>Owner/creator. </p> <p> <?php if(isset($_SESSION['username'])) { } else { include('login.php'); } ?> </p> <p> </p></td> </tr> </table> <p> <?php include_once "footer_template.php"; ?> </p> <p><!-- Histats.com START (standard)--> <script type="text/javascript">document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15.js%27 type=%27text/javascript%27%3E%3C/script%3E"));</script> <a href="http://www.histats.com" target="_blank" title="free stats" ><script type="text/javascript" > try {Histats.start(1,1395398,4,198,85,17,"00001000"); Histats.track_hits();} catch(err){}; </script></a> <noscript><a href="http://www.histats.com" target="_blank"><img src="http://sstatic1.histats.com/0.gif?1395398&101" alt="free stats" border="0"></a></noscript> <!-- Histats.com END --></p> </body> </html> thanks! Quote Link to comment https://forums.phpfreaks.com/topic/232178-background-disapears/ Share on other sites More sharing options...
lmcgr44 Posted March 31, 2011 Author Share Posted March 31, 2011 can anyone help me? thanks Quote Link to comment https://forums.phpfreaks.com/topic/232178-background-disapears/#findComment-1194811 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.