new graph
This commit is contained in:
parent
1acc2498c9
commit
292d2e7a9e
@ -54,4 +54,7 @@ class api_uvote extends \SYSTEM\API\api_login {
|
||||
|
||||
public static function call_graph_bt_to_uvote_overall_by_time($timespan = 84600){
|
||||
return votes::get_graph_bt_to_uvote_overall_by_time($timespan);}
|
||||
|
||||
public static function call_graph_bt_to_user_overall_by_time($timespan = 84600){
|
||||
return votes::get_graph_bt_to_user_overall_by_time($timespan);}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ class votes {
|
||||
|
||||
public static function get_graph_bt_to_user_overall_by_time ($timespan = 84600,$returnasjson = true){
|
||||
$result = array();
|
||||
$res = \DBD\UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME::QQ(array($timespan, \SYSTEM\SECURITY\Security::getUser()->id));
|
||||
$res = \DBD\UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME::QQ(array($timespan, \SYSTEM\SECURITY\Security::getUser()->id, \SYSTEM\SECURITY\Security::getUser()->id));
|
||||
while ($row = $res->next()){
|
||||
$result[] = array( 0 => $row['day'],
|
||||
'class_match' => $row['class_match'] / ($row['class_match']+$row['class_mismatch']+1),
|
||||
|
||||
@ -14,6 +14,6 @@ class UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME extends \SYSTEM\DB\QP {
|
||||
FROM uvote_data as a
|
||||
LEFT JOIN (Select choice, poll_ID FROM uvote_data WHERE user_ID = ? GROUP BY choice LIMIT 1) b ON a.poll_ID = b.poll_ID
|
||||
LEFT JOIN uvote_votes as c ON a.poll_ID = c.ID
|
||||
WHERE bt_choice
|
||||
WHERE bt_choice AND user_ID = ?
|
||||
GROUP BY day;'
|
||||
);}}
|
||||
|
||||
@ -22,7 +22,8 @@
|
||||
<div style="margin-left: 40px; float: right;">
|
||||
${user_overall_votes}
|
||||
</div>
|
||||
<div id="graph_bt_user_overall" style=""></div>
|
||||
<div style=" clear: both"></div>
|
||||
<div id="graph_bt_user_overall" style="float: left"></div>
|
||||
<script type="text/javascript" language="JavaScript">load_visualisation_urvote('graph_bt_user_overall',84600);</script>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user