From: Harris Wong Date: Fri, 30 Sep 2011 15:18:37 +0000 (-0000) Subject: 861: Added flash detection code in vitals. X-Git-Tag: v1.2~17 X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=acontent.git;a=commitdiff_plain;h=076016df0928f2b4ba3ee0100ba2b2ce0d896b11 861: Added flash detection code in vitals. Add flash detection code in vitals, and have a flag in SESSION to indicate rather Flash is enabled on this browser or not. This variable is useful for multifile uploader in File Manager. --- diff --git a/docs/include/vitals.inc.php b/docs/include/vitals.inc.php index b252699..f7a7dd7 100644 --- a/docs/include/vitals.inc.php +++ b/docs/include/vitals.inc.php @@ -265,6 +265,72 @@ if ($_course_id > 0) /*** 10. register pages based on user's priviledge ***/ require_once(TR_INCLUDE_PATH.'page_constants.inc.php'); +/*~~~~~~~~~~~~~~~~~flash detection~~~~~~~~~~~~~~~~*/ +if(isset($_COOKIE["flash"])){ + $_SESSION['flash'] = $_COOKIE["flash"]; + + //delete the cookie + ATutor.setcookie("flash",'',time()-3600); +} + +if (!isset($_SESSION["flash"])) { + $_custom_head .= ' + +'; +} + + + +/*~~~~~~~~~~~~~~end flash detection~~~~~~~~~~~~~~~*/ + /** * This function is used for printing variables for debugging. * @access public