Mercurial > hg > fapweb
diff show.php @ 126:71c35d5302c2
More work on cleanups, and AJAX modularization.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Oct 2013 17:00:49 +0300 |
parents | f364b50e07f7 |
children | 0436079bcf46 |
line wrap: on
line diff
--- a/show.php Tue Oct 22 16:20:47 2013 +0300 +++ b/show.php Tue Oct 22 17:00:49 2013 +0300 @@ -2,30 +2,10 @@ // // 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; -} +require "majax.php"; stSetupCacheControl(); @@ -36,25 +16,43 @@ // Fetch non-"hardcoded" settings from SQL database stReloadSettings(); -cmPrintPageHeader("SHOW DISPLAY", "", FALSE); +cmPrintPageHeader("PARTY DISPLAY", "", FALSE); +stCommonAJAX("showajax.php", "show.php", TRUE); ?> -<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 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 class="showView" id="view1"></div> +<div class="showView" id="view2"></div> +<div class="showView" id="view3"></div> + </div> -</noscript> -</div> + +<!-- ========================== --> + <script type="text/javascript"> + +function tick() +{ + var nitem = document.getElementById("view1"); + nitem.innerHTML = "<div class=\"notice\">Hello!</div>"; +} + +//setTimeout("tick();", 100); + </script> <? cmPrintPageFooter(FALSE);