function userUpdateExcludeVisitsCookie() { global $_COOKIE; if (!isLoggedIn()) { return; } if (userExcludeMyVisits()) { if (!isset($_COOKIE['excludemyvisits'])) { $exclid = createSecureId(userId(), "excludeid"); setCookie("excludemyvisits", $exclid, 2147483647, "/"); } } else { if (isset($_COOKIE['excludemyvisits'])) { setCookie("excludemyvisits", "", time() - 3600 * 48, "/"); } } }
} Config("title", "LLOOGG - web 2.0 tail -f access.log"); include "header.php"; ?> <div id="uimain"> <p> Cut and paste the following code in every page of your site for wich you are interested in seeing accesses in real time. <strong>Important notes:</strong> <ul> <li>It's better to put the code just above the closing </body> tag.</li> <li>If you are using wordpress you can find the </body> tag is in the <strong>footer.php</strong> page.</li> </ul> <p> <?php $_js = "<script type=\"text/javascript\">\nlloogg_clientid = \"%%clientid%%\";\n</script>\n<script type=\"text/javascript\" src=\"%%urldomain%%/l.js?c=%%clientid%%\">\n</script>"; $_js = str_replace("%%clientid%%", createSecureId(userId(), "userid"), $_js); $_js = str_replace("%%urldomain%%", Config("urldomain"), $_js); ?> <textarea rows=4 cols=80 id="jscode"> <?php echo htmlentities($_js); ?> </textarea> <br/><br/> <input type="button" value="Select" onclick="$('jscode').select()"> <h3>Status</h3> <?php $r = redisLink(); $lastvisit = $r->lindex("last:" . userId(), -1); $statusok = false; if ($lastvisit) {