dashboard\primary\error("Failed to delete message!"), 'success' => dashboard\primary\success("Successfully deleted message!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['muteuser'])) { $muted = misc\etc\sanitize($_POST['muted']); $time = misc\etc\sanitize($_POST['time']); $time = $time * $muted + time(); $resp = misc\chat\muteUser($_POST['user'], $time); match($resp){ 'missing' => dashboard\primary\error("User doesn't exist!"), 'failure' => dashboard\primary\error("Failed to mute user!"), 'success' => dashboard\primary\success("Successfully muted user!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['unmuteuser'])) { $resp = misc\chat\unMuteUser($_POST['user']); match($resp){ 'failure' => dashboard\primary\error("Failed to unmute user!"), 'success' => dashboard\primary\success("Successfully unmuted user!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['clearchannel'])) { $resp = misc\chat\clearChannel($_POST['channel']); match($resp){ 'failure' => dashboard\primary\error("Failed to clear channel!"), 'success' => dashboard\primary\success("Successfully cleared channel!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['deleteallchatchannels'])){ $resp = misc\chat\deleteAllChannels(); match($resp){ 'failure' => dashboard\primary\error("Failed to delete all chat channels!"), 'success' => dashboard\primary\success("Successfully deleted all chat channels!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['editchan'])) { $chan = misc\etc\sanitize($_POST['editchan']); $query = misc\mysql\query("SELECT * FROM `chats` WHERE `name` = ? AND `app` = ?", [$chan, $_SESSION['app']]); if ($query->num_rows < 1) { dashboard\primary\error("Channel not found!"); echo ""; return; } ?>
affected_rows > 0) { // check query impacted something, else show error dashboard\primary\success("Successfully updated channel!"); } else { dashboard\primary\error("Failed To update channel!"); } } if (isset($_POST['deletechan'])) { $resp = misc\chat\deleteChannel($_POST['deletechan']); match($resp){ 'failure' => dashboard\primary\error("Failed to delete channel!"), 'success' => dashboard\primary\success("Successfully deleted channel!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['addchannel'])) { if ($_SESSION['role'] != "seller") { dashboard\primary\error("You must upgrade to seller to create chat channels"); } else { $unit = misc\etc\sanitize($_POST['unit']); $delay = misc\etc\sanitize($_POST['delay']); $delay = $delay * $unit; $resp = misc\chat\createChannel($_POST['name'], $delay); match($resp){ 'failure' => dashboard\primary\error("Failed to create channel!"), 'success' => dashboard\primary\success("Successfully created channel!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } } ?>Allow your users to chat with each other. Learn More.
| Chat Name | Message Delay | Actions |
|---|---|---|
| = $chan; ?> | = dashboard\primary\time2str(time() - $row["delay"]); ?> |
Dropdown actions in RED do not show a confirmation! Dropdown actions in BLUE will show a confirmation!
| Author | Message | Time Sent | Channel | Actions |
|---|---|---|---|---|
| = $user; ?> | = $row["message"]; ?> | = $row["channel"]; ?> |
Dropdown actions in RED do not show a confirmation! Dropdown actions in BLUE will show a confirmation!