Browse Source

api fix 1

master
memespring 17 years ago
parent
commit
6b0903e8f2
3 changed files with 6 additions and 3 deletions
  1. +1
    -1
      data/%%AD^AD7^AD71B708%%rss.tpl.php
  2. +1
    -1
      data/%%F7^F7F^F7F34188%%header.tpl.php
  3. +4
    -1
      docs/api.php

+ 1
- 1
data/%%AD^AD7^AD71B708%%rss.tpl.php View File

@@ -1,4 +1,4 @@
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:21:15
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:38:29
compiled from rss.tpl */ ?> compiled from rss.tpl */ ?>
<?php echo '<?xml'; ?> <?php echo '<?xml'; ?>
version="1.0" encoding="UTF-8"<?php echo '?>'; ?> version="1.0" encoding="UTF-8"<?php echo '?>'; ?>


+ 1
- 1
data/%%F7^F7F^F7F34188%%header.tpl.php View File

@@ -1,4 +1,4 @@
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:25:09
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:37:29
compiled from header.tpl */ ?> compiled from header.tpl */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


+ 4
- 1
docs/api.php View File

@@ -33,14 +33,17 @@ class api {
switch ($call) { switch ($call) {
case "postcode": case "postcode":
if(!isset($_GET['postcode']) || !is_postcode($_GET['area_size'])){

if(!isset($_GET['area_size']) || !is_postcode($_GET['postcode'])){
array_push($this->warnings, "No valid postcode specified"); array_push($this->warnings, "No valid postcode specified");
} }
if(!isset($_GET['area_size'])){ if(!isset($_GET['area_size'])){
array_push($this->warnings, "Area size specified"); array_push($this->warnings, "Area size specified");
} }

//all good, get the data //all good, get the data
if(sizeof($this->warnings) == 0){ if(sizeof($this->warnings) == 0){

$xy = postcode_to_location($_GET['postcode']); $xy = postcode_to_location($_GET['postcode']);
$easting = $xy[0]; $easting = $xy[0];
$northing = $xy[1]; $northing = $xy[1];


Loading…
Cancel
Save