89 lines
2 KiB
PHP
89 lines
2 KiB
PHP
<?php
|
|
|
|
require('include/glob.php');
|
|
require('include/muoribene.php');
|
|
require('include/sessionstart.php');
|
|
require('include/myconn.php');
|
|
require('include/getadmacc.php');
|
|
|
|
$dbg='';
|
|
|
|
use function mysqli_real_escape_string as myesc;
|
|
|
|
// praticamente una macro
|
|
function hspech($str) {
|
|
return(htmlspecialchars($str,ENT_QUOTES|ENT_HTML5,'UTF-8'));
|
|
}
|
|
|
|
?>
|
|
<!DOCTYPE HTML>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Mastodon Startpage Admin - Your instances</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="description" content="Admin pages for Mastodon Startpage">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<link rel="icon" type="image/png" href="imgs/icona-32.png" sizes="32x32">
|
|
<link rel="icon" type="image/png" href="imgs/icona-192.png" sizes="192x192">
|
|
<link rel="icon" type="image/png" href="imgs/icona-512.png" sizes="512x512">
|
|
<link rel="apple-touch-icon-precomposed" href="imgs/icona-180.png">
|
|
<link rel="stylesheet" type="text/css" href="theme.css?v=<?php echo($cjrand); ?>">
|
|
<script language="JavaScript">
|
|
<!--
|
|
//-->
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<nav>
|
|
<div id="hmenu">
|
|
<div class="mtit">Your instances</div>
|
|
<div id="rightdiv">
|
|
<a href="logout.php" class="rlinks"><img src="imgs/esci.svg" title="Sign out"></a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div id="popup">
|
|
<div id="inpopup">
|
|
<div id="popupcont">
|
|
...
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- <div id="footer">
|
|
</div> -->
|
|
|
|
<div id="fullscreen">
|
|
<div id="middlerow">
|
|
<?php
|
|
|
|
$res=mysqli_query($link,'SELECT *, ID AS IID FROM Instances WHERE OurAdmID='.$account['ID'])
|
|
or muoribene(__LINE__.': '.mysqli_error($link),true);
|
|
$cinsts=mysqli_num_rows($res);
|
|
if ($cinsts>0) {
|
|
// $out='<p>Your instances</p>'.N;
|
|
require('include/columns.php');
|
|
require('include/dispinst.php');
|
|
$i=0;
|
|
while ($row=mysqli_fetch_assoc($res)) {
|
|
$i++;
|
|
echo(dispinst($row,$cols,$link,$dlang,true,$i,$cinsts));
|
|
}
|
|
} else {
|
|
$out='<p>No instances to show.</p>'.N;
|
|
}
|
|
|
|
mysqli_close($link);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="debug">
|
|
<?php echo($dbg); ?>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|