Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 23 lines (15 sloc) 0.454 kb
9b5cc3e @jimwins Add API for adding notes, use it
authored
1 <?
2 include '../scat.php';
3 include '../lib/txn.php';
4
5 $id= (int)$_REQUEST['id'];
6
7 if (!$id)
8 die_jsonp("No transaction specified.");
9
10 $note= $_REQUEST['note'];
11
12 if (!$note)
13 die_jsonp("No note given.");
14
15 $note= $db->escape($note);
16
17 $q= "INSERT INTO txn_note SET entered = NOW(), txn = $id, content = '$note'";
18 $db->query($q)
19 or die_query($db, $q);
20
21 echo jsonp(array('txn' => txn_load($db, $id),
22 'notes' => txn_load_notes($db, $id)));
Something went wrong with that request. Please try again.