$output .= ' <h1>' . $lang_motd['edit_motd'] . '</h1>'; } elseif (4 == $err) { $output .= ' <h1>' . $lang_motd['add_motd'] . '</h1>'; } else { $output .= ' <h1>' . $lang_index['motd'] . '</h1>'; } $output .= ' </div>'; // $_GET and SECURE $action = isset($_GET['action']) ? $_GET['action'] : NULL; // define functions to be called by actions if ('delete_motd' == $action) { delete_motd($sqlm); } elseif ('add_motd' == $action) { add_motd($sqlm); } elseif ('do_add_motd' == $action) { do_add_motd($sqlm); } elseif ('edit_motd' == $action) { edit_motd($sqlm); } elseif ('do_edit_motd' == $action) { do_edit_motd($sqlm); } else { motd($sqlm); } // close whats not needed anymore unset($err); unset($action); unset($action_permission);
<h1><span class="error">' . lang("motd", "err_max_len") . '</span></h1>'; } elseif ($err == 3) { $output .= ' <h1>' . lang("motd", "edit_motd") . '</h1>'; } elseif ($err == 4) { $output .= ' <h1>' . lang("motd", "add_motd") . '</h1>'; } else { $output .= ' <h1>' . lang("motd", "browse_motd") . '</h1>'; } unset($err); $output .= ' </div>'; if ($action == "delete_motd") { delete_motd(); } elseif ($action == "add_motd") { add_motd(); } elseif ($action == "add_preview") { add_motd(); } elseif ($action == "do_add_motd") { do_add_motd(); } elseif ($action == "edit_motd") { edit_motd(); } elseif ($action == "edit_preview") { edit_motd(); } elseif ($action == "do_edit_motd") { do_edit_motd(); } else { browse_motd(); }