" /> \n"; }; function empty_td($width="", $height="", $extras="") { echo " "; }; function image($source, $width="", $height="", $alt_text="", $title="", $extras="") { echo "\"$alt_text\""; }; function start_form($form_name="", $action="", $extras="") { if (!$form_name) { $form_name = "theform"; }; if (!$action) { global $this_script; $action = $this_script; }; echo "
\n"; }; function text_field($varname, $size="", $value="", $extras="") { echo ""; }; function textarea_field($varname, $rows="", $cols="", $value="") { echo "\n"; }; function hidden_field($varname, $value=false) { if ($value === false) { $value=$GLOBALS[$varname]; }; echo ""; }; function dropbox($varname, $default, $array, $blank, $extras="") { echo "\n"; }; function tickbox($varname, $ticked=false, $extras="") { echo ""; }; function radio_button($varname, $value, $ticked=false, $extras="") { echo ""; }; function validated_radio_set($prompt, $varname, $array, $error_msg) { #echo ""; #echo "$prompt"; $not_the_first = 0; foreach ($array as $index=>$value) { #if ($not_the_first++) { # echo ""; #}; echo ""; radio_button($varname, $value); echo is_numeric($index) ? ucfirst(strtolower($value)) : $index; echo "\n"; }; $js = " if (!check_sthg_ticked(f.$varname)) {\n" . " wt += \"${error_msg}\\n\";\n" . " };\n"; comment("Javascript:\n$js"); return $js; }; function splitbar($text) { echo "$text\n"; }; function print_ul($array, $css="") { $answer = ""; echo "\n"; return $answer; }; function bottom_banner($cols=0) { echo ""; include "banner.inc.php"; echo "\n"; }; $regions = array("NSC" => "North Scotland", "SSC" => "South Scotland", "NWT" => "the North West", "NET" => "the North East", "YAL" => "Yorkshire and Lincolnshire", "NWL" => "North Wales", "SWL" => "South Wales", "MLD" => "the Midlands", "EAG" => "East Anglia", "SWT" => "the South West", "SET" => "the South East", "NIR" => "Northern Ireland"); $map_regions = array("MLD" => "155,311,152,319,151,329,154,341,166,345,179,345,194,340,206,334,203,328,205,316,195,301,196,292,200,284,199,276,190,276,179,277,176,279,167,281,160,290,157,300", "YAL" => "189,235,178,235,164,231,163,241,170,250,164,266,170,275,181,272,191,272,201,273,204,283,199,297,207,310,220,304,231,295,224,271,220,260,216,250,209,240,202,233", "NIR" => "49,186,36,191,27,201,13,211,19,217,25,225,33,226,38,218,45,218,52,232,65,236,80,228,81,212,74,202,70,186,58,181", "NWT" => "108,223,101,229,101,240,135,232,137,241,141,257,138,263,136,273,144,286,153,293,166,276,162,264,167,251,160,241,161,230,162,216,157,196,139,206,132,220", "SWT" => "126,371,110,368,96,366,97,374,86,375,79,389,63,400,49,410,58,422,73,409,83,408,92,406,104,413,113,404,120,395,131,396,140,404,149,404,160,399,169,397,179,393,181,384,177,376,178,369,179,359,180,349,164,350,151,346,144,351,135,363", "EAG" => "238,300,227,304,219,312,213,314,214,323,209,327,214,340,224,335,231,341,240,346,253,350,262,341,262,331,264,319,260,309,252,305", "NET" => "181,171,170,180,167,194,159,192,161,205,164,214,164,227,179,231,188,232,200,230,191,220,192,211,189,205,188,195,186,183", "SSC"=> "76,141,69,141,64,157,82,182,93,176,105,185,91,200,97,211,112,212,117,208,131,210,139,203,148,198,157,190,164,190,169,177,178,168,164,158,163,145,150,142,138,144,129,145,126,132,123,130,109,138,106,128,103,128,96,128,89,145", "SET" => "211,343,205,338,195,344,183,348,182,359,181,368,180,376,184,387,182,396,171,398,162,403,168,406,169,409,177,408,180,401,193,401,208,402,218,402,229,399,240,393,247,386,253,375,226,374,237,364,244,352,231,347,221,339", "NWL" => "96,266,102,279,91,291,96,298,105,290,109,307,116,312,124,309,132,315,145,318,150,308,153,298,140,289,132,276,117,274,105,263", "NSC" => "122,37,155,39,174,4,193,11,171,50,151,64,144,79,179,85,194,92,187,109,175,126,164,141,151,138,136,142,127,125,114,133,112,125,95,125,86,139,71,134,58,124,78,116,71,102,48,102,55,71,71,47,93,36", "SWL" => "120,315,122,313,133,319,146,322,149,330,148,337,149,343,142,346,137,355,131,357,122,363,112,358,110,351,101,354,89,344,94,345,89,347,79,347,75,345,72,335,77,328,82,325,95,321,108,312"); $segtypes = array(array("lawn", "lawn", "gfx/lawn.gif", "Lawn"), array("border", "border", "gfx/flowerbed.gif", "Borders"), array("patio", "patio", "gfx/patio.gif", "Patio"), array("decking", "decking", "gfx/decking.gif", "Decking"), array("veg. plot", "veg", "gfx/veg_plot.gif", "Vegetables")); $divtypes = array(array("panel fence", "fence1", "gfx/fence1.gif", "Panel Fence"), array("railings", "fence2", "gfx/fence2.gif", "Railings"), array("brick wall", "wall1", "gfx/wall1.gif", "Brick Walls"), array("hedge", "hedge", "gfx/hedge.gif", "Hedges"), array("wall + fence", "wall2", "gfx/wall2.gif", "Wall + Fence")); ?> GardenQuoter \n"; echo ""; image("gfx/gardenquoterlogo.gif"); echo "\n"; ########################## DISPLAY QUOTE ########################## if ($_POST["continue2"]) { ($uid = $_SESSION["uid"]) || $uid = $_POST["uid"]; $formal = array(); foreach ($segtypes as $i => $array) { $formal[$array[1]] = $array[3]; }; foreach ($divtypes as $i => $array) { $formal[$array[1]] = $array[3]; }; $query = "UPDATE `raw_log`.`logins` SET timescale=\"$time\", info=\"$info\" " . "WHERE `uid`=$uid"; comment($query); mysql_query($query, $dbh); $est_price = 0; $extras_string = ""; $extras_info = array(); $query = "SELECT `code`, `description`, `aterm`, `pterm`, `cterm` FROM `extras` " . "WHERE `root`=\"$root\" AND `class`=\"garden\""; comment($query); $sth = mysql_query($query, $dbh); while ($array = mysql_fetch_array($sth, MYSQL_NUM)) { $code = array_shift($array); $extras_info[$code] = $array; }; $stuff3 = array(); foreach ($extras_info as $code => $array) { if ($_POST[$code]) { list ($description, $a_term, $p_term, $c_term) = $array; #echo "
Extra: $code / $description worth £$c_term\n"; $est_price += $c_term; $stuff3[] = $description; $extras_string .= "$code|"; }; }; #echo "
\n"; // erase any previous request from this UID $query = "DELETE FROM `requests` WHERE `uid`=$uid"; comment($query); mysql_query($query, $dbh); $length = array(); $width = array(); $segtype = array(); $total_area = 0; $total_dlength = 0; $stuff = array(); $stuff1 = array(); $vis_segs = $_POST["vis_segs"]; for ($i = 0; $i < $vis_segs; ++$i) { $length[$i] = $_POST["length"][$i]; $width[$i] = $_POST["width"][$i]; $segtype[$i] = $_POST["segtype"][$i]; #echo "
Segment $i: length $length[$i]m. : width $width[$i]m. : use $segtype[$i] / {$formal[$segtype[$i]]}\n"; $query = "SELECT `aterm`,`pterm`,`cterm` FROM `suppliers` " . "WHERE `root`=\"$root\" AND `class`=\"$segtype[$i]\""; comment($query); $sth = mysql_query($query, $dbh); list($a_term, $p_term, $c_term) = mysql_fetch_array($sth, MYSQL_NUM); #echo "aterm $a_term, pterm $p_term, cterm $c_term: "; $item_price = $a_term * ($length[$i] * $width[$i]) + $p_term * ($length[$i] + $width[$i]) + $c_term; #printf("£%.2d\n", $item_price); $est_price += $item_price; $total_area += $length[$i] * $width[$i]; $stuff1[] = "{$formal[$segtype[$i]]}, $length[$i]m. by $width[$i]m."; $query = "INSERT INTO `requests`(`uid`,`root`,`class`,`length`,`width`,`extras`) " . "VALUES($uid, \"$root\", \"$segtype[$i]\", $length[$i], $width[$i], \"$extras_string\")"; comment($query); mysql_query($query, $dbh); }; $vis_divs = $_POST["vis_divs"]; $dlength = array(); $dheight = array(); $divtype = array(); $stuff2 = array(); for ($i = 0; $i < $vis_divs; ++$i) { $dlength[$i] = $_POST["dlength"][$i]; $dheight[$i] = $_POST["dheight"][$i] * 1; $divtype[$i] = $_POST["divtype"][$i]; #echo "
Division $i: length $dlength[$i]m. : height $dheight[$i]m. : use $divtype[$i] / {$formal[$divtype[$i]]}\n"; $query = "SELECT `aterm`,`pterm`,`cterm` FROM `suppliers` " . "WHERE `root`=\"$root\" AND `class`=\"$divtype[$i]\""; comment($query); $sth = mysql_query($query, $dbh); list($a_term, $p_term, $c_term) = mysql_fetch_array($sth, MYSQL_NUM); #echo "aterm $a_term, pterm $p_term, cterm $c_term: "; $item_price = $a_term * ($dlength[$i] * $dheight[$i]) + $p_term * ($dlength[$i] + $dheight[$i]) + $c_term; #printf("£%.2d\n", $item_price); $est_price += $item_price; $total_dlength += $dlength[$i]; $stuff2[] = "{$formal[$divtype[$i]]}, $dlength[$i]m. by $dheight[$i]m."; $query = "INSERT INTO `requests`(`uid`,`root`,`class`,`length`,`width`,`extras`) " . "VALUES($uid, \"$root\", \"$divtype[$i]\", $dlength[$i], $dheight[$i], \"$extras_string\")"; comment($query); mysql_query($query, $dbh); }; #echo "
\n"; echo ""; echo ""; echo "Thank you for your enquiry.\n"; echo "\n"; echo ""; $longreg = $regions[$reg = $_POST["reg"]]; if (!$longreg) { $longreg = "your area"; }; $bz_price = sprintf("%d", $est_price * .75); $ag_price = sprintf("%d", $est_price); $au_price = sprintf("%d", $est_price * 1.25); $min_amt = $budget * (rand(850, 950) / 1000); $min_amt = sprintf("%d", $min_amt); $max_amt = $budget * (rand(1050, 1150) / 1000); $max_amt = sprintf("%d", $max_amt); if ($express) { echo "Based on your requirements we calculate that you can expect to pay\n"; echo "between £${min_amt} and £${max_amt}.\n"; } else { echo "Depending upon the exact requirements, which can be discussed at survey, "; echo "you should expect to pay the following prices:\n

"; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "BUDGET:

"; echo "£$bz_price"; echo "
"; echo "STANDARD:

"; echo "£$ag_price"; echo "
"; echo "DE LUXE:

"; echo "£$au_price"; echo "
"; }; echo "\n"; echo ""; empty_td(40); empty_td(); echo "\n"; echo ""; echo "Summary of your requirements\n"; echo "\n"; echo ""; empty_td(); # echo "
    "; # foreach ($stuff as $i => $j) { # $j1 = preg_replace("/m2/", "m2", $j); # echo "
  • $j1
  • \n"; # }; # echo "
\n"; echo ""; $stuff = ""; if (count($stuff1)) { echo "Total plots and paved areas: ${total_area}m2, comprising:\n"; $stuff .= print_ul($stuff1); }; if (count($stuff2)) { echo "Total fences, walls and hedges: ${total_dlength}m., comprising:"; $stuff .= print_ul($stuff2); }; if (count($stuff3)) { $stuff .= print_ul($stuff3); }; $query = "UPDATE `raw_log`.`logins` SET timescale=\"$time\", info=\"$stuff$info\" " . "WHERE `uid`=$uid"; comment($query); mysql_query($query, $dbh); echo "\n"; #echo ""; #empty_td(); #empty_td(); #echo "\n"; echo ""; echo ""; echo "Our database includes suppliers in $longreg that match your requirements\n"; echo "and an authorised representative will contact you shortly to arrange a site\n"; echo "survey on which a more detailed quotation can be based.\n"; echo "\n"; $stage1 = false; }; ########################### GENERATE UID ############################ if ($_POST["cont1"]) { if ($old_uid = $_SESSION["uid"]) { comment("Re-using existing UID $old_uid"); $uid = $old_uid; } else { $title = $_POST["title"]; $initial = strtoupper($_POST["initial"]); $surname = ucfirst(strtolower($_POST["new_user"])); $user = "$title " . ($initial ? "$initial. " : "") . $surname; $email = $_POST["email"]; $telephone = $_POST["telephone"]; if (($telephone2 = $_POST["telephone2"]) != $telephone) { $telephone .= " or $telephone2"; }; $dataprotect = $_POST["dataprotect"]; $addrfrompc = $_POST["addrfrompc"]; list($address, $town, $county, $postcode, $easting, $northing) = preg_split("/\|/", $addrfrompc); $prevuid = $_POST["prevuid"]; $reg = $_POST["reg"]; comment($user); comment($address); comment($town); comment($county); comment($postcode); comment($email); comment($telephone); comment($dataprotect); comment($prevuid); if ((!$prevuid) && ($user && $addrfrompc && $telephone)) { mysql_select_db("raw_log", $dbh); $new_uid = ""; for ($i = 0; $i < 11; ++$i) { $new_uid .= rand(0,9); }; comment("Initial guess: $new_uid"); $uid_ok = false; while (!$uid_ok) { $query = "SELECT COUNT(*) FROM `logins` WHERE `uid`=\"$new_uid\""; comment($query); /* See if that UID exists in raw_log.logins */ $sth = mysql_query($query, $dbh) or die (mysql_error($dbh)); list($in_use) = mysql_fetch_array($sth, MYSQL_NUM); comment("In use: $in_use"); if ($in_use) { // change just one digit at random $new_uid = substr_replace($new_uid, rand(0,9), rand(0,strlen($new_uid)-1), 1); comment("Next try: $new_uid"); } else { // insert an entry $query = "INSERT INTO `logins`(`root`, `user`, `postcode`, `email`, " . "`address`, `town`, `county`, `date`, `uid`, `telephone`, " . "`dataprotect`, `info`) " . "VALUES(\"$root-$reg\", \"$user\", \"$postcode\", \"$email\", " . "\"$address\", \"$town\", \"$county\", NOW(), \"$new_uid\", " . "\"$telephone\", \"$dataprotect\", \"halfway through process\")"; comment($query); /* This will fail if some other process has already caused an entry to be inserted with the same UID in the meantime. Then $uid_ok will return false and we will go around the loop again. */ $uid_ok = mysql_query($query, $dbh); }; }; $_SESSION["uid"] = $uid = $new_uid; /* Tracking stuff */ $ip_addr = $_SESSION["ip_addr"]; $s_eng = $_SESSION["s_eng"]; $proto_uid = $_SESSION["proto"]; $query = "INSERT INTO `finale` (`ipaddr`, `uid`, `qstring`, `date`, `proto`) " . "VALUES (\"$ip_addr\", \"$new_uid\", \"$s_eng\", NOW(), \"$proto_uid\")"; comment($query); mysql_query($query, $dbh); $query = "UPDATE `tracking` SET `realuid`=\"$new_uid\" " . "WHERE `uid`=\"$proto_uid\""; comment($query); mysql_query($query, $dbh); if ($_SESSION["demo_customer"]) { $query = "UPDATE demo SET uid=$new_uid WHERE proto=\"$proto_uid\""; comment($query); mysql_query($query, $dbh); }; mysql_select_db("geet", $dbh); /* NB, we haven't closed the MySQL connection; this is right, because we will need it later to look up product details. */ }; if ($prevuid) { $pc_wild = $_POST["postcode"] . "%" . $_POST["p2"]; $query = "SELECT COUNT(*) FROM `raw_log`.`logins` " . "WHERE `uid`=$prevuid AND `postcode` LIKE \"$pc_wild\""; comment($query); $sth = mysql_query($query, $dbh); list($count) = mysql_fetch_array($sth,MYSQL_NUM); comment("Found $count records with same details."); //$newreg = $_POST["reg"]; if ($count) { $uid = $prevuid; $newreg = $_POST["reg"]; } else { echo "
\n"; echo ""; echo "We couldn't find your stored details! Please check that the reference\n"; echo "number and postcode were entered correctly. If the problem persists,\n"; echo "you may have to re-enter your details manually."; echo "\n"; }; }; }; }; ########################### QUESTIONNAIRE ########################### if (($uid) && (($_POST["cont1"]) || ($action = $_REQUEST["action"]))) { ($n_segs = $_POST["n_segs"]) || $n_segs = 10; ($vis_segs = $_POST["vis_segs"]) || $vis_segs = 1; ($n_divs = $_POST["n_divs"]) || $n_divs = 10; ($vis_divs = $_POST["vis_divs"]) || $vis_divs = 1; if ($action == "moresegs") { $n_segs += 10; ++$vis_segs; }; if ($action == "moredivs") { $n_divs += 10; ++$vis_divs; }; $reg = $_POST["reg"]; echo ""; echo "Now we need to know about how your garden will be divided up and what each section will be used for.\n"; echo "\n"; echo "
\n"; // echo ""; // echo "If you need extra time for measuring, drawing sketches &c., please make\n"; // echo "a note of this reference number: $uid.\n"; // echo "
This will enable you to return to the site later without re-entering your\n"; // echo "contact details.\n"; // echo "\n"; echo ""; echo "Garden Plots and Paved Areas\n"; echo "\n"; #echo ""; start_form("", "", "onsubmit=\"return check_garden()\""); ##echo "\n"; $js = ""; $js_val = ""; $radio_seq = 0; for ($i = 0; $i < $n_segs; ++$i) { echo ""; echo ""; echo ""; echo "\n"; ++$radio_seq; }; echo "\n"; echo "\n"; $radio_seq = 0; for ($i = 0; $i < $n_divs; ++$i) { echo ""; echo ""; echo ""; echo "\n"; ++$radio_seq; }; echo "\n"; echo "\n"; $query = "SELECT `code`, `description` FROM `extras` " . "WHERE `root`=\"$root\" AND `class`=\"garden\""; comment($query); $sth = mysql_query($query, $dbh); $table = 0; while (list($code, $description) = mysql_fetch_array($sth, MYSQL_NUM)) { if (!$table++) { $rowspan = mysql_num_rows($sth); echo "\n"; echo "\n"; echo "\n"; // information boxes echo "\n"; $boxnames = array("Lawn", "Borders", "Patio", "Decking", "Vegetables"); echo "\n"; echo "\n"; ##echo "
"; // class=\"btmbar\" echo "\n"; echo ""; foreach ($segtypes as $j=>$array) { echo ""; }; echo "\n"; foreach ($segtypes as $j=>$array) { echo ""; }; echo "\n"; echo ""; foreach ($segtypes as $j=>$array) { if ($array[1] == $_POST["segtype"][$i]) { $js .= "document.getElementById(\"rs${radio_seq}b${j}\").checked = true\n"; }; echo "\n"; }; echo "
"; image("gfx/1x1.png", 10, 1); echo "$array[0]
"; image("$array[2]", 100, 100, $array[0], "", "onclick=\"radioclick('s', $radio_seq, $j)\""); echo "
\n"; echo "
"; echo ""; echo "\n"; echo "\n"; echo "
Length:"; echo " m.
Width: "; echo ""; echo " m.
\n"; echo "
"; echo "\n"; echo "\n"; echo "
"; echo "Hedges, Walls and Fences\n"; echo "
"; echo "\n"; echo ""; foreach ($divtypes as $j=>$array) { echo ""; }; echo "\n"; foreach ($divtypes as $j=>$array) { echo ""; }; echo "\n"; echo ""; foreach ($divtypes as $j=>$array) { if ($array[1] == $_POST["divtype"][$i]) { $js .= "document.getElementById(\"rd${radio_seq}b${j}\").checked = true\n"; }; echo ""; }; echo "
"; image("gfx/1x1.png", 10, 1); echo "$array[0]
"; image("$array[2]", 100, 100, $array[0], "", "onclick=\"radioclick('d', $radio_seq, $j)\""); echo "
\n"; echo "
"; echo ""; echo "\n"; echo "\n"; echo "
Length:"; echo " m.
Height: "; echo ""; dropbox("dheight[$i]", $_POST['dheight'][$i], array(0, "1m. or less", "1.2m.", "1.5m.", "1.8m.", "2m. or more"), "Please select", "id=\"dh$i\" onchange=\"recalc_all()\""); echo "
\n"; echo "
"; echo "\n"; echo "\n"; echo "
"; echo "Additional Items\n"; echo "
\n"; #echo ""; empty_td(50, 0, "rowspan=\"$rowspan\""); } else { echo ""; }; echo ""; echo ""; echo "\n"; }; if ($table) { echo "

$description"; tickbox($code, $_POST[$code]); echo "
\n"; empty_td(); }; echo "
"; echo "Further Information\n"; echo "
"; echo ""; echo ""; empty_td(50,0, "rowspan=\"8\""); echo "\n"; echo ""; $js_val .= validated_radio_set("Time Scale", "time", array("Within 3 months" => "0-3", "3-6 months" => "3-6", "6-12 months" => "6-12", "Over 12 months" => "over 12"), "You have not selected a time scale!"); echo "\n"; echo ""; empty_td(); echo "\n"; echo "\n"; echo "\n"; echo "
When do you anticipate having this work done?
Please use this box to give any additional information:
"; textarea_field("info", 4, 60, $_POST["info"]); echo "
\n"; echo "
"; echo "Summary\n"; echo "
"; echo "\n"; foreach ($segtypes as $i => $array) { echo ""; if (!$i) { echo ""; }; echo "\n"; if (!$i) { echo ""; }; echo "\n"; }; echo ""; echo "\n"; echo "
"; image("gfx/1x1.png", 20, 1); echo "$array[3]"; text_field("area${i}", 6, "", "id=\"pa${i}\""); echo " m2"; text_field("spercent${i}", 4, "", "id=\"pc${i}\""); echo "%"; image("gfx/1x1.png", 20, 1); echo "{$divtypes[$i][3]}"; text_field("dlen${i}", 6, "", "id=\"pl${i}\""); echo " m."; text_field("dpercent${i}", 4, "", "id=\"dpc${i}\""); echo "%
Total area"; text_field("totalarea", 6, "", "id=\"totalarea\""); echo " m2Total length"; text_field("totaldiv", 6, "", "id=\"totaldiv\""); echo " m.
\n"; echo "
"; echo "Total segments: \n"; echo "
\n"; echo "Visible segments: \n"; echo "
\n"; echo "Total divisions: \n"; echo "
\n"; echo "Visible divisions: \n"; echo "
\n"; echo "Action: \n"; hidden_field("uid"); hidden_field("reg"); echo "
\n"; echo "\n"; echo "\n"; ##echo "\n"; ##echo "\n"; echo "\n"; echo "
\n"; splitbar("Your reference number is $uid."); echo ""; echo "Please make a note of this number. If you need to take time out to measure,\n"; echo "draw sketches &c., you can use this number to return to the site without\n"; echo "having to enter your details all over again.\n"; echo "\n"; echo "\n"; echo "\n"; $stage1 = false; }; ########################## ADDRESS SELECTOR ######################### //if ((!$uid) || ($newreg = $_GET["reg"])) { if (($newreg = $_GET["reg"])) { $longreg = $regions[$newreg]; if (!$longreg) { $longreg = "your area"; }; echo ""; empty_td(200); empty_td(); echo "\n"; splitbar("Your Details"); echo "\n"; // a valid email #echo "
\n"; start_form("", "", "onsubmit = \"return check_login()\""); echo ""; echo "Title"; echo ""; dropbox("title", "", array("", "Mr", "Mrs", "Miss", "Ms", "Dr", "Mx"), "--", "title=\"title\""); echo "\n"; echo ""; echo "\n"; echo ""; echo "Initial and Surname"; echo ""; text_field("initial", 1, "", "maxlength=\"1\" title=\"first initial\""); echo ".\n"; text_field("new_user", 20, "", "title=\"surname\""); echo ""; echo "\n"; echo ""; echo "Address"; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "Postcode"; echo ""; text_field("postcode", 4, $_POST["postcode"], "maxlength=\"4\""); echo "\n"; text_field("p2", 4, $_POST["p2"], "maxlength=\"4\""); echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo "Telephone"; echo ""; text_field("telephone", 20, "", "title=\"telephone\""); echo ""; echo "\n"; echo ""; echo "Alt. telephone"; echo ""; text_field("telephone2", 20, "", "title=\"alternative telephone\""); echo ""; echo "\n"; echo ""; echo "E-mail"; echo ""; text_field("email", 40, "", "title=\"e-mail\""); echo ""; echo "\n"; echo ""; echo "Data Protection"; echo ""; echo "
"; tickbox("dataprotect", true); echo ""; echo "We may contact you about other offers, or pass your details to other\n"; echo "reputable companies whose products and services may be of interest to you.\n"; echo "Please tick this box if you do not wish to receive such offers.\n"; echo "
"; echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; hidden_field("addrfrompc", ""); hidden_field("reg", $newreg); /* splitbar("Returning Users"); echo ""; echo "If you have already started using the service, just enter your reference number here\n"; echo "and your postcode above to return straight to GardenQuoter without having to\n"; echo "re-enter all your details.\n"; echo "\n"; echo ""; echo "Reference"; echo ""; text_field("prevuid", 20, $_POST["prevuid"], "title=\"reference\""); echo ""; echo "\n"; */ echo "
\n"; $stage1 = false; }; ############################ STAGE ONE ############################ if ($stage1) { #echo "STAGE ONE\n"; echo ""; echo ""; echo "Home | "; echo "About Us | "; echo "Advice"; echo ""; echo "\n"; echo ""; echo "Welcome to GardenQuoter!\n"; echo "

