Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
mnt
/
volume_sfo2_01
/
50mmla
/
Linux midnightridazz 4.19.0-11-cloud-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
Upload File :
New :
File
Dir
/mnt/volume_sfo2_01/50mmla/galleryContributions.php
<?php include_once('includes/static/configure.php'); include_once('includes/static/util.php'); include_once('includes/static/dbcon.php'); include_once('includes/static/gdimg.php'); include_once('includes/static/sessions.php'); include_once('includes/appTop.php'); $pg_name = basename($_SERVER['PHP_SELF']); include_once('includes/header.php'); $uid = 0; if(isset($_REQUEST['userId'])){ $uid = $_REQUEST['userId']; } $pgnum = 1; if(isset($_REQUEST['pgnum'])){ $pgnum = $_REQUEST['pgnum']; } $colcount=0; $table=""; $sql = "SELECT username FROM 50mm_users WHERE user_id='$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $uname = $row['username']; $sql = "SELECT COUNT(*) AS total FROM 50mm_gallery WHERE user_id ='$uid'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $total_count = $row['total']; $offset = ($pgnum-1) * GALLERY_IMGS_PER_PAGE; $sql = "SELECT image,gallery_id FROM 50mm_gallery WHERE approved = 1 AND user_id ='$uid' ORDER BY entry_time DESC LIMIT $offset,".GALLERY_IMGS_PER_PAGE; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $page_count = $db->sql_numrows($result); $numcol = 7; $bnav = get_pagination($total_count,$pgnum,$_SERVER['PHP_SELF']."?userId=".$uid,GALLERY_IMGS_PER_PAGE); $highpg = $pgnum*GALLERY_IMGS_PER_PAGE; if($highpg>$total_count){ $highpg = $total_count; } $lowpg = $offset+1; $pgnav = "<div>Displaying $lowpg - $highpg of ".$total_count." photos...</div>"; $pgnav.="<div>Page: $bnav</div>"; if($total_count == 0){ $table="no gallery contributions"; }else{ $i=0; while ($row = $db->sql_fetchrow($result)){ $image = $row['image']; $gallery_id = $row['gallery_id']; $thumb_src = GALLERY_SIMG_DIR.$row['image']; if($colcount==0){ $table.="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"; $table.="<tr>\n"; } $table.="<td>\n"; $table.="<a href=\"userPhotos.php?galleryId=$gallery_id&userId=$uid&pgnum=$pgnum\"><img src=\"$thumb_src\" class=\"thumbBorder\" hspace=\"8\" vspace=\"8\"></a><br>\n"; $table.="</td>\n"; $colcount++; if(($colcount==$numcol)||($i==$page_count-1)){//close table $colcount =0; $table.="</tr>\n"; $table.="</table>\n"; } $i++; } } ?> <table width="700" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"><a href="viewProfile.php?userId=<?echo $uid?>"><img src="images/home.gif" border="0"><br><br>Back to profile...</a><br> </td> <td align="right" valign="top" width="468"><?php include_once('includes/ads/468x60.php'); ?> </td> </tr> <tr> <td colspan="2"> <div class="title"> Contributions by: <?echo $uname;?><?echo $pgnav;?><br> </div> </td> </tr> </table> <br> <?echo $table;?> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>