OK I figured it out, finally. Change the code as follows. Replace this:
Code:
$cookietimeout = mysql_query("SELECT value FROM setting WHERE varname = 'cookietimeout'");
$datecut = time()-$cookietimeout[value];
with this:
Code:
$cookievalue = mysql_query("SELECT value FROM setting WHERE varname = 'cookietimeout'");
$cookietimeout = mysql_result($cookievalue, 0, 0);
$datecut = time()-$cookietimeout;
I've also attached the complete code in a file. Unzip the file online.php from it, and then open that file in Notepad (Windows) or Simpletext (Mac) and edit the path to config.php, if necessary. Upload it to where you want and then include it using PHP
Code:
<? include("/path/to/online.php"); ?>
or SSI
Code:
<!--#include virtual="/path/to/online.php"-->
.
Problems? Let me know. It should work now.