Examples Default theme
Examples
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table('standings'); $xcrud->columns('logo,team_id,played,won,drawn,lost,goals_for,goals_against,points'); $xcrud->label('team_id', 'Team')->relation('team_id', 'teams', 'team_id', 'team_name'); $xcrud->unset_add(); $xcrud->unset_edit(); $xcrud->unset_remove(); $xcrud->unset_view(); $xcrud->unset_search(); $xcrud->unset_limitlist(); $xcrud->limit(20); $xcrud->order_by("points","desc"); $xcrud->column_class('team_id','align-left font-bold'); $xcrud->highlight('points','>=','23','#9FD58C'); $xcrud->highlight('lost','=','0','#B3968B'); $xcrud->highlight('lost','=','1','#D2E3D9'); $xcrud->highlight_row('points','>=','26','#D5BEB5'); $xcrud->change_type('logo', 'image', false, array( 'width' => 450, 'path' => '../uploads/gallery', 'thumbs' => array(array( 'height' => 55, 'width' => 120, 'crop' => true, 'marker' => '_th')))); echo $xcrud->render(); ?>
Standings
Export into CSV Print
# | Logo | Team | Played | Won | Drawn | Lost | Goals For | Goals Against | ↓ Points |
---|---|---|---|---|---|---|---|---|---|
1 | Manchester City | 10 | 9 | 1 | 0 | 35 | 10 | 28 | |
2 | Liverpool | 10 | 9 | 1 | 0 | 30 | 8 | 28 | |
3 | Manchester United | 10 | 8 | 2 | 0 | 28 | 10 | 26 | |
4 | Chelsea | 10 | 8 | 1 | 1 | 25 | 10 | 25 | |
5 | Arsenal | 10 | 7 | 2 | 1 | 20 | 10 | 23 | |
6 | Tottenham Hotspur | 10 | 7 | 2 | 1 | 22 | 10 | 23 | |
7 | Aston Villa | 10 | 6 | 3 | 1 | 15 | 8 | 21 | |
8 | Everton | 10 | 6 | 2 | 2 | 20 | 15 | 20 | |
9 | Brentford | 10 | 5 | 4 | 1 | 18 | 12 | 19 | |
10 | Leicester City | 10 | 5 | 3 | 2 | 17 | 15 | 18 | |
11 | West Ham United | 10 | 5 | 3 | 2 | 15 | 10 | 18 | |
12 | Brighton & Hove Albion | 10 | 4 | 5 | 1 | 14 | 10 | 17 | |
13 | Leeds United | 10 | 4 | 4 | 2 | 15 | 12 | 16 | |
14 | Burnley | 10 | 3 | 6 | 1 | 12 | 8 | 15 | |
15 | Crystal Palace | 10 | 2 | 6 | 2 | 10 | 10 | 12 | |
16 | Southampton | 10 | 3 | 2 | 5 | 10 | 15 | 11 | |
17 | Newcastle United | 10 | 1 | 7 | 2 | 10 | 15 | 10 | |
18 | Norwich City | 10 | 2 | 4 | 4 | 8 | 12 | 10 | |
19 | Watford | 10 | 1 | 6 | 3 | 10 | 18 | 9 | |
20 | Wolverhampton Wanderers | 10 | 2 | 3 | 5 | 8 | 15 | 9 |
?>