Ejemplo n.º 1
0
function display_project_stats()
{
    echo '<td><table width="100%" align="center" border="0">' . "\n";
    echo '<tr><td colspan="2"><p class="naglowek" align="center">Statystyki projektów:</p></td></tr>' . "\n";
    $projects = get_project_stats();
    $num_projects = count($projects);
    for ($i = 0; $i < $num_projects; ++$i) {
        echo '<tr><td colspan="2" align="center" class="naglowek_maly">Projekt ' . htmlspecialchars($projects[$i]['name']) . ':</td></tr>' . "\n";
        echo '<tr><td width="250" align="right"><b>OCP:</b></td>';
        echo '<td width="500" align="left">' . htmlspecialchars($projects[$i]['login']) . '</td></tr>' . "\n";
        echo '<tr><td width="250" align="right" valign="top"><b>Cz³onkowie OC:</b></td><td width="500" align="left">';
        if (empty($projects[$i]['oc'])) {
            echo '-';
        } else {
            foreach ($projects[$i]['oc'] as $oc_member) {
                echo htmlspecialchars($oc_member) . "<br>\n";
            }
        }
        echo '</td></tr>' . "\n" . '<tr><td colspan="2"><br></td></tr>';
    }
    echo '</td></tr></table>' . "\n</td>";
}
Ejemplo n.º 2
0
<?php

require_once '../lib/flip.php';
session_start();
check_valid_user();
if (!is_admin()) {
    display_warning('Musisz mieæ uprawnienia administratora!');
    exit;
}
$readable_start = make_date($_POST['start']);
$readable_end = make_date($_POST['end']);
if (!my_check_date($_POST['start']) || !my_check_date($_POST['end'])) {
    display_warning('Z³a data!');
    exit;
}
$stats = get_project_stats($_POST['projects'], $readable_start, $readable_end);
display_html_header();
display_document_header();
display_menu();
echo '<table width="90%">' . "\n";
echo '<tr><td align="center" class="naglowek">Statystyki projektów od ' . $readable_start . ' do ' . $readable_end . '<hr></td></tr>';
echo '<tr><td align="center"><table cellpadding="5" cellspacing="0" border="1" bgcolor="#fefffe"><tr>';
foreach (array('Projekt', 'Telefonów', 'Spotkañ', 'Ogó³em') as $label) {
    echo '<th>' . $label . '</th>';
}
echo '</tr>';
$suma_telefonow = 0;
$suma_spotkan = 0;
foreach ($stats as $project_id => $details) {
    $telefon = (int) $details['telefon'];
    $spotkanie = (int) $details['spotkanie'];