From: Gabriel Dunne Date: Sun, 18 Dec 2011 21:42:34 +0000 (-0800) Subject: Added edit.php X-Git-Tag: v0.1~53 X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=892c4a3981d319415d637bb6219dd4fece671e76;p=clmpr.git Added edit.php --- diff --git a/edit.php b/edit.php new file mode 100644 index 0000000..de07ba2 --- /dev/null +++ b/edit.php @@ -0,0 +1,101 @@ +beginTransaction(); + +try { + if ($params['id']) { + $user = get_user(); + $q = $dbh->prepare("SELECT *, clumps.id as clump_id + FROM clumps + JOIN users + ON users.id = clumps.user_id + WHERE clumps.id = ? + ORDER BY date DESC + "); + $q->execute( array( $params['id'] )); + $clump = $q->fetch(); + $canEdit = $clump['user_id'] == $user['id']; + } +} +catch(PDOException $e) +{ + echo $e->getMessage(); + exit; +} + +?> + + +clmpr - <?=$clump['title']?> + + + + + + + + + + +
+ +
+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ saved by + +

+ +
+ + +

+ + + delete +

+ + +
+
+ +
+ +
+ +