-
Notifications
You must be signed in to change notification settings - Fork 1
/
chatinfo.php
49 lines (49 loc) · 2.09 KB
/
chatinfo.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
49
<?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>Chat name:</strong><br>
<input type="text" name="value" placeholder="E.g: xat_test"><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('chatinfo', $_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>Chat ID</strong>: ' . $getResult['chatid'] . '<br>';
echo '<strong>Chat name</strong>: ' . $getResult['name'] . '<br>';
echo '<strong>Description</strong>: ' . $getResult['desc'] . '<br>';
echo '<strong>Chat type</strong>: ' . $getResult['chatType'] . '<br>';
echo '<strong>Status</strong>: ' . $getResult['chatStatus'] . '<br>';
echo '<strong>Background</strong>: ' . $getResult['background'] . '<br>';
echo '<strong>Tabbed Chat</strong>: ' . $getResult['tabbedChatName'] . ' [' . $getResult['tabbedChatId'] . ']<br>';
echo '<strong>Default language</strong>: ' . $getResult['language'] . '<br>';
echo '<strong>Radio IP/port</strong>: ' . $getResult['radio'] . '<br>';
echo '<strong>Buttons color</strong>: <span color="' . $getResult['buttons'] . '">' . $getResult['buttons'] . '</span><br>';
echo '<strong>Bot ID</strong>: ' . $getResult['botid'] . '<br>';
echo '<strong>Flags</strong>: ' . $getResult['flags'] . '<br>';
echo '<strong>Connection IP</strong>: ' . $getResult['connIP'] . '<br>';
echo '<strong>Connection port</strong>: ' . $getResult['connPort'];
} else {
echo 'Error: ' . $getResult['message'];
}
}
}
}
?>
</body>
</html>