示例#1
0
文件: reset.php 项目: Simo22/smt2
<?php

// load base functions
require_once '../../../config.php';
// get prioritized sections
$prioritized = get_exts_order();
// and availabe sections too
$exts = ext_available();
$div = "";
foreach ($prioritized as $dirname => $priority) {
    // skip deleted sections (do not remove from DB)
    if (!in_array($dirname, $exts)) {
        continue;
    }
    $div .= '<div id="' . $dirname . '" class="groupItem">';
    $div .= ' <div class="itemHeader">' . filename_to_str($dirname) . '</div>';
    $div .= '</div>';
}
echo $div;
示例#2
0
文件: functions.php 项目: Simo22/smt2
/** 
 * Gives format to CMS sections. 
 * @return  string  Formatted output list (LI elements)
 */
function ext_format()
{
    if (!isset($_SESSION['allowed'])) {
        return false;
    }
    $current = ext_name();
    // check priority
    $prioritized = get_exts_order();
    // loop through available sections
    $list = "";
    foreach ($prioritized as $dir => $priority) {
        if (!in_array($dir, $_SESSION['allowed'])) {
            continue;
        }
        $css = $current == $dir ? ' class="current"' : null;
        $href = ADMIN_PATH . 'ext/' . $dir . '/';
        $list .= '<li' . $css . '><a href="' . $href . '">' . ucfirst(filename_to_str($dir)) . '</a></li>';
    }
    return $list;
}