Ejemplo n.º 1
0
display_document_header();
display_menu();
echo '<table width="90%">' . "\n";
echo '<tr><td align="center" class="naglowek">Dane organizacji <i>' . htmlspecialchars(stripslashes(get_org_name($_GET['org_id']))) . '</i>';
if (is_responsible($_SESSION['valid_user_id'], $_GET['org_id']) || is_admin()) {
    echo '&nbsp;&nbsp;&nbsp;[<a href="../add/add_org_info_form.php?org_id=' . $_GET['org_id'] . '" class="menu">Edytuj</a>]';
}
echo "<hr></td></tr>\n";
$org_info = get_org_info($_GET['org_id']);
echo '<tr><td>';
if (!$org_info) {
    echo 'Brak danych o organizacji.</td></tr>';
} else {
    echo '<table align="center">';
    $content = array('Adres' => htmlspecialchars($org_info['city'] . ', ' . $org_info['street']), 'Telefon' => htmlspecialchars(parse_phone_number($org_info['phone'])), 'Fax' => htmlspecialchars(parse_phone_number($org_info['fax'])), 'WWW' => strpos($org_info['www'], '.') === false ? '-' : '<a href="' . htmlspecialchars($org_info['www']) . '" target="_blank" class="menu">' . htmlspecialchars($org_info['www']) . '</a>', 'Profil dzia³alno¶ci' => htmlspecialchars($org_info['profile']), 'Data ostatniej aktualizacji' => $org_info['date']);
    $contact_person = get_contact_person($_GET['org_id']);
    if ($contact_person !== false && !empty($contact_person)) {
        $content['Osoba kontaktowa'] = htmlspecialchars($contact_person);
    }
    foreach ($content as $label => $value) {
        echo '<tr><td width="50%" align="right"><b>' . $label . ':</b></td><td width="50%" align="left">';
        echo $value;
        echo "</td></tr>\n";
    }
    echo '<tr><td width="50%" align="right"><b>Osoba aktualizuj±ca dane:</b></td><td>';
    display_link_to_user($org_info['updater_id']);
    echo "</td></tr>\n";
    echo "</table></td></tr>\n";
}
echo "</table>\n<br><br><br><br>";
$contacts = get_contacts('organisation_id', $_GET['org_id']);
Ejemplo n.º 2
0
function display_link_to_org($org_id, $add = false, $project_id = false)
{
    $class = 'org_otwarta';
    $href = get_www_root() . 'show/show_org.php?org_id=' . $org_id;
    $org_info = get_org_info($org_id);
    $title = 'Adres: ' . (empty($org_info['street']) || empty($org_info['city']) ? '-' : htmlspecialchars($org_info['city'] . ', ' . $org_info['street'])) . "\nTelefon: " . htmlspecialchars(parse_phone_number($org_info['phone'])) . "\nOsoba kontaktowana: " . htmlspecialchars(get_contact_person($org_id));
    if ($add) {
        if (empty_org($org_id)) {
            $class = 'org_nowa';
            $href = get_www_root() . 'add/add_org_info_form.php?org_id=' . $org_id . '&project_id=' . $project_id;
            $title = 'Uzupe³nij dane o organizacji';
        } elseif (!org_is_contacted($org_id, $_SESSION['valid_user_id'], $project_id)) {
            $class = 'org_nowa';
        }
    }
    ?>
	<a href="<?php 
    echo $href;
    ?>
" class="<?php 
    echo $class;
    ?>
" title="<?php 
    echo $title;
    ?>
"><?php 
    echo htmlspecialchars(stripslashes(get_org_name($org_id)));
    ?>
</a><?php 
}