#+title: an5w #&summary A PHP script for simple surveys #& #+license: bysa, page #+license: wtf, program * an5w #&img;url=art.png,title=Hmm.. an5w (pronounced "answ" as in "answer") is a simple PHP program for creating online surveys. It consists of just two PHP files, one that serves the user and one that shows the answers. ** Download [[an5w.tar.gz][Here]] ** Documentation You will not find any documentation in the an5w tarball --- not even a single readme. When you've extracted the an5w directory from the tarball, put it in a place your webserver recognizes. That should work. The code has no comments, basically because it's scaringly simple and extremely short. an5w is released under the WTFPL&acro='Do What The Fuck You Want To Public License', as published by Sam Hocevar [[http://sam.zoy.org/wtfpl/][here]]. A raw an5w directory has the following files and directories (*answers* and *art* are directories): #&pre *answers* button footer *index.php* style.css wrapper art done header *questions* title #& However, only the ones in bold are actually necessary. You can remove the rest without an5w failing. In the 'answers' directory, it's the same: #&pre *index.php* style.css #& Again, only the bold ones are needed. In this case, you only need 'index.php'. *** Description of files #++pre #+BEGIN_SRC answers/index.php: The program that shows answers answers/style.css: CSS styles button: The text of the submit button. Default is "Submit". footer: Text to display on the bottom of the page. Default is nothing. index.php: The main program style.css: CSS styles wrapper: The HTML element(s) that wrap everything else. Default is "
TEXT
\n" (where TEXT is the actual content). art/art.xcf: Promotional question marks art/art-small.png: Promotional question marks in mini version done: Text to display when the survey has been completed. header: Text to display on the top of the survey page. questions: The actual questions. See the *markup* section below. title: The title of the survey. Will only be displayed on the titlebar of the page. #+END_SRC *** Markup The syntax used in the 'questions' file is really quite simple. It looks like this: #&pre Question Type of input (in form of text, multiple choices, etc.) Another question Type of input #& An example: #&pre To what extent do you get annoyed when people attack you with pencils? [] Why are cows unable to fly (in your own opinion)? [] #& Currently (as of version 0.001), only the '[]' input type is supported. '[]' =