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; }
if (is_dir($dirstr)) { $filearr = dreaddir($dirstr, array('jpg', 'jpeg', 'gif', 'png')); if (!empty($filearr)) { if (is_file($dirstr . '/categories.txt')) { $catfile = @file($dirstr . '/categories.txt'); $dirarr[$key][0] = trim($catfile[0]); } else { $dirarr[$key][0] = trim($value); } $dirarr[$key][1] = trim('static/image/foreground/' . $value . '/'); $dirarr[$key][2] = $filearr; } } } } elseif ($isdoodle) { $filearr = dreaddir(DISCUZ_ROOT . './static/image/doodle/big', array('jpg', 'jpeg', 'gif', 'png')); } } $feedurl = urlencode(getsiteurl() . 'home.php?mod=misc&ac=swfupload&op=finish&random=' . random(8) . '&albumid='); $albumurl = urlencode(getsiteurl() . 'home.php?mod=space&do=album' . ($isdoodle ? '&picid=' : '&id=')); $max = 0; if (!empty($_G['group']['maximagesize'])) { $max = intval($_G['group']['maximagesize']); } else { $max = @ini_get(upload_max_filesize); $unit = strtolower(substr($max, -1, 1)); if ($unit == 'k') { $max = intval($max) * 1024; } elseif ($unit == 'm') { $max = intval($max) * 1024 * 1024; } elseif ($unit == 'g') {