Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
var
/
www
/
ridazz
/
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
//var/www/ridazz/sexiestPhoto.php
<? include_once('includes/static/configure.php'); include_once('includes/static/dbcon2.php'); include_once('includes/static/sessions.php'); include_once('includes/static/adminutil.php'); //$sql = "SELECT AVG(vote) as average,COUNT(vote),v.artist_id,v.gallery_id,g.image FROM 50mm_gallery_votes v,50mm_artists a, 50mm_gallery g WHERE v.artist_id = a.artist_id AND v.gallery_id = g.gallery_id AND (TO_DAYS(NOW()) - TO_DAYS(v.entry_time)) <= ".GALLERY_VOTE_SAMPLE_DAYS." GROUP BY v.gallery_id HAVING COUNT(vote) >= ".GALLERY_VOTES_REQUIRED." ORDER BY average DESC LIMIT 1"; //$sql = "SELECT AVG(vote) as average, COUNT(vote), v.artist_id, v.gallery_id, g.image FROM 50mm_gallery_votes v WHERE (TO_DAYS(NOW()) - TO_DAYS(v.entry_time)) <= ".GALLERY_VOTE_SAMPLE_DAYS." GROUP BY v.gallery_id HAVING COUNT(vote) >= ".GALLERY_VOTES_REQUIRED." ORDER BY average DESC LIMIT 1 JOIN 50mm_artists a ON v.artist_id = a.artist_id JOIN 50mm_gallery g ON v.gallery_id = g.gallery_id"; //$sql = "SELECT AVG(vote) as average, COUNT(vote), v.artist_id, v.gallery_id, g.image FROM 50mm_gallery_votes v JOIN 50mm_gallery g ON v.gallery_id = g.gallery_id JOIN 50mm_artists a ON a.artist_id = g.artist_id WHERE (TO_DAYS(NOW()) - TO_DAYS(v.entry_time)) <= ".GALLERY_VOTE_SAMPLE_DAYS." GROUP BY v.gallery_id HAVING COUNT(vote) >= ".GALLERY_VOTES_REQUIRED." ORDER BY average DESC LIMIT 1 "; $sql = "SELECT AVG(vote) as average, COUNT(vote), v.artist_id, v.gallery_id, g.image FROM 50mm_gallery_votes v JOIN 50mm_gallery g ON v.gallery_id = g.gallery_id JOIN 50mm_artists a ON a.artist_id = g.artist_id WHERE (TO_DAYS(NOW()) - TO_DAYS(v.entry_time)) <= ".GALLERY_VOTE_SAMPLE_DAYS." GROUP BY v.gallery_id HAVING COUNT(vote) >= ".GALLERY_VOTES_REQUIRED." ORDER BY average DESC LIMIT 1 "; $db = new sql_db2(); $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $gid = $row['gallery_id']; $aid = $row['artist_id']; if(!empty($row['image'])){ if(is_file(ROOT_DIR.GALLERY_LIMG_DIR.$row['image'])){ $img_info = getimagesize(ROOT_DIR.GALLERY_LIMG_DIR.$row['image']); //width is greater so scale width if($img_info[0] > $img_info[1]){ $scale = $img_info[0]/420; }else{ $scale = $img_info[1]/420; } $w = round($img_info[0]/$scale); $h = round($img_info[1]/$scale); $html = '<a href="viewPhoto.php?artistId='.$aid.'&galleryId='.$gid.'"><img src="'.GALLERY_LIMG_DIR.$row['image'].'" border="0" width="'.$w.'" height="'.$h.'" style="cursor:pointer;"></a>'; }else{ $html = "no image on disk"; } echo $html; } ?>