I've looked at this code over and over and can't see where the problem is, it saysI've marked the line in the code, I usually don't have troubles with this and when I do can figure it out easy. BUt for some reason I'm just ot seeing it.PHP Code:Parse error: parse error, unexpected '}' in profile.php on line 170
Might have to put this in an editor to see the layout more clearly, even though it isn't helping me, lol.PHP Code:if(isset($user))
{
$query = "SELECT * FROM users WHERE username='$user'";
$result = @mysql_query($query) or die(mysql_error());
if($result)
{
if(mysql_num_rows($result) == 1)
{
$rows = mysql_fetch_array($result);
$user_id = $rows['user_id'];
$fname = $rows['first_name'];
$age = $rows['age'];
$gender = $rows['gender'];
$regdate = $rows['reg_date'];
$userlevel = $rows['user_level'];
$user = $rows['username'];
$main = $rows['main'];
if($userlevel == 0)
{
if($userlevel == 0 && $_SESSION['ul'] > 2)
{
echo "<p><font size=\"-1\" color=\"red\">This account is currently waiting reinstatement/suspension and can only be seen by admins.</font></p><br>";
$query = "SELECT image_id,image_name,mod FROM images WHERE user_id='$user_id' AND main='1'";
$result = @mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
$iname = $row['image_name'];
$iid = $row['image_id'];
$ban = $row['mod'];
if($ban == 2)
{
echo "<center><img id=\"MainImg\" src=\"../pics/users/full/".$iname.$iid.".jpg\" ></center>";
echo "<br>";
} elseif(!mysql_num_rows($result) == 1) {
} else {
echo "<center><img src=\"../pics/users/approvalbig.jpg\"/></center>";
echo "<br>";
}
$query = "SELECT image_id, mod FROM images WHERE user_id='$user_id' AND main='0' ORDER BY date";
$result = @mysql_query($query);?>
<table class="pics"><tr>
<td><?php echo "<img src=\"../pics/users/thumb/".$iname.$iid." onclick=\"CngImg(0,'../pics/users/full/".$iname.$iid.".jpg');\" >";?></td>
<?php while($row = mysql_fetch_array($result))
{ $count++;
extract($row);
if($mod == 2)
{
echo "<td>";
echo "<img src=\"../pics/users/thumb/".$iname.$image_id." onclick=\"CngImg(".$count.",'../pics/users/full/".$iname.$image_id.".jpg');\" >";
echo "</td>";
} else {
echo "<td>";
echo "<img src=\"../pics/users/approvalsmall.jpg\"/></center>";
echo "</td>";
}
}?>
</tr></table>
<table class="profile">
<tr class="Dark">
<td align="right">Date Registered: </td>
<td><?php echo date('l, F j, Y', strtotime($regdate));?></td>
</tr>
<tr class="Light">
<td align="right">Name: </td>
<td><?php echo $fname; ?></td>
</tr>
<tr class="Dark">
<td align="right">Age: </td>
<td><?php echo $age; ?></td>
</tr>
<tr class="Light">
<td align="right">Gender: </td>
<td><?php echo $gender; ?></td>
</tr>
</table>
<?php
}
} else {
echo "This users account has temporarily been suspended for further review.";
}
} elseif($userlevel == 1) {
echo "Account still awaiting activation. If this is your account check your email that you used to register with for further instructions.";
} else {
$query = "SELECT image_id,image_name,mod FROM images WHERE user_id='$user_id' AND main='1'";
$result = @mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
$inme = $row['image_name'];
$iid = $row['image_id'];
$ban = $row['mod'];
if($ban == 2)
{
echo "<center><img id=\"MainImg\" src=\"../pics/users/full/".$iname.$iid.".jpg\" ></center>";
echo "<br>";
} elseif(!mysql_num_rows($result) == 1) {
} else {
echo "<center><img src=\"../pics/users/approvalbig.jpg\"/></center>";
echo "<br>";
}
$query = "SELECT image_id, mod FROM images WHERE user_id='$user_id' AND main='0' ORDER BY date";
$result = @mysql_query($query);?>
<table class="pics"><tr>
<td><?php echo "<img src=\"../pics/users/thumb/".$iname.$iid." onclick=\"CngImg(0,'../pics/users/full/".$iname.$iid.".jpg');\" >";?></td>
<?php while($row = mysql_fetch_array($result))
{ $count++;
extract($row);
if($mod == 2)
{
echo "<td>";
echo "<img src=\"../pics/users/thumb/".$iname.$image_id." onclick=\"CngImg(".$count.",'../pics/users/full/".$iname.$image_id.".jpg');\" >";
echo "</td>";
} else {
echo "<td>";
echo "<img src=\"../pics/users/approvalsmall.jpg\"/></center>";
echo "</td>";
}
}?>
</tr></table>
<table class="profile">
<tr class="Dark">
<td align="right">Date Registered: </td>
<td><?php echo date('l, F j, Y', strtotime($regdate));?></td>
</tr>
<tr class="Light">
<td align="right">Name: </td>
<td><?php echo $fname; ?></td>
</tr>
<tr class="Dark">
<td align="right">Age: </td>
<td><?php echo $age; ?></td>
</tr>
<tr class="Light">
<td align="right">Gender: </td>
<td><?php echo $gender; ?></td>
</tr>
</table>
<?php if($user != $_SESSION['user'])
{
if($userlevel < 3)
{?>
<br><table align="center" width="98%">
<tr>
<td><font size="-3">If you think there is copyrighted, inappropriate/offensive material or broken images on this page, <a href="report.php">Click Here.</a></td></font>
</tr>
</table>
<?php }
}
}
} else {
echo "<p>There was an error when trying to connect to the database, please try again.</p>";
}
} else {
echo "<p>No account exists with this name.</p>";
}
mysql_close();
} else { // line 170: error line
header('Location: index.php');
exit();
}




Bookmarks