das ist mein script welches ich von der anderen seite ausführen möchet. wie kann ich das bewerkstelligeN???
lg
PHP-Code:
<div class="galerie">
<?php
function renderPhoto2($userId, $username, $image, $name, $hits) {
$avatar = 'http://www.domain.de/images/comprofiler/' . $image;
$userProfile = 'index.php?option=com_comprofiler&task=userProfile&user=' . $userId;
return '
<div class="foto_start">' . "\n" . '
<a href="' . $userProfile . '"><img src="' . $avatar . '" border="0" width="85" height="60" alt="profilbilder" /></a>' . "\n" . '
<p><a href="' . $userProfile . '">' . $username . '</a></p>
</div>' . "\n" . '
';
}
$db =& JFactory::getDBO();
$sql = "
SELECT u.id, u.username, c.avatar, u.name, c.hits
FROM #__users AS u, #__comprofiler AS c
WHERE u.id = c.user_id
AND c.avatar IS NOT NULL
AND u.username != 'admin'
ORDER BY RAND()
LIMIT 10
";
#$sql = "SHOW TABLES;";
#$sql = "SELECT * FROM #__comprofiler";
$db->setQuery( $sql );
$rows = $db->loadAssocList();
#echo "<!--";
#print_r($rows);
#echo "-->";
foreach ($rows as $row) {
echo renderPhoto2($row['id'], $row['username'], $row['avatar'], $row['name'], $row['hits']) . "\n";
}
?>
<div class="cleaner"> </div>
Lesezeichen