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


PHP HTML_Table::addRow方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct('aicml_staff');
     if ($this->loginError) {
         return;
     }
     echo '<h1>AICML Staff</h1>';
     $table = new HTML_Table(array('class' => 'stats'));
     $table->addRow(array('Name', 'Start', 'End', 'Num Pubs', 'Pub Ids'));
     $table->setRowType(0, 'th');
     //pdDb::debugOn();
     $staff_list = pdAicmlStaffList::create($this->db);
     foreach ($staff_list as $staff_id => $author_id) {
         $staff = pdAicmlStaff::newFromDb($this->db, $staff_id, pdAicmlStaff::DB_LOAD_PUBS_MIN);
         $author = pdAuthor::newFromDb($this->db, $author_id, pdAuthor::DB_LOAD_MIN);
         //debugVar('staff', array($staff, $author));
         $pub_links = array();
         if (isset($staff->pub_ids)) {
             foreach ($staff->pub_ids as $pub_id) {
                 $pub_links[] = '<a href="../view_publication.php?pub_id=' . $pub_id . '">' . $pub_id . '</a>';
             }
         }
         $table->addRow(array($author->name, $staff->start_date, $staff->end_date, count($staff->pub_ids), implode(', ', $pub_links)), array('class' => 'stats_odd'));
     }
     echo $table->toHtml();
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:26,代码来源:aicml_staff.php

