Example #1
0
                $template->setBotCode($_POST['botcode']);
                $template->save();
                Logger::welcomeTemplateEdited($database, $template);
                SessionAlert::success("Template updated.");
                Notification::welcomeTemplateEdited($template);
            });
            header("Location: {$baseurl}/acc.php?action=templatemgmt");
            die;
        } else {
            $smarty->assign("template", $template);
            $smarty->display("welcometemplate/edit.tpl");
            BootstrapSkin::displayInternalFooter();
            die;
        }
    }
    $templateList = WelcomeTemplate::getAll();
    $smarty->assign("templatelist", $templateList);
    $smarty->display("welcometemplate/list.tpl");
    BootstrapSkin::displayInternalFooter();
    die;
} elseif ($action == "sban") {
    global $smarty;
    // Checks whether the current user is an admin.
    if (!User::getCurrent()->isAdmin() && !User::getCurrent()->isCheckuser()) {
        BootstrapSkin::displayAccessDenied();
        BootstrapSkin::displayInternalFooter();
        die;
    }
    // Checks whether there is a reason entered for ban.
    if (!isset($_POST['banreason']) || $_POST['banreason'] == "") {
        BootstrapSkin::displayAlertBox("You must specify a ban reason", "alert-error", "", false, false);
Example #2
0
 /**
  * Summary of welcomeTemplateEdited
  * @param WelcomeTemplate $template
  */
 public static function welcomeTemplateEdited(WelcomeTemplate $template)
 {
     self::send("Welcome template {$template->getId()} edited by " . User::getCurrent()->getUsername());
 }