Skip to content

Commit

Permalink
Merge pull request #18 from mrbobdobolina/release/v3.6.1
Browse files Browse the repository at this point in the history
Release/v3.6.1
  • Loading branch information
mrbobdobolina authored Feb 17, 2022
2 parents 0023850 + 0183d14 commit d7469e3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
10 changes: 9 additions & 1 deletion admin/add-game.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@
$selectorsSelect .= "<option value=\"" . $aTool . "\">" . $aTool . "</option>";
}

$services = getListOfServices();

$servicesSelect = "<option disabled selected></option>";

foreach($services as $aService){
$servicesSelect .= "<option value=\"" . $aService['name'] . "\">" . $aService['name'] . "</option>";
}

?>
<h1 class="display-6 text-center">Add an Event</h1>
<div class="text-center mb-5"></div>
Expand Down Expand Up @@ -258,7 +266,7 @@

<div class="col-12 mb-3">
<label class="form-label">Format</label>
<input class="form-control" type="text" name="format">
<select class="form-select" name="format"><?php echo $servicesSelect; ?></select>
</div>

<div class="col-12 mb-3">
Expand Down
2 changes: 1 addition & 1 deletion admin/add-movie.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<div class="row mb-3">
<label for="name" class="col-4 col-form-label">Movie Name</label>
<div class="col-8">
<input id="name" name="name" type="text" value="<?php if(isset($_POST['sname'])){echo $_POST['sname'];}?>" class="form-control">
<input id="name" name="name" type="text" value="<?php if(isset($_POST['sname'])){echo $movie_info['Title'];}?>" class="form-control">
</div>
</div>
<div class="row mb-3">
Expand Down
12 changes: 6 additions & 6 deletions admin/add-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
include('template/header.php');

?>
<h1 class="display-6 text-center">Add a viewer</h1>
<div class="text-center mb-5">Congrats on your new friend, I guess.</div>
<h1 class="display-6 text-center">Add a service</h1>
<div class="text-center mb-5">I thought you had enough of those...</div>

<?php

Expand Down Expand Up @@ -91,15 +91,15 @@

<div class="card mb-3">
<div class="card-header">
Existing Viewers
Existing Services
</div>
<div class="card-body">
<ul>
<?php

$viewers = getListOfViewers();
foreach($viewers as $person){
echo '<li>'.$person['name'].'</li>';
$services = getListOfServices();
foreach($services as $a_service){
echo '<li>'.$a_service['name'].'</li>';
}

?>
Expand Down
1 change: 1 addition & 0 deletions changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

//Array('date' => "", 'version' => '', 'details' => Array("")),
$changes = Array(
Array('date'=>"February 17, 2022", 'version' => 'Version 3.6.1', 'details' => Array("Bug fixes on admin pages.")),
Array('date'=>"February 6, 2022", 'version' => 'Version 3.6.0', 'details' => Array("Tweaked some admin code to make adding movies easier","Fixed missing spaces","Updated One Hit Wonder counter to ignore viewer choices","Viewers page should work better on mobile now")),
Array('date'=>"February 5, 2022", 'version' => 'Version 3.5.0', 'details' => Array("Added hero section to home page.","Added Poster View", "Changed DB", "Localized snow js", "Decreased chance of flurries", "Minor bug fixes")),
Array('date'=>"January 21, 2022", 'version' => 'Version 3.4.0', 'details' => Array("Cleand up Admin backend.", "Admin pages are now Bootstrap 5 compliant.", "Admin list generation is now written in JavaScript.", "Fixed a few divide by zero errors.")),
Expand Down
9 changes: 8 additions & 1 deletion common.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ function get_service_color_v3($service_name = NULL){
}
}

function getListOfServices($sortBy = 'id', $direction = "DESC"){
$sql = "SELECT * FROM `services` ORDER BY `$sortBy` $direction";
$data = db($sql);

return $data;
}

//reads the db version listed in the DB
function read_db_version(){
$sql = "SELECT * FROM `options` WHERE `name` = 'db_version'";
Expand All @@ -292,7 +299,7 @@ function this_db_version(){
}

function echoVersionNumber(){
echo "3.6.0";
echo "3.6.1";
return;
}

Expand Down

0 comments on commit d7469e3

Please sign in to comment.