When saving the template: phpinclude_start
I get this error:
Quote:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dfusion/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 1
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
|
I can't for the life of me find whats wrong with it.
I'm Running VB 3.5.3
The code for it is:
PHP Code:
if (strpos($_SERVER['PHP_SELF'], 'index.php') == true) {
$now = TIMENOW ;
require_once('./includes/functions_misc.php');
$cutoff = vbmktime(0, 0, 0, vbdate('m', $now, false, false), vbdate('d', $now, false, false), vbdate('Y', $now, false, false));
$cutoff = $now - 86400 ; // Uncomment this line if you want a rolling last 24 hours.
$todaysposters = $DB_site->query("SELECT userid, lastpost, options, username, opentag, closetag
FROM " . TABLE_PREFIX . "user as user
LEFT JOIN " . TABLE_PREFIX . "usergroup as usergroup ON(user.usergroupid = usergroup.usergroupid)
WHERE lastpost > " .$cutoff. " ORDER BY username" );
unset ($posttoday);
$posterstoday = 0;
while ($today = $DB_site->fetch_array($todaysposters))
{
$today[visible] = 1 ;
$posterstoday += 1;
if ($today[options] & $_USEROPTIONS[invisible])
{
$today[visible] = 0 ;
if (($permissions['genericpermissions'] & CANSEEHIDDEN) OR $today['userid'] == $bbuserinfo['userid'])
{
$today[visible] = 2 ;
}
}
if ($today[visible])
{
$wrdate = vbdate($vboptions['timeformat'], $today['lastpost']);
$posttoday .= "<a href='search.php?do=finduser&u=$today[userid]' title='$wrdate' >";
if ($today[visible] == 2)
{
$posttoday .= $today['opentag'].$today[username].$today['closetag']."</a>*, ";
}
else
{
$posttoday .= $today['opentag'].$today[username].$today['closetag']."</a>, ";
}
}
}
if ($posttoday)
{
$posttoday = substr($posttoday, 0, strlen($posttoday)-2);
}
}
$datecut = TIMENOW - $vboptions['cookietimeout'];
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut");
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " . TABLE_PREFIX . "session WHERE userid>0 AND lastactivity>$datecut");
$headerguests=$headerguests[count];
$headerusers=$headerusers[count];
$totalonline1=$headerguests+$headerusers;
$totalonline=$headerguests+$headerusers;
$df_hour = vbdate("G");
$df_day = vbdate("w");
$df_greeting = "Good Evening, $bbuserinfo[username].";
if( $df_hour < 18 ) { $df_greeting = "Good Afternoon $bbuserinfo[username]."; }
if( $df_hour < 12 ) { $df_greeting = "Good Morning $bbuserinfo[username]."; }
$nzb_greeting2 = "Hoorah for the Weekend!";
if( $df_day < 6 ) { $df_greeting2 = "T.G.I.F"; }
if( $df_day < 5 ) { $df_greeting2 = "One more day to go."; }
if( $df_day < 4 ) { $df_greeting2 = "Happy Humpday!"; }
if( $df_day < 3 ) { $df_greeting2 = "Is it only Tuesday?"; }
if( $df_day < 2 ) { $df_greeting2 = "The working week begins again."; }
if( $df_day < 1 ) { $df_greeting2 = "Ahh, a day of rest."; }
//New Posts
$getnewnavbr = $DB_site->query_first("SELECT COUNT(*) AS count FROM " .TABLE_PREFIX . "post WHERE dateline >= '$bbuserinfo[lastvisit]'");
$newpostsnavbr = number_format($getnewnavbr['count']);
//New Posts