Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Help With Error Msg

Asked Modified Viewed 66,744 times
A
afoster
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
asked
Senior Member

I have updated to 7.02.02 from 7.01.06 with little problems except for what I will try to explain here. I have tried to contact Pirdani as the problem exists in his Online Stats panel but his website is no longer available. I am attaching a screen shot of my error log as well as the error message that appears on the site above the Pirdani Online Stats panel.

You can see that when the screen shot was taken, a member had been logged in, but it does not display the member name, however, when I refresh the page, the error message goes away and the member's name is displayed. I have also displayed the screen shot after the page has been refreshed. Has anyone else experienced this problem with this panel or does anyone have any idea on how to fix it? Thanks.
afoster attached the following file:
pirdani_after_refresh.jpg [No information available / 104 Downloads]
pirdani.jpg [No information available / 115 Downloads]
error_log_1.jpg [No information available / 95 Downloads]
0 replies

2 posts

D
DrunkeN
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
answered
Member

Hey. Can you post stats.inc.php code or attach the file so should i take a look :)
0 replies
A
afoster
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
answered
Senior Member

Quote

DrunkeN wrote:

Hey. Can you post stats.inc.php code or attach the file so should i take a look :)


Here is the stats.inc.php file

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| CVS Version: 2.1
| Author: DJ Szabcsa & Hyperkölyök
| W3C validation: dzsar
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

include INFUSIONS."pd_stats_panel/infusion_db.php";

$memon = "";

//DB überprüfen/Daten erzeugen
$sql = dbquery("SELECT * FROM ".DB_PD_STATS_COUNTER."");
if(dbrows($sql)=="0")
{
  $insert = dbquery("INSERT INTO ".DB_PD_STATS_COUNTER." (standing, maxonline, maxday) VALUES ('0', '0', '0')");
}

//Settings laden
$sql = dbquery("SELECT * FROM ".DB_PD_STATS_SETTINGS."");
if(dbrows($sql)=="0")
{
  $insert = dbquery("INSERT INTO ".DB_PD_STATS_SETTINGS." VALUES ('3600', '[', ']', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y')");
  $sql = dbquery("SELECT * FROM ".DB_PD_STATS_SETTINGS."");
}
$dset = dbarray($sql);


//JavaScript: Include overlib.js (Toolbar Engine)
echo '<script type="text/javascript" src="'.INFUSIONS.'pd_stats_panel/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
      <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>';

//Variabeln deklarieren
error_reporting(0);
$zeit = time();
$zeit_cookie = $zeit + $dset['reload'];
$hua = $_SERVER['HTTP_USER_AGENT'];
$uip = USER_IP;
$referer = $_SERVER['HTTP_REFERER'];
$host = $_SERVER['HTTP_HOST'];

$heute_tag = date("d");
$heute_monat = date("m");
$heute_jahr = date("Y");

//FUSION Standard Funktion -- geändert!!!
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user=".$name." AND online_ip='".USER_IP."'");
if (dbrows($result)!=0)
{
   $result = dbquery("UPDATE ".DB_ONLINE." SET online_lastactive='".$zeit."' WHERE online_user=".$name." AND online_ip='".USER_IP."'");
} else {
   $result = dbquery("INSERT INTO ".DB_ONLINE." VALUES('$name', '".USER_IP."', '$zeit')");
}
$result = dbquery("DELETE FROM ".DB_ONLINE." WHERE online_lastactive<".($zeit-60)."");

