コード例 #1
0
ファイル: update.php プロジェクト: prashant-dhiru/face-mash
    }
    function cal_k()
    {
        if ($this->gender === "boys") {
            $this->k = 533;
        } else {
            $this->k = 417;
        }
    }
}
$win = new pics();
$lose = new pics();
$win->gender = $_REQUEST["gender"];
$lose->gender = $_REQUEST["gender"];
$win->cal_k();
$lose->cal_k();
$win->id = intval($_REQUEST["win"]);
$lose->id = intval($_REQUEST["lose"]);
$win->get_rate($conn);
$lose->get_rate($conn);
$win->get_expect($lose->rate);
$lose->get_expect($win->rate);
$win->weight = 1;
$lose->weight = 0;
$win->new_rate($conn);
$lose->new_rate($conn);
echo $win->k . "<br>";
echo $win->gender . "<br>";
echo $win->rate . "<br>";
echo $win->weight . "<br>";
echo $win->exp;