Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free: $s->AddWhere("u", "DateLastActive", "", "DATE_SUB(NOW(), INTERVAL 5 MINUTE)", ">=", NULL, NULL, 0);
if ((in_array($Context->SelfUrl, array("categories.php", "index.php", "post.php", "comments.php")) && !isset($_GET['PageID']) || ($Context->SelfUrl == "index.php" && isset($_GET['PostBackAction'])))
&& $Context->Session->UserID > 0 && !$Context->Session->User->Preference("HideWhosOnline") ) {
if ((in_array($Context->SelfUrl, array("categories.php", "index.php", "comments.php")) && !isset($_GET['PageID']) )
&& $Context->Session->UserID == 0 ) {
$ListName = $Context->GetDefinition("Who's Online");
$Panel->AddList($ListName,501);
$online_list = $WhosOnline->GetWhosOnline();
$guest_count = $WhosOnline->GetGuestCount();
$phantom_count = 0;
$user_count = 0;
if ($online_list) {
foreach ($online_list as $name) {
if ($name["Phantom"]) {
$phantom_count++;
}
if (!$name["Phantom"] || !isset($name["Phantom"]) || $Context->Session->User->Permission("PERMISSION_WHOS_PHANTOM")) {
$user_count++;
}
}
if ($user_count > 0) {
$user_string = "$user_count registered user";
if ($user_count > 1)
$user_string .= "s";
$Panel->AddListItem($ListName,'','',$user_string);
}
if ($phantom_count > 0) {
$phantom_string = "$phantom_count phantom user";
if ($phantom_count > 1)
$phantom_string .= "s";
$Panel->AddListItem($ListName,'','',$phantom_string);
}
if ($guest_count > 0) {
$guest_string = "$guest_count guest";
if ($guest_count > 1)
$guest_string .= "s";
$Panel->AddListItem($ListName,'','',$guest_string);
}
} else {
$Panel->AddListItem($ListName,'','',$Context->Dictionary['None online']);
}
}
$s->AddOrderBy("DateLastActive",'i','DESC'); }
} else {
$Panel->AddListItem($ListName,'','',$Context->Dictionary['None online']);
}
$Context->Dictionary["None online"] = "Nobody is online.";
--- WhosOnline-2007-03-14/WhosOnline/default.php 2007-03-14 16:58:58.000000000 -0700
+++ WhosOnline-2007-03-14-fixed/WhosOnline/default.php 2008-04-09 09:04:34.000000000 -0700
@@ -103,7 +103,7 @@
if (isset($_COOKIE['IpHistoryID'])) {
$s->SetMainTable("IpHistory", "i");
- $s->AddWhere("i", "IpHistoryID", "", $_COOKIE['IpHistoryID'], "=");
+ $s->AddWhere("i", "IpHistoryID", "", FormatStringForDatabaseInput($_COOKIE['IpHistoryID']), "=");
$this->Context->Database->Delete($s, $this->Name, "UpdateDateLastActive", "An error occurred while deleting guest pr
ofile");
setcookie('IpHistoryID', '', time() - 3600);
}
@@ -120,7 +120,7 @@
$s->Clear();
$s->SetMainTable("IpHistory", "i");
$s->AddFieldNameValue("DateLogged", "now()", 0);
- $s->AddWhere("i", "IpHistoryID", "", $_COOKIE['IpHistoryID'], "=");
+ $s->AddWhere("i", "IpHistoryID", "", FormatStringForDatabaseInput($_COOKIE['IpHistoryID']), "=");
$result = $this->Context->Database->Update($s, $this->Name, "UpdateGuestLastActive", "An error occurred while loggin
g user data.");
} else {
$my_ip = GetRemoteIp(1);
$s->AddOrderBy("DateLastActive", "u", "desc");
Parse error: parse error, unexpected '-', expecting T_VARIABLE or '$' in /hsphere/local/home/z3std3si/zestdesign.net/_msc/php/extensions/WhosOnline/default.php on line 119