summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/index.php19
-rw-r--r--src/version.php11
2 files changed, 28 insertions, 2 deletions
diff --git a/public/index.php b/public/index.php
index 1b1c33b..11f48ee 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,6 +1,8 @@
<?php
include_once "../src/config.php";
include_once "../src/accounts.php";
+include_once "../src/version.php";
+
authorize_user();
?>
@@ -44,8 +46,21 @@ authorize_user();
?>
</div>
- <p style="font-size:12px;">Serving <?php echo $count ?> gorillion emotes - Running <a
- href="https://github.com/ilotterytea/alrighttv">AlrightTV v0.1</a></p>
+ <p style="font-size:12px;">
+ Serving <?php echo $count ?> gorillion emotes -
+ Running
+ <?php
+ echo '<a href="' . TINYEMOTES_LINK . '">';
+ echo sprintf("%s v%s", TINYEMOTES_NAME, TINYEMOTES_VERSION);
+ echo '</a> ';
+
+ if (TINYEMOTES_COMMIT != null) {
+ echo '<a href="' . sprintf("%s/tree/%s", TINYEMOTES_LINK, TINYEMOTES_COMMIT) . '">(Commit ';
+ echo substr(TINYEMOTES_COMMIT, 0, 7);
+ echo ')</a>';
+ }
+ ?>
+ </p>
</div>
</div>
</body>
diff --git a/src/version.php b/src/version.php
new file mode 100644
index 0000000..7dacf0b
--- /dev/null
+++ b/src/version.php
@@ -0,0 +1,11 @@
+<?php
+// please leave it as it is ;)
+define("TINYEMOTES_NAME", "TinyEmotes");
+define("TINYEMOTES_VERSION", "0.1");
+define("TINYEMOTES_LINK", "https://github.com/ilotterytea/tinyemotes");
+
+if ($s = file_get_contents("../.git/refs/heads/master")) {
+ define("TINYEMOTES_COMMIT", $s);
+} else {
+ define("TINYEMOTES_COMMIT", null);
+} \ No newline at end of file