You may work on this assignment as a group of two students. If anything does not work as described here, notify the instructor immediately.
In this assignment, you will set up the directory structure
that will be used in future assignments.
You also learn how to use
WebGen, which can automatically create
a Web interface for a database.
.bashrc file
in your home directory:
export PATH=$PATH:~/bin:.:../../../web_gen export CVSROOT=:ext:cs440@amazon.een.orst.edu:/home/cvs_cs440 export CVS_RSH=sshYou may also add the following statement to let your Unix prompt indicate the host name and the full path of your working directory:
export PS1="\h \w \!% "Then issue Unix command
source ~/.bashrc or
open a new terminal.
.cshrc as
set path=($path ../../../web_gen) setenv CVSROOT :ext:cs440@amazon.een.orst.edu:/home/cvs_cs440 setenv CVS_RSH ssh
public_html directory,
check out from the CVS repository the required modules
by issuing the following commands:
cd ~/public_html cvs co -P ms_apps_cs440Use password
CSy549.
Please do not check in any modified files
without first talking to the instructor.
cd ~/public_html/ms_apps_cs440 rm -rf erp_cs440
cd ~/public_html/ms_apps_cs440 cd framework_v3 cvs up -d cd ../web_gen cvs up -d cd ../treeview cvs up -dYou may also update the directories containing applications such as
ms_apps_cs440/mantis
and ms_apps_cs440/zen_cart.
However, if you have modified any files extensively
in a application directory,
back up the directory before you issue cvs up -d command as
cd ~/public_html/ms_apps_cs440/forms/mantis/ cp -pr forms_mysql forms_mysql.bak cd forms_mysql cvs up -dThe files updated are flagged with
U or P,
and those modified by you are flagged with M.
If you see files flagged C, the updates made by you
and the updates made to the files in the repository
after your checked out your copies
are not compatible. If you want to keep your updates,
copy your copies from the backup directory.
If you think that your modifications make the application better,
see the instructor before your changes are checked in to the repository.
~/public_html/ms_apps_cs440/cs275/forms_mysql/datasource.php
to yours.
The PHP scripts do not access a MySQL or PostgreSQL database directly.
Instead, they access a database by using member functions
of class DB_Sql defined in file db_mysql.inc
or classDB_Pgsql defined in file db_pgsql.inc.
The selection of one of these include files based on the DBMS type
is performed at the beginning of file framework_v3/common.phtml.
employee by executing SQL script
create_employee_my.sql in directory
~/public_html/ms_apps_cs440/cs275/sql_queries.
http://nagara.een.orst.edu/~your_login_name/ms_apps_cs440/cs275/forms_mysql/empsand open PHP script
employee_search.phtml.
Check that the search, select, and edit forms work correctly.
Check also that the Insert operation activated from the select form
is correctly executed.
The instructor's directory is
http://classes.engr.orst.edu/eecs/winter2007/cs440/ms_apps/cs275/forms_mysql/emps
~/public_html/ms_apps_cs440/cs275/forms_mysql/emps,
issue Unix command
confgen -f employee
The confgen command executes
~/public_html/ms_apps_cs440/web_gen/confgen,
which in turn activates
~/public_html/ms_apps_cs440/web_gen/tmpl/config.tmpl,
which includes
~/public_html/ms_apps_cs440/framework_v3/db_mysql.inc.
~/public_html/ms_apps_cs440/cs275/forms_mysql/emps,
and issue Unix command
webgen employee
PHP scripts
employee_search.phtml, employee_select.phtml,
employee_edit.phtml, employee_action.phtml, and
employee_info.phtml are regenerated.
Check with a Web browser that the scripts generated are still working.