CS 1704 Summer II 2003 

Project 4.1:  CGI Multimedia Organizer


Changes are in red.

Purpose:

  1. To  apply Linked Lists, 
  2. To introduce GUI via cgi, and
  3. To practice "code reuse" and modification.

Requirements:

For this project, I will require:

  1. Modification of Project 2
  2. No arrays may exist in your project.  
  3. You must use Doubly linked lists to hold the students and items.

Suggestions:

  1. Read D+D chapter 6 on web programming with CGI
  2. Install Apache HTTP server on your home machine (www.apache.org) (The download page is http://httpd.apache.org/download.cgi and you want the file Win32 Binary (MSI Installer): apache_1.3.28-win32-x86-no_src.msi
  3. To test your implementation, rename the exe you created from yourpid.exe to yourpid.cgi and put it and all your input files into the cgi-bin directory that Apache created. Then open a web browser and run by typing http://localhost/cgi-bin/yourpid.cgi
  4. You should try to get this part of the project done by Friday night, preferably Thursday night.

The Project

For project 4 you will modify Project 2 to fulfill the requirements above.  You will still read in students.data and items.data, however, you will also write the updated students and items back to students.data and items.data after receiving a quit command. 

Additionally, instead of all output going into the file output.data, it will go to the screen. The very first thing output must be:
            cout <<"Content-Type: text/html\n\n";
            cout <<"<html><head></head><body>";

Afterwards, just use cout to output everything you used to print to output.data, using a "<br>" instead of every endl; The very last line should be:
            cout <<"</body></html>";

For this phase of the project, the commands will still be read from a file named "commands.data".  Phase 2 will require that the commands be read from the screen.  I highly recommend putting your screen output into functions (or make a class with methods) so that each function/method will 1.) echo the command, and 2.) print the output of that method.  That way when you plug in the GUI to receive commands via the cgi, you can print only portions of the output to the screen, in other words, just the output for that command.  This will make more sense as you read Project 4.2.

Standards:

As with all programming projects in this course, please see http://courses.cs.vt.edu/~cs1704/summer2003/standards.htm for a list of requirements that apply to all projects.  YOU WILL BE GRADED on these.  In addition, include the following pledge at the bottom of your file:

On my honor:

- I have not discussed the C++ language code in my program with anyone other than my instructor or the teaching assistants assigned to this course.

- I have not used C++ language code obtained from another student, or any other unauthorized source, either modified or unmodified.

- If any C++ language code or documentation used in my program was obtained from another source, such as a textbook or course notes, that has been clearly noted with a proper citation in the comments of my program.

- I have not designed this program in such a way as to defeat or interfere with the normal operation of the Curator System.
<Your Name>

Submission

There is no submission for this Phase 1 of Project 4.  See project 4.2 for submission details (it will be demoed).  As for extra credit, the will be an incentive for getting project 4.2 done early, so the earlier project 4.1 is done, the more likely project 4.2 will be done early.