$TPL["_FORM"] = $options; include_template("templates/projectTaskS.tpl"); } function show_import_export($template) { include_template($template); } // END FUNCTIONS $current_user =& singleton("current_user"); $projectID = $_POST["projectID"] or $projectID = $_GET["projectID"]; $project = new project(); if ($projectID) { $project->set_id($projectID); $project->select(); $new_project = false; if (!$project->have_perm(PERM_UPDATE)) { $TPL["message_help"][] = "Project is read-only for you."; } } else { $new_project = true; } if ($_POST["save"]) { $project->read_globals(); if (!$project->get_id()) { // brand new project $definitely_new_project = true; } if (!$project->get_value("projectName")) { alloc_error("Please enter a name for the Project."); } // enforced at the database, but show a friendlier error here if possible