Esempio n. 1
0
function getMark($id)
{
    global $db;
    $query_select = $db->query("SELECT * FROM catalog_marks WHERE `id`='{$id}'");
    $res = $db->fetch_assoc($query_select);
    if ($res["parent"] == 0) {
        $result[$res['id']] = $res;
    } else {
        $result = getMark($res["parent"]);
    }
    return $result;
}
    ?>
                                  </td>
                                  <?php 
    for ($i = 1; $i < mysql_num_rows($resultPlan); $i++) {
        $rsPlan = "rsPlan" . $i;
        ?>
                                  <td class="td_border_bottom_right"><?php 
        echo getMark(${$rsPlan}->{$arrFunctionField}[$f]);
        ?>
</td>
                                  <?php 
    }
    $rsPlan = "rsPlan" . $i;
    ?>
                                  <td class="td_border_bottom"><?php 
    echo getMark(${$rsPlan}->{$arrFunctionField}[$f]);
    ?>
</td>
                                </tr>
                                <tr>
                                  <td class="td_border_bottom_right">Subscription</td>
                                  <?php 
    for ($i = 1; $i < mysql_num_rows($resultPlan); $i++) {
        $rsPlan = "rsPlan" . $i;
        ?>
                                  <td valign="top" class="td_border_bottom_right"><span class="normal_text">
                                    <?php 
        if (${$rsPlan}->rate == 0) {
            echo "Free for limited period - Registration required.";
        } else {
            echo "N\$ " . number_format(${$rsPlan}->rate, 2, "-", "") . " per month for " . ${$rsPlan}->positions . " positions";
Esempio n. 3
0
        $user_name = $n_user;
    }
    $U[$user_cnt]->Add($row->num, strtotime($row->in_date) - $start_time, intval($row->result), $mark_base, $mark_per_problem, $mark_per_punish);
}
mysql_free_result($result);
usort($U, "s_cmp");
$rank = 1;
//echo "<style> td{font-size:14} </style>";
//echo "<title>Contest RankList -- $title</title>";
echo "<center><h3>Contest RankList -- {$title}</h3></center>";
echo "<table border=1><tr><td>Rank<td>User<td>Nick<td>Solved<td>Mark";
for ($i = 0; $i < $pid_cnt; $i++) {
    echo "<td>{$PID[$i]}";
}
echo "</tr>";
getMark($U, $mark_start, $mark_end, $mark_sigma);
for ($i = 0; $i < $user_cnt; $i++) {
    if ($i & 1) {
        echo "<tr class=oddrow align=center>";
    } else {
        echo "<tr class=evenrow align=center>";
    }
    echo "<td>{$rank}";
    $rank++;
    $uuid = $U[$i]->user_id;
    $usolved = $U[$i]->solved;
    echo "<td>{$uuid}";
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
        $U[$i]->nick = iconv("utf8", "gbk", $U[$i]->nick);
    }
    echo "<td>" . $U[$i]->nick . "";
Esempio n. 4
0
 if ($permissions["users"] == 'deny') {
     unset($TITLE["users"]);
 }
 $c['dir'] = basename(__DIR__);
 $TITLE['helpdesk/reports'] = "Отчёты";
 $c['sections'] = $TITLE;
 $categories = getCategories();
 $c["cat"] = $_cat = checkRequest("cat");
 if ($_cat) {
     $c['current_cat'] = getCategory($_cat);
 }
 //    if ($_cat) echo 1;
 $_cat_parent = "";
 $c["mark"] = $_mark = checkRequest("mark");
 if ($_mark) {
     $c['current_mark'] = getMark($_mark);
 }
 $c["group"] = $_group = checkRequest("group");
 if ($_group) {
     $c['current_group'] = getGroup($_group);
 }
 $_group_parent = "";
 $c["model"] = $_model = checkRequest("model");
 if ($_model) {
     $c['current_model'] = getModel($_model);
 }
 $c["modification"] = $_modification = checkRequest("modification");
 if (checkRequest("update_catalog") == true) {
     $xml = simplexml_load_file($_SERVER["DOCUMENT_ROOT"] . "/tools/autoru_catalog/catalog.xml");
     $all_categories = $xml->categories->rec;
     $all_marks = $xml->marks->rec;