+ diff --git a/hub/index.php b/hub/index.php index 7482c03..a5f69c2 100644 --- a/hub/index.php +++ b/hub/index.php @@ -1,3 +1,5 @@ + + diff --git a/hub/redirect.php b/hub/redirect.php index 3a376ae..74686da 100644 --- a/hub/redirect.php +++ b/hub/redirect.php @@ -3,5 +3,5 @@ #require "/home/hpr/php/include.php"; ?> diff --git a/hub/request.php b/hub/request.php index c87c4f3..b0abeff 100644 --- a/hub/request.php +++ b/hub/request.php @@ -26,6 +26,7 @@ if( !isset($row_dupe) or $num_from_this_ip != 0 ) { header('Cache-Control: no-cache'); header('Pragma: no-cache'); header("Status: 412 Precondition Failed"); + include("header.php"); echo "

Existing request detected: "; $timestamp = time()+date("Z"); echo gmdate("Y-m-d\TH:i:s\Z",$timestamp); @@ -63,6 +64,7 @@ if( !isset($row_dupe) or $num_from_this_ip != 0 ) { echo "\n"; echo "
\n"; file_put_contents($naughtyfile, date('Y-m-d\TH:i:s\Z') . "\t" . getUserIPAdress() . "\tExisting Request\t" . $_SERVER['REQUEST_URI'] . "\t" . $_SERVER["HTTP_USER_AGENT"] . "\n" , FILE_APPEND | LOCK_EX ); + include("footer.php"); exit; } @@ -150,14 +152,12 @@ $next_show_num = $next_show_num_array[0] + 1; $next_show_date = date('Y-m-d', strtotime($next_show_num_array[1] . ' + 1 weekday')); $body="give"; //$body="index_full"; -include 'header.html'; +include 'header.php'; ?> - -

Requesting a slot for your show.

Please select your desired slot, and enter a valid email address.
- See our ">help page for more information + See our ">help page for more information

@@ -196,14 +196,12 @@ include 'header.html';
-

You must have your audio recording ready to upload ">before you pick a slot.

+

You must have your audio recording ready to upload ">before you pick a slot.

We will send you an email with a link to where you can upload your show.

-
- diff --git a/hub/request_confirm.php b/hub/request_confirm.php index 6c8077f..f7c45ae 100644 --- a/hub/request_confirm.php +++ b/hub/request_confirm.php @@ -294,12 +294,9 @@ if (!$mailer->send()) { $body="give"; //$body="index_full"; -include 'header.html'; +include 'header.php'; ?> - -
-

Thank you

@@ -324,8 +321,6 @@ include 'header.html';
-
- diff --git a/hub/upload.php b/hub/upload.php index f0f831b..d05ef23 100644 --- a/hub/upload.php +++ b/hub/upload.php @@ -51,7 +51,7 @@ if ( isset( $_GET['delete'] ) ) { call412("35a7f4e80ecba8284049e9d6261ae523"); } else { - header( "Location: https://" . $_SERVER['SERVER_NAME'] . "/calendar.php" ) ; + header( "Location: ${hubBaseurl}calendar.php" ) ; $dir_structure = "/home/hpr/upload/" . strtotime($db_timestamp) . "_${ep_num}_${ep_date}_${db_key}/"; rrmdir("$dir_structure"); exit; @@ -106,15 +106,13 @@ if ( !file_exists( $image_url )) { // $body="give"; //$body="index_full"; -include 'header.html'; +include 'header.php'; ?> -
-
Uploading to the Reserve Queue.

\n"; @@ -130,11 +128,11 @@ include 'header.html';
- + - +
Host Email (" target="_blank">?):Host Email (" target="_blank">?):
Image: (" target="_blank">?)Image: (" target="_blank">?)
"; @@ -180,15 +178,15 @@ include 'header.html';

Please fill in some information about this episode

- + - + - + - + - + - + - + - + - +
Title(*) (" target="_blank">?):Title(*) (" target="_blank">?):
Summary(*) (" target="_blank">?):Summary(*) (" target="_blank">?):
Explicit: (" target="_blank">?)Explicit: (" target="_blank">?) Is the show Explicit ?: Yes @@ -197,7 +195,7 @@ include 'header.html';
License: (" target="_blank">?)License: (" target="_blank">?)
Notes(*) (" target="_blank">?):Notes(*) (" target="_blank">?):
Format: (" target="_blank">?)Format: (" target="_blank">?) What format if any did you just use in the show notes above ?
Series: (" target="_blank">?)Series: (" target="_blank">?)
Tags: (" target="_blank">?)Tags: (" target="_blank">?)
Add a list of comma separated tags.
If you can provide tags for your show that would be appreciated; you are certainly the best judge of what makes good tags, but if not then a volunteer will add them later.
Upload Method: (" target="_blank">?)Upload Method: (" target="_blank">?) You have the choice of the following upload options:

- 1. Upload now via this browser: (" target="_blank">?)
+ 1. Upload now via this browser: (" target="_blank">?)

- 2. Provide a url we we can directly download it from: (" target="_blank">?)
+ 2. Provide a url we we can directly download it from: (" target="_blank">?)
This must be accessable using a curl or wget command.
Please avoid services that require login or downloading via a browser.
@@ -334,7 +332,6 @@ include 'header.html'; }); - diff --git a/hub/upload_confirm.php b/hub/upload_confirm.php index 3b1a62c..67599c7 100755 --- a/hub/upload_confirm.php +++ b/hub/upload_confirm.php @@ -405,12 +405,9 @@ if (!isset($result)) { $body="give"; //$body="index_full"; -include 'header.html'; +include 'header.php'; ?> - -

-

Thank you

@@ -430,8 +427,6 @@ include 'header.html'; HPR Bot

-
- send()) { } -include 'footer.html'; +include 'footer.php'; logextra( "Finished upload_confirm.php"); diff --git a/ini/credentials.php b/ini/credentials.php index 2db9372..3d12d1d 100644 --- a/ini/credentials.php +++ b/ini/credentials.php @@ -11,13 +11,25 @@ $mailerHost = "smtp.example.com"; $mailerUsername = 'robot@example.com'; $mailerPassword = 'THE_SMTP_MAIL_PASSWORD_HERE'; +$generator_name = 'The HPR Robot'; +$generator_email = 'robot.nospam@nospam.hackerpublicradio.org'; + $hubBaseurl = "https://hub.hackerpublicradio.org/"; $baseurl = "https://hackerpublicradio.org/"; - $comment_directory = "/path/to/comments"; $naughtyfile = '/path/to/naughty.txt'; $naughty_stings_file = '/path/to/strings.txt'; $justification_file = '/path/to/justification.txt'; # Read more: http://vidiame.com/php/how-to-block-multiple-ip-addresses-using-php +# The $referrerurl is used for links to pages from the orginating HPR site. +$referrerurl = $baseurl; +session_start(); +if ($_SESSION['referrerurl']) { + $referrerurl = $_SESSION['referrerurl']; +} +else if ($_SERVER["HTTP_REFERER"] && !str_starts_with($_SERVER["HTTP_REFERER"], $hubBaseurl)) { + $_SESSION['referrerurl'] = $_SERVER["HTTP_REFERER"]; + $referrerurl = $_SERVER["HTTP_REFERER"]; +} ?>