103 rindas
2,7 KiB
PHP
103 rindas
2,7 KiB
PHP
<?php
|
|
|
|
require('include/glob.php');
|
|
require('include/muoribene.php');
|
|
require('include/sessionstart.php');
|
|
require('include/myconn.php');
|
|
require('include/getadmacc.php');
|
|
if ($account['Level']=='guest')
|
|
muoribene('Sorry, you are not authorized.',true);
|
|
require('include/menu.php');
|
|
$menu['menu']['selected']=true;
|
|
$menu['menu']['submenu']['instances']['selected']=true;
|
|
buildmenu($menu);
|
|
require('include/notifs.php');
|
|
$notifs=notifs($link);
|
|
|
|
$dbg='';
|
|
|
|
use function mysqli_real_escape_string as myesc;
|
|
|
|
// praticamente una macro
|
|
function hspech($str) {
|
|
return(htmlspecialchars($str,ENT_QUOTES|ENT_HTML5,'UTF-8'));
|
|
}
|
|
|
|
if (array_key_exists('id',$_GET) && preg_match('/^[0-9]+$/',$_GET['id'])) {
|
|
$_GET['id']+=0;
|
|
$res=mysqli_query($link,'SELECT *, ID AS IID FROM Instances WHERE ID='.$_GET['id'])
|
|
or muoribene(__LINE__.': '.mysqli_error($link),true);
|
|
if (mysqli_num_rows($res)>0) {
|
|
require('include/columns.php');
|
|
require('include/dispinst.php');
|
|
$inst=mysqli_fetch_assoc($res);
|
|
$out=dispinst($inst,$cols,$link,$dlang,$account,false,0,0);
|
|
} else {
|
|
$out='<p>Non esiste alcuna istanza con ID='.$_GET['id'].'.</p>'.N;
|
|
}
|
|
} else {
|
|
$out='<p>Nessuna istanza da mostrare.</p>';
|
|
}
|
|
|
|
mysqli_close($link);
|
|
|
|
?>
|
|
<!DOCTYPE HTML>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Mustard - Visualizzatore istanze</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" src="js/menu.js?v=<?php echo($cjrand); ?>"></script>
|
|
<script language="JavaScript">
|
|
<!--
|
|
<?php require('js/notifs.js.php'); ?>
|
|
//-->
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<nav>
|
|
<div id="hmenu">
|
|
<ul>
|
|
<?php echo($menuout); ?>
|
|
</ul>
|
|
<div class="mtit">Visualizzatore istanze</div>
|
|
<div id="rightdiv">
|
|
<?php echo('<img src="'.$notifs['imgoff'].'" id="bell" class="rlinks" title="Show notifications" onclick="shidenotifs();">'.N); ?>
|
|
<img src="imgs/esci.svg" class="rlinks" title="Logout" onclick="document.location.href='logout.php';">
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<?php echo($notifs['div']); ?>
|
|
|
|
<div id="popup">
|
|
<div id="inpopup">
|
|
<div id="popupcont">
|
|
...
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- <div id="footer">
|
|
</div> -->
|
|
|
|
<div id="fullscreen">
|
|
<div id="middlerow">
|
|
<?php echo($out); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="debug">
|
|
<?php echo($dbg); ?>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|