forked from server/landingpage
37 lines
648 B
PHP
37 lines
648 B
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Pad List</title>
|
|
<meta charset="UTF-8">
|
|
</head>
|
|
<body>
|
|
|
|
<h1>Read ALL the Pads</h1>
|
|
<h2>of the FS-Wiai Pad</h2>
|
|
|
|
|
|
<?php
|
|
|
|
$con = new mysqli("dbetherpad", "etherpad", "MyEtherpad17!", "etherpad");
|
|
if ($con->connect_errno){
|
|
die("FAIL");
|
|
}
|
|
|
|
$con->set_charset("utf8");
|
|
|
|
$query = 'select distinct substring(store.key,5,locate(":",store.key,5)-5) from store where store.key like "pad:%"';
|
|
|
|
$result = $con->query($query);
|
|
|
|
|
|
while($row = $result->fetch_row()){
|
|
|
|
echo "<a target='_blank' href='http://pad.wiai.de/p/".$row[0]."'>".$row[0]."</a><br/>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</body>
|
|
</html>
|