From ef54765888ddfbc809225812269d9d564e2d7c5d Mon Sep 17 00:00:00 2001 From: jchu Date: Wed, 15 Dec 2004 04:18:13 +0000 Subject: added contents --- web/html/pkgsubmit.php | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'web/html/pkgsubmit.php') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 68af25e..27535ad 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -332,9 +332,16 @@ if ($_COOKIE["AURSID"]) { $q .= "WHERE ID = " . $pdata["ID"]; $result = db_query($q, $dbh); - # TODO Need to contents - -# while (list($k, $line) = each($lines)) { + # update package contents + # + while (list($k, $v) = each($pkg_contents)) { + $q = "INSERT INTO PackageContents (PackageID, FSPath, URLPath, FileSize) VALUES ("; + $q.= $pdata['ID'].", "; + $q.= "'".$INCOMING_DIR.$pkg_name."/".$pkg_name."/".$k."', "; + $q.= "'".$URL_DIR.$pkg_name."/".$pkg_name."/".$k."', "; + $q.= $v.")"; + db_query($q); + } # update package depends # @@ -370,7 +377,16 @@ if ($_COOKIE["AURSID"]) { $packageID = mysql_insert_id($dbh); - # TODO Need to contents + # update package contents + # + while (list($k, $v) = each($pkg_contents)) { + $q = "INSERT INTO PackageContents (PackageID, FSPath, URLPath, FileSize) VALUES ("; + $q.= $packageID.", "; + $q.= "'".$INCOMING_DIR.$pkg_name."/".$pkg_name."/".$k."', "; + $q.= "'".$URL_DIR.$pkg_name."/".$pkg_name."/".$k."', "; + $q.= $v.")"; + db_query($q); + } # update package depends # -- cgit v1.2.3-54-g00ecf