Accueil > > > AFFICHAGE TABLEAU AVEC TEMPLATE CLASSE
AFFICHAGE TABLEAU AVEC TEMPLATE CLASSE
Information sur la source
Description
Ce script vous permettra d'afficher un tableau chargé en mémoire à l'avance. Il y a plusieurs fonctions que vous pouvez explorer dans le fichier table.class.php ou directement dans la documentation fournie ! Avec ce script, vous n'aurez plus à taper <table><tr><td>... tout est automatique ! Compatible PHP4, PHP5 Vous devez obligatoirement mettre $null comme 4e paramètre si vous n'avez pas d'objet parent. En PHP4, lorsque vous assignez l'objet à une variable et que vous voulez garder tous les liens des classes, il faut mettre la perluète &... ce qui donne $obj =& new LSTable( 1, 1, '100', $other_table ); Normalement, si votre 4e paramètre est $null, il n'est pas nécessaire de sauvegarder le new LSTable avec la perluète.
Source
- <?php
- //////////////////////////////////////////////////////////////////////
- // table.class.php
- //--------------------------------------------------------------------
- //
- // Class Table - You can modify the define values
- //
- //--------------------------------------------------------------------
- // Revision History
- // v1.05 01 jan 2004 Jean-Sebastien Goupil - Adding check is_object when setText()
- // v1.04 09 dec 2004 Jean-Sebastien Goupil - Correct ; after
- // V1.03 23 sep 2004 Jean-Sebastien Goupil - Add Better Row,Col Span Function
- // V1.02 26 aug 2004 Jean-Sebastien Goupil - Many Bugs Cor.
- // V1.01 25 aug 2004 Jean-Sebastien Goupil - Error init Col
- // V1.00 23 aug 2004 Jean-Sebastien Goupil
- //--------------------------------------------------------------------
- // Copyright (C) Jean-Sebastien Goupil
- // http://other.lookstrike.com/
- //--------------------------------------------------------------------
- //////////////////////////////////////////////////////////////////////
- define( 'TABLE_DEFAULT_ROW_HIDDEN', FALSE );
- define( 'TABLE_DEFAULT_COL_HIDDEN', FALSE );
- define( 'TABLE_DEFAULT_CELL_VALUE', ' ' ); // If ' ', a cell will appear, if NULL, no cell will appear
- define( 'TABLE_DEFAULT_TEMPLATE', 'tpl_LS' );
-
- include( 'template.php' );
- class LSTable {
- // PRIVATE ARGUMENTS
- var $template; // string
- var $numRows, $numCols; // int
- var $title; // string
- var $text = array(); // string
- var $cellsAttributes = array(), $rowsAttributes = array(); // string
- var $hiddenRows = array(), $hiddenCols = array(); // bool
- var $width; // string
-
- var $temp_col; // int
- var $temp_ascending; // bool
-
- // PUBLIC FUNCTIONS
- /**
- * @return
- * @param int $numRows
- * @param int $numCols
- * @param string $width
- * @param object $parent
- * @desc Constructor. You can put a $parent object. This will search the first empty place into the parent.
- **/
- function LSTable ( $numRows, $numCols, $width, &$parent ) {
- $this->numRows = intval( $numRows );
- $this->numCols = intval( $numCols );
- for( $i = 0; $i < $numRows; $i++ )
- $this->_setVariable( $i );
- for( $i = 0; $i < $numCols; $i++ )
- $this->hiddenCols[ $i ] = TABLE_DEFAULT_COL_HIDDEN;
- $this->title = '';
- $this->width = strval( $width );
-
- if( defined( 'TABLE_DEFAULT_TEMPLATE' ) )
- $this->setTemplate( TABLE_DEFAULT_TEMPLATE );
-
- // We look for an empty place if $parent isn't null
- if( is_object( $parent ) ) {
- $stop = false;
- for( $i = 0; $i < $parent->numRows; $i++ ) {
- for( $j = 0; $j < $parent->numCols; $j++ ) {
- if( $parent->text[ $i ][ $j ] == TABLE_DEFAULT_CELL_VALUE ) {
- $parent->text[ $i ][ $j ] =& $this;
- $stop = true;
- }
- if( $stop == true )
- break;
- }
- if( $stop == true )
- break;
- }
- }
- }
-
- // No destructor for PHP4
- //function __destruct() {
- //
- //}
-
- /**
- * @return void
- * @param int $row
- * @param int $col
- * @param mixed $string
- * @desc Writes Text or Object into $row and $col.
- **/
- function setText ( $row, $col, $string ) {
- if( !is_object( $string ) )
- $string = strval( $string );
- if( is_int( $row ) && is_int( $col ) )
- if( $row < $this->numRows && $col < $this->numCols )
- $this->text[ $row ][ $col ] = $string;
- }
-
- /**
- * @return void
- * @param int $row
- * @param int $col
- * @param string $attrib
- * @param mixed $value
- * @desc Adds a Cell Attribute at $row and $col.
- **/
- function addCellAttribute ( $row, $col, $attrib, $value ) {
- if( is_int( $row ) && is_int( $col ) && is_string( $attrib ) )
- if( $row < $this->numRows && $col < $this->numCols )
- $this->cellsAttributes[ $row ][ $col ][ strtolower( $attrib ) ] = $value;
- }
-
- /**
- * @return void
- * @param int $row
- * @param int $col
- * @param string $attrib
- * @desc Deletes a Cell Attribute at $row and $col.
- **/
- function delCellAttribute ( $row, $col, $attrib ) {
- if( is_int( $row ) && is_int( $col ) && is_string( $attrib ) )
- if( $row < $this->numRows && $col < $this->numCols )
- unset( $this->cellsAttributes[ $row ][ $col ][ strtolower( $attrib ) ] );
- }
-
- /**
- * @return void
- * @param int $row
- * @param string $attrib
- * @param mixed $value
- * @desc Adds a Row Attribute at $row. Will be located in TR.
- **/
- function addRowAttribute ( $row, $attrib, $value ) {
- if( is_int( $row ) && is_string( $attrib ) )
- if( $row < $this->numRows )
- $this->rowsAttributes[ $row ][ strtolower( $attrib ) ] = $value;
- }
-
- /**
- * @return void
- * @param int $row
- * @param string $attrib
- * @desc Deletes a Row Attribute at $row.
- **/
- function delRowAttribute ( $row, $attrib ) {
- if( is_int( $row ) && is_string( $attrib ) )
- if( $row < $this->numRows )
- unset( $this->rowsAttributes[ $row ][ strtolower( $attrib ) ] );
- }
-
- /**
- * @return void
- * @param int $row
- * @param string $attrib
- * @param mixed $value
- * @desc Adds a Cell Attribute in all cells located on $row row.
- **/
- function addAllCellsInRowAttribute ( $row, $attrib, $value ) {
- if( is_int( $row ) && is_string( $attrib ) )
- if( $row < $this->numRows )
- for( $i = 0; $i < $this->numCols; $i++ )
- $this->cellsAttributes[ $row ][ $i ][ strtolower( $attrib ) ] = $value;
- }
-
- /**
- * @return void
- * @param int $col
- * @param string $attrib
- * @param mixed $value
- * @desc Adds a Cell Attribute in all cells located on $col column.
- **/
- function addAllCellsInColAttribute ( $col, $attrib, $value ) {
- if( is_int( $col ) && is_string( $attrib ) )
- if( $col < $this->numCols )
- for( $i = 0; $i < $this->numRows; $i++ )
- $this->cellsAttributes[ $i ][ $col ][ strtolower( $attrib ) ] = $value;
- }
-
- /**
- * @return void
- * @param callback $template
- * @desc Sets Template (Class)
- **/
- function setTemplate ( $template ) {
- if( is_string( $template ) )
- if( class_exists( $template ) )
- $this->template = strval( $template );
- }
-
- /**
- * @return string
- * @desc Returns current Template
- **/
- function template () {
- return $this->template;
- }
-
- /**
- * @return mixed
- * @param int $row
- * @param int $col
- * @desc Returns the text or object contained into $row and $col
- **/
- function text ( $row, $col ) {
- if( is_int( $row ) && is_int( $col ) )
- if( $row < $this->numRows && $col < $this->numCols )
- return $this->text[ $row ][ $col ];
- return FALSE;
- }
-
- /**
- * @return void
- * @param int $row
- * @param int $col
- * @desc Clears the cell located into $row and $col. Keeps the Cell.
- */
- function clearCell ( $row, $col ) {
- if( is_int( $row ) && is_int( $col ) ) {
- if( $row < $this->numRows && $col < $this->numCols ) {
- $this->text[ $row ][ $col ] = TABLE_DEFAULT_CELL_VALUE;
- unset( $this->cellsAttributes[ $row ][ $col ] );
- $this->cellsAttributes[ $row ][ $col ] = array();
- }
- }
- }
-
- /**
- * @return int
- * @desc Returns the number of Rows
- **/
- function numRows () {
- return $this->numRows;
- }
-
- /**
- * @return int
- * @desc Returns the number of Columns
- **/
- function numCols () {
- return $this->numCols;
- }
-
- /**
- * @return void
- * @param int $col
- * @param bool $ascending
- * @desc Sorts table based on $col.
- **/
- function sortColumn ( $col, $ascending = TRUE ) {
- if( is_int( $col ) && is_bool( $ascending ) ) {
- if( $col < $this->numCols ) {
- $this->temp_col = $col;
- $this->temp_ascending = $ascending;
- $this->_sort_merge( $this->text );
- }
- }
- }
-
- /**
- * @return void
- * @param int $r
- * @desc Sets the number of rows of the table.
- **/
- function setNumRows ( $r ) {
- if( is_int( $r ) )
- if( $r >= 0 )
- if( $r > $this->numRows )
- $this->insertRows( $this->numRows, $r - $this->numRows );
- elseif( $r < $this->numRows )
- for( $i = $this->numRows; $i > $r; $i-- )
- $this->removeRow( $i - 1 );
- }
-
- /**
- * @return void
- * @param int $r
- * @desc Sets the number of columns of the table.
- **/
- function setNumCols ( $r ) {
- if( is_int( $r ) )
- if( $r >= 0 )
- if( $r > $this->numCols )
- $this->insertColumns( $this->numCols, $r - $this->numCols );
- elseif( $r < $this->numCols )
- for( $i = $this->numCols; $i > $r; $i-- )
- $this->removeColumn( $i - 1 );
- }
-
- /**
- * @return void
- * @param int $row
- * @desc Hides a $row from table
- **/
- function hideRow ( $row ) {
- if( is_int( $row ) )
- if( $row < $this->numRows )
- $this->hiddenRows[ $row ] = TRUE;
- }
-
- /**
- * @return void
- * @param int $col
- * @desc Hides a $col from table
- **/
- function hideColumn ( $col ) {
- if( is_int( $col ) )
- if( $col < $this->numCols )
- $this->hiddenCols[ $col ] = TRUE;
- }
-
- /**
- * @return void
- * @param int $row
- * @desc Shows a $row from table
- **/
- function showRow ( $row ) {
- if( is_int( $row ) )
- if( $row < $this->numRows )
- $this->hiddenRows[ $row ] = FALSE;
- }
-
- /**
- * @return void
- * @param int $col
- * @desc Shows a $col from table
- **/
- function showColumn ( $col ) {
- if( is_int( $col ) )
- if( $col < $this->numCols )
- $this->hiddenCols[ $col ] = FALSE;
- }
-
- /**
- * @return bool
- * @param int $row
- * @desc Returns TRUE if a row is hidden.
- **/
- function isRowHidden ( $row ) {
- if( is_int( $row ) )
- if( $row < $this->numRows )
- return $this->hiddenRows[ $row ];
- return FALSE;
- }
-
- /**
- * @return bool
- * @param int $col
- * @desc Returns TRUE if a col is hidden.
- **/
- function isColumnHidden ( $col ) {
- if( is_int( $col ) )
- if( $col < $this->numCols )
- return $this->hiddenCols[ $col ];
- return FALSE;
- }
-
- /**
- * @return void
- * @param int $row1
- * @param int $row2
- * @param bool $swapAttributes
- * @desc Swaps 2 rows. Swaps attributes if $switchAttributes is TRUE.
- **/
- function swapRows ( $row1, $row2, $swapAttributes = FALSE ) {
- if( is_int( $row1 ) && is_int( $row2 ) && is_bool( $swapAttributes ) ) {
- if( $row1 < $this->numRows && $row2 < $this->numRows ) {
- $temp =& $this->text[ $row1 ];
- $this->text[ $row1 ] =& $this->text[ $row2 ];
- $this->text[ $row2 ] =& $temp;
- if( $swapAttributes == TRUE ) {
- $temp2 = $this->cellsAttributes[ $row1 ];
- $this->cellsAttributes[ $row1 ] = $this->cellsAttributes[ $row2 ];
- $this->cellsAttributes[ $row2 ] = $temp2;
-
- $temp2 = $this->rowsAttributes[ $row1 ];
- $this->rowsAttributes[ $row1 ] = $this->rowsAttributes[ $row2 ];
- $this->rowsAttributes[ $row2 ] = $temp2;
- }
- }
- }
- }
-
- /**
- * @return void
- * @param int $col1
- * @param int $col2
- * @param bool $swapAttributes
- * @desc Swaps 2 cols. Swaps attributes if $switchAttributes is TRUE.
- **/
- function swapColumns ( $col1, $col2, $swapAttributes = FALSE ) {
- if( is_int( $col1 ) && is_int( $col2 ) && is_bool( $swapAttributes ) ) {
- if( $col1 < $this->numCols && $col2 < $this->numCols ) {
- for( $i = 0; $i < $this->numRows; $i++ ){
- $temp =& $this->text[ $i ][ $col1 ];
- $this->text[ $i ][ $col1 ] =& $this->text[ $i ][ $col2 ];
- $this->text[ $i ][ $col2 ] =& $temp;
- if( $swapAttributes == TRUE ) {
- $temp2 = $this->cellsAttributes[ $i ][ $col1 ];
- $this->cellsAttributes[ $i ][ $col1 ] = $this->cellsAttributes[ $i ][ $col2 ];
- $this->cellsAttributes[ $i ][ $col2 ] = $temp2;
- }
- }
- }
- }
- }
-
- /**
- * @return void
- * @param int $row1
- * @param int $col1
- * @param int $row2
- * @param int $col2
- * @param bool $swapAttributes
- * @desc Swaps 2 cells. Swaps attributes if $switchAttributes is TRUE.
- **/
- function swapCells ( $row1, $col1, $row2, $col2, $swapAttributes = FALSE ) {
- if( is_int( $row1 ) && is_int( $col1 ) && is_int( $row2 ) && is_int( $col2 ) && is_bool( $swapAttributes ) ) {
- if( $row1 < $this->numRows && $col1 < $this->numCols && $row2 < $this->numRows && $col2 < $this->numCols ) {
- $temp =& $this->text[ $row1 ][ $col1 ];
- $this->text[ $row1 ][ $col1 ] =& $this->text[ $row2 ][ $col2 ];
- $this->text[ $row2 ][ $col2 ] =& $temp;
- if( $swapAttributes == TRUE ) {
- $temp2 = $this->cellsAttributes[ $row1 ][ $col1 ];
- $this->cellsAttributes[ $row1 ][ $col1 ] = $this->cellsAttributes[ $row2 ][ $col2 ];
- $this->cellsAttributes[ $row2 ][ $col2 ] = $temp2;
- }
- }
- }
- }
-
- /**
- * @return void
- * @param int $row
- * @param int $count
- * @desc Inserts $count row at $row position.
- **/
- function insertRows ( $row, $count = 1 ) {
- if( is_int( $row ) && is_int( $count ) ) {
- if( $row >= 0 && $row <= $this->numRows ) {
- for( $i = 0; $i < $count; $i++) {
- array_splice( $this->text, $row, 0, '' );
- array_splice( $this->hiddenRows, $row, 0, FALSE );
- array_splice( $this->cellsAttributes, $row, 0, FALSE );
- array_splice( $this->rowsAttributes, $row, 0, FALSE );
- $this->_setVariable( $row );
- $this->numRows += 1;
- }
- }
- }
- }
-
- /**
- * @return void
- * @param int $col
- * @param int $count
- * @desc Inserts $count columns at $col position.
- **/
- function insertColumns ( $col, $count = 1 ) {
- if( is_int( $col ) && is_int( $count ) ) {
- if( $col >= 0 && $col <= $this->numCols ) {
- for( $i = 0; $i < $this->numRows; $i++ ) {
- $temp_text = array();
- $temp_attributes = array();
- reset($this->text[ $i ]);
- for( $j = 0; $j <= $this->numCols; $j++ ) {
- if( $col == $j ) {
- for( $k = 0; $k < $count; $k++ ){
- $temp_text[] = '';
- $temp_attributes[] = array();
- }
- }
- if( $j == $this->numCols )
- break;
- $temp_text[] = $this->text[ $i ][ $j ];
- $temp_attributes[] = $this->cellsAttributes[ $i ][ $j ];
- }
- $this->text[ $i ] = $temp_text;
- $this->cellsAttributes[ $i ] = $temp_attributes;
- }
- for( $i = 0; $i < $count; $i++ )
- array_splice( $this->hiddenCols, $col, 0, FALSE );
- $this->numCols += $count;
- }
- }
- }
-
- /**
- * @return void
- * @param int $row
- * @desc Removes $row.
- **/
- function removeRow ( $row ) {
- if( is_int( $row ) ) {
- if( $row < $this->numRows ) {
- array_splice( $this->text, $row, 1 );
- array_splice( $this->hiddenRows, $row, 1 );
- array_splice( $this->cellsAttributes, $row, 1 );
- array_splice( $this->rowsAttributes, $row, 1 );
- $this->numRows -= 1;
- }
- }
- }
-
- /**
- * @return void
- * @param int $col
- * @desc Removes $col.
- **/
- function removeColumn ( $col ) {
- if( is_int( $col ) ) {
- if( $col < $this->numCols ) {
- for( $i = 0; $i < $this->numRows; $i++ ) {
- $temp_text = array();
- $temp_attributes = array();
- reset($this->text[ $i ]);
- while ( list( $key, ) = each( $this->text[ $i ] ) ) {
- if( $key != $col ) {
- $temp_text[] = $this->text[ $i ][ $key ];
- $temp_attributes[] = $this->cellsAttributes[ $i ][ $key ];
- }
- }
- $this->text[ $i ] = $temp_text;
- $this->cellsAttributes[ $i ] = $temp_attributes;
- }
- array_splice( $this->hiddenCols, $col, 1 );
- $this->numCols -= 1;
- }
- }
- }
-
- /**
- * @return void
- * @param int $width
- * @desc Sets Table Width.
- **/
- function setWidth ( $width ) {
- if( is_string( $width ) )
- $this->width = strval( $width );
- }
-
- /**
- * @return string
- * @desc Returns Table Width.
- **/
- function width () {
- return $this->width;
- }
-
- /**
- * @return void
- * @param int $title
- * @desc Sets Table Title.
- **/
- function setTitle ( $title ) {
- if( is_string( $title ) )
- $this->title = strval( $title );
- }
-
- /**
- * @return string
- * @desc Returns Table Title.
- **/
- function title () {
- return $this->title;
- }
-
- /**
- * @return void
- * @desc Displays the table with its cells.
- **/
- function draw () {
- if( $this->template != '' ) {
- $tpl = new $this->template;
- $tpl->__header( $this->width, $this->title );
- $this->_check_rowcol_span();
- for( $i = 0; $i < $this->numRows; $i++ ) {
- if( $this->hiddenRows[ $i ] == FALSE ) {
- $tpl->__row_start( $this->rowsAttributes[ $i ] );
- for( $j = 0; $j < $this->numCols; $j++ ) {
- if( $this->hiddenCols[ $j ] == FALSE ) {
- if( $this->text[ $i ][ $j ] !== NULL ) {
- if( is_object( $this->text[ $i ][ $j ] ) ) {
- $tpl->__cell_start( '', $this->cellsAttributes[ $i ][ $j ] );
- $this->text[ $i ][ $j ]->draw();
- }
- else
- $tpl->__cell_start( $this->text[ $i ][ $j ], $this->cellsAttributes[ $i ][ $j ] );
- $tpl->__cell_stop( $this->text[ $i ][ $j ], $this->cellsAttributes[ $i ][ $j ] );
- }
- }
- }
- $tpl->__row_stop( $this->rowsAttributes[ $i ] );
- }
- }
- $tpl->__footer( $this->width, $this->title );
- }
- }
-
- // PRIVATE FUNCTIONS
- /**
- * @return void
- * @desc Sets NULL to cells if colspan or rowspan go on the cells
- **/
- function _check_rowcol_span() {
- for( $i = 0; $i < $this->numRows; $i++ ) {
- for( $j = 0; $j < $this->numCols; $j++ ) {
- if( isset( $this->cellsAttributes[ $i ][ $j ][ 'colspan' ] ) )
- if( $this->cellsAttributes[ $i ][ $j ][ 'colspan' ] > 0 )
- for( $z = 1; $z < intval( $this->cellsAttributes[ $i ][ $j ][ 'colspan' ] ); $z++ )
- $this->text[ $i ][ $j + $z ] = NULL;
- if( isset( $this->cellsAttributes[ $i ][ $j ][ 'rowspan' ] ) )
- if( $this->cellsAttributes[ $i ][ $j ][ 'rowspan' ] > 0 )
- for( $z = 1; $z < intval( $this->cellsAttributes[ $i ][ $j ][ 'rowspan' ] ); $z++ )
- $this->text[ $i + $z ][ $j ] = NULL;
- }
- }
- }
-
-
- /**
- * @return void
- * @param int $r
- * @desc Sets Default Variables for row $r.
- **/
- function _setVariable ( $r ) {
- $this->text[ $r ] = array_fill( 0, $this->numCols, TABLE_DEFAULT_CELL_VALUE );
- $this->cellsAttributes[ $r ] = array_fill( 0, $this->numCols, array() );
- $this->rowsAttributes[ $r ] = array();
- $this->hiddenRows[ $r ] = TABLE_DEFAULT_ROW_HIDDEN;
- }
-
- /**
- * @return void
- * @param int $r
- * @desc Unsets Default Variables for row $r.
- **/
- function _unsetVariable ( $r ) {
- unset( $this->text[ $r ] );
- unset( $this->cellsAttributes[ $r ] );
- unset( $this->rowsAttributes[ $r ] );
- unset( $this->hiddenRows[ $r ] );
- }
-
- /**
- * @return void
- * @param string $tab
- * @desc Merge Function
- **/
- function _sort_merge ( &$tab ) {
- if( count( $tab ) <= 1 ) return;
- else {
- $tab1 = array();
- $tab2 = array();
-
- for( $i = 0; $i < count( $tab ); $i++) {
- if( $i < ( count( $tab ) ) / 2 )
- $tab1[] = $tab[ $i ];
- else
- $tab2[] = $tab[ $i ];
- }
-
- $this->_sort_merge( $tab1 );
- $this->_sort_merge( $tab2 );
-
- $this->_merge_all( $tab1, $tab2, $tab );
- }
- }
-
- /**
- * @return void
- * @param string $tab1
- * @param string $tab2
- * @param string $tab
- * @desc Merge Function
- **/
- function _merge_all ( $tab1, $tab2, &$tab ) {
- $i = 0;
- $i1 = $i2 = 0;
- while( $i1 < count( $tab1 ) && $i2 < count( $tab2 ) ) {
- if( strcmp( $tab1[ $i1 ][ $this->temp_col ], $tab2[ $i2 ][ $this->temp_col ] ) == (($this->temp_ascending==TRUE)?-1:1) )
- $tab[ $i ] = $tab1[ $i1++ ];
- else
- $tab[ $i ] = $tab2[ $i2++ ];
- $i++;
- }
-
- while( $i1 < count( $tab1 ) ) {
- $tab[ $i ] = $tab1[ $i1++ ];
- $i++;
- }
- while( $i2 < count( $tab2 ) ) {
- $tab[ $i ] = $tab2[ $i2++ ];
- $i++;
- }
- }
- }
- ?>
<?php
//////////////////////////////////////////////////////////////////////
// table.class.php
//--------------------------------------------------------------------
//
// Class Table - You can modify the define values
//
//--------------------------------------------------------------------
// Revision History
// v1.05 01 jan 2004 Jean-Sebastien Goupil - Adding check is_object when setText()
// v1.04 09 dec 2004 Jean-Sebastien Goupil - Correct ; after
// V1.03 23 sep 2004 Jean-Sebastien Goupil - Add Better Row,Col Span Function
// V1.02 26 aug 2004 Jean-Sebastien Goupil - Many Bugs Cor.
// V1.01 25 aug 2004 Jean-Sebastien Goupil - Error init Col
// V1.00 23 aug 2004 Jean-Sebastien Goupil
//--------------------------------------------------------------------
// Copyright (C) Jean-Sebastien Goupil
// http://other.lookstrike.com/
//--------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
define( 'TABLE_DEFAULT_ROW_HIDDEN', FALSE );
define( 'TABLE_DEFAULT_COL_HIDDEN', FALSE );
define( 'TABLE_DEFAULT_CELL_VALUE', ' ' ); // If ' ', a cell will appear, if NULL, no cell will appear
define( 'TABLE_DEFAULT_TEMPLATE', 'tpl_LS' );
include( 'template.php' );
class LSTable {
// PRIVATE ARGUMENTS
var $template; // string
var $numRows, $numCols; // int
var $title; // string
var $text = array(); // string
var $cellsAttributes = array(), $rowsAttributes = array(); // string
var $hiddenRows = array(), $hiddenCols = array(); // bool
var $width; // string
var $temp_col; // int
var $temp_ascending; // bool
// PUBLIC FUNCTIONS
/**
* @return
* @param int $numRows
* @param int $numCols
* @param string $width
* @param object $parent
* @desc Constructor. You can put a $parent object. This will search the first empty place into the parent.
**/
function LSTable ( $numRows, $numCols, $width, &$parent ) {
$this->numRows = intval( $numRows );
$this->numCols = intval( $numCols );
for( $i = 0; $i < $numRows; $i++ )
$this->_setVariable( $i );
for( $i = 0; $i < $numCols; $i++ )
$this->hiddenCols[ $i ] = TABLE_DEFAULT_COL_HIDDEN;
$this->title = '';
$this->width = strval( $width );
if( defined( 'TABLE_DEFAULT_TEMPLATE' ) )
$this->setTemplate( TABLE_DEFAULT_TEMPLATE );
// We look for an empty place if $parent isn't null
if( is_object( $parent ) ) {
$stop = false;
for( $i = 0; $i < $parent->numRows; $i++ ) {
for( $j = 0; $j < $parent->numCols; $j++ ) {
if( $parent->text[ $i ][ $j ] == TABLE_DEFAULT_CELL_VALUE ) {
$parent->text[ $i ][ $j ] =& $this;
$stop = true;
}
if( $stop == true )
break;
}
if( $stop == true )
break;
}
}
}
// No destructor for PHP4
//function __destruct() {
//
//}
/**
* @return void
* @param int $row
* @param int $col
* @param mixed $string
* @desc Writes Text or Object into $row and $col.
**/
function setText ( $row, $col, $string ) {
if( !is_object( $string ) )
$string = strval( $string );
if( is_int( $row ) && is_int( $col ) )
if( $row < $this->numRows && $col < $this->numCols )
$this->text[ $row ][ $col ] = $string;
}
/**
* @return void
* @param int $row
* @param int $col
* @param string $attrib
* @param mixed $value
* @desc Adds a Cell Attribute at $row and $col.
**/
function addCellAttribute ( $row, $col, $attrib, $value ) {
if( is_int( $row ) && is_int( $col ) && is_string( $attrib ) )
if( $row < $this->numRows && $col < $this->numCols )
$this->cellsAttributes[ $row ][ $col ][ strtolower( $attrib ) ] = $value;
}
/**
* @return void
* @param int $row
* @param int $col
* @param string $attrib
* @desc Deletes a Cell Attribute at $row and $col.
**/
function delCellAttribute ( $row, $col, $attrib ) {
if( is_int( $row ) && is_int( $col ) && is_string( $attrib ) )
if( $row < $this->numRows && $col < $this->numCols )
unset( $this->cellsAttributes[ $row ][ $col ][ strtolower( $attrib ) ] );
}
/**
* @return void
* @param int $row
* @param string $attrib
* @param mixed $value
* @desc Adds a Row Attribute at $row. Will be located in TR.
**/
function addRowAttribute ( $row, $attrib, $value ) {
if( is_int( $row ) && is_string( $attrib ) )
if( $row < $this->numRows )
$this->rowsAttributes[ $row ][ strtolower( $attrib ) ] = $value;
}
/**
* @return void
* @param int $row
* @param string $attrib
* @desc Deletes a Row Attribute at $row.
**/
function delRowAttribute ( $row, $attrib ) {
if( is_int( $row ) && is_string( $attrib ) )
if( $row < $this->numRows )
unset( $this->rowsAttributes[ $row ][ strtolower( $attrib ) ] );
}
/**
* @return void
* @param int $row
* @param string $attrib
* @param mixed $value
* @desc Adds a Cell Attribute in all cells located on $row row.
**/
function addAllCellsInRowAttribute ( $row, $attrib, $value ) {
if( is_int( $row ) && is_string( $attrib ) )
if( $row < $this->numRows )
for( $i = 0; $i < $this->numCols; $i++ )
$this->cellsAttributes[ $row ][ $i ][ strtolower( $attrib ) ] = $value;
}
/**
* @return void
* @param int $col
* @param string $attrib
* @param mixed $value
* @desc Adds a Cell Attribute in all cells located on $col column.
**/
function addAllCellsInColAttribute ( $col, $attrib, $value ) {
if( is_int( $col ) && is_string( $attrib ) )
if( $col < $this->numCols )
for( $i = 0; $i < $this->numRows; $i++ )
$this->cellsAttributes[ $i ][ $col ][ strtolower( $attrib ) ] = $value;
}
/**
* @return void
* @param callback $template
* @desc Sets Template (Class)
**/
function setTemplate ( $template ) {
if( is_string( $template ) )
if( class_exists( $template ) )
$this->template = strval( $template );
}
/**
* @return string
* @desc Returns current Template
**/
function template () {
return $this->template;
}
/**
* @return mixed
* @param int $row
* @param int $col
* @desc Returns the text or object contained into $row and $col
**/
function text ( $row, $col ) {
if( is_int( $row ) && is_int( $col ) )
if( $row < $this->numRows && $col < $this->numCols )
return $this->text[ $row ][ $col ];
return FALSE;
}
/**
* @return void
* @param int $row
* @param int $col
* @desc Clears the cell located into $row and $col. Keeps the Cell.
*/
function clearCell ( $row, $col ) {
if( is_int( $row ) && is_int( $col ) ) {
if( $row < $this->numRows && $col < $this->numCols ) {
$this->text[ $row ][ $col ] = TABLE_DEFAULT_CELL_VALUE;
unset( $this->cellsAttributes[ $row ][ $col ] );
$this->cellsAttributes[ $row ][ $col ] = array();
}
}
}
/**
* @return int
* @desc Returns the number of Rows
**/
function numRows () {
return $this->numRows;
}
/**
* @return int
* @desc Returns the number of Columns
**/
function numCols () {
return $this->numCols;
}
/**
* @return void
* @param int $col
* @param bool $ascending
* @desc Sorts table based on $col.
**/
function sortColumn ( $col, $ascending = TRUE ) {
if( is_int( $col ) && is_bool( $ascending ) ) {
if( $col < $this->numCols ) {
$this->temp_col = $col;
$this->temp_ascending = $ascending;
$this->_sort_merge( $this->text );
}
}
}
/**
* @return void
* @param int $r
* @desc Sets the number of rows of the table.
**/
function setNumRows ( $r ) {
if( is_int( $r ) )
if( $r >= 0 )
if( $r > $this->numRows )
$this->insertRows( $this->numRows, $r - $this->numRows );
elseif( $r < $this->numRows )
for( $i = $this->numRows; $i > $r; $i-- )
$this->removeRow( $i - 1 );
}
/**
* @return void
* @param int $r
* @desc Sets the number of columns of the table.
**/
function setNumCols ( $r ) {
if( is_int( $r ) )
if( $r >= 0 )
if( $r > $this->numCols )
$this->insertColumns( $this->numCols, $r - $this->numCols );
elseif( $r < $this->numCols )
for( $i = $this->numCols; $i > $r; $i-- )
$this->removeColumn( $i - 1 );
}
/**
* @return void
* @param int $row
* @desc Hides a $row from table
**/
function hideRow ( $row ) {
if( is_int( $row ) )
if( $row < $this->numRows )
$this->hiddenRows[ $row ] = TRUE;
}
/**
* @return void
* @param int $col
* @desc Hides a $col from table
**/
function hideColumn ( $col ) {
if( is_int( $col ) )
if( $col < $this->numCols )
$this->hiddenCols[ $col ] = TRUE;
}
/**
* @return void
* @param int $row
* @desc Shows a $row from table
**/
function showRow ( $row ) {
if( is_int( $row ) )
if( $row < $this->numRows )
$this->hiddenRows[ $row ] = FALSE;
}
/**
* @return void
* @param int $col
* @desc Shows a $col from table
**/
function showColumn ( $col ) {
if( is_int( $col ) )
if( $col < $this->numCols )
$this->hiddenCols[ $col ] = FALSE;
}
/**
* @return bool
* @param int $row
* @desc Returns TRUE if a row is hidden.
**/
function isRowHidden ( $row ) {
if( is_int( $row ) )
if( $row < $this->numRows )
return $this->hiddenRows[ $row ];
return FALSE;
}
/**
* @return bool
* @param int $col
* @desc Returns TRUE if a col is hidden.
**/
function isColumnHidden ( $col ) {
if( is_int( $col ) )
if( $col < $this->numCols )
return $this->hiddenCols[ $col ];
return FALSE;
}
/**
* @return void
* @param int $row1
* @param int $row2
* @param bool $swapAttributes
* @desc Swaps 2 rows. Swaps attributes if $switchAttributes is TRUE.
**/
function swapRows ( $row1, $row2, $swapAttributes = FALSE ) {
if( is_int( $row1 ) && is_int( $row2 ) && is_bool( $swapAttributes ) ) {
if( $row1 < $this->numRows && $row2 < $this->numRows ) {
$temp =& $this->text[ $row1 ];
$this->text[ $row1 ] =& $this->text[ $row2 ];
$this->text[ $row2 ] =& $temp;
if( $swapAttributes == TRUE ) {
$temp2 = $this->cellsAttributes[ $row1 ];
$this->cellsAttributes[ $row1 ] = $this->cellsAttributes[ $row2 ];
$this->cellsAttributes[ $row2 ] = $temp2;
$temp2 = $this->rowsAttributes[ $row1 ];
$this->rowsAttributes[ $row1 ] = $this->rowsAttributes[ $row2 ];
$this->rowsAttributes[ $row2 ] = $temp2;
}
}
}
}
/**
* @return void
* @param int $col1
* @param int $col2
* @param bool $swapAttributes
* @desc Swaps 2 cols. Swaps attributes if $switchAttributes is TRUE.
**/
function swapColumns ( $col1, $col2, $swapAttributes = FALSE ) {
if( is_int( $col1 ) && is_int( $col2 ) && is_bool( $swapAttributes ) ) {
if( $col1 < $this->numCols && $col2 < $this->numCols ) {
for( $i = 0; $i < $this->numRows; $i++ ){
$temp =& $this->text[ $i ][ $col1 ];
$this->text[ $i ][ $col1 ] =& $this->text[ $i ][ $col2 ];
$this->text[ $i ][ $col2 ] =& $temp;
if( $swapAttributes == TRUE ) {
$temp2 = $this->cellsAttributes[ $i ][ $col1 ];
$this->cellsAttributes[ $i ][ $col1 ] = $this->cellsAttributes[ $i ][ $col2 ];
$this->cellsAttributes[ $i ][ $col2 ] = $temp2;
}
}
}
}
}
/**
* @return void
* @param int $row1
* @param int $col1
* @param int $row2
* @param int $col2
* @param bool $swapAttributes
* @desc Swaps 2 cells. Swaps attributes if $switchAttributes is TRUE.
**/
function swapCells ( $row1, $col1, $row2, $col2, $swapAttributes = FALSE ) {
if( is_int( $row1 ) && is_int( $col1 ) && is_int( $row2 ) && is_int( $col2 ) && is_bool( $swapAttributes ) ) {
if( $row1 < $this->numRows && $col1 < $this->numCols && $row2 < $this->numRows && $col2 < $this->numCols ) {
$temp =& $this->text[ $row1 ][ $col1 ];
$this->text[ $row1 ][ $col1 ] =& $this->text[ $row2 ][ $col2 ];
$this->text[ $row2 ][ $col2 ] =& $temp;
if( $swapAttributes == TRUE ) {
$temp2 = $this->cellsAttributes[ $row1 ][ $col1 ];
$this->cellsAttributes[ $row1 ][ $col1 ] = $this->cellsAttributes[ $row2 ][ $col2 ];
$this->cellsAttributes[ $row2 ][ $col2 ] = $temp2;
}
}
}
}
/**
* @return void
* @param int $row
* @param int $count
* @desc Inserts $count row at $row position.
**/
function insertRows ( $row, $count = 1 ) {
if( is_int( $row ) && is_int( $count ) ) {
if( $row >= 0 && $row <= $this->numRows ) {
for( $i = 0; $i < $count; $i++) {
array_splice( $this->text, $row, 0, '' );
array_splice( $this->hiddenRows, $row, 0, FALSE );
array_splice( $this->cellsAttributes, $row, 0, FALSE );
array_splice( $this->rowsAttributes, $row, 0, FALSE );
$this->_setVariable( $row );
$this->numRows += 1;
}
}
}
}
/**
* @return void
* @param int $col
* @param int $count
* @desc Inserts $count columns at $col position.
**/
function insertColumns ( $col, $count = 1 ) {
if( is_int( $col ) && is_int( $count ) ) {
if( $col >= 0 && $col <= $this->numCols ) {
for( $i = 0; $i < $this->numRows; $i++ ) {
$temp_text = array();
$temp_attributes = array();
reset($this->text[ $i ]);
for( $j = 0; $j <= $this->numCols; $j++ ) {
if( $col == $j ) {
for( $k = 0; $k < $count; $k++ ){
$temp_text[] = '';
$temp_attributes[] = array();
}
}
if( $j == $this->numCols )
break;
$temp_text[] = $this->text[ $i ][ $j ];
$temp_attributes[] = $this->cellsAttributes[ $i ][ $j ];
}
$this->text[ $i ] = $temp_text;
$this->cellsAttributes[ $i ] = $temp_attributes;
}
for( $i = 0; $i < $count; $i++ )
array_splice( $this->hiddenCols, $col, 0, FALSE );
$this->numCols += $count;
}
}
}
/**
* @return void
* @param int $row
* @desc Removes $row.
**/
function removeRow ( $row ) {
if( is_int( $row ) ) {
if( $row < $this->numRows ) {
array_splice( $this->text, $row, 1 );
array_splice( $this->hiddenRows, $row, 1 );
array_splice( $this->cellsAttributes, $row, 1 );
array_splice( $this->rowsAttributes, $row, 1 );
$this->numRows -= 1;
}
}
}
/**
* @return void
* @param int $col
* @desc Removes $col.
**/
function removeColumn ( $col ) {
if( is_int( $col ) ) {
if( $col < $this->numCols ) {
for( $i = 0; $i < $this->numRows; $i++ ) {
$temp_text = array();
$temp_attributes = array();
reset($this->text[ $i ]);
while ( list( $key, ) = each( $this->text[ $i ] ) ) {
if( $key != $col ) {
$temp_text[] = $this->text[ $i ][ $key ];
$temp_attributes[] = $this->cellsAttributes[ $i ][ $key ];
}
}
$this->text[ $i ] = $temp_text;
$this->cellsAttributes[ $i ] = $temp_attributes;
}
array_splice( $this->hiddenCols, $col, 1 );
$this->numCols -= 1;
}
}
}
/**
* @return void
* @param int $width
* @desc Sets Table Width.
**/
function setWidth ( $width ) {
if( is_string( $width ) )
$this->width = strval( $width );
}
/**
* @return string
* @desc Returns Table Width.
**/
function width () {
return $this->width;
}
/**
* @return void
* @param int $title
* @desc Sets Table Title.
**/
function setTitle ( $title ) {
if( is_string( $title ) )
$this->title = strval( $title );
}
/**
* @return string
* @desc Returns Table Title.
**/
function title () {
return $this->title;
}
/**
* @return void
* @desc Displays the table with its cells.
**/
function draw () {
if( $this->template != '' ) {
$tpl = new $this->template;
$tpl->__header( $this->width, $this->title );
$this->_check_rowcol_span();
for( $i = 0; $i < $this->numRows; $i++ ) {
if( $this->hiddenRows[ $i ] == FALSE ) {
$tpl->__row_start( $this->rowsAttributes[ $i ] );
for( $j = 0; $j < $this->numCols; $j++ ) {
if( $this->hiddenCols[ $j ] == FALSE ) {
if( $this->text[ $i ][ $j ] !== NULL ) {
if( is_object( $this->text[ $i ][ $j ] ) ) {
$tpl->__cell_start( '', $this->cellsAttributes[ $i ][ $j ] );
$this->text[ $i ][ $j ]->draw();
}
else
$tpl->__cell_start( $this->text[ $i ][ $j ], $this->cellsAttributes[ $i ][ $j ] );
$tpl->__cell_stop( $this->text[ $i ][ $j ], $this->cellsAttributes[ $i ][ $j ] );
}
}
}
$tpl->__row_stop( $this->rowsAttributes[ $i ] );
}
}
$tpl->__footer( $this->width, $this->title );
}
}
// PRIVATE FUNCTIONS
/**
* @return void
* @desc Sets NULL to cells if colspan or rowspan go on the cells
**/
function _check_rowcol_span() {
for( $i = 0; $i < $this->numRows; $i++ ) {
for( $j = 0; $j < $this->numCols; $j++ ) {
if( isset( $this->cellsAttributes[ $i ][ $j ][ 'colspan' ] ) )
if( $this->cellsAttributes[ $i ][ $j ][ 'colspan' ] > 0 )
for( $z = 1; $z < intval( $this->cellsAttributes[ $i ][ $j ][ 'colspan' ] ); $z++ )
$this->text[ $i ][ $j + $z ] = NULL;
if( isset( $this->cellsAttributes[ $i ][ $j ][ 'rowspan' ] ) )
if( $this->cellsAttributes[ $i ][ $j ][ 'rowspan' ] > 0 )
for( $z = 1; $z < intval( $this->cellsAttributes[ $i ][ $j ][ 'rowspan' ] ); $z++ )
$this->text[ $i + $z ][ $j ] = NULL;
}
}
}
/**
* @return void
* @param int $r
* @desc Sets Default Variables for row $r.
**/
function _setVariable ( $r ) {
$this->text[ $r ] = array_fill( 0, $this->numCols, TABLE_DEFAULT_CELL_VALUE );
$this->cellsAttributes[ $r ] = array_fill( 0, $this->numCols, array() );
$this->rowsAttributes[ $r ] = array();
$this->hiddenRows[ $r ] = TABLE_DEFAULT_ROW_HIDDEN;
}
/**
* @return void
* @param int $r
* @desc Unsets Default Variables for row $r.
**/
function _unsetVariable ( $r ) {
unset( $this->text[ $r ] );
unset( $this->cellsAttributes[ $r ] );
unset( $this->rowsAttributes[ $r ] );
unset( $this->hiddenRows[ $r ] );
}
/**
* @return void
* @param string $tab
* @desc Merge Function
**/
function _sort_merge ( &$tab ) {
if( count( $tab ) <= 1 ) return;
else {
$tab1 = array();
$tab2 = array();
for( $i = 0; $i < count( $tab ); $i++) {
if( $i < ( count( $tab ) ) / 2 )
$tab1[] = $tab[ $i ];
else
$tab2[] = $tab[ $i ];
}
$this->_sort_merge( $tab1 );
$this->_sort_merge( $tab2 );
$this->_merge_all( $tab1, $tab2, $tab );
}
}
/**
* @return void
* @param string $tab1
* @param string $tab2
* @param string $tab
* @desc Merge Function
**/
function _merge_all ( $tab1, $tab2, &$tab ) {
$i = 0;
$i1 = $i2 = 0;
while( $i1 < count( $tab1 ) && $i2 < count( $tab2 ) ) {
if( strcmp( $tab1[ $i1 ][ $this->temp_col ], $tab2[ $i2 ][ $this->temp_col ] ) == (($this->temp_ascending==TRUE)?-1:1) )
$tab[ $i ] = $tab1[ $i1++ ];
else
$tab[ $i ] = $tab2[ $i2++ ];
$i++;
}
while( $i1 < count( $tab1 ) ) {
$tab[ $i ] = $tab1[ $i1++ ];
$i++;
}
while( $i2 < count( $tab2 ) ) {
$tab[ $i ] = $tab2[ $i2++ ];
$i++;
}
}
}
?>
Conclusion
Si vous avez des questions n'hésitez pas !
Historique
- 25 août 2004 07:24:24 :
- Correction Initialisation des Colonnes
- 25 août 2004 08:37:15 :
- Ajout d'une Note pour être Compatible avec PHP4
- 26 août 2004 04:35:10 :
- Correction de plusieurs Bugs !
- 23 septembre 2004 07:28:45 :
- Ajout de la fonction privée _check_rowcol_span() qui permet de mieux gérer les colspan AINSI que les rowspan !
Aussi define( 'TABLE_DEFAULT_CELL_VALUE', " " ); permet de définir que vaut la cellule lorsqu'elle n'est pas définie... Si NULL, la cellule n'est pas écrite.
- 23 septembre 2004 07:42:46 :
- Le ZIP ne s'est pas envoyé... grrr !
- 09 décembre 2004 08:46:45 :
- Correction de ; à + correction des templates pour fonctionner aux standards XML + utilisation des apostrophes (') plutôt que des guillemets (") pour une amélioration de la performance.
- 05 janvier 2005 17:56:24 :
- Correction bug de récursivité setText() (v1.05)
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
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
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
|