PHP Classes

dvote: A poll voting system based on .ini files

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,097 All time: 3,415 This week: 222Up
Version License Categories
dvote 1.0.0GNU General Publi...Content management
Description 

Author

This class can be used to implement a poll voting system.

It can present the poll form, process the votes and present the results.

The class uses a configuration file in a .ini file to define a poll question and the possible answers.

The total number of poll votes and each answer vote count is stored in the same .ini file that is also updated when an user votes.

The class uses cookies to detect whether an user has already voted. The message to show when an user votes again is also configurable in the .ini file.

Innovation Award
PHP Programming Innovation award nominee
June 2006
Number 9


Prize: One subscription to the PHP Magazine
Surveys are a very useful resource that appears in many sites.

Many sites keep track of survey data and vote count in databases.

This class provides an alternative solution that uses a file in the .ini format rather than databases to store the survey data.

Manuel Lemos
Picture of Alessandro Rosa
Name: Alessandro Rosa <contact>
Classes: 10 packages by
Country: Italy Italy
Innovation award
Innovation award
Nominee: 3x

Details
DVOTE class (PHP) This class implements a voting management system. All settings can be achieved from a initialization file (in this example, 'vote.ini'). There's some flexibility in the implementation, so one may set one's custom entries, either in global settings. Usually one sets up: * the number of entries; * the entries labels themselves; * all votes numbers to 0. One should see both example files index.php and vote.php to understand how this class works.
Screenshots  
  • shot01.gif
  • shot02.gif
  • shot03.gif
  Files folder image Files  
File Role Description
Accessible without login Plain text file dvote.php Class class source
Accessible without login Plain text file index.php Example example code
Accessible without login Plain text file ini_fn.php Aux. auxiliary functions
Accessible without login Plain text file ini_manager.php Class auxiliary class for management
Plain text file readme.txt Data some text about the class
Accessible without login Plain text file vote.css Data css style for the example
Accessible without login Plain text file vote.ini Data initialization file for the voting management
Accessible without login Plain text file vote.php Example example code

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,097
This week:0
All time:3,415
This week:222Up