//User Auswertung START
if (!isset($_COOKIE['pd_stats_visited']))
{
if(eregi("Googlebot",$hua))
{
  //Google Bot, Counter nicht erhöhen!!!
}
else
{
  //Counter erhöhen
   $result=dbquery("INSERT INTO ".DB_PD_STATS_TEMP." (id, timestamp) VALUES ('', '".$zeit."')");
   $result=dbquery("UPDATE ".DB_PD_STATS_COUNTER." SET standing = standing + 1");

   //Cookie setzen
   setcookie("pd_stats_visited", "yes", $zeit_cookie, "/", "", "0");

   //Browser bestimmen
  if( eregi("(opera) ([0-9]{1,2}.[0-9]{1,3}){0,1}",$hua,$regs) || eregi("(opera/)([0-9]{1,2}.[0-9]{1,3}){0,1}",$hua,$regs)) {
    $browser = "Opera $regs[2]";
  } else if( eregi("(msie) ([0-9]{1,2}.[0-9]{1,3})",$hua,$regs) ) {
    $browser = "MSIE $regs[2]";
  } else if( eregi("(konqueror)/([0-9]{1,2}.[0-9]{1,3})",$hua,$regs) ) {
    $browser = "Konqueror $regs[2]";
  } else if( eregi("(lynx)/([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})",$hua,$regs) ) {
    $browser = "Lynx $regs[2]";
  } else if( eregi("(firefox)/([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})",$hua,$regs) ) {
    $browser = "Firefox $regs[2]";
  } else if( eregi("(netscape6)/(6.[0-9]{1,3})",$hua,$regs) ) {
    $browser = "Netscape $regs[2]";
  } else if( eregi("mozilla/5",$hua) ) {
    $browser = "Mozilla 5";
  } else if( eregi("(mozilla)/([0-9]{1,2}.[0-9]{1,3})",$hua,$regs) ) {
    $browser = "Netscape $regs[2]";
  } else if( eregi("w3m",$hua) ) {
    $browser = "w3m";
  } else if( eregi("WebTV",$hua) ) {
    $browser = "WebTV";
  } else if( eregi("Googlebot",$hua) ) {
    $browser = "Google Bot";
  } else {
    $browser = "unknown";
  }

  //OS bestimmen
//  echo $hua;
  //"(firefox)/([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})",$hua,$regs
 
 
  if ( ereg("Win", $hua) ) {
    $os = "Windows";
  } elseif( (ereg("Mac", $hua) ) || ( ereg("PPC", $hua)) ) {
    $os = "Mac";
  } elseif(ereg("Linux", $hua) ) {
    $os = "Linux";
  } elseif(ereg("FreeBSD", $hua) ) {
    $os = "FreeBSD";
  } elseif(ereg("SunOS", $hua) ) {
    $os = "SunOS";
  } elseif(ereg("IRIX", $hua) ) {
    $os = "IRIX";
  } elseif(ereg("BeOS", $hua) ) {
    $os = "BeOS";
  } elseif(ereg("OS/2", $hua) ) {
    $os = "OS/2";
  } elseif(ereg("AIX", $hua) ) {
    $os = "AIX";
  } else {
    $os = "Other";
  }

  //Referer bestimmen
  $url_p = parse_url($referer);
  $url = $url_p["host"];
  $referer = "http://$url";

  //Falls Referer nach Bearbeitung leer, nutze $host
  if ( $referer == "http://" )
  { $referer = "http://".$host;  }

  //DB Querys
  //Browser
  $check_if_insert = dbrows(dbquery("SELECT * FROM ".DB_PD_STATS_BROWSER." WHERE browser = '$browser'"));
  if ( $check_if_insert == 0 )
  {
    $insert_browser = dbquery("INSERT INTO ".DB_PD_STATS_BROWSER." VALUES('$browser', '1');");
  } else {
    $count_browser = dbarray(dbquery("SELECT * FROM ".DB_PD_STATS_BROWSER." WHERE browser = '$browser'"));
    $count_browser = $count_browser[stat]+1;
    $update_browser = dbquery("UPDATE ".DB_PD_STATS_BROWSER." SET stat = '$count_browser' WHERE browser = '$browser'");
  }

  //Betriebssystem
  $check_if_insert = dbrows(dbquery("SELECT * FROM ".DB_PD_STATS_OS." WHERE os = '$os'"));
  if ( $check_if_insert == 0 )
  {
    $insert_os = dbquery("INSERT INTO ".DB_PD_STATS_OS." VALUES('$os', '1');");
  } else {
    $count_os = dbarray(dbquery("SELECT * FROM ".DB_PD_STATS_OS." WHERE os = '$os'"));
    $count_os = $count_os[stat]+1;
    $update_os = dbquery("UPDATE ".DB_PD_STATS_OS." SET stat = '$count_os' WHERE os = '$os'");
  }

  //Referer
  $check_if_insert = dbrows(dbquery("SELECT * FROM ".DB_PD_STATS_REFERER." WHERE referer = '$referer'"));
  if ( $check_if_insert == 0 )
  {
    $insert_referer = dbquery("INSERT INTO ".DB_PD_STATS_REFERER." VALUES('$referer', '1');");
  } else {
    $count_referer = dbarray(dbquery("SELECT * FROM ".DB_PD_STATS_REFERER." WHERE referer = '$referer'"));
    $count_referer = $count_referer[stat]+1;
    $update_referer = dbquery("UPDATE ".DB_PD_STATS_REFERER." SET stat = '$count_referer' WHERE referer = '$referer'");
  }
}
}


