Zitat:
Zitat von asus
alles scheisse außer mutti 
|
nich meggern ... php.net
das ding sollte ma dringend überarbeitet werden^^ schau ma ob es geht. Ansonsten bitte gute ne gute beschreibung abgeben was nicht geht
// edit, hab ne var falsch benannt, ist hier korrigiert
PHP-Code:
<?php
$bedanko = $arr['bedanko'];
//---- Get poster thanks
$resa = mysql_query('
SELECT
`userid` AS `thxUser`,
`postid`,
(SELECT `username` FROM `users` WHERE `id` = `thxUser`) AS `userName`,
(SELECT `class` FROM `users` WHERE `id` = `thxUser`) AS `userClass`,
(SELECT `anon` FROM `users` WHERE `id` = `thxUser`) AS `anonym`
FROM
`postthanks`
WHERE
`topicid` = ' . $topicid) or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($resa) > 0) {
$thxUser = Array();
$thxPostID = Array();
$thanks = Array();
while ($arra = mysql_fetch_assoc($resa))
{
$thxUser[] = $arra['thxUser'];
$thxPostID[] = $arra['postid'];
if ($arra['anonym'] == 'no' || $arra['thxUser'] == $CURUSER['id'] || get_user_class() >= UC_MODERATOR) {
$thanks[] = '<a href="userdetails.php?id=' . $arra['userid'] . '"><font class=' . get_class_color($arra['userClass']) . '><b>' . $arra['userName'] . '</b></font></a>';
}
else {
$thanks[] = '<font class=' . get_class_color($arra['userClass']) . '><b>' . $arra['userName'] . '</b></font>';
}
}
}
$thanksbutton = '<form method="post" action="forums.php?action=thanks&topicid=' . $topicid . '&postid=' . $postid . '&userid=' . $userid .'" style="display: inline;">
<input type="submit" value="Bedanken">
</form>';
//---- Get poster details
if ( $bedanko == 2 && !in_array($CURUSER['id'], $thxUser) ) {
$body1 .= '<br />' . $thanksbutton . '<br />';
}
if ( !empty($thanks) && !in_array($postid, $thxPostID) ) {
$body1 .= '<br />Für diesen Beitrag haben sich bedankt:';
$body1 .= '<br />' . implode(', ', $thanks);
}
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]