Fix padlist encoding, Add title to page

This commit is contained in:
otrs 2018-07-10 22:33:47 +02:00
parent a8a4a692fb
commit ffbe083f79

View File

@ -1,3 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Pad List</title>
<meta charset="UTF-8">
</head>
<body>
<h1>Read ALL the Pads</h1> <h1>Read ALL the Pads</h1>
<h2>of the FS-Wiai Pad</h2> <h2>of the FS-Wiai Pad</h2>
@ -8,6 +16,9 @@ $con = new mysqli("dbetherpad", "etherpad", "MyEtherpad17!", "etherpad");
if ($con->connect_errno){ if ($con->connect_errno){
die("FAIL"); 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:%"'; $query = 'select distinct substring(store.key,5,locate(":",store.key,5)-5) from store where store.key like "pad:%"';
$result = $con->query($query); $result = $con->query($query);
@ -15,8 +26,11 @@ $result = $con->query($query);
while($row = $result->fetch_row()){ while($row = $result->fetch_row()){
echo "<a target='_blank' href='http://pad.wiai.de/p/".$row[0]."'>".$row[0]."</a><br/>"; echo "<a target='_blank' href='http://pad.wiai.de/p/".$row[0]."'>".$row[0]."</a><br/>\n";
} }
?> ?>
</body>
</html>