You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* We can be sure that channelid is always numeric, this is safe */
$q = mysqli_query($conn, "SELECT settings FROM infobot_discord_settings WHERE id = '" . $channelid . "'");
$obj = mysqli_fetch_object($q);
if ($parent_id == null) {
$parent_id = "NULL";
}
if ($obj) {
if ($name != "") {
mysqli_query($conn, "UPDATE infobot_discord_settings SET name = '".mysqli_real_escape_string($conn, $name)."', parent_id = $parent_id WHERE id = $channelid");
}
returnjson_decode($obj->settings, true);
} else {
mysqli_query($conn, "INSERT INTO infobot_discord_settings (id,guild_id,settings) VALUES($channelid,$guildid,'{}')");
if ($name != "") {
mysqli_query($conn, "UPDATE infobot_discord_settings SET name = '".mysqli_real_escape_string($conn, $name)."', parent_id = $parent_id WHERE id = $channelid");