示例#1
0
function theme_list($items = array())
{
    $i = 0;
    $classes = array();
    $html = '<ul>';
    foreach ($items as $item) {
        $classes[] = fmod($i, 2) ? 'odd' : 'even';
        if ($i == 0) {
            $classes[] = 'first';
        }
        if ($i == count($items) - 1) {
            $classes[] = 'last';
        }
        $classes = implode(' ', $classes);
        $html .= '<li class="' . $classes . '">';
        if (is_array($item)) {
            $html .= theme_list($item);
        }
        $html .= $item;
        $html .= '</li>';
        $i++;
        $classes = array();
    }
    $html .= '</ul>';
    return $html;
}
示例#2
0
 function setup()
 {
     $this->smarty->assign('themes', theme_list());
     $this->smarty->assign('lang_list', lang_list());
     $static_list = array();
     foreach (static_getlist() as $id) {
         $static_list[$id] = static_parse($id);
     }
     $this->smarty->assign('static_list', $static_list);
 }
示例#3
0
 function theme_list()
 {
     global $fp_config;
     $list = theme_list();
     $info = array();
     foreach ($list as $thm) {
         // don't show current theme
         if ($fp_config['general']['theme'] == $thm) {
             continue;
         }
         $theme = array();
         $d = THEMES_DIR . $thm;
         $f = $d . '/theme.conf.php';
         if (!file_exists($f)) {
             continue;
         }
         $theme = admin_theme_data($d . '/theme.conf.php', $thm, $this->defprev);
         $info[] = $theme;
     }
     return $info;
 }