<!-- Bootstrap -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
  <?php 
print_navigation_bar();
?>
  <?php 
$url = "https://students.mimuw.edu.pl/~ps347277/BD/api/game/match_history.php?id=" . $_GET['id'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$result = json_decode($response);
if (!isset($_GET['id']) || $result->status != 200) {
    header('Location: index.php');
}
?>
  <div class="container">
    <div class="panel panel-default">
      <div class="panel-heading">
Exemple #2
0
                echo "<a title=\"" . get_string("restore") . "\" href=\"" . $restoreurl . "\">\n<img" . " src=\"" . $OUTPUT->pix_url('t/restore') . "\" class=\"iconsmall\" alt=\"" . get_string("restore") . "\" /></a>\n ";
            }
            echo "</td>\n</tr>\n";
        }
        echo "<tr>\n<td colspan=\"4\" style=\"text-align:center\">\n";
        echo "<br />";
        echo "<input type=\"button\" onclick=\"checkall()\" value=\"{$strselectall}\" />\n";
        echo "<input type=\"button\" onclick=\"checknone()\" value=\"{$strdeselectall}\" />\n";
        // Select box should only show categories in which user has min capability to move course.
        echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
        echo html_writer::select($usercatlist, 'moveto', '', array('' => get_string('moveselectedcoursesto')), array('id' => 'movetoid', 'class' => 'autosubmit'));
        $PAGE->requires->yui_module('moodle-core-formautosubmit', 'M.core.init_formautosubmit', array(array('selectid' => 'movetoid', 'nothing' => false)));
        echo "</td>\n</tr>\n";
        echo "</table>\n</form>";
    }
    print_navigation_bar($totalcount, $page, $perpage, $encodedsearch, $modulelink);
} else {
    if (!empty($search)) {
        echo $OUTPUT->heading(get_string("nocoursesfound", '', s($search)));
    } else {
        echo $OUTPUT->heading($strnovalidcourses);
    }
}
echo "<br /><br />";
print_course_search($search);
echo $OUTPUT->footer();
/**
 * Print a list navigation bar
 * Display page numbers, and a link for displaying all entries
 * @param int $totalcount number of entry to display
 * @param int $page page number
Exemple #3
0
function print_date_results($numpage)
{
    print_numberof_results();
    print_navigation_bar($numpage);
    $feat_list = array('fil' => 'Filament', 'pro' => 'Prominence', 'ar' => 'Active region', 'sp' => 'Sun spot', 'ch' => 'Coronal hole', 't3' => 'Type III', 't2' => 'Type II', 'rs' => 'Radio source');
    $tab_date = array();
    foreach ($feat_list as $key => $feat_name) {
        $var_sess = 'date_' . $key;
        if (count($_SESSION[$var_sess]['DATE_OBS'])) {
            $tab_date = array_merge($tab_date, array_values(array_unique($_SESSION[$var_sess]['DATE_OBS'])));
        }
    }
    $tab_date = array_values(array_unique($tab_date));
    foreach ($tab_date as $dt) {
        $timestmp = strtotime($dt);
        $date_array = getdate($timestmp);
        if ($date_array['mon'] < 10) {
            $date_array['mon'] = '0' . $date_array['mon'];
        }
        if ($date_array['mday'] < 10) {
            $date_array['mday'] = '0' . $date_array['mday'];
        }
        $tab_short_date[] = $date_array['year'] . '-' . $date_array['mon'] . '-' . $date_array['mday'];
    }
    $tab_date = array_values(array_unique($tab_short_date));
    sort($tab_date);
    $nbpages = count($tab_date) / 10;
    $start_id = 10 * ($numpage - 1);
    $end_id = $start_id + 9;
    $nbdate = count($tab_date);
    if ($end_id >= $nbdate) {
        $end_id = $nbdate - 1;
    }
    if ($nbdate) {
        echo '<div id="tabs_results" class="bg-lightgray ui-corner-all">' . "\n";
        echo '<ul>' . "\n";
        $previous_date = "";
        for ($i = $start_id; $i <= $end_id; $i++) {
            $current_date = $tab_date[$i];
            if (strcmp($current_date, $previous_date)) {
                $lst_feat = implode(',', $_SESSION['par_post']['features']);
                $lst_map = implode(',', $_SESSION['par_post']['map_type']);
                $url_content = "print_tab_hours.php?date=" . $current_date . "&feat={$lst_feat}";
                if (strlen($lst_map)) {
                    $url_content = $url_content . "&map={$lst_map}";
                }
                echo '<li><a href="' . $url_content . '"><span>' . $current_date . '</span></a></li>' . "\n";
            }
            $previous_date = $current_date;
        }
        echo '</ul>' . "\n";
        //echo '</div></div>'."\n";
    }
    echo '</div>' . "\n";
    // end of tab_results
    echo "<BR>\n";
}