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/artist.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'); $artist_id = 0; if(isset($_REQUEST['artistId'])){ $artist_id = $_REQUEST['artistId']; } $pgnum = 1; if(isset($_REQUEST['pgnum'])){ $pgnum = $_REQUEST['pgnum']; } $colcount=0; $table=""; $sql = "SELECT artist_name,description,location FROM 50mm_artists WHERE artist_id='$artist_id'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $artist_name = $row['artist_name']; $description = $row['description']; $location = $row['location']; $gallery_array = Array(); $sql = "SELECT image,gallery_id FROM 50mm_gallery WHERE approved = 1 AND artist_id ='$artist_id' ORDER BY entry_time DESC"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } while($row = $db->sql_fetchrow($result)){ array_push($gallery_array,$row); } $sql = "SELECT g.image,g.gallery_id FROM 50mm_gallery g, 50mm_other_artists o WHERE g.approved = 1 AND o.artist_id ='$artist_id' AND g.gallery_id = o.gallery_id ORDER BY entry_time DESC"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } while($row = $db->sql_fetchrow($result)){ array_push($gallery_array,$row); } $total_count = count($gallery_array); $numcol = 7; if($total_count == 0){ $table="no thumbs"; }else{ $offset = ($pgnum-1) * GALLERY_IMGS_PER_PAGE; $bnav = get_pagination($total_count,$pgnum,$_SERVER['PHP_SELF']."?artistId=".$artist_id,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>"; $i=0; //only show images for this page for($j=$offset;$j<$offset+GALLERY_IMGS_PER_PAGE;$j++){ if($colcount==0){ $table.="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"; $table.="<tr>\n"; } $table.="<td>\n"; if(isset($gallery_array[$j])){ $gallery_id = $gallery_array[$j]['gallery_id']; $thumb_src = GALLERY_SIMG_DIR.$gallery_array[$j]['image']; $table.="<a href=\"viewPhoto.php?galleryId=$gallery_id&artistId=$artist_id&pgnum=$pgnum\"><img src=\"$thumb_src\" class=\"thumbBorder\" hspace=\"8\" vspace=\"8\"></a><br>\n"; } $table.="</td>\n"; $colcount++; if(($colcount==$numcol)||($i==GALLERY_IMGS_PER_PAGE-1)){//close table $colcount =0; $table.="</tr>\n"; $table.="</table>\n"; } $i++; } } ?><br> <table width="700" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"><a href="gallery.php"><img src="images/home.gif" border="0" hspace="10"></a></td> <td align="right" valign="top" width="468"> <?php include_once('includes/ads/468x60.php'); ?> </td> </tr> <tr> <td colspan="2"> <div class="title"> <?echo $artist_name;?></div> <? if(!empty($location)){ echo $location."<br><br>"; } if(!empty($description)){ echo $description."<br><br>"; } ?><?echo $pgnav;?><br> </td> </tr> </table> <div class="title"> <?echo $table;?> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?></div>