aboutsummaryrefslogtreecommitdiffstats
path: root/toj/php/step.php
blob: 6425ae18c9480ab83758781522d9f58f8e2243ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
//ini_set("display_errors", "On");

require_once('common.inc.php');
require_once('step.inc.php');
require_once('teamt.php');

$sqlc = db_connect();
$msqlc = db_connect('toj_mod');

if(strlen($action)==0)
    die('Eno_action');
if($action == '')
{
}

$uid = $_GET['uid'];
$dat = get_prob_stat_uid($sqlc, $msqlc, 1, 2, $uid);

//var_dump($dat);
echo('uid : '.$dat->uid.'<br>');
foreach($dat->problem as $prob)
{
   echo('problem '.$prob->proid.' : ');
   if(!$prob->tries)
   {
       echo('--<br>');
       continue;
   }
   echo($prob->best_score.' ');
   if($prob->is_ac)echo('AC');
   echo('<br>');
}

$term = 1;
$teamid = get_teamid($msqlc, $term, $uid);
echo('<br>Team : '.$teamid.'<br>Members : <br>');
$members = get_team_member($msqlc, $term, $teamid);
foreach($members as $mem)
{
    echo('<br>Uid : '.$mem->uid.' ( Level '.$mem->level.' )<br>');
    $uid = intval($mem->uid);
    if($uid == intval($_GET['uid']))continue;
    $dat = get_prob_stat_uid($sqlc, $msqlc, 1, 2, $uid);

    foreach($dat->problem as $prob)
    {
        echo('problem '.$prob->proid.' : ');
        if(!$prob->tries)
        {
            echo('--<br>');
            continue;
        }
        echo($prob->best_score.' ');
        if($prob->is_ac)echo('AC');
        echo('<br>');
        }
}


db_close($sqlc);
db_close($msqlc);

?>