prepare($count_sql); if (!empty($search_query)) { $count_stmt->bindValue(':search_query', '%' . $search_query . '%', PDO::PARAM_STR); } $count_stmt->execute(); $total_processes = $count_stmt->fetchColumn(); // Then, fetch the processes for the current page (with search filter and pagination) $sql = "SELECT id, name, description, created_at FROM processes"; if (!empty($search_query)) { $sql .= " WHERE name LIKE :search_query OR description LIKE :search_query"; } $sql .= " ORDER BY created_at DESC LIMIT :limit OFFSET :offset"; $stmt = $pdo->prepare($sql); if (!empty($search_query)) { $stmt->bindValue(':search_query', '%' . $search_query . '%', PDO::PARAM_STR); } $stmt->bindValue(':limit', $items_per_page, PDO::PARAM_INT); $stmt->bindValue(':offset', $offset, PDO::PARAM_INT); $stmt->execute(); $processes = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { // Silently log error, or display a friendly message. error_log("DB Error: " . $e->getMessage()); } $total_pages = ceil($total_processes / $items_per_page); $project_name = htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'ProcessFlow Optimizer'); $project_description = htmlspecialchars($_SERVER['PROJECT_DESCRIPTION'] ?? 'Analyze and optimize your business processes.'); $project_image_url = htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?> <?php echo $project_name; ?>
' . $message . '
'; } if (isset($_GET['error'])) { $message = ''; switch ($_GET['error']) { case 'emptyfields': $message = 'Please fill in all fields.'; break; case 'dberror': $message = 'A database error occurred. Please try again.'; break; case 'deletionfailed': $message = 'Failed to delete process. Please try again.'; break; case 'invalidrequest': $message = 'Invalid request.'; break; case 'processnotfound': $message = 'Process not found.'; break; default: $message = 'An error occurred. Please try again.'; } echo ''; } ?>

A business process analyzer and automated optimizer

Map a New Process

Define a process to begin analysis.

Existing Processes

Clear

No processes defined yet.
Use the form to add your first process.

1): ?>