public function accessMaskCheck() { if ($this->accessMask & 8 and $this->accessMask & 16777216 and $this->accessMask & 262144 and $this->accessMask & 131072 and $this->accessMask & 33554432) { return TRUE; } else { if ($settings->getSlackIntegration()) { $stmt = $this->db->prepare('SELECT * FROM user_accounts WHERE uid = ? LIMIT 1'); $stmt->execute(array($this->uid)); $accountInfo = $stmt->fetch(); sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), "API Key Error: Invalid Access Mask | User: "******" | keyID: " . $this->keyID, 'aura', 'chat.postMessage'); } return FALSE; } }
$operationTimestamp = strtotime($_POST['operation_date'] . " " . $_POST['operation_time']); $fittingArray = array(); $i = 0; if (isset($_POST['operation_fittings'])) { foreach ($_POST['operation_fittings'] as $fitting) { $fittingArray[$i] = $fitting; $i++; } $fittingsList = implode(',', $fittingArray); } else { $fittingsList = 'No fittings or doctrines requested'; } $stmt = $db->prepare('INSERT INTO group_operations (gid,operation_name,operation_type,operation_fc,operation_rally,operation_comms,operation_timestamp,operation_fittings,operation_details) VALUES (?,?,?,?,?,?,?,?,?)'); $stmt->execute(array($user->getGroup(), $_POST['operation_name'], $_POST['operation_type'], $_POST['operation_fc'], $_POST['operation_rally'], $_POST['operation_comms'], $operationTimestamp, $fittingsList, $_POST['operation_details'])); if ($settings->getSlackIntegration()) { sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Operations Calendar', $settings->getSlackOpsChannel(), 'New Fleet Op Posted: ' . $_POST['operation_name'] . ' - ' . $_POST['operation_date'] . ' @ ' . $_POST['operation_time'] . ' FCed by ' . $_POST['operation_fc'] . '. Form up in ' . $_POST['operation_rally'] . ' on ' . $_POST['operation_comms'], 'squirrel', 'chat.postMessage'); setAlert('success', 'New Operation Created and Posted To Slack', ''); } else { setAlert('success', 'New Operation Created', ''); } } $stmt = $db->prepare('SELECT * FROM group_operations WHERE gid = ? AND operation_timestamp >= ? ORDER BY operation_timestamp'); $stmt->execute(array($user->getGroup(), time())); $operations = $stmt->fetchAll(PDO::FETCH_ASSOC); ?> <div class="opaque-container"> <div class="row" style="width: 100%; margin-top: 20px; margin-bottom: 20px"> <div class="col-md-12 opaque-section" style="padding: 0px"> <div class="row box-title-section"> <h1 style="text-align: center">Operations Calendar<h1>