The document outlines the code flow for events in a Blackbook application. It describes the controllers, models, and views involved in managing events. The controllers handle functions like listing, adding, editing, and deleting events and polls. The models retrieve and manage event, poll, and category data. The views display listing and detail pages for admins and users to view and manage events.
1. Blackbook code flow in events page
BB : events
Controller :
PollsController.php
Functions:
•list() (admin)
•addPoll() (admin)
•edit_poll() (admin)
•delete_poll() (admin)
•checkUserPollStatus($user_id) (Ajax function : end user)
CategoriesController.php
Functions :
•list() (view function : end user)
•listevents() (view function : admin)
•save($array, $category _id) (admin)
•deleteevent($category_id) (admin)
EventsController.php
Functions :
•lists() (view function : end user)
•details($event_id) (view function : end user)
•addevent() (view function :admin )
•editevent($event_id) (view function :admin )
•deleteevent($event_id) (admin)
•getCategories() (block function in the view) → reference to Category model
•getLatestPoll() (block function in the view) → reference to Poll model.
•(Other supporting functions )
Model :
Poll.php
Functions:
•getPolls() (admin)
•getLatestPoll() (end user)
•get
Category.php
Functions:
•getCategories() (admin and end user function)
•getCategoryDetails($category_id) (admin and end user function)
•deleteCategory($category_id)
event.php
2. Functions :
•getevents() : end user and admin function
•geteventDetails() : end user and admin function
•deleteevent() : admin function
•addevent() : admin function
•editevent() : admin function
Views :
categories/
•list_categories_admin.tpl (admin)
•list_categories_user.tpl
•add_categories.tpl
•edit_categories.tpl
events/
•list_activites.tpl
•event_details.tpl
•edit_event.tpl
•add_event.tpl