
02-11-2005, 12:00 PM
|
|
|
Join Date: Apr 2004
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by rh2004
Hi, I did it this is my showthread.php file...
Code:
$whoviewed_group_approved = true;
}
else
{
$whoviewed_group_approved = false;
}
if ( ($whoviewed_group_approved == true) OR ($whoviewed_security_option == 1) OR ($whoviewed_security_option == 3))
{
$show_whoviewed = true;
// End Section - Security - Evaluate if user has permission to view "Who Viewed" information, and which sections they have permissions to access
// Section - Get list of users who has viewed this thread - First Counter
if (empty($currentthread['whoviewed']))
{
$thread['viewers'] = '('.strtolower($vbphrase['none']).')';
}
else
{
$result = $DB_site->query("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid IN ($currentthread[whoviewed])");
$viewers = array();
while ($user = $DB_site->fetch_array($result))
{
array_push($viewers, "<a href=\"member.php?".$session['sessionurl'] . "u=".$user['userid'] . "\">" . htmlspecialchars($user['username']) . "</a>");
}
$thread['viewers'] = implode(", ", $viewers);
}
// End Section - Get list of users who has viewed this thread - First Counter
// Section - Get list of users who has viewed this thread - Second Counter
if (empty($currentthread2['whoviewedcounter']))
{
$thread['viewerscounter'] = '('.strtolower($vbphrase['none']).')';
}
else
{
$result2 = $DB_site->query("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid IN ($currentthread2[whoviewedcounter])");
$viewers2 = array();
while ($user = $DB_site->fetch_array($result2))
{
array_push($viewers2, "<a href=\"member.php?".$session['sessionurl'] . "u=".$user['userid'] . "\">" . htmlspecialchars($user['username']) . "</a>");
}
$thread['viewerscounter'] = implode(", ", $viewers2);
}
// End Section - Get list of users who has viewed this thread - Second Counter
// Section - Get the date/time of last reset
if ($thread['whoviewedreset'] != '0')
{
// $whoviewedreset = vbdate($vboptions[dateformat], '$thread[whoviewedreset]');
$whoviewedreset = vbdate("m/d/Y - h:i a", $thread[whoviewedreset]);
}
else
{
$whoviewedreset = "Never";
}
// End Section - Get the date/time of last reset
}
else
{
$show_whoviewed = false;
}
}
// End of Main "Who Viewed" Function
if ($whoviewed_display_option == 1)
{
whoviewedfunction();
}
if ($_REQUEST['do'] == 'whoviewedpopup')
{
// global.php handles $threadid..
//$threadid = intval($threadid);
$thread = verify_id('thread', $threadid, 1, 1);
$forumperms = fetch_permissions($thread['forumid']);
if (!($forumperms & CANVIEW))
{
print_no_permission();
}
if (!($forumperms & CANVIEWOTHERS) AND ($thread['postuserid'] != $bbuserinfo['userid'] OR !$bbuserinfo['userid']))
{
print_no_permission();
}
whoviewedfunction();
unset($shutdownqueries['pmpopup']);
eval('print_output("' . fetch_template('WhoViewedTemplate') . '");');
}
if ($_REQUEST['do'] == "resetwhoviewedcounter")
{
if(!is_member_of($bbuserinfo, 6)) // only admins may reset counter (usergroup: 6)
{
print_no_permission();
}
$threadid = addslashes($_REQUEST['threadid']);
//***insert mysql queries
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET whoviewedcounter='' WHERE threadid=$threadid");
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET whoviewedreset = " . TIMENOW . " WHERE threadid = $threadid");
if ($whoviewed_display_option == 1)
{
//redirect back to thread
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirecting'));
}
if ($whoviewed_display_option == 1)
{
//redirect back to Pop Up Window
$url = "showthread.php?$session[sessionurl]do=whoviewedpopup&t=$threadid";
eval(print_standard_redirect('redirecting'));
}
}
//set thread last view
$threadview = fetch_bbarray_cookie('thread_lastview', $thread['threadid']);
if ($thread['pollid'] AND $vboptions['updatelastpost'] AND ($displayed_dateline == $thread['lastpost'] OR $threadview == $thread['lastpost']) AND $pollinfo['lastvote'] > $thread['lastpost'])
{
$displayed_dateline = $pollinfo['lastvote'];
}
There is no errors but I can't see it anywhere....
|
ohhhhhhhhhhhhhh know i understand i have to copy the whole code..
thankyou very much .. sorry becz my english is really bad so that is why i can't understand
|