// TODO: Y U NO REMOVE? // TODO: Y U NO RAGE BETTAR? $wpid = $request->wpid; if (TrainingTracker::valid_wpid($wpid)) { if ($_POST['name'] == 'save') { $comments = $_POST['comments']; $wpid = $request->wpid; if (TrainingTracker::valid_wpid($wpid)) { $pidm = PSUPerson::get($wpid)->pidm; $modified_by = $app->user->pidm; $comments = htmlentities($comments); $comments = stripslashes($comments); $comments = trim($comments); $checklist_id = TrainingTracker::get_checklist_id($pidm); // checking to see if the person already exists in the database if (TrainingTracker::comment_exists($checklist_id)) { Trainingtracker::comment_update($comments, $checklist_id); // if person has a db entry already } else { TrainingTracker::comment_insert($checklist_id, $comments, $modified_by); //if they don't, make them one } } } else { if ($_POST['name'] == 'confirm') { $current_user_level = TrainingTracker::get_user_level($wpid); $people['active'] = $app->user; $person = PSUPerson::get($wpid); $people['current'] = $person; $level = TrainingTracker::level_translation($current_user_level); $pay = TrainingTracker::pay_translation($current_user_level);