//DB auslesen
//Neustes Mitglied
$data = dbarray(dbquery("SELECT user_id,user_name FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
define("PD_STATS_NEW", "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a>");

//Unaktivierter Mitglieder
define("PD_STATS_UNAKTIV", dbcount("(user_id)", DB_USERS, "user_status='2'"));

//Gäste ONLINE
$result_gaeste = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user='0'");
define("PD_STATS_GAESTE", dbrows($result_gaeste));

//Mitglieder ONLINE
$result_members = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user<>'0'");
$members = dbrows($result_members);
if ($members != 0)
{
   $z = 1;
   while($om = dbarray($result_members))
  {
    $result_member = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$om['online_user']."'");
    $data = dbarray($result_member);
    if($data['user_level']!=101 OR $data['user_groups']!='')
    {
      $special = '';
      if($data['user_level']==102) { $special = "&lt;b&gt;".$locale['pds213']."&lt;/b&gt;".$locale['user2']; }
      if($data['user_level']==103) { $special = "&lt;b&gt;".$locale['pds213']."&lt;/b&gt;".$locale['user3']; }
      if ($data['user_groups'])
      {
        if($special) { $special = $special."<br />"; }
        $user_groups = (strpos($data['user_groups'], ".") == 0 ? explode(".", substr($data['user_groups'], 1)) : explode(".", $data['user_groups']));
        if(count($user_groups)>1) { $special = $special."&lt;b&gt;".$locale['pds215']."&lt;/b&gt;<br />"; } else { $special = $special."&lt;b&gt;".$locale['pds214']."&lt;/b&gt;"; }
         for ($i = 0;$i < count($user_groups);$i++)
        {
            $special = $special.getgroupname($user_groups[$i]);
            if ($i != (count($user_groups)-1)) $special = $special.", ";
         }
      }
         $memon = $memon."<a onmouseover=\"return overlib('".$special."', CAPTION, '".$data['user_name']."');\" onmouseout=\"return nd();\" href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$dset['special1'].$data['user_name'].$dset['special2']."</a>";
    }
    else
    {
        $memon = $memon." <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a>";
    }
      if ($z != $members) $memon = $memon.", ";
      $z++;
   }
} else {
   $memon = $locale['pds216']."<br />\n";
}
define("PD_STATS_MEMBERS", $memon);

//Registrierte Mitglieder
define("PD_STATS_REGISTER", dbcount("(user_id)", DB_USERS, "user_status<='1'"));


//Besucher HEUTE
$result_heute=dbquery("SELECT * FROM ".DB_PD_STATS_TEMP." WHERE timestamp>='".mktime(0, 0, 0, $heute_monat, $heute_tag, $heute_jahr)."'");
define("PD_STATS_HEUTE", dbrows($result_heute));

//Besucher ONLINE
$result_online = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_lastactive>".(time()-60));
define("PD_STATS_ONLINE", dbrows($result_online));

//Besucher MAXONLINE
$result_gesamt=dbquery("SELECT * FROM ".DB_PD_STATS_COUNTER."");
$data = dbarray($result_gesamt);
if($data['maxonline']<PD_STATS_ONLINE)
{
  $result = dbquery("UPDATE ".DB_PD_STATS_COUNTER." SET maxonline='".PD_STATS_ONLINE."'");
  define("PD_STATS_MAXONLINE", PD_STATS_ONLINE);
}
else
{
  define("PD_STATS_MAXONLINE", $data['maxonline']);
}

//Besucher GESTERN
$result_gestern=dbquery("SELECT * FROM ".DB_PD_STATS_TEMP." WHERE timestamp>='".mktime(0, 0, 0, $heute_monat, ($heute_tag-1), $heute_jahr)."' AND timestamp<='".mktime(23, 59, 59, $heute_monat, ($heute_tag-1), $heute_jahr)."'");
define("PD_STATS_GESTERN", dbrows($result_gestern));

//Besucher MAXDAY
$result_gesamt=dbquery("SELECT * FROM ".DB_PD_STATS_COUNTER."");
$data = dbarray($result_gesamt);
if($data['maxday']==0 OR $data['maxday']<PD_STATS_HEUTE)
{
  $result = dbquery("UPDATE ".DB_PD_STATS_COUNTER." SET maxday='".PD_STATS_HEUTE."'");
  define("PD_STATS_MAXDAY", PD_STATS_HEUTE);
}
else
{
  if($data['maxday']<PD_STATS_GESTERN)
  {
  $result = dbquery("UPDATE ".DB_PD_STATS_COUNTER." SET maxday='".PD_STATS_GESTERN."'");
  define("PD_STATS_MAXDAY", PD_STATS_GESTERN);
  }
  else
  {
    define("PD_STATS_MAXDAY", $data['maxday']);
  }
}

//Besucher MONAT
$result_monat=dbquery("SELECT * FROM ".DB_PD_STATS_TEMP." WHERE timestamp>='".mktime(0, 0, 0, $heute_monat, 1, $heute_jahr)."'");
define("PD_STATS_MONAT", dbrows($result_monat));
$sql = dbquery("SELECT * FROM ".DB_PD_STATS_MONTH." WHERE year='".$heute_jahr."' AND month='".$heute_monat."'");
if(dbrows($sql)==0)
{
  $insert = dbquery("INSERT INTO ".DB_PD_STATS_MONTH." (month, year, stat) VALUES ('$heute_monat', '$heute_jahr', '".PD_STATS_HEUTE."')");
}
else
{
  $update = dbquery("UPDATE ".DB_PD_STATS_MONTH." SET stat = '".PD_STATS_MONAT."' WHERE month = '".$heute_monat."' AND year = '".$heute_jahr."'");
}

//Besucher GESAMT
$result_gesamt=dbquery("SELECT * FROM ".DB_PD_STATS_COUNTER."");
$data = dbarray($result_gesamt);
define("PD_STATS_GESAMT", $data['standing']);

//Besucher letzten 24h
$pfad = INFUSIONS."pd_stats_panel/images/poll.gif";

$result_last24h_gesamt=dbquery("SELECT * FROM ".DB_PD_STATS_TEMP." WHERE timestamp>'".($zeit-86400)."' AND timestamp<='".$zeit."'");
$gesamt = dbrows($result_last24h_gesamt);
if($gesamt!=0)
{
  $last24h = '<table cellspacing="0" cellpadding="0"><tr>';
  for($a=23; $a>=0; $a--)
  {
    $last24h = $last24h."<td align='center' valign='bottom'>";
    $result_last24h=dbquery("SELECT * FROM ".DB_PD_STATS_TEMP." WHERE timestamp>'".($zeit-(($a+1)*3600))."' AND timestamp<='".($zeit-($a*3600))."'");
    $hoehe = ((100/$gesamt)*dbrows($result_last24h))+1;
    $last24h = $last24h."<img src='".$pfad."' height='".$hoehe."px' width='4px' alt='' /><br /></td>";
  }
  $last24h = $last24h."</tr></table>";
  define("PD_STATS_LAST_24H", $last24h);
}
else
{
  define("PD_STATS_LAST_24H", $locale['pds217']);
}

// Alte Temp DB Einträge löschen
$result = dbquery("DELETE FROM ".DB_PD_STATS_TEMP." WHERE timestamp<'".mktime(0, 0, 0, $heute_monat, 1, $heute_jahr)."'");
?>


Thanks for your help.

Merged on Jun 04 2011 at 18:01:45:
Anyone have any insight on this?

Merged on Jun 09 2011 at 09:14:06:
I seem to remember reading on this forum that if anyone has any problems after updating to 7.02.02 that help would be given to resolve the problem. I have posted about the problem I am having with the Online Stats Panel from Pirdani for almost 10 days and have had no response. I keep getting the following error msg:

Column count doesn't match value count at row 1

Am I asking for help incorrectly? Does no one else use this panel? Am I the only one getting this error msg? Any help on this would be much appreciated.
Edited by afoster on 09-06-2011 18:14,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

A
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
D
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet