当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML_Table::setColAttributes方法代码示例

本文整理汇总了PHP中HTML_Table::setColAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Table::setColAttributes方法的具体用法?PHP HTML_Table::setColAttributes怎么用?PHP HTML_Table::setColAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_Table的用法示例。


在下文中一共展示了HTML_Table::setColAttributes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: imprimirFormularioLogin

 /**
  * Muestra el formulario para iniciar sesión.
  */
 private function imprimirFormularioLogin()
 {
     imprimirTabulados(5);
     echo '<div class="tablaTituloBotones">';
     imprimirTabulados(6);
     echo '<h2>Iniciar sesión</h2>';
     imprimirTabulados(6);
     echo '<form action="index.php" method="post">';
     imprimirTabulados(6);
     echo '<fieldset class="login">';
     imprimirTabulados(6);
     $clase = array('class' => 'tablaCarga');
     $tabla = new HTML_Table($clase);
     $tabla->setAutoGrow(true);
     $tabla->setHeaderContents(0, 0, 'Usuario');
     $tabla->setCellContents(0, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="username" value="" />');
     $tabla->setHeaderContents(1, 0, 'Contraseña');
     $tabla->setCellContents(1, 1, '<input class="campoTexto campoTextoAlineado" type="password" name="password" value="" />');
     $tabla->setColAttributes(0, $clase);
     $tabla->setColAttributes(1, $clase);
     echo $tabla->toHtml();
     imprimirTabulados(6);
     echo '<br /><input type="submit" name="botonIniciarSesion"  value="Iniciar sesión" >';
     imprimirTabulados(6);
     echo '</fieldset>';
     imprimirTabulados(6);
     echo '</form>';
     imprimirTabulados(5);
     echo '</div>';
 }
开发者ID:jorgeeliecerballesteros,项目名称:controldeacceso,代码行数:33,代码来源:CuerpoLogin.php

示例2: viewList

 /**
  * View list
  *
  * @author	John.meng
  * @since    version1.0 - Dec 12, 2005
  */
 function viewList()
 {
     global $__Lang__, $FlushPHPObj, $smarty;
     include_once PEAR_DIR . "HTML/Table.php";
     include_once PEAR_DIR . "HTML/QuickForm.php";
     include_once APP_DIR . "UI.class.php";
     $form =& new HTML_QuickForm();
     $FilesDirsObj = $FlushPHPObj->loadUtility("FilesDirs");
     $FilesDirsObj->FilesDirs(MODULE_DIR, 1, "CVS,General");
     $Module_arr = $FilesDirsObj->listDirs();
     asort($Module_arr);
     reset($Module_arr);
     $data = array();
     $installImageObj = new UIImage(THEMES_DIR . "images/install.gif");
     $unInstallImageObj = new UIImage(THEMES_DIR . "images/uninstall.gif");
     if (sizeof($Module_arr)) {
         foreach ($Module_arr as $key => $value) {
             $temp_Module_arr = $FlushPHPObj->getModuleInfo($value);
             if (file_exists(MODULE_DIR . "/" . $temp_Module_arr['name'] . "/" . $temp_Module_arr['logo']) && $temp_Module_arr['logo']) {
                 $ModuleImageLogo = new UIImage(MODULE_DIR . "/" . $temp_Module_arr['name'] . "/" . $temp_Module_arr['logo']);
                 $Module_logo = $ModuleImageLogo->toHTML() . "<br/>";
             }
             $data[$key] = array($Module_logo . $temp_Module_arr['name'] . " <b> " . $temp_Module_arr['version'] . " <b/> ", $temp_Module_arr['description'], $temp_Module_arr['author'], $unInstallImageObj->toHTML() . "<br/>" . $__Lang__['langGeneralUnInstall'], $installImageObj->toHTML() . "<br/>" . $__Lang__['langGeneralInstall']);
         }
     }
     $tableAttrs = array("class" => "grid_table");
     $table = new HTML_Table($tableAttrs);
     $table->setAutoGrow(true);
     $table->setAutoFill("n/a");
     for ($nr = 0; $nr < count($data); $nr++) {
         $table->setHeaderContents($nr + 1, 0, (string) $nr);
         for ($i = 0; $i < 5; $i++) {
             if ("" != $data[$nr][$i]) {
                 $table->setCellContents($nr + 1, $i + 1, $data[$nr][$i]);
             }
         }
     }
     $table->setColAttributes(3, array(" align" => "center"));
     $table->setColAttributes(4, array(" align" => "center"));
     $table->setColAttributes(5, array(" align" => "center"));
     $altRow = array("class" => "grid_table_tr_alternate");
     $table->altRowAttributes(1, null, $altRow);
     $table->setHeaderContents(0, 0, "");
     $table->setHeaderContents(0, 1, $__Lang__['langMenuModule']);
     $table->setHeaderContents(0, 2, $__Lang__['langGeneralSummary']);
     $table->setHeaderContents(0, 3, $__Lang__['langGeneralAuthor']);
     $table->setHeaderContents(0, 4, $__Lang__['langGeneralStatus']);
     $table->setHeaderContents(0, 5, $__Lang__['langGeneralOperation']);
     $hrAttrs = array("class" => "grid_table_head");
     $table->setRowAttributes(0, $hrAttrs, true);
     $table->setColAttributes(0, $hrAttrs);
     $smarty->assign("Main", $table->toHtml());
 }
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:59,代码来源:Module.class.php

示例3: array

	<option value="user">User</option>
	<option value="feature">Feature</option>
</select>
</p>
</form>
    
<?php 
##############################################################
# We are using PHP Pear stuff ie. pear.php.net
##############################################################
require_once "HTML/Table.php";
require_once 'DB.php';
$tableStyle = "border=\"1\" cellpadding=\"1\" cellspacing=\"2\"";
# Create a new table object
$table = new HTML_Table($tableStyle);
$table->setColAttributes(1, "align=\"right\"");
#  Define a table header
$headerStyle = "style=\"background: yellow;\"";
$colHeaders = array("Date", "User", "Feature", "Total number of checkouts");
$table->addRow($colHeaders, $headerStyle, "TH");
################################################################
# First let's get license usage for the product specified in $feature
##############################################################
################################################################
#  Connect to the database
#   Use persistent connections
################################################################
$db = DB::connect($dsn, true);
if (DB::isError($db)) {
    die($db->getMessage());
}
开发者ID:tseel,项目名称:phplicensewatcher,代码行数:31,代码来源:checkouts.php

示例4: array

    <div class="container" role="main">
      <h1>License server status overview</h1>
      To get current usage for an individual server please click on the "Details" next to the server.
      <div id="msg" style="visibility:hidden;"></div>
<?php 
##########################################################################
# We are using PHP Pear library to create tables :-)
##########################################################################
require_once "HTML/Table.php";
# empty statusmsg
$statusMsg = "";
$tableStyle = array('cellpadding' => '1', 'cellspacing' => '2', 'class' => 'table table-striped');
# Create a new table object
$table = new HTML_Table();
$table->setAttributes($tableStyle);
$table->setColAttributes(1, "align=\"center\"");
# Define a table header
$headerStyle = "";
$colHeaders = array("License Server", "Description", "Status", "Current Usage", "Available features/license", "Master", "Version");
$table->addRow($colHeaders, $headerStyle, "TH");
# set width on description col
$table->setColAttributes(1, "width=\"180\"");
# grab all the different server types
foreach ($server as $host) {
    $type[] = $host['type'];
}
# return only unique types
$types = array_unique($type);
# loop thru each unique type and make up status table
foreach ($types as $type) {
    $servers = findServers($type, "type");
开发者ID:tseel,项目名称:phplicensewatcher,代码行数:31,代码来源:index.php

示例5: die

<?php

// no direct access
defined('PARENT_FILE') or die('Restricted access');
if (is_readable($this->file . "/action/" . $this->registry->action . ".php") == false || $this->registry->action == "index") {
    $this->registry->Error('404 Page NOT Found', $this->registry->path);
} else {
    $title = ucwords(str_replace("_", " ", $this->registry->action));
    $this->registry->page_title = $title;
    $this->setTitle($title . ' | ' . $this->get('config.server.site_name'));
    $table_attrs = array('class' => 'contentpaneopen');
    $rowAttrs = array('class' => 'contentheading', 'width' => '100%');
    $table = new HTML_Table($table_attrs);
    $table->setCellContents(0, 0, $this->registry->page_title);
    $table->setColAttributes(0, $rowAttrs);
    $this->addContent($table->toHTML());
    require_once 'action/' . $this->registry->action . '.php';
}
开发者ID:Rem122,项目名称:Uthando-CMS,代码行数:18,代码来源:index.php

示例6: imprimirFormularioEditarPeriodo

 /**
  * Muestra el formulario para editar un período existente.
  */
 private function imprimirFormularioEditarPeriodo()
 {
     $periodo = $this->gestorPeriodos->getPeriodo($_REQUEST['idPeriodoEditar']);
     imprimirTabulados(5);
     echo '<div class="tablaTituloBotones">';
     imprimirTabulados(6);
     echo '<h1>Editar</h1>';
     imprimirTabulados(6);
     echo '<form action="periodos.php" method="post">';
     imprimirTabulados(6);
     echo '<fieldset>';
     imprimirTabulados(6);
     $clase = array('class' => 'tablaCarga');
     $tabla = new HTML_Table($clase);
     $tabla->setAutoGrow(true);
     $tabla->setHeaderContents(0, 0, 'Nombre');
     $tabla->setCellContents(0, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="nombre" value="' . $periodo->getNombre() . '" />');
     $tabla->setHeaderContents(1, 0, 'Fecha de inicio');
     $tabla->setCellContents(1, 1, $periodo->imprimirInicio());
     $tabla->setHeaderContents(2, 0, 'Fecha de fin');
     $tabla->setCellContents(2, 1, $periodo->imprimirFin());
     $tabla->setHeaderContents(3, 0, 'Área');
     $tabla->setCellContents(3, 1, $periodo->getArea()->getNombreArea());
     $tabla->setHeaderContents(4, 0, 'Observaciones');
     $tabla->setCellContents(4, 1, '<textarea name="observaciones" rows="4" cols="20">' . $periodo->getObservaciones() . '</textarea>');
     $tabla->setColAttributes(0, $clase);
     $tabla->setColAttributes(1, $clase);
     echo $tabla->toHtml();
     imprimirTabulados(6);
     echo '<input type="hidden" name="idPeriodoEditar"  value="' . $periodo->getIdPeriodo() . '" />';
     imprimirTabulados(6);
     echo '<br /><input type="submit" name="enviarEditarPeriodo"  value="Enviar" >';
     imprimirTabulados(6);
     echo '</fieldset>';
     imprimirTabulados(6);
     echo '</form>';
     imprimirTabulados(5);
     echo '</div>';
 }
开发者ID:jorgeeliecerballesteros,项目名称:controldeacceso,代码行数:42,代码来源:ContenidoPeriodos.php

示例7: getDetails

 function getDetails($id, $tplname = 'details.tpl.html')
 {
     $this->tpl = new HTML_Template_IT($basedir);
     $this->tpl->loadTemplateFile($this->basedir . $tplname);
     $query = "select * from " . $this->cfg['table']['compound'] . " where id = {$id}";
     $row = $this->db_con->getRow($query);
     $this->tpl->setVariable("HEADING", $row->{"name_" . LC_LANG});
     $this->tpl->setVariable('LC_SPECIFICATIONS', $this->lang->translate('specifications'));
     $query = "select *,comp.id as mixid, comp.name_de as mischname_de,comp.name_en as mischname_en,cat_comp.name_de as mischkatname_de,cat_comp.name_en as mischkatname_en\n            from " . $this->cfg['table']['cat_compound'] . ' as cat_comp, ' . $this->cfg['table']['compound'] . " as comp\n            where comp.id_mischungkat=cat_comp.id AND comp.id={$id}";
     $row = $this->db_con->getRow($query);
     include_once 'HTML/Table.php';
     $tbl = new HTML_Table('class="overview"');
     $tbl->addRow(array($this->lang->translate('name'), $row->{"mischname_" . LC_LANG}));
     $tbl->addRow(array($this->lang->translate('category'), $row->{"mischkatname_" . LC_LANG}));
     $tbl->addRow(array('M100', $row->m100));
     $tbl->addRow(array('M300', $row->m300));
     $tbl->addRow(array('TS', $row->ts));
     $tbl->addRow(array('EAB', $row->eab));
     $tbl->addRow(array('Rebound', $row->rebound));
     $tbl->addRow(array('Shore A', $row->shore_a));
     $tbl->addRow(array('SG', $row->sg));
     $tbl->setColAttributes(0, 'width="100"');
     $tbl->setColAttributes(1, 'width="300"');
     $row1Style = array('class' => 'overview');
     $row2Style = array('class' => 'overviewalternate');
     $tbl->altRowAttributes(0, $row1Style, $row2Style);
     $this->tpl->setVariable("COMPOUND_DATA", $tbl->toHTML());
     $tbl = new HTML_Table('class="overview"');
     $tbl->addRow(array('Name', 'phr'), 'class="overview"', 'TH');
     $query = "select *  from " . $this->cfg['table']['details_compound'] . " where id_mischung={$id}";
     $this->db_res = $this->db_con->Query($query);
     while ($row = $this->db_res->fetchrow(DB_FETCHMODE_OBJECT)) {
         if ($row->id_produkt) {
             $_url = '<a class="maroon" href="' . url(array('module' => 'product', 'action' => 'details', 'id' => $row->id_produkt)) . '">' . $row->name . '</a>';
         } else {
             $_url = $row->name;
         }
         $tbl->addRow(array($_url, $row->phr));
     }
     $query = "select sum(phr) as phrsum from " . $this->cfg['table']['details_compound'] . " where id_mischung={$id}";
     $row = $this->db_con->getRow($query);
     $tbl->addRow(array('', $row->phrsum));
     $tbl->updateColAttributes(1, 'align="right" "bgcolor=#eeeeee"');
     $tbl->updateRowAttributes($tbl->getrowCount() - 1, "bgcolor=#CCCCCC");
     $this->tpl->setVariable('TBL_DETAILS', $tbl->toHTML());
     $this->tpl->setVariable("CATEGORY_COLOR", $this->color);
     return $this->tpl->get();
 }
开发者ID:BackupTheBerlios,项目名称:molecms,代码行数:48,代码来源:mod_compound.php

示例8: get_table

 /**
  * Get HTML table (as string that can be echoed)
  *
  * @param array $row_data (to appear in rows of table)
  * @param array $column_headers (to appear in head of table
  * @return string
  *
  * @access public
  */
 public function get_table($row_data, $column_headers)
 {
     // see http://pear.php.net/manual/en/package.html.html-table.intro.php
     $table = new HTML_Table();
     $table->setAutoGrow(true);
     $table->setAutoFill('n/a');
     for ($nr = 0, $maxr = count($row_data); $nr < $maxr; $nr++) {
         for ($i = 0, $ii = count($column_headers); $i < $ii; $i++) {
             if ('' != $row_data[$nr][$i]) {
                 $table->setCellContents($nr + 1, $i, $row_data[$nr][$i]);
             }
         }
     }
     for ($i = 0, $ii = count($column_headers); $i < $ii; $i++) {
         $table->setHeaderContents(0, $i, $column_headers[$i]);
     }
     $header_attribute = array('class' => 'header');
     $table->setRowAttributes(0, $header_attribute, true);
     $table->setColAttributes(0, $header_attribute);
     $altRow = array('class' => 'alt_row');
     $table->altRowAttributes(1, null, $altRow);
     return $table->toHtml();
 }
开发者ID:WillSwales,项目名称:financial-maths-mediawiki,代码行数:32,代码来源:class-ct1-render.php

示例9: array

$data[0][] = 'i am';
$data[0][] = 'i think';
$data[0][] = 'therefore';
$data[0][] = 'therefore';
$data[1][] = 'i think';
$data[1][] = 'i am';
$data[1][] = 'therefore';
$data[1][] = 'therefore';
$data[2][] = 'i am';
$data[2][] = 'therefore';
$data[2][] = 'i think';
$data[2][] = 'i think';
foreach ($data as $key => $value) {
    $table->addRow($data[$key], array(array('bgcolor' => 'blue', 'align' => 'center'), array('bgcolor' => 'green'), array('bgcolor' => 'red')));
}
foreach ($data as $key => $value) {
    $table->addRow($data[$key], array('bgcolor = "blue"', 'bgcolor = "green"', 'bgcolor = "red"'));
}
foreach ($data as $key => $value) {
    $table->addRow($data[$key], 'bgcolor = "yellow" align = "right"', 'TD', true);
}
foreach ($data as $key => $value) {
    $table->addRow($data[$key], array('bgcolor' => 'pink', 'align' => 'center'));
}
$table->setColAttributes(1, 'bgcolor = "purple"');
$table->updateColAttributes(2, array('bgcolor = "blue"', 'bgcolor = "green"', 'bgcolor = "red"'));
echo '<pre>';
var_dump($table->getCellAttributes(2, 2));
var_dump($table->getRowAttributes(8));
echo '</pre>';
echo $table->toHTML();
开发者ID:pear,项目名称:html_table,代码行数:31,代码来源:Table_example1.php

示例10: ON

$query = "select *, c.name as company_name, p.name as product_name from {$table['product']} as p LEFT JOIN {$table['company']} as c ON (p.id_hersteller=c.id) where p.id = {$id} AND aktiv=" . TRUE;
$row = $db_con->getRow($query);
$category = $row->id_produktkat;
$link_back = '<a href="';
$link_back .= url(array('module' => 'product', 'action' => 'overview', 'id' => $category));
$link_back .= '">';
$link_back .= $lang->translate("back");
$link_back .= '</a>';
include_once 'HTML/Table.php';
$tbl = new HTML_Table('class="overview"');
$tbl->addRow(array($lang->translate('name'), $row->{product_name}));
$tbl->addRow(array($lang->translate('chemical nomenclature'), $row->{info . '_' . LC_LANG}));
$tbl->addRow(array($lang->translate('further information'), $row->{bem_ . LC_LANG}));
$tbl->addRow(array($lang->translate('manufacturer'), '<a href="' . url(array('module' => 'company', 'action' => 'details', 'id' => $row->id)) . '"><img src="' . $cfg['path']['logo'] . $row->url_logo . '"><br>' . $row->{company_name} . '</a>'));
$tbl->addRow(array($lang->translate('website'), $row->product_url));
$tbl->setColAttributes(0, 'width="100"');
$tbl->setColAttributes(1, 'width="300"');
$row1Style = array('class' => 'overview');
$row2Style = array('class' => 'overviewalternate');
$tbl->altRowAttributes(0, $row1Style, $row2Style);
$tpl->setVariable("UEBERSCHRIFT", $row->product_name);
$tpl->SetVariable("TABELLE_UEBERSCHRIFT", $row->product_name . " (" . $link_back . ")");
/** BEGIN Vertrieb **/
$query = "select *,t_reseller.name as reseller\n        from {$table['product']},{$table['company']} as t_reseller, {$table['reseller']}\n        where {$table['product']}.id={$id}\n        AND {$table['product']}.id={$table['reseller']}.id_produkt\n        AND {$table['reseller']}.id_firma=t_reseller.id";
require_once 'mms_tablepager.php';
$tabpage = new PageTable($cfg['database']['dsn'], "overview");
$tabpage->fields = array('name', 'land');
$tabpage->make_url = false;
$tabpage->add_extra = false;
$tabpage->col_view = 'name';
$tabpage->url_view = url(array('module' => 'company', 'action' => 'details'));
开发者ID:BackupTheBerlios,项目名称:molecms,代码行数:31,代码来源:details.php

示例11: get_table

 /**
  * Get HTML table (as string that can be echoed)
  *
  * @param array $row_data (to appear in rows of table)
  * @param array $column_headers (to appear in head of table
  * @return string
  *
  * @access private
  */
 private function get_table($row_data, $column_headers, $delete = false, $deleteColumn = -999, $deleteField = 'dummy-field-name')
 {
     // see http://pear.php.net/manual/en/package.html.html-table.intro.php
     $table = new HTML_Table();
     $table->setAutoGrow(true);
     $table->setAutoFill('n/a');
     for ($nr = 0, $maxr = count($row_data); $nr < $maxr; $nr++) {
         for ($i = 0, $ii = count($column_headers); $i < $ii; $i++) {
             if (isset($row_data[$nr][$i])) {
                 if ('' != $row_data[$nr][$i]) {
                     if ($deleteColumn == $i) {
                         if ($delete) {
                             $table->setCellContents($nr + 1, $i, $this->getDeleteButton($row_data[$nr][$i], $deleteField));
                         }
                     } else {
                         $table->setCellContents($nr + 1, $i, $row_data[$nr][$i]);
                     }
                 }
             } else {
                 $table->setCellContents($nr + 1, $i, $this->fillerForEmptyCell);
             }
         }
     }
     for ($i = 0, $ii = count($column_headers); $i < $ii; $i++) {
         $table->setHeaderContents(0, $i, $column_headers[$i]);
     }
     $header_attribute = array('class' => 'header');
     $table->setRowAttributes(0, $header_attribute, true);
     $table->setColAttributes(0, $header_attribute);
     $altRow = array('class' => 'alt_row');
     $table->altRowAttributes(1, null, $altRow);
     return $table->toHtml();
 }
开发者ID:owen-kellie-smith,项目名称:reservation,代码行数:42,代码来源:ReservationRender.php

示例12: array

<?php

$data = array('0' => array('Bakken', 'Stig', '', 'stig@example.com'), '1' => array('Merz', 'Alexander', 'alex.example.com', 'alex@example.com'), '2' => array('Daniel', 'Adam', '', ''));
require_once 'HTML/Table.php';
$attrs = array('width' => '600');
$table = new HTML_Table($attrs);
$table->setAutoGrow(true);
$table->setAutoFill('n/a');
for ($nr = 0; $nr < count($data); $nr++) {
    // La primer columna es cabecera de tabla tambien
    $table->setHeaderContents($nr + 1, 0, (string) $nr);
    for ($i = 0; $i <= 3; $i++) {
        if ('' != $data[$nr][$i]) {
            $table->setCellContents($nr + 1, $i + 1, $data[$nr][$i]);
        }
    }
}
$altRow = array('bgcolor' => 'red');
$table->altRowAttributes(1, null, $altRow);
$table->setHeaderContents(0, 0, '');
$table->setHeaderContents(0, 1, 'Surname');
$table->setHeaderContents(0, 2, 'Name');
$table->setHeaderContents(0, 3, 'Website');
$table->setHeaderContents(0, 4, 'EMail');
$hrAttrs = array('bgcolor' => 'silver');
$table->setRowAttributes(0, $hrAttrs, true);
$table->setColAttributes(0, $hrAttrs);
echo $table->toHtml();
开发者ID:jorgeeliecerballesteros,项目名称:controldeacceso,代码行数:28,代码来源:PruebaHTML_Table.php

示例13: toHtml

 /**
  * Returns Html for the group
  * 
  * @access      public
  * @return      string
  */
 function toHtml()
 {
     include_once 'HTML/Table.php';
     $tripleLinkTable = new HTML_Table();
     $tripleLinkTable->setAutoGrow(true);
     $tripleLinkTable->setAutoFill('');
     $tripleLinkTable->updateAttributes($this->getAttributes());
     $row = 0;
     $col = 0;
     if ($this->_columnNames) {
         foreach ($this->_columnNames as $key => $value) {
             ++$col;
             $tripleLinkTable->setCellContents($row, $col, $value);
             $tripleLinkTable->setCellAttributes($row, $col, array('style' => 'text-align: center'));
         }
         ++$row;
     }
     foreach (array_keys($this->_rows) as $key) {
         $col = 0;
         $tripleLinkTable->setCellContents($row, $col, $this->_rowNames[$key]);
         foreach (array_keys($this->_rows[$key]) as $key2) {
             ++$col;
             $tripleLinkTable->setCellContents($row, $col, $this->_rows[$key][$key2]->toHTML());
             $tripleLinkTable->setCellAttributes($row, $col, array('style' => 'text-align: center'));
         }
         ++$row;
     }
     if ($this->_columnNames) {
         $tripleLinkTable->setRowAttributes(0, array('class' => 'elementTableColumnLabel'), true);
     }
     $tripleLinkTable->setColAttributes(0, array('class' => 'elementTableRowLabel'));
     return $tripleLinkTable->toHTML();
     /*include_once('HTML/QuickForm/Renderer/Default.php');
       $renderer =& new HTML_QuickForm_Renderer_Default();
       $renderer->setElementTemplate('{element}');
       $this->accept($renderer);
       return $renderer->toHtml();*/
 }
开发者ID:bobah,项目名称:acbdb,代码行数:44,代码来源:ElementTable.php

示例14: imprimirFormularioNuevoUsuario

 /**
  * Muestra el formulario para dar de alta un nuevo usuario.
  */
 private function imprimirFormularioNuevoUsuario()
 {
     imprimirTabulados(5);
     echo '<div class="tablaTituloBotones">';
     imprimirTabulados(6);
     echo '<h1>Nuevo usuario</h1>';
     imprimirTabulados(6);
     echo '<form action="usuario.php" method="post">';
     imprimirTabulados(6);
     echo '<fieldset>';
     imprimirTabulados(6);
     $clase = array('class' => 'tablaCarga');
     $tabla = new HTML_Table($clase);
     $tabla->setAutoGrow(true);
     $tabla->setHeaderContents(0, 0, 'Tipo de documento');
     $tabla->setCellContents(0, 1, '<select class="cuadroSeleccion cuadroSeleccionAlineado" name="tipoDocumento"><option>DNI</option><option>LE</option><option>LC</option></select>');
     $tabla->setHeaderContents(1, 0, 'Número de documento *');
     $tabla->setCellContents(1, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="numeroDocumentoNuevo" value="" />');
     $tabla->setHeaderContents(2, 0, 'Nombre *');
     $tabla->setCellContents(2, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="nombre" value="" />');
     $tabla->setHeaderContents(3, 0, 'Segundo nombre');
     $tabla->setCellContents(3, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="segundoNombre" value="" />');
     $tabla->setHeaderContents(4, 0, 'Apellido *');
     $tabla->setCellContents(4, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="apellido" value="" />');
     $tabla->setHeaderContents(5, 0, 'Fecha de nacimiento *');
     $tabla->setCellContents(5, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="fechaNacimiento" value="DD-MM-AAAA" />');
     $tabla->setHeaderContents(6, 0, 'Dirección *');
     $tabla->setCellContents(6, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="direccion" value="" />');
     $tabla->setHeaderContents(7, 0, 'Teléfono fijo');
     $tabla->setCellContents(7, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="telefonoFijo" value="" />');
     $tabla->setHeaderContents(8, 0, 'Teléfono celular');
     $tabla->setCellContents(8, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="telefonoCelular" value="" />');
     $tabla->setHeaderContents(9, 0, 'E-mail *');
     $tabla->setCellContents(9, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="email" value="" />');
     $tabla->setHeaderContents(10, 0, 'Legajo *');
     $tabla->setCellContents(10, 1, '<input class="campoTexto campoTextoAlineado" type="text" name="legajo" value="" />');
     $tabla->setHeaderContents(11, 0, 'Área *');
     $tabla->setCellContents(11, 1, $this->mostrarAreasMultipleSeleccion());
     $tabla->setHeaderContents(12, 0, 'Tipo de usuario');
     $tabla->setCellContents(12, 1, $this->mostrarNiveles());
     $tabla->setHeaderContents(13, 0, 'Activo');
     $tabla->setCellContents(13, 1, '<select class="cuadroSeleccionAlineado" name="activo"><option value="1">Si</option><option value="0">No</option></select>');
     $tabla->setHeaderContents(14, 0, 'Notas');
     $tabla->setCellContents(14, 1, '<textarea class="areaTexto" name="notas" rows="4" cols="20"></textarea>');
     $tabla->setColAttributes(0, $clase);
     $tabla->setColAttributes(1, $clase);
     echo $tabla->toHtml();
     imprimirTabulados(6);
     echo '<br /><input type="submit" name="enviarNuevoUsuario"  value="Enviar" >';
     imprimirTabulados(6);
     echo '</fieldset>';
     imprimirTabulados(6);
     echo '</form>';
     imprimirTabulados(6);
     echo '<div class="notas">';
     imprimirTabulados(7);
     echo '<p>(*) Campos obligatorios</p>';
     imprimirTabulados(6);
     echo '</div>';
     imprimirTabulados(5);
     echo '</div>';
 }
开发者ID:jorgeeliecerballesteros,项目名称:controldeacceso,代码行数:65,代码来源:ContenidoUsuario.php

示例15: exportAttendanceLogin

 /**
  * @param string $startDate in UTC time
  * @param string $endDate in UTC time
  *
  * @return string
  */
 public function exportAttendanceLogin($startDate, $endDate)
 {
     $data = $this->getAttendanceLogin($startDate, $endDate);
     if (!$data) {
         return null;
     }
     $users = $data['users'];
     $results = $data['results'];
     $table = new HTML_Table(array('class' => 'data_table'));
     $table->setHeaderContents(0, 0, get_lang('User'));
     $table->setHeaderContents(0, 1, get_lang('Date'));
     $row = 1;
     foreach ($users as $user) {
         $table->setCellContents($row, 0, $user['lastname'] . ' ' . $user['firstname'] . ' (' . $user['username'] . ')');
         $row++;
     }
     $table->setColAttributes(0, array('style' => 'width:28%'));
     $row = 1;
     foreach ($users as $user) {
         if (isset($results[$user['user_id']]) && !empty($results[$user['user_id']])) {
             $dates = implode(', ', array_keys($results[$user['user_id']]));
             $table->setCellContents($row, 1, $dates);
         }
         $row++;
     }
     //$tableToString = null;
     //$sessionInfo = api_get_session_info(api_get_session_id());
     //if (!empty($sessionInfo)) {
     /*$tableToString .= '<strong>'.get_lang('PeriodToDisplay').'</strong>: '.
     		sprintf(get_lang('FromDateXToDateY'), $startDate, $endDate);*/
     //}
     $tableToString = $table->toHtml();
     $params = array('filename' => get_lang('Attendance') . '_' . api_get_utc_datetime(), 'pdf_title' => get_lang('Attendance'), 'course_code' => api_get_course_id(), 'show_real_course_teachers' => true);
     $pdf = new PDF('A4', null, $params);
     $pdf->html_to_pdf_with_template($tableToString);
 }
开发者ID:daffef,项目名称:chamilo-lms,代码行数:42,代码来源:attendance.lib.php


注:本文中的HTML_Table::setColAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。