Accueil > > > 2 OU 3 CLASSES D'MAGES EN PHP5 COMPOSITION D'UNE ÉQUIPE DE FOOT
2 OU 3 CLASSES D'MAGES EN PHP5 COMPOSITION D'UNE ÉQUIPE DE FOOT
Information sur la source
Description
Je viens de me mettre depuis 2 jours à GD et je m'éclate avec ces fonctions: J'ai créé tous d'abord une classe image simple, puis 3 classes héritées (LOGO, SOCCERGROUND, ET COMPOSITIONGRAPH) C'est avec cette dernière que je me suis mis à délirer pour mettre à jour la composition d'une equipe de foot sur un terrain (le tout constituant une image dynamique) . Si vous avez des remarques ou des améliorations je vous écoute. Je vous livre le tout sans faire le tri. la classe logo est complétement expérimentale(brouillonne) puisque je découvre mais bon...
Source
- <?php
-
- class IMGBASE {
-
- protected $width;
- protected $height;
- protected $bgcolor; //RESSOURCE COLOR
- protected $pic; //RESSOURCE IMAGE
- protected $format;
- protected $name;
- protected $extension;
-
- public function __construct ($pwidth=100, $pheight=100, $pR=245, $pG=245, $pB=245, $pformat='image/png'){
-
- $this->width = $pwidth;
- $this->height = $pheight;
- $this->format = $pformat;
- $this->name = 'tmp';
-
- if (!($this->pic = imagecreate ($this->width, $this->height)))
- throw new Exception ('<font color ="red"><b>EXCEPTION ATTRAPEE :impossible de creer l\'image.</b></font>');
- if (($this->bgcolor = imagecolorallocate ($this->pic, $pR, $pG, $pB))===-1)
- throw new Exception ('<font color ="red"><b>EXCEPTION ATTRAPEE :Impossible d\'allouer une couleur de fond</b></font>');
- }
-
- public function setname ($name){
- $this->name = $name;
-
- }
-
-
- public function display() {
- $this->tofile();
- echo '<img src="'.$this->name.'.'.$this->extension.'">';
- }
-
- public function toscreen(){
-
- if (!$this->pic) throw new Exception ('Impossible d afficher l\'image');
-
- $a=array('image/jpeg'=>'imagejpeg', 'image/png'=>'imagepng', 'image/gif'=>'imagegif');
- $b=$a[$this->format];
- $b($this->pic);
-
- }
-
- public function tofile(){
-
- if (!is_dir(dirname( $this->name)))
- throw new Exception ('Impossible de créer le fichier '.$this->name.' dans le répertoire '.dirname($this->name));
-
- $a=array('image/jpeg'=>'imagejpeg', 'image/png'=>'imagepng', 'image/gif'=>'imagegif');
- $b=$a[$this->format];
- $b($this->pic,$this->name.'.'.$this->extension);
-
- if ($this->pic)
- imagedestroy($this->pic);
-
- }
- }
- class SOCCERGROUND extends IMGBASE {
-
- protected $scale ;//on multiplie la valeur en pixel par ce nombre pour avoir l'affichage
- private $lineclr;// COULEUR DE LIGNE
- private $darkgrass;//ID COULEUR DE TONTE
-
- private function colorizegrass(){
- $this->darkgrass = imagecolorallocate ($this->pic, 0, 120, 0);
- for ($i=1 ; $i < 17 ; $i+=2){
- imagefilledrectangle ($this->pic, 0, $i*($this->height/16), $this->width, ($i+1)*($this->height/16), $this->darkgrass);
- }
- }
-
- public function setscale ($sc){
- $this->scale=$sc;
- }
-
- public function __construct($w=70,$h=105,$sc=5){
- $this->scale = $sc;
- parent::__construct($w*$this->scale, $h*$this->scale, 0, 150, 0, 'image/png');
- $this->lineclr = imagecolorallocate ($this->pic, 255, 255, 255);
- }
-
- private function draw_mediane () {
- imageline($this->pic, 0, $this->height/2, $this->width, $this->height/2, $this->lineclr);
- }
-
- private function draw_medium_circle () {
- imageellipse ($this->pic, $this->width/2, $this->height/2, 18.3*$this->scale, 18.3*$this->scale, $this->lineclr);
- imagefilledellipse(
- $this->pic,
- $this->width/2,
- $this->height/2,
- 5,
- 5,
- $this->lineclr
- );
- }
-
- private function draw_gk_zone () {
- $XUpMd = $this->width/2;
- $YUpMd = 0;
- $XDnMd = $this->width/2;
- $YDnMd = $this->height;
- //BUT DU HAUT
- imageline (
- $this->pic,
- $XUpMd-((7 * ($this->scale))/2),
- $YUpMd ,
- $XUpMd-((7 * ($this->scale))/2),
- $YUpMd + 5,
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XUpMd+((7 * ($this->scale))/2),
- $YUpMd ,
- $XUpMd+((7 * ($this->scale))/2),
- $YUpMd + 5,
- $this->lineclr
- );
- //BUT DU BAS
- imageline (
- $this->pic,
- $XDnMd-((7 * ($this->scale))/2),
- $YDnMd ,
- $XDnMd-((7 * ($this->scale))/2),
- $YDnMd - 10,
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XDnMd+((7 * ($this->scale))/2),
- $YDnMd ,
- $XDnMd+((7 * ($this->scale))/2),
- $YDnMd - 10,
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XDnMd - ((7 * ($this->scale))/2),
- $YDnMd - 10,
- $XDnMd + ((7 * ($this->scale))/2),
- $YDnMd - 10,
- $this->lineclr
- );
-
- //PETIT RECTANGLE BUT DU BAS
- imageline (
- $this->pic,
- $XDnMd - (9 * $this->scale),
- $YDnMd,
- $XDnMd - (9 * $this->scale),
- $YDnMd - (5.5 * $this->scale),
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XDnMd + (9 * $this->scale),
- $YDnMd,
- $XDnMd + (9 * $this->scale),
- $YDnMd - (5.5 * $this->scale),
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XDnMd - (9 * $this->scale),
- $YDnMd - (5.5 * $this->scale),
- $XDnMd + (9 * $this->scale),
- $YDnMd - (5.5 * $this->scale),
- $this->lineclr
- );
-
- //PETIT RECTANGLE BUT DU HAUT
- imageline (
- $this->pic,
- $XUpMd - (9 * $this->scale),
- $YUpMd,
- $XUpMd - (9 * $this->scale),
- $YUpMd + (5.5 * $this->scale),
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XUpMd + (9 * $this->scale),
- $YUpMd,
- $XUpMd + (9 * $this->scale),
- $YUpMd + (5.5 * $this->scale),
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XUpMd - (9 * $this->scale),
- $YUpMd + (5.5 * $this->scale),
- $XUpMd + (9 * $this->scale),
- $YUpMd + (5.5 * $this->scale),
- $this->lineclr
- );
- //POINT PENALTY DU HAUT
- imagefilledellipse(
- $this->pic,
- $XUpMd,
- 11 * $this->scale,
- 5,
- 5,
- $this->lineclr
- );
- //POINT PENALTY DU BAS
- imagefilledellipse(
- $this->pic,
- $XDnMd,
- $YDnMd-(11 * $this->scale),
- 5,
- 5,
- $this->lineclr
- );
- //SURFACE DU HAUT
- imageline (
- $this->pic,
- $XUpMd - (20*$this->scale),
- 0,
- $XUpMd - (20*$this->scale),
- 16.5 * $this->scale,
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XUpMd + (20*$this->scale),
- 0,
- $XUpMd + (20*$this->scale),
- 16.5 * $this->scale,
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XUpMd - (20*$this->scale),
- 16.5 * $this->scale,
- $XUpMd + (20*$this->scale),
- 16.5 * $this->scale,
- $this->lineclr
- );
- //SURFACE DU BAS
- imageline (
- $this->pic,
- $XDnMd - (20*$this->scale),
- $YDnMd,
- $XDnMd - (20*$this->scale),
- $YDnMd - (16.5 * $this->scale),
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XDnMd + (20*$this->scale),
- $YDnMd,
- $XDnMd + (20*$this->scale),
- $YDnMd - (16.5 * $this->scale),
- $this->lineclr
- );
- imageline (
- $this->pic,
- $XDnMd - (20*$this->scale),
- $YDnMd - (16.5 * $this->scale),
- $XDnMd + (20*$this->scale),
- $YDnMd - (16.5 * $this->scale),
- $this->lineclr
- );
-
- //ARC BAS
- imagearc(
- $this->pic,
- $XDnMd,
- $YDnMd-(11 * $this->scale),
- 18.3 * $this->scale,
- 18.3 * $this->scale,
- 180+36.95,
- -36.95,
- $this->lineclr
- );
- //ARC HAUT
- imagearc(
- $this->pic,
- $XUpMd,
- 11 * $this->scale,
- 18.3 * $this->scale,
- 18.3 * $this->scale,
- +36.95,
- 180-36.95,
- $this->lineclr
- );
- }
-
- public function rotate($deg){
- $white = imagecolorallocate($this->pic, 255, 255, 255);
- $this->pic = imagerotate($this->pic, $deg, $white);
- }
-
- public function build (){
- $this->colorizegrass();
- $this->draw_mediane();
- $this->draw_medium_circle();
- $this->draw_gk_zone ();
- }
-
- }
-
- class COMPOSITIONGRAPH extends SOCCERGROUND{
-
- private $team = array();
- protected $txtcolor;
- protected $fontsize;
- protected $numcolor;
- protected $numsize;
- protected $font;
-
- public function __construct($tm=NULL,$psc=5){
- parent::__construct(70,105,$psc);
- if (isset($tm)&&is_array($tm) ){
- $this->team = $tm;
- //echo $tm[0]['poste'];
- }else throw new Exception('ERREUR DANS LE TABLEAU team');
- $this->txtcolor = imagecolorallocate ($this->pic, 0, 0, 200);
- $this->numcolor = imagecolorallocate ($this->pic, 255, 0, 0);
- $this->fontsize = 3;
- $this->numsize = 4;
- }
-
- /* public function rotate180(){
- $this->pic=imagerotate($this->pic,180,0);
- }*/
-
- public function settxtstyle($R,$G,$B,$sz){
-
- $this->txtcolor = imagecolorallocate ($this->pic, $R, $G, $B);
- $this->fontsize = $sz;
-
- }
-
- public function setnumstyle($R,$G,$B,$sz){
-
- $this->numcolor = imagecolorallocate ($this->pic, $R, $G, $B);
- $this->numsize = $sz;
-
- }
-
- private function incrust_player ( $cx, $cy, $name, $num){
- $textwidth = (strlen($name)*($this->fontsize+4))/2;
- $numwidth = (strlen($num)*($this->numsize+4))/2;
- imagestring(
- $this->pic,
- $this->fontsize,
- $cx - $textwidth,
- $cy,
- $name,
- $this->txtcolor);
- imagestring(
- $this->pic,
- $this->numsize,
- $cx-$numwidth,
- $cy + 12,
- $num,
- $this->numcolor);
- }
-
- protected function writeongraph ($location='UP'){
- if ( (isset($this->team)&& is_array($this->team)) ){
- $n = count ($this->team);
- for( $i=0 ; $i < $n ; $i++){
- switch ($this->team[$i]['poste']){
- case 'GB':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( ($this->width/2), 7*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/2),$this->height-(11*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
-
- }
- break;
- case 'ArCD':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/6), 21*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else $this->incrust_player ( 4*($this->width/6),$this->height-(25*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'ArCG':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 4*($this->width/6), 21*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else $this->incrust_player ( 2*($this->width/6),$this->height-(25*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'ArCC':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( ($this->width/2), 21*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/2), $this->height-(25*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
-
- }
- break;
- case 'ArLD':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( ($this->width/7), 30*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else $this->incrust_player ( 6*($this->width/7), $this->height-(35*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'ArLG':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 6*($this->width/7), 30*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else $this->incrust_player ( ($this->width/7), $this->height-(35*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
-
- }
- break;
- case 'MDC':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/2, 35*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( $this->width/2, $this->height - (40*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'MDD':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/3, 35*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( 2*($this->width/3), $this->height - (40*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'MDG':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/3), 35*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/3), $this->height - (40*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'MOD':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/3, 40*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( 2*($this->width/3), $this->height - (50*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'MOG':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/3), 40*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player (($this->width/3), $this->height - (50*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'MOC':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/2, 40*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( $this->width/2, $this->height - (50*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'AvD':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/6, 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( 5*($this->width/6), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'AvG':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 5*($this->width/6), 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/6), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'AvCD':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/3, 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( 2*($this->width/3), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'AvCG':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/3), 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/3), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- case 'AvCC':
- if ($this->team[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/2, 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
- else
- $this->incrust_player ( $this->width/2, $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
- }
- break;
- }
- }
- }
- else throw new Exception ('ERREUR DANS LE TABLEAU team');
- }
-
- public function build($location='UP') {
- parent::build();
- $this->writeongraph($location);
- }
-
- }
-
- class GRAPHDOMEXT extends COMPOSITIONGRAPH {
-
- private $teamext;
- private $colorext;
- private $numcolorext;
-
- public function __construct($tabdom, $tabext, $sc=5) {
- parent::__construct($tabdom, $sc);
- $this->teamext=$tabext;
- $this->colorext = imagecolorallocate($this->pic,0,0,120);
- $this->numcolorext = imagecolorallocate($this->pic,120,0,0);
- }
-
- private function incrust_player ( $cx, $cy, $name, $num){
- $textwidth = (strlen($name)*($this->fontsize+4))/2;
- $numwidth = (strlen($num)*($this->numsize+4))/2;
- imagestring(
- $this->pic,
- $this->fontsize,
- $cx - $textwidth,
- $cy,
- $name,
- $this->colorext);
- imagestring(
- $this->pic,
- $this->numsize,
- $cx-$numwidth,
- $cy + 12,
- $num,
- $this->numcolorext);
- }
-
- public function build($location='UP') {
- parent::build();
- $this->writeongraph($location);
- $this->addteamextongraph();
- }
-
- public function addteamextongraph ($location='DOWN'){
- if ( (isset($this->teamext)&& is_array($this->teamext)) ){
- $n = count ($this->teamext);
- for( $i=0 ; $i < $n ; $i++){
- switch ($this->teamext[$i]['poste']){
- case 'GB':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( ($this->width/2), 7*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/2),$this->height-(11*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
-
- }
- break;
- case 'ArCD':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/6), 21*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else $this->incrust_player ( 4*($this->width/6),$this->height-(25*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'ArCG':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 4*($this->width/6), 21*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else $this->incrust_player ( 2*($this->width/6),$this->height-(25*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'ArCC':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( ($this->width/2), 21*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/2), $this->height-(25*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
-
- }
- break;
- case 'ArLD':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( ($this->width/7), 30*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else $this->incrust_player ( 6*($this->width/7), $this->height-(35*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'ArLG':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 6*($this->width/7), 30*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else $this->incrust_player ( ($this->width/7), $this->height-(35*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
-
- }
- break;
- case 'MDC':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/2, 35*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( $this->width/2, $this->height - (40*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'MDD':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/3, 35*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( 2*($this->width/3), $this->height - (40*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'MDG':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/3), 35*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/3), $this->height - (40*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'MOD':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/3, 45*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( 2*($this->width/3), $this->height - (45*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'MOG':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/3), 45*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player (($this->width/3), $this->height - (45*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'MOC':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/2, 45*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( $this->width/2, $this->height - (45*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'AvD':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/6, 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( 5*($this->width/6), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'AvG':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 5*($this->width/6), 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/6), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'AvCD':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/3, 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( 2*($this->width/3), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'AvCG':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( 2*($this->width/3), 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( ($this->width/3), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- case 'AvCC':
- if ($this->teamext[$i]['titulaire']){
- if ($location=='UP')
- $this->incrust_player ( $this->width/2, 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- else
- $this->incrust_player ( $this->width/2, $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
- }
- break;
- }
- }
- }
- else throw new Exception('ERREUR DANS LE TABLEAU teamext');
- }
- }
-
- class BASKETGROUND extends IMGBASE{
-
- protected $scale;
- private $lineclr;// COULEUR DE LIGNE
- private $basketclr;
-
-
- public function __construct($w=15,$h=28,$sc=20){
-
- $this->scale = $sc;
- parent::__construct($w*$this->scale, $h*$this->scale, 228, 202, 152, 'image/png');
- //$this->bgcolor1 = imagecolorallocate ($this->pic ,228,202,152);
- $this->lineclr = imagecolorallocate ($this->pic, 255, 255, 255);
-
- }
- public function rotate ($deg) {
- $white = imagecolorallocate($this->pic, 255, 255, 255);
- $this->pic = imagerotate($this->pic, $deg, $white);
- }
- public function build() {
- imageline ($this->pic, 0, $this->height/2, $this->width, $this->height/2, $this->lineclr);
- imageellipse ($this->pic, $this->width/2, $this->height/2, 3.6*$this->scale, 3.6*$this->scale, $this->lineclr);
- //DESSIN RAQUETTE HAUT
- $col = imagecolorallocate($this->pic,100,10,10);
- imagearc($this->pic, $this->width/2, 1.20*$this->scale, 13*$this->scale, 13*$this->scale, 0, 180, $this->lineclr);
- imageline ($this->pic, ($this->width/2)-(6.50*$this->scale), 0, ($this->width/2)-(6.50*$this->scale), 1.20*$this->scale, $this->lineclr);
- imageline ($this->pic, $this->width-(($this->width/2)-(6.50*$this->scale)), 0, $this->width-(($this->width/2)-(6.50*$this->scale)), 1.20*$this->scale, $this->lineclr);
- imagefilledarc($this->pic, $this->width/2, 5.8*$this->scale, 3.6*$this->scale,3.6*$this->scale, 0, 180, $col, IMG_ARC_PIE);
- imageline ($this->pic, ($this->width/2)-(1.8*$this->scale), 5.8*$this->scale, ($this->width/2)+(1.8*$this->scale), 5.8*$this->scale,$this->lineclr);
- imageline ($this->pic, $this->width/2 - 3*$this->scale,0, $this->width/2 - 1.8*$this->scale, 5.8*$this->scale,$this->lineclr);
- imageline ($this->pic, $this->width/2 + 3*$this->scale,0, $this->width/2 + 1.8*$this->scale, 5.8*$this->scale,$this->lineclr);
-
- //DESSIN RAQUETTE BAS
-
- imagearc($this->pic, $this->width/2,$this->height-1.20*$this->scale, 13*$this->scale, 13*$this->scale, 180, 0, $this->lineclr);
- imageline ($this->pic, ($this->width/2)-(6.50*$this->scale), $this->height, ($this->width/2)-(6.50*$this->scale), $this->height-1.20*$this->scale, $this->lineclr);
- imageline ($this->pic, $this->width-(($this->width/2)-(6.50*$this->scale)), $this->height, $this->width-(($this->width/2)-(6.50*$this->scale)), $this->height-1.20*$this->scale, $this->lineclr);
- imagefilledarc($this->pic, $this->width/2, $this->height-5.8*$this->scale, 3.6*$this->scale,3.6*$this->scale, 180, 0, $col, IMG_ARC_PIE);
- imageline ($this->pic, ($this->width/2)-(1.8*$this->scale), $this->height-5.8*$this->scale, ($this->width/2)+(1.8*$this->scale), $this->height-5.8*$this->scale,$this->lineclr);
- imageline ($this->pic, $this->width/2 - 3*$this->scale,$this->height, $this->width/2 - 1.8*$this->scale, $this->height-5.8*$this->scale,$this->lineclr);
- imageline ($this->pic, $this->width/2 + 3*$this->scale,$this->height, $this->width/2 + 1.8*$this->scale, $this->height-5.8*$this->scale,$this->lineclr);
-
-
- imagefilltoborder ($this->pic, $this->width/2, 4*$this->scale,$this->bgcolor,$col);
- //PANIER HAUT
- $this->basketclr=imagecolorallocate($this->pic,0 ,0 ,0);
- imageline ($this->pic, ($this->width/2)-(0.9*$this->scale), 1.2*$this->scale, ($this->width/2)+(0.9*$this->scale), 1.2*$this->scale,$this->basketclr);
- imageline ($this->pic, $this->width/2, 0, $this->width/2, 1.2*$this->scale, $this->basketclr);
- imageellipse ($this->pic, $this->width/2, 1.4*$this->scale, 0.4*$this->scale, 0.4*$this->scale, $this->basketclr);
- //PANIER HAUT
- $this->basketclr=imagecolorallocate($this->pic,0 ,0 ,0);
- imageline ($this->pic, ($this->width/2)-(0.9*$this->scale), $this->height-1.2*$this->scale, ($this->width/2)+(0.9*$this->scale), $this->height-1.2*$this->scale,$this->basketclr);
- imageline ($this->pic, $this->width/2, $this->height, $this->width/2, $this->height-1.2*$this->scale, $this->basketclr);
- imageellipse ($this->pic, $this->width/2, $this->height-1.4*$this->scale, 0.4*$this->scale, 0.4*$this->scale, $this->basketclr);
-
- }
-
- }
-
- $joueurs = array (0 => array( 'poste' => 'GB',
- 'titulaire' => 1,
- 'numero' => '1',
- 'nom' => 'COUPET'),
- 1 => array( 'poste' => 'ArCD',
- 'titulaire' => 1,
- 'numero' => '2',
- 'nom' => 'THURAM'),
- 2 => array( 'poste' => 'ArCG',
- 'titulaire' => 1,
- 'numero' => '5',
- 'nom' => 'GALLAS'),
- 3 => array( 'poste' => 'ArLD',
- 'titulaire' => 1,
- 'numero' => '15',
- 'nom' => 'SAGNOL'),
- 4 => array( 'poste' => 'ArLG',
- 'titulaire' => 1,
- 'numero' => '14',
- 'nom' => 'REVEILLERE'),
- 5 => array( 'poste' => 'MDC',
- 'titulaire' => 1,
- 'numero' => '4',
- 'nom' => 'VIEIRA'),
- 6 => array( 'poste' => 'MOD',
- 'titulaire' => 1,
- 'numero' => '6',
- 'nom' => 'MAKELELE'),
- 7 => array( 'poste' => 'MOG',
- 'titulaire' => 1,
- 'numero' => '10',
- 'nom' => 'ZIDANE'),
- 8 => array( 'poste' => 'AvD',
- 'titulaire' => 1,
- 'numero' => '8',
- 'nom' => 'GIULY'),
- 9 => array( 'poste' => 'AvG',
- 'titulaire' => 1,
- 'numero' => '12',
- 'nom' => 'HENRY'),
- 10 => array( 'poste' => 'AvCC',
- 'titulaire' => 1,
- 'numero' => '20',
- 'nom' => 'TREZEGUET')
- );
-
- $adversaires = array (
- 0 => array( 'poste' => 'GB',
- 'titulaire' => 1,
- 'numero' => '16',
- 'nom' => 'BARTHEZ'),
- 1 => array( 'poste' => 'ArCD',
- 'titulaire' => 1,
- 'numero' => '21',
- 'nom' => 'BOUMSONG'),
- 2 => array( 'poste' => 'ArCC',
- 'titulaire' => 1,
- 'numero' => '18',
- 'nom' => 'MEXES'),
- 3 => array( 'poste' => 'ArLD',
- 'titulaire' => 1,
- 'numero' => '19',
- 'nom' => 'EVRA'),
- 4 => array( 'poste' => 'ArCG',
- 'titulaire' => 1,
- 'numero' => '17',
- 'nom' => 'MONTSOREAU'),
- 5 => array( 'poste' => 'MDC',
- 'titulaire' => 1,
- 'numero' => '26',
- 'nom' => 'DIARRA'),
- 6 => array( 'poste' => 'MOD',
- 'titulaire' => 1,
- 'numero' => '7',
- 'nom' => 'DHORASSO'),
- 7 => array( 'poste' => 'MOG',
- 'titulaire' => 1,
- 'numero' => '22',
- 'nom' => 'MICOUD'),
- 8 => array( 'poste' => 'AvCD',
- 'titulaire' => 1,
- 'numero' => '13',
- 'nom' => 'WILTORD'),
- 9 => array( 'poste' => 'ArLG',
- 'titulaire' => 1,
- 'numero' => '23',
- 'nom' => 'MALOUDA'),
- 10 => array( 'poste' => 'AvCG',
- 'titulaire' => 1,
- 'numero' => '9',
- 'nom' => 'SAHA')
- );
-
-
- try {
- $terrain = new SOCCERGROUND(55,95,4);
- $terrain->setname('images/terrain');
- $terrain->build();
- $terrain->display();
- echo ' ';
- $terrainmini = new SOCCERGROUND(45,90,4);
- $terrainmini->setname('images/mini');
- $terrainmini->build();
- $terrainmini->display();
- echo ' ';
- //echo ('<br>');
- $ext=new GRAPHDOMEXT ($joueurs,$adversaires,5);
- $ext->settxtstyle (200,200,200,3);
- $ext->setnumstyle (0,0,100,3);
- $ext->build();
- $ext->display();
- //echo ('<br>');
- $terrainmaxi = new SOCCERGROUND(90,120,4);
- $terrainmaxi->setname('images/maxi');
- $terrainmaxi->build();
-
- $terrainmaxi->rotate(90);
- $terrainmaxi->display();
- $test = new BASKETGROUND(15,28,20);
- $test -> setname('images/tmp');
- $test->build();
- $test->rotate(90);
- //header ('Content-Type : image/png');
- //$test->toscreen();
- $test->display();
- }
- catch(Exception $e){
- echo ($e->getMessage());
- }
-
- ?>
<?php
class IMGBASE {
protected $width;
protected $height;
protected $bgcolor; //RESSOURCE COLOR
protected $pic; //RESSOURCE IMAGE
protected $format;
protected $name;
protected $extension;
public function __construct ($pwidth=100, $pheight=100, $pR=245, $pG=245, $pB=245, $pformat='image/png'){
$this->width = $pwidth;
$this->height = $pheight;
$this->format = $pformat;
$this->name = 'tmp';
if (!($this->pic = imagecreate ($this->width, $this->height)))
throw new Exception ('<font color ="red"><b>EXCEPTION ATTRAPEE :impossible de creer l\'image.</b></font>');
if (($this->bgcolor = imagecolorallocate ($this->pic, $pR, $pG, $pB))===-1)
throw new Exception ('<font color ="red"><b>EXCEPTION ATTRAPEE :Impossible d\'allouer une couleur de fond</b></font>');
}
public function setname ($name){
$this->name = $name;
}
public function display() {
$this->tofile();
echo '<img src="'.$this->name.'.'.$this->extension.'">';
}
public function toscreen(){
if (!$this->pic) throw new Exception ('Impossible d afficher l\'image');
$a=array('image/jpeg'=>'imagejpeg', 'image/png'=>'imagepng', 'image/gif'=>'imagegif');
$b=$a[$this->format];
$b($this->pic);
}
public function tofile(){
if (!is_dir(dirname( $this->name)))
throw new Exception ('Impossible de créer le fichier '.$this->name.' dans le répertoire '.dirname($this->name));
$a=array('image/jpeg'=>'imagejpeg', 'image/png'=>'imagepng', 'image/gif'=>'imagegif');
$b=$a[$this->format];
$b($this->pic,$this->name.'.'.$this->extension);
if ($this->pic)
imagedestroy($this->pic);
}
}
class SOCCERGROUND extends IMGBASE {
protected $scale ;//on multiplie la valeur en pixel par ce nombre pour avoir l'affichage
private $lineclr;// COULEUR DE LIGNE
private $darkgrass;//ID COULEUR DE TONTE
private function colorizegrass(){
$this->darkgrass = imagecolorallocate ($this->pic, 0, 120, 0);
for ($i=1 ; $i < 17 ; $i+=2){
imagefilledrectangle ($this->pic, 0, $i*($this->height/16), $this->width, ($i+1)*($this->height/16), $this->darkgrass);
}
}
public function setscale ($sc){
$this->scale=$sc;
}
public function __construct($w=70,$h=105,$sc=5){
$this->scale = $sc;
parent::__construct($w*$this->scale, $h*$this->scale, 0, 150, 0, 'image/png');
$this->lineclr = imagecolorallocate ($this->pic, 255, 255, 255);
}
private function draw_mediane () {
imageline($this->pic, 0, $this->height/2, $this->width, $this->height/2, $this->lineclr);
}
private function draw_medium_circle () {
imageellipse ($this->pic, $this->width/2, $this->height/2, 18.3*$this->scale, 18.3*$this->scale, $this->lineclr);
imagefilledellipse(
$this->pic,
$this->width/2,
$this->height/2,
5,
5,
$this->lineclr
);
}
private function draw_gk_zone () {
$XUpMd = $this->width/2;
$YUpMd = 0;
$XDnMd = $this->width/2;
$YDnMd = $this->height;
//BUT DU HAUT
imageline (
$this->pic,
$XUpMd-((7 * ($this->scale))/2),
$YUpMd ,
$XUpMd-((7 * ($this->scale))/2),
$YUpMd + 5,
$this->lineclr
);
imageline (
$this->pic,
$XUpMd+((7 * ($this->scale))/2),
$YUpMd ,
$XUpMd+((7 * ($this->scale))/2),
$YUpMd + 5,
$this->lineclr
);
//BUT DU BAS
imageline (
$this->pic,
$XDnMd-((7 * ($this->scale))/2),
$YDnMd ,
$XDnMd-((7 * ($this->scale))/2),
$YDnMd - 10,
$this->lineclr
);
imageline (
$this->pic,
$XDnMd+((7 * ($this->scale))/2),
$YDnMd ,
$XDnMd+((7 * ($this->scale))/2),
$YDnMd - 10,
$this->lineclr
);
imageline (
$this->pic,
$XDnMd - ((7 * ($this->scale))/2),
$YDnMd - 10,
$XDnMd + ((7 * ($this->scale))/2),
$YDnMd - 10,
$this->lineclr
);
//PETIT RECTANGLE BUT DU BAS
imageline (
$this->pic,
$XDnMd - (9 * $this->scale),
$YDnMd,
$XDnMd - (9 * $this->scale),
$YDnMd - (5.5 * $this->scale),
$this->lineclr
);
imageline (
$this->pic,
$XDnMd + (9 * $this->scale),
$YDnMd,
$XDnMd + (9 * $this->scale),
$YDnMd - (5.5 * $this->scale),
$this->lineclr
);
imageline (
$this->pic,
$XDnMd - (9 * $this->scale),
$YDnMd - (5.5 * $this->scale),
$XDnMd + (9 * $this->scale),
$YDnMd - (5.5 * $this->scale),
$this->lineclr
);
//PETIT RECTANGLE BUT DU HAUT
imageline (
$this->pic,
$XUpMd - (9 * $this->scale),
$YUpMd,
$XUpMd - (9 * $this->scale),
$YUpMd + (5.5 * $this->scale),
$this->lineclr
);
imageline (
$this->pic,
$XUpMd + (9 * $this->scale),
$YUpMd,
$XUpMd + (9 * $this->scale),
$YUpMd + (5.5 * $this->scale),
$this->lineclr
);
imageline (
$this->pic,
$XUpMd - (9 * $this->scale),
$YUpMd + (5.5 * $this->scale),
$XUpMd + (9 * $this->scale),
$YUpMd + (5.5 * $this->scale),
$this->lineclr
);
//POINT PENALTY DU HAUT
imagefilledellipse(
$this->pic,
$XUpMd,
11 * $this->scale,
5,
5,
$this->lineclr
);
//POINT PENALTY DU BAS
imagefilledellipse(
$this->pic,
$XDnMd,
$YDnMd-(11 * $this->scale),
5,
5,
$this->lineclr
);
//SURFACE DU HAUT
imageline (
$this->pic,
$XUpMd - (20*$this->scale),
0,
$XUpMd - (20*$this->scale),
16.5 * $this->scale,
$this->lineclr
);
imageline (
$this->pic,
$XUpMd + (20*$this->scale),
0,
$XUpMd + (20*$this->scale),
16.5 * $this->scale,
$this->lineclr
);
imageline (
$this->pic,
$XUpMd - (20*$this->scale),
16.5 * $this->scale,
$XUpMd + (20*$this->scale),
16.5 * $this->scale,
$this->lineclr
);
//SURFACE DU BAS
imageline (
$this->pic,
$XDnMd - (20*$this->scale),
$YDnMd,
$XDnMd - (20*$this->scale),
$YDnMd - (16.5 * $this->scale),
$this->lineclr
);
imageline (
$this->pic,
$XDnMd + (20*$this->scale),
$YDnMd,
$XDnMd + (20*$this->scale),
$YDnMd - (16.5 * $this->scale),
$this->lineclr
);
imageline (
$this->pic,
$XDnMd - (20*$this->scale),
$YDnMd - (16.5 * $this->scale),
$XDnMd + (20*$this->scale),
$YDnMd - (16.5 * $this->scale),
$this->lineclr
);
//ARC BAS
imagearc(
$this->pic,
$XDnMd,
$YDnMd-(11 * $this->scale),
18.3 * $this->scale,
18.3 * $this->scale,
180+36.95,
-36.95,
$this->lineclr
);
//ARC HAUT
imagearc(
$this->pic,
$XUpMd,
11 * $this->scale,
18.3 * $this->scale,
18.3 * $this->scale,
+36.95,
180-36.95,
$this->lineclr
);
}
public function rotate($deg){
$white = imagecolorallocate($this->pic, 255, 255, 255);
$this->pic = imagerotate($this->pic, $deg, $white);
}
public function build (){
$this->colorizegrass();
$this->draw_mediane();
$this->draw_medium_circle();
$this->draw_gk_zone ();
}
}
class COMPOSITIONGRAPH extends SOCCERGROUND{
private $team = array();
protected $txtcolor;
protected $fontsize;
protected $numcolor;
protected $numsize;
protected $font;
public function __construct($tm=NULL,$psc=5){
parent::__construct(70,105,$psc);
if (isset($tm)&&is_array($tm) ){
$this->team = $tm;
//echo $tm[0]['poste'];
}else throw new Exception('ERREUR DANS LE TABLEAU team');
$this->txtcolor = imagecolorallocate ($this->pic, 0, 0, 200);
$this->numcolor = imagecolorallocate ($this->pic, 255, 0, 0);
$this->fontsize = 3;
$this->numsize = 4;
}
/* public function rotate180(){
$this->pic=imagerotate($this->pic,180,0);
}*/
public function settxtstyle($R,$G,$B,$sz){
$this->txtcolor = imagecolorallocate ($this->pic, $R, $G, $B);
$this->fontsize = $sz;
}
public function setnumstyle($R,$G,$B,$sz){
$this->numcolor = imagecolorallocate ($this->pic, $R, $G, $B);
$this->numsize = $sz;
}
private function incrust_player ( $cx, $cy, $name, $num){
$textwidth = (strlen($name)*($this->fontsize+4))/2;
$numwidth = (strlen($num)*($this->numsize+4))/2;
imagestring(
$this->pic,
$this->fontsize,
$cx - $textwidth,
$cy,
$name,
$this->txtcolor);
imagestring(
$this->pic,
$this->numsize,
$cx-$numwidth,
$cy + 12,
$num,
$this->numcolor);
}
protected function writeongraph ($location='UP'){
if ( (isset($this->team)&& is_array($this->team)) ){
$n = count ($this->team);
for( $i=0 ; $i < $n ; $i++){
switch ($this->team[$i]['poste']){
case 'GB':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( ($this->width/2), 7*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( ($this->width/2),$this->height-(11*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'ArCD':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/6), 21*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else $this->incrust_player ( 4*($this->width/6),$this->height-(25*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'ArCG':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 4*($this->width/6), 21*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else $this->incrust_player ( 2*($this->width/6),$this->height-(25*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'ArCC':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( ($this->width/2), 21*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( ($this->width/2), $this->height-(25*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'ArLD':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( ($this->width/7), 30*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else $this->incrust_player ( 6*($this->width/7), $this->height-(35*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'ArLG':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 6*($this->width/7), 30*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else $this->incrust_player ( ($this->width/7), $this->height-(35*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'MDC':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/2, 35*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( $this->width/2, $this->height - (40*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'MDD':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/3, 35*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( 2*($this->width/3), $this->height - (40*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'MDG':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/3), 35*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( ($this->width/3), $this->height - (40*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'MOD':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/3, 40*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( 2*($this->width/3), $this->height - (50*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'MOG':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/3), 40*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player (($this->width/3), $this->height - (50*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'MOC':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/2, 40*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( $this->width/2, $this->height - (50*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'AvD':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/6, 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( 5*($this->width/6), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'AvG':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 5*($this->width/6), 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( ($this->width/6), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'AvCD':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/3, 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( 2*($this->width/3), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'AvCG':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/3), 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( ($this->width/3), $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
case 'AvCC':
if ($this->team[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/2, 55*$this->scale, $this->team[$i]['nom'], $this->team[$i]['numero']);
else
$this->incrust_player ( $this->width/2, $this->height - (60*$this->scale), $this->team[$i]['nom'], $this->team[$i]['numero']);
}
break;
}
}
}
else throw new Exception ('ERREUR DANS LE TABLEAU team');
}
public function build($location='UP') {
parent::build();
$this->writeongraph($location);
}
}
class GRAPHDOMEXT extends COMPOSITIONGRAPH {
private $teamext;
private $colorext;
private $numcolorext;
public function __construct($tabdom, $tabext, $sc=5) {
parent::__construct($tabdom, $sc);
$this->teamext=$tabext;
$this->colorext = imagecolorallocate($this->pic,0,0,120);
$this->numcolorext = imagecolorallocate($this->pic,120,0,0);
}
private function incrust_player ( $cx, $cy, $name, $num){
$textwidth = (strlen($name)*($this->fontsize+4))/2;
$numwidth = (strlen($num)*($this->numsize+4))/2;
imagestring(
$this->pic,
$this->fontsize,
$cx - $textwidth,
$cy,
$name,
$this->colorext);
imagestring(
$this->pic,
$this->numsize,
$cx-$numwidth,
$cy + 12,
$num,
$this->numcolorext);
}
public function build($location='UP') {
parent::build();
$this->writeongraph($location);
$this->addteamextongraph();
}
public function addteamextongraph ($location='DOWN'){
if ( (isset($this->teamext)&& is_array($this->teamext)) ){
$n = count ($this->teamext);
for( $i=0 ; $i < $n ; $i++){
switch ($this->teamext[$i]['poste']){
case 'GB':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( ($this->width/2), 7*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( ($this->width/2),$this->height-(11*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'ArCD':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/6), 21*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else $this->incrust_player ( 4*($this->width/6),$this->height-(25*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'ArCG':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 4*($this->width/6), 21*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else $this->incrust_player ( 2*($this->width/6),$this->height-(25*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'ArCC':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( ($this->width/2), 21*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( ($this->width/2), $this->height-(25*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'ArLD':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( ($this->width/7), 30*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else $this->incrust_player ( 6*($this->width/7), $this->height-(35*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'ArLG':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 6*($this->width/7), 30*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else $this->incrust_player ( ($this->width/7), $this->height-(35*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'MDC':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/2, 35*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( $this->width/2, $this->height - (40*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'MDD':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/3, 35*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( 2*($this->width/3), $this->height - (40*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'MDG':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/3), 35*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( ($this->width/3), $this->height - (40*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'MOD':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/3, 45*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( 2*($this->width/3), $this->height - (45*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'MOG':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/3), 45*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player (($this->width/3), $this->height - (45*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'MOC':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/2, 45*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( $this->width/2, $this->height - (45*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'AvD':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/6, 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( 5*($this->width/6), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'AvG':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 5*($this->width/6), 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( ($this->width/6), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'AvCD':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/3, 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( 2*($this->width/3), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'AvCG':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( 2*($this->width/3), 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( ($this->width/3), $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
case 'AvCC':
if ($this->teamext[$i]['titulaire']){
if ($location=='UP')
$this->incrust_player ( $this->width/2, 55*$this->scale, $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
else
$this->incrust_player ( $this->width/2, $this->height - (60*$this->scale), $this->teamext[$i]['nom'], $this->teamext[$i]['numero']);
}
break;
}
}
}
else throw new Exception('ERREUR DANS LE TABLEAU teamext');
}
}
class BASKETGROUND extends IMGBASE{
protected $scale;
private $lineclr;// COULEUR DE LIGNE
private $basketclr;
public function __construct($w=15,$h=28,$sc=20){
$this->scale = $sc;
parent::__construct($w*$this->scale, $h*$this->scale, 228, 202, 152, 'image/png');
//$this->bgcolor1 = imagecolorallocate ($this->pic ,228,202,152);
$this->lineclr = imagecolorallocate ($this->pic, 255, 255, 255);
}
public function rotate ($deg) {
$white = imagecolorallocate($this->pic, 255, 255, 255);
$this->pic = imagerotate($this->pic, $deg, $white);
}
public function build() {
imageline ($this->pic, 0, $this->height/2, $this->width, $this->height/2, $this->lineclr);
imageellipse ($this->pic, $this->width/2, $this->height/2, 3.6*$this->scale, 3.6*$this->scale, $this->lineclr);
//DESSIN RAQUETTE HAUT
$col = imagecolorallocate($this->pic,100,10,10);
imagearc($this->pic, $this->width/2, 1.20*$this->scale, 13*$this->scale, 13*$this->scale, 0, 180, $this->lineclr);
imageline ($this->pic, ($this->width/2)-(6.50*$this->scale), 0, ($this->width/2)-(6.50*$this->scale), 1.20*$this->scale, $this->lineclr);
imageline ($this->pic, $this->width-(($this->width/2)-(6.50*$this->scale)), 0, $this->width-(($this->width/2)-(6.50*$this->scale)), 1.20*$this->scale, $this->lineclr);
imagefilledarc($this->pic, $this->width/2, 5.8*$this->scale, 3.6*$this->scale,3.6*$this->scale, 0, 180, $col, IMG_ARC_PIE);
imageline ($this->pic, ($this->width/2)-(1.8*$this->scale), 5.8*$this->scale, ($this->width/2)+(1.8*$this->scale), 5.8*$this->scale,$this->lineclr);
imageline ($this->pic, $this->width/2 - 3*$this->scale,0, $this->width/2 - 1.8*$this->scale, 5.8*$this->scale,$this->lineclr);
imageline ($this->pic, $this->width/2 + 3*$this->scale,0, $this->width/2 + 1.8*$this->scale, 5.8*$this->scale,$this->lineclr);
//DESSIN RAQUETTE BAS
imagearc($this->pic, $this->width/2,$this->height-1.20*$this->scale, 13*$this->scale, 13*$this->scale, 180, 0, $this->lineclr);
imageline ($this->pic, ($this->width/2)-(6.50*$this->scale), $this->height, ($this->width/2)-(6.50*$this->scale), $this->height-1.20*$this->scale, $this->lineclr);
imageline ($this->pic, $this->width-(($this->width/2)-(6.50*$this->scale)), $this->height, $this->width-(($this->width/2)-(6.50*$this->scale)), $this->height-1.20*$this->scale, $this->lineclr);
imagefilledarc($this->pic, $this->width/2, $this->height-5.8*$this->scale, 3.6*$this->scale,3.6*$this->scale, 180, 0, $col, IMG_ARC_PIE);
imageline ($this->pic, ($this->width/2)-(1.8*$this->scale), $this->height-5.8*$this->scale, ($this->width/2)+(1.8*$this->scale), $this->height-5.8*$this->scale,$this->lineclr);
imageline ($this->pic, $this->width/2 - 3*$this->scale,$this->height, $this->width/2 - 1.8*$this->scale, $this->height-5.8*$this->scale,$this->lineclr);
imageline ($this->pic, $this->width/2 + 3*$this->scale,$this->height, $this->width/2 + 1.8*$this->scale, $this->height-5.8*$this->scale,$this->lineclr);
imagefilltoborder ($this->pic, $this->width/2, 4*$this->scale,$this->bgcolor,$col);
//PANIER HAUT
$this->basketclr=imagecolorallocate($this->pic,0 ,0 ,0);
imageline ($this->pic, ($this->width/2)-(0.9*$this->scale), 1.2*$this->scale, ($this->width/2)+(0.9*$this->scale), 1.2*$this->scale,$this->basketclr);
imageline ($this->pic, $this->width/2, 0, $this->width/2, 1.2*$this->scale, $this->basketclr);
imageellipse ($this->pic, $this->width/2, 1.4*$this->scale, 0.4*$this->scale, 0.4*$this->scale, $this->basketclr);
//PANIER HAUT
$this->basketclr=imagecolorallocate($this->pic,0 ,0 ,0);
imageline ($this->pic, ($this->width/2)-(0.9*$this->scale), $this->height-1.2*$this->scale, ($this->width/2)+(0.9*$this->scale), $this->height-1.2*$this->scale,$this->basketclr);
imageline ($this->pic, $this->width/2, $this->height, $this->width/2, $this->height-1.2*$this->scale, $this->basketclr);
imageellipse ($this->pic, $this->width/2, $this->height-1.4*$this->scale, 0.4*$this->scale, 0.4*$this->scale, $this->basketclr);
}
}
$joueurs = array (0 => array( 'poste' => 'GB',
'titulaire' => 1,
'numero' => '1',
'nom' => 'COUPET'),
1 => array( 'poste' => 'ArCD',
'titulaire' => 1,
'numero' => '2',
'nom' => 'THURAM'),
2 => array( 'poste' => 'ArCG',
'titulaire' => 1,
'numero' => '5',
'nom' => 'GALLAS'),
3 => array( 'poste' => 'ArLD',
'titulaire' => 1,
'numero' => '15',
'nom' => 'SAGNOL'),
4 => array( 'poste' => 'ArLG',
'titulaire' => 1,
'numero' => '14',
'nom' => 'REVEILLERE'),
5 => array( 'poste' => 'MDC',
'titulaire' => 1,
'numero' => '4',
'nom' => 'VIEIRA'),
6 => array( 'poste' => 'MOD',
'titulaire' => 1,
'numero' => '6',
'nom' => 'MAKELELE'),
7 => array( 'poste' => 'MOG',
'titulaire' => 1,
'numero' => '10',
'nom' => 'ZIDANE'),
8 => array( 'poste' => 'AvD',
'titulaire' => 1,
'numero' => '8',
'nom' => 'GIULY'),
9 => array( 'poste' => 'AvG',
'titulaire' => 1,
'numero' => '12',
'nom' => 'HENRY'),
10 => array( 'poste' => 'AvCC',
'titulaire' => 1,
'numero' => '20',
'nom' => 'TREZEGUET')
);
$adversaires = array (
0 => array( 'poste' => 'GB',
'titulaire' => 1,
'numero' => '16',
'nom' => 'BARTHEZ'),
1 => array( 'poste' => 'ArCD',
'titulaire' => 1,
'numero' => '21',
'nom' => 'BOUMSONG'),
2 => array( 'poste' => 'ArCC',
'titulaire' => 1,
'numero' => '18',
'nom' => 'MEXES'),
3 => array( 'poste' => 'ArLD',
'titulaire' => 1,
'numero' => '19',
'nom' => 'EVRA'),
4 => array( 'poste' => 'ArCG',
'titulaire' => 1,
'numero' => '17',
'nom' => 'MONTSOREAU'),
5 => array( 'poste' => 'MDC',
'titulaire' => 1,
'numero' => '26',
'nom' => 'DIARRA'),
6 => array( 'poste' => 'MOD',
'titulaire' => 1,
'numero' => '7',
'nom' => 'DHORASSO'),
7 => array( 'poste' => 'MOG',
'titulaire' => 1,
'numero' => '22',
'nom' => 'MICOUD'),
8 => array( 'poste' => 'AvCD',
'titulaire' => 1,
'numero' => '13',
'nom' => 'WILTORD'),
9 => array( 'poste' => 'ArLG',
'titulaire' => 1,
'numero' => '23',
'nom' => 'MALOUDA'),
10 => array( 'poste' => 'AvCG',
'titulaire' => 1,
'numero' => '9',
'nom' => 'SAHA')
);
try {
$terrain = new SOCCERGROUND(55,95,4);
$terrain->setname('images/terrain');
$terrain->build();
$terrain->display();
echo ' ';
$terrainmini = new SOCCERGROUND(45,90,4);
$terrainmini->setname('images/mini');
$terrainmini->build();
$terrainmini->display();
echo ' ';
//echo ('<br>');
$ext=new GRAPHDOMEXT ($joueurs,$adversaires,5);
$ext->settxtstyle (200,200,200,3);
$ext->setnumstyle (0,0,100,3);
$ext->build();
$ext->display();
//echo ('<br>');
$terrainmaxi = new SOCCERGROUND(90,120,4);
$terrainmaxi->setname('images/maxi');
$terrainmaxi->build();
$terrainmaxi->rotate(90);
$terrainmaxi->display();
$test = new BASKETGROUND(15,28,20);
$test -> setname('images/tmp');
$test->build();
$test->rotate(90);
//header ('Content-Type : image/png');
//$test->toscreen();
$test->display();
}
catch(Exception $e){
echo ($e->getMessage());
}
?>
Conclusion
Ces classes sans prétentions peuvent être utiles aux webmasters et développeurs de sites dédiés au sport.
On peut gérer l'echelle du terrain en passant dans le constructeur l'echelle (scale) en parametre lors de l'appel avec new. Voir exemple en bas du script (5 par défaut = multiplie les dimensions par 5). Les terrains sont dessinés suivant les normes officielles des fédérations internationales.
Historique
- 12 février 2006 14:37:22 :
- Petites rectifs suite aux remarques de FhX et coucou747 (gestion des erreurs).
MODIFS :
AJOUT d'une classe pour créer la composition de 2 équipes s'affrontant
AJOUT d'une classe pour creer un terrain de basket .(BASKETGROUND).
- 12 février 2006 21:13:12 :
- Mise en ligne du zip pour les flémards qui n'aiment pas le copier-coller :-)
- 13 février 2006 20:10:28 :
- remplacement switch
Sources du même auteur
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
génération d'une page php par php [ par Vapula ]
Bonjour à tousJe souhaiterais générer une page php grâce à une fonction php , mais le problème est que la fonction envoie bien le code html, et php SA
Préchargement d'images [ par fgerm76 ]
Bonjour à tous,pour que l'affichage de mon calque soit instantané, j'ai besoin de précharger les images le composant.Et ensuite d'affecter ces images
g l'adresse d'une images qui est contenu dans le chjamps d'une table et ... [ par Ethan00000 ]
je programme en php et je debute si tu sais m'aider ce serais sympa.j'ai une base de données dans laquelle j'ai une table qui contient un champs "imag
MySQL et images [ par Marneus Calgar ]
SalutJ'aimerais savoir s'il est possible de stocker des images dans une table MySQL et d'y accéder depuis une page PHP. En fait, je voudrais faire un
MySQL et images [ par Marneus Calgar ]
SalutJ'aimerais savoir s'il est possible de stocker des images dans une table MySQL et d'y accéder depuis une page PHP. En fait, je voudrais faire un
Lecture d'un dossier... [ par RockmanX ]
Voila mon "problème":Dans le dossier ci-dessous, il y a des images nommées:smile1.gif,smile2.gif,...smile8.gifj''ai écrit le script ci-dessous mais au
Inclure a partir d'un rep different [ par fabiin ]
Salutavoir voila mon problème:J'ai un fichier/dossier/monfichier.phpki inclu une page /page.phpet dans cette page il y a une image /images/machin.gifO
des images dans un tablo !!! [ par penchaki ]
voilà j'ai des images, avec des titres, que j'ai mise dans une base donnée ... jusque là pas de problémepar contre je voudrais les afficher en lignes
upload d'images [ par psychodingue ]
salut tout le monde,moi j'ai un gros prob.J'ai fait un site pour une entreprise qui vend du matos info, et donc dedant y'a une administration pour ajo
Vérifier l'extention l'ors d'uppload [ par BirD ]
Hello, je suis en train de faire un site avec lequel on peut upploader des images. Je veux fair un test afin que ce qu'on uppload soit bien des images
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Forum
GOOGLE MAPGOOGLE MAP par fatmanajjar
Cliquez pour lire la suite par fatmanajjar
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|