#!/usr/local/bin/perl -w use CGI qw(:standard); use Fcntl qw(:flock); $NL = "\n"; $SECTION = param("section"); $PASSAGE = param("passage"); $TITLE = "Greg Samples for Congress 2012"; $TIME = `date '+%b%d%M%S'`; chomp ($TIME); $MYMAIL = "greg\@gregsamples.com"; Welcome(); print end_html; sub Welcome { print header, start_html($TITLE); print ''; print ''; print ''; print ''; print ''; print '
Greg Samples for Congress 2012
2nd District, Tennessee'; print '
'; print ''; print ''; print '
Vision'; print 'Contact'; print 'Issues'; print 'Proposed Amendments'; print 'News'; print 'Events Schedule'; print 'Volunteer'; print 'Articles of Freedom'; print ''; print '

'; print ''; if ($SECTION eq "home") { Vision(); } if ($SECTION eq "contact") { Contact(); } if ($SECTION eq "issues") { Issues(); } if ($SECTION eq "amendments") { Amendments(); } if ($SECTION eq "events") { Events(); } if ($SECTION eq "news") { News(); } if ($SECTION eq "volunteer") { Volunteer(); } if ($SECTION eq "aof") { ArticlesFreedom(); } print '
'; print ''; print '
'; print '
Get Involved'; print '
'; print '
Events'; `>Wisdom/$TIME`; $ITER = "1"; $datafile = "Wisdom/quotes"; if (open(FILE, "$datafile")) { while ($item = ) { chomp ($item); if ($ITER == 1){ $QUOTE = $item; } else { `echo "$item" >>Wisdom/$TIME`; } $ITER++; } } close(FILE); `echo "$QUOTE" >>Wisdom/$TIME`; print "
$QUOTE"; `mv Wisdom/$TIME Wisdom/quotes`; print '
Share'; print '
Follow Greg Samples on Twitter'; print '

Recommended Reading Offsite
'; print 'The Declaration of Independence
'; print 'The U.S. Constitution
'; print 'The Constitution Society
'; print 'Continental Congress 2009
'; print 'A Federal Reserve Parable
'; print 'Fully Informed Juries
'; print 'Lysander Spooner
'; print 'Philosophy of Liberty
'; print 'Strike the Root
'; print 'Herbert Spencer
'; print 'Future of Freedom Foundation
'; print 'War is a Racket
'; print 'Understanding Fascism
'; print 'Worlds Smallest Political Quiz
'; print ''; print '
'; print '
'; print '

'; print ''; print ''; print '
Vision'; print 'Contact'; print 'Issues'; print 'News'; print 'Events Schedule'; print 'Volunteer'; print 'Articles of Freedom'; print ''; print '

'; print ''; print ''; print '
Paid for by Committee to Elect Greg Samples, P.O. Box 23651, Knoxville, TN 37933
'; print ''; print end_html; } sub Vision { $HITFILE = "logs/mainhits"; if (open(COUNT, " $HITFILE")) { $SUM = ; $SUM++; $ALLSUM = $SUM; open(COUNT, "> $HITFILE"); print COUNT "$SUM$NL" } else { $SUCCESS = 0; } close(COUNT); print ''; print ''; print '
My Vision'; print '
'; $datafile = "Vision/vision"; if (open(FILE, "$datafile")) { while ($item = ) { chomp ($item); print "$item"; } } close(FILE); print '
'; } sub Contact { print ''; print ''; print '
Contact Us'; print '
'; print ''; print ''; print '
Use the form below to contact us about anything you would like to say.'; print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '

'; print ''; print '

'; print 'Enter your message here:'; print ""; print ''; print '
'; print 'Name (Optional)'; print ""; print ''; print '
'; print 'Phone (Optional)'; print ""; print ''; print '
'; print 'Email (Optional)'; print ""; print ''; print '
'; print ' '; print ''; print '
'; print '
'; } sub Issues { print ''; print ''; print '"; } close(FILE); } `rm $workfile`; } print '
Issues'; print '
'; if ($PASSAGE) { `echo "$PASSAGE" >>logs/activity`; print 'Back to List of Issues

