#!/bin/csh -f

# addinventory

# Edited March 17 1998 Change /data to /data5 rcg
# Febrary 20, 1997 RCG

#Add to U.S. GLOBEC Georges Bank Inventory Files

echo "Content-type: text/html"
echo ""

#set scriptcgi="invtest"
set scriptcgi="inv"


setenv HD /data5/globec

set script_loc=/data/rgroman/Inventory/scripts
cd $script_loc

set platforms="/data/rgroman/Inventory/platforms"
set descriptions="/data/rgroman/Inventory/project-descriptions"
set sinames="/data/rgroman/Inventory/sinames"
set years="/data/rgroman/Inventory/years"

set CUROPT=(`cat inventoryopt`)

echo "<h2>Update U.S. GLOBEC Georges Bank Inventory</h2>"

echo " <form action="\""/$scriptcgi/doupdate"\"" method="\""POST"\"">"
echo "If the options below are satisfactory, then "
echo "click on "
echo "<input type="\""submit"\""value="\""Do Update"\""><p>"

echo "<p>The file names for the "
echo "<a href="\""/globec-dir/popup-data.html"\"">pop-up data</a>"
echo " are available sepately."

echo "<p>Project ($CUROPT[1]): <input name="\""project"\"" size="\""15"\"
echo "</input><p>"

echo "Platform ($CUROPT[2]):  <select name="\""platform"\"" size="\""1"\"">"
$script_loc/nawkscr < $platforms
echo "</select><p>"

echo "Project start year ($CUROPT[3]): <select name="\""year_p_start"\"" size="\""1"\"">"
$script_loc/nawkscr < $years
echo "</select><p>"

echo "Project start month ($CUROPT[4]):  <select name="\""month_p_start"\"">"
$HD/htmlbin/bin/nawkscr $CUROPT[4]  << XXSTUFFXX
1
2
3
4
5
6
7
8
9
10
11
12
XXSTUFFXX
echo "</select><p>"

echo "Project start day ($CUROPT[5]):  <select name="\""day_p_start"\"">"
$HD/htmlbin/bin/nawkscr $CUROPT[5]  << XXSTUFFXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
XXSTUFFXX
echo "</select><p>"

echo "Project end year ($CUROPT[6]):  <select name="\""year_p_end"\"">"
$script_loc/nawkscr < $years
echo "</select><p>"

echo "Project end month ($CUROPT[7]):  <select name="\""month_p_end"\"">"
$HD/htmlbin/bin/nawkscr $CUROPT[7]  << XXSTUFFXX
1
2
3
4
5
6
7
8
9
10
11
12
XXSTUFFXX
echo "</select><p>"

echo "Project end day ($CUROPT[8]):  <select name="\""day_p_end"\"">"
$HD/htmlbin/bin/nawkscr $CUROPT[8]  << XXSTUFFXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
XXSTUFFXX
echo "</select><p>"


echo "Principal Investigator name ($CUROPT[9]): <select name="\""name_prin"\"" "
$script_loc/nawkscr < $sinames
echo "</select><p>"

echo "Brief project description ($CUROPT[10]):  <select name="\""brief_desc"\"" size="\""1"\"">"
$script_loc/nawkscr < $descriptions
echo "</select><p>"



echo "</form>"