示例2: __construct

 public function __construct()
 {
     parent::__construct('delete_author', 'Delete Author', 'Admin/delete_author.php');
     if ($this->loginError) {
         return;
     }
     $this->loadHttpVars();
     if (!isset($this->author_id) || !is_numeric($this->author_id)) {
         $this->pageError = true;
         return;
     }
     $author = new pdAuthor();
     $result = $author->dbLoad($this->db, $this->author_id);
     if (!$result) {
         $this->pageError = true;
         return;
     }
     $pub_list = pdPubList::create($this->db, array('author_id' => $this->author_id));
     if (isset($pub_list) && count($pub_list) > 0) {
         echo 'Cannot delete Author <b>', $author->name, '</b>.<p/>', 'The author has the following publications in the database:', displayPubList($this->db, $pub_list, true, -1, null, null, '../');
         return;
     }
     $form =& $this->confirmForm('deleter');
     $form->addElement('hidden', 'author_id', $this->author_id);
     if ($form->validate()) {
         $values = $form->exportValues();
         // This is where the actual deletion happens.
         $name = $author->name;
         $author->dbDelete($this->db);
         echo 'You have successfully removed the following author from the database:', '<p/><b>', $name, '</b>';
     } else {
         if (!isset($this->author_id) || !is_numeric($this->author_id)) {
             $this->pageError = true;
             return;
         }
         $renderer = new HTML_QuickForm_Renderer_QuickHtml();
         $form->accept($renderer);
         $table = new HTML_Table(array('width' => '100%', 'border' => '0', 'cellpadding' => '6', 'cellspacing' => '0'));
         $table->addRow(array('Name:', $author->name));
         if (isset($author->title) && trim($author->title != '')) {
             $table->addRow(array('Title:', $author->title));
         }
         $table->addRow(array('Email:', $author->email));
         $table->addRow(array('Organization:', $author->organization));
         $cell = '';
         if (isset($author->webpage) && trim($author->webpage != '')) {
             $cell = '<a href="' . $author->webpage . '">' . $author->webpage . '</a>';
         } else {
             $cell = "none";
         }
         $table->addRow(array('Web page:', $cell));
         $table->updateColAttributes(0, array('class' => 'emph', 'width' => '25%'));
         echo '<h3>Delete Author</h3><p/>Delete the following author?';
         $this->form =& $form;
         $this->renderer =& $renderer;
         $this->table =& $table;
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:58,代码来源:delete_author.php

示例3: __construct

 public function __construct()
 {
     parent::__construct('auth_success', 'Authorization Success', 'Admin/auth_success.php');
     if ($this->loginError) {
         return;
     }
     echo "<h2>Authorization Successful</h2>" . "\n<p>The following users have been granted access.</p>";
     $table = new HTML_Table(array('class' => 'stats'));
     $table->addRow(array('Access Level', 'Login', 'Name', 'Conf. Email'));
     $table->setRowType(0, 'th');
     foreach ($_SESSION['auth_success'] as $auth) {
         $table->addRow(array(AccessLevel::getAccessLevelStr($auth['user']->access_level), $auth['user']->login, $auth['user']->name, $auth['email']), array('class' => 'stats_odd'));
     }
     echo $table->toHtml();
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:15,代码来源:auth_success.php

示例4: __construct

 public function __construct()
 {
     parent::__construct('all_categories');
     if ($this->loginError) {
         return;
     }
     $cat_list = pdCatList::create($this->db);
     echo '<h1>Publication Categories</h1>';
     foreach (array_keys($cat_list) as $cat_id) {
         unset($fields);
         unset($cells);
         $category = new pdCategory();
         $result = $category->dbLoad($this->db, $cat_id);
         assert('$result');
         $table = new HTML_Table(array('class' => 'publist'));
         $table->setAutoGrow(true);
         $cells[] = '<b>' . $category->category . '</b><br/>';
         if (count($category->info) > 0) {
             foreach ($category->info as $info_id => $name) {
                 $fields[] = $name;
             }
             $cells[] = 'Fields: ' . implode(', ', $fields);
         } else {
             $cells[] = '';
         }
         if ($this->access_level > 0) {
             $cells[] = $this->getCategoryIcons($category);
         }
         $table->addRow($cells);
         $table->updateColAttributes(0, array('class' => 'category'), NULL);
         $table->updateColAttributes(2, array('class' => 'icons'), NULL);
         echo $table->toHtml();
         unset($table);
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:35,代码来源:list_categories.php

示例5: __construct

 public function __construct()
 {
     parent::__construct('auth_error', 'Authorization Error', 'Admin/auth_error.php');
     if ($this->loginError) {
         return;
     }
     echo "<h2>Invalid Access Level</h2>" . "\n<p>The following users have incorrect access level.</p>";
     $table = new HTML_Table(array('class' => 'stats'));
     $table->addRow(array('Access Level', 'Login', 'Name'));
     $table->setRowType(0, 'th');
     foreach ($_SESSION['auth_errors'] as $auth_err) {
         $table->addRow(array(AccessLevel::getAccessLevelStr($auth_err['access']), $auth_err['user']->login, $auth_err['user']->name), array('class' => 'stats_odd'));
     }
     echo $table->toHtml();
     echo '<p><a href="authorize_new_users.php">Authorize new users</a></p>';
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:16,代码来源:auth_error.php

示例6: getTable

    function getTable($res, $width = '850', $obj = '')
    {
        $extra_table_attr = array('width' => $width);
        $tbl = new HTML_Table(get_class($this), 'display', 0, 0, 2, $extra_table_attr);
        $frm = new HTML_Form();
        $kk_trick = array();
        $tbl->addRow('', $kk_trick, '<tfoot>');
        $tbl->addCell(tableFooter($obj), NULL, 'data', array('colspan' => '5'));
        $tbl->addRow('main_table');
        $tbl->addCell($frm->addInput('checkbox', 'checkboxall', '', array('class' => 'check-all')), 'first', 'header');
        $tbl->addCell('Location', null, 'header');
        $tbl->addCell('Time on site', null, 'header');
        $tbl->addCell('User', null, 'header');
        $tbl->addCell('On-Page', null, 'header');
        $tbl->addCell('Referer', null, 'header');
        $tbl->addCell('', null, 'header');
        if ($res) {
            $objGeoIP = new GeoIP();
            while ($res->fetch($res)) {
                $objGeoIP->search_ip($res->ip);
                if ($objGeoIP->found()) {
                    $country = $objGeoIP->getCountryName();
                } else {
                    $country = $res->ip;
                }
                $check_this = $frm->addInput('checkbox', 'check_row[]', $res->id, array('id' => 'check_row[]'));
                $tbl->addRow($class);
                $tbl->addCell($check_this);
                $tbl->addCell('<a href="http://www.geoiptool.com/es/?IP=' . $res->ip . '" target="_blank">' . $country . '</a>');
                $tbl->addCell(round(($res->hora - $res->conected_from) / 60, 2) . ' Min.');
                $tbl->addCell($res->user != '' ? $res->user : '<strong>Not Register</strong>');
                $tbl->addCell('<a href="http://www.' . $web->domain . $res->page . '" target="_blank">' . $res->page . '</a>');
                $tbl->addCell('<a href="' . $res->referer . '" target="_blank">' . substr($res->referer, 0, 20) . '</a>');
                $tbl->addCell('<a href="admin-generic-edit.php?id=' . $res->id . '&fld=' . strtolower(get_class()) . '">
									<img src="/template/kadmin/images/icons/pencil.png" alt="Edit" />
									</a>&nbsp;&nbsp;&nbsp;
									<a href="admin-generic-list.php?id=' . $res->id . '&fld=' . strtolower(get_class()) . '&action=delete" 
											onClick="return confirmDel();">
									<img src="/template/kadmin/images/icons/cross.png" alt="Delete" />
									</a>');
            }
        }
        return $tbl->display();
    }
开发者ID:kikoseijo,项目名称:sunny-php-ado,代码行数:44,代码来源:Sessiones.class.php

示例7: addRow

 /**
  * addRow
  *
  * @param string $contents data to add to row
  *
  * @return void
  */
 public function addRow($contents)
 {
     if ($this->rowcount % 2 == 0) {
         $class = "first";
     } else {
         $class = "second";
     }
     parent::addRow($contents, array("class" => $class));
     $this->rowcount++;
 }
开发者ID:pear,项目名称:PEAR_Size,代码行数:17,代码来源:html.php

示例8: authorShow

 public function authorShow($auth)
 {
     $result = '';
     $table = new HTML_Table(array('width' => '600', 'border' => '0', 'cellpadding' => '6', 'cellspacing' => '0'));
     $table->setAutoGrow(true);
     $table->addRow(array('Name:', $auth->name));
     if (isset($auth->title) && trim($auth->title) != "") {
         $table->addRow(array('Title:', $auth->title));
     }
     $table->addRow(array('Email:', "<a href='mailto:" . $auth->email . "'>" . $auth->email . "</a>"));
     $table->addRow(array('Organization:', $auth->organization));
     $webpage = str_replace('http://', '', $auth->webpage);
     if (isset($auth->webpage) && !empty($webpage)) {
         $webpage = "<a href=\"" . $auth->webpage . "\" target=\"_blank\">" . $auth->webpage . "</a>";
     } else {
         $webpage = "none";
     }
     $table->addRow(array('Webpage:', $webpage));
     $interestsStr = '';
     if (isset($auth->interests) && is_array($auth->interests)) {
         $interestsStr = implode('; ', array_values($auth->interests));
     }
     $table->addRow(array('Interest(s):', $interestsStr));
     if ($auth->totalPublications == 0) {
         $table->addRow(array('No publications by this author'), array('colspan' => 2));
     } else {
         if ($auth->totalPublications <= 6) {
             assert('is_array($auth->pub_list)');
             $headingCell = 'Publications:';
             $table->addRow(array($headingCell));
         } else {
             $table->addRow(array('Publications:', '<a id="start" href="#">Show Publications by this author</a>'));
         }
     }
     $table->updateColAttributes(0, array('class' => 'emph', 'width' => '25%'));
     $result .= $table->toHtml();
     if ($auth->totalPublications > 0 && $auth->totalPublications <= 6) {
         $result .= displayPubList($this->db, $auth->pub_list);
     } else {
         $result .= "<div id=\"publist\">&nbsp;</div>";
     }
     $this->css();
     $this->javascript();
     return $result;
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:45,代码来源:view_author.php

示例9: pubByYears

 private function pubByYears()
 {
     $pub_years = pdPubList::create($this->db, array('year_list' => true));
     if (empty($pub_years) || count($pub_years) == 0) {
         return;
     }
     $table = new HTML_Table(array('class' => 'nomargins', 'width' => '60%'));
     $text = '';
     foreach (array_values($pub_years) as $item) {
         $text .= '<a href="list_publication.php?year=' . $item['year'] . '">' . $item['year'] . '</a> ';
     }
     $table->addRow(array($text));
     echo '<h2>Publications by Year:</h2>', $table->toHtml();
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:14,代码来源:index.php

示例10: __construct

 public function __construct()
 {
     parent::__construct('bibtex', null, false);
     if ($this->loginError) {
         return;
     }
     $this->loadHttpVars();
     if (!isset($this->pub_ids)) {
         $this->pageError = true;
         return;
     }
     $pubs = explode(',', $this->pub_ids);
     if (!is_array($pubs) || count($pubs) == 0) {
         $this->pageError = true;
         return;
     }
     $pub_list = pdPubList::create($this->db, array('pub_ids' => $pubs));
     if (!is_array($pub_list) || count($pub_list) == 0) {
         $this->pageError = true;
         return;
     }
     $table = new HTML_Table(array('width' => '100%', 'border' => '0', 'cellpadding' => '0', 'cellspacing' => '0'));
     $table->setAutoGrow(true);
     $pub_count = 0;
     foreach ($pub_list as $pub) {
         $pub_count++;
         $result = $pub->dbLoad($this->db, $pub->pub_id);
         if ($result === false) {
             $this->pageError = true;
             return;
         }
         $table->addRow(array('<pre>' . $pub->getBibtex() . '</pre>'));
     }
     // now assign table attributes including highlighting for even and odd
     // rows
     for ($i = 0; $i < $table->getRowCount(); $i++) {
         if ($i & 1) {
             $table->updateRowAttributes($i, array('class' => 'even'), true);
         } else {
             $table->updateRowAttributes($i, array('class' => 'odd'), true);
         }
     }
     $table->updateColAttributes(0, array('class' => 'publist'), true);
     echo $table->toHtml();
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:45,代码来源:bibtex.php

示例11: __construct

 public function __construct()
 {
     parent::__construct('all_authors');
     if ($this->loginError) {
         return;
     }
     $this->loadHttpVars(true, false);
     if (!isset($this->tab)) {
         $this->tab = 'A';
     } else {
         $tab = strtoupper($this->tab);
         if (strlen($tab) != 1 || ord($tab) < ord('A') || ord($tab) > ord('Z')) {
             $this->pageError = true;
             return;
         }
     }
     $auth_list = pdAuthorList::create($this->db, null, $this->tab);
     echo $this->alphaSelMenu($this->tab, get_class($this) . '.php');
     echo "<h2>Authors</h2>";
     if (empty($auth_list) || count($auth_list) == 0) {
         echo 'No authors with last name starting with ', $this->tab, '<br/>';
         return;
     }
     foreach ($auth_list as $author_id => $name) {
         $author = new pdAuthor();
         $author->dbLoad($this->db, $author_id, pdAuthor::DB_LOAD_BASIC | pdAuthor::DB_LOAD_PUBS_MIN);
         $name = '<span class="emph"><a href="view_author.php?author_id=' . $author_id . '">' . $name . '</a>&nbsp;';
         $icons = $this->getAuthorIcons($author) . '</span>';
         $info = array();
         if ($author->title != '') {
             $info[] = '<span class="small">' . $author->title . '</span>';
         }
         if ($author->organization != '') {
             $info[] = '<span class="small">' . $author->organization . '</span>';
         }
         $info[] .= '<a href="list_publication.php?author_id=' . $author_id . '&menu=0"><span class="small" style="color:#000;font-weight:normal;">' . 'Publication entries in database: ' . $author->totalPublications . '</span>';
         $table = new HTML_Table(array('class' => 'publist'));
         $table->addRow(array($name . '<br/>' . implode('<br/>', $info), $icons));
         $table->updateColAttributes(1, array('class' => 'icons'), NULL);
         echo $table->toHtml();
         unset($table);
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:43,代码来源:list_author.php

示例12: mZ_mindbody_show_schedule

    public function mZ_mindbody_show_schedule($atts, $account = 0)
    {
        require_once MZ_MINDBODY_SCHEDULE_DIR . '/lib/html_table.class.php';
        global $add_mz_ajax_script;
        $add_mz_ajax_script = true;
        // optionally pass in a type parameter. Defaults to week.
        $atts = shortcode_atts(array('type' => 'week', 'location' => '1', 'account' => '0', 'filter' => '0', 'grid' => '0', 'hide' => ''), $atts);
        $type = $atts['type'];
        $location = $atts['location'];
        $account = $atts['account'];
        $filter = $atts['filter'];
        $grid = $atts['grid'];
        if ($grid == 1 && $type == 'day') {
            return '<div style="color:red"><h2>' . __('Grid Calendar Incompatible with Single Day Mode!', 'mz_mndbody_api') . '</h2></div>';
        }
        if ($grid == 0) {
            $mz_date = empty($_GET['mz_date']) ? date_i18n('Y-m-d') : mz_validate_date($_GET['mz_date']);
        } else {
            $hide = explode(', ', $atts['hide']);
            $mz_date = empty($_GET['mz_date']) ? date_i18n('Y-m-d', strtotime('last monday')) : mz_validate_date($_GET['mz_date']);
        }
        if ($type == __('day', 'mz-mindbody-api')) {
            $mz_timeframe = array_slice(mz_getDateRange($mz_date, 1), 0, 1);
            $mz_schedule_cache = "mz_schedule_day_cache_" . mt_rand(1, 10);
        } else {
            $mz_timeframe = array_slice(mz_getDateRange($mz_date, 7), 0, 1);
            $mz_schedule_cache = "mz_schedule_week_cache_" . mt_rand(1, 10);
        }
        //While we still need to support php 5.2 and can't use [0] on above
        $mz_timeframe = array_pop($mz_timeframe);
        // START caching
        $mz_cache_reset = isset($options['mz_mindbody_clear_cache']) ? "on" : "off";
        if ($mz_cache_reset == "on") {
            delete_transient($mz_schedule_cache);
        }
        $mz_schedule_data = get_transient($mz_schedule_cache);
        mz_pr('' == $mz_schedule_data);
        if (isset($_GET['mz_date']) || '' == $mz_schedule_data) {
            //Send the timeframe to the GetClasses class, unless already cached
            $mb = instantiate_mbo_API();
            if ($account == 0) {
                $mz_schedule_data = $mb->GetClasses($mz_timeframe);
            } else {
                $mb->sourceCredentials['SiteIDs'][0] = $account;
                $mz_schedule_data = $mb->GetClasses($mz_timeframe);
            }
            //Cache the mindbody call for 24 hours
            // TODO make cache timeout configurable.
            set_transient($mz_schedule_cache, $mz_schedule_data, 60 * 60 * 24);
        }
        $return = '';
        if (!empty($mz_schedule_data['GetClassesResult']['Classes']['Class'])) {
            $mz_days = $this->makeNumericArray($mz_schedule_data['GetClassesResult']['Classes']['Class']);
            if ($grid == 0) {
                $mz_days = sortClassesByDate($mz_days, $this->time_format, $location);
            } else {
                $mz_days = sortClassesByTimeThenDay($mz_days, $this->time_format, $location);
            }
            $return .= '<div id="mz_mbo_schedule" class="mz_mbo_schedule">';
            if ($type == __('week', 'mz-mindbody-api')) {
                $return .= mz_mbo_schedule_nav($mz_date, __('Week', 'mz-mindbody-api'));
            }
            if ($filter == 1) {
                $tbl = new HTML_Table('', 'mz-schedule-filter');
            } else {
                $tbl = new HTML_Table('', 'mz-schedule-table');
            }
            if ($grid == 0) {
                foreach ($mz_days as $classDate => $mz_classes) {
                    $tbl->addRow('header');
                    // arguments: cell content, class, type (default is 'data' for td, pass 'header' for th)
                    // can include associative array of optional additional attributes
                    $tbl->addCell(date_i18n($this->mz_date_display, strtotime($classDate)), '', 'header', array('scope' => 'header'));
                    $tbl->addCell(__('Class Name', 'mz-mindbody-api'), '', 'header', array('scope' => 'header'));
                    $tbl->addCell(__('Instructor', 'mz-mindbody-api'), '', 'header', array('scope' => 'header'));
                    $tbl->addCell(__('Class Type', 'mz-mindbody-api'), '', 'header', array('scope' => 'header'));
                    $tbl->addTSection('tbody');
                    foreach ($mz_classes as $class) {
                        // mz_pr($class);
                        $sDate = date_i18n('m/d/Y', strtotime($class['StartDateTime']));
                        $sLoc = $class['Location']['ID'];
                        $sTG = $class['ClassDescription']['Program']['ID'];
                        $studioid = $class['Location']['SiteID'];
                        $sclassid = $class['ClassScheduleID'];
                        $sclassidID = $class['ID'];
                        $classDescription = $class['ClassDescription']['Description'];
                        $sType = -7;
                        $showCancelled = $class['IsCanceled'] == 1 ? '<div class="mz_cancelled_class">' . __('Cancelled', 'mz-mindbody-api') . '</div>' : '';
                        $className = $class['ClassDescription']['Name'];
                        $startDateTime = date_i18n('Y-m-d H:i:s', strtotime($class['StartDateTime']));
                        $endDateTime = date_i18n('Y-m-d H:i:s', strtotime($class['EndDateTime']));
                        $staffName = $class['Staff']['Name'];
                        $sessionType = $class['ClassDescription']['SessionType']['Name'];
                        $isAvailable = $class['IsAvailable'];
                        $linkURL = "https://clients.mindbodyonline.com/ws.asp?sDate={$sDate}&amp;sLoc={$sLoc}&amp;sTG={$sTG}&amp;sType={$sType}&amp;sclassid={$sclassid}&amp;studioid={$studioid}";
                        if (date_i18n('H', strtotime($startDateTime)) < 12) {
                            $time_of_day = __('morning', 'mz-mindbody-api');
                        } else {
                            if (date_i18n('H', strtotime($startDateTime)) > 16) {
                                $time_of_day = __('evening', 'mz-mindbody-api');
//.........这里部分代码省略.........
开发者ID:johnwbaxter,项目名称:wp-mindbody-plugin,代码行数:101,代码来源:mz_schedule.php

示例13: showSearchParams

 public function showSearchParams()
 {
     $sp =& $_SESSION['search_params'];
     $table = new HTML_Table(array('class' => 'nomargins', 'width' => '90%'));
     if ($sp->search != '') {
         $table->addRow(array($sp->search));
     } else {
         // check each field of the search parameter except the dates and
         // authors
         foreach (array_diff(array_keys(get_class_vars(get_class($sp))), array('startdate', 'enddate', 'author_myself', 'authors', 'paper_rank', 'paper_rank_other', 'paper_col')) as $param) {
             if ($sp->{$param} != '') {
                 $name = '';
                 if ($param == 'cat_id') {
                     $cl = pdCatList::create($this->db);
                     $name = 'Category';
                     $value =& $cl[$sp->cat_id];
                 } else {
                     $name = preg_replace('/_/', ' ', ucwords($param));
                     $value = $sp->{$param};
                 }
                 if ($param == 'show_internal_info' && $sp->{$param} == 'no') {
                     continue;
                 }
                 if ($name != '') {
                     $table->addRow(array($name . ':', $value));
                 }
             }
         }
         $al = null;
         $values = array();
         if (!empty($_SESSION['user']) && $sp->author_myself != '' && $_SESSION['user']->author_id != '') {
             $authors = pdAuthorList::create($this->db, null, null, true);
             $values[] = $authors[$_SESSION['user']->author_id];
         }
         if (!empty($sp->authors)) {
             $values[] = $sp->authors;
         }
         if (count($values) > 0) {
             $table->addRow(array('<b>Author(s)</b>:', implode(' AND ', $values)));
         }
         if (isset($_SESSION['user']) && $_SESSION['user']->showInternalInfo()) {
             if (!empty($sp->paper_rank)) {
                 // ranking
                 $label = 'Ranking:';
                 $rankings = pdPublication::rankingsGlobalGet($this->db);
                 foreach ($sp->paper_rank as $rank_id => $value) {
                     if ($value != 'yes') {
                         continue;
                     }
                     $table->addRow(array($label, $rankings[$rank_id]));
                     $label = '';
                 }
                 if ($sp->paper_rank_other != '') {
                     $table->addRow(array($label, $sp->paper_rank_other));
                 }
             }
             if (!empty($sp->paper_col)) {
                 // collaboration
                 $label = 'Collaboration:';
                 $collaborations = pdPublication::collaborationsGet($this->db);
                 foreach ($sp->paper_col as $col_id => $value) {
                     if ($value != 'yes') {
                         continue;
                     }
                     $table->addRow(array($label, $collaborations[$col_id]));
                     $label = '';
                 }
             }
         }
         if ($sp->startdate != '' && $sp->enddate != '') {
             $stime = strtotime(implode('-', $sp->startdate) . '-1');
             $etime = strtotime(implode('-', $sp->enddate) . '-1');
             // now check the dates
             if ($etime > $stime) {
                 $table->addRow(array('<b>Start date</b>:', $sp->startdate['Y'] . '-' . sprintf("%02d", $sp->startdate['M'])));
                 $table->addRow(array('<b>End date</b>:', $sp->enddate['Y'] . '-' . sprintf("%02d", $sp->enddate['M'])));
             }
         }
     }
     $table->updateColAttributes(0, array('class' => 'emph'), true);
     echo '<h3>SEARCH RESULTS FOR</h3>';
     echo $table->toHtml();
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:83,代码来源:search_results.php

示例14: array

</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());
}
$sql = "SELECT DISTINCT `flmevent_feature` FROM `flexlm_events` WHERE `flmevent_type`='OUT'";
$recordset = $db->query($sql);
if (DB::isError($recordset)) {
    die($recordset->getMessage());
开发者ID:tseel,项目名称:phplicensewatcher,代码行数:31,代码来源:checkouts.php

示例15: mktime

    include_once './tools.php';
}
#########################################################
# Date when the licenses will expire
#########################################################
$expire_date = mktime(0, 0, 0, date("m"), date("d") + $lead_time, date("Y"));
$today = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$message = "<p align=\"center\"><a href=\"admin.php\"><img src=\"back.jpg\" alt=\"up page\" border=\"0\"></a></p>";
##############################################################
# We are using PHP Pear stuff ie. pear.php.net
##############################################################
require_once "HTML/Table.php";
$table = new HTML_Table();
$headerStyle = "bgcolor=lightblue";
$colHeaders = array("Server", "Server description", "Feature", "Version", "Expiration", "Days to expiration", "Number of license(s) expiring");
$table->addRow($colHeaders, $headerStyle, "TH");
#######################################################
# Get names of different colors. These will be used to group visually
# licenses from the same license server
#######################################################
$color = explode(",", $colors);
$i = 0;
foreach ($server as $host) {
    $master_array = getDetails($host);
    $expiration_array = $master_array['expiration'];
    # Now after the expiration has been built loop through all the fileservers
    foreach ($expiration_array as $key => $myarray) {
        for ($j = 0; $j < sizeof($myarray); $j++) {
            if (strcmp($myarray[$j]["days_to_expiration"], "permanent") != 0 && $myarray[$j]["days_to_expiration"] <= $lead_time) {
                if ($myarray[$j]["days_to_expiration"] < 0) {
                    $myarray[$j]["days_to_expiration"] = "<b>Already expired</b>";
开发者ID:tseel,项目名称:phplicensewatcher,代码行数:31,代码来源:license_alert.php


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