header.lite.html.php 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}
  3. $clientLang = $app->getClientLang();
  4. $webRoot = $this->app->getWebRoot();
  5. $jsRoot = $webRoot . "js/";
  6. $themeRoot = $webRoot . "theme/";
  7. $defaultTheme = $webRoot . 'theme/default/';
  8. $langTheme = $themeRoot . 'lang/' . $clientLang . '.css';
  9. $clientTheme = $this->app->getClientTheme();
  10. $onlybody = zget($_GET, 'onlybody', 'no');
  11. $commonLang = array('zh-cn', 'zh-tw', 'en', 'fr', 'de');
  12. ?>
  13. <!DOCTYPE html>
  14. <html lang='<?php echo $clientLang;?>' class='theme-<?php echo $this->cookie->theme;?>'>
  15. <head>
  16. <meta charset='utf-8'>
  17. <meta http-equiv='X-UA-Compatible' content='IE=edge'>
  18. <meta name="viewport" content="width=device-width, initial-scale=1">
  19. <meta name="renderer" content="webkit">
  20. <?php
  21. echo html::title($title . ' - ' . $lang->zentaoPMS);
  22. js::exportConfigVars();
  23. if($config->debug)
  24. {
  25. $timestamp = time();
  26. css::import($themeRoot . 'zui/css/min.css?t=' . $timestamp);
  27. css::import($defaultTheme . 'style.css?t=' . $timestamp);
  28. css::import($langTheme);
  29. if(strpos($clientTheme, 'default') === false) css::import($clientTheme . 'style.css?t=' . $timestamp);
  30. js::import($jsRoot . 'jquery/lib.js');
  31. js::import($jsRoot . 'zui/min.js?t=' . $timestamp);
  32. if(!in_array($clientLang, $commonLang)) js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js?t=' . $timestamp);
  33. js::import($jsRoot . 'my.full.js?t=' . $timestamp);
  34. if(isset($config->zinTool)) js::import($jsRoot . 'zui3/zintool.js');
  35. }
  36. else
  37. {
  38. $minCssFile = $defaultTheme . $this->cookie->lang . '.' . $this->cookie->theme . '.css';
  39. if(!file_exists($this->app->getThemeRoot() . 'default/' . $this->cookie->lang . '.' . $this->cookie->theme . '.css')) $minCssFile = $defaultTheme . 'en.' . $this->cookie->theme . '.css';
  40. css::import($minCssFile);
  41. js::import($jsRoot . 'all.js');
  42. if(!in_array($clientLang, $commonLang)) js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js');
  43. }
  44. if($this->app->getViewType() == 'xhtml') css::import($defaultTheme . 'x.style.css');
  45. if($this->app->isServing() && commonModel::isTutorialMode())
  46. {
  47. $wizardModule = isset($_SESSION['wizardModule']) ? $_SESSION['wizardModule'] : $this->moduleName;
  48. $wizardMethod = isset($_SESSION['wizardMethod']) ? $_SESSION['wizardMethod'] : $this->methodName;
  49. $requiredFields = '';
  50. if(isset($config->$wizardModule->$wizardMethod->requiredFields)) $requiredFields = str_replace(' ', '', $config->$wizardModule->$wizardMethod->requiredFields);
  51. echo "<script>window.TUTORIAL = {'module': '$wizardModule', 'method': '$wizardMethod', tip: '$lang->tutorialConfirm'}; if(config) config.requiredFields = '$requiredFields'; $(function(){window.top.checkTutorialState && setTimeout(window.top.checkTutorialState, 500);});</script>";
  52. }
  53. if(isset($pageCSS)) css::internal($pageCSS);
  54. echo html::favicon($webRoot . 'favicon.ico');
  55. ?>
  56. <!--[if lt IE 10]>
  57. <?php js::import($jsRoot . 'jquery/placeholder/min.js'); ?>
  58. <![endif]-->
  59. <?php
  60. /* Load hook files for current page. */
  61. $extensionRoot = $this->app->getExtensionRoot();
  62. if($this->config->vision != 'open')
  63. {
  64. $extHookRule = $extensionRoot . $this->config->edition . '/common/ext/view/header.*.hook.php';
  65. $extHookFiles = glob($extHookRule);
  66. if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile;
  67. }
  68. if($this->config->vision == 'lite')
  69. {
  70. $extHookRule = $extensionRoot . $this->config->vision . '/common/ext/view/header.*.hook.php';
  71. $extHookFiles = glob($extHookRule);
  72. if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile;
  73. }
  74. $xuanExtFile = $extensionRoot . 'xuan/common/ext/view/header.xuanxuan.html.hook.php';
  75. if(file_exists($xuanExtFile)) include $xuanExtFile;
  76. ?>
  77. </head>
  78. <?php
  79. $bodyClass = $this->app->getViewType() == 'xhtml' ? 'allow-self-open' : '';
  80. if(isset($pageBodyClass)) $bodyClass = $bodyClass . ' ' . $pageBodyClass;
  81. if($this->app->moduleName == 'index' && $this->app->methodName == 'index') $bodyClass .= ' menu-' . ($this->cookie->hideMenu ? 'hide' : 'show');
  82. if(strpos($_SERVER['HTTP_USER_AGENT'], 'xuanxuan') !== false) $bodyClass .= ' xxc-embed';
  83. ?>
  84. <body class='<?php echo $bodyClass; ?>'>
  85. <?php if($this->app->getViewType() == 'xhtml'):?>
  86. <style>
  87. .main-actions-holder {display: none !important;}
  88. </style>
  89. <?php endif;?>