public function hentProvestatistikk($hundId, $brukerEpost, $brukerPassord, $klubbId) { if (ValiderBruker::validerBrukerRettighet($this->database, $brukerEpost, $brukerPassord, $klubbId, "lese")) { $hd = new JaktproveDatabase(); $tmp = new AmfProvestatistikk(); //klasser $tmp->starterUK = $hd->hentStarterHundKlasse($hundId, '1', $klubbId); $tmp->starterAK = $hd->hentStarterHundKlasse($hundId, '2', $klubbId); $tmp->starterAK += $hd->hentStarterHundKlasse($hundId, '3', $klubbId); $tmp->starterVK = $hd->hentStarterHundKlasse($hundId, '4', $klubbId); $tmp->starterVK += $hd->hentStarterHundKlasse($hundId, '5', $klubbId); $tmp->starterVK += $hd->hentStarterHundKlasse($hundId, '6', $klubbId); $tmp->starterDERBY = $hd->hentStarterHundKlasse($hundId, '7', $klubbId); $tmp->starterDERBY += $hd->hentStarterHundKlasse($hundId, '8', $klubbId); $tmp->starterDERBY += $hd->hentStarterHundKlasse($hundId, '9', $klubbId); $tmp->starterDERBY += $hd->hentStarterHundKlasse($hundId, '10', $klubbId); $tmp->starterDERBY += $hd->hentStarterHundKlasse($hundId, '11', $klubbId); //premier $tmp->premierUK = $hd->hentPremierHundKlasse($hundId, '1', $klubbId); $tmp->premierAK = $hd->hentPremierHundKlasse($hundId, '2', $klubbId); $tmp->premierAK += $hd->hentPremierHundKlasse($hundId, '3', $klubbId); $tmp->premierVK = $hd->hentPremierHundKlasse($hundId, '4', $klubbId); $tmp->premierVK += $hd->hentPremierHundKlasse($hundId, '5', $klubbId); $tmp->premierVK += $hd->hentPremierHundKlasse($hundId, '6', $klubbId); $tmp->premierDERBY = $hd->hentPremierHundKlasse($hundId, '7', $klubbId); $tmp->premierDERBY += $hd->hentPremierHundKlasse($hundId, '8', $klubbId); $tmp->premierDERBY += $hd->hentPremierHundKlasse($hundId, '9', $klubbId); $tmp->premierDERBY += $hd->hentPremierHundKlasse($hundId, '10', $klubbId); $tmp->premierDERBY += $hd->hentPremierHundKlasse($hundId, '11', $klubbId); //premieprosent $tmp->prosentUK = $this->premieringProsentStarter($tmp->premierUK, $tmp->starterUK); $tmp->prosentAK = $this->premieringProsentStarter($tmp->premierAK, $tmp->starterAK); $tmp->prosentVK = $this->premieringProsentStarter($tmp->premierVK, $tmp->starterVK); $tmp->prosentDERBY = $this->premieringProsentStarter($tmp->premierDERBY, $tmp->starterDERBY); //totalt $tmp->starterTotalt = $hd->hentStarterHund($hundId, $klubbId); $tmp->premierTotalt = $hd->hentPremierHund($hundId, $klubbId); $tmp->prosentTotalt = $this->premieringProsentStarter($tmp->premierTotalt, $tmp->starterTotalt); $ret[] = $tmp; return $ret; } $feilkode = 1; throw new Exception('Du har ikke denne rettigheten', $feilkode); }