[ Index ]
 

Code source de Cr@wltr@ck 2.2.1

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/graphs/ -> page-graph.php (source)

   1  <?php
   2  //----------------------------------------------------------------------

   3  //  CrawlTrack 2.2.1

   4  //----------------------------------------------------------------------

   5  // Crawler Tracker for website

   6  //----------------------------------------------------------------------

   7  // Author: Jean-Denis Brun

   8  //----------------------------------------------------------------------

   9  // Website: www.crawltrack.fr

  10  //----------------------------------------------------------------------

  11  // That script is distributed under GNU GPL license

  12  //----------------------------------------------------------------------

  13  // file: page-graph.php

  14  //----------------------------------------------------------------------

  15  // this graph is made with artichow    website: www.artichow.org

  16  //----------------------------------------------------------------------

  17  error_reporting(0);
  18  //initialize array

  19  $listlangcrawlt=array();
  20  //get graph tvalues    

  21  $nbrpageview = $_GET['nbrpageview'];    
  22  $nbrpagestotal = $_GET['nbrpagestotal'];
  23  $crawltlang = $_GET['crawltlang'];
  24  //get the listlang files

  25  include "../include/listlang.php";
  26  //language file include

  27  if(file_exists("../language/".$crawltlang.".php") && in_array($crawltlang,$listlangcrawlt))
  28      {
  29      include "../language/".$crawltlang.".php";
  30      }
  31  else
  32      {
  33      echo"<h1>No language files available !!!!</h1>";
  34      exit();
  35      } 
  36  
  37  $values[0]=$nbrpageview;
  38  $values[1]=($nbrpagestotal-$nbrpageview);
  39  
  40  $legend[0]=$language['pc-page-view'];
  41  $legend[1]=$language['pc-page-noview'];
  42  
  43  //build the graph

  44  //test to see if ttf font is available

  45  $fontttf= gd_info();
  46  
  47  if( @$fontttf['FreeType Linkage']=='with freetype')
  48      {
  49      $ttf='ok';
  50      }
  51  else
  52      {
  53      $ttf='no-ok';
  54      }
  55  
  56  require_once  "artichow/Pie.class.php";
  57  
  58  
  59  $graph = new Graph(500, 175);
  60  
  61  if(function_exists('imageantialias'))
  62      {
  63      $graph->setAntiAliasing(TRUE);
  64      }
  65  else
  66      {
  67       $graph->setAntiAliasing(FALSE);   
  68      }
  69  $graph->border->hide(TRUE);
  70  
  71  $graph->shadow->setSize(5);
  72  $graph->shadow->smooth(TRUE);
  73  
  74  $graph->shadow->setPosition('SHADOW_LEFT_BOTTOM');
  75  $graph->shadow->setColor(new DarkBlue);
  76  
  77  
  78  
  79  $plot = new Pie($values);
  80  $plot->setCenter(0.3, 0.35);
  81  $plot->setSize(0.52, 0.55);
  82  $plot->set3D(15);
  83  $plot->setLabelPosition(10);
  84  $plot->label->setColor(new DarkBlue);
  85  if ($ttf=='ok')
  86      {
  87      $plot->label->setFont(new Tuffy(9));
  88      }
  89  else
  90      {
  91      $plot->label->setFont(new Font(2));
  92      }
  93  $plot->setBorder(new DarkBlue);
  94  
  95  $plot->setLegend($legend);
  96  
  97  $plot->legend->setPosition(1.84);
  98  $plot->legend->shadow->setSize(0);
  99  $plot->legend->setBackgroundColor(new White);
 100  $plot->legend->border->hide(TRUE);
 101  $plot->legend->setTextColor(new DarkBlue);
 102  if ($ttf=='ok')
 103      {
 104      $plot->legend->setTextFont(new Tuffy(9));
 105      }
 106  else
 107      {
 108      $plot->legend->setTextFont(new Font(2));
 109      }
 110  $graph->add($plot);
 111  $graph->draw();
 112  
 113  ?>


Généré le : Thu Sep 6 14:14:11 2007 par Balluche grâce à PHPXref 0.7