<style type="text/css">
    .widefat tbody th.check-column{padding-bottom:2px;}.inline-edit-row .error{color:red;}
</style>
<?php 
$_catalogs = xt_catalogs_album(true);
?>
<div id="col-container" style="padding-top: 20px;">
    <div id="col-right">
        <table class="wp-list-table widefat fixed catalogs" cellspacing="0">
            <thead>
                <tr>
                    <th class="manage-column" style="width:50px"><span>编号</span></th>
                    <th class="manage-column"><span>名称</span></th>
                    <th class="manage-column" style="width:100px"><span>类型</span></th>
                    <th class="manage-column" style="width:100px"><span>排序</span></th>
                    <th class="manage-column" style="width:100px"><span>专辑</span></th>
                </tr>
            </thead>

            <tfoot>
                <tr>
                    <th class="manage-column" style="width:50px"><span>编号</span></th>
                    <th class="manage-column"><span>名称</span></th>
                    <th class="manage-column" style="width:100px"><span>类型</span></th>
                    <th class="manage-column" style="width:100px"><span>排序</span></th>
                    <th class="manage-column" style="width:100px"><span>专辑</span></th>
                </tr>
            </tfoot>
            <tbody id="the-list" class="list:catalog">
                <?php 
$_cat_count = 0;
Example #2
0
function xt_admin_ajax_catalog_delete()
{
    $result = array('code' => 0, 'msg' => '', 'result' => array());
    if (!current_user_can('manage_options')) {
        $result['code'] = 500;
        $result['msg'] = '您无权操作此功能';
    }
    if (!isset($_POST['ids']) || empty($_POST['ids'])) {
        $result['code'] = 500;
        $result['msg'] = '未指定分类';
    }
    $ids = trim($_POST['ids']);
    $type = trim($_POST['type']);
    if ($result['code'] == 0) {
        xt_catalog_delete($ids);
        if ($type == 'share') {
            xt_catalogs_share(true);
            //FORCE
        } elseif ($type == 'album') {
            xt_catalogs_album(true);
            //FORCE
        }
    }
    exit(json_encode($result));
}
Example #3
0
function xt_catalogs_album_sub($cid)
{
    $_catalogs = xt_catalogs_album();
    if ($cid == 0) {
        $result = array();
        foreach ($_catalogs as $_cat) {
            $result[] = $_cat;
        }
        return $result;
    } else {
        foreach ($_catalogs as $_cat) {
            if ($_cat->id == $cid) {
                if (isset($_cat->child)) {
                    $_child = $_cat->child;
                    return isset($_child['catalogs']) ? $_child['catalogs'] : array();
                }
            }
        }
    }
    return array();
}