lmcgr44 Posted March 27, 2011 Share Posted March 27, 2011 hello on my website i have added a background, and when i view it in safari it shows up then disapears when fully loaded here is my code <?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("sorcerer", "grey", "shug", "farg", "smart", "awesome guy", "asshole", "cake", "dude"); $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: #000; } .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; } </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> <table align="50%" width="200" border="0"> <tr> <td><img src="images/logo_cook.png" width="297" height="167" /></td> </tr> </table> <table cellspacing="0px" border="0" align="center" width="54%" height="25%" style="background-color:transparent"> <tr> <td><img src="images/banner_catering.jpg" width="835" height="262" /></td> </tr> </table> <tr></tr> <tr> <td><table width="50%" 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" 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 weclome to cookbookers.com we are a cooking community where people can share and comumicate with others that love to cook and share recipies. please sign up and take a look arround out website. In your account you can add recipies to share with the public or you can just keep them to yourself in you own personal cookbook. There will be more work happening to this website over the next couple of weeks, to enhance the website a bit more, we will be adding feature like a forum, commenting on recipies, live chat and also make the website a bit more appealing</p> <p>If you have any ideas for the site please feel fee to contact me thought the website, send me a private message, my name is lachlan mcgrath.</p> <p>so please join up, add recipies and make new friends on cookbookers.com</p> <p> </p> <p>happy shareing</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> Quote Link to comment Share on other sites More sharing options...
sunfighter Posted March 27, 2011 Share Posted March 27, 2011 Validate please. http://validator.w3.org/ Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 27, 2011 Share Posted March 27, 2011 It would be even nice if you supply client side code, You provided a complete php file (php is a serverside language). Inthe html and css fora we need the stuff you see when you right click, view source. Ideally we love to see online examples, it's faster to inspect for us with something like firebug or the chrome opera or ie9 inspecter than reading a million lines of code. Quote Link to comment 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.