Пример #1
0
 protected function viewtodb($data)
 {
     $info = $data['info'];
     $gain = $data['gain'];
     $adjust_common = $data['adjust_common'];
     $adjust_list = $data['adjust_list'];
     $adjust_cheating = $data['adjust_cheating'];
     $total = $info + $gain + $adjust_common + $adjust_list + $adjust_cheating;
     $gain += $info;
     $adjust_common += $gain;
     $adjust_list += $adjust_common;
     $adjust_cheating += $adjust_list;
     $info /= $total;
     $gain /= $total;
     $adjust_common /= $total;
     $adjust_list /= $total;
     $adjust_cheating /= $total;
     Variables::set('tasktype_prob_info', number_format($info, 3));
     Variables::set('tasktype_prob_gain', number_format($gain, 3));
     Variables::set('tasktype_prob_adjust_common', number_format($adjust_common, 3));
     Variables::set('tasktype_prob_adjust_list', number_format($adjust_list, 3));
     Variables::set('tasktype_prob_cheating', number_format($adjust_cheating, 3));
 }