HeadCount Copyright 2004, Kristina Pfaff-Harris (http://tesol.net/scripts/) =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Contents of this file: Program Summary Known Problems with HeadCount Copyright & Licensing Information Legal Notice & Disclaimer Getting Started with HeadCount What to Do About Problems Other Scripts =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Program Summary: HeadCount lets you set up a very simple headcount program on a website. The idea is that an administrator will set up a list of teachers. Each teacher can then log in and tell how many of their students will be attending lunch that day, going on a field trip, attending an assembly, etc. At the end of the day (or whenever you want) the administrator can reset the numbers file to zero to start over. This was originally written for a school that needed to tally up how many students would be attending Lunch, but it could easily be used to count how many guests each employee will be bringing to a company picnic, how many guests will be attending a wedding, etc. The labels "Teacher," "Class," and "Number of students" can all be changed while configuring the program. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Known problems with HeadCount: I suspect that there may be some problems, but since it's brand new, I don't know of any. Please email me if you find a problem! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Licensing & Copyright Information: The Licensing terms and conditions are listed within the headcount.cgi program itself. This program is Copyright 2004, Kristina L. Pfaff-Harris. All rights reserved. You may use this program free of charge provided you agree to the License agreement contained within the program. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Legal Notice & Disclaimer: This program is offered as-is and no warranty is given, either express or implied. By downloading, modifying, copying, viewing, or using this program, you agree that neither the author of this program nor the owners or administrators of the site from which you downloaded this program are liable for any breach of security, damage or loss caused directly or indirectly by the use of this program, and that any such breaches, damage or loss is the sole responsibility of the person who downloads, modifies, copies, views, or uses this program. The author has attempted to make this program as bug-free and secure as possible, but there is always the possibility of something being overlooked, hence the author disclaims any responsibility for problems incurred in the use of this program. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Getting Started with HeadCount: This assumes that you have permission to execute cgi programs on your server, and that you know where the programs have to go. Sometimes, a web server is set up so that all cgi programs must be in a single directory (usually /cgi-bin). If you don't know whether or not you have permission to do this, or if you don't know where the programs must go, ask the technical support people for your website. You'll need to modify headcount.cgi slightly for use on your own site. Open this file in a plain text editor such as Notepad, BBEdit, Pico, etc. You may also use an editor such as Microsoft Word or Wordpad, but if you do, make SURE to save the file as plain text, or it will break. headcount.cgi: There are a few places in this file that you will need to change. All of the instructions for changing them are located in the file itself and marked with **CHANGE** so that you can find them easily. Please be very careful when you make your changes. If you accidentally leave out a " or a ; or forget to put \ (backslashes) in the right place, the program will not run. If you have problems after you make your changes, please check very carefully the changes you've made. Once you've made these changes, you're ready to start uploading stuff to your website. This is how I suggest you install the script. 1. Upload the files number_file.txt and teachers_file.txt to your cgi-bin and chmod them both 766. This is Read-Write-Execute/Read-Write/Read-Write. 2. Upload headcount.cgi to your cgi-bin (or whatever place you need to upload CGI scripts in order for them to be able to run). Chmod it 755. This is Read-Write-Execute/Read-Execute/Read-Execute. Now you're ready to begin using the program. To start, just bring up a web browser and type in: http://www.yoursite.com/cgi-bin/headcount.cgi Where "www.yoursite.com/cgi-bin/headcount.cgi" means the actual web address of where your headcount.cgi program is. If all has gone well, it will show you the game screen, and you're good to go! NOTE: If you do not change $admin_password from "password" to something else, the script will yell at you and refuse to run. Make sure you change the password. :-) If your numbers file and/or teachers file can't be found, or the script can't write to them, the program will also yell at you and refuse to run. Don't worry: these kinds of things can be fixed. If you've tried following the instructions, and you can't figure out what to do about this, please email me and I'll try to help. To add and delete teachers, and to reset the numbers file, click the "Admin" button. It will ask you for a username and password. For Username, use what you put in $admin_username in the script, and for password, put in what you used for $admin_password in the script. Once you've added teachers, their names will appear in the dropdown list in the main menu. They can just select their name, put in a number, and it will be added. If the same teacher puts in a different number, it will just be updated to the new number in the list. Enjoy! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= What to Do About Problems: A few notes: If bringing up the headcount.cgi in your browser gives you an error (especially "Internal Server Error"), here are a few things to check: 1. Did you ftp the file in ascii mode? You must ftp cgi programs in perl in ascii mode or they won't work. 2. Did you change the permissions of the headcount.cgi program to be 755 (On some programs you need to click "read" and "execute" for the file to do the same thing.)? 3. Is the path to perl with the #! on the very, very first line of the file? Sometimes this is tricky to tell, but there cannot be even a single blank line before #!/usr/bin/perl and the top of the file or it won't work. 4. In the headcount.cgi program, did you leave out a " or a ;, or did you use "" when it says to use ''? 5. Did you check the FAQ at http://tesol.net/scripts/FAQ/ for the most common problems? Your issue may already be covered there! IMPORTANT: If you contact me with a problem about this program, you MUST give me as much information as possible. Please include: The name of this program. (I have several programs on this website, so if you email me saying "The program doesn't work" I won't know what you're talking about.) The version of this program. (This is HeadCount version 1.0.1). The error message you got. The location of where you have set up the script on your website so I can take a look at it. I really want this to work for you! However, if you don't give me enough information, I cannot help you. Please, at least be as willing to help me as I am to help you. Most things can be fixed quickly if you give me enough information. :-) =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Other Scripts: If you like this program, try some of the other CGI scripts available at Kristina's Scripts for Educators: http://www.tesol.net/scripts/ Currently available are: AddrBook: A simple web-based address book AffordaBilly: Loan payment affordability calculator: how big a loan can you afford? AutoCGIMail: Create your own custom email forms and scripts online! CGI-Subscribe: An email mailing list manager Chat-N-Time: Real-time web-based chat CrosswordMaker: A tool to create and grade HTML crossword puzzles GradeORama: Online gradebook server HeadCount: Simple headcount program. MakeBook: A guestbook/ongoing story program. PayBackTime: Calculator for how long it will take to pay off a debt or loan. QAMaker: Online FAQ/Question & Answer list generator Quadratic-O-Matic: A simple quadratic equation solver QuizTest: Offer multiple-choice/true-false quizzes RandomQuiz: Generates quizzes with randomly selected questions RemindMe: An email auto-reminder service SFEBanner: Simple banner, quote, image rotator. SFEBlackJack: Simple online video BlackJack game SFEPoker: Simple online video Poker game SFESurvey: Another survey/quiz generator. SFEWordSearch: Generate printable wordsearch puzzles SillySearch: Let people search for pages on your website SillyCount: Let's you create a web-page counter. SillySite: A simple web-page creation program VeryInteresting: Loan Interest calculator and amortization table generator VocabSearch: Create and search a list of vocabulary words Votesie: Online voting booth/Poll generator Web-B-Mail: Private, web-only email-like system with pictures. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thanks for using HeadCount! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=