'; $datafile = "Issues/$PASSAGE"; if (open(FILE, "$datafile")) { while ($item = ) { chomp ($item); print "$item"; } } close(FILE); print '

Back to List of Issues'; } else { `ls Issues >tmp/issues$TIME`; $workfile = "tmp/issues$TIME"; if (open(FILE, "$workfile")) { while ($item = ) { chomp ($item); print '
'; print "$item"; print "
'; `mailx -s "Issues Hit" $MYMAIL '; print ''; print '"; } close(FILE); } `rm $workfile`; } print '
Proposed Amendments'; print '
'; if ($PASSAGE) { `echo "$PASSAGE" >>logs/activity`; print 'Back to List of Proposed Amendments

'; $datafile = "Amendments/$PASSAGE"; if (open(FILE, "$datafile")) { while ($item = ) { chomp ($item); print "$item"; } } close(FILE); print '

Back to List of Proposed Amendments'; } else { `ls Amendments >tmp/amendments$TIME`; $workfile = "tmp/amendments$TIME"; if (open(FILE, "$workfile")) { while ($item = ) { chomp ($item); print '
'; print "$item"; print "
'; `mailx -s "Amendments Hit" $MYMAIL '; print ''; print '
In the News'; print '
'; $datafile = "News/today"; if (open(FILE, "$datafile")) { while ($item = ) { chomp ($item); print "$item"; } } close(FILE); print '
'; } sub Events { print ''; print 'Greg Samples Scheduled Appearances'; print ''; `> tmp/events$TIME`; `ls Events >tmp/events$TIME`; $workfile = "tmp/events$TIME"; if (open(FILE, "$workfile")) { while ($item = ) { chomp ($item); $datafile = "Events/$item"; $NUMDATE = $item; chomp ($NUMDATE); $CALDATE=`grep 'caldate=' $datafile | cut -f2 -d'='`; chomp ($CALDATE); $TIME=`grep 'time=' $datafile | cut -f2 -d'='`; chomp ($TIME); $PRICE=`grep 'price=' $datafile | cut -f2 -d'='`; chomp ($PRICE); $TITLE=`grep 'title=' $datafile | cut -f2 -d'='`; chomp ($TITLE); $PLACE=`grep 'place=' $datafile | cut -f2 -d'='`; chomp ($PLACE); $CITY=`grep 'city=' $datafile | cut -f2 -d'='`; chomp ($CITY); $STATE=`grep 'state=' $datafile | cut -f2 -d'='`; chomp ($STATE); print ""; } close(FILE); } print '
$CALDATE $TIME \$$PRICE $TITLE"; print "$PLACE $CITY $STATE"; print "
'; `rm $workfile`; } sub Volunteer { print ''; print ''; print '
We Need Your Help'; print '
'; print 'Volunteer page is under construction.'; print '
'; } sub ArticlesFreedom { print ''; print ''; print '
The Articles of Freedom'; print '
'; print 'In November of 2009, I was privileged to take part in an amazing confluence of liberty loving men and women in St. Charles, Illinois. There we produced a document entitled Articles of Freedom, which we hope will be the beginning of the restoration of Constitutional Governance by our government officials who have been ignoring their oaths of office. After obtaining as many signatures as possible, we will serve this document with the signature of millions of citizens on each member of the State and Federal legislatures, the President, leading members of the Judiciary, and others.'; print '

We need your help if we are to restore government officials to their proper role of being servants to the people, rather than their master.'; print '

First, go to the Articles of Freedom web page. Much information is there, including a link to download the 61 page Articles of Freedom in pdf form. You can also access each Article directly while browsing the site.'; print '

Please sign the pledge to hold our elected officials accountable. Our goal is to have as many signatures as possible by the time the Articles are served.'; print '

Third, MOST IMPORTANT, forward this link to as many people as you can.'; print '



'; print '
'; }