include ("$CFG->dirroot/theme/$CFG->theme/footer.html");
}
+function style_sheet_setup($lastmodified, $lifetime, $themename="") {
+
+ global $CFG;
+
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT");
+ header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT");
+ header("Cache-control: max_age = $lifetime");
+ header("Pragma: ");
+ header("Content-type: text/css"); // Correct MIME type
+
+ if (!empty($themename)) {
+ $CFG->theme = $themename;
+ }
+
+ return "$CFG->wwwroot/theme/$CFG->theme";
+
+}
+
function user_login_string($course, $user=NULL) {
global $USER, $CFG;
/// We use PHP so we can do value substitutions into the styles
+ $nomoodlecookie = true;
require_once("../../config.php");
-
- header("Content-type: text/css"); /// Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
- header("Content-type: text/css"); /// Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/* We use PHP so we can do value substitutions into the styles */
- require_once("../../config.php");
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/*
From here on it's nearly a normal stylesheet.
/// We use PHP so we can do value substitutions into the styles
+ $nomoodlecookie = true;
require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,
/// We use PHP so we can do value substitutions into the styles
- require_once("../../config.php");
-
- header("Content-type: text/css"); // Correct MIME type
-
- if (isset($themename)) {
- $CFG->theme = $themename;
- }
-
- $themeurl = "$CFG->wwwroot/theme/$CFG->theme";
+ $nomoodlecookie = true;
+ require_once("../../config.php");
+ $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
/// From here on it's nearly a normal stylesheet.
/// First are some CSS definitions for normal tags,