Backend for songs.zachdecook.com
* Prosongsa: Prepare to license
| -rw-r--r-- | functions.js | 17 | ||||
| -rwxr-xr-x | index.php | 5 | ||||
| -rw-r--r-- | page.js | 12 | ||||
| -rw-r--r-- | source.php | 13 |
4 files changed, 24 insertions, 23 deletions
diff --git a/functions.js b/functions.js deleted file mode 100644 index 63480a3..0000000 --- a/functions.js +++ /dev/null @@ -1,17 +0,0 @@ -function array_flip (trans) { // eslint-disable-line camelcase - // discuss at: http://locutus.io/php/array_flip/ - // original by: Kevin van Zonneveld (http://kvz.io) - // improved by: Pier Paolo Ramon (http://www.mastersoup.com/) - // improved by: Brett Zamir (http://brett-zamir.me) - // example 1: array_flip( {a: 1, b: 1, c: 2} ) - // returns 1: {1: 'b', 2: 'c'} - var key - var tmpArr = {} - for (key in trans) { - if (!trans.hasOwnProperty(key)) { - continue - } - tmpArr[trans[key]] = key - } - return tmpArr -}
\ No newline at end of file @@ -97,6 +97,11 @@ include 'page.php'; ?> <br/><br><br> All songs are owned by their respective copyright holders. No infringement intended. +<br> +Powered by <a href='https://github.com/earboxer/prosongsa'>Prosongsa</a>. +Suggest features <a href='https://github.com/earboxer/prosongsa/issues'>here</a>. +<br> +Licensed under the <a href='LICENSE'></a>. View source <a href='source.php'>here</a>. </div> <!-- <script type="text/javascript" src="../scripts/jqm.js"></script> --> @@ -99,12 +99,12 @@ function zj_transparray( transp ) function transpadd( fromkey, integer ) { - var chords = array_flip( [ "C","C#","D","D#","E","F","F#","G","G#","A","A#","B" ]); - chords["Db"] = chords["C#"]; - chords["Eb"] = chords["D#"]; - chords["Gb"] = chords["F#"]; - chords["Ab"] = chords["G#"]; - chords["Bb"] = chords["A#"]; + var chords = {C:0, Db:1, D:2, Eb:3, E:4, F:5, Gb:6, G:7, Ab:8, A:9, Bb:10, B:11}; + chords["C#"] = chords["Db"]; + chords["D#"] = chords["Eb"]; + chords["F#"] = chords["Gb"]; + chords["G#"] = chords["Ab"]; + chords["A#"] = chords["Bb"]; var ochords = [ "C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B" ]; var val = ochords[(parseInt(chords[fromkey]) + integer + 24)%12]; diff --git a/source.php b/source.php new file mode 100644 index 0000000..cbaf9f4 --- /dev/null +++ b/source.php @@ -0,0 +1,13 @@ +<?php + +$files = scandir('.'); + +foreach( $files as $file ){ + if ( strpos($file, '.php') !== FALSE || strpos($file, '.js') !== FALSE ) + { + echo "<h3>$file</h3>"; + echo '<pre>'; + echo htmlspecialchars(file_get_contents($file)); + echo '</pre>'; + } +} |