#captchaimg { display: block; } '; $_SESSION["captchacheck"]=""; } else { echo ''; } function show_form() { get_header(); ?>

Crane Count Data Sheet


Please enter your Annual Midwest Crane Count data here!

For help with locating your site’s latitude/longitude, try our coordinate finder tool.

Fields marked with an asterisk (*) are required.

Crane Count Data Sheet

Date: " /> *
Time Start: " onkeypress="return isNumber(event)"/> *
Time Finish: " onkeypress="return isNumber(event)"/> *
County: " /> *
State: *
Please list names and addresses of all observers. An email address is required for receiving the count results:
/> Observer 1
Name: " /> *
Address: " />
City: " />
State:
ZIP: " /> *
Phone: " type="text"> - " type="text"> - " type="text">
Email: " />
/> Observer 2
/> Observer 3
Please enter names and email addresses
(if known) for any additional observers
:

Site Data 1
Site Number: " />
Nearest cross streets and/or town: " />
Site latitude: " />
Site longitude: " />
Total number of Sandhill Cranes observed or heard
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Total number of Whooping Cranes observed
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Breeding Behaviors: Check if you observed or heard any of these four behaviors:
ON Confirmed - Occupied Nest: ';$_SESSION['newcranecount']["ob_Occupied"]="";} else { echo '';} ?>
NE Confirmed - Nest with Eggs: />
NB Confirmed/Probable - Nest Building: />
C Probable Courtship, Display, or Copulation (check this behavior if you heard any unison calls): />
Comments:
List other birds that you observed or heard at your Crane Count site:
Site Data 2
Site Number: " />
Nearest cross streets and/or town: " />
Site latitude: " />
Site longitude: " />
Total number of Sandhill Cranes observed or heard
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Total number of Whooping Cranes observed
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Breeding Behaviors: Check if you observed or heard any of these four behaviors:
ON Confirmed - Occupied Nest: />
NE Confirmed - Nest with Eggs: />
NB Confirmed/Probable - Nest Building: />
C Probable Courtship, Display, or Copulation (check this behavior if you heard any unison calls): />
Comments:
List other birds that you observed or heard at your Crane Count site:
Site Data 3
Site Number: " />
Nearest cross streets and/or town: " />
Site latitude: " />
Site longitude: " />
Total number of Sandhill Cranes observed or heard
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Total number of Whooping Cranes observed
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Breeding Behaviors: Check if you observed or heard any of these four behaviors:
ON Confirmed - Occupied Nest: />
NE Confirmed - Nest with Eggs: />
NB Confirmed/Probable - Nest Building: />
C Probable Courtship, Display, or Copulation (check this behavior if you heard any unison calls): />
Comments:
List other birds that you observed or heard at your Crane Count site:
Site Data 4
Site Number: " />
Nearest cross streets and/or town: " />
Site latitude: " />
Site longitude: " />
Total number of Sandhill Cranes observed or heard
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Total number of Whooping Cranes observed
This requires your judgement since you may hear or see the same crane repeatedly:
" />
Breeding Behaviors: Check if you observed or heard any of these four behaviors:
ON Confirmed - Occupied Nest: />
NE Confirmed - Nest with Eggs: />
NB Confirmed/Probable - Nest Building: />
C Probable Courtship, Display, or Copulation (check this behavior if you heard any unison calls): />
Comments:
List other birds that you observed or heard at your Crane Count site:
Please enter the CAPTCHA: CAPTCHA Image

[ Click here for different CAPTCHA ]

The security code entered was incorrect.

$value){ $_SESSION['newcranecount'][$key]=$value; } //CAPTCHA function generated for checking the correctness include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage1/securimage.php'; $securimage = new Securimage(); //Check CAPTCHA function if ($securimage->check($_POST['captcha_code']) == false) { // the code was incorrect // you should handle the error so that the form processor doesn't continue $_SESSION["captchacheck"]='wrong'; // or you can use the following code if there is no validation or you do not know how header("location: crane-count-data-sheet"); exit; //echo "The security code entered was incorrect.

