This is for RevCMS, im using Micro's version of Rev, so you may need to add/take away a few things to get it to work 100%
Add Lottery.php, to your main skin folder, with all your pages in it., also add this page to your navigator
Add the lottery2.php anywhere you want really (set this to run every days, or however often you want to pick winners, using either task scheduler, or some other way to run this based on time. or even manually if you want, so you can see the little bit of output.) i recommend looking at the lotto2 file, and seeing how it works.
lotto page
output page:
and you need to add a few tables to your database:
plus, you need to edit the first lines in BOTH of the files, to config to your database, or just replace it with your include_once of your connection.php, if you already use mysqli, and already import your database connection
Add Lottery.php, to your main skin folder, with all your pages in it., also add this page to your navigator
Add the lottery2.php anywhere you want really (set this to run every days, or however often you want to pick winners, using either task scheduler, or some other way to run this based on time. or even manually if you want, so you can see the little bit of output.) i recommend looking at the lotto2 file, and seeing how it works.
lotto page
You must be registered for see links
You must be registered for see links
output page:
You must be registered for see links
You must be registered for see links
You must be registered for see links
and you need to add a few tables to your database:
Code:
CREATE TABLE `lotto` (
`username` varchar(50) NOT NULL,
`value` varchar(4) NOT NULL,
`winner` int(1) NOT NULL DEFAULT '0',
`winning_numbers` varchar(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `lotto_winners` (
`username` varchar(30) NOT NULL,
`time` varchar(100) DEFAULT 'CURDATE()',
`winning_number` varchar(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
COMMIT;
plus, you need to edit the first lines in BOTH of the files, to config to your database, or just replace it with your include_once of your connection.php, if you already use mysqli, and already import your database connection
Last edited: