summaryrefslogtreecommitdiff
path: root/functions.php
blob: 8a31111a6b5d6d20d1487408171f9cdb5fade957 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

require __DIR__ . '/views/tools/untrack/resolve.php';
require __DIR__ . '/views/tools/zeitumstellung/vendor/autoload.php';

function get_faces(){
	return json_decode( file_get_contents( __DIR__ . '/views/tools/faces/faces.json' ), true );
}

function get_dances(){
	return json_decode( file_get_contents( __DIR__ . '/views/tools/bpm/dances.json' ), true );
}

function str_starts_with( $haystack, $needle ) {
     $length = strlen( $needle );
     return substr( $haystack, 0, $length ) === $needle;
}

function str_ends_with( $haystack, $needle) {
    $len = strlen($needle);
    if ($len == 0) {
        return true;
    }
    return substr($haystack, -$len) === $needle;
}

function get_ghrss_feeds() {
	require_once __DIR__ . '/views/tools/ghrss/ghrss.db.php';
	$result = $db->query("SELECT name FROM language ORDER BY name;");
	return $result->fetchAll();
}