This service will enable you to get a quote on landscape gardening\n"; echo "services in minutes, based on prices supplied by our nationwide network of\n"; echo "landscape gardening companies."; echo ""; echo ""; image("http://static.priceengine.co.uk/gfx/map.gif", 271, 426, "", "", "border=\"0\" usemap=\"#map\""); echo "\n"; foreach ($map_regions as $reg => $coords) { echo "\n"; }; echo "\n"; echo "
\n"; echo "Click on your area of the map to begin .....\n"; echo "
\n"; /* echo "Before You Start\n"; echo "You may find it helpful to take measurements of your garden\n"; echo "and draw sketches showing how you want things to be arranged.\n"; echo "
\n"; */ echo "What are the benefits of using GardenQuoter?\n"; echo "Companies Vetted\n"; echo "We regularly monitor and carry out financial and\n"; echo "legislative checks on all companies.\n"; echo "Deposit Protection\n"; echo "Even if the landscape gardening company goes out of business\n"; echo "after you have paid a deposit (up to 10%), we will find another company to finish the\n"; echo "work for you. "; echo "(Terms and Conditions apply)\n"; echo "Save Money\n"; echo "By saving money on advertising, companies can pass their\n"; echo "savings on to you.\n"; echo "Instant Quote\n"; echo "You can get an estimate for a professionally landscaped\n"; echo "garden, as simple or as complicated as you like, NOW!\n"; echo "
\n"; echo "
\n"; }; bottom_banner(2); # #Wibble # ?>
\$_POST = ";
        print_r($_POST);
        print "
\n
\n
\$_SESSION = ";
        print_r($_SESSION);
        echo "This page is coming from: " . $_SERVER["SERVER_ADDR"] . ".\n";
        print "
\n
\n"; }; ?>