本文整理汇总了PHP中Browser::SetOrdering方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::SetOrdering方法的具体用法?PHP Browser::SetOrdering怎么用?PHP Browser::SetOrdering使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser::SetOrdering方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bindings_to_us_browser
function bindings_to_us_browser()
{
global $c, $page_elements, $id, $editor;
$browser = new Browser(translate('Bindings to this Principal\'s Collections'));
$browser->AddColumn('bind_id', translate('ID'), '', '');
$browser->AddHidden('b.dav_owner_id');
$browser->AddHidden('p.principal_id');
$browser->AddColumn('dav_name', translate('Collection'), '', '<td style="white-space:nowrap;">%s</td>', 'c.dav_name');
$browser->AddColumn('bound_as', translate('Bound As'), '', '<td style="white-space:nowrap;">%s</td>', 'b.dav_name');
$browser->AddColumn('access_ticket_id', translate('Ticket ID'), '', '');
$browser->AddColumn('privs', translate('Privileges'), '', '', "privileges_list(privileges)");
$delurl = $c->base_url . '/admin.php?action=edit&t=principal&id=##principal_id##&bind_id=##bind_id##&subaction=delete_binding';
$browser->AddColumn('delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"{$delurl}\">" . translate('Delete') . "</a>'");
$browser->SetOrdering('target', 'A');
$browser->SetJoins('dav_binding b LEFT JOIN collection c ON (bound_source_id=collection_id) LEFT JOIN access_ticket t ON (ticket_id=access_ticket_id) LEFT JOIN principal p USING(user_no)');
$browser->SetWhere('p.principal_id = ' . intval($editor->Value('principal_id')));
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
$browser->DoQuery();
return $browser;
}
示例2: translate
$browser->AddColumn('delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"{$delurl}\">" . translate('Delete') . "</a>'");
$browser->SetOrdering('target', 'A');
$browser->SetJoins('access_ticket t LEFT JOIN collection c ON (target_collection_id=collection_id) LEFT JOIN caldav_data d ON (target_resource_id=dav_id)');
$browser->SetWhere('target_collection_id = ' . intval($editor->Value('collection_id')));
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
$browser->DoQuery();
$page_elements[] = $browser;
/**
bind_id | bigint | not null default nextval('dav_id_seq'::regclass)
bound_source_id | bigint |
access_ticket_id | text |
dav_owner_id | bigint | not null
parent_container | text | not null
dav_name | text | not null
dav_displayname | text |
*/
$browser = new Browser(translate('Bindings to this Collection'));
$browser->AddColumn('bind_id', translate('ID'), '', '');
$browser->AddHidden('b.dav_owner_id');
$browser->AddColumn('bound_as', translate('Bound As'), '', '<td style="white-space:nowrap;">%s</td>', 'b.dav_name');
$browser->AddColumn('access_ticket_id', translate('Ticket ID'), '', '');
$browser->AddColumn('privs', translate('Privileges'), '', '', "privileges_list(privileges)");
$delurl = $c->base_url . '/admin.php?action=edit&t=principal&id=##dav_owner_id##&bind_id=##URL:bind_id##&subaction=delete_binding';
$browser->AddColumn('delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"{$delurl}\">" . translate('Delete') . "</a>'");
$browser->SetOrdering('target', 'A');
$browser->SetJoins('dav_binding b LEFT JOIN collection c ON (bound_source_id=collection_id) LEFT JOIN access_ticket t ON (ticket_id=access_ticket_id)');
$browser->SetWhere('bound_source_id = ' . intval($editor->Value('collection_id')));
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
$browser->DoQuery();
$page_elements[] = $browser;
}
示例3: translate
case 3:
$browser->Title(translate('Group Principals'));
break;
}
}
$browser->AddColumn('principal_id', translate('ID'), 'right', '##principal_link##');
$browser->AddColumn('username', translate('Name'));
$rowurl = $c->base_url . '/admin.php?action=edit&t=principal&id=';
$browser->AddHidden('principal_link', "'<a href=\"{$rowurl}' || principal_id || '\">' || principal_id || '</a>'");
$browser->AddColumn('displayname', translate('Display Name'));
$browser->AddColumn('email', translate('EMail'));
$browser->AddColumn('member_of', translate('Is Member of'), '', '', 'is_member_of_list(principal_id)');
if (!isset($principal_type) || $principal_type == 3) {
$browser->AddColumn('members', translate('Has Members'), '', '', 'has_members_list(principal_id)');
}
$browser->SetOrdering('username', 'A');
$browser->SetJoins("dav_principal ");
if (isset($principal_active) && $principal_active == 'f') {
$browser->SetWhere('NOT user_active');
} else {
$browser->SetWhere('user_active');
}
if (isset($principal_type)) {
$browser->AndWhere('type_id = ' . $principal_type);
}
$c->page_title = $browser->Title();
if ($c->enable_row_linking) {
$browser->RowFormat('<tr onMouseover="LinkHref(this,1);" title="' . htmlspecialchars(translate('Click to display user details')) . '" class="r%d">', '</tr>', '#even');
} else {
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
}
示例4: Browser
<?php
param_to_global('external_active', '([tf])', 'active');
$browser = new Browser(translate('External Calendars'));
$browser->AddColumn('collection_id', translate('ID'), 'right', '##collection_link##');
$rowurl = $c->base_url . '/admin.php?action=edit&t=collection&id=';
$browser->AddHidden('collection_link', "'<a href=\"{$rowurl}' || collection_id || '\">' || collection_id || '</a>'");
$browser->AddColumn('dav_displayname', translate('Display Name'));
$browser->AddColumn('refs', translate('References'), 'right', '', '(select count(*) from dav_binding where bound_source_id=collection_id )');
$browser->SetOrdering('dav_displayname', 'A');
$browser->SetJoins("collection ");
$browser->SetWhere("parent_container='/.external/'");
$c->page_title = $browser->Title();
if ($c->enable_row_linking) {
$browser->RowFormat('<tr onMouseover="LinkHref(this,1);" title="' . htmlspecialchars(translate('Click to display user details')) . '" class="r%d">', '</tr>', '#even');
} else {
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
}
$page_elements[] = $browser;
$externalqry = new AwlQuery("SELECT count(*) as count from collection where parent_container='/.external/' and collection_id not in ( select bound_source_id from dav_binding where external_url is not null)");
$externalqry->Exec('external-bind-url');
$external = $externalqry->Fetch();
if ($external->count > 0) {
$link = '<a href="' . $c->base_url . '/admin.php?action=edit&t=external&subaction=clean" class="submit">' . translate("Remove dangling external calendars") . '(' . $external->count . ')</a>';
$c->stylesheets[] = 'css/edit.css';
$page_elements[] = $link;
}