u-vote.eu/uvote/api/votes/switchers.php
Naeltard 14d3de26a7 new api for analysis
reloadable complete for analysis
2015-10-20 12:57:33 +02:00

102 lines
2.7 KiB
PHP

<?php
class switchers{
public static function get_party_per_poll($choice){
switch($choice){
case 1:
return 'pro';
case 2:
return 'con';
case 3:
return 'ent';
default:
return 'none';
}
}
public static function tablerow_class($choice){
switch($choice){
case 1:
return 'pro';
case 2:
return 'con';
case 3:
return 'ent';
default:
return 'open';
}
}
public static function tablerow_class_full($choice){
switch($choice){
case 1:
return 'pro';
case 2:
return 'contra';
case 3:
return 'enthaltung';
default:
return '';
}
}
public static function badge_class($choice){
switch($choice){
case 1:
return 'badge-success';
case 2:
return 'badge-danger';
case 3:
return 'badge-info';
default:
return '';
}
}
public static function panel_class($choice){
switch($choice){
case 1:
return 'panel-success';
case 2:
return 'panel-danger';
case 3:
return 'panel-info';
default:
return 'panel-default';
}
}
public static function bar_class($choice){
switch($choice){
case 1:
return 'progress-bar-success';
case 2:
return 'progress-bar-danger';
case 3:
return 'progress-bar-info';
case 0:
return 'progress-bar';
}
}
public static function bar_ico_class($choice){
switch($choice){
case 1:
$bar = 'progress-bar-success';
$icon_type = 'pro';
break;
case 2:
$bar = 'progress-bar-danger';
$icon_type = 'con';
break;
case 3:
$bar = 'progress-bar-info';
$icon_type = 'ent';
break;
case 0:
$bar = 'progress-bar';
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/