Browse Source

hgffghfrghertyherhytdtyhj

master
Cerys 1 month ago
parent
commit
e03709fa11
  1. 3
      Pages/profile.php
  2. 22
      Public/API/V1/GetMIDIFile.php
  3. 2
      Public/Static/CSS/Elements/Rating.css
  4. 2
      Public/Static/JS/ThirdParty/midijs.js
  5. 10
      Templates/Pages/tune/uuid.html.twig

3
Pages/profile.php

@ -16,6 +16,9 @@ $yourTunes = $db->RunSelect(
table: 'Tunes' table: 'Tunes'
) )
->where(cond: 'T.CreatedBy LIKE :__user_id__') ->where(cond: 'T.CreatedBy LIKE :__user_id__')
->orderBy(spec: [
'T.Title ASC',
])
->bindValue(name: '__user_id__', value: SessionWrapper::Get(target: SessionElement::USER_ID)) ->bindValue(name: '__user_id__', value: SessionWrapper::Get(target: SessionElement::USER_ID))
); );

22
Public/API/V1/GetMIDIFile.php

@ -0,0 +1,22 @@
<?php
use App\Dataclasses\DatabaseFolkTuneDetails;
use App\Wrappers\DatabaseInteractions;
use App\Wrappers\SQLQueryBuilderWrapper;
require_once __DIR__ . "/../../../vendor/autoload.php";
$targetTuneID = $_GET['tune-id'];
$db = new DatabaseInteractions();
$tuneDetails = $db->RunOneSelect(
queryBuilder: SQLQueryBuilderWrapper::SELECT_ONE(
table: 'Tunes',
id: $targetTuneID
)
);
header(header: "Content-type: audio/midi");
echo $tuneDetails['MIDIData'];
die();

2
Public/Static/CSS/Elements/Rating.css

@ -1,6 +1,4 @@
#RatingContainer { #RatingContainer {
text-align: center;
font-family: Arial, sans-serif;
} }
.RatingButtons { .RatingButtons {

2
Public/Static/JS/ThirdParty/midijs.js

File diff suppressed because one or more lines are too long

10
Templates/Pages/tune/uuid.html.twig

@ -3,6 +3,9 @@
{% block content %} {% block content %}
<script src="/Static/JS/ThirdParty/abcjs-basic.js"></script> <script src="/Static/JS/ThirdParty/abcjs-basic.js"></script>
<script src="/Static/JS/ThirdParty/midijs.js"></script>
<!--<script src="/Static/JS/ThirdParty/abcjs-plugin-min.js"></script>--> <!--<script src="/Static/JS/ThirdParty/abcjs-plugin-min.js"></script>-->
<link rel="stylesheet" href="/Static/CSS/ThirdParty/abcjs-audio.css"> <link rel="stylesheet" href="/Static/CSS/ThirdParty/abcjs-audio.css">
@ -43,18 +46,13 @@
<div class="ThreeDContainer"> <div class="ThreeDContainer">
<h2>{{ "Audio"|translate }}</h2> <h2>{{ "Audio"|translate }}</h2>
<div id="MIDI--{{ TuneDetails.ID }}"></div> <button onclick="MIDIjs.play('/API/V1/GetMIDIFile.php?tune-id={{ TuneDetails.ID }}');">{{ "Play"|translate }}</button>
</div> </div>
<div class="ThreeDContainer"> <div class="ThreeDContainer">
<div class="DLContainer"> <div class="DLContainer">
<h2>{{ "Tune Overview"|translate }}</h2> <h2>{{ "Tune Overview"|translate }}</h2>
<dl> <dl>
<dt>{{ "Time Signature"|translate }}</dt>
<dd>{{ TuneDetails.TimeSignature }}</dd>
<dt>{{ "Key Signature"|translate }}</dt>
<dd>{{ TuneDetails.KeySignature }}</dd>
<dt>{{ "Copyright"|translate }}</dt> <dt>{{ "Copyright"|translate }}</dt>
<dd>{{ TuneDetails.Copyright }}</dd> <dd>{{ TuneDetails.Copyright }}</dd>

Loading…
Cancel
Save