Vergleich admin/inc/class_table.php - 1.6.7 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: class_table.php 5297 2010-12-28 22:01:14Z Tomm $

 * $Id$

 */

/**

 */

/**

Zeile 37Zeile 37
	 */
function construct_cell($data, $extra=array())
{

	 */
function construct_cell($data, $extra=array())
{

 
		foreach(array('class', 'style', 'id') as $field)
{
// Common-used fields
if(!isset($extra[$field]))
{
$extra[$field] = '';
}
}


		$this->_cells[] = array("data" => $data, "extra" => $extra);
}

		$this->_cells[] = array("data" => $data, "extra" => $extra);
}





	/**
* Construct a row from the earlier defined constructed cells for the table.
*

	/**
* Construct a row from the earlier defined constructed cells for the table.
*

Zeile 48Zeile 57
	function construct_row($extra = array())
{
$i = 1;

	function construct_row($extra = array())
{
$i = 1;

 
		$cells = '';

foreach(array('class', 'style', 'id', 'rowspan', 'width') as $field)
{
// Common-used fields
if(!isset($extra[$field]))
{
$extra[$field] = '';
}
}


		// We construct individual cells here
foreach($this->_cells as $key => $cell)
{

		// We construct individual cells here
foreach($this->_cells as $key => $cell)
{

Zeile 56Zeile 76
			{
$cell['extra']['class'] .= " first";
}

			{
$cell['extra']['class'] .= " first";
}

			elseif(!$this->_cells[$key+1])

			elseif(!isset($this->_cells[$key+1]))

			{
$cell['extra']['class'] .= " last";
}

			{
$cell['extra']['class'] .= " last";
}

Zeile 66Zeile 86
				$i = 0;
}
$i++;

				$i = 0;
}
$i++;

			if($cell['extra']['class'])

			if(isset($cell['extra']['class']))            

			{
$cells .= " class=\"".trim($cell['extra']['class'])."\"";
}

			{
$cells .= " class=\"".trim($cell['extra']['class'])."\"";
}

			if($cell['extra']['style'])

			if(isset($cell['extra']['style']))            

			{
$cells .= " style=\"".$cell['extra']['style']."\"";
}

			{
$cells .= " style=\"".$cell['extra']['style']."\"";
}

			if($cell['extra']['id'])

			if(isset($cell['extra']['id']))

			{
$cells .= $cell['extra']['id'];

			{
$cells .= $cell['extra']['id'];

			}

			}

			if(isset($cell['extra']['colspan']) && $cell['extra']['colspan'] > 1)
{
$cells .= " colspan=\"".$cell['extra']['colspan']."\"";

			if(isset($cell['extra']['colspan']) && $cell['extra']['colspan'] > 1)
{
$cells .= " colspan=\"".$cell['extra']['colspan']."\"";

Zeile 86Zeile 106
			{
$cells .= " rowspan=\"".$cell['extra']['rowspan']."\"";
}

			{
$cells .= " rowspan=\"".$cell['extra']['rowspan']."\"";
}

			if($cell['extra']['width'])

			if(isset($cell['extra']['width']))            

			{
$cells .= " width=\"".$cell['extra']['width']."\"";
}

			{
$cells .= " width=\"".$cell['extra']['width']."\"";
}

Zeile 100Zeile 120
		
$this->_cells = array();
}

		
$this->_cells = array();
}

	






















/**
* Construct a header cell for this table.
*
* @param string The HTML content for this header cell.
* @param array Array of extra information for this header cell (class, style, colspan, width)
*/
function construct_header($data, $extra=array())
{
foreach(array('class', 'style', 'rowspan', 'width') as $field)
{
// Common-used fields
if(!isset($extra[$field]))
{
$extra[$field] = '';
}
}

$this->_headers[] = array("data" => $data, "extra" => $extra);
}


	/**
* return the cells of a row for the table based row.
*

	/**
* return the cells of a row for the table based row.
*

Zeile 130Zeile 170
	function num_rows()
{
return count($this->_rows);

	function num_rows()
{
return count($this->_rows);

	}

/**
* Construct a header cell for this table.
*
* @param string The HTML content for this header cell.
* @param array Array of extra information for this header cell (class, style, colspan, width)
*/
function construct_header($data, $extra=array())
{
$this->_headers[] = array("data" => $data, "extra" => $extra);

 
	}

/**

	}

/**

Zeile 175Zeile 204
	 */
function construct_html($heading="", $border=1, $class=null, $table_id="")
{

	 */
function construct_html($heading="", $border=1, $class=null, $table_id="")
{

 
		$table = '';

		if($border == 1)
{
$table .= "<div class=\"border_wrapper\">\n";

		if($border == 1)
{
$table .= "<div class=\"border_wrapper\">\n";

Zeile 208Zeile 238
				{
$data['extra']['class'] .= " first";
}

				{
$data['extra']['class'] .= " first";
}

				elseif(!$this->_headers[$key+1])

				elseif(!isset($this->_headers[$key+1]))

				{
$data['extra']['class'] .= " last";
}

				{
$data['extra']['class'] .= " last";
}

				if($data['extra']['class'])

				if(isset($data['extra']['class']))

				{
$table .= " class=\"".$data['extra']['class']."\"";
}

				{
$table .= " class=\"".$data['extra']['class']."\"";
}

				if($data['extra']['style'])

				if(isset($data['extra']['style']))

				{
$table .= " style=\"".$data['extra']['style']."\"";
}

				{
$table .= " style=\"".$data['extra']['style']."\"";
}

				if($data['extra']['width'])

				if(isset($data['extra']['width']))

				{
$table .= " width=\"".$data['extra']['width']."\"";
}

				{
$table .= " width=\"".$data['extra']['width']."\"";
}

Zeile 246Zeile 276
			{
$table_row['extra']['class'] .= " first";
}

			{
$table_row['extra']['class'] .= " first";
}

			else if(!$this->_rows[$key+1])

			else if(!isset($this->_rows[$key+1]))

			{
$table_row['extra']['class'] .= " last";
}

			{
$table_row['extra']['class'] .= " last";
}