PDA

View Full Version : Please Help me!!!


Sh4z0n
11-14-2002, 11:34 AM
Each time I go into a page with search functions I get this error:

Warning: unexpected error in date() in c:\program files\easyphp\www\admin\functions.php on line 1694

I've installed Afterburner's newstatistik.php, Last 10 Searches hack and some other hack. I think the line where I get this error is:

// ###################### Start show_nopermission #######################
function vbdate($format,$timestamp) {
global $bbuserinfo,$timeoffset;

return date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);

}
In the return string. What could be the cause of that error?

Thanks in advance.

Velocd
11-14-2002, 03:02 PM
I have this hack installed as well, but unless I have an older version when I checked my functions.php the function used was not:

function vbdate($format,$timestamp) {


but:


function vbdatenoty($format,$timestamp) {


While here is my vbdate function:

function vbdate($format,$timestamp) {
global $bbuserinfo,$timeoffset, $dateformat, $timeformat;

if ($dateformat==$format) {
$todaystamp=mktime();
$todaydate=date($format,$todaystamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
$yestdate=date($format,(($todaystamp-86400)+($bbuserinfo['timezoneoffset']-$timeoffset)*3600));
$date = date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
if ($date==$todaydate) {
$date="Today";
}
if ($date==$yestdate) {
$date="Yesterday";
}
} else {
$date = date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
}
return $date;
}

Which has the "yesterday, today" hack installed.

Maybe that might help..?