hi guys, well.. i run my php program and the page just displays the following:
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\Azone\Azone\profile.php on line 160
i checked line 160 more than 1,000,000 times and i got nothing to change!
here is the whole code of the page, please help me and tell me what to do!
code is bellow:
Note: i am not done from checking the code from errors.. i was editing one by one and this damn error stopped me!
<?php
if(!isset($_GET['uid']))
{
$id = $_COOKIE['ln'];
$id = md5($id);
header("location: profile.php?uid=".$id);
}
if(isset($_GET['uid']) && isset($_COOKIE['ln']))
{
// the beginning of the full.php
include_once "engine/db/main.php";
$db = new db();
$db->connect();
$db->select("awah7870_users");
if(isset($_GET['uid'])){$uid = $_GET['uid']; $uid = mysql_real_escape_string($uid); } else { $uid = md5($_COOKIE['ln']); }
$uid = mysql_real_escape_string($uid);
$q = mysql_query("SELECT * FROM `all` WHERE md5id = '$uid'");
if(mysql_num_rows($q) == 0)
{
echo "<script type='text/javascript'>window.location = '404.php'; </script>";
}
else
{
while($rows = mysql_fetch_array($q))
{
$name = $rows['name'];
$email = $rows['email'];
$location = $rows['country'];
$photo = $rows['profile_pic'];
$theme = $rows['theme'];
}
if(isset($_GET['uid'])) { $title = $name."'s Profile"; } else { $title = "Your Profile"; }
$des = $name."'s profile, profile, AZONE, ".$name;
$keys = $name.", profile, AZONE, ".$name."'s Profile";
include "engine/includes/temps/main/header.php";
include "engine/includes/temps/main/user_bar.php";
include "engine/includes/temps/main/separater.php";
include "engine/includes/temps/main/chat_bar.php";
include "engine/includes/left_bar.php";
?>
<div id="main_bar_profile">
<?php
$db->select("awah7870_statuses");
$uid = mysql_real_escape_string($_GET['uid']);
$q = mysql_query("SELECT * FROM `all` WHERE owner_id = '$uid' ORDER BY id DESC LIMIT 0, 1")or die(mysql_error());
if(mysql_num_rows($q) == 0)
{
$status = "Welcome to the AZONE!<BR>This is automated status writen by the AZONE's team. please feel free to update this status and make sure you compleate your signup by opening your<a href='profile.php?uid=$id' title='Open your profile'> profile </a> and Edit your Infos";
$date = date("D / M / Y");
}
else
{
while($row = mysql_fetch_array($q))
{
$status = $row['status'];
$date = $row['time']." | ".$row['date'];
}
}
$form = "";
?>
<script type="text/javascript" src="engine/includes/js.js"></script>
<?php
echo $form;
?>
<!-- here is teh status -->
<div id="flash"></div>
<!-- here is the end of the status -->
<div id="tabs">
<ul>
<li><a href="#tab-1"><?php
$uid = $_GET['uid'];
if($uid == md5($_COOKIE['ln'])) { echo "all your activities"; } else if($uid != md5($_COOKIE['ln'])) { echo $name."'s activities"; }
?> </a></li>
<li><a href="#tab-2">
<?php
$uid = $_GET['uid'];
if($uid == md5($_COOKIE['ln'])) { echo "your infos"; } else { echo $name."'s infos"; }
?>
</a></li>
<li><a href="#tab-3">
Azone points
</a></li>
</ul>
<div id="tab-1">
<div id='status'>
<p id='status_location'>
<?php echo $status; ?>
</p>
<p id='date_time_status'>
<?php echo $date; ?>
</p><BR><R>
</div>
<?php
//this is the get the users activites from the database
$db->select("awah7870_users");
$uid = $_GET['uid'];
$q = mysql_query("SELECT * FROM `activities` WHERE uid = '$uid' ORDER BY activity_id DESC") or die(mail("errors@awah.biz", "Error", mysql_error(), "From: the AZONE's notification system"));
echo mysql_error();
// the next code come here
if($_GET['uid'] = md5($_COOKIE['ln'])){$user = "You"; } else { $user = $name; }
if(mysql_num_rows($q) == 0){ echo $user." Have no activities yet!"; }
while($rows = mysql_fetch_array($q))
{
?>
<div id="activity" onmouseover="style='background-color:black;'" onmouseout="style='background-color:#333333;'">
<p id="activity">
<?php echo $rows['activity']; ?>
</p>
<label id="activity_time">
<?php echo $rows['time']; ?>
</label>
</div>
<?php
}
?>
</div>
<div id="tab-2">
<?php
$co = $_COOKIE['ln'];
$co = md5($co);
if($uid == $co) { ?>
<a class="thickbox" href="edit_profile.php?keepThis=true&TB_iframe=true&width=700" title="Edit your Profile Information">
<img id="edit_profile" src='graphics/1302207277_configuration 1.png'></a>
<?php
} else {
//check if they are friends or not
$db->select("awah7870_friends");
$f = mysql_query("SELECT * FROM `all` WHERE from_id = '$co' OR to_id='$uid' AND status = 1");
//check if they are already friends and allow them to send messages
if(mysql_num_rows($f) == 1){// yes, then add send message
?>
<div><a href='contact.php?uid=<?php $user = $_COOKIE['ln']; $user = md5($user); echo $user; ?>' title='Contact <?php echo $name; ?>' class='thickbox' id='edit_profile'><img src='graphics/1302207277_configuration 1.png'></a></div>
<div id="email_form" title="Contact <?php echo $name; ?>">
<p>
<form action="send_email.php" method="post">
<input type="hidden" name="to" value="<?php echo $_GET['uid']; ?>" />
Subject: <input type="text" name="subject" size="60" /><br />
Message:<br />
<textarea name="message" cols="10" rows="60"></textarea><br />
<button id="send_email" name="send_email">Send!</button>
</form>
</p>
</div>
<?php
}
else
(
// they are not friends or there is a friend request without confermation
?>
<h2 id="frnd_req"><a class="thickbox" href="request_friend.php?uid=<?php echo $idd; ?>" title='Be Friend with <?php echo $name; ?>' id='edit_profile'>Send Friend Request to <?php echo $name; ?></a></h2>
}
else {
while($rows = mysql_fetch_array($q)){$status = $rows['status'];}
if($status == 1)
{
// they are friends and just contact
?>
<h2 id="frnd_req"><a href='contact.php?uid=<?php echo $uid; ?>' title='Edit your Profile' style="float:right;" id='edit_link'>Contact <?php echo $name; ?></a></h2>
<p id='edit'>
<iframe src="contact.php?uid=<?php echo $idd; ?>&name=<?php echo $name; ?>" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>
</p>
<?php
}
else if($status == 2){
//pending
?>
<h1 id="frnd_req">friend request is pending.......</h1>
<?php
}
else if($status = 3){
// the friend request was rejected
?>
<h2 id="frnd_req">Sorry, your friend request was rejected</h2>
<?php
}
}
}
////////////////////////////////////////////////////////////////////////////
?>
<img id="pro_pic" border="3" src="uploads/images/small/<?php echo $photo; ?>" alt="<?php echo $name; ?>" title="<?php echo $name; ?>"> <h1><?php echo $name; ?></h1>
</p>
</div>
<?php
}
// nothing else comes here
}
$db->select("awah7870_users");
?>
<table cellpadding="2" cellspacing="10">
<?php
$q = mysql_query("SELECT * FROM `all` WHERE md5id='$uid'") or die(mail("errors@awah.biz", "Error", mysql_error(), "From: the AZONE's NOTIFICATION SYSTEM"));
while($row = mysql_fetch_array($q))
{
echo "<tr>";
echo "<td>Name: </td>";
echo "<td>".$row['name']."</td>";
echo "</tr>";
echo "<td>Email: </td>";
if($_GET['uid'] == md5($_COOKIE['ln'])){echo "<td>".$row['email']."</td>";} else {
if($row['view_email']==1){echo "<td>".$row['email']."</td>";} else { if($row['sex']= "male"){$s = "his";} else{$s="her";} echo $name."Doesnt Want to share ".$s." Email Address";
}
}
echo "</tr>";
echo "<tr>";
echo "<td>Gender:</td>";
echo "<td>".$row['sex']."</td>";
echo "</tr>";
switch($row['view_bday'])
{
case '1':
echo "<tr><td>Birth date:</td><td>".$row['b-day']." / ".$row['b-month']." / ".$row['b-year']."</td></tr>";
break;
case '0':
echo "";
break;
}
echo "<tr>";
echo "<td>Country: </td>";
if($_GET['uid'] == md5($_COOKIE['ln'])){echo "<td>".$row['country']."</td>";} else {
if($row['view_country']==1){echo "<td>".$row['country']."</td>";} else { if($row['sex']= "male"){$s = "his";} else{$s="her";} echo $name."Doesnt Want to share ".$s." Country";}}
echo "</tr>";
echo "<tr>";
echo "<td> City:</td>";
echo "<td>".$row['city']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Job:</td>";
echo "<td>".$row['job']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Phone:</td>";
echo "<td>".$row['phone']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Hobies:</td>";
echo "<td>".$row['hobies']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Books:</td>";
echo "<td>".$row['books']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Interested in:</td>";
echo "<td>".$row['interested_in']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Dream:</td>";
echo "<td>".$row['dream']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>About:</td>";
echo "<td>".$row['about']."</td>";
echo "</tr>";
}
?>
</table>
</div>
<div id="tab-3">
<?php
// lets do the good part of this!!
// check the database for the user infos of the Azone's Points
$db->select("awah7870_azonepoints");
$db->database = "awah7870_azonepoints";
$id = mysql_real_escape_string($_GET['uid']);
$query = "SELECT * FROM `all` WHERE user_id ='$id'";
$q = mysql_query($query);
if(mysql_num_rows($q) == 0){
$result = "INSERT INTO `all`(id, user_id, points, level, number_of_awards, things_bought_using_azonepoints)
VALUES ('', '$id', '100', '1', '0', '0')";
$db->query($result);
echo "<script type='text/javascript'>window.location = 'profile.php?uid=".$id."#tab-3'; </script>";
}
else {
// the user already registered in the points database
?>
<a href='#' title='Click here to know about the Azone points' id='edit_link'>Welcome to the Azone Points center! <img src="graphics/icon_customise_info.gif" alt="?" /></a>
<p id='edit'><iframe src="describe_page.php?f=azonepoints" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe></p>
<?php
while($row = mysql_fetch_array($q))
{
// display the infos on the page
}
}
?>
<!-- the end of the 3rd tab -->
</div>
</div>
</div>
<?php
//this is the 2nd last closeing }
}
// the end of the full.php
}
if(!isset($_COOKIE['ln']) && !isset($_GET['uid']))
{
header("location: login.php");
}
else if(isset($_GET['uid']) && !isset($_COOKIE['ln']))
{
// this is when the user is not loged in and the user id on the url bar
include "engine/includes/profile/with_uid_without_cookie.php";
}
else if(!isset($_GET['uid']) && isset($_COOKIE['ln']))
{
include "engine/includes/profile/full.php";
}
?>
any help is going to be sooo apreciated!