view show.php @ 125:f364b50e07f7

Some preliminary work on a potential "compo system announcement whatnot thingy".
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 22 Oct 2013 16:20:47 +0300
parents
children 71c35d5302c2
line wrap: on
line source

<?
//
// Entry display / show helper module
//
$sessionType = "admin";
require "mconfig.inc.php";
require "msite.inc.php";
require "mcommon.inc.php";
require "msession.inc.php";

// Check if we are allowed to execute
if (!stCheckHTTPS() || !stAdmSessionAuth(TRUE))
{
  stSetupCacheControl();

  stSessionEnd(SESS_ADMIN);

  stSetStatus(404, "Not Found");
  
  cmPrintPageHeader("Error");
  echo "<div class=\"notice\">".
  "<h1>Permission denied</h1>\n".
  "<p>You need to be logged in as administrator to access this data.</p>\n".
  "<p><a href=\"admin\">Click here for login form</a></p>\n".
  "</div>\n";
  cmPrintPageFooter();
  exit;
}

stSetupCacheControl();

// Initiate SQL database connection
if (!stConnectSQLDB())
  die("Could not connect to SQL database.");

// Fetch non-"hardcoded" settings from SQL database
stReloadSettings();

cmPrintPageHeader("SHOW DISPLAY", "", FALSE);
?>
<script type="text/javascript">
// <? echo "\n"; include "ajax.js"; ?>

</script>
<div id="contents">
<noscript>
<div class="notice">
<h1>Javascript required</h1>
<p>
The compo system page requires Javascript to be enabled for the AJAX functionality.
<br />
<a href="#">Please enable Javascript and reload this page</a>.
</p>
</div>
</noscript>
</div>
<script type="text/javascript">
</script>
<?
cmPrintPageFooter(FALSE);
?>