Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# simpletracker
# Simpletracker (Bootstrap)

`simpletracker` is a minimal implementation of a private BitTorrent tracker,
written in PHP. It supports both the PostgreSQL and MySQL backends. Features include
Expand Down Expand Up @@ -33,3 +33,6 @@ The code has been tested on an Arch Linux server, using nginx (1.10.1), and both
MySQL (10.1.18-MariaDB) and PostgreSQL (9.5.4). Users have also reported the
code working on Windows. Your mileage may vary.

## What's different about this version?
- Bootstrap compatible
- Fixed bugs
285 changes: 0 additions & 285 deletions serve/css/style.css

This file was deleted.

5 changes: 1 addition & 4 deletions serve/download.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

require_once '../site.php';
require_once '../bencoding.php';
$db->connect();
Expand Down Expand Up @@ -34,11 +33,9 @@
$modified['announce'] = $CONFIG['base_url'] . '/announce.php?username=' . urlencode($user_row['username']) . '&torrent_id=' . urlencode($torrent_id) . '&token=' . urlencode($token);

$output = bencode($modified) or die('bencoding error');

header('Cache-control: private');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . strlen($output));
header('Content-Disposition: filename=' . $row['name']);
header('Content-Disposition: attachment; filename="'.basename($row['name']).'"');
echo $output;
}

32 changes: 21 additions & 11 deletions serve/invitations.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@
while ($row = $res->fetch()) {
if (!$any) {
$any = true;
printf('<h1>Invited</h1>');
echo '<h1>Invited</h1><figure class="highlight">';

}
printf('<tt>%s</tt>', html_escape($row['username']));
printf(' / ');
printf(' | ');
printf('<tt>%s</tt>', html_escape($row['email']));
printf('<br/>');
}
echo '</figure>';
if ($any) {
printf('<br/>');
}
Expand All @@ -55,22 +57,30 @@
while ($row = $res->fetch()) {
if (!$any) {
$any = true;
printf('<h1>Invitations</h1>');
printf('<h1>Pending Invitations</h1>');

if (array_key_exists('success', $_GET)) {
printf('<div class="good notification">Invitation successfully created, go ahead and send the corresponding link to your invitee</div>');
}
echo '<div class="row">';
}

printf('<tt>%s</tt>', html_escape($row['email']));
printf(' / ');
printf('<tt>%s</tt>', $row['invitation_key']);
printf(' / ');
printf('<a href="%s/register.php?invite=%s">%s/register.php?invite=%s</a>', $CONFIG['base_url'], $row['invitation_key'], $CONFIG['base_url'], $row['invitation_key']);
printf('<br/>');

?>
<div class="col-md-3">
<div class="card">
<h5 class="card-header">Invitation</h5>
<div class="card-body">
<h5 class="card-title"><?php echo $row['email'];?></h5>
<p class="card-text">Invite Key: <?php echo $row['invitation_key'];?></p>
<a href="<?php echo $CONFIG['base_url'];?>/register.php?invite=<?php echo $row['invitation_key'];?>" class="btn btn-primary">Invite Link</a>
</div>
</div>
</div>
<?php
}
echo '</div>';
if ($any) {
printf('<br/>');
print('<br/>');
}
}

Expand Down
8 changes: 0 additions & 8 deletions serve/js/nav.js

This file was deleted.

Loading