Login | Register (Invite Only)
Title: Page Telegram of Amfile.org
Description: Brown Hats Collective F' Around and Find Out user of the Interwebs and Project Developer for a Cause Toward Insuring a Future of Liberty without Illusion.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@=:---#@@@#%@@@*=+#@%====@@@@..:--@#====@-==#@@@+===#@%=-+@... -@@@@*@@@=+@%-*@ @@@.*@-.@@@.:@@==@:=@+ -..*@@@:# @:@=.=. #%.#@@@@ ::..@.%#.@@ %+ %@@% #@@-.@+ #@ @@@.*@+.@@@:.@@.#@%*@*.@.-*@@%@#.@.@=.%..#% *@@@@ %:+:+:@@=@@ #+ %@@+..@@= %: @@ @@@..-.=@@:* %@.%#=+@+..:@@@@@@*.@@@=..:@@@ %@%%% :.@@+-@:=#@ ...@@@:+ @@+ :- @@ @@@.+@@@@@.- =@.#@.-@*.@:=@@@@@+ @@@+:@-:@% @@*=@ @=%#+-@-.#@ @*.%@@.- #@=. + @@ @@@.+@@@@+.@..@:*%.*@*.@%.@@@@%- +@@=:@%.@@.%@:=@ @@=*#:@::@@ *# =@--% -@:- * @@ @@-::#@@%::+::*@-:=%@::.::@@@@+-::@*:.:::@::...%:::::#@*:==@#==@+:*.:=::%:-=::=@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@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*@% #@%. :%@@@. %@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@* .@@@@%=-+@@@. @@@*--#@@@@- -@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@: .@@@@@@@@@@*=@@@@@@@@@@: @@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@. .%@@@@@@@@@@@@@@@@@@@- .#@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@%. +@@@@@@@@@@@@@@@@#. +@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@%. .+@@@@@@@@@@@@%: +@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@%. -*%@@@@@#=. .*@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@: .%@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@#. +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+. .=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=. .-%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%###%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<?php session_start(); $base_dir = 'linkspaces/'; $suffix = preg_replace('/[^a-zA-Z0-9]/', '', $_GET['suffix'] ?? ''); $file = $base_dir . $suffix . '/links.json'; if (!file_exists($file)) { die('Link space not found.'); } $links_data = json_decode(file_get_contents($file), true); $links = $links_data['links'] ?? []; function getOpenGraph($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0'); $html = curl_exec($ch); curl_close($ch); $og = []; if (preg_match('/<meta[^>]+property=["\']og:title["\'][^>]+content=["\'](.*?)["\']/i', $html, $match)) { $og['title'] = $match[1]; } if (preg_match('/<meta[^>]+property=["\']og:description["\'][^>]+content=["\'](.*?)["\']/i', $html, $match)) { $og['description'] = $match[1]; } if (preg_match('/<meta[^>]+property=["\']og:image["\'][^>]+content=["\'](.*?)["\']/i', $html, $match)) { $og['image'] = $match[1]; } if (preg_match('/<meta[^>]+property=["\']og:video["\'][^>]+content=["\'](.*?)["\']/i', $html, $match)) { $og['video'] = $match[1]; } return $og; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>LinkGram - <?php echo htmlspecialchars($suffix); ?></title> <link rel="stylesheet" href="styles.css"> </head> <body> <main class="container mx-auto p-4"> <h1 class="text-3xl font-bold mb-4">LinkGram Space: <?php echo htmlspecialchars($suffix); ?></h1> <div class="mb-6"> <h2 class="text-xl font-semibold mb-2">Submit a Link</h2> <input type="url" id="newLink" class="border p-2 w-full mb-2" placeholder="Enter URL" required> <button onclick="submitLink()" class="px-4 py-2">Submit</button> </div> <div class="mb-6"> <h2 class="text-xl font-semibold mb-2">Manage Links</h2> <input type="password" id="password" class="border p-2 w-full mb-2" placeholder="Enter password"> <button onclick="verifyPassword()" class="px-4 py-2">Unlock Management</button> </div> <h2 class="text-xl font-semibold mb-2">Links</h2> <div id="linksList" class="grid gap-4"> <?php foreach ($links as $index => $link): $og = getOpenGraph($link['url']); ?> <div class="og-card p-4 relative"> <a href="<?php echo htmlspecialchars($link['url']); ?>" target="_blank"> <?php echo htmlspecialchars($og['title'] ?? $link['url']); ?> </a> <?php if (!empty($og['description'])): ?> <p class="mt-2"><?php echo htmlspecialchars($og['description']); ?></p> <?php endif; ?> <?php if (!empty($og['image'])): ?> <img src="<?php echo htmlspecialchars($og['image']); ?>" alt="Preview" class="mt-2 max-w-full h-auto"> <?php endif; ?> <?php if (!empty($og['video'])): ?> <video controls class="mt-2 max-w-full"> <source src="<?php echo htmlspecialchars($og['video']); ?>"> </video> <?php endif; ?> <div class="manage-controls hidden mt-2"> <button onclick="editLink(<?php echo $index; ?>)" class="px-2 py-1 mr-2">Edit</button> <button onclick="deleteLink(<?php echo $index; ?>)" class="px-2 py-1">Delete</button> </div> </div> <?php endforeach; ?> </div> </main> <footer> <p> LinkGram by <a href="https://amfile.org" target="_blank">Amfile.org</a>, a <a href="https://pagetelegram.com" target="_blank">PageTelegram.com</a> production, Copyright 2025 | A better world in the making, one site at a time. </p> </footer> <script> const suffix = '<?php echo htmlspecialchars($suffix); ?>'; let isAdmin = false; function submitLink() { const url = document.getElementById('newLink').value; if (!url) { alert('Please enter a valid URL.'); return; } fetch('manage_links.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ suffix, action: 'add', url }) }) .then(response => response.json()) .then(data => { if (data.success) { window.location.reload(); } else { alert(data.message); } }); } function verifyPassword() { const password = document.getElementById('password').value; fetch('manage_links.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ suffix, action: 'verify', password }) }) .then(response => response.json()) .then(data => { if (data.success) { isAdmin = true; document.querySelectorAll('.manage-controls').forEach(el => el.classList.remove('hidden')); } else { alert('Incorrect password.'); } }); } function editLink(index) { if (!isAdmin) { alert('Please verify password first.'); return; } const newUrl = prompt('Enter new URL:'); if (newUrl) { fetch('manage_links.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ suffix, action: 'edit', index, url: newUrl }) }) .then(response => response.json()) .then(data => { if (data.success) { window.location.reload(); } else { alert(data.message); } }); } } function deleteLink(index) { if (!isAdmin) { alert('Please verify password first.'); return; } if (confirm('Are you sure you want to delete this link?')) { fetch('manage_links.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ suffix, action: 'delete', index }) }) .then(response => response.json()) .then(data => { if (data.success) { window.location.reload(); } else { alert(data.message); } }); } } </script> </body> </html>