|
Last change
on this file was 3, checked in by george, 17 years ago |
|
Přidáno: Nastavení počtu zobrazených serverů na stránku a počtu nej serverů v konfiguračním souboru.
Opraveno: Pročištění použití stylů a vyřešení překrývání hlavního seznamu s pravým sloupcem u některých prohlížečů. Všechny informace o stylech musí být v souboru CSS a ne v HTML kódu.
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | <?php
|
|---|
| 2 | $tpl->output['th_name'] =$text['name'];
|
|---|
| 3 | $tpl->output['th_num_of_comments'] = $text['info_num_of_comments'];
|
|---|
| 4 | $tpl->output['th_num_of_servers'] = $text['info_num_of_servers'];
|
|---|
| 5 | $tpl->output['users'] = $text['users'];
|
|---|
| 6 | /*$tpl->output['order_by'] = $text['order_by'];
|
|---|
| 7 |
|
|---|
| 8 | $order_index = (int) $_GET['order'];
|
|---|
| 9 | switch ($order_index)
|
|---|
| 10 | {
|
|---|
| 11 | case 0: $order = ' order by `name` asc '; break;
|
|---|
| 12 | case 1: $order = ' order by `s` desc '; break;
|
|---|
| 13 | case 2: $order = ' order by `c` desc '; break;
|
|---|
| 14 | }
|
|---|
| 15 | $tpl->output['s0'] = '';
|
|---|
| 16 | $tpl->output['s1'] = '';
|
|---|
| 17 | $tpl->output['s2'] = '';
|
|---|
| 18 | if (empty($order_index))
|
|---|
| 19 | {
|
|---|
| 20 | $tpl->output['s0'] = 'SELECTED';
|
|---|
| 21 | }
|
|---|
| 22 | else
|
|---|
| 23 | {
|
|---|
| 24 | $tpl->output['s'.$order_index] = 'SELECTED';
|
|---|
| 25 | }
|
|---|
| 26 | */
|
|---|
| 27 | $sql = 'select `name`, `id` from `users`';
|
|---|
| 28 | $pa = new CleverPager($sql, 'p');
|
|---|
| 29 | $pa->PageSize = 20;
|
|---|
| 30 | $pa->CountCommand = 'select count(*) as Count from `users`';
|
|---|
| 31 | $pa->PageLinksDisplayed = 5;
|
|---|
| 32 | $pa->DataBind();
|
|---|
| 33 | $tpl->output['data'] = '';
|
|---|
| 34 | while ($row = $pa->GetOne())
|
|---|
| 35 | {
|
|---|
| 36 | $tpl->output['data'].='<tr><td align="left">'.print_nick($row['id']).'</td><td align="center">'.$db->query_result('select count(*) as pocet from servers where owner='.$row['id']).'</td><td align="center">'.$db->query_result('select count(*) as pocet from comments where author='.$row['id']).'</td></tr>';
|
|---|
| 37 | }
|
|---|
| 38 | ob_start();
|
|---|
| 39 | $pa->DrawPager();
|
|---|
| 40 | $tpl->output['pager'] = ob_get_contents();
|
|---|
| 41 | ob_clean();
|
|---|
| 42 | ?>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.