Browse files

OTCWebsite: add links to json data

  • Loading branch information...
1 parent 2f71831 commit e26f66250a34fc369271e959bfdc73be4247034b Daniel Folkinshteyn committed Feb 14, 2012
Showing with 11 additions and 3 deletions.
  1. +9 −1 OTCWebsite/querytojson.php
  2. +1 −1 OTCWebsite/viewgpg.php
  3. +1 −1 OTCWebsite/viewratingdetail.php
View
10 OTCWebsite/querytojson.php
@@ -25,4 +25,12 @@ function jsonOutput($query)
}
print "\n]\n";
}
-?>
+
+function jsonlink() {
+ if ($_SERVER["QUERY_STRING"] != "")
+ $sep = '&';
+ else
+ $sep = '?';
+ echo $_SERVER["REQUEST_URI"] . $sep . "outformat=json";
+}
+?>
View
2 OTCWebsite/viewgpg.php
@@ -61,7 +61,7 @@
?>
</div>
- <h3>#bitcoin-otc gpg key data <?php if ($nickfilter != ""){echo "for user " . htmlentities($nickfilter) ;} ?></h3>
+ <h3>#bitcoin-otc gpg key data <?php if ($nickfilter != ""){echo "for user " . htmlentities($nickfilter) ;} ?> <sup>[<a href="<?php jsonlink(); ?>">json</a>]</sup></h3>
<table class="datadisplay">
<tr>
View
2 OTCWebsite/viewratingdetail.php
@@ -80,7 +80,7 @@
echo '<li><a href="viewgpg.php?nick=' . htmlentities($nick) . '">GPG identity</a></li>';
?>
</ul>
- <h3>List of <?php echo $signs[$sign]; ?> ratings <?php echo $types[$type]; ?></h3>
+ <h3>List of <?php echo $signs[$sign]; ?> ratings <?php echo $types[$type]; ?> <sup>[<a href="<?php jsonlink(); ?>">json</a>]</sup></h3>
<table class="datadisplay">
<tr>
<?php

0 comments on commit e26f662

Please sign in to comment.