programLink = '-'; $config->productLink = '-'; $config->projectLink = '-'; $config->executionLink = '-'; $config->systemMode = ''; $config->URAndSR = ''; $config->systemScore = ''; include $baseDir . '/config/config.php'; $lang = new stdclass(); $lang->productCommon = ''; $lang->projectCommon = ''; $lang->storyCommon = ''; $lang->SRCommon = ''; $lang->URCommon = ''; $lang->productCommon = ''; $lang->executionCommon = ''; include $baseDir . '/module/common/lang/zh-cn.php'; $langs = array_keys($config->langs); $themes = array_keys($lang->themes); /* Create css files for every them and every lang. */ $zuiCode = str_replace(array('/*!', '../fonts'), array('/*', '../zui/fonts'), file_get_contents($themeRoot . 'zui/css/min.css')); $zuiCode .= "\n" . str_replace('/*!', '/*', file_get_contents($jsRoot . 'zui/picker/zui.picker.min.css')) . "\n"; foreach($langs as $lang) { foreach($themes as $theme) { /* Common css files. */ $cssCode = $zuiCode; $cssCode .= file_get_contents($themeRoot . 'default/style.css'); /* Css file for current lang and current them. */ if(file_exists($themeRoot . "lang/$lang.css")) $cssCode .= file_get_contents($themeRoot . "lang/$lang.css"); if($theme != 'default') { $themCode = file_get_contents($themeRoot . $theme . '/style.css'); $cssCode .= str_replace('./images', "../$theme/images", $themCode); } /* Combine them. */ $cssFile = $themeRoot . "default/$lang.$theme.css"; file_put_contents($cssFile, $cssCode); /* Compress it. */ `java -jar ~/bin/yuicompressor/build/yuicompressor.jar --type css $cssFile -o $cssFile`; } }