IsOwner())) { die('bababooey'); } adminPanelStats(); $alert = ""; if (isset($_POST['setannouncement'])) { if (empty($_POST['setannouncement'])) { //clear current announcement $setsecmd5 = $pdo->prepare('UPDATE websettings SET announcement = "", announcement_color = ""'); $setsecmd5->execute(); } else { $count = count($_POST); //post variable count if ($count < 2) { $alert = ""; } else { if ($count > 2) { $alert = ""; } else { $color = ""; if ($_POST['blue_checkbox']) { $color = "blue"; } elseif ($_POST['green_checkbox']) { $color = "green"; } elseif ($_POST['red_checkbox']) { $color = "red"; } $setsecmd5 = $pdo->prepare("UPDATE websettings SET announcement = :m, announcement_color = :c"); $setsecmd5->bindParam(":m", $_POST['setannouncement'], PDO::PARAM_STR); $setsecmd5->bindParam(":c", $color, PDO::PARAM_STR); $setsecmd5->execute(); } } } } $body = << {$alert}
Create Announcement
EOT; pageHandler(); $ph->pagetitle = ""; $ph->navbar = ""; $ph->body = $body; $ph->footer = ""; $ph->output();