Skip to content

vivachu/adcontest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

TODO
- Change hardcoded test date to now() for getting prize in config file.
- Take out test_date from request param
- Change hardcoded has played so that players cannot play multiple times
- Change admin emails: gailu@sweepstakesconsulting.com, svedka@walrusnyc.com

SQL
# win dates for grand prizes
select name,image,win_date from prize_schedule ps, prizes p where ps.prize_id=p.id and p.place=1;

# check prize counts
select p.name, count(*) from prize_schedule ps,prizes p where p.id=ps.prize_id group by prize_id order by place;

# contest 1
select p.name, contest_id, win_date, winner_id from prize_schedule ps,prizes p where ps.contest_id=1 and p.id=ps.prize_id order by win_date;

# all contests
select p.name, contest_id, win_date, winner_id INTO OUTFILE '/tmp/prize_schedule.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'from prize_schedule ps,prizes p where p.id=ps.prize_id order by win_date;

select p.name, ps.* from prize_schedule ps,prizes p where p.id=ps.prize_id and winner_id is not null order by win_date;

select p.name, ps.* INTO OUTFILE '/tmp/winners.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' from prize_schedule ps,prizes p where p.id=ps.prize_id and winner_id is not null order by win_date;



Amazon Server
-------------
Amazon IP
184.72.225.200
ssh -i ~/.ssh/LAMP.pem root@ec2-184-72-225-200.compute-1.amazonaws.com


AMI setup
http://developer.amazonwebservices.com/connect/message.jspa?messageID=125283

GIT install
- create ssh key, add to github
- yum install git-core


/usr/sbin/httpd -k restart -f /home/webuser/helloworld/conf/httpd.conf

ln -s /home/webuser/helloworld/ apache2


install pear
wget http://pear.php.net/go-pear go-pear.php
php go-pear.php

cd /usr/share/php/bin
pear install Mail-1.2.0
pear install Mail_Mime-1.8.0
pear install Net_SMTP-1.4.2

libcurl with ssl
sudo port -f upgrade --enforce-variants curl +ssl

vi /etc/php.ini
include_path = .:/usr/share/php/PEAR:/root/config

cp svedka-config.php /root/config

Releases

No releases published

Packages

No packages published