Tring Web Design

Specialist Web Designers in the Tring Area, Berkhamsted, Bucks and Herts - info@tring-web-design.co.uk

PHP-GTK SWK Desktop Widgets

  • Resources
  • cPanel Website Backups
  • Creating dynamic PDF files from PHP
  • Download Limit Monitoring Using IPCOP
  • Encrypt USB drives
  • E-Mail Newsletter Design
  • Exclude my visits from Google Analytics
  • Extract, Transform and Load
  • Forum Posts
  • Glossary of Terms
  • Imaging Hard Drives
  • Installing IPCOP as a firewall
  • PHP-GTK SWK Desktop Widgets

  • Pipe emails into a PHP script
  • Pure Rounded CSS3 Corners
  • SEO Basics
  • Speed up Xubuntu Boot Time
  • Sphider Tag Cloud
  • Static header and footer from dynamic templates
  • Suckerfish CMS Made Simple menus
  • Top of Google in 5 steps
  • Two Essential Web Design Tools - Firebug and Dust-me Selectors
  • Website Morphing
  • Watch
  • Music & Effects
  • Tools
  • Situation

    The comany boss wants pertinent accounts information at his fingertips. The current method of retreiving this information from the company accounts package produces confusing, large reports which don't mean anything to him.

    Brief

    Create a display of collated accounts information and present it to the boss in nice colurful graphs so he can make better business decisions

    Specification

    Example Concept

    This example is a proof of concept. It will take the output from a special user file for 'top', format the data with PHP, then create a fancy SWF graph of the 'top' data which can then be displayed in a PHP-GTK window as an HTML file. This concept has been done before, an example is Conky.

    As I dont have any relevant accounts information to play with I will use 'top', which is a linux specific program for showing current computer activity, much like task manager in WinXP. This will then proof the concept. I know that the accounts program will export report data into CSV, so it should be a small matter to format that data with PHP to be usable as graph data.

    Step 1 - Get output from top

    This extract has been lifted from http://howtoforge.com/extract-values-from-top-and-plot-them. Essentially run the following commands from the shell

    top -b -d 1 > top.txt

    Press ctrl+c to stop this after a few seconds, then enter the following;

    cat top.txt | grep Cpu | cut -c 8-12 | nl > top.txt

    This will give you CPU usage every second, formatted as two columns, one is time, the other usage in %, example output from top.txt;

    1 26.2
    2 76.2
    3 74.5
    4 87.3
    5 85.3
    6 47.5
    7 54.4
    8 71.8

    Now we have a txt file of values, we need to get PHP Array to plug these values into the PHP/SWF chart class.

    Step 5 - Get PHP-GTK to disply the graph using GTKHTML

    I've actually skipped a few steps, I thought that it would be too time consuming just for this PoC, so the graph works! Next step is to get it into a PHP-GTK window.

    Step 6 - Compile the whole package

    Final step is to create bytecode for the whole shebang, allowing it ti store and pull in data at will.

    New to content management or need some help using our system? View our video tutorials

    E-mail us or complete our requirements questionnaire for a more detailed quote

    Technical resources for web designers, developers and IT professionals

    Keep up-to-date with the projects we have been involved in

    Specialist web designers in Tring, Berkhamsted, Bucks and Herts

    info@tring-web-design.co.uk