Exemplo n.º 1
0
                $value['icon'] = 'minus';
            }
            $value['id'] = 0;
            $value['layer'] = 0;
            $clist[] = $value;
        }
    }
    if ($_GET['icon'] == 'plus' && $value['replynum']) {
        $tree = new lib_tree();
        foreach (C::t('home_docomment')->fetch_all_by_doid($doid) as $value) {
            if (empty($value['upid'])) {
                $value['upid'] = "do";
            }
            $tree->setNode($value['id'], $value['upid'], $value);
        }
        $values = $tree->getChilds("do");
        foreach ($values as $key => $id) {
            $one = $tree->getValue($id);
            $one['layer'] = $tree->getLayer($id) * 2;
            $clist[] = $one;
        }
    }
} elseif ($op == 'deluserapp') {
    if (empty($_G['uid'])) {
        showmessage('no_privilege_guest');
    }
    $hash = trim($_GET['hash']);
    if (C::t('common_myinvite')->count_by_hash_touid($hash, $_G['uid'])) {
        C::t('common_myinvite')->delete_by_hash_touid($hash, $_G['uid']);
        showmessage('do_success');
    } else {
Exemplo n.º 2
0
 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) {
         $one = $tree->getValue($vid);
         $one['layer'] = $tree->getLayer($vid) * 2;
         $one['style'] = "padding-left:{$one['layer']}em;";
         if ($one['layer'] > 0) {
             if ($one['layer'] % 3 == 2) {
                 $one['class'] = ' dtls';
             } else {
                 $one['class'] = ' dtll';
             }
         }
         if ($one['id'] == $highlight && $one['uid'] == $space['uid']) {
             $one['style'] .= 'color:#F60;';
         }
         $list[] = $one;
Exemplo n.º 3
0
    }
}
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);
        $one['layer'] = $tree->getLayer($id) * 2 - 2;
        $one['style'] = "padding-left:{$one['layer']}em;";
        if ($_GET['highlight'] && $one['id'] == $_GET['highlight']) {
            $one['style'] .= 'color:#F60;';
        }
        if ($one['layer'] > 0) {
            if ($one['layer'] % 3 == 2) {
                $one['class'] = ' dtls';
            } else {
                $one['class'] = ' dtll';
            }
        }