function renderFriendOutput($id, $name, $isFriend, $renderGroup = false)
{
    $site = $renderGroup ? "gruppe" : "profil";
    $image = $renderGroup ? getGroupImageSmall($id) : getImageSmall($id);
    $text = '<tr class="friendList">		
		<td width="60px">
			<a href="' . $_SERVER['PHP_SELF'] . '?site=' . $site . '&id=' . $id . '">
				<img src="' . $image . '" border=0></img>
			</a>
		</td>
		<td class="profilName">
			<a href="' . $_SERVER['PHP_SELF'] . '?site=' . $site . '&id=' . $id . '">
				' . $name . '
			</a>
		</td>';
    if ($isFriend == 0) {
        $text .= getFriendButton("add", $id);
    } elseif ($isFriend == 2) {
        $text .= getFriendButton("accept", $id);
    } elseif ($isFriend == 3) {
        $text .= getAnfrageButtons($id, $renderGroup ? "G" : "F");
    } else {
        $text .= '<tr><td></td></tr>';
    }
    $text .= '</tr>';
    return $text;
}
function getMeldung($user, $user_id, $datum, $text, $idMeldung, $kommentar, $url)
{
    global $site, $connection;
    $text = '<tr style="border-top: 1px solid #eeeeee;">
		<td align="left" valign="top" width="55px" style="padding-top: 7px">
			<img src="' . getImageSmall($user_id) . '" border="0" />
		</td>
		<td align="left" valign="top" style="padding-top: 9px; padding-bottom: 10px">
			<div>
				<b><a href="' . $_SERVER['PHP_SELF'] . '?site=profil&id=' . $user_id . '">' . $user . '</a></b>
				<span style="font-size: 11px; color: #777777">' . convertMessageDate($datum) . '</span>
			</div>
			<div style="color: #333333; padding-top: 2px;">' . $text . '</div>
			<div>
				<a href="' . $url . '&tc=' . $idMeldung . '" class="link_small">Kommentieren</a>';
    mysql_close($connection);
    $connection = getConnection();
    $sql = "CALL sps_getKommentare({$idMeldung});";
    $result = mysql_query($sql);
    if (mysql_num_rows($result) > 0 || $kommentar) {
        $text .= '<div id="image_comment_top"></div><div style="width: 375px;">';
        while ($row = mysql_fetch_array($result)) {
            $text .= '<div class="comment">
							<div>
								<b><a href="' . $_SERVER['PHP_SELF'] . '?site=profil&id=' . $row['idBenutzer'] . '" style="font-size: 11px">' . $row['Vorname'] . ' ' . $row['Nachname'] . '</a></b>
								<span style="font-size: 11px; color: #777777">' . convertMessageDate($row['Datum']) . '</span>
							</div>
							<div style="color: #333333; padding: 2px 0 2px 0; font-size: 11px">' . $row['Kommentar'] . '</div>
						</div>';
        }
        $text .= '<div class="comment">
						<table>
							<tr>
								<form name="kommentieren" action="' . $url . '" method="post">
									<td><input id="kommentar_' . $idMeldung . '" type="text" name="kommentar" class="inputtext" size="42" /></td>
									<input type="hidden" name="message_id" value="' . $idMeldung . '" />
									<input type="hidden" name="message_user" value="' . $user_id . ',' . $user . '" />
									<td><input type="submit" class="inputsubmit" value="Kommentieren"/></td>
								</form>
							</tr>
						</table>
					</div>
				</div>';
    }
    $text .= '	
			</div>
		</td>
	</tr>';
    return $text;
}
function getMessageOfParentDetail($user, $user_id, $datum, $nachricht)
{
    return '<table width="100%" cellspacing="0" cellpadding="0" style="margin-top: 4px;">
		<tr style="border-top: 1px solid #dddddd;">
			<td align="left" valign="top" width="55px" style="padding-top: 8px">
				<img src="' . getImageSmall($user_id) . '" border="0" />
			</td>
			<td align="left" valign="top" style="padding-top: 9px">
				<div>
					<b><a href="' . $_SERVER['PHP_SELF'] . '?site=profil&id=' . $user_id . '">' . $user . '</a></b>
					<span style="font-size: 11px; color: #777777">' . convertMessageDate($datum) . '</span>
				</div>
				<div style="color: #333333; padding-top: 5px; padding-bottom: 15px">' . nl2br($nachricht) . '</div>
			</td>
		</tr>
	</table>';
}
Esempio n. 4
0
                }
                if ($inGroup) {
                    $sql = "CALL sps_getOwnFriends({$user_id})";
                    $result = mysql_query($sql);
                    while ($row = mysql_fetch_array($result)) {
                        $friends[] = $row;
                    }
                    $friends = sortArray($friends, "Vorname");
                    $output .= '			<tr>
										<td colspan=3 class="infounderlined">Freunde</td>
									</tr>';
                    for ($i = 0; $i < count($friends); $i++) {
                        $output .= '		<tr>
										<td style="width:60px;">
											<a href="' . $_SERVER['PHP_SELF'] . '?site=profil&id=' . $friends[$i]["idFriend"] . '">
												<img src="' . getImageSmall($friends[$i]["idFriend"]) . '" border=0></img>
											</a>
										</td>
										<td class="profilName">
											<a href="' . $_SERVER['PHP_SELF'] . '?site=profil&id=' . $friends[$i]["idFriend"] . '">
												' . $friends[$i]['Vorname'] . ' ' . $friends[$i]['Nachname'] . '
											</a>
										</td>
										<td align="right" width="150px">';
                        $inGroup = false;
                        for ($x = 0; $x < count($members); $x++) {
                            if ($members[$x]['idBenutzer'] == $friends[$i]["idFriend"]) {
                                $inGroup = true;
                                break;
                            }
                        }