// update session data if the user changes the name of the project that they're currently logged into (the "current project") if ($_SESSION['project_properties']['project_name'] == $current_project_name) { $_SESSION['project_properties']['project_name'] = $new_project_name; $_SESSION['project_properties']['req_upload_path'] = $req_docs_dir; $_SESSION['project_properties']['test_upload_path'] = $test_docs_dir; $_SESSION['project_properties']['test_run_upload_path'] = $test_run_docs_dir; $_SESSION['project_properties']['test_plan_upload_path'] = $test_plan_docs_dir; $_SESSION['project_properties']['defect_upload_path'] = $defect_docs_dir; } // change file upload path project_edit_file_upload_path($project_id, $req_docs_dir, $test_docs_dir, $test_run_docs_dir, $test_plan_docs_dir, $defect_docs_dir); } else { $update_project = false; error_report_show($redirect_page, UNABLE_TO_CREATE_PROJECT_FOLDERS); } } // only update the project if changing the name of the project was successful if ($update_project) { project_edit($project_id, session_validate_form_get_field('project_name_required'), session_validate_form_get_field('project_description'), $_POST['project_status'], isset($_POST[PROJ_SHOW_CUSTOM_1]) ? "Y" : "N", isset($_POST[PROJ_SHOW_CUSTOM_2]) ? "Y" : "N", isset($_POST[PROJ_SHOW_CUSTOM_3]) ? "Y" : "N", isset($_POST[PROJ_SHOW_CUSTOM_4]) ? "Y" : "N", isset($_POST[PROJ_SHOW_CUSTOM_5]) ? "Y" : "N", isset($_POST[PROJ_SHOW_CUSTOM_6]) ? "Y" : "N", isset($_POST[PROJ_SHOW_WINDOW]) ? "Y" : "N", isset($_POST[PROJ_SHOW_OBJECT]) ? "Y" : "N", isset($_POST[PROJ_SHOW_MEM_STATS]) ? "Y" : "N", isset($_POST[PROJ_SHOW_PRIORITY]) ? "Y" : "N", isset($_POST[PROJ_SHOW_TEST_INPUT]) ? "Y" : "N"); } session_validate_form_reset(); html_print_operation_successful("edit_project_page", $redirect_page); # ------------------------------------ # $Log: project_edit_action.php,v $ # Revision 1.2 2006/12/05 04:57:21 gth2 # Allow users to rename project - gth # # Revision 1.1.1.1 2005/11/30 23:00:57 gth2 # importing initial version - gth # # ------------------------------------
<h2><?php echo "项目管理"; ?> <a href="admin.php?page=project_add" class="button add-new-h2"><?php echo "添加项目"; ?> </a></h2> <?php if (isset($_GET['action'])) { $action = $_GET['action']; switch ($action) { case "remove": project_remove($_GET['project_id']); break; case "edit": project_edit($_GET["project_id"], $_POST, $_FILES); break; case "all": project_all($_POST); break; } } ?> <form method="get" action="admin.php"> <p class="search-box"> <input type="hidden" name="page" value="project"/> <input type="text" id="post-search-input" name="tag" value="<?php the_search_query(); ?> " /> <input type="submit" value="<?php
<?php header("Content-Type: text/html; charset=utf-8"); include 'project_function.php'; ?> <div> <h2><?php echo "编辑项目"; ?> </h2> <?php if (isset($_POST["project_name"]) && $_POST["project_name"] != "") { project_edit($_POST, $_FILES); } ?> <form name="project_edit" action="" method="post" enctype="multipart/form-data"> <?php global $wpdb; $table_name = 'xy_project'; $select_sql = "SELECT * FROM " . $table_name . " WHERE project_ID = " . $_GET["project_id"]; //echo $select_sql; $row = $wpdb->get_row($select_sql); //echo $row->project_name; include "project_form.php"; ?> </form> </div>