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


PHP HTML_Table::setAutoFill方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: count

if ($this->authorize()) {
    $sql = "\n\t\tSELECT page_id, page, mdate\n\t\tFROM " . $this->registry->core . "pages\n\t";
    $result = $this->registry->db->query($sql);
    $num_pages = count($result);
    $menuBar = array('new_page' => '/content/new');
    $this->content .= $num_pages <= $this->registry->settings['pages'] || $this->registry->settings['pages'] == -1 ? $this->makeToolbar($menuBar, 24) : $this->message(array('TYPE' => 'info', 'MESSAGE' => '<h2>You have reach your page limit. To add more pages please contact your administrator.</h2>'));
    if ($num_pages > 0) {
        $c = 0;
        $data = array();
        foreach ($result as $row) {
            $data[$c] = array($row->page, $row->mdate, '<a href="/content/edit/id-' . $row->page_id . '"  style="text-decoration:none;" ><img src="/templates/' . $this->get('admin_config.site.template') . '/images/24x24/Edit3.png" class="Tips" title="Edit Page" rel="Click to edit the ' . $row->page . ' page contents" /></a>', '<a href="/content/delete/id-' . $row->page_id . '" ><img src="/templates/' . $this->get('admin_config.site.template') . '/images/24x24/DeleteRed.png" class="Tips" title="Delete Page" rel="Click to delete the ' . $row->page . ' page" /></a>');
            $c++;
        }
        $table = new HTML_Table();
        $table->setAutoGrow(true);
        $table->setAutoFill('');
        $hrAttrs = array('class' => 'highlight');
        for ($nr = 0; $nr < count($data); $nr++) {
            $table->setHeaderContents($nr + 1, 0, (string) $data[$nr][0]);
            for ($i = 1; $i < 5; $i++) {
                if ('' != $data[$nr][$i]) {
                    $table->setCellContents($nr + 1, $i, $data[$nr][$i]);
                }
                $table->setRowAttributes($nr + 1, $hrAttrs, true);
            }
        }
        $table->setHeaderContents(0, 0, 'Page Name');
        $table->setHeaderContents(0, 1, 'Last Modified');
        $table->setHeaderContents(0, 2, '');
        $table->setHeaderContents(0, 3, '');
        $this->content .= '<div id="tableWrap">';
开发者ID:Rem122,项目名称:Uthando-CMS,代码行数:31,代码来源:overview.php

示例6: array

     // set $msg
     if ($freed) {
         $msg = 'freeng_success';
     }
 }
 include './inc/adminHeader.php';
 echo '<p class="msg">' . $msg . '</p>';
 echo '<p class="headline">NutziGems Administration</p>';
 echo '<p class="standard">Das ist also die NutziGems-Administrationsoberfl&auml;che.</p>';
 echo '<p class="headline2" id="anzeigen">NutziGems, die auf ihre Freischaltung warten</p>';
 // Waiting NGs
 echo '<form action="./admin.php" method="post">';
 echo '<input type="hidden" name="server_password" value="' . $submit_server_password . '">';
 $table = new HTML_Table(array("width" => "100%", "class" => "pools"));
 $table->setAutoGrow(true);
 $table->setAutoFill("n/a");
 $table->setHeaderContents(0, 0, " ");
 $table->setHeaderContents(0, 1, "Name");
 $table->setHeaderContents(0, 2, "Beschreibung");
 $table->setHeaderContents(0, 3, "Land");
 $table->setHeaderContents(0, 4, "Gebiet");
 $table->setRowAttributes(0, array("class" => "pools"));
 // all pools are shown
 // Instanciate pools-class
 $pools = new pools();
 $count = 1;
 $pools->wait = 1;
 if ($pools->find()) {
     while ($pools->fetch()) {
         $table->setCellContents($count, 0, '<input type="checkbox" value="' . $pools->id . '" name="ng_free_' . $count . '">');
         $table->setCellContents($count, 1, $pools->name);
开发者ID:BackupTheBerlios,项目名称:cosmopool-multi-svn,代码行数:31,代码来源:admin.php

示例7: 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

示例8: dataTable

 public function dataTable($data, $header = null, $class = null)
 {
     $table = new HTML_Table();
     $table->setAutoGrow(true);
     $table->setAutoFill('');
     $hrAttrs = $class ? array('class' => $class) : null;
     for ($nr = 0; $nr < count($data); $nr++) {
         $table->setHeaderContents($nr + 1, 0, (string) $data[$nr][0]);
         for ($i = 1; $i < count($data[$nr]); $i++) {
             if ('' != $data[$nr][$i]) {
                 $table->setCellContents($nr + 1, $i, $data[$nr][$i]);
             }
             $table->setRowAttributes($nr + 1, $hrAttrs, true);
         }
     }
     for ($i = 0; $i < count($header); $i++) {
         $table->setHeaderContents(0, $i, $header[$i]);
     }
     return $table;
 }
开发者ID:Rem122,项目名称:Uthando-CMS,代码行数:20,代码来源:Uthando.php


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