
المشاركة الأصلية كتبت بواسطة مستر لؤي
كود:
// ############### Paul M - Who has visited today v3.10 #################
$now = TIMENOW ;
require_once(DIR . '/includes/functions_misc.php');
$cutoff = vbmktime(0, 0, 0, date('m', $now), date('d', $now), date('Y', $now));
//$cutoff = $now - 86400 ; // ## Uncomment this line if you want a rolling 24 hours display ## //
$todaysusers = $vbulletin->db->query_read("
SELECT userid, lastactivity, options, username, user.usergroupid, displaygroupid,
groupa.opentag as opentaga, groupa.closetag as closetaga, groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " . TABLE_PREFIX . "user as user
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE lastactivity > " .$cutoff. " ORDER BY username
");
$totaltoday = 0;
unset ($whotoday);
while ($today = $vbulletin->db->fetch_array($todaysusers))
{
$totaltoday += 1;
$today['opentag'] = $today['opentaga'] ;
$today['closetag'] = $today['closetaga'] ;
if ($today['displaygroupid'])
{
$today['opentag'] = $today['opentagb'] ;
$today['closetag'] = $today['closetagb'] ;
}
$today[visible] = 1 ;
if ($today['options'] & $vbulletin->bf_misc_useroptions['invisible'])
{
$today['visible'] = 0 ;
if (($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) OR $today['userid'] == $vbulletin->userinfo['userid'])
{
$today['visible'] = 2 ;
}
}
if ($today['visible'])
{
$wrdate = vbdate($vbulletin->options['timeformat'], $today['lastactivity']);
$whotoday .= "<a href='member.php?u=$today[userid]' title='$wrdate' >";
if ($today['visible'] == 2)
{
$whotoday .= $today['opentag'].$today['username'].$today['closetag']."</a>*, ";
}
else
{
$whotoday .= $today['opentag'].$today['username'].$today['closetag']."</a>, ";
}
}
}
if ($whotoday)
{
$whotoday = substr($whotoday, 0, strlen($whotoday)-2);
}
// ############# End of Who has visited today ###############
هذا كود المنتج
المشكةل هي :.
السعة 12 طبيعيانو الاعضاء اللي تواجدوا اليوم يبدا من جديد يعني مثلا انا كنت موجود يتواجد اسمي بالاعضاء اللي تواجدوا اليوم
لكن المشكلة عندي انو الاعضاء اللي تواجدوا اليوم يضل فاضي لمدة ساعتين تقريبا بعدها يبدا من
يسجل الاعضاء اللي تواجدوا اليوم..
يعني الاعضاء اللي تواجدوا من 12 - 2 ما بتشوفهم بالمتواجدين اليوم الا اذا تواجدوا بع الساعة 2
لو ماوضح
اصور الشرح..
وشكرا