$tokenType = isset($validToken['tokenType']) ? $validToken['tokenType'] : false; // if($tokenType == 'accept'){ // $coca->approveChange($_REQUEST['h']); // echo "Change Approved <br>"; // }else if($tokenType == 'reject'){ // $coca->rejectChange($_REQUEST['h']); // echo "Change Rejected <br>"; // } $change_status = $tokenType == 'accept' ? 'Approved' : 'Rejected'; $approve_id = $validToken['approver']; $executors = $coca->getRequestUsers($change_id, false); if ($executors == 'false' || !is_array($executors)) { die('Missing executors users'); } foreach ($executors as $executor) { $user_data = $coca->getUserData($executor); $mail->sendMailStatusToExecutors(array('change_id' => $change_id, 'user_email' => $user_data['user_email'], 'change_status' => $change_status, 'approver' => $approve_id)); } } ?> <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <title>Dashboard - CoCa Admin</title> <meta charset="utf-8"> <meta name="description" content="">