Kwai Loh's Multiply Site

Update your comment
              

\n"; exit; } $query="SELECT caption, pic_nr FROM images WHERE album_nr='$album_nr' AND owner='$owner'"; $result=mysql_query($query); $num=mysql_num_rows($result); $query="SELECT album_name FROM albums WHERE owner='$owner' AND album_nr='$album_nr' "; $result=mysql_query($query); list($album_name)=mysql_fetch_row($result); if ($pic_nr) {$query="SELECT comment,caption, pic_name, pic_nr FROM images WHERE album_nr='$album_nr' AND owner='$owner' AND pic_nr='$pic_nr' ";} else{$query="SELECT comment,caption, pic_name, pic_nr FROM images WHERE album_nr='$album_nr' AND pic_name='$pic_name' ";} $result=mysql_query($query); $totalwidth=0; list($comment,$caption,$pic_name, $pic_nr)=mysql_fetch_row($result); $image="'./images/$owner/$album_nr/$pic_name'"; $pic_prev=$pic_nr-1;if ($pic_prev<1) {$pic_prev=$num;} ;$pic_next=$pic_nr+1; if ($pic_next>$num) {$pic_next=1;}; $text= "< prev   #$pic_nr of $num    next>"; echo"

$album_name

Back to album
$text

$caption
$comment
"; // now the comments, if any $query="SELECT id,commenter, comment, quote,date FROM comments WHERE album_nr='$album_nr' AND owner='$owner' AND pic_name='$pic_name' ORDER BY comment_nr "; $result=mysql_query($query); while (list($id,$commenter,$comment,$quote, $date)=mysql_fetch_row($result)) { $query="SELECT avatar,url,realname FROM contacts WHERE name='$commenter' "; $result1=mysql_query($query); if ($commenter==$multiply_username) {$deledit="edit/delete";}else {$deledit="";} list($avatar,$url,$realname)=mysql_fetch_row($result1); $src_avatar=""; if ($url) {$avatarlink="$src_avatar";} else {$avatarlink="$src_avatar";} $date=date("M j, Y",$date); echo "
$avatarlink $realname wrote on $date:
$comment
$deledit

\n"; } if ($multiply_username) { $query="SELECT avatar FROM contacts WHERE name='$multiply_username' "; $result=mysql_query($query); list($avatar)= mysql_fetch_row($result); echo"

Add a Comment
"; } else {echo"
You are welcome to comment, but you must register and/or login first.
"; } ?>