<?php
/**
* Site_view.php
* @author starr-gaming.com
* @copyright 2010
*/
if (!defined("VALID_PHP"))
die('Direct access to this location is not allowed.');
$site_id = intval($_GET['id']);
$site = $sites->getSite($site_id);
$page_title = 'Details for ' . $site['site_name'];
if(!$site)
$msg_error[] = 'The Server you are looking for cannot be found.';
?>
<?php display_message(); ?>
<?php if(empty($msg_error)): ?>
<h1><?php echo $page_title; ?></h1>
<a href="/index.php?page=out&id=<?php echo $site['site_id']; ?>"><img src="<?php echo ($site['site_banner']) ? $site['site_banner'] : '/images/no_banner.jpg'; ?>" alt="<?php echo $site['site_name']; ?>" /></a>
<div style="float: left; width: 300px;">
<h2>Summary</h2>
<table class="box wide">
<tbody>
<tr>
<td><strong>URL:</strong></td>
<td><a href="/index.php?page=out&id=<?php echo $site['site_id']; ?>"><?php echo $site['site_url']; ?></a></td>
</tr>
<tr>
<td><strong>Votes:</strong></td>
<td><?php echo $site['site_votes']; ?></td>
</tr>
<tr>
<td><strong>In/Outs:</strong></td>
<td><?php echo $site['site_clicks']; ?></td>
</tr>
<tr>
<td><strong>Vote:</strong></td>
<td><a href="/index.php?page=in&id=<?php echo $site['site_id']; ?>"><img src="/images/thumb_up.png" /></a></td>
</tr>
</tbody>
</table>
</div>
<div style="float: left; width: 450px;">
<h2>Statistics</h2>
<table class="box wide">
<thead>
<tr>
<td></td>
<td>Today</td>
<td>Last 7 Days</td>
<td>Last 30 Days</td>
<td>Total</td>
</tr>
</thead>
<tbody>
<tr>
<th>Votes:</th>
<td><?php echo $sites->getVotes($site_id, "=0") ?></td>
<td><?php echo $sites->getVotes($site_id, "<=7") ?></td>
<td><?php echo $sites->getVotes($site_id, "<=30") ?></td>
<td><?php echo $site['site_votes_total'] ?></td>
</tr>
<tr>
<th>Votes:</th>
<td><?php echo $sites->getClicks($site_id, "=0") ?></td>
<td><?php echo $sites->getClicks($site_id, "<=7") ?></td>
<td><?php echo $sites->getClicks($site_id, "<=30") ?></td>
<td><?php echo $site['site_clicks_total'] ?></td>
</tr>
</tbody>
</table>
</div>
<br clear="left" />
<div style="float: left; width: 450px;">
<h2>Description</h2>
<table class="box wide">
<tbody>
<tr>
<td>
<?php echo strlen($site['site_description']) > 0 ? $site['site_description'] : 'No Description' ?>
</td>
</tr>
</tbody>
</table>
</div>
<?php if($settings->set['site_ads'] == 'On'): ?>
<div style="float: left; width: 300px;">
<?php include(BASE . "banners/square_banner.php"); ?>
</div>
<?php endif; ?>
<br clear="left" />
<?php endif; ?>