MastodonStartpage/web/admin/guestinsts.php

99 lines
2.3 KiB
PHP
Raw Normal View History

2020-04-07 19:39:06 +02:00
<?php
require('include/glob.php');
require('include/muoribene.php');
require('include/sessionstart.php');
require('include/myconn.php');
require('include/getadmacc.php');
2020-04-17 23:57:02 +02:00
require('include/menu.php');
$menu['menu']['selected']=true;
$menu['menu']['submenu']['instances']['href']=null;
$menu['menu']['submenu']['instances']['selected']=true;
buildmenu($menu);
2020-04-07 19:39:06 +02:00
$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); ?>">
2020-04-17 23:57:02 +02:00
<script language="JavaScript" src="js/menu.js?v=<?php echo($cjrand); ?>"></script>
2020-04-07 19:39:06 +02:00
<script language="JavaScript">
<!--
//-->
</script>
</head>
<body>
<nav>
<div id="hmenu">
2020-04-17 23:57:02 +02:00
<ul>
<?php echo($menuout); ?>
</ul>
2020-04-07 19:39:06 +02:00
<div class="mtit">Your instances</div>
<div id="rightdiv">
2020-04-21 12:35:53 +02:00
<img src="imgs/esci.svg" class="rlinks" title="Logout" onclick="document.location.href='logout.php';">
2020-04-07 19:39:06 +02:00
</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>