function delete_cloud($key, $id_cloud) { if (isCreator($key, $id_cloud)) { action_delete_cloud($id_cloud); } else { echo json_encode(array('success' => false, 'error' => 'permission incorrect')); } }
function delete_permission($key, $id_cloud) { if (isCreator($key, $id_cloud) == true) { return true; } else { $data = Sql::selectOne('users, permissions', 'keyApi = ? and permissions.id_cloud = ? and permissions.id_user = users.id', $key, $id_cloud); if ($data) { if ($data['delete'] == 1) { return true; } else { return false; } } else { return false; } } }