コード例 #1
0
ファイル: profil.php プロジェクト: Kuzat/kofradia
    $text = $_POST['preview'];
    $preview = true;
}
$html = game::format_data($text, "profile", $player);
echo '
<div class="p" id="profile_text">
	' . (empty($html) ? '<span class="dark">Mangler profiltekst.</span>' : $html) . '
</div>
<div class="clear"></div>';
if ($preview) {
    echo '
<p class="dark" style="border-top: 2px solid #1F1F1F; padding: 5px 2px"><b>Dette er en forhåndsvisning.</b></p>';
}
// sjekk for whatpulse
$wp = new whatpulse();
if ($wp->load_user($player->id) && $wp->update()) {
    // hent ut hvilke felt vi skal vise
    $fields = $wp->params->get("fields");
    if (empty($fields)) {
        $fields = array();
    } else {
        $fields = explode(",", $fields);
    }
    // har vi noe å vise?
    if (count($fields) > 0) {
        ess::$b->page->add_css('.wp dl { margin: 8px 0 }');
        // vis info
        echo '
<div class="section wp" style="width: 250px; margin-left: auto; margin-right: auto">
	<h3><a href="http://whatpulse.org/' . $wp->user_id . '">WhatPulse informasjon</a></h3>
	<p class="h_right"><a href="' . $__server['relative_path'] . '/diverse/whatpulse/">Legg til i profil</a></p>