From 322a983bedf3ed60027bed5d2ea28d4daea21d28 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 23 Jun 2010 22:28:23 +0300 Subject: First commit --- index.php | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 index.php (limited to 'index.php') diff --git a/index.php b/index.php new file mode 100644 index 0000000..356288f --- /dev/null +++ b/index.php @@ -0,0 +1,73 @@ +prepare('DELETE FROM path WHERE id = ?'); + $stmt->execute(array($_POST['delete'])); + $msg = 'Path deleted'; +} +if (isset($_POST['add'])) { + if (!realpath($_POST['path']) || empty($_POST['path'])) { + $msg = "Invalid path: {$_POST['path']}"; + } else { + $stmt = $db->prepare('INSERT INTO path (path) VALUES (?)'); + $stmt->execute(array($_POST['path'])); + $msg = 'Path added'; + } +} +$rows = $db->query('SELECT * FROM path')->fetchAll(); +?> + + + + + + fsfeed + + + + +
+ + + + + + + + + + + + + + + + +
+
+ + -- cgit v1.2.3