query('SELECT * FROM pastes WHERE uid="'.$uid.'"'); if($result = $stmt->fetch(PDO::FETCH_ASSOC)){ $conn = null; if($result["expire"]!=0 && $result["expire"]This paste just expired"; include_once "cronjob.php"; RemoveExpiredPastes(); die(); } if($result["exposure"]==2 && $result["owner"]!=0 && isset($_COOKIE["pp_sid"]) && isset($_COOKIE["pp_skey"]) && $result["owner"]!=GetUsersIDBySession($_COOKIE["pp_sid"],$_COOKIE["pp_skey"])){ echo "

This paste is private

"; die(); } echo "

".htmlspecialchars($result["title"], ENT_QUOTES, 'UTF-8')."

"; // $owner = GetUserByID($result["owner"]); echo "
"; if($owner[1] == -1) echo "Posted by: Guest"; else echo "Posted by: ".htmlspecialchars($owner[1]).""; echo ", at ".date('Y-m-d',$result["created"]).", it will expire "; if($result["expire"]==0) printf('Never'); else{ $expire = ($result["expire"]-time())/3600; if($expire>24){ printf(round($expire/24).' days from now'); } else if($expire>=1) printf(round($expire).' hours from now'); else printf(round($expire*60).' minutes from now'); } echo "
"; // echo "
";
		echo htmlspecialchars($result["text"], ENT_QUOTES, 'UTF-8')."
"; echo ""; echo ""; } else echo "Paste does not exist"; $conn = null; } else echo "Error: id not set"; ?>