"; //echo "Please go back and try again."; } //Insert Querry //print_r($_SESSION['cranecountdata']); #WSX Block 1-Starts /* Insert in flat file */ $servertime=date("F j, Y, g:i a"); $myFile = "/var/www/vhosts/savingcranes.org/httpdocs/flatfile/new_crane_count.txt"; $fh = fopen($myFile, 'a'); $lines=0; $lines = count(file($myFile)); $lines++; $count_date=$_POST["ob_date"]; $count_tstart=$_POST["ob_time"]; $count_tfinish=$_POST["ob_timefinish"]; $count_country=$_POST["ob_country"]; $count_state=$_POST["ob_state"]; //$count_zip=$_POST["ob_zip"]; $count_observer=$_POST["observer1"]; $count_nameob1=$_POST["ob_name"]; $count_adressob1=$_POST["ob_address"]; $count_city=$_POST["ob_city"]; $count_state1=$_POST["ob_state1"]; $count_zip1=$_POST["ob_zip1"]; $countphone=$_POST["ob_phone"]."-".$_POST["ob_phone2"]."-".$_POST["ob_phone3"]; $bill_phoneno= $countphone; $count_email=$_POST["ob_email"]; $count_observer2=$_POST["Observer2"]; $count_nameob2=$_POST["ob_name1"]; $count_adressob2=$_POST["ob_address1"]; $count_city2=$_POST["ob_city1"]; $count_state2=$_POST["ob_state2"]; $count_zip2=$_POST["ob_zip2"]; $countphone2=$_POST["ob_phone_1"]."-".$_POST["ob_phone_2"]."-".$_POST["ob_phone_3"]; $bill_phoneno2= $countphone2; $count_email2=$_POST["ob_email1"]; $count_observer3=$_POST["Observer3"]; $count_nameob3=$_POST["ob_name3"]; $count_adressob3=$_POST["ob_address3"]; $count_city3=$_POST["ob_city3"]; $count_state3=$_POST["ob_state3"]; $count_zip3=$_POST["ob_zip3"]; $countphone3=$_POST["observer_phone1"]."-".$_POST["observer_phone2"]."-".$_POST["observer_phone3"]; $bill_phoneno3= $countphone3; $count_email3=$_POST["ob_email3"]; $count_additional=$_POST["ob_additional"]; $count_site=$_POST["ob_site"]; $count_lat=$_POST["ob_lat"]; $count_long=$_POST["ob_long"]; $count_near=$_POST["ob_near"]; $count_cranes=$_POST["ob_Cranes"]; $count_whoopingcranes=$_POST["ob_whoopingcranes"]; $count_occupied=$_POST["ob_Occupied"]; $count_eggs=$_POST["ob_eggs"]; $count_nest=$_POST["ob_nest"]; $count_display=$_POST["ob_display"]; $count_comments=$_POST["ob_comments"]; $count_list=$_POST["ob_list"]; $count_site1=$_POST["ob_site1"]; $count_lat1=$_POST["ob_lat1"]; $count_long1=$_POST["ob_long1"]; $count_near1=$_POST["ob_near1"]; $count_cranes1=$_POST["ob_Cranes1"]; $count_whoopingcranes1=$_POST["ob_whoopingcranes1"]; $count_occupied1=$_POST["ob_Occupied1"]; $count_eggs1=$_POST["ob_eggs1"]; $count_nest1=$_POST["ob_nest1"]; $count_display1=$_POST["ob_display1"]; $count_comments1=$_POST["ob_comments1"]; $count_list1=$_POST["ob_list1"]; $count_site2=$_POST["ob_site2"]; $count_lat2=$_POST["ob_lat2"]; $count_long2=$_POST["ob_long2"]; $count_near2=$_POST["ob_near2"]; $count_cranes2=$_POST["ob_Cranes2"]; $count_whoopingcranes2=$_POST["ob_whoopingcranes2"]; $count_occupied2=$_POST["ob_Occupied2"]; $count_eggs2=$_POST["ob_eggs2"]; $count_nest2=$_POST["ob_nest2"]; $count_display2=$_POST["ob_display2"]; $count_comments2=$_POST["ob_comments2"]; $count_list2=$_POST["ob_list2"]; $count_site3=$_POST["ob_site3"]; $count_lat3=$_POST["ob_lat3"]; $count_long3=$_POST["ob_long3"]; $count_near3=$_POST["ob_near3"]; $count_cranes3=$_POST["ob_Cranes3"]; $count_whoopingcranes3=$_POST["ob_whoopingcranes3"]; $count_occupied3=$_POST["ob_Occupied3"]; $count_eggs3=$_POST["ob_eggs3"]; $count_nest3=$_POST["ob_nest3"]; $count_display3=$_POST["ob_display3"]; $count_comments3=$_POST["ob_comments3"]; $count_list3=$_POST["ob_list3"]; /**************************/ $stringData="\n".$lines." | ".$servertime." | ".$count_date." | ".$count_tstart." | ".$count_tfinish." | ".$count_country." | ".$count_state." | ".$count_observer." | ".$count_nameob1." | ".$count_adressob1." | ".$count_city." | ".$count_state1." | ".$count_zip1." | ".$bill_phoneno." | ".$count_email." | ".$count_observer2." | ".$count_nameob2." | ".$count_adressob2." | ".$count_city2." | ".$count_state2." | ".$count_zip2." | ".$bill_phoneno2." | ".$count_email2." | ".$count_observer3." | ".$count_nameob3." | ".$count_adressob3." | ".$count_city3." | ".$count_state3." | ".$count_zip3."| ".$bill_phoneno3." | ".$count_email3." | ".$count_additional." | ".$count_site." | ".$count_lat." | ".$count_long." | ".$count_near." | ".$count_cranes." | ".$count_whoopingcranes." | ".$count_occupied." | ".$count_eggs." | ".$count_nest." | ".$count_display." | ".$count_comments." | ".$count_list." |".$count_site1." | ".$count_lat1." | ".$count_long1." | ".$count_near1." | ".$count_cranes1." | ".$count_occupied1." | ".$count_eggs1." | ".$count_nest1." | ".$count_display1." | ".$count_comments1." | ".$count_list1." |".$count_site2." | ".$count_lat2." | ".$count_long2." | ".$count_near2." | ".$count_cranes2." | ".$count_occupied2." | ".$count_eggs2." | ".$count_nest2." | ".$count_display2." | ".$count_comments2." | ".$count_list2." |".$count_site3." | ".$count_lat3." | ".$count_long3." | ".$count_near3." | ".$count_cranes3." | ".$count_occupied3." | ".$count_eggs3." | ".$count_nest3." | ".$count_display3." | ".$count_comments3." | ".$count_list3; fwrite($fh, stripslashes($stringData)); fclose($fh); /* end of insert in flat file */ #WSX Block 1-Ends $servername = "localhost"; $username = "savcraweb"; $password = "ju8Resta"; $dbname = "www_savingcranes_org"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $message =""; $result = mysqli_query("SELECT formemailtext from j25_emailtext where id=16"); $message= mysqli_result($result, 0); //String replace function with the data fetched from DB $message = str_replace("{_DATE}",$count_date,$message); $message = str_replace("{_TSTART}",$count_tstart,$message); $message = str_replace("{_TFINISH}",$count_tfinish,$message); $message = str_replace("{_COUNTRY}",$count_country,$message); $message = str_replace("{_STATE}",$count_state,$message); $message = str_replace("{_OBV1}",$count_observer,$message); $message = str_replace("{_OBV1NAME}",$count_nameob1,$message); $message = str_replace("{_OBV1ADD}",$count_adressob1,$message); $message = str_replace("{_OBV1CITY}",$count_city,$message); $message = str_replace("{_OBV1STATE}",$count_state1,$message); $message = str_replace("{_OBV1ZIP}",$count_zip1,$message); $message = str_replace("{_OBV1PHONE}",$bill_phoneno,$message); $message = str_replace("{_OBV1EMAIL}",$count_email,$message); $message = str_replace("{_OBV2}",$count_observer2,$message); $message = str_replace("{_OBV2NAME}",$count_nameob2,$message); $message = str_replace("{_OBV2ADD}",$count_adressob2,$message); $message = str_replace("{_OBV2CITY}",$count_city2,$message); $message = str_replace("{_OBV2STATE}",$count_state2,$message); $message = str_replace("{_OBV2ZIP}",$count_zip2,$message); $message = str_replace("{_OBV2PHONE}",$bill_phoneno2,$message); $message = str_replace("{_OBV2EMAIL}",$count_email2,$message); $message = str_replace("{_OBV3}",$count_observer3,$message); $message = str_replace("{_OBV3NAME}",$count_nameob3,$message); $message = str_replace("{_OBV3ADD}",$count_adressob3,$message); $message = str_replace("{_OBV3CITY}",$count_city3,$message); $message = str_replace("{_OBV3STATE}",$count_state3,$message); $message = str_replace("{_OBV3ZIP}",$count_zip3,$message); $message = str_replace("{_OBV3PHONE}",$bill_phoneno3,$message); $message = str_replace("{_OBV3EMAIL}",$count_email3,$message); $message = str_replace("{_OBVADDITIONAL}",$count_additional,$message); $message = str_replace("{_SITE1}",$count_site,$message); $message = str_replace("{_S1NEAR}",$count_near,$message); $message = str_replace("{_S1LAT}",$count_lat,$message); $message = str_replace("{_S1LONG}",$count_long,$message); $message = str_replace("{_S1TOTTAL}",$count_cranes,$message); $message = str_replace("{_S1WHOOPINGTOTAL}",$count_whoopingcranes,$message); $message = str_replace("{_S1ON}",$count_occupied,$message); $message = str_replace("{_S1NE}",$count_eggs,$message); $message = str_replace("{_S1NB}",$count_nest,$message); $message = str_replace("{_S1CHECK}",$count_display,$message); $message = str_replace("{_S1COMMENTS}",$count_comments,$message); $message = str_replace("{_S1LIST}",$count_list,$message); $message = str_replace("{_SITE2}",$count_site1,$message); $message = str_replace("{_S2NEAR}",$count_near1,$message); $message = str_replace("{_S2LAT}",$count_lat1,$message); $message = str_replace("{_S2LONG}",$count_long1,$message); $message = str_replace("{_S2TOTTAL}",$count_cranes1,$message); $message = str_replace("{_S2WHOOPINGTOTAL}",$count_whoopingcranes1,$message); $message = str_replace("{_S2ON}",$count_occupied1,$message); $message = str_replace("{_S2NE}",$count_eggs1,$message); $message = str_replace("{_S2NB}",$count_nest1,$message); $message = str_replace("{_S2CHECK}",$count_display1,$message); $message = str_replace("{_S2COMMENTS}",$count_comments1,$message); $message = str_replace("{_S2LIST}",$count_list1,$message); $message = str_replace("{_SITE3}",$count_site2,$message); $message = str_replace("{_S3NEAR}",$count_near2,$message); $message = str_replace("{_S3LAT}",$count_lat2,$message); $message = str_replace("{_S3LONG}",$count_long2,$message); $message = str_replace("{_S3TOTTAL}",$count_cranes2,$message); $message = str_replace("{_S3WHOOPINGTOTAL}",$count_whoopingcranes2,$message); $message = str_replace("{_S3ON}",$count_occupied2,$message); $message = str_replace("{_S3NE}",$count_eggs2,$message); $message = str_replace("{_S3NB}",$count_nest2,$message); $message = str_replace("{_S3CHECK}",$count_display2,$message); $message = str_replace("{_S3COMMENTS}",$count_comments2,$message); $message = str_replace("{_S3LIST}",$count_list2,$message); $message = str_replace("{_SITE4}",$count_site3,$message); $message = str_replace("{_S4NEAR}",$count_near3,$message); $message = str_replace("{_S4LAT}",$count_lat3,$message); $message = str_replace("{_S4LONG}",$count_long3,$message); $message = str_replace("{_S4TOTTAL}",$count_cranes3,$message); $message = str_replace("{_S4WHOOPINGTOTAL}",$count_whoopingcranes3,$message); $message = str_replace("{_S4ON}",$count_occupied3,$message); $message = str_replace("{_S4NE}",$count_eggs3,$message); $message = str_replace("{_S4NB}",$count_nest3,$message); $message = str_replace("{_S4CHECK}",$count_display3,$message); $message = str_replace("{_S4COMMENTS}",$count_comments3,$message); $message = str_replace("{_S4LIST}",$count_list3,$message); $message = str_replace("",'-',$message); $message = str_replace("",'"',$message); $message = str_replace("","'",$message); $message = str_replace("",'"',$message); $message = str_replace("\n"," ",$message); //SQL code to insert in table $result1 = mysqli_query("INSERT INTO j25_crane_count VALUES ('','".$count_date."','".$count_tstart."','".$count_tfinish."','".$count_country."','".$count_state."','".$count_nameob1."','".$count_adressob1."','".$count_city."','".$count_state1."','".$count_zip1."','".$bill_phoneno."','".$count_email."','".$count_nameob2."','".$count_adressob2."','".$count_city2."','".$count_state2."','".$count_zip2."','".$bill_phoneno2."','".$count_email2."','".$count_nameob3."','".$count_adressob3."','".$count_city3."','".$count_state3."','".$count_zip3."','".$bill_phoneno3."','".$count_email3."','".$count_additional."','".$count_site."','".$count_near."','".$count_lat."','".$count_long."','".$count_cranes."','".$count_whoopingcranes."','".$count_occupied."','".$count_eggs."','".$count_nest."','".$count_display."','".$count_comments."','".$count_list."','".$count_site1."','".$count_near1."','".$count_lat1."','".$count_long1."','".$count_cranes1."','".$count_whoopingcranes1."','".$count_occupied1."','".$count_eggs1."','".$count_nest1."','".$count_display1."','".$count_comments1."','".$count_list1."','".$count_site2."','".$count_near2."','".$count_lat2."','".$count_long2."','".$count_cranes2."','".$count_whoopingcranes2."','".$count_occupied2."','".$count_eggs2."','".$count_nest2."','".$count_display2."','".$count_comments2."','".$count_list2."','".$count_site3."','".$count_near3."','".$count_lat3."','".$count_long3."','".$count_cranes3."','".$count_whoopingcranes3."', '".$count_occupied3."','".$count_eggs3."','".$count_nest3."','".$count_display3."','".$count_comments3."','".$count_list3."');"); $message1= mysqli_result($result1, 0); //SQL insert completed $mailfrom="info@savingcranes.org"; $mode=0; $to="info@savingcranes.org"; $subject="ICF Crane Count Data Sheet - From Website"; $headers = "From: info@savingcranes.org" . "\r\n"; //$message.= "Date:".$count; //$message1="Thank you for submitting ICF Crane Data Count Sheet"; mail($_POST["ob_email"], "Thank you for submission", $message, $headers); mail($to, $subject, $message, $headers); //mail($to1, $subject, $message, $headers); //mail($to2, $subject, $message, $headers); //mail($to3, $subject, $message, $headers); //mail($to4, $subject, $message, $headers); //mail($to5, $subject, $message, $headers); ?>