-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpowerinfo.php
48 lines (48 loc) · 2.07 KB
/
powerinfo.php
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
require_once('_extra/core.php');
?>
<!doctype HTML>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>xat API by Mundosmilies.com</title>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<strong>Power name:</strong><br>
<input type="text" name="value" placeholder="E.g: purple"><br>
<input type="submit" name="submit" value="Submit">
</form>
<br>
<?php
if(isset($_POST['submit']) && $_POST['submit'] == 'Submit') {
if(empty($_POST['value'])) {
echo '<font color=red>Complete all fields required.</font>';
} else {
$getResult = core::getPage('powerinfo', $_POST['value']);
if(!$getResult) {
echo '<font color=red>Something is wrong please check if it\'s working..</font>';
} else {
if($getResult['status'] == 'OK') {
echo '<strong>Power ID</strong>: ' . $getResult['id'] . '<br>';
echo '<strong>Power name</strong>: ' . $getResult['name'] . '<br>';
echo '<strong>Sub description</strong>: ' . $getResult['subdesc'] . '<br>';
echo '<strong>Description</strong>: ' . $getResult['desc'] . '<br>';
echo '<strong>Price</strong>: ' . $getResult['price'] . '<br>';
echo '<strong>Status</strong>: ' . $getResult['pStatus'] . '<br>';
/* Note: ✔ == Yes, ✖ == No */
echo '<strong>Allpowers</strong>: ' . ($getResult['allpowers'] == false ? '✖' : '✔') . '<br>';
echo '<strong>Epic</strong>: ' . ($getResult['epic'] == false ? '✖' : '✔') . '<br>';
echo '<strong>Game</strong>: ' . ($getResult['game'] == false ? '✖' : '✔') . '<br>';
echo '<strong>Group</strong>: ' . ($getResult['group'] == false ? '✖' : '✔') . '<br>';
echo '<strong>New power</strong>: ' . ($getResult['newpower'] == false ? '✖' : '✔') . '<br>';
echo '<strong>Section / SubID</strong>: ' . $getResult['section'] . ' / ' . $getResult['subid'];
} else {
echo 'Error: ' . $getResult['message'];
}
}
}
}
?>
</body>
</html>