Example #1
0
</label>
                        </li>
                        <?php 
        foreach ($mv['sonmenu'] as $mz => $mv) {
            ?>
                        	<li><input type="checkbox" value="<?php 
            echo $mv['level'];
            ?>
" id="<?php 
            echo "cbx_" . $mx . "_" . $my . "_" . $mz;
            ?>
" name="<?php 
            echo "cbx_" . $mx . "_" . $my . "_" . $mz;
            ?>
" <?php 
            if (checked_show($mv['level'], $levels)) {
                echo "checked";
            }
            ?>
><label for="<?php 
            echo "cbx_" . $mx . "_" . $my . "_" . $mz;
            ?>
"><?php 
            echo $mv['title'] . "<span style='color:white;'>-" . $mv['level'] . "</span>";
            ?>
</label></li>
                        <?php 
        }
        ?>
                    </ul>
                    <?php 
Example #2
0
function cate_list_for_level($tree = array(), $i = 0)
{
    global $c, $template, $levels;
    $i++;
    foreach ($tree as $k => $t) {
        $flag = '';
        for ($j = 1; $j < $i; $j++) {
            $flag .= '  ';
        }
        // 分类类型
        $ctype = '<font color=red>目录分类</font>';
        if ($c->cate_last($t['cate_id']) == 0) {
            $ctype = '<font color=#888>终极分类</font>';
        }
        if ($c->cate_last($t['cate_id']) == 0 && $t['cdata'] > 0) {
            $ctype = '<font color=green>文档分类</font>';
        }
        // 前缀图标
        if (count($t['son']) > 0) {
            $onclick = ' onclick="show_hidden(' . $t['cate_id'] . ',this)" style="cursor:pointer;" title="点击展开子分类"';
            $flag .= '<img src="' . $template . '/css/img/folder.png"' . $onclick . '> ';
        } else {
            $onclick = '';
            if ($ctype == '<font color=#888>终极分类</font>') {
                $flag .= '<img src="' . $template . '/css/img/file.png"> ';
            } else {
                $flag .= '<img src="' . $template . '/css/img/www_link.png"> ';
            }
        }
        $checked = checked_show($t['cate_id'], $levels) ? 'checked' : '';
        echo '<table class="tb tbcate"><tr>';
        echo '<td class="col1"><input class="corder" name="' . $t['cate_id'] . '" type="checkbox" id="' . $t['cate_id'] . '" value="' . $t['cate_id'] . '" ' . $checked . '></td>';
        echo '<td class="col2">' . $t['cate_id'] . '</td>';
        echo '<td class="col3">' . $c->externs[$t['extern_id']]['extern_title'] . '</td>';
        echo '<td class="col4"><div style="float:left">' . $flag . '<b style="color:#666;"><a href="info.php?state=0&cate_id=' . $t['cate_id'] . '">' . $t['cname'] . '</a></b> ' . $ctype . ' ' . ($t['nav_show'] == 1 ? '导航显示' : '') . ' <font color=#ccc>' . $t['cname_py'] . '</font> </div></td>';
        echo '<td class="col5">' . $t['tpl_index'] . '</td>';
        echo '<td class="col5">' . $t['tpl_listvar'] . '</td>';
        echo '<td class="col6">' . $t['tpl_content'] . '</td>';
        //echo('<td class="col7">' . $t['cdata'] . '</td>');
        echo '</tr></table>' . chr(10);
        if (is_array($t['son']) && count($t['son']) > 0) {
            echo chr(10) . '<div id="tbody_' . $t['cate_id'] . '" style="display:none;">' . chr(10);
            cate_list_for_level($t['son'], $i);
            echo chr(10) . '</div>' . chr(10);
        }
    }
}
Example #3
0
        }
        ?>
                    <?php 
    }
    ?>
                </li>
			</ul>
            <?php 
}
?>
            
            <div class="rank-list" id="level_list">
				<div class="stair-nav" style="border:0">
					<div class="rank-tit" style="line-height:24px;">
                        <input type="checkbox" value="Z" id="cate_6" name="cate_6" <?php 
if (checked_show('Z', $levels)) {
    echo "checked";
}
?>
><label class="parent-tit" for="cate_6"><b> 分类权限<span style='color:white;'>-Z</span></b></label>
                    </div>
                </div>
                <style>
                .col1{width:50px;}
                .col2{width:80px;}
                .col3{width:60px;}
                .col4{width:auto;text-align:left;}
                .col41{width:80px;overflow:hidden;}
                .col5{width:80px;overflow:hidden;}
                .col6{width:80px;overflow:hidden;}
                .col7{width:60px;}