53 lines
2.4 KiB
PHP
53 lines
2.4 KiB
PHP
|
<?php
|
||
|
if($_SERVER['SCRIPT_FILENAME'] === __FILE__)
|
||
|
die('no');
|
||
|
|
||
|
if(empty($tPageTitle))
|
||
|
$tPageTitle = SERIA_FLASHII . ' Tracker';
|
||
|
else
|
||
|
$tPageTitle = $tPageTitle . ' :: ' . SERIA_FLASHII . ' Tracker';
|
||
|
|
||
|
$isLoggedIn = $sUserInfo->isLoggedIn();
|
||
|
?>
|
||
|
<!doctype html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8"/>
|
||
|
<title><?=$tPageTitle;?></title>
|
||
|
<link href="/seria.css" type="text/css" rel="stylesheet"/>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="wrapper">
|
||
|
<nav class="header">
|
||
|
<?php
|
||
|
if($isLoggedIn):
|
||
|
$hTransferCount = $sUserInfo->getActiveTransferCounts();
|
||
|
$hTransferRatio = $sUserInfo->calculateRatio();
|
||
|
?>
|
||
|
<div class="header-stats">
|
||
|
<a href="/profile.php?name=<?=$sUserInfo->getName();?>"><?=$sUserInfo->getName();?></a>
|
||
|
· <a href="/history.php">R: <span style="color: <?=seria_ratio_colour($hTransferRatio);?>;"><?=number_format($hTransferRatio, 3);?></span></a>
|
||
|
· <a href="/history.php?filter=uploaded"><span style="color: green;">U:</span> <?=byte_symbol($sUserInfo->getBytesUploaded());?></a>
|
||
|
· <a href="/history.php?filter=downloaded"><span style="color: red;">D:</span> <?=byte_symbol($sUserInfo->getBytesDownloaded());?></a>
|
||
|
· <a href="/history.php?filter=uploading"><span style="color: green;">↑</span> <?=number_format($hTransferCount->user_uploading);?></a>
|
||
|
· <a href="/history.php?filter=downloading"><span style="color: red;">↓</span> <?=number_format($hTransferCount->user_downloading);?></a>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
<div class="header-logo"><a href="/"><?=SERIA_FLASHII;?> Tracker</a></div>
|
||
|
<div class="header-menu">
|
||
|
<?php if(!$isLoggedIn): ?>
|
||
|
<a href="<?=SERIA_CAUTH_LOGIN;?>">Log in</a>
|
||
|
<?php else: ?>
|
||
|
<a href="/settings.php">Settings</a>
|
||
|
<?php endif; ?>
|
||
|
<a href="/available.php">Available Downloads</a>
|
||
|
<?php if($sUserInfo->canCreateTorrents()): ?>
|
||
|
<a href="/create.php">Create Torrent</a>
|
||
|
<?php endif; ?>
|
||
|
<?php if($sUserInfo->canApproveTorrents()): ?>
|
||
|
<a href="/pending.php">Pending Torrents</a>
|
||
|
<?php endif; ?>
|
||
|
</div>
|
||
|
</nav>
|
||
|
<div class="wrapper-body">
|