-
Notifications
You must be signed in to change notification settings - Fork 1
/
chatprice.php
34 lines (34 loc) · 1012 Bytes
/
chatprice.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
<?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: Gold"><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('chatprice', $_POST['value']);
if(!$getResult) {
echo '<font color=red>Something is wrong please check if it\'s working..</font>';
} else {
$text = 'The price of this chat is ';
$text = $getResult['status'] == 'OK' ? $text : 'Error: ';
echo $text . $getResult['message'];
}
}
}
?>
</body>
</html>