BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
blubyu Offline
Thumbs Must Hurt
 
blubyu's Avatar
 
Posts: 109
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Default phpberrystats - 05-01-2007, 09:57 AM

Hey everybody. If some of you have followed this thread:

BerryStats for NonAdmins

Then you might know that I wrote a similar version in php. About a week ago I PM'd jibi to let him know that I might have some more time to start working on it again and to see if there were any changes he would like made to the code. I have spent the last week or so cleaning things up and I have created a site on sourceforge that will host the project.

I have uploaded the latest code that I use here at work. Feel free to download it and play with it. I have included a couple of screenshots on the sourceforge site. Let me know if there is anything else you might like to see.

Here is the url to sourceforge:

phpberrystats
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
SimonMac Offline
Talking BlackBerry Encyclopedia
 
SimonMac's Avatar
 
Posts: 446
Join Date: Feb 2006
Location: Leeds, UK
Model: 8300
PIN: 205DF8BA
Carrier: O2
Default 05-01-2007, 10:02 AM

blubyu! Gald to see your starting back on this, I'm still using v0.0.7 beta and think its great (the asp version got to big and bloated for my liking)

I look forward to the new features and if you ever need a guinea pig PM me.


15 Domino 6.5 Servers
6 BES 4.1.3 Servers
2613 Users
1 Constant Headache

   
Reply With Quote
  (#3 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-01-2007, 10:35 AM

I'm going to work on some more CSS themes for the package, as well. Although I love the default (I dislike the blue), I think more variety is always a plus. I'll have these done by tomorrow night or so.


   
Reply With Quote
  (#4 (permalink)) Old
blubyu Offline
Thumbs Must Hurt
 
blubyu's Avatar
 
Posts: 109
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Default 05-01-2007, 11:34 AM

One of the things that jibi asked for was dynamic columns on the display page. That is the biggest thing I am working on right now. If I find enough time today I should have that done and ready to test.

Simon - The version that I uploaded to sourceforge was 0.0.9 I think. Off the top of my end head I am not sure what has changed since the version you are using. I guess I should post a change log at sourceforge as well.
   
Reply With Quote
  (#5 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-01-2007, 02:01 PM

Inactive time, etc. has been added since then.

In html_header.php, find:

Code:
	<a href="<? echo COMPANYURL ?>"><h2 class="logo"><? echo COMPANY ?></h2></a>
	0.0.9.
Change to:

Code:
	<a href="<? echo COMPANYURL ?>"><h2 class="logo"><? echo COMPANY ?></h2></a>
	<? echo PAGETITLE?><? echo VERSION ?>
You may prefer to remove the PAGETITLE part, but I've always tied the two together (e.g. - phpBlackBerryStats v0.0.9).


   
Reply With Quote
  (#6 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-01-2007, 02:21 PM

Also, I *rarely* use the Options page, but I started thinking about a localized (or LDAP to AD usergroup auth) admin section that enabled that option (yes, thinking way outside the box). Anyhow, on 0.0.9, there's an "issue" with the options.php page (in PHP 5.2.1 + IIS 5.2/6.0). I get these errors:

Code:
PHP Notice: Use of undefined constant On - assumed 'On' in C:\Inetpub\wwwroot\stats-dev\options.php on line 84 PHP Notice: Use of undefined constant Off - assumed 'Off' in C:\Inetpub\wwwroot\stats-dev\options.php on line 137 PHP Notice: Use of undefined constant Off - assumed 'Off' in C:\Inetpub\wwwroot\stats-dev\options.php on line 199 PHP Notice: Undefined offset: 8 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 8 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 9 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 9 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 10 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 10 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 11 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 11 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 12 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 12 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 13 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 13 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 14 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 14 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 15 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 15 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 16 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 16 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 17 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 17 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 18 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 18 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 19 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 19 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 20 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 20 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 21 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 21 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267
To fix, find each of these three instances:
Code:
    echo On;}
    else {
        echo Off ;} ?></b>
Change to:
Code:
    echo 'On' ;}
    else {
        echo 'Off' ;} ?></b>
Find both instances of:
Code:
<? if ($columns[$i]==1) { ?>
and:
Code:
<? if ($columns[$i]==0) { ?>
Change to:
Code:
<? if ($columns[0]) { ?>
and:
Code:
<? if ($columns[1]) { ?>
I'm not sure if the latter parts are correct ($i is never specified when defining $columns, assuming I'm reading it correctly.. hehe), but the top part is 'technically' correct with the addition of the single-quotes.


   
Reply With Quote
  (#7 (permalink)) Old
SimonMac Offline
Talking BlackBerry Encyclopedia
 
SimonMac's Avatar
 
Posts: 446
Join Date: Feb 2006
Location: Leeds, UK
Model: 8300
PIN: 205DF8BA
Carrier: O2
Default 05-01-2007, 02:23 PM

Will give the new code a go when I come back from WES.


15 Domino 6.5 Servers
6 BES 4.1.3 Servers
2613 Users
1 Constant Headache

   
Reply With Quote
  (#8 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-01-2007, 02:23 PM

...and I'd suggest setting the default URL as ./index.php, as this gives a quick link back to the web folder root rather than the company's internet/intranet site (not very helpful for this page, in most cases).


   
Reply With Quote
  (#9 (permalink)) Old
blubyu Offline
Thumbs Must Hurt
 
blubyu's Avatar
 
Posts: 109
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Default 05-01-2007, 02:45 PM

Quote:
Originally Posted by jibi View Post
Also, I *rarely* use the Options page, but I started thinking about a localized (or LDAP to AD usergroup auth) admin section that enabled that option (yes, thinking way outside the box). Anyhow, on 0.0.9, there's an "issue" with the options.php page (in PHP 5.2.1 + IIS 5.2/6.0). I get these errors:

Code:
PHP Notice: Use of undefined constant On - assumed 'On' in C:\Inetpub\wwwroot\stats-dev\options.php on line 84 PHP Notice: Use of undefined constant Off - assumed 'Off' in C:\Inetpub\wwwroot\stats-dev\options.php on line 137 PHP Notice: Use of undefined constant Off - assumed 'Off' in C:\Inetpub\wwwroot\stats-dev\options.php on line 199 PHP Notice: Undefined offset: 8 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 8 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 9 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 9 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 10 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 10 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 11 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 11 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 12 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 12 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 13 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 13 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 14 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 14 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 15 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 15 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 16 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 16 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 17 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 17 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 18 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 18 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 19 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 19 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267 PHP Notice: Undefined offset: 20 in C:\Inetpub\wwwroot\stats-dev\options.php on line 248 PHP Notice: Undefined offset: 20 in C:\Inetpub\wwwroot\stats-dev\options.php on line 252 PHP Notice: Undefined offset: 21 in C:\Inetpub\wwwroot\stats-dev\options.php on line 263 PHP Notice: Undefined offset: 21 in C:\Inetpub\wwwroot\stats-dev\options.php on line 267
To fix, find each of these three instances:
Code:
    echo On;}
    else {
        echo Off ;} ?></b>
Change to:
Code:
    echo 'On' ;}
    else {
        echo 'Off' ;} ?></b>
Find both instances of:
Code:
<? if ($columns[$i]==1) { ?>
and:
Code:
<? if ($columns[$i]==0) { ?>
Change to:
Code:
<? if ($columns[0]) { ?>
and:
Code:
<? if ($columns[1]) { ?>
I'm not sure if the latter parts are correct ($i is never specified when defining $columns, assuming I'm reading it correctly.. hehe), but the top part is 'technically' correct with the addition of the single-quotes.
I have Notice errors turned off on my server This must be why they don't show up for me. I will turn them on, make your changes and then test to make sure they still work.

I did get the dynamic columns done and they seem to work great. I will try and get that code uploaded tonight or tomorrow. Oh I also added the Agent ID.
   
Reply With Quote
  (#10 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-01-2007, 04:09 PM

YAY! Oh, one more thing (I promise - just be glad the creative juices are running)... the inactivity time may need to be re-thought to include those devices that were never activated (logic: if device != activated && creation time > 30 days). Okay, off to the Braves game and I'll stop now. I'll try and get you some CSS themes tonight, btw.


   
Reply With Quote
  (#11 (permalink)) Old
blubyu Offline
Thumbs Must Hurt
 
blubyu's Avatar
 
Posts: 109
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Default 05-01-2007, 04:27 PM

I will look into the inactivity stuff.

I turned notice errors on and I saw the stuff you were talking about (and some other ones you didn't notice). I am pretty sure I have all of them fixed.

I will let you guys know when I get the latest code uploaded.
   
Reply With Quote
  (#12 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-02-2007, 11:14 PM

i ended up at the strip club last night, so i apologize for being late on these. i really ended up liking the green one a lot (after a re-work).

let me know if anyone has any requests and i'll put together a 'soothing' color scheme for you - just let me know the base color(s) and i'll work from that.



Last edited by jibi : 05-03-2007 at 12:20 PM.
   
Reply With Quote
  (#13 (permalink)) Old
blubyu Offline
Thumbs Must Hurt
 
blubyu's Avatar
 
Posts: 109
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Default 05-03-2007, 09:47 AM

Quote:
Originally Posted by jibi View Post
i ended up at the strip club last night, so i apologize for being late on these. i really ended up liking the green one a lot (after a re-work).

let me know if anyone has any requests and i'll put together a 'soothing' color scheme for you - just let me know the base color(s) and i'll work from that.
I will add these in and then upload 0.0.10 to sourceforge. We had eDirectory problems yesterday so I didn't have a chance to upload anything.

Jibi - LOVE the new themes. I just added them and checked them out. There is one slight problem. On your four themes the inactive users are not highlighted in red. On the default and blue them they are. Any ideas?

Last edited by blubyu : 05-03-2007 at 10:07 AM. Reason: adding to original post.
   
Reply With Quote
  (#14 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-03-2007, 12:10 PM

Hmm, I'll have a look at them. They have the .sev warnings in there, but I'm not really sure.

* Updated. Looks like I was still using the previous versions for the test.
Attached Files
File Type: zip css.zip (3.7 KB, 7 views)



Last edited by jibi : 05-03-2007 at 12:21 PM.
   
Reply With Quote
  (#15 (permalink)) Old
blubyu Offline
Thumbs Must Hurt
 
blubyu's Avatar
 
Posts: 109
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Default 05-03-2007, 04:54 PM

Quote:
Originally Posted by jibi View Post
Hmm, I'll have a look at them. They have the .sev warnings in there, but I'm not really sure.

* Updated. Looks like I was still using the previous versions for the test.

I found the problem and fixed it. I have uploaded version 0.0.10 to sourceforge. Check it out and see if I have missed anything.

Was it just me or was this site not available for a while?
   
Reply With Quote
  (#16 (permalink)) Old
jibi Offline
BBF Moderator
 
jibi's Avatar
 
Posts: 11,144
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 9000
OS: 4.6.0.162
Carrier: AT&T
Default 05-03-2007, 07:09 PM

It wasn't available for a while... a long, long while.

I had some issues saving my options - it went to an IE error screen at first. I changed the permissions on the file to modify and that resulted in some PHP errors. Not really sure what that was about, but the options did change. I'll see if I can duplicate the results tomorrow when I get in to work.

P.S. - Might want to include some instructions on enabling SNMP. I'm having troubles.



Last edited by jibi : 05-03-2007 at 07:10 PM.
   
Reply With Quote
  (#17 (permalink)) Old
blubyu Offline
Thumbs Must Hurt
 
blubyu's Avatar
 
Posts: 109
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Default 05-04-2007, 10:17 AM

Your going to make me install this on a windows machine so that I can test things out aren't you I have all errors turned on here and I don't see any of those errors. The permissions on the config.php file make sense. I need to add that to the read me. I am not sure about the snmp. I didn't have to configure anything on my server. It just worked. But then again I am running this on a linux box so maybe something is installed by default that allows it to run. You can turn the snmp off in the options file and that will make those errors go away.

EDIT: Ok, I got a windows server with IIS up and running. I installed PHP on it and have phpberrystats running on it. I now see the snmp errors that you are talking about. My suggestion for right now is to not enable/install snmp support for php and make sure the snmp option is turned off in the options page. I did some reading and I found the proper way to get snmp installed for PHP on a windows box but I am still having problems getting it to work. I will try and type up an install for the windows side of the php install.

Last edited by blubyu : 05-09-2007 at 10:07 AM. Reason: Added more content.
   
Reply With Quote
  (#18 (permalink)) Old
SimonMac Offline
Talking BlackBerry Encyclopedia
 
SimonMac's Avatar
 
Posts: 446
Join Date: Feb 2006
Location: Leeds, UK
Model: 8300
PIN: 205DF8BA
Carrier: O2
Default 05-15-2007, 12:03 PM

You will be pleased to know that BerryStats was the topic of a session at WES, I nearly wet myself when I saw it come up.


15 Domino 6.5 Servers
6 BES 4.1.3 Servers
2613 Users
1 Constant Headache

   
Reply With Quote
  (#19 (permalink)) Old
merlin Offline
Thumbs Must Hurt
 
Posts: 109
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK