<?php require_once dirname(__FILE__) . "/../../../include/master.inc.php"; $error = ""; $success = ""; if (!isLogin()) { redirect(BASEURL . "app/login.php"); } if (isset($_POST['save'])) { if (strlen($_POST['name']) < 2) { $error = "Project Name Too Short."; } else { if (!updateProject($_SESSION['user']['id'], $_POST['id'], $_POST['name'])) { $error = "Something went wrong. Please refresh and try again!"; } else { $success = "Successfully Updated!"; } } } else { $error = "Invalid Request"; } $_SESSION['response']['project-edit']['error'] = $error; $_SESSION['response']['project-edit']['success'] = $success; redirect(BASEURL . "app/project-edit.php?id=" . $_POST['id']);
$insertReportRes = insertFastAnalysis($pid, $data, Analysis_PayableRates::$DEFAULT_PAYABLE_RATES, $perform_Tms_Analysis); } catch (Exception $e) { //Logging done and email sent //set to error $insertReportRes = -1; } if ($insertReportRes < 0) { _TimeStampMsg("insertFastAnalysis failed...."); _TimeStampMsg("Try next cycle...."); continue; } _TimeStampMsg("done"); // INSERT DATA unset($data); _TimeStampMsg("Memory: " . memory_get_usage(true) / (1024 * 1024) . "MB"); updateProject($pid, $status); } } while ($RUNNING); cleanShutDown(); //FAST FUNCTIONS function updateProject($pid, $status) { _TimeStampMsg("changing project status..."); $change_res = changeProjectStatus($pid, $status); if ($change_res < 0) { } _TimeStampMsg("done"); } function insertFastAnalysis($pid, &$fastReport, $equivalentWordMapping, $perform_Tms_Analysis = true) { $db = Database::obtain();
$step = intval($_GET['step']); } if (isset($_GET['id'])) { $id = intval($_GET['id']); } else { $id = 0; } if ($id) { $project = getProjectById($id); } if ($step == 2 && !$id && isset($_POST['save_project'])) { $id = addProject($_POST); redirect('upload.php?step=2&id=' . $id); } else { if ($step && $id && isset($_POST['save_project'])) { updateProject($_POST, $id, $step); } } ?> <div class="inner-page-wrapper"> <div class="upload inner-page content"> <?php include DIR_INCLUDE . 'left_nav.php'; ?> <div class="main-content">
/** * Mise à jour d'un projet * @param $db */ public function update($db) { updateProject($db, $this->prjidprj, $this->prjlbtit, $this->prjlbdes); }
getPriorityTypes(); break; case "getStatusTypes": getStatusTypes(); break; case "getStatusTypesAdd": getStatusTypesAdd(); break; case "save": saveData(); break; case "signUp": saveUser(); break; case "updateProject": updateProject(); break; case "updateTask": updateTask(); break; case "deleteProject": deleteProject(); break; case "deleteTask": deleteTask(); break; case "logout": logout(); break; } function check_input($value)