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/index.php.old
<?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'); ?> <? //content $sql = "SELECT page_body FROM 50mm_pages WHERE page_name ='index'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); echo stripslashes($row['page_body']); ?> <br><br> <div class="borderLines" height="1"><img src="images/spacer.gif" width="100%" height="1"></div> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr valign="top"> <td width="50%" style="padding:10px;"> Top Rated Gallery:<br> <br> <br> <br> Upcoming Events:<br> <br> <? //events $today = date('Y-m-d'); $sql="SELECT story_id, story_title, story_body, u.user_id, s.entry_time, username FROM 50mm_stories s LEFT JOIN 50mm_users u ON s.user_id = u.user_id WHERE s.story_type = 'EVENT' AND approved = 1 AND s.entry_time >= '$today' ORDER BY s.entry_time ASC LIMIT ".EVENT_NUM_HOME; if( !($story_result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $html = ""; while($row = $db->sql_fetchrow($story_result)){ $story_id = $row['story_id']; $imgsql = "SELECT image FROM 50mm_embed WHERE story_id = '$story_id' LIMIT 1"; if( !($imgresult = $db->sql_query($imgsql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $html.='<table cellpadding="0" cellspacing="0" border="0" width="100%">'."\n"; $html.='<tr valign="top">'."\n"; $html.='<td>'."\n"; $html.='<div class="title">'.$row['story_title'].'</div><br>'."\n"; $imgrow = $db->sql_fetchrow($imgresult); if(!empty($imgrow['image'])){ if(is_file(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image'])){ $img_info = getimagesize(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image']); //width is greater so scale width if($img_info[0] > $img_info[1]){ $scale = $img_info[0]/150; }else{ $scale = $img_info[1]/150; } $w = round($img_info[0]/$scale); $h = round($img_info[1]/$scale); $html.= '<a href="viewStory.php?storyId='.$row['story_id'].'"><img src="'.STORY_SIMG_DIR.$imgrow['image'].'" border="0" hspace="15" align="right" width="'.$w.'" height="'.$h.'" style="cursor:pointer;"></a>'; }else{ $html.= "no image on disk"; } } //$unix = get_unix_time($row['entry_time']); //$date = date("m.j.y",$unix); //$html.='Posted '.$date.' by '.'<a href="viewProfile.php?userId='.$row['user_id'].'">'.$row['username'].'</a><br><br>'."\n"; $html.= get_html_text(get_trim_string($row['story_body'],250))."\n"; $html.= '<br><a href="viewStory.php?storyId='.$row['story_id'].'"><br>[ Read More... ]</a><br><br>'."\n"; $html.='</td>'."\n"; $html.='</tr>'."\n"; $html.='</table>'."\n"; $html.='<br><br>'."\n"; } echo $html; ?><img src="images/spacer.gif" width="100%" height="1">Articles:<br> <br> <? //grab articles. $sql="SELECT story_id, story_title, story_body, u.user_id, s.entry_time, username FROM 50mm_stories s LEFT JOIN 50mm_users u ON s.user_id = u.user_id WHERE s.story_type = 'ARTICLE' AND approved = 1 ORDER BY RAND( NOW( ) ) DESC LIMIT ".ARTICLE_NUM_HOME; if( !($story_result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $html = ""; while($row = $db->sql_fetchrow($story_result)){ $story_id = $row['story_id']; $imgsql = "SELECT image FROM 50mm_embed WHERE story_id = '$story_id' LIMIT 1"; if( !($imgresult = $db->sql_query($imgsql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $html.='<table cellpadding="0" cellspacing="0" border="0" width="100%">'."\n"; $html.='<tr valign="top">'."\n"; $html.='<td>'."\n"; $html.='<div class="title">'.$row['story_title'].'</div><br>'."\n"; $imgrow = $db->sql_fetchrow($imgresult); if(!empty($imgrow['image'])){ if(is_file(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image'])){ $img_info = getimagesize(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image']); //width is greater so scale width if($img_info[0] > $img_info[1]){ $scale = $img_info[0]/150; }else{ $scale = $img_info[1]/150; } $w = round($img_info[0]/$scale); $h = round($img_info[1]/$scale); $html.= '<a href="viewStory.php?storyId='.$row['story_id'].'"><img src="'.STORY_SIMG_DIR.$imgrow['image'].'" border="0" hspace="15" align="right" width="'.$w.'" height="'.$h.'" style="cursor:pointer;"></a>'; }else{ $html.= "no image on disk"; } } $unix = get_unix_time($row['entry_time']); $date = date("m.j.y",$unix); //$html.='Posted '.$date.' by '.'<a href="viewProfile.php?userId='.$row['user_id'].'">'.$row['username'].'</a><br><br>'."\n"; $html.= get_html_text(get_trim_string($row['story_body'],450))."\n"; $html.= '<br><a href="viewStory.php?storyId='.$row['story_id'].'"><br>[ Read More... ]</a><br><br>'."\n"; $html.='</td>'."\n"; $html.='</tr>'."\n"; $html.='</table>'."\n"; $html.='<br><br>'."\n"; } echo $html; //legends ?><br> <br> Legend Spotlight:<br> <br> <?php $sql="SELECT story_id, story_title, story_body, u.user_id, s.entry_time, username FROM 50mm_stories s LEFT JOIN 50mm_users u ON s.user_id = u.user_id WHERE s.story_type = 'LEGEND' AND approved = 1 ORDER BY RAND( NOW( ) ) DESC LIMIT ".LEGEND_NUM_HOME; if( !($story_result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $html = ""; while($row = $db->sql_fetchrow($story_result)){ $story_id = $row['story_id']; $imgsql = "SELECT image FROM 50mm_embed WHERE story_id = '$story_id' LIMIT 1"; if( !($imgresult = $db->sql_query($imgsql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $html.='<table cellpadding="0" cellspacing="0" border="0" width="100%">'."\n"; $html.='<tr valign="top">'."\n"; $html.='<td>'."\n"; $html.='<div class="title">'.$row['story_title'].'</div><br>'."\n"; $imgrow = $db->sql_fetchrow($imgresult); if(!empty($imgrow['image'])){ if(is_file(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image'])){ $img_info = getimagesize(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image']); //width is greater so scale width if($img_info[0] > $img_info[1]){ $scale = $img_info[0]/150; }else{ $scale = $img_info[1]/150; } $w = round($img_info[0]/$scale); $h = round($img_info[1]/$scale); $html.= '<a href="viewStory.php?storyId='.$row['story_id'].'"><img src="'.STORY_SIMG_DIR.$imgrow['image'].'" border="0" hspace="15" align="right" width="'.$w.'" height="'.$h.'" style="cursor:pointer;"></a>'; }else{ $html.= "no image on disk"; } } $unix = get_unix_time($row['entry_time']); $date = date("m.j.y",$unix); //$html.='Posted '.$date.' by '.'<a href="viewProfile.php?userId='.$row['user_id'].'">'.$row['username'].'</a><br><br>'."\n"; $html.= get_html_text(get_trim_string($row['story_body'],450))."\n"; $html.= '<br><a href="viewStory.php?storyId='.$row['story_id'].'"><br>[ Read More... ]</a><br><br>'."\n"; $html.='</td>'."\n"; $html.='</tr>'."\n"; $html.='</table>'."\n"; $html.='<br><br>'."\n"; } echo $html; ?><br> <br> </td> <td class="borderLines" width="1"><img height="1" width="1" src="images/spacer.gif" border="0"></td> <td width="50%" style="padding:10px;"> <div class="body"> <img src="images/spacer.gif" width="100%" height="1"><br> <? //youtube $sql = "SELECT page_body FROM 50mm_pages WHERE page_name ='youtube'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); echo stripslashes($row['page_body']); ?> <br> </td> </tr> </table> <div class="borderLines" height="1"><img src="images/spacer.gif" width="100%" height="1"></div> <br> <? //include_once('includes/onlineUsers.php'); include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?><!-- <!--