示例#1
0
文件: tableinfo.php 项目: broozer/psa
                $uniq = 'N';
            }
            $drop = new Link();
            $drop->setHref('controller.php?cmd=drop_idx&idxname=' . $item->name . '&table=' . $req->get('table'));
            $drop->setName('[ drop ]');
            $drop->setJs(' onclick="return PSA.really_drop(\' index [' . $item->name . ']\');" ');
            $tr = new Tr();
            if ($odd) {
                $tr->setGlobalClass('even');
                $odd = FALSE;
            } else {
                $tr->setGlobalClass('odd');
                $odd = TRUE;
            }
            $tr->add($item->name);
            $tr->setClas('center');
            $tr->add($uniq);
            $q = "PRAGMA index_info(" . $item->name . ")";
            $sql->qo($q);
            $rescol = $sql->fo();
            $list = '';
            foreach ($rescol as $itcol) {
                $list = $list . $itcol->name . ' ,';
            }
            $tr->add(substr($list, 0, -2));
            $tr->add($drop->dump());
            $tr->build();
        }
        unset($table);
    }
} else {
示例#2
0
文件: schema_db.php 项目: broozer/psa
            if ($item_fields->pk == 0) {
                $name = $item_fields->name;
            } else {
                $name = $item_fields->name . ' <span class="red">(PK)</span>';
                $nn = '-';
            }
            $tr = new Tr();
            if ($odd) {
                $tr->setGlobalClass('even');
                $odd = FALSE;
            } else {
                $tr->setGlobalClass('odd');
                $odd = TRUE;
            }
            $tr->add($name);
            $tr->add($type);
            $tr->setClas('rechts');
            $tr->add($size);
            $tr->setClas('center');
            $tr->add($nn);
            $tr->add($dflt);
            $tr->build();
        }
        unset($table);
        $body->line('</div>');
    }
}
$body->line('</div>');
include_once './inc/footer.php';
unset($body);
unset($html);