Example #1
0
                    if ($value['uid'] != $_G['uid'] && $value['duid'] != $_G['uid']) {
                        batchupdatecredit('comment', $value['uid'], array(), -1);
                    }
                    C::t('home_doing')->update_replynum_by_doid(-1, $updo['doid']);
                }
            }
        } else {
            require_once libfile('function/delete');
            deletedoings(array($doid));
        }
        dheader('location: ' . dreferer());
        exit;
    }
} elseif ($_GET['op'] == 'getcomment') {
    include_once DISCUZ_ROOT . './source/class/lib/lib_tree.php';
    $tree = new lib_tree();
    $list = array();
    $highlight = 0;
    $count = 0;
    if (empty($_GET['close'])) {
        foreach (C::t('home_docomment')->fetch_all_by_doid($doid) as $value) {
            $tree->setNode($value['id'], $value['upid'], $value);
            $count++;
            if ($value['authorid'] == $space['uid']) {
                $highlight = $value['id'];
            }
        }
    }
    if ($count) {
        $values = $tree->getChilds();
        foreach ($values as $key => $vid) {
Example #2
0
            $pricount++;
        }
    }
}
if ($doid) {
    $dovalue = empty($dolist) ? array() : $dolist[0];
    if ($dovalue) {
        if ($dovalue['uid'] == $_G['uid']) {
            $actives = array('me' => ' class="a"');
        } else {
            $actives = array('all' => ' class="a"');
        }
    }
}
if ($doids) {
    $tree = new lib_tree();
    $values = array();
    foreach (C::t('home_docomment')->fetch_all_by_doid($doids) as $value) {
        $newdoids[$value['doid']] = $value['doid'];
        if (empty($value['upid'])) {
            $value['upid'] = "do{$value['doid']}";
        }
        $tree->setNode($value['id'], $value['upid'], $value);
    }
}
$showdoinglist = array();
foreach ($newdoids as $cdoid) {
    $values = $tree->getChilds("do{$cdoid}");
    $show = false;
    foreach ($values as $key => $id) {
        $one = $tree->getValue($id);