protected function change() { global $db; $params = array(); if ($this->method == "POST") { if (sizeof($this->args) > 0) { $type = $this->args[0]; if ($type == "subject") { if (sizeof($this->args) == 6) { $params["sid"] = $this->args[1]; $params["sname"] = $this->args[2]; $params["order"] = $this->args[3]; $params["about"] = $this->args[4]; $params["notation"] = $this->args[5]; return change_subject($db, $params); } else { return "It seems you want to change a subject, but have passed in the wrong number of parameters!"; } } else { if ($type == "topic") { if (sizeof($this->args) == 6) { $params["tid"] = $this->args[1]; $params["tname"] = $this->args[2]; $params["order"] = $this->args[3]; $params["sid"] = $this->args[4]; $params["about"] = $this->args[5]; return change_topic($db, $params); } else { return "It seems you want to change a topic, but have passed in the wrong number of parameters!"; } } else { if ($type == "section") { if (sizeof($this->args) == 7) { $params["section_id"] = $this->args[1]; $params["section_name"] = $this->args[2]; $params["order"] = $this->args[3]; $params["tid"] = $this->args[4]; $params["title"] = $this->args[5]; $params["content"] = $this->args[5]; return change_section($db, $params); } else { return "It seems you want to change a section, but have passed in the wrong number of parameters!"; } } else { if ($type == "example") { if (sizeof($this->args) == 7) { $params["eid"] = $this->args[1]; $params["ename"] = $this->args[2]; $params["order"] = $this->args[3]; $params["section_id"] = $this->args[4]; $params["problem"] = $this->args[5]; $params["solution"] = $this->args[5]; return change_example($db, $params); } else { return "It seems you want to change an example, but have passed in the wrong number of parameters!"; } } else { return "No such object exists in the database!"; } } } } } else { return "No parameters were provided!"; } } else { return "This only accepts POST requests!"; } }
change_due_date($Ticket_Number, Security::sqlsecure($_POST['due_date_d_m_y']), Security::sqlsecure($_POST['due_date_h']), Security::sqlsecure($_POST['due_date_i'])); } if (Security::is_action_allowed("change_end_date") && isset($_POST['end_date_d_m_y'])) { change_end_date($Ticket_Number, Security::sqlsecure($_POST['end_date_d_m_y']), Security::sqlsecure($_POST['end_date_h']), Security::sqlsecure($_POST['end_date_i'])); } if (Security::is_action_allowed("change_assigned") && isset($_POST['t_assigned'])) { change_assigned($Ticket_Number, Security::sqlsecure($_POST['t_assigned'])); } if (Security::is_action_allowed("change_activity") && isset($_POST['activity_id'])) { change_activity($Ticket_Number, Security::sqlsecure($_POST['activity_id'])); } if (Security::is_action_allowed("enter_new_task") && isset($_POST['comment'])) { add_task($Ticket_Number, Security::sqlsecure($_POST['comment'])); } if (Security::is_action_allowed("change_subject") && isset($_POST['t_subject'])) { change_subject($Ticket_Number, Security::sqlsecure($_POST['t_subject'])); } if (Security::is_action_allowed("change_project") && isset($_POST['project_id'])) { change_project($Ticket_Number, Security::sqlsecure($_POST['project_id'])); } if (Security::is_action_allowed("change_issuer") && isset($_POST['t_from'])) { change_issuer($Ticket_Number, Security::sqlsecure($_POST['t_from'])); } if (Security::is_action_allowed("change_complete") && isset($_POST['complete'])) { change_complete($Ticket_Number, Security::sqlsecure($_POST['complete'])); } show_html($Ticket_Number, ''); } # function add_task($Ticket_Number, $comment) {