Mercurial > hg > lukkari
changeset 137:657b0b7bf409
More merging with mobile version.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 27 Aug 2014 20:40:46 +0300 |
parents | 48c3012c89d7 |
children | 01c3784d3a90 |
files | index.php |
diffstat | 1 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/index.php Wed Aug 27 20:34:35 2014 +0300 +++ b/index.php Wed Aug 27 20:40:46 2014 +0300 @@ -6,14 +6,14 @@ // // Include framework require "mcommon.inc.php"; -$pageVersion = "2.3"; // Default settings +$pageVersion = "2.3"; +$mobileMode = FALSE; $baseURI = "http://example.com/"; $pageLanguages = array("fi", "en"); $pageCSSData = array("cookie" => "lukcss", "prefix" => "luk"); -$pageCSSAlts = array("blue" => "1", "old" => "2", "purple" => "3", "dark" => "4"); $classDefaultID = "DEFAULT"; $classIDFile = "classes.txt"; @@ -153,7 +153,7 @@ function lukMatchCourse($id) { - global $cache, $cacheDirty, $pageCharset, $pageLang; + global $cache, $cacheDirty, $pageCharset, $pageLang, $mobileMode; $uri = "http://www.oamk.fi/opiskelijalle/rakenne/opinto-opas/koulutusohjelmat/?sivu=oj&kieli=".strtoupper($pageLang)."&koodi1=".$id; @@ -180,8 +180,16 @@ if (isset($cache[$id]) && isset($cache[$id][$pageLang])) { - return "<a target=\"_blank\" title=\"".chentities($id." - ".$cache[$id][$pageLang]["op"]." op"). - "\" href=\"".chentities($uri)."\">".chentities($cache[$id][$pageLang]["desc"])."</a>"; + if ($mobileMode) + { + return "<b>".chentities($cache[$id][$pageLang]["desc"])."</b>"; + } + else + { + return + "<a target=\"_blank\" title=\"".chentities($id." - ".$cache[$id][$pageLang]["op"]." op"). + "\" href=\"".chentities($uri)."\">".chentities($cache[$id][$pageLang]["desc"])."</a>"; + } } else return chentities($id); @@ -393,7 +401,6 @@ // Check if we are using mobile mode -$mobileMode = FALSE; /* if (isset($_GET["m"])) {