How mateus-vonrandow/poll works
This is a small PHP website for creating and voting in a single active poll, with a results page. The main workflow is to create a poll and its options, make it active, accept a vote, and display the active poll or its results. Shared templates render the pages, while the library provides database access and cookie-based vote tracking. The README is empty; relationships below are limited to those visible in the supplied excerpts or SOURCE INDEX, so the results view’s internal behavior is not expanded.
Main entry points: template.php Page renderer · lib.php Poll data and cookies · index.php Home endpoint · resultados.php Results endpoint
Components 16
Web pages
- Home endpoint
index.php - Create endpoint
criar.php - Results endpoint
resultados.php - Vote endpoint
vote.php - Poll creation view
views/create.php
Presentation
- Page renderer
template.php - Header
partials/header.php - HTML head
partials/head.php - Footer
partials/footer.php - Poll widget
partials/poll_widget.php - Home view
views/home.php - Results view
views/results.php
Poll runtime
- Poll data and cookies
lib.php
Persistence
- Database configuration
config.php - Poll database
schema.sql
Other components
- Visitor
Connections 21
- Visitor → Home endpoint: opens
- Visitor → Create endpoint: opens
- Visitor → Results endpoint: opens
- Home endpoint → Poll data and cookies: loads poll
index.php - Home endpoint → Page renderer: renders
index.php - Create endpoint → Page renderer: renders
criar.php - Results endpoint → Poll data and cookies: loads poll
resultados.php - Results endpoint → Page renderer: renders
resultados.php - Page renderer → Header: includes
template.php - Page renderer → Home view: dispatches view
template.php - Page renderer → Poll creation view: dispatches view
template.php - Page renderer → Results view: dispatches view
template.php - Page renderer → Footer: includes
template.php - Header → HTML head: includes
partials/header.php - Footer → Poll widget: includes when enabled
partials/footer.php - Poll widget → Vote endpoint: submits vote
partials/poll_widget.php - Vote endpoint → Poll data and cookies: uses vote helpers
vote.php - Poll data and cookies → Database configuration: loads settings
lib.php - Poll data and cookies → Poll database: reads poll data
lib.php - Poll creation view → Poll database: creates poll records
views/create.php - Vote endpoint → Poll database: validates and updates vote
vote.php