<?xml version="1.0" encoding="iso-8859-1" ?>
<FacileFormsPackage id="DiveLogs" type="autoincrement" version="1.4.7">
	<name>DiveLogs</name>
	<title>DiveLogs</title>
	<version>1.00</version>
	<creationDate>2007-03-21 10:57:20</creationDate>
	<author>Julian Zimmerle</author>
	<authorEmail>Julian@Zimmerle.de</authorEmail>
	<authorUrl>www.zimmerle.de</authorUrl>
	<description>This form inserts dive logs as articles into the database.</description>
	<copyright>GPL</copyright>
	<form id="11">
		<runmode>2</runmode>
		<package>DiveLogs</package>
		<name>SubmitDiveLog</name>
		<title>Submit Dive Log</title>
		<description>This form is used to submit new dive logs.</description>
		<class1>content_outline</class1>
		<width>800</width>
		<height>650</height>
		<pages>3</pages>
		<emailntf>0</emailntf>
		<dblog>0</dblog>
		<piece1cond>2</piece1cond>
		<piece1code>//+trace dis\r\n\r\n// configuration variables\r\n$register = 1\x3B  // 0 = public access\x2C 1 = registred users only\r\n\r\n// declare globals used in this piece\r\nglobal $my\x3B\r\n\r\n// load the standard piece library\r\n$this-\x3EexecPieceByName(\x27ff_InitLib\x27)\x3B  \r\n\r\n// check for registred users\r\nif ($register \x26\x26 !$my-\x3Eid) $this-\x3Epage = 2\x3B</piece1code>
		<piece3cond>2</piece3cond>
		<piece3code>//+trace dis\r\n\r\n// configuration variables\r\n$moderate = 0\x3B  // 0 = publish directly\x2C 1 = leave unpublished\r\n\r\n// declare globals used in this piece\r\nglobal $Itemid\x2C $my\x3B\r\n\r\n// load the standard piece library\r\n$this-\x3EexecPieceByName(\x27ff_InitLib\x27)\x3B\r\n\r\n\r\n//set values for article creation\r\n$creatorid  = 63\x3B  // id of the user the article should be created with\r\n$categoryid = 9\x3B   // id of the category the article should be created in\r\n$sectionid  = 3\x3B   // id of the section that contains the above category\r\n\r\n\r\n// get values from submission\r\n$diveNumber = ff_getSubmit(\x27diveNumber\x27\x2C \x27\x27)\x3B\r\n$diveDate = ff_getSubmit(\x27diveDate\x27\x2C \x27\x27)\x3B\r\n$diveLocation = ff_getSubmit(\x27diveLocation\x27\x2C \x27\x27)\x3B\r\n$diveTimeIn = ff_getSubmit(\x27diveTimeIn\x27\x2C \x27\x27)\x3B\r\n$diveTimeOut = ff_getSubmit(\x27diveTimeOut\x27\x2C \x27\x27)\x3B\r\n$diveWeights = ff_getSubmit(\x27diveWeights\x27\x2C \x27\x27)\x3B\r\n$diveWeightsUnit = ff_getSubmit(\x27diveWeightsUnit\x27\x2C \x27\x27)\x3B\r\n$diveTankPressureUnit = ff_getSubmit(\x27diveTankPressureUnit\x27\x2C \x27\x27)\x3B\r\n$diveStartTankPressure = ff_getSubmit(\x27diveStartTankPressure\x27\x2C \x27\x27)\x3B\r\n$diveEndTankPressure = ff_getSubmit(\x27diveEndTankPressure\x27\x2C \x27\x27)\x3B\r\n$diveGasType = ff_getSubmit(\x27diveGasType\x27\x2C \x27\x27)\x3B\r\n$diveTankVolume = ff_getSubmit(\x27diveTankVolume\x27\x2C \x27\x27)\x3B\r\n$diveDrysuit = ff_getSubmit(\x27diveDrysuit\x27\x2C \x27\x27)\x3B\r\n$diveWetsuit7mm = ff_getSubmit(\x27diveWetsuit7mm\x27\x2C \x27\x27)\x3B\r\n$diveWetsuit3mm = ff_getSubmit(\x27diveWetsuit3mm\x27\x2C \x27\x27)\x3B\r\n$diveShortyWetsuit = ff_getSubmit(\x27diveShortyWetsuit\x27\x2C \x27\x27)\x3B\r\n$diveHood = ff_getSubmit(\x27diveHood\x27\x2C \x27\x27)\x3B\r\n$diveVest = ff_getSubmit(\x27diveVest\x27\x2C \x27\x27)\x3B\r\n$diveGloves = ff_getSubmit(\x27diveGloves\x27\x2C \x27\x27)\x3B\r\n$diveBoots = ff_getSubmit(\x27diveBoots\x27\x2C \x27\x27)\x3B\r\n$diveSwimmingTrunks = ff_getSubmit(\x27diveSwimmingTrunks\x27\x2C \x27\x27)\x3B\r\n$diveEntryFrom = ff_getSubmit(\x27diveEntryFrom\x27\x2C \x27\x27)\x3B\r\n$diveWaterType = ff_getSubmit(\x27diveWaterType\x27\x2C \x27\x27)\x3B\r\n$diveWaves = ff_getSubmit(\x27diveWaves\x27\x2C \x27\x27)\x3B\r\n$diveCurrent = ff_getSubmit(\x27diveCurrent\x27\x2C \x27\x27)\x3B\r\n$diveSurf = ff_getSubmit(\x27diveSurf\x27\x2C \x27\x27)\x3B\r\n$diveSurge = ff_getSubmit(\x27diveSurge\x27\x2C \x27\x27)\x3B\r\n$diveTemperateAir = ff_getSubmit(\x27diveTemperateAir\x27\x2C \x27\x27)\x3B\r\n$diveTemperateSurface = ff_getSubmit(\x27diveTemperateSurface\x27\x2C \x27\x27)\x3B\r\n$diveTemperateBottom = ff_getSubmit(\x27diveTemperateBottom\x27\x2C \x27\x27)\x3B\r\n$diveTemperateUnit = ff_getSubmit(\x27diveTemperateUnit\x27\x2C \x27\x27)\x3B\r\n$diveVisibility = ff_getSubmit(\x27diveVisibility\x27\x2C \x27\x27)\x3B\r\n$diveVisibilityUnit = ff_getSubmit(\x27diveVisibilityUnit\x27\x2C \x27\x27)\x3B\r\n$diveSurfaceInterval = ff_getSubmit(\x27diveSurfaceInterval\x27\x2C \x27\x27)\x3B\r\n$diveStartPressureGroup = ff_getSubmit(\x27diveStartPressureGroup\x27\x2C \x27\x27)\x3B\r\n$diveDepth = ff_getSubmit(\x27diveDepth\x27\x2C \x27\x27)\x3B\r\n$diveDepthUnit = ff_getSubmit(\x27diveDepthUnit\x27\x2C \x27\x27)\x3B\r\n$diveBottomTime = ff_getSubmit(\x27diveBottomTime\x27\x2C \x27\x27)\x3B\r\n$diveSafetyStop = ff_getSubmit(\x27diveSafetyStop\x27\x2C 0)\x3B\r\n$diveEndPressureGroup = ff_getSubmit(\x27diveEndPressureGroup\x27\x2C \x27\x27)\x3B\r\n$diveResidualNitrogenTime = ff_getSubmit(\x27diveResidualNitrogenTime\x27\x2C 0)\x3B\r\n$diveBottomTimeToDate = ff_getSubmit(\x27diveBottomTimeToDate\x27\x2C \x27\x27)\x3B\r\n$diveVerifiedBy = ff_getSubmit(\x27diveVerifiedBy\x27\x2C \x27\x27)\x3B\r\n$diveVerifiedType = ff_getSubmit(\x27diveVerifiedType\x27\x2C \x27\x27)\x3B\r\n$diveVerifiedType = ff_getSubmit(\x27diveVerifiedType\x27\x2C \x27\x27)\x3B\r\n$diveVerifiedType = ff_getSubmit(\x27diveVerifiedType\x27\x2C \x27\x27)\x3B\r\n$diveCertificationNumber = ff_getSubmit(\x27diveCertificationNumber\x27\x2C \x27\x27)\x3B\r\n$diveComments = ff_getSubmit(\x27diveComments\x27\x2C \x27\x27)\x3B\r\n$diveRating = ff_getSubmit(\x27diveRating\x27\x2C \x27\x27)\x3B\r\nif($diveRating == \x22I will not miss this dive.\x22) $diveRating = \x27I won\x26#39\x3Bt miss this dive.\x27\x3B\r\n\r\n\r\n// calculate other values\r\n$diveGasUsed = ( $diveStartTankPressure - $diveEndTankPressure ) * $diveTankVolume \x3B\r\n$diveTotalBottomTime = $diveBottomTime + $diveResidualNitrogenTime \x3B\r\n$diveCumulativeTime = $diveBottomTimeToDate + $diveBottomTime \x3B\r\n\r\n\r\n// unit conversion (comment out the blocks you don\x27t want\x2C uncomment the ones you do)\r\n\r\nif( $diveWeightsUnit == \x27lbs\x27 ){                     // weights: lbs -\x3E kg\r\n  $diveWeightsUnit = \x27kg\x27 \x3B\r\n  $diveWeights =  $diveWeights * 0.45359 \x3B }\r\n\r\n//if( $diveWeightsUnit == \x27kg\x27 ){                      // weights: kg -\x3E lbs\r\n//  $diveWeightsUnit = \x27lbs\x27 \x3B\r\n//  $diveWeights =  $diveWeights * 2.2046 \x3B }\r\n\r\nif( $diveTankPressureUnit == \x27psi\x27 ){                // tank pressure: psi -\x3E bar\r\n  $diveTankPressureUnit = \x27bar\x27 \x3B\r\n  $diveStartTankPressure = $diveStartTankPressure * 0.068948 \x3B\r\n  $diveEndTankPressure = $diveEndTankPressure * 0.068948 \x3B }\r\n\r\n//if( $diveTankPressureUnit == \x27bar\x27 ){                // tank pressure: bar -\x3E psi\r\n//  $diveTankPressureUnit = \x27psi\x27 \x3B\r\n//  $diveStartTankPressure = $diveStartTankPressure * 14.504 \x3B\r\n//  $diveEndTankPressure = $diveEndTankPressure * 14.504 \x3B }\r\n\r\n// We convert everything to Kelvin first to convert to any other from Kelvin later.\r\n// So don\x27t comment out any part of this block.\r\nif( $diveTemperateUnit == \x27Celsius\x27 ){               // Celsius -\x3E Kelvin\r\n  $diveTemperateUnit = \x27Kelvin\x27 \x3B\r\n  $diveTemperateAir = $diveTemperateAir + 273.15 \x3B\r\n  $diveTemperateSurface = $diveTemperateSurface + 273.15 \x3B\r\n  $diveTemperateBottom = $diveTemperateBottom + 273.15 \x3B }\r\nif( $diveTemperateUnit == \x27Fahrenheit\x27 ){            // Fahrenheit -\x3E Kelvin\r\n  $diveTemperateUnit = \x27Kelvin\x27 \x3B\r\n  $diveTemperateAir = ( $diveTemperateAir + 459.67) / 1.8 \x3B\r\n  $diveTemperateSurface = ( $diveTemperateSurface + 459.67) / 1.8 \x3B\r\n  $diveTemperateBottom = ( $diveTemperateBottom + 459.67) / 1.8 \x3B }\r\nif( $diveTemperateUnit == \x27Rankine\x27 ){               // Rankine -\x3E Kelvin\r\n  $diveTemperateUnit = \x27Kelvin\x27 \x3B\r\n  $diveTemperateAir = $diveTemperateAir / 1.8 \x3B\r\n  $diveTemperateSurface = $diveTemperateSurface / 1.8 \x3B\r\n  $diveTemperateBottom = $diveTemperateBottom / 1.8 \x3B }\r\nif( $diveTemperateUnit == \x27electronvolt\x27 ){          // electronvolt -\x3E Kelvin\r\n  $diveTemperateUnit = \x27Kelvin\x27 \x3B\r\n  $diveTemperateAir = $diveTemperateAir * 11604.5\x3B\r\n  $diveTemperateSurface = $diveTemperateSurface * 11604.5 \x3B\r\n  $diveTemperateBottom = $diveTemperateBottom * 11604.5 \x3B }\r\n\r\n//if( $diveTemperateUnit == \x27Kelvin\x27 ){                // Kelvin -\x3E Celsius\r\n//  $diveTemperateUnit = \x27\x26deg\x3B C (Celsius)\x27 \x3B\r\n//  $diveTemperateAir = $diveTemperateAir - 273.15 \x3B\r\n//  $diveTemperateSurface = $diveTemperateSurface - 273.15 \x3B\r\n//  $diveTemperateBottom = $diveTemperateBottom - 273.15 \x3B }\r\n\r\n//if( $diveTemperateUnit == \x27Kelvin\x27 ){                // Kelvin -\x3E Fahrenheit\r\n//  $diveTemperateUnit = \x27\x26deg\x3B F (Fahrenheit)\x27 \x3B\r\n//  $diveTemperateAir = ( $diveTemperateAir * 1.8 ) - 459.67 \x3B\r\n//  $diveTemperateSurface = ( $diveTemperateSurface * 1.8 ) - 459.67 \x3B\r\n//  $diveTemperateBottom = ( $diveTemperateBottom * 1.8 ) - 459.67 \x3B }\r\n\r\n//if( $diveTemperateUnit == \x27Kelvin\x27 ){                // Kelvin -\x3E Rankine\r\n//  $diveTemperateUnit = \x27\x26deg\x3B R (Rankine)\x27 \x3B\r\n//  $diveTemperateAir = $diveTemperateAir * 1.8\x3B\r\n//  $diveTemperateSurface = $diveTemperateSurface * 1.8 \x3B\r\n//  $diveTemperateBottom = $diveTemperateBottom * 1.8 \x3B }\r\n\r\n//if( $diveTemperateUnit == \x27Kelvin\x27 ){                // Kelvin -\x3E electronvolt\r\n//  $diveTemperateUnit = \x27 eV (electronvolt)\x27 \x3B\r\n//  $diveTemperateAir = $diveTemperateAir / 11604.5 \x3B\r\n//  $diveTemperateSurface = $diveTemperateSurface / 11604.5 \x3B\r\n//  $diveTemperateBottom = $diveTemperateBottom / 11604.5 \x3B }\r\n\r\nif( $diveTemperateUnit == \x27Kelvin\x27 ){                // prepare string for Kelvin\r\n  $diveTemperateUnit = \x27 Kelvin\x27 \x3B}\r\n\r\nif( $diveVisibilityUnit == \x27ft\x27 ){                   // visibility: feet -\x3E meters\r\n  $diveVisibilityUnit = \x27m\x27 \x3B\r\n  $diveVisibility = $diveVisibility * 0.3048 \x3B }\r\n\r\n//if( $diveVisibilityUnit == \x27m\x27 ){                    // visibility: meters -\x3E feet\r\n//  $diveVisibilityUnit = \x27ft\x27 \x3B\r\n//  $diveVisibility = $diveVisibility * 3.28084 \x3B }\r\n\r\nif( $diveDepthUnit == \x27ft\x27 ){                          // depth: feet -\x3E meters\r\n  $diveDepthUnit = \x27m\x27 \x3B\r\n  $diveDepth = $diveDepth  * 0.3048 \x3B }\r\n\r\n//if( $diveDepthUnit == \x27m\x27 ){                           // depth: meters -\x3E feet\r\n//  $diveDepthUnit = \x27ft\x27 \x3B\r\n//  $diveDepth = $diveDepth * 3.28084 \x3B }\r\n\r\n\r\n\r\n// get string lengths of variables (to use in size option of output fields of forms)\r\n$diveNumberLength = strlen($diveNumber)\x3B\r\n$diveDateLength = strlen($diveDate)\x3B\r\n$diveLocationLength = strlen($diveLocation)\x3B\r\n$diveTimeInLength = strlen($diveTimeIn)\x3B\r\n$diveTimeOutLength = strlen($diveTimeOut)\x3B\r\n$diveWeightsLength = strlen($diveWeights)\x3B\r\n$diveWeightsUnitLength = strlen($diveWeightsUnit)\x3B\r\n$diveStartTankPressureLength = strlen($diveStartTankPressure)\x3B\r\n$diveEndTankPressureLength = strlen($diveEndTankPressure)\x3B\r\n$diveTankPressureUnitLength = strlen($diveTankPressureUnit)\x3B\r\n$diveGasTypeLength = strlen($diveGasType)\x3B\r\n$diveTankVolumeLength = strlen($diveTankVolume)\x3B\r\n$diveDrysuitLength = strlen($diveDrysuit)\x3B\r\n$diveWetsuit7mmLength = strlen($diveWetsuit7mm)\x3B\r\n$diveWetsuit3mmLength = strlen($diveWetsuit3mm)\x3B\r\n$diveShortyWetsuitLength = strlen($diveShortyWetsuit)\x3B\r\n$diveHoodLength = strlen($diveHood)\x3B\r\n$diveVestLength = strlen($diveVest)\x3B\r\n$diveGlovesLength = strlen($diveGloves)\x3B\r\n$diveBootsLength = strlen($diveBoots)\x3B\r\n$diveSwimmingTrunksLength = strlen($diveSwimmingTrunks)\x3B\r\n$diveEntryFromLength = strlen($diveEntryFrom)\x3B\r\n$diveWaterTypeLength = strlen($diveWaterType)\x3B\r\n$diveWavesLength = strlen($diveWaves)\x3B\r\n$diveCurrentLength = strlen($diveCurrent)\x3B\r\n$diveSurfLength = strlen($diveSurf)\x3B\r\n$diveSurgeLength = strlen($diveSurge)\x3B\r\n$diveTemperateAirLength = strlen($diveTemperateAir)\x3B\r\n$diveTemperateSurfaceLength = strlen($diveTemperateSurface)\x3B\r\n$diveTemperateBottomLength = strlen($diveTemperateBottom)\x3B\r\n$diveTemperateUnitLength = strlen($diveTemperateUnit)\x3B\r\n$diveVisibilityLength = strlen($diveVisibility)\x3B\r\n$diveVisibilityUnitLength = strlen($diveVisibilityUnit)\x3B\r\n$diveSurfaceIntervalLength = strlen($diveSurfaceInterval)\x3B\r\n$diveStartPressureGroupLength = strlen($diveStartPressureGroup)\x3B\r\n$diveDepthLength = strlen($diveDepth)\x3B\r\n$diveDepthUnitLength = strlen($diveDepthUnit)\x3B\r\n$diveBottomTimeLength = strlen($diveBottomTime)\x3B\r\n$diveSafetyStopLength = strlen($diveSafetyStop)\x3B\r\n$diveEndPressureGroupLength = strlen($diveEndPressureGroup)\x3B\r\n$diveResidualNitrogenTimeLength = strlen($diveResidualNitrogenTime)\x3B\r\n$diveBottomTimeToDateLength = strlen($diveBottomTimeToDate)\x3B\r\n$diveVerifiedByLength = strlen($diveVerifiedBy)\x3B\r\n$diveVerifiedTypeLength = strlen($diveVerifiedType)\x3B\r\n$diveVerifiedTypeLength = strlen($diveVerifiedType)\x3B\r\n$diveVerifiedTypeLength = strlen($diveVerifiedType)\x3B\r\n$diveCertificationNumberLength = strlen($diveCertificationNumber)\x3B\r\n$diveCommentsLength = strlen($diveComments)\x3B\r\n$diveRatingLength = strlen($diveRating)\x3B\r\n$diveGasUsedLength = strlen($diveGasUsed)\x3B\r\n$diveTotalBottomTimeLength = strlen($diveTotalBottomTime)\x3B\r\n$diveCumulativeTimeLength = strlen($diveCumulativeTime)\x3B\r\n\r\n\r\n// format comments and state\r\n$diveComments = trim($diveComments)\x3B\r\n$diveComments = ff_markdown($diveComments)\x3B\r\nif ($moderate) $state = 0\x3B else $state = 1\x3B\r\n\r\n\r\n// set article creation date to dive date timestamp interprated from user entry\r\n$date = strtotime( $diveDate . \x22 \x22 . $diveTimeOut ) \x3B\r\n$date = date( \x22Y-m-d H:i:s\x22\x2C $date )\x3B  // convert timestamp to ISO date/time string\r\n// use timestamp to normalise dive date\r\n//$diveDate = date( \x22Y-m-d\x22\x2C $date ) \x3B   // ISO time format\r\n$diveDate = date( \x22d. M. Y\x22\x2C $date ) \x3B   // DD. Mon. Year\r\n\r\n\r\n\r\n// generate article title\r\n$title = \x27Dive No. \x27 . $diveNumber . \x27: \x27 . $diveLocation \x3B\r\n\r\n\r\n// generate intro text for content item\r\nif( $diveComments != \x27\x27 ) $diveComments = \x27\x3Cbr\x3E\x27 . $diveComments \x3B\r\n$introtext = $diveRating . $diveComments \x3B\r\n\r\n\r\n// construct comma separated lists\r\n$diveWaterMovement = \x27\x27 \x3B\r\nif( $diveWaterMovement \x26\x26 $diveWaves ) $diveWaterMovement = $diveWaterMovement . \x27\x2C \x27 . $diveWaves \x3B\r\nif( ($diveWaterMovement == \x27\x27) \x26\x26 $diveWaves ) $diveWaterMovement = $diveWaves \x3B\r\nif( $diveWaterMovement \x26\x26 $diveCurrent ) $diveWaterMovement = $diveWaterMovement . \x27\x2C \x27 . $diveCurrent \x3B\r\nif( ($diveWaterMovement == \x27\x27) \x26\x26 $diveCurrent ) $diveWaterMovement = $diveCurrent \x3B\r\nif( $diveWaterMovement \x26\x26 $diveSurf ) $diveWaterMovement = $diveWaterMovement . \x27\x2C \x27 . $diveSurf \x3B\r\nif( ($diveWaterMovement == \x27\x27) \x26\x26 $diveSurf ) $diveWaterMovement = $diveSurf \x3B\r\nif( $diveWaterMovement \x26\x26 $diveSurge ) $diveWaterMovement = $diveWaterMovement . \x27\x2C \x27 . $diveSurge \x3B\r\nif( ($diveWaterMovement == \x27\x27) \x26\x26 $diveSurge ) $diveWaterMovement = $diveSurge \x3B\r\n$diveExposureProtection = \x27\x27 \x3B\r\nif( $diveExposureProtection \x26\x26 $diveDrysuit ) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveDrysuit \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveDrysuit ) $diveExposureProtection = $diveDrysuit \x3B\r\nif( $diveExposureProtection \x26\x26 $diveWetsuit7mm ) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveWetsuit7mm \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveWetsuit7mm ) $diveExposureProtection = $diveWetsuit7mm \x3B\r\nif( $diveExposureProtection \x26\x26 $diveWetsuit3mm) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveWetsuit3mm \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveWetsuit3mm ) $diveExposureProtection = $diveWetsuit3mm \x3B\r\nif( $diveExposureProtection \x26\x26 $diveShortyWetsuit) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveShortyWetsuit \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveShortyWetsuit) $diveExposureProtection = $diveShortyWetsuit \x3B\r\nif( $diveExposureProtection \x26\x26 $diveHood) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveHood \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveHood) $diveExposureProtection = $diveHood \x3B\r\nif( $diveExposureProtection \x26\x26 $diveVest) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveVest \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveVest) $diveExposureProtection = $diveVest \x3B\r\nif( $diveExposureProtection \x26\x26 $diveGloves) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveGloves \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveGloves) $diveExposureProtection = $diveGloves \x3B\r\nif( $diveExposureProtection \x26\x26 $diveBoots) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveBoots \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveBoots) $diveExposureProtection = $diveBoots \x3B\r\nif( $diveExposureProtection \x26\x26 $diveSwimmingTrunks) $diveExposureProtection = $diveExposureProtection . \x27\x2C \x27 . $diveSwimmingTrunks \x3B\r\nif( ($diveExposureProtection == \x27\x27) \x26\x26 $diveSwimmingTrunks) $diveExposureProtection = $diveSwimmingTrunks \x3B\r\nif( $diveExposureProtection == \x27\x27 ) $diveExposureProtection = \x27naturist\x27 \x3B\r\n\r\n\r\n// generate full text for content item\r\n$fulltext =\r\n\x22\x3Cp\x3E\x22 .\r\n\x22\x3Cu\x3EDive Number:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveNumber\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3ETime In:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveTimeIn\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3ETime Out:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveTimeOut\x3C/strong\x3E\x3C/em\x3E\x22 .\r\n\x22\x3C/p\x3E \x3Cp\x3E\x22 .\r\n\x22\x3Cu\x3EType of Dive Gas:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveGasType\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3ETank Pressure Start:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveStartTankPressure $diveTankPressureUnit\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3ETank Pressure End:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveEndTankPressure $diveTankPressureUnit\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3ETank Volume:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveTankVolume liters\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3EDive Gas Used:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveGasUsed liters\x3C/strong\x3E\x3C/em\x3E\x22 .\r\n\x22\x3C/p\x3E \x3Cp\x3E\x22 .\r\n\x22\x3Cu\x3EWeights:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveWeights $diveWeightsUnit\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3EExposure Protection:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveExposureProtection\x3C/strong\x3E\x3C/em\x3E\x22 .\r\n\x22\x3C/p\x3E \x3Cp\x3E\x22 .\r\n\x22\x3Cu\x3EEntry from:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveEntryFrom\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3EWater Type:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveWaterType\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 \x3B\r\nif( $diveWaterMovement != \x27\x27 ) $fulltext = $fulltext . \x22\x3Cu\x3EWater Movement:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveWaterMovement\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 \x3B\r\n$fulltext = $fulltext . \x22\x3Cu\x3EVisibility:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveVisibility $diveVisibilityUnit\x3C/strong\x3E\x3C/em\x3E\x22 .\r\n\x22\x3C/p\x3E \x3Cp\x3E\x22 .\r\n\x22\x3Cu\x3ETemperatures:\x3C/u\x3E \x3Cbr\x3E \x22 .\r\n\x22Air: \x3Cem\x3E\x3Cstrong\x3E$diveTemperateAir\x22 . \x22$diveTemperateUnit\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22Surface: \x3Cem\x3E\x3Cstrong\x3E$diveTemperateSurface\x22 . \x22$diveTemperateUnit\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22Bottom: \x3Cem\x3E\x3Cstrong\x3E$diveTemperateBottom\x22 . \x22$diveTemperateUnit\x3C/strong\x3E\x3C/em\x3E\x22 .\r\n\x22\x3C/p\x3E \x3Cp\x3E\x22 \x3B\r\nif( $diveSurfaceInterval ){ $fulltext = $fulltext . \x22\x3Cu\x3ESurface Interval:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveSurfaceInterval\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 \x3B}\r\nif( $diveStartPressureGroup ){ $fulltext = $fulltext . \x22\x3Cu\x3EStarting Pressure Group:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveStartPressureGroup\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 \x3B}\r\n$fulltext = $fulltext . \x22\x3Cu\x3EDepth:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveDepth $diveDepthUnit\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3EBottom Time:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveBottomTime min.\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 \x3B\r\nif( $diveSafetyStop ){ $fulltext = $fulltext . \x22\x3Cu\x3ESafety Stop:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveSafetyStop min.\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 \x3B}\r\n$fulltext = $fulltext . \x22\x3Cu\x3EEnding Pressure Group:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveEndPressureGroup\x3C/strong\x3E\x3C/em\x3E \x3C/p\x3E\x22 \x3B\r\nif( $diveResidualNitrogenTime ){ $fulltext = $fulltext . \x22\x3Cp\x3E\x3Cu\x3EResidual Nitrogen Time:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveResidualNitrogenTime min.\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n  \x22\x3Cu\x3ETotal Bottom Time:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveTotalBottomTime min.\x3C/strong\x3E\x3C/em\x3E \x3C/p\x3E\x22 \x3B}\r\n$fulltext = $fulltext . \x22\x3Cp\x3E\x22 .\r\n\x22\x3Cu\x3EBottom time to date:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveBottomTimeToDate min.\x3C/strong\x3E\x3C/em\x3E \x3Cbr\x3E\x22 .\r\n\x22\x3Cu\x3ECumulative Bottom Time:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveCumulativeTime min.\x3C/strong\x3E\x3C/em\x3E\x22 .\r\n\x22\x3C/p\x3E \x3Cp\x3E\x22 .\r\n\x22\x3Cu\x3ELog verified by:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveVerifiedBy ($diveVerifiedType)\x3C/strong\x3E\x3C/em\x3E\x22 \x3B\r\nif( $diveCertificationNumber ){ $fulltext = $fulltext . \x22\x3Cbr\x3E \x3Cu\x3ECertification Number:\x3C/u\x3E \x3Cem\x3E\x3Cstrong\x3E$diveCertificationNumber\x3C/strong\x3E\x3C/em\x3E\x22 \x3B}\r\n$fulltext = $fulltext . \x22\x3C/p\x3E\x22 \x3B\r\n\r\n\r\n// trim invisible characters from both ends of the strings\r\n$title = trim( $title ) \x3B\r\n$introtext = trim( $introtext ) \x3B\r\n$fulltext = trim( $fulltext ) \x3B\r\n\r\n\r\n// HTMLify the strings\r\n// $title = nl2br( $title ) \x3B\r\n// $introtext = nl2br( $introtext ) \x3B\r\n$introtext = ff_markdown( $introtext ) \x3B\r\n// $fulltext = ff_markdown( $fulltext ) \x3B\r\n\r\n\r\n// escape characters that might confuse MySQL\r\n$title = mysql_escape_string( $title )\x3B\r\n$introtext = mysql_escape_string( $introtext )\x3B\r\n$fulltext = mysql_escape_string( $fulltext )\x3B\r\n\r\n\r\n// save new submission into #__content table\r\nff_query(\r\n    \x22insert into #__content \x22.\r\n        \x22(`title`\x2C `introtext`\x2C `fulltext`\x2C `state`\x2C `sectionid`\x2C \x22.\r\n         \x22`catid`\x2C `created`\x2C `created_by`) \x22.\r\n    \x22values \x22.\r\n        \x22(\x27$title\x27\x2C \x27$introtext\x27\x2C \x27$fulltext\x27\x2C \x27$state\x27\x2C \x27$sectionid\x27\x2C \x22.\r\n         \x22\x27$categoryid\x27\x2C \x27$date\x27\x2C \x27$creatorid\x27)\x3B\x22\r\n)\x3B\r\n\r\n\r\nff_redirectSelf(\x22\x26ff_page=3\x22)\x3B // show thank you page</piece3code>
		<element id="183">
			<name>diveNumber</name>
			<title>Dive Number</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>60</posx>
			<posy>10</posy>
			<width>4</width>
			<height>5</height>
			<script3cond>1</script3cond>
			<script3id>11</script3id>
			<script3name>ff_integeramount</script3name>
			<script3msg>The Dive Number should only contain positive numbers.</script3msg>
		</element>
		<element id="184">
			<name>diveDate</name>
			<title>Date</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>160</posx>
			<posy>10</posy>
			<width>10</width>
			<height>10</height>
			<data1>\x3C?php\r\nreturn date( \x22Y-m-d\x22 )\x3B\r\n?\x3E</data1>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>Please enter the date of the dive.</script3msg>
		</element>
		<element id="185">
			<name>diveLocation</name>
			<title>Location</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>325</posx>
			<posy>10</posy>
			<width>30</width>
			<height>60</height>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>Please fill in the dive location.</script3msg>
		</element>
		<element id="186">
			<name>diveTimeIn</name>
			<title>Time IN</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>595</posx>
			<posy>10</posy>
			<width>5</width>
			<height>5</height>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>What time did you start the dive?</script3msg>
		</element>
		<element id="187">
			<name>diveTimeOut</name>
			<title>Time OUT</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>730</posx>
			<posy>10</posy>
			<width>5</width>
			<height>5</height>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>What time did you end the dive?</script3msg>
		</element>
		<element id="188">
			<name>diveWeights</name>
			<title>Weights</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>60</posx>
			<posy>45</posy>
			<width>2</width>
			<height>2</height>
			<script3cond>1</script3cond>
			<script3id>19</script3id>
			<script3name>ff_realamount</script3name>
			<script3msg>Please enter how many kg/lbs of weights you took on the dive.</script3msg>
		</element>
		<element id="190">
			<name>diveWeightsUnit</name>
			<title>WeightsUnit</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>100</posx>
			<posy>45</posy>
			<width>0</width>
			<height>0</height>
			<data1>1</data1>
			<data2>1\x3Bkg\x3Bkg\r\n0\x3Blbs\x3Blbs</data2>
		</element>
		<element id="193">
			<name>diveTankPressureUnit</name>
			<title>Tank Pressure Unit</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>264</posx>
			<posy>45</posy>
			<width>0</width>
			<height>0</height>
			<data1>1</data1>
			<data2>1\x3Bbar\x3Bbar\r\n0\x3Bpsi\x3Bpsi</data2>
		</element>
		<element id="191">
			<name>diveStartTankPressure</name>
			<title>Tank Pressure START</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>372</posx>
			<posy>45</posy>
			<width>3</width>
			<height>4</height>
			<script3cond>1</script3cond>
			<script3id>11</script3id>
			<script3name>ff_integeramount</script3name>
			<script3msg>Please enter the tank pressure at the start of the dive.</script3msg>
		</element>
		<element id="192">
			<name>diveEndTankPressure</name>
			<title>Tank Pressure END</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>452</posx>
			<posy>45</posy>
			<width>3</width>
			<height>4</height>
			<script3cond>1</script3cond>
			<script3id>11</script3id>
			<script3name>ff_integeramount</script3name>
			<script3msg>Please enter the tank pressure at the end of the dive.</script3msg>
		</element>
		<element id="240">
			<name>diveGasType</name>
			<title>Gas Type</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>512</posx>
			<posy>45</posy>
			<width>0</width>
			<height>0</height>
			<data1>1</data1>
			<data2>1\x3BAir\x3BAir\r\n0\x3BNitrox\x3BNitrox\r\n0\x3BTrimix\x3BTrimix\r\n0\x3BHeliox\x3BHeliox\r\n0\x3BOxygen\x3BOxygen</data2>
		</element>
		<element id="195">
			<name>diveTankVolume</name>
			<title>Tank Volume</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>687</posx>
			<posy>45</posy>
			<width>0</width>
			<height>0</height>
			<data1>1</data1>
			<data2>0\x3B18l / 150cuft\x3B18\r\n1\x3B15l / 123cuft\x3B15\r\n0\x3B12l / 105cuft\x3B12\r\n0\x3B11l / 95cuft\x3B11\r\n0\x3B10l / 80cuft\x3B10\r\n0\x3B8l / 65cuft\x3B8\r\n0\x3B5.7l / 40cuft\x3B5.7\r\n0\x3B2.7l / 19cuft\x3B2.7</data2>
		</element>
		<element id="196">
			<name>diveDrysuit</name>
			<title>Drysuit</title>
			<type>Checkbox</type>
			<posx>15</posx>
			<posy>115</posy>
			<data1>Drysuit</data1>
			<data2>Drysuit</data2>
		</element>
		<element id="197">
			<name>diveWetsuit7mm</name>
			<title>Wetsuit 7mm</title>
			<type>Checkbox</type>
			<posx>15</posx>
			<posy>130</posy>
			<data1>Wetsuit 7mm</data1>
			<data2>Wetsuit 7mm</data2>
		</element>
		<element id="198">
			<name>diveWetsuit3mm</name>
			<title>Wetsuit 3mm</title>
			<type>Checkbox</type>
			<posx>15</posx>
			<posy>145</posy>
			<data1>Wetsuit 3mm</data1>
			<data2>Wetsuit 3mm</data2>
		</element>
		<element id="199">
			<name>diveShortyWetsuit</name>
			<title>Shorty Wetsuit</title>
			<type>Checkbox</type>
			<posx>15</posx>
			<posy>160</posy>
			<data1>Shorty Wetsuit</data1>
			<data2>Shorty Wetsuit</data2>
		</element>
		<element id="200">
			<name>diveHood</name>
			<title>Hood</title>
			<type>Checkbox</type>
			<posx>15</posx>
			<posy>175</posy>
			<data1>Hood</data1>
			<data2>Hood</data2>
		</element>
		<element id="201">
			<name>diveVest</name>
			<title>Vest</title>
			<type>Checkbox</type>
			<posx>85</posx>
			<posy>175</posy>
			<data1>Vest</data1>
			<data2>Vest</data2>
		</element>
		<element id="202">
			<name>diveGloves</name>
			<title>Gloves</title>
			<type>Checkbox</type>
			<posx>15</posx>
			<posy>190</posy>
			<data1>Gloves</data1>
			<data2>Gloves</data2>
		</element>
		<element id="203">
			<name>diveBoots</name>
			<title>Boots</title>
			<type>Checkbox</type>
			<posx>85</posx>
			<posy>190</posy>
			<data1>Boots</data1>
			<data2>Boots</data2>
		</element>
		<element id="204">
			<name>diveSwimmingTrunks</name>
			<title>Swimming Trunks</title>
			<type>Checkbox</type>
			<posx>15</posx>
			<posy>205</posy>
			<data1>Swimming Trunks</data1>
			<data2>Swimming Trunks</data2>
		</element>
		<element id="206">
			<name>diveEntryFrom</name>
			<title>Entry From</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>195</posx>
			<posy>120</posy>
			<width>0</width>
			<height>0</height>
			<data1>3</data1>
			<data2>1\x3BShore\x3BShore\r\n0\x3BBoat\x3BBoat\r\n0\x3BAircraft\x3BAircraft</data2>
		</element>
		<element id="205">
			<name>diveWaterType</name>
			<title>Water Type</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>310</posx>
			<posy>120</posy>
			<width>0</width>
			<height>0</height>
			<data1>3</data1>
			<data2>1\x3BSea Water\x3BSea Water\r\n0\x3BFresh Water\x3BFresh Water\r\n0\x3BBrack Water\x3BBrack Water</data2>
		</element>
		<element id="207">
			<name>diveWaves</name>
			<title>Waves</title>
			<type>Checkbox</type>
			<posx>450</posx>
			<posy>115</posy>
			<data1>Waves</data1>
			<data2>Waves</data2>
		</element>
		<element id="208">
			<name>diveCurrent</name>
			<title>Current</title>
			<type>Checkbox</type>
			<posx>450</posx>
			<posy>130</posy>
			<data1>Current</data1>
			<data2>Current</data2>
		</element>
		<element id="209">
			<name>diveSurf</name>
			<title>Surf</title>
			<type>Checkbox</type>
			<posx>450</posx>
			<posy>145</posy>
			<data1>Surf</data1>
			<data2>Surf</data2>
		</element>
		<element id="210">
			<name>diveSurge</name>
			<title>Surge</title>
			<type>Checkbox</type>
			<posx>450</posx>
			<posy>160</posy>
			<data1>Surge</data1>
			<data2>Surge</data2>
		</element>
		<element id="211">
			<name>diveTemperateAir</name>
			<title>TemperatureAir</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>590</posx>
			<posy>120</posy>
			<width>2</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>10</script3id>
			<script3name>ff_integer</script3name>
			<script3msg>Please fill in the air temperature.</script3msg>
		</element>
		<element id="213">
			<name>diveTemperateSurface</name>
			<title>TemperatureSurface</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>590</posx>
			<posy>145</posy>
			<width>2</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>10</script3id>
			<script3name>ff_integer</script3name>
			<script3msg>Please fill in the air temperature.</script3msg>
		</element>
		<element id="214">
			<name>diveTemperateBottom</name>
			<title>TemperatureBottom</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>590</posx>
			<posy>170</posy>
			<width>2</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>10</script3id>
			<script3name>ff_integer</script3name>
			<script3msg>Please fill in the air temperature.</script3msg>
		</element>
		<element id="212">
			<name>diveTemperateUnit</name>
			<title>Temperature Unit</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>590</posx>
			<posy>195</posy>
			<width>0</width>
			<height>0</height>
			<data1>1</data1>
			<data2>0\x3BKelvin\x3BKelvin\r\n1\x3BCelsius\x3BCelsius\r\n0\x3BFahrenheit\x3BFahrenheit\r\n0\x3BRankine\x3BRankine\r\n0\x3Belectronvolt\x3Belectronvolt</data2>
		</element>
		<element id="218">
			<name>diveVisibility</name>
			<title>Visibility</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>715</posx>
			<posy>120</posy>
			<width>2</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>11</script3id>
			<script3name>ff_integeramount</script3name>
			<script3msg>Please enter a whole number for the approximate visibility.</script3msg>
		</element>
		<element id="219">
			<name>diveVisibilityUnit</name>
			<title>Visibility Unit</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>715</posx>
			<posy>145</posy>
			<width>0</width>
			<height>0</height>
			<data1>1</data1>
			<data2>1\x3Bmeters\x3Bm\r\n0\x3Bfeet\x3Bft</data2>
		</element>
		<element id="221">
			<name>diveSurfaceInterval</name>
			<title>Surface Interval</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>105</posx>
			<posy>245</posy>
			<width>4</width>
			<height>4</height>
		</element>
		<element id="222">
			<name>diveStartPressureGroup</name>
			<title>Start Pressure Group</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>335</posx>
			<posy>245</posy>
			<width>1</width>
			<height>1</height>
		</element>
		<element id="223">
			<name>diveDepth</name>
			<title>Depth</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>460</posx>
			<posy>245</posy>
			<width>3</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>19</script3id>
			<script3name>ff_realamount</script3name>
			<script3msg>Please enter the depth of the dive.</script3msg>
		</element>
		<element id="224">
			<name>diveDepthUnit</name>
			<title>Depth Unit</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>505</posx>
			<posy>245</posy>
			<width>0</width>
			<height>0</height>
			<data1>1</data1>
			<data2>1\x3Bmeters\x3Bm\r\n0\x3Bfeet\x3Bft</data2>
		</element>
		<element id="225">
			<name>diveBottomTime</name>
			<title>Bottom Time</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>715</posx>
			<posy>245</posy>
			<width>3</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>11</script3id>
			<script3name>ff_integeramount</script3name>
			<script3msg>Please enter the bottom time in whole minutes.</script3msg>
		</element>
		<element id="227">
			<name>diveSafetyStop</name>
			<title>Safety Stop</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>105</posx>
			<posy>280</posy>
			<width>3</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>12</script3id>
			<script3name>ff_integer_or_empty</script3name>
			<script3msg>Please enter the safety stop time in whole minutes.</script3msg>
		</element>
		<element id="241">
			<name>diveEndPressureGroup</name>
			<title>End Pressure Group</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>765</posx>
			<posy>280</posy>
			<width>1</width>
			<height>1</height>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>Please enter the ending pressure group.</script3msg>
		</element>
		<element id="229">
			<name>diveResidualNitrogenTime</name>
			<title>Residual Nitrogen Time</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>335</posx>
			<posy>280</posy>
			<width>3</width>
			<height>3</height>
			<script3cond>1</script3cond>
			<script3id>12</script3id>
			<script3name>ff_integer_or_empty</script3name>
			<script3msg>Please enter the residual nitrogen time in whole minutes.</script3msg>
		</element>
		<element id="231">
			<name>diveBottomTimeToDate</name>
			<title>Bottom Time To Date</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>675</posx>
			<posy>350</posy>
			<width>6</width>
			<height>6</height>
			<script3cond>1</script3cond>
			<script3id>11</script3id>
			<script3name>ff_integeramount</script3name>
			<script3msg>Please enter the bottom time to date in whole minutes.</script3msg>
		</element>
		<element id="234">
			<name>diveVerifiedBy</name>
			<title>Verified by</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>620</posx>
			<posy>440</posy>
			<width>23</width>
			<height>40</height>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>Please fill in the name of the instructor\x2C divemaster or buddy.</script3msg>
		</element>
		<element id="235">
			<name>diveVerifiedType</name>
			<title>Verified by Instructor</title>
			<type>Radio Button</type>
			<posx>550</posx>
			<posy>470</posy>
			<data1>Instructor</data1>
			<data2>\x3Cb\x3EInstructor\x3C/b\x3E</data2>
		</element>
		<element id="236">
			<name>diveVerifiedType</name>
			<title>Verified by Divemaster</title>
			<type>Radio Button</type>
			<posx>635</posx>
			<posy>470</posy>
			<data1>Divemaster</data1>
			<data2>\x3Cb\x3EDivemaster\x3C/b\x3E</data2>
		</element>
		<element id="237">
			<name>diveVerifiedType</name>
			<title>Verified by Buddy</title>
			<type>Radio Button</type>
			<posx>730</posx>
			<posy>470</posy>
			<flag1>1</flag1>
			<data1>Buddy</data1>
			<data2>\x3Cb\x3EBuddy\x3C/b\x3E</data2>
		</element>
		<element id="238">
			<name>diveCertificationNumber</name>
			<title>Certification No.</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>655</posx>
			<posy>500</posy>
			<width>17</width>
			<height>20</height>
		</element>
		<element id="150">
			<name>diveComments</name>
			<title>Comments</title>
			<type>Textarea</type>
			<class2>inputbox</class2>
			<posx>20</posx>
			<posy>353</posy>
			<width>500</width>
			<widthmode>1</widthmode>
			<height>270</height>
			<heightmode>1</heightmode>
			<data1>\x3C?php \r\n$diveComments = ff_getParam(\x27ff_param_diveComments\x27\x2C \x27\x27)\x3B\r\n$diveComments = stripslashes(stripslashes($diveComments))\x3B\r\nreturn htmlentities($diveComments)\x3B\r\n?\x3E</data1>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>Please enter the text.</script3msg>
		</element>
		<element id="239">
			<name>diveRating</name>
			<title>Rating</title>
			<type>Select List</type>
			<class2>inputbox</class2>
			<posx>597</posx>
			<posy>532</posy>
			<width>0</width>
			<height>0</height>
			<data1>4</data1>
			<data2>0\x3BReally fantastic dive!\x3BReally fantastic dive!\r\n0\x3BI recommend this dive.\x3BI recommend this dive.\r\n1\x3BThe dive was OK.\x3BThe dive was OK.\r\n0\x3BWon\x27t miss this dive.\x3BI will not miss this dive.</data2>
		</element>
		<element id="152">
			<name>submit_button</name>
			<title>Submit Button</title>
			<type>Regular Button</type>
			<class2>button</class2>
			<posx>-10</posx>
			<posy>620</posy>
			<width>0</width>
			<height>0</height>
			<data2>Submit Content</data2>
			<script2cond>1</script2cond>
			<script2id>36</script2id>
			<script2name>ff_validate_submit</script2name>
			<script2flag1>1</script2flag1>
		</element>
		<element id="143">
			<name>diveNumber_label</name>
			<title>Dive Number Label</title>
			<posx>10</posx>
			<posy>13</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EDive No.\x3C/b\x3E</data1>
		</element>
		<element id="147">
			<name>diveDate_label</name>
			<title>Date Label</title>
			<posx>130</posx>
			<posy>13</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EDate\x3C/b\x3E</data1>
		</element>
		<element id="157">
			<name>diveLocation_label</name>
			<title>Location Label</title>
			<posx>270</posx>
			<posy>13</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ELocation\x3C/b\x3E</data1>
		</element>
		<element id="158">
			<name>diveTimeIn_label</name>
			<title>Time IN Label</title>
			<posx>550</posx>
			<posy>13</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ETime IN\x3C/b\x3E</data1>
		</element>
		<element id="159">
			<name>diveTimeOut_label</name>
			<title>Time OUT Label</title>
			<posx>670</posx>
			<posy>13</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ETime OUT\x3C/b\x3E</data1>
		</element>
		<element id="160">
			<name>diveWeights_label</name>
			<title>Weights Label</title>
			<posx>7</posx>
			<posy>48</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3E\x26nbsp\x3BWeights\x3C/b\x3E</data1>
		</element>
		<element id="194">
			<name>diveUnitTankPressure_label</name>
			<title>Tank Pressure Unit Label</title>
			<posx>177</posx>
			<posy>48</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ETank Pressure\x3C/b\x3E</data1>
		</element>
		<element id="161">
			<name>diveStartTankPressure_label</name>
			<title>Tank Pressure START Label</title>
			<posx>332</posx>
			<posy>48</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ESTART\x3C/b\x3E</data1>
		</element>
		<element id="162">
			<name>diveEndTankPressure_label</name>
			<title>Tank Pressure END Label</title>
			<posx>427</posx>
			<posy>48</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EEND\x3C/b\x3E</data1>
		</element>
		<element id="163">
			<name>diveTankVolume_label</name>
			<title>Tank Volume Label</title>
			<posx>610</posx>
			<posy>48</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ETank Volume\x3C/b\x3E</data1>
		</element>
		<element id="164">
			<name>diveExposureProtection_label</name>
			<title>Exposure Protection Label</title>
			<posx>10</posx>
			<posy>98</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EExposure Protection\x3C/b\x3E</data1>
		</element>
		<element id="166">
			<name>diveEntryFrom_label</name>
			<title>Entry From Label</title>
			<posx>190</posx>
			<posy>98</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EEntry from\x3C/b\x3E</data1>
		</element>
		<element id="165">
			<name>diveWaterType_label</name>
			<title>Water Type Label</title>
			<posx>305</posx>
			<posy>98</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EWater Type\x3C/b\x3E</data1>
		</element>
		<element id="167">
			<name>diveWaterMovement_label</name>
			<title>Water Movement Label</title>
			<posx>445</posx>
			<posy>98</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EWater Movement\x3C/b\x3E</data1>
		</element>
		<element id="168">
			<name>diveTemperate_label</name>
			<title>Temperature Label</title>
			<posx>585</posx>
			<posy>98</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ETemperature\x3C/b\x3E</data1>
		</element>
		<element id="215">
			<name>diveTemperateAir_label</name>
			<title>Temperature Air Label</title>
			<posx>635</posx>
			<posy>123</posy>
			<width>0</width>
			<height>0</height>
			<data1>Air</data1>
		</element>
		<element id="216">
			<name>diveTemperateSurface_label</name>
			<title>Temperature Surface Label</title>
			<posx>635</posx>
			<posy>148</posy>
			<width>0</width>
			<height>0</height>
			<data1>Surface</data1>
		</element>
		<element id="217">
			<name>diveTemperateBottom_label</name>
			<title>Temperature Bottom Label</title>
			<posx>635</posx>
			<posy>173</posy>
			<width>0</width>
			<height>0</height>
			<data1>Bottom</data1>
		</element>
		<element id="169">
			<name>diveVisibility_label</name>
			<title>Visibility Label</title>
			<posx>710</posx>
			<posy>98</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EVisibility\x3C/b\x3E</data1>
		</element>
		<element id="170">
			<name>diveSurfaceInterval_label</name>
			<title>Surface Interval Label</title>
			<posx>10</posx>
			<posy>248</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ESurface Interval\x3C/b\x3E</data1>
		</element>
		<element id="171">
			<name>diveStartPressureGroup_label</name>
			<title>Start Pressure Group Label</title>
			<posx>210</posx>
			<posy>248</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EStart Pressure Group\x3C/b\x3E</data1>
		</element>
		<element id="172">
			<name>diveDepth_label</name>
			<title>Depth Label</title>
			<posx>420</posx>
			<posy>248</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EDepth\x3C/b\x3E</data1>
		</element>
		<element id="173">
			<name>diveBottomTime_label</name>
			<title>Bottom Time Label</title>
			<posx>640</posx>
			<posy>248</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EBottom Time\x3C/b\x3E</data1>
		</element>
		<element id="226">
			<name>diveMinutes_label</name>
			<title>Minutes Label</title>
			<posx>762</posx>
			<posy>248</posy>
			<width>0</width>
			<height>0</height>
			<data1>min.</data1>
		</element>
		<element id="174">
			<name>diveSafetyStop_label</name>
			<title>Safety Stop Label</title>
			<posx>35</posx>
			<posy>283</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ESafety Stop\x3C/b\x3E</data1>
		</element>
		<element id="228">
			<name>diveMinutes_label</name>
			<title>Minutes Label</title>
			<posx>152</posx>
			<posy>283</posy>
			<width>0</width>
			<height>0</height>
			<data1>min.</data1>
		</element>
		<element id="175">
			<name>diveResidualNitrogenTime_label</name>
			<title>Residual Nitrogen Time Label</title>
			<posx>200</posx>
			<posy>283</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EResidual Nitrogen Time\x3C/b\x3E</data1>
		</element>
		<element id="230">
			<name>diveMinutes_label</name>
			<title>Minutes Label</title>
			<posx>382</posx>
			<posy>283</posy>
			<width>0</width>
			<height>0</height>
			<data1>min.</data1>
		</element>
		<element id="176">
			<name>diveActualBottomTime_label</name>
			<title>Actual Bottom Time Label</title>
			<posx>420</posx>
			<posy>275</posy>
			<width>0</width>
			<height>0</height>
			<data1>Actual Bottom Time = Bottom Time</data1>
		</element>
		<element id="177">
			<name>diveTotalBottomTime_label</name>
			<title>Total Bottom Time Label</title>
			<posx>420</posx>
			<posy>291</posy>
			<width>0</width>
			<height>0</height>
			<data1>Total Bottom Time (autom. calc.)</data1>
		</element>
		<element id="242">
			<name>diveEndPressureGroup_label</name>
			<title>End Pressure Group Label</title>
			<posx>640</posx>
			<posy>283</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EEnd Pressure Group\x3C/b\x3E</data1>
		</element>
		<element id="178">
			<name>diveBottomTimeToDate_label</name>
			<title>Bottom Time to Date Label</title>
			<posx>555</posx>
			<posy>353</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EBottom Time to Date\x3C/b\x3E</data1>
		</element>
		<element id="232">
			<name>diveMinutes_label</name>
			<title>Minutes Label</title>
			<posx>742</posx>
			<posy>353</posy>
			<width>0</width>
			<height>0</height>
			<data1>min.</data1>
		</element>
		<element id="179">
			<name>diveTimeThisDive_label</name>
			<title>Time This Dive Label</title>
			<posx>555</posx>
			<posy>383</posy>
			<width>0</width>
			<height>0</height>
			<data1>Time This Dive = Bottom Time</data1>
		</element>
		<element id="180">
			<name>diveCumulativeTime_label</name>
			<title>Cumulative Time Label</title>
			<posx>555</posx>
			<posy>413</posy>
			<width>0</width>
			<height>0</height>
			<data1>Cumulative Time (autom. calc.)</data1>
		</element>
		<element id="181">
			<name>diveVerifiedBy_label</name>
			<title>Verified by Label</title>
			<posx>555</posx>
			<posy>443</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EVerified by\x3C/b\x3E</data1>
		</element>
		<element id="182">
			<name>CertificationNo_label</name>
			<title>Certification No. Label</title>
			<posx>555</posx>
			<posy>503</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ECertification No.\x3C/b\x3E</data1>
		</element>
		<element id="149">
			<name>diveComments_label</name>
			<title>Comments Label</title>
			<posx>10</posx>
			<posy>333</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3EComments\x3C/b\x3E (Please use \x3Ca href=\x22http://daringfireball.net/projects/markdown/syntax\x22 target=\x22_blank\x22\x3EMarkdown\x3C/a\x3E for text formatting!)</data1>
		</element>
		<element id="233">
			<name>diveRating_label</name>
			<title>Rating Label</title>
			<posx>555</posx>
			<posy>535</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cb\x3ERating\x3C/b\x3E</data1>
		</element>
		<element id="153">
			<page>2</page>
			<name>registration</name>
			<title>Registration</title>
			<posx>135</posx>
			<posy>80</posy>
			<width>500</width>
			<height>300</height>
			<data1>\x3C?php \r\n$text = \x22\x3Ch4\x3ETo submit a dive log you need to register.\x3C/h4\x3E\x22\x3B\r\nreturn $text\x3B\r\n?\x3E</data1>
		</element>
		<element id="154">
			<page>3</page>
			<name>thankyou</name>
			<title>Thank You</title>
			<posx>50</posx>
			<posy>30</posy>
			<width>500</width>
			<height>100</height>
			<data1>\x3C?php\r\n\r\nreturn \x22\x3Ch4\x3EThank you for your dive log.\x3C/h4\x3E\x22\x3B\r\n?\x3E</data1>
		</element>
	</form>
	<form id="12">
		<package>DiveLogs</package>
		<name>SubmitDiveLogPreview</name>
		<title>Submit Dive Log Preview</title>
		<description>This is the preview form for the dive log submit piece. \r\nIt is not meant to be called directly\x2C but by form\r\nSubmitDiveLog.</description>
		<class1>content_outline</class1>
		<width>100</width>
		<widthmode>1</widthmode>
		<height>10</height>
		<heightmode>1</heightmode>
		<emailntf>0</emailntf>
		<dblog>0</dblog>
		<prevwidth>400</prevwidth>
		<piece1cond>1</piece1cond>
		<piece1id>11</piece1id>
		<piece1name>ff_InitLib</piece1name>
		<element id="155">
			<name>closewindow</name>
			<title>Close Button</title>
			<type>Regular Button</type>
			<class2>button</class2>
			<posx>-1</posx>
			<posxmode>1</posxmode>
			<posy>0</posy>
			<width>0</width>
			<height>0</height>
			<data2>Close Preview</data2>
			<script2cond>2</script2cond>
			<script2code>function ff_closewindow_action(element\x2C action)\r\n{\r\n    window.close()\x3B\r\n} // ff_closewindow_action</script2code>
			<script2flag1>1</script2flag1>
		</element>
		<element id="156">
			<name>text</name>
			<title>Text</title>
			<posx>1</posx>
			<posxmode>1</posxmode>
			<posy>20</posy>
			<width>98</width>
			<widthmode>1</widthmode>
			<height>0</height>
			<data1>\x3C?php\r\n    $title = ff_getParam(\x27ff_param_title\x27\x2C \x27Sample Title\x27\x2C _MOS_NOTRIM|_MOS_ALLOWHTML)\x3B\r\n    $text  = ff_getParam(\x27ff_param_text\x27\x2C  \x27Sample Text\x27\x2C  _MOS_NOTRIM|_MOS_ALLOWHTML)\x3B\r\n    return \x27\x3Ch2\x3E\x27.stripslashes($title).\x27\x3C/h2\x3E\x27.\r\n           ff_markdown(stripslashes($text))\x3B\r\n?\x3E</data1>
		</element>
	</form>
</FacileFormsPackage>

