/** * Wrapper to call required function(s) to generate current active form. * @since 2.0.0 * @version 2.1.0 * @return void */ function get_form() { global $hc_cfg, $eID, $lID; if (HCCOM == '') { return 0; } switch (HCCOM) { case 'send': send_to_friend(); break; case 'signup': news_signup(); break; case 'edit': news_edit(); break; case 'filter': filter(); break; case 'search': search(); break; case 'searchresult': search_result(); break; case 'submit': if ($eID > 0 || isset($_GET['sID'])) { submit_update(); } else { submit(); } break; case 'rsvp': rsvp(); break; } }
} else { include "../views/admin_add.php"; } } else { if ($action == 'delete') { $id = $_GET['id']; if (!empty($id)) { news_delete($link, $id); header("Location: admin.php"); } } else { if ($action == 'edit') { $id = $_GET['id']; if (!empty($id)) { if (!empty($_POST['submit'])) { news_edit($link, $id, $_POST['title'], $_POST['text'], $_POST['author']); header("Location: admin.php"); } else { $article = news_get($link, $id); } include "../views/admin_edit.php"; } } else { if ($action == 'filter') { if (isset($_POST['submit'])) { if (empty($_POST['title']) && empty($_POST['author']) && empty($_POST['datefirst']) && empty($_POST['datelast'])) { header("Location: admin.php"); } else { $title = ""; $author = ""; $datefirst = "";
<?php # --------------------------------------------------------------------- # rth is a requirement, test, and bugtracking system # Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details #---------------------------------------------------------------------- # ------------------------------------ # News Edit Action Page # # $RCSfile: news_edit_action.php,v $ $Revision: 1.2 $ # ------------------------------------ include "./api/include_api.php"; auth_authenticate_user(); $redirect_page = 'home_page.php'; $edit_page = 'project_manage_page.php'; session_validate_form_set($_POST, $edit_page); #### Call api function to add/update database passing in form field values #### news_edit($_POST['project_id'], $_POST['news_id'], $_POST['poster'], session_validate_form_get_field('subject'), session_validate_form_get_field('body')); html_print_operation_successful('news_edit_page', $redirect_page); # ------------------------------------ # $Log: news_edit_action.php,v $ # Revision 1.2 2007/11/20 09:52:25 cryobean # fixed disappearing news bug # # Revision 1.1.1.1 2005/11/30 23:00:57 gth2 # importing initial version - gth # # ------------------------------------