コード例 #1
0
ファイル: profil.php プロジェクト: ununik/tiary
        $relationships = "Čeká se na potvrzení od druhého sportovce.";
    } elseif ($relationship == "check") {
        $relationships = "Tento sportovec se chce s tebou seznámit. <form action='' method='post'><button name='friends' value='check'>Potvrdit žádost</button></form>";
    }
    $relationships .= "<form action='index.php?page=message' method='post'><button name='id' value='{$profil->getId()}'>Odeslat zprávu</button></form>";
}
$gender = "";
$web = $profil->getProfilWeb();
if ($profil->getGender() == "m") {
    $gender = "muž";
} elseif ($profil->getGender() == "f") {
    $gender = "žena";
}
$clubs = $profil->getClubList();
$club = "";
foreach ($clubs as $club_one) {
    $club .= "{$club_one}<br>";
}
$club .= "";
$aboutMe = nl2br($profil->getAboutMe());
$entr = new Entry();
$allEntries = $entr->showEntries($profil->getId());
$entries = "";
foreach ($allEntries as $oneEntry) {
    $date = date('j. n. Y', $oneEntry['timestamp']);
    $comments = new CommentsEntry();
    $numComments = $comments->numOfComments($oneEntry['id']);
    $entries .= "<a href='index.php?page=entry&id={$oneEntry['id']}'>{$oneEntry['title']} ({$date})</a><br>\n                 <div>Počet komentářů: {$numComments}</div>";
}
$title = 'Tiary';
return include_once "views/profil/profil-html.php";