Jump to content

unexpected $end


lmcgr44

Recommended Posts

hello i keep getting an error Parse error: syntax error, unexpected $end in /home/cookbook/public_html/cookbook.php on line 144 can someplease explain it to me? here is the code

 

[list type=decimal]
[*]
[*]
[/list]<?php
//include("include/session.php");
@session_start();
// 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, 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["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");
//die($sql_mem_data);
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="Web Intersect is a deft combination of powerful free open source software for social networking, mixed with insider guidance and tutorials as to how it is made at its core for maximum adaptability. The goal is to give you a free website system that has a network or community integrated into it to allow people to join and interact with your website when you have the need." />
    <meta name="Keywords" content="web intersect, how to build community, build social network, how to build website, learn free online, php and mysql, internet crossroads, directory, friend, business, update, profile, connect, all, website, blog, social network, connecting people, youtube, myspace, facebook, twitter, dynamic, portal, community, technical, expert, professional, personal, find, school, build, join, combine, marketing, optimization, spider, search, engine, seo, script" />
    <title>CookBookers</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">
#Layer1 {
height:210px;
background-image: url(images/top_container_bg_recipes_new.gif);
}
body {
background-color: #3c60a4;
}
</style>
</head>
<body>
<?php include_once "header_template.php"; ?>
<center>
  <table cellpadding="0px" cellspacing="0px" style="border:0px solid #666666;" width="950">
    <tr>
      <td>
        <table width="95%" height="22" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color:#F2F2F2; border:0px solid #666666;">
          <tr>
            <td style="padding-left:45px;">
<?php
//die($_SESSION['username']);
$qryUsers = "SELECT * from recipies WHERE user='".$_SESSION['username']."'";
//die($qryUsers);
$rsUsers = @mysql_query($qryUsers) or die(mysql_error());
?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="16%"><h3>All Recipies of </h3></td>
    <td width="84%"><h3><?php print $_SESSION['username']; ?></h3></td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
</table>
<?php
while($rowUsers = @mysql_fetch_object($rsUsers))
{
?>

<?php
print"<h3>Public Recipes</h3><br>";
$qryUsers = "SELECT * from recipies WHERE user='".$_SESSION['username']."'";
print"<ol>";
$rsUsers = @mysql_query($qryUsers) or die(mysql_error());
		if( @mysql_num_rows($rsUsers)>0 )
		{
			while($rowUsers = @mysql_fetch_object($rsUsers) )
			{
			 print "<li style='margin:5px 0px;'><a href=description.php?Rid=".$rowUsers->Rid.">".$rowUsers->title."</a></li>";

			}
		}
print"</ol>";



?>
</td>
          </tr>
        </table>      </td>
    </tr>
   <tr>
     </td>
   </tr>
  </table>
  </center>
  <?php include_once "footer_template.php"; ?>
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.