Example #1
0
function CommonForm()
{
    global $db, $user, $serverhost, $password;
    global $NumDiveSiteRecords, $DiveSiteId, $DiveSiteStatus, $DiveSiteEnteredBy, $DiveSiteDateEntered;
    global $DiveSiteCity, $DiveSiteProvince, $DiveSiteCountry, $DiveSiteName, $DiveSiteMajorName;
    global $DiveSiteMinorName, $DiveSiteRating, $DiveSiteType, $DiveSiteLevel, $DiveSiteElevation;
    global $DiveSiteElevationUnits, $DiveSiteWater, $DiveSiteDifficulty, $DiveSiteTideTable, $DiveSiteTideTableNotes;
    global $DiveSiteBestDiveMonths, $DiveSiteTimeRestrictions, $DiveSitePermitRequired, $DiveSiteWinterTemp;
    global $DiveSiteSummerTemp, $DiveSiteFallTemp, $DiveSiteSpringTemp, $DiveSiteDepthMin, $DiveSiteDepthMax;
    global $DiveSiteDepthUnits, $DiveSiteVisibilityMinimum, $DiveSiteVisibilityMaximum, $DiveSiteVisibilityUnits;
    global $DiveSiteHazards, $DiveSiteHazardNotes, $DiveSiteBottomComposition, $DiveSiteCompositionNotes;
    global $DiveSiteTelephoneNotes, $DiveSiteFacilities, $DiveSiteFacilitiesNotes, $DiveSiteMedical;
    global $DiveSiteMedicalNotes, $DiveSiteRecommendationNotes, $DiveSiteEAPNotes, $DiveSiteNotes;
    global $DiveSiteExactLat, $DiveSiteExactLong, $DiveSiteShoreLat, $DiveSiteShoreLong, $DiveSiteShoreNotes;
    global $DiveSiteWebPage, $DiveSiteBackground;
    global $Mode;
    echo stripslashes("\n<TABLE border='1' align='center'><tr><td>\n<TABLE cellspacing='5'>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteId</th>\n<td><input type ='text' NAME='DiveSiteId' VALUE='{$DiveSiteId}' SIZE='8' MAXLENGTH='8' tabindex ='1' id ='DiveSiteId' READONLY><br></td>\n</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteStatus</th>\n");
    if ($Mode == 'EDIT') {
        echo "<td><input type ='text' style='color: gray' READONLY NAME='DiveSiteStatus' VALUE='{$DiveSiteStatus}'  SIZE='10' MAXLENGTH='10'  tabindex=2 id ='DiveSiteStatus' \n   onBlur=\"if(isBlank(this.form.DiveSiteStatus.value)) {alert('DiveSiteStatus cannot be blank');this.form.DiveSiteStatus.style.background='Yellow';}else{this.form.DiveSiteStatus.style.background='White';}\"><br></td>";
    } else {
        echo "<td><input type ='text' NAME='DiveSiteStatus' VALUE='{$DiveSiteStatus}'  SIZE='10' MAXLENGTH='10'  tabindex=2 id ='DiveSiteStatus' \n   onBlur=\"if(isBlank(this.form.DiveSiteStatus.value)) {alert('DiveSiteStatus cannot be blank');this.form.DiveSiteStatus.style.background='Yellow';}else{this.form.DiveSiteStatus.style.background='White';}\"><br></td>";
    }
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteEnteredBy</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteEnteredBy' VALUE='{$DiveSiteEnteredBy}'  SIZE='25' MAXLENGTH='25'  tabindex=3 id ='DiveSiteEnteredBy' \n   onBlur=\"if(isBlank(this.form.DiveSiteEnteredBy.value)) {alert('DiveSiteEnteredBy cannot be blank');this.form.DiveSiteEnteredBy.style.background='Yellow';}else{this.form.DiveSiteEnteredBy.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteDateEntered</th>\n<td><input type ='text' NAME='DiveSiteDateEntered' VALUE='{$DiveSiteDateEntered}'  SIZE='11' MAXLENGTH='11'  tabindex=4 id ='DiveSiteDateEntered' \n   onBlur=\"if(isBlank(this.form.DiveSiteDateEntered.value)) {alert('DiveSiteDateEntered cannot be blank');this.form.DiveSiteDateEntered.style.background='Yellow';}else{this.form.DiveSiteDateEntered.style.background='White';}\">");
    if ($Mode == 'EDIT') {
        echo '<A HREF="#" onClick="cal.select(document.forms[\'DiveSiteEdit\'].DiveSiteDateEntered,\'anchor\',\'NNN-dd-yyyy\');return false;" NAME="anchor" ID="anchor">Calendar</A>';
    } else {
        echo '<A HREF="#" onClick="cal.select(document.forms[\'DiveSiteEntry\'].DiveSiteDateEntered,\'anchor\',\'NNN-dd-yyyy\');return false;" NAME="anchor" ID="anchor">Calendar</A>';
    }
    echo "</td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteCity</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteCity' VALUE='{$DiveSiteCity}'  SIZE='30' MAXLENGTH='30'  tabindex=5 id ='DiveSiteCity' \n   onBlur=\"if(isBlank(this.form.DiveSiteCity.value)) {alert('DiveSiteCity cannot be blank');this.form.DiveSiteCity.style.background='Yellow';}else{this.form.DiveSiteCity.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteProvince</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteProvince' VALUE='{$DiveSiteProvince}'  SIZE='15' MAXLENGTH='15'  tabindex=6 id ='DiveSiteProvince' \n   onBlur=\"if(isBlank(this.form.DiveSiteProvince.value)) {alert('DiveSiteProvince cannot be blank');this.form.DiveSiteProvince.style.background='Yellow';}else{this.form.DiveSiteProvince.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteCountry</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteCountry' VALUE='{$DiveSiteCountry}'  SIZE='15' MAXLENGTH='15'  tabindex=7 id ='DiveSiteCountry' \n   onBlur=\"if(isBlank(this.form.DiveSiteCountry.value)) {alert('DiveSiteCountry cannot be blank');this.form.DiveSiteCountry.style.background='Yellow';}else{this.form.DiveSiteCountry.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteName</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteName' VALUE='{$DiveSiteName}'  SIZE='80' MAXLENGTH='80'  tabindex=8 id ='DiveSiteName' \n   onBlur=\"if(isBlank(this.form.DiveSiteName.value)) {alert('DiveSiteName cannot be blank');this.form.DiveSiteName.style.background='Yellow';}else{this.form.DiveSiteName.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteMajorName</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteMajorName' VALUE='{$DiveSiteMajorName}'  SIZE='80' MAXLENGTH='80'  tabindex=9 id ='DiveSiteMajorName' \n   onBlur=\"if(isBlank(this.form.DiveSiteMajorName.value)) {alert('DiveSiteMajorName cannot be blank');this.form.DiveSiteMajorName.style.background='Yellow';}else{this.form.DiveSiteMajorName.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteMinorName</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteMinorName' VALUE='{$DiveSiteMinorName}'  SIZE='80' MAXLENGTH='80'  tabindex=10 id ='DiveSiteMinorName' \n   onBlur=\"if(isBlank(this.form.DiveSiteMinorName.value)) {alert('DiveSiteMinorName cannot be blank');this.form.DiveSiteMinorName.style.background='Yellow';}else{this.form.DiveSiteMinorName.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteRating</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteRating' VALUE='{$DiveSiteRating}'  SIZE='10' MAXLENGTH='10'  tabindex=11 id ='DiveSiteRating' \n   onBlur=\"if(isBlank(this.form.DiveSiteRating.value)) {alert('DiveSiteRating cannot be blank');this.form.DiveSiteRating.style.background='Yellow';}else{this.form.DiveSiteRating.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteType</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteType' VALUE='{$DiveSiteType}'  SIZE='15' MAXLENGTH='15'  tabindex=12 id ='DiveSiteType' \n   onBlur=\"if(isBlank(this.form.DiveSiteType.value)) {alert('DiveSiteType cannot be blank');this.form.DiveSiteType.style.background='Yellow';}else{this.form.DiveSiteType.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteLevel</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteLevel' VALUE='{$DiveSiteLevel}'  SIZE='15' MAXLENGTH='15'  tabindex=13 id ='DiveSiteLevel' \n   onBlur=\"if(isBlank(this.form.DiveSiteLevel.value)) {alert('DiveSiteLevel cannot be blank');this.form.DiveSiteLevel.style.background='Yellow';}else{this.form.DiveSiteLevel.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteElevation</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteElevation' VALUE='{$DiveSiteElevation}'  SIZE='11' MAXLENGTH='11'  tabindex=14 id ='DiveSiteElevation' \n   onBlur=\"if(isBlank(this.form.DiveSiteElevation.value)) {alert('DiveSiteElevation cannot be blank');this.form.DiveSiteElevation.style.background='Yellow';}else{this.form.DiveSiteElevation.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteElevationUnits</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteElevationUnits' VALUE='{$DiveSiteElevationUnits}'  SIZE='5' MAXLENGTH='5'  tabindex=15 id ='DiveSiteElevationUnits' \n   onBlur=\"if(isBlank(this.form.DiveSiteElevationUnits.value)) {alert('DiveSiteElevationUnits cannot be blank');this.form.DiveSiteElevationUnits.style.background='Yellow';}else{this.form.DiveSiteElevationUnits.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteWater</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteWater' VALUE='{$DiveSiteWater}'  SIZE='50' MAXLENGTH='50'  tabindex=16 id ='DiveSiteWater' \n   onBlur=\"if(isBlank(this.form.DiveSiteWater.value)) {alert('DiveSiteWater cannot be blank');this.form.DiveSiteWater.style.background='Yellow';}else{this.form.DiveSiteWater.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteDifficulty</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteDifficulty' VALUE='{$DiveSiteDifficulty}'  SIZE='20' MAXLENGTH='20'  tabindex=17 id ='DiveSiteDifficulty' \n   onBlur=\"if(isBlank(this.form.DiveSiteDifficulty.value)) {alert('DiveSiteDifficulty cannot be blank');this.form.DiveSiteDifficulty.style.background='Yellow';}else{this.form.DiveSiteDifficulty.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteTideTable</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteTideTable' VALUE='{$DiveSiteTideTable}'  SIZE='80' MAXLENGTH='80'  tabindex=18 id ='DiveSiteTideTable' \n   onBlur=\"if(isBlank(this.form.DiveSiteTideTable.value)) {alert('DiveSiteTideTable cannot be blank');this.form.DiveSiteTideTable.style.background='Yellow';}else{this.form.DiveSiteTideTable.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteTideTableNotes</th>\n<td><TEXTAREA NAME='DiveSiteTideTableNotes' COLS=100 ROW=3 TABINDEX=19>{$DiveSiteTideTableNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteBestDiveMonths</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteBestDiveMonths' VALUE='{$DiveSiteBestDiveMonths}'  SIZE='15' MAXLENGTH='15'  tabindex=20 id ='DiveSiteBestDiveMonths' \n   onBlur=\"if(isBlank(this.form.DiveSiteBestDiveMonths.value)) {alert('DiveSiteBestDiveMonths cannot be blank');this.form.DiveSiteBestDiveMonths.style.background='Yellow';}else{this.form.DiveSiteBestDiveMonths.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteTimeRestrictions</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteTimeRestrictions' VALUE='{$DiveSiteTimeRestrictions}'  SIZE='50' MAXLENGTH='50'  tabindex=21 id ='DiveSiteTimeRestrictions' \n   onBlur=\"if(isBlank(this.form.DiveSiteTimeRestrictions.value)) {alert('DiveSiteTimeRestrictions cannot be blank');this.form.DiveSiteTimeRestrictions.style.background='Yellow';}else{this.form.DiveSiteTimeRestrictions.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSitePermitRequired</th>\n");
    echo "<td><input type ='text' NAME='DiveSitePermitRequired' VALUE='{$DiveSitePermitRequired}'  SIZE='50' MAXLENGTH='50'  tabindex=22 id ='DiveSitePermitRequired' \n   onBlur=\"if(isBlank(this.form.DiveSitePermitRequired.value)) {alert('DiveSitePermitRequired cannot be blank');this.form.DiveSitePermitRequired.style.background='Yellow';}else{this.form.DiveSitePermitRequired.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteWinterTemp</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteWinterTemp' VALUE='{$DiveSiteWinterTemp}'  SIZE='11' MAXLENGTH='11'  tabindex=23 id ='DiveSiteWinterTemp' \n   onBlur=\"if(isBlank(this.form.DiveSiteWinterTemp.value)) {alert('DiveSiteWinterTemp cannot be blank');this.form.DiveSiteWinterTemp.style.background='Yellow';}else{this.form.DiveSiteWinterTemp.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteSummerTemp</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteSummerTemp' VALUE='{$DiveSiteSummerTemp}'  SIZE='11' MAXLENGTH='11'  tabindex=24 id ='DiveSiteSummerTemp' \n   onBlur=\"if(isBlank(this.form.DiveSiteSummerTemp.value)) {alert('DiveSiteSummerTemp cannot be blank');this.form.DiveSiteSummerTemp.style.background='Yellow';}else{this.form.DiveSiteSummerTemp.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteFallTemp</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteFallTemp' VALUE='{$DiveSiteFallTemp}'  SIZE='11' MAXLENGTH='11'  tabindex=25 id ='DiveSiteFallTemp' \n   onBlur=\"if(isBlank(this.form.DiveSiteFallTemp.value)) {alert('DiveSiteFallTemp cannot be blank');this.form.DiveSiteFallTemp.style.background='Yellow';}else{this.form.DiveSiteFallTemp.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteSpringTemp</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteSpringTemp' VALUE='{$DiveSiteSpringTemp}'  SIZE='11' MAXLENGTH='11'  tabindex=26 id ='DiveSiteSpringTemp' \n   onBlur=\"if(isBlank(this.form.DiveSiteSpringTemp.value)) {alert('DiveSiteSpringTemp cannot be blank');this.form.DiveSiteSpringTemp.style.background='Yellow';}else{this.form.DiveSiteSpringTemp.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteDepthMin</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteDepthMin' VALUE='{$DiveSiteDepthMin}'  SIZE='80' MAXLENGTH='80'  tabindex=27 id ='DiveSiteDepthMin' \n   onBlur=\"if(isBlank(this.form.DiveSiteDepthMin.value)) {alert('DiveSiteDepthMin cannot be blank');this.form.DiveSiteDepthMin.style.background='Yellow';}else{this.form.DiveSiteDepthMin.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteDepthMax</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteDepthMax' VALUE='{$DiveSiteDepthMax}'  SIZE='11' MAXLENGTH='11'  tabindex=28 id ='DiveSiteDepthMax' \n   onBlur=\"if(isBlank(this.form.DiveSiteDepthMax.value)) {alert('DiveSiteDepthMax cannot be blank');this.form.DiveSiteDepthMax.style.background='Yellow';}else{this.form.DiveSiteDepthMax.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteDepthUnits</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteDepthUnits' VALUE='{$DiveSiteDepthUnits}'  SIZE='5' MAXLENGTH='5'  tabindex=29 id ='DiveSiteDepthUnits' \n   onBlur=\"if(isBlank(this.form.DiveSiteDepthUnits.value)) {alert('DiveSiteDepthUnits cannot be blank');this.form.DiveSiteDepthUnits.style.background='Yellow';}else{this.form.DiveSiteDepthUnits.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteVisibilityMinimum</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteVisibilityMinimum' VALUE='{$DiveSiteVisibilityMinimum}'  SIZE='11' MAXLENGTH='11'  tabindex=30 id ='DiveSiteVisibilityMinimum' \n   onBlur=\"if(isBlank(this.form.DiveSiteVisibilityMinimum.value)) {alert('DiveSiteVisibilityMinimum cannot be blank');this.form.DiveSiteVisibilityMinimum.style.background='Yellow';}else{this.form.DiveSiteVisibilityMinimum.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteVisibilityMaximum</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteVisibilityMaximum' VALUE='{$DiveSiteVisibilityMaximum}'  SIZE='11' MAXLENGTH='11'  tabindex=31 id ='DiveSiteVisibilityMaximum' \n   onBlur=\"if(isBlank(this.form.DiveSiteVisibilityMaximum.value)) {alert('DiveSiteVisibilityMaximum cannot be blank');this.form.DiveSiteVisibilityMaximum.style.background='Yellow';}else{this.form.DiveSiteVisibilityMaximum.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteVisibilityUnits</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteVisibilityUnits' VALUE='{$DiveSiteVisibilityUnits}'  SIZE='15' MAXLENGTH='15'  tabindex=32 id ='DiveSiteVisibilityUnits' \n   onBlur=\"if(isBlank(this.form.DiveSiteVisibilityUnits.value)) {alert('DiveSiteVisibilityUnits cannot be blank');this.form.DiveSiteVisibilityUnits.style.background='Yellow';}else{this.form.DiveSiteVisibilityUnits.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteHazards</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteHazards' VALUE='{$DiveSiteHazards}'  SIZE='50' MAXLENGTH='50'  tabindex=33 id ='DiveSiteHazards' \n   onBlur=\"if(isBlank(this.form.DiveSiteHazards.value)) {alert('DiveSiteHazards cannot be blank');this.form.DiveSiteHazards.style.background='Yellow';}else{this.form.DiveSiteHazards.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteHazardNotes</th>\n<td><TEXTAREA NAME='DiveSiteHazardNotes' COLS=100 ROW=3 TABINDEX=34>{$DiveSiteHazardNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteBottomComposition</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteBottomComposition' VALUE='{$DiveSiteBottomComposition}'  SIZE='50' MAXLENGTH='50'  tabindex=35 id ='DiveSiteBottomComposition' \n   onBlur=\"if(isBlank(this.form.DiveSiteBottomComposition.value)) {alert('DiveSiteBottomComposition cannot be blank');this.form.DiveSiteBottomComposition.style.background='Yellow';}else{this.form.DiveSiteBottomComposition.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteCompositionNotes</th>\n<td><TEXTAREA NAME='DiveSiteCompositionNotes' COLS=100 ROW=3 TABINDEX=36>{$DiveSiteCompositionNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteTelephoneNotes</th>\n<td><TEXTAREA NAME='DiveSiteTelephoneNotes' COLS=100 ROW=3 TABINDEX=37>{$DiveSiteTelephoneNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteFacilities</th>\n");
    GetCheckBoxRecords($NumDiveSiteFacilitiesRecordsDesired, $DiveSiteFacilitiesIdArray, $DiveSiteFacilitiesRankArray, $DiveSiteFacilitiesDescriptionArray, 'DiveSiteFacilities', $DiveSiteFacilityNames);
    PutCheckVariablesIntoSession($DiveSiteFacilityNames, $DiveSiteFacilitiesIdArray, $DiveSiteFacilitiesRankArray, $DiveSiteFacilitiesDescriptionArray);
    $DisplayColumns = 4;
    $colcount = 0;
    echo '<td><table>';
    echo '<tr>';
    for ($i = 0; $i < $NumDiveSiteFacilitiesRecordsDesired; $i++) {
        echo '<td><input type="checkbox" name="DiveFacility[]" value ="' . $DiveSiteFacilitiesDescriptionArray[$i] . '" onclick="enableElement(this.form.elements[\'DiveSiteFacilitiesNotes\'],this.form.elements[\'DiveFacility[]\']);" />' . $DiveSiteFacilitiesDescriptionArray[$i] . '</td>';
        $colcount++;
        if ($colcount == $DisplayColumns) {
            echo '</tr><tr>';
            $colcount = 0;
        }
    }
    if ($colcount != 0) {
        echo '</tr>';
        $colcount = 0;
    }
    #echo('<tr><td><input type="text" name="DiveSiteFacilitiesNotes" disabled="disabled"></td></tr>');
    echo '</table></td>';
    #echo ("<td><input type ='text' NAME='DiveSiteFacilities' VALUE='$DiveSiteFacilities'  SIZE='50' MAXLENGTH='50'  tabindex=38 id ='DiveSiteFacilities'
    #   onBlur=\"if(isBlank(this.form.DiveSiteFacilities.value)) {alert('DiveSiteFacilities cannot be blank');this.form.DiveSiteFacilities.style.background='Yellow';}else{this.form.DiveSiteFacilities.style.background='White';}\"><br></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteFacilitiesNotes</th>\n<td><TEXTAREA NAME='DiveSiteFacilitiesNotes' COLS=100 ROW=3 TABINDEX=39>{$DiveSiteFacilitiesNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteMedical</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteMedical' VALUE='{$DiveSiteMedical}'  SIZE='50' MAXLENGTH='50'  tabindex=40 id ='DiveSiteMedical' \n   onBlur=\"if(isBlank(this.form.DiveSiteMedical.value)) {alert('DiveSiteMedical cannot be blank');this.form.DiveSiteMedical.style.background='Yellow';}else{this.form.DiveSiteMedical.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteMedicalNotes</th>\n<td><TEXTAREA NAME='DiveSiteMedicalNotes' COLS=100 ROW=3 TABINDEX=41>{$DiveSiteMedicalNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteRecommendationNotes</th>\n<td><TEXTAREA NAME='DiveSiteRecommendationNotes' COLS=100 ROW=3 TABINDEX=42>{$DiveSiteRecommendationNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteEAPNotes</th>\n<td><TEXTAREA NAME='DiveSiteEAPNotes' COLS=100 ROW=3 TABINDEX=43>{$DiveSiteEAPNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteNotes</th>\n<td><TEXTAREA NAME='DiveSiteNotes' COLS=100 ROW=3 TABINDEX=44>{$DiveSiteNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteExactLat</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteExactLat' VALUE='{$DiveSiteExactLat}'  SIZE='10,6' MAXLENGTH='10,6'  tabindex=45 id ='DiveSiteExactLat' \n   onBlur=\"if(isBlank(this.form.DiveSiteExactLat.value)) {alert('DiveSiteExactLat cannot be blank');this.form.DiveSiteExactLat.style.background='Yellow';}else{this.form.DiveSiteExactLat.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteExactLong</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteExactLong' VALUE='{$DiveSiteExactLong}'  SIZE='10,6' MAXLENGTH='10,6'  tabindex=46 id ='DiveSiteExactLong' \n   onBlur=\"if(isBlank(this.form.DiveSiteExactLong.value)) {alert('DiveSiteExactLong cannot be blank');this.form.DiveSiteExactLong.style.background='Yellow';}else{this.form.DiveSiteExactLong.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteShoreLat</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteShoreLat' VALUE='{$DiveSiteShoreLat}'  SIZE='10,6' MAXLENGTH='10,6'  tabindex=47 id ='DiveSiteShoreLat' \n   onBlur=\"if(isBlank(this.form.DiveSiteShoreLat.value)) {alert('DiveSiteShoreLat cannot be blank');this.form.DiveSiteShoreLat.style.background='Yellow';}else{this.form.DiveSiteShoreLat.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteShoreLong</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteShoreLong' VALUE='{$DiveSiteShoreLong}'  SIZE='10,6' MAXLENGTH='10,6'  tabindex=48 id ='DiveSiteShoreLong' \n   onBlur=\"if(isBlank(this.form.DiveSiteShoreLong.value)) {alert('DiveSiteShoreLong cannot be blank');this.form.DiveSiteShoreLong.style.background='Yellow';}else{this.form.DiveSiteShoreLong.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteShoreNotes</th>\n<td><TEXTAREA NAME='DiveSiteShoreNotes' COLS=100 ROW=3 TABINDEX=49>{$DiveSiteShoreNotes}</TEXTAREA></td>");
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteWebPage</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteWebPage' VALUE='{$DiveSiteWebPage}'  SIZE='150' MAXLENGTH='150'  tabindex=50 id ='DiveSiteWebPage' \n   onBlur=\"if(isBlank(this.form.DiveSiteWebPage.value)) {alert('DiveSiteWebPage cannot be blank');this.form.DiveSiteWebPage.style.background='Yellow';}else{this.form.DiveSiteWebPage.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr><th valign='top' align ='left' scope='row'>DiveSiteBackground</th>\n");
    echo "<td><input type ='text' NAME='DiveSiteBackground' VALUE='{$DiveSiteBackground}'  SIZE='150' MAXLENGTH='150'  tabindex=51 id ='DiveSiteBackground' \n   onBlur=\"if(isBlank(this.form.DiveSiteBackground.value)) {alert('DiveSiteBackground cannot be blank');this.form.DiveSiteBackground.style.background='Yellow';}else{this.form.DiveSiteBackground.style.background='White';}\"><br></td>";
    echo stripslashes("</tr>\n<tr></tr><tr></tr><tr></tr>\n<tr>\n");
}
Example #2
0
    elem.disabled=false;
    i=count+2;
  }
  else
  {
    wantfield=false;
    elem.disabled=true;
  }
 }  


}
</script>';
echo '</head><body>';
$DisplayColumns = 4;
GetCheckBoxRecords($NumDiveSiteFacilitiesRecordsDesired, $DiveSiteFacilitiesIdArray, $DiveSiteFacilitiesRankArray, $DiveSiteFacilitiesDescriptionArray, 'DiveSiteFacilities', $DiveSiteFacilityNames);
PutCheckVariablesIntoSession($DiveSiteFacilityNames, $DiveSiteFacilitiesIdArray, $DiveSiteFacilitiesRankArray, $DiveSiteFacilitiesDescriptionArray);
for ($i = 0; $i < $NumDiveSiteFacilitiesRecordsDesired; $i++) {
    echo '<br />';
    echo $i . ' ' . $DiveSiteFacilitiesIdArray[$i];
    echo ' ' . $DiveSiteFacilitiesRankArray[$i];
    echo ' ' . $DiveSiteFacilitiesDescriptionArray[$i];
}
echo '<form action="FacilityCheckProcess.php" method="post">';
echo '<table>';
$colcount = 0;
echo '<tr>';
for ($i = 0; $i < $NumDiveSiteFacilitiesRecordsDesired; $i++) {
    echo '<td><input type="checkbox" name="DiveFacility[]" value ="' . $DiveSiteFacilitiesDescriptionArray[$i] . '" onclick="enableElement(this.form.elements[\'DiveSiteFacilitiesNotes\'],this.form.elements[\'DiveFacility[]\']);" />' . $DiveSiteFacilitiesDescriptionArray[$i] . '</td>';
    $colcount++;
    if ($colcount == $DisplayColumns) {