diff --git a/pkgs/padlist/default.nix b/pkgs/padlist/default.nix deleted file mode 100644 index e3f4640..0000000 --- a/pkgs/padlist/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ stdenvNoCC, ... }: -stdenvNoCC.mkDerivation { - name = "padlister"; - src = ./.; - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' - mkdir -p $out - cp -r $src/index.php $out - ''; -} diff --git a/pkgs/padlist/index.php b/pkgs/padlist/index.php deleted file mode 100644 index 60bf364..0000000 --- a/pkgs/padlist/index.php +++ /dev/null @@ -1,79 +0,0 @@ -getMessage(); - die(); -} - -$query = 'SELECT "Notes".title, "Notes"."updatedAt", "Notes"."shortid", "Users".profile FROM "Notes" JOIN "Users" ON "Notes"."ownerId" = "Users".id WHERE (permission = \'freely\' OR permission = \'editable\' OR permission = \'limited\') AND strpos(content, \'tags: listed\')>0 ORDER BY "Notes"."updatedAt" DESC'; -try { - $stmt = $dbh->query($query); - $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); -} catch (PDOException $e) { - echo "Error: " . $e->getMessage(); - die(); -} - -function formatDateString($stringDate) -{ - $datetime = DateTime::createFromFormat('Y-m-d H:i:s.uP', $stringDate); - $formattedDate = $datetime->format('d.m.Y H:i'); - return $formattedDate; -} -?> - - - - -
- - - -Titel | -Owner | -Last edit | -
---|---|---|
- = $row['title'] ?> - | -- = json_decode($row['profile'])->username ?> - | -- = formatDateString($row['updatedAt']) ?> - | -