} 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); unset($lang_motd); unset($lang_index);
$output .= ' <h1> <font class="error">' . $lang_motd['err_max_len'] . '</font> </h1>'; } elseif (3 == $err) { $output .= ' <h1>' . $lang_motd['edit_motd'] . '</h1>'; } else { $output .= ' <h1>' . $lang_motd['add_motd'] . '</h1>'; } unset($err); $output .= '</div>'; $action = isset($_GET['action']) ? $_GET['action'] : NULL; 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 { add_motd(); } unset($action); unset($action_permission); unset($lang_motd); require_once 'footer.php';