From 6c7a859fcf9691023c418366a62ece2f19cf4c9f Mon Sep 17 00:00:00 2001 From: William Harrington Date: Mon, 12 Mar 2018 15:51:42 -0500 Subject: Initial commit for project. --- add.php | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 add.php (limited to 'add.php') diff --git a/add.php b/add.php new file mode 100644 index 0000000..6ede522 --- /dev/null +++ b/add.php @@ -0,0 +1,125 @@ + + + + + + + + + +'; +//var_dump($_SESSION); +?> +
+Add Record +
+beginTransaction(); + $stmt = $pdo->prepare($sqlpkg); + $stmt->execute(['seq' => $seq, 'name' => $name, 'version' => $version]); + $pkgid = $pdo->lastInsertId(); + //echo "PKGID: '$pkgid' '$seq' '$name' '$version'"; + + $stmt = $pdo->prepare($sqlcfg); + $stmt->execute(['pkg_id' => $pkgid, 'configure' => $configure]); + $stmt = $pdo->prepare($sqlbld); + $stmt->execute(['pkg_id' => $pkgid, 'build' => $build]); + $stmt = $pdo->prepare($sqlnst); + $stmt->execute(['pkg_id' => $pkgid, 'install' => $install]); + $stmt = $pdo->prepare($sqlset); + $stmt->execute(['pkg_id' => $pkgid, 'setup' => $setup]); + $stmt = $pdo->prepare($sqlnot); + $stmt->execute(['pkg_id' => $pkgid, 'notes' => $notes]); + $stmt = $pdo->prepare($sqlurl); + $stmt->execute(['pkg_id' => $pkgid, 'url' => $url]); + + $pdo->commit(); + + } catch(Exception $e) { + $pdo->rollBack(); + throw $e; + } + + header("location:list.php#$seq"); + + } else { + echo '
';
+		echo 'Need at least the following attributes: Sequence, Name';
+		echo '
'; + } +} +?> +
+ +
+ +
+ +

+ +

+ +

+ +

+ +

+ +

+ +

+
+
+ +
+
+ + -- cgit v1.2.3-54-g00ecf