-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathsig.php
More file actions
28 lines (20 loc) · 750 Bytes
/
sig.php
File metadata and controls
28 lines (20 loc) · 750 Bytes
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
<?php
// Thanks to Cygnix
// Created by Lemmmy
require_once("p/.priv.php");
function __autoload($class_name) {
$directory = 'class/';
if (file_exists($directory . $class_name . '.php')) {
require_once ($directory . $class_name . '.php');
return;
}
}
$api = new OsuAPI(constant("AKEY"));
$user = $api->getUserForMode($_GET['uname'], isset($_GET['mode']) ? $_GET['mode'] : 0);
if (!$user) {
$errorImage = new ErrorImage();
$errorImage->generate("User not found", "The user you tried to generate \na signature for was not found.");
}
$colour = isset($_GET['colour']) && !empty($_GET['colour']) ? $_GET['colour'] : 'pink';
$sig = new OsuSignature($user, 'TemplateNormal');
$sig->generate(PredefinedColours::getPredefinedColour($colour));