function getList($key) { global $db; //Get paste key $st = $db->prepare("SELECT * FROM shoppingLists WHERE `key`=:key"); $st->bindValue(":key", $key, PDO::PARAM_STR); $st->execute(); $rows = $st->fetchAll(PDO::FETCH_ASSOC); $pasteKey = $rows[0]['pasteKey']; return getPaste($pasteKey); }
<?php include "functions.php"; //Get paste $paste = getPaste($_GET['key']); $info = getPasteInfo($_GET['key']); ?> <head> <title>EVE Tools - Pastebin - viewing paste</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <!-- Latest compiled and minified CSS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <?php include "../switcher.php"; ?> <link rel="stylesheet" href="/paste/css/custom.css"> <!-- Optional theme --> <!-- Latest compiled and minified JavaScript --> <script type="text/javascript"> function fnSelect(objId) { fnDeSelect(); if (document.selection) { var range = document.body.createTextRange(); range.moveToElementText(document.getElementById(objId));
function getLScan($key) { global $db; //Get ID and check existence $st = $db->prepare("SELECT * FROM lscanScans WHERE `key`=:key"); $st->bindValue(":key", $key); $st->execute(); $rows = $st->fetchAll(PDO::FETCH_ASSOC); if (count($rows) < 1) { return false; } $pasteKey = $rows[0]['pasteKey']; $lscan = getPaste($pasteKey); return json_decode($lscan, true); }