} updatetable('spacefield', $setarr, array('uid' => $_SGLOBAL['supe_uid'])); showmessage('do_success', 'space.php', 0); } elseif ($op == 'diy') { //自定义 } else { //模板列表 $themes = array(array('dir' => 'uchomedefault', 'name' => cplang('the_default_style'), 'pic' => 'image/theme_default.jpg')); $themes[] = array('dir' => 'uchomediy', 'name' => cplang('the_diy_style'), 'pic' => 'image/theme_diy.jpg'); //获取本地风格目录 $themedirs = sreaddir(S_ROOT . './theme'); foreach ($themedirs as $key => $dirname) { //样式文件和图片需存在 $now_dir = S_ROOT . './theme/' . $dirname; if (file_exists($now_dir . '/style.css') && file_exists($now_dir . '/preview.jpg')) { $themes[] = array('dir' => $dirname, 'name' => getcssname($dirname)); } } //时区 $toselect = array($space['timeoffset'] => ' selected'); } $actives = array('theme' => ' class="active"'); include_once template("cp_theme"); //获取系统风格名 function getcssname($dirname) { $css = sreadfile(S_ROOT . './theme/' . $dirname . '/style.css'); if ($css) { preg_match("/\\[name\\](.+?)\\[\\/name\\]/i", $css, $mathes); if (!empty($mathes[1])) { $name = shtmlspecialchars($mathes[1]);
function gettheme($type) { $themes = array(); $themedirs = dreaddir(DISCUZ_ROOT . "/static/{$type}"); foreach ($themedirs as $key => $dirname) { $now_dir = DISCUZ_ROOT . "/static/{$type}/{$dirname}"; if (file_exists($now_dir . '/style.css') && file_exists($now_dir . '/preview.jpg')) { $themes[] = array('dir' => $type . '/' . $dirname, 'name' => getcssname($type . '/' . $dirname)); } } return $themes; }
//模板列表 $themes = array( array('dir'=>'uchomedefault', 'name'=>cplang('the_default_style'), 'pic'=>'image/theme_default.jpg') ); $themes[] = array('dir'=>'uchomediy', 'name'=>cplang('the_diy_style'), 'pic'=>'image/theme_diy.jpg'); //获取本地风格目录 $themedirs = sreaddir(S_ROOT.'./theme'); foreach ($themedirs as $key => $dirname) { //样式文件和图片需存在 $now_dir = S_ROOT.'./theme/'.$dirname; if(file_exists($now_dir.'/style.css') && file_exists($now_dir.'/preview.jpg')) { $themes[] = array( 'dir' => $dirname, 'name' => getcssname($dirname) ); } } //时区 $toselect = array($space['timeoffset'] => ' selected'); } $actives = array('theme'=>' class="active"'); include_once template("cp_theme"); //获取系统风格名 function getcssname($dirname) { $css = sreadfile(S_ROOT.'./theme/'.$dirname.'/style.css');