?ste?im ?
San?r?m bu
?stenildi?i gibi
Bunu deneyin:
[code]global $context, $smcFunc, $scripturl;
if ($context['user']['is_guest'])
return;
$board = 1;
$limit = 5;
// Did we get the user by name...
if (isset($_REQUEST['user']))
$memberResult = loadMemberData($_REQUEST['user'], true, 'minimal');
// ... or by id_member?
elseif (!empty($_REQUEST['u']))
$memberResult = loadMemberData((int) $_REQUEST['u'], false, 'minimal');
// If it was just ?action=profile, edit your own profile.
else
$memberResult = loadMemberData($context['user']['id'], false, 'minimal');
list ($member_id) = $memberResult;
$request = $smcFunc['db_query']('', '
SELECT t.id_topic, m.subject
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
WHERE t.id_board = {int:board}
AND t.id_member_started = {int:user}
AND t.approved = {int:is_approved}
ORDER BY m.subject
LIMIT 5',
array(
'board' => $board,
'user' => $member_id,
'is_approved' => 1,
)
);
$topics = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$topics[$row['id_topic']] = $row['subject'];
$smcFunc['db_free_result']($request);
if (empty($topics))
{
echo 'Bu b
Sorunsuz ve istenildi?i gibi