I decompressed all the content in fullsize folder as stated .Below is
the code that i am using
<?
session_start();
include "../includes/config.inc.php";
include_once "../includes/front_authenticate.php";
include_once("photos_class.php");
include_once("../messaging/message_class.php");
include_once "../header.php";
if(empty($_SESSION['sess_member_id']) or !isset($_SESSION
['sess_member_id'])){
$_SESSION['redirect_url'] = selfURL();
echo "<script>parent.location.href='../users/registration.php';</
script>";
}else{
$mesgin = new message_class($PHP_SELF);
$photo_object=new photos($PHP_SELF);
$sql_object = new sql_class($PHP_SELF);
$action = ($_GET[action]) ? $_GET[action] : $action;
$action = ($_POST[action]) ? $_POST[action] : $action;
?>
<html>
<head>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<link href="fullsize/fullsize.css" media="screen" rel="stylesheet"
type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="fullsize/jquery.fullsize.js"></
script>
<script type="text/javascript" src="../FCKeditor/fckeditor.js"></
script>
<script language="javascript">
function comment_sub()
{
document.comment_frm.submit();
}
</script>
</head>
<body>
<?
if(strcmp($action,"delete")==0)
{
$sql="delete from table_album_comment where id=".$_GET['id'];
//echo $sql;
$sql_object->run_sql($sql);
echo "<script>parent.location.href='$_SERVER[PHP_SELF]?id=$_GET
[album_id]';</script>";
}
if (strcmp($action,"post_comment")==0)
{
if($_POST[comment]!="")
{
$comment=addslashes($_POST[comment]);
$sql="insert into table_album_comment set user_id='$_POST
[posted_from]',album_id='$_POST[album_id]',comment='$comment'";
$cid = $sql_object->run_sql($sql);
$cid = mysql_insert_id();
$album_data=get_data("table_photo_album tpa ","
tpa.id= '".$_POST
['album_id']."' ","","tpa.member_id as user_id ","");
/*if($_SESSION['sess_member_id'] <> $album_data['user_id'][0]){
$mail_alert->ids = $_POST['album_id'];
$mail_alert->alert_for_comment_module($mesgin,"Photo Album",$cid,
$comment,$album_data['user_id'][0]);
}*/
}
echo "<script>parent.location.href='$_SERVER[PHP_SELF]?id=$_POST
[album_id]';</script>";
}
?>
<table width="933" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td width="230" valign="top"><? include_once("left_navi.php");?></
td>
<td style="padding-left:10px; padding-top:20px" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="0"
cellspacing="0" class="border">
<?
$album_data=get_data("table_photo_album tpa left join
table_user_details tu on tpa.member_id=
tu.id","
tpa.id=".$_GET
['id'],"","
tu.id as
user_id,tu.display_name,tpa.title,tpa.description","");
$album_photo_count=get_data("table_photo_images","album_id=".$_GET
['id'],"","count(id) as total_photo","");
?>
<tr>
<td class="title_bar"><?=$album_data['display_name'][0]?
>'s Album - <?=$album_data['title'][0]?> </td>
</tr>
<tr>
<td style="padding:10px"><table width="100%" border="0"
cellpadding="5" cellspacing="0" bgcolor="#f2f2f2" class="border">
<tr>
<td class="highlight_text_bold"><?=$album_data
['description'][0]?></td>
</tr>
</table></td>
</tr>
<?
$album_photo_data=get_data("table_photo_images","album_id=".$_GET
['id'],"id desc","id,title,thumb_file_name,file_name","");
$album_photo_count=count($album_photo_data['id']);
if($album_photo_count>0)
{
?>
<tr>
<td><table width="100%" border="0" cellpadding="0"
cellspacing="10">
<tr>
<?
$count=1;
for($i=0;$i<$album_photo_count;$i++)
{
if($album_photo_data['thumb_file_name'][$i]!="")
{
$file="pics/".$album_photo_data['thumb_file_name'][$i];
}
else
{
$file="../images/no_image_thumb.gif";
}
if($album_photo_data['file_name'][$i]!="")
{
$main_file="pics/".$album_photo_data['file_name'][$i];
}
else
{
$main_file="../images/no_images.gif";
}
if($count==6)
{
echo "<tr>";
$count=1;
}
?>
<td valign="bottom">
<table width="75" border="0" cellpadding="5"
cellspacing="0" class="border">
<tr>
<td align="center"><a href="view_image.php?
id=<?=$album_photo_data['id'][$i]?>"><img src="<?=$file?>" border="0"
longdesc="<?=$main_file?>" title="Hi"/></a></td>
</tr>
<!--tr>
<td align="center" class="h2_black"><strong><a
href="view_image.php?id=<?//=$album_photo_data['id'][$i]?>">
<?//=$album_photo_data['title'][$i]?>
</a></strong></td>
</tr-->
</table></td>
<?
if($count==6)
{
echo "</tr>";
}
$count++;
}
?>
</table></td>
</tr>
<?
}
else
{
?>
<tr>
<td style="padding:10px"><span class="error">No Photos in
this Album...</span></td>
</tr>
<?
}
?>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0"
cellspacing="0" class="border">
<tr>
<td colspan="2" class="title_bar">Add a Comment </td>
</tr>
<?
$user_data=get_data("table_user_details","id=".$_SESSION
['sess_member_id'],"","filename","");
?>
<form name="comment_frm" method="post" action="<?=$_SERVER
['PHP_SELF']?>">
<input type="hidden" name="action" value="post_comment" />
<input type="hidden" name="posted_from" value="<?=$_SESSION
['sess_member_id']?>" />
<input type="hidden" name="album_id" value="<?=$_GET['id']?>" />
<tr>
<td width="68" style="padding:10px">
<?
if($user_data['filename'][0]!="")
{
if(file_exists("../users/photos/".$user_data['filename'][0]))
$user_file="../users/photos/".$user_data['filename'][0];
else
$user_file="../images/no_image_thumb.gif";
}
else
$user_file="../images/no_pic_thumb.gif";
?>
<a href="../friend/user_profile.php?mem_id=<?=md5($_SESSION
['sess_member_id'])?>"><img src="<?=$user_file?>" width="50"
border="0" class="image_border"/></a> </td>
<td style="padding-top:10px"><textarea name="comment"
cols="40" rows="8" class="body_text" id="comment"></textarea></td>
</tr>
<tr>
<td style="padding:10px" align="right" colspan="2"><input
type="button" class="button" value="Add Comment" onclick="comment_sub
();"/></td>
</tr>
</form>
<?
$adjacents = 3;
$targetpage = $_SERVER['PHP_SELF'];
$limit = 10;
$page = $_GET['page'];
if($page)
$start = ($page - 1) * $limit;
else
$start = 0;
$row_count=get_data("table_album_comment","album_id=".$_GET
['id'],"","count(id) as num","");
$comment_data=get_data("table_album_comment tc join
table_user_details tu on tc.user_id=
tu.id","tc.album_id=".$_GET
['id'],"
tc.id desc limit ".$start." , ".
$limit,"
tc.id,tc.user_id,date_format(tc.posted_on, '%r' ) as
posttime,date_format(tc.posted_on, '%M %D %Y' ) as
postdate,tc.comment,tu.display_name,tu.filename","");
$total_pages=$row_count['num'][0];
if ($page == 0)
$page = 1;
$prev = $page - 1;
$next = $page + 1;
$lastpage = ceil($total_pages/$limit);
$lpm1 = $lastpage - 1;
/////////////////////////////////////////////////Pagination
Start/////////////////////////////////////////////////////////////////////////////////////////////////////
$pagination = "";
if($lastpage > 1)
{
$pagination .= "<div>";
//previous button
if ($page > 1)
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$prev\"
class='active'>« previous</a> ";
else
$pagination.= "<span class=\"disable\">«
previous </span>";
//pages
if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother
breaking it up
{
for ($counter = 1; $counter <= $lastpage; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"h1_small\"><strong>$counter</
strong></span> <span class=h1_small> | </span> ";
else
$pagination.= "<a class=\"h1_small\" href=\"$targetpage?id=$_GET
[id]&page=$counter\">$counter </a><span class=h1_small> | </
span>";
}
}
elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some
{
//close to beginning; only hide later pages
if($page < 1 + ($adjacents * 2))
{
for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"h1_small\"><strong>$counter</
strong></span> <span class=h1_small> | </span>";
else
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$counter
\" class=h1_small>$counter</a> <span class=h1_small> | </span>";
}
$pagination.= "...";
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$lpm1\"
class=h1_small>$lpm1</a>";
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$lastpage\"
class=h1_small>$lastpage</a>";
}
//in middle; hide some front and some back
elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents
* 2))
{
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=1\"
class=h1_small>1</a>";
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=2\"
class=h1_small>2</a>";
$pagination.= "...";
for ($counter = $page - $adjacents; $counter <= $page +
$adjacents; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"h1_small\"><strong>$counter</
strong></span> <span class=h1_small> | </span>";
else
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$counter
\" class='h1_small'>$counter</a> <span class=h1_small> | </
span>";
}
$pagination.= "...";
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$lpm1\"
class=h1_small>$lpm1</a>";
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$lastpage\"
class=h1_small>$lastpage</a>";
}
//close to end; only hide early pages
else
{
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=1\"
class=h1_small>1</a>";
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=2\"
class=h1_small>2</a>";
$pagination.= "...";
for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <=
$lastpage; $counter++)
{
if ($counter == $page)
$pagination.= "<span class=\"h1_small\"><strong>$counter</
strong></span> <span class=h1_small> | </span>";
else
$pagination.= "<a href=\"$targetpage?id=$_GET[id]&page=$counter
\" class='h1_small'>$counter</a> <span class=h1_small> | </
span>";
}
}
}
//next button
if ($page < $counter - 1)
$pagination.= " <a href=\"$targetpage?id=
$_GET[id]&page=$next\" class=h1_small>next »</a>";
else
$pagination.= "<span class=\"disable\"> next
»</span>";
$pagination.= "</div>\n";
}
/////////////////////////////////////////////////Pagination
Ends/////////////////////////////////////////////////////////////////////////////////////////////////////
if(is_array($comment_data))
{
?>
<tr>
<td style="padding:10px" colspan="2">
<table width="100%" border="0" cellpadding="0"
cellspacing="5" bgcolor="#F9F9F9" class="border">
<tr>
<td height="25" colspan="3" class="body_text"
style="padding-left:10px">
<?
if($row_count['num'][0]==1)
{
?>
<?=$row_count['num'][0]?> Comment
<?
}
else
{
?>
<?=$row_count['num'][0]?> Comments
<?
}
?> </td>
</tr>
<?
$comment_count=count($comment_data['id']);
for($i=0;$i<$comment_count;$i++)
{
if($comment_data['filename'][$i]!="")
{
if(file_exists("../users/photos/".$comment_data['filename']
[$i]))
$comment_user_file="../users/photos/".$comment_data['filename']
[$i];
else
$comment_user_file="../images/no_image_thumb.gif";
}
else
$comment_user_file="../images/no_pic_thumb.gif";
?>
<tr>
<td width="68" rowspan="2" style="padding:10px"><a
href="../friend/user_profile.php?mem_id=<?=md5($comment_data['user_id']
[$i])?>"><img src="<?=$comment_user_file?>" width="48" height="48"
border="0" class="image_border"/></a></td>
<td width="563" height="30" valign="top"
class="highlight_text" style="padding-top:10px">Comment by <a href="../
friend/user_profile.php?mem_id=<?=md5($comment_data['user_id'][$i])?
>"><?=$comment_data['display_name'][$i]?></a> at <?=$comment_data
['posttime'][$i]?> <?=$comment_data['postdate'][$i]?></td>
<?
//echo "Album User ID :-".$album_data['user_id'][0]."<br>";
//echo "Comment User ID:- ".$comment_data['user_id'][$i]."<br>";
if(($comment_data['user_id'][$i]==$_SESSION['sess_member_id']) or
($_SESSION['sess_member_id']==$album_data['user_id'][0]))
{
?>
<td width="35" rowspan="2" valign="top"
class="h1_small">
<a onClick="confirmAction('<?=$_SERVER[PHP_SELF]?>?
action=delete&album_id=<?=$_GET['id']?>&id=<?=$comment_data['id'][$i]?
>','Do you want to delete?')" href="javascript:void(0);"><img src="../
images/delete_cross.gif" width="12" height="12" border="0"/></a> </
td>
<?
}
?>
</tr>
<tr>
<td valign="top" class="body_text"><?=stripcslashes
($comment_data['comment'][$i])?></td>
</tr>
<tr>
<td height="10" colspan="3"><hr size="1" /></td>
</tr>
<?
}
?>
</table></td>
</tr>
<tr>
<td height="30px" align="center" colspan="2"><?=$pagination?></
td>
</tr>
<?
}
?>
</table>
<br /></td>
</tr>
<tr>
<td></td>
</tr>
</table></td>
<td style="background-repeat:repeat-y" width="24" align="right"
background="../images/logo_right_bg.gif"> </td>
</tr>
</table>
<? include_once("../footer.php");?>
<script type="text/javascript">
var sBasePath = document.location.href.replace(/list_photos\.php.*/,
'../FCKeditor/');
var oFCKeditor1 = new FCKeditor('comment');
oFCKeditor1.BasePath = sBasePath;
oFCKeditor1.ToolbarSet = "FighterzPhotos" ;
oFCKeditor1.Value = document.getElementById('comment').value;
oFCKeditor1.Width = '600';
oFCKeditor1.Height = '120';
oFCKeditor1.ReplaceTextarea();
</script>
<script language="javascript">
$("img").fullsize();
</script>
</body></html>
<? } ?>
I called the fullsize function at bottom as it is not working for me
in the header.
I am getting error for this line
var scrolltop = $(window).scrollTop();
in jquery.fullsize.js file.
Please help.
Thanks,