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


PHP html_tag函数代码示例

本文整理汇总了PHP中html_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP html_tag函数的具体用法?PHP html_tag怎么用?PHP html_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: displayForm

 /** inheritdoc */
 public static function displayForm($value, &$settings, $model)
 {
     $class = get_called_class();
     $settings = static::settings($settings);
     $include_label = isset($settings['label']) ? $settings['label'] : true;
     $required = isset($settings['required']) ? $settings['required'] : false;
     $errors = $model->getErrorsForField($settings['mapping']['fieldName']);
     $has_errors = count($errors) > 0;
     $input_attributes = isset($settings['input_attributes']) ? $settings['input_attributes'] : array('class' => 'input-xxlarge form-control');
     if (!isset($input_attributes['id'])) {
         $input_attributes['id'] = 'form_' . $settings['mapping']['fieldName'];
     }
     $attributes = array('class' => 'controls control-group' . ($has_errors ? ' error' : '') . ' field-type-' . $class::type($settings));
     $label_text = $settings['title'] . ($required ? ' *' : '');
     // Build the input
     $input = '<input type="text" name="' . $settings['mapping']['fieldName'] . '" ' . array_to_attr($input_attributes) . ' value="' . \Security::htmlentities(strval($value), ENT_QUOTES) . '" />';
     // Build the label
     $label = !$include_label ? '' : \Form::label($label_text . ($has_errors ? ' - ' . $errors[0] : ''), $settings['mapping']['fieldName'], array('class' => 'item-label'));
     // Wrap it in an input group
     $input = html_tag('div', array('class' => 'input-append'), $input . html_tag('span', array('class' => 'add-on'), ' '));
     // Don't wrap the input if wrap is set to false
     if (isset($settings['wrap']) && $settings['wrap'] === false) {
         return $label . $input;
     }
     return html_tag('div', $attributes, $label . $input);
 }
开发者ID:soundintheory,项目名称:fuel-cmf,代码行数:27,代码来源:Color.php

示例2: initContent

 protected function initContent()
 {
     $this->setTitle('Client');
     $error = $this->getAction()->getError();
     $data = $this->getAction()->getData();
     $html = '';
     if ($error) {
         $html .= html_tag('div', array('class' => 'alert alert-error'), $error['info']);
     }
     if (!isset($data['info'])) {
         return $html;
     }
     $info = $data['info'];
     $displayInfo = $info['uaData']['displayInfo'];
     $this->setSubTitle('#' . $info['id']);
     $html .= '<h3>Information</h3>' . '<div class="row">' . '<div class="span2">' . BrowserInfo::buildIconHtml($displayInfo) . '</div>' . '<div class="span10">' . '<table class="table table-striped">' . '<tbody>' . '<tr><th>Name</th><td>' . html_tag('a', array('href' => $info['viewUrl']), $info['name']) . '</td></tr>' . '<tr><th>UA ID</th><td>' . '<code>' . htmlspecialchars($info['uaID']) . '</code>' . '<tr><th>User-Agent</th><td>' . '<tt>' . htmlspecialchars($info['uaRaw']) . '</tt>' . '</td></tr>' . '<tr><th>Session age</th><td>' . number_format(intval($info['sessionAge'])) . 's' . '</td></tr>' . '<tr><th>Connected</th><td>' . self::getPrettyDateHtml($info, 'connected') . '</td></tr>' . '<tr><th>Last ping</th><td>' . self::getPrettyDateHtml($info, 'pinged') . '</td></tr>' . '</tbody></table>' . '</div>' . '</div>';
     $html .= '<h3>Log</h3>';
     if (!$data['results']) {
         $html .= '<div class="alert alert-info">Client has no run log.</div>';
     } else {
         $html .= '<table class="table table-striped">' . '<thead><tr><th>Result</th><th>Project</th></th><th>Run</th><th>Status</th>' . '<tbody>';
         foreach ($data['results'] as $run) {
             $html .= '<tr>' . '<td>' . html_tag('a', array('href' => $run['viewUrl']), '#' . $run['id']) . '</td>' . '<td>' . ($run['project'] ? html_tag('a', array('href' => $run['project']['viewUrl']), $run['project']['display_title']) : '-') . '</td>' . '<td>' . ($run['job'] && $run['run'] ? html_tag('a', array('href' => $run['job']['viewUrl']), $run['job']['nameText'] . ' / ' . $run['run']['name']) : '<em>Job has been deleted</em>') . '</td>' . JobPage::getJobStatusHtmlCell($run['status']) . '</tr>';
         }
         $html .= '</tbody></table>';
     }
     return $html;
 }
开发者ID:progden,项目名称:testswarm,代码行数:28,代码来源:ClientPage.php

示例3: displayForm

 /**
  * Renders the field's form element for editing in the admin site
  */
 public static function displayForm($value, &$settings, $model)
 {
     $class = get_called_class();
     $settings = static::settings($settings);
     $include_label = isset($settings['label']) ? $settings['label'] : true;
     $required = isset($settings['required']) ? $settings['required'] : false;
     $errors = $model->getErrorsForField($settings['mapping']['fieldName']);
     $has_errors = count($errors) > 0;
     $input_attributes = isset($settings['input_attributes']) ? $settings['input_attributes'] : array('class' => 'input-xxlarge');
     if (!isset($input_attributes['id'])) {
         $input_attributes['id'] = 'form_' . $settings['mapping']['fieldName'];
     }
     $attributes = array('class' => 'controls control-group' . ($has_errors ? ' error' : '') . ' field-type-' . $class::type($settings));
     $label_text = $settings['title'] . ($required ? ' *' : '');
     if (empty($value)) {
         $value = substr(\Security::generate_token(), 0, 16);
     }
     // Description?
     $description = isset($settings['description']) ? '<span class="help-block">' . $settings['description'] . '</span>' : '';
     // Build the input
     $input = '<input type="text" name="' . $settings['mapping']['fieldName'] . '" ' . array_to_attr($input_attributes) . ' value="' . \Security::htmlentities(strval($value), ENT_QUOTES) . '" />';
     // Build the label
     $label = !$include_label ? '' : html_tag('label', array('class' => 'item-label', 'for' => $settings['mapping']['fieldName']), $label_text . ($has_errors ? ' - ' . $errors[0] : ''));
     // Don't wrap the input if wrap is set to false
     if (isset($settings['wrap']) && $settings['wrap'] === false) {
         return $label . $input;
     }
     return html_tag('div', $attributes, $label . $description . $input);
 }
开发者ID:soundintheory,项目名称:fuel-cmf,代码行数:32,代码来源:RandomKey.php

示例4: initContent

 protected function initContent()
 {
     $request = $this->getContext()->getRequest();
     $this->setTitle("Job name");
     if ($request->getSessionData("auth") !== "yes") {
         $html = html_tag("div", array("class" => "alert alert-error"), "You must be authenticated in order to add a job.");
         return $html;
     }
     $this->bodyScripts[] = swarmpath("js/AddDevBoxJob.js");
     $this->bodyScripts[] = swarmpath("js/bootstrap-tooltip.js");
     $this->bodyScripts[] = swarmpath("js/bootstrap-popover.js");
     $this->bodyScripts[] = swarmpath("js/bootstrap-button.js");
     $this->bodyScripts[] = swarmpath("js/json2.js");
     $this->styleSheets[] = swarmpath("css/AddDevBoxJob.css");
     $html = "";
     $error = $this->getAction()->getError();
     $data = $this->getAction()->getData();
     if ($request->wasPosted()) {
         if ($error) {
             $html .= html_tag("div", array("class" => "alert alert-error"), $error["info"]);
         } elseif ($data && isset($data["id"])) {
             $html .= '<div class="alert alert-success">' . '<strong><a href="' . htmlspecialchars(swarmpath("job/{$data["id"]}")) . '">Job ' . $data["id"] . '</a> has been created!</strong><br>' . $data["runTotal"] . ' runs have been scheduled to be ran in ' . $data["uaTotal"] . ' different browsers.<br><br>' . '<a class="btn btn-primary btn-small" href="' . htmlspecialchars(swarmpath("job/{$data["id"]}")) . '">continue to job page &raquo;</a>' . '</div>';
         }
     }
     if ($data && isset($data["id"])) {
         $jobId = $data["id"];
         header("X-TestSwarm-JobId: {$jobId}", true);
     }
     $html .= $this->getAddjobFormHtml();
     return $html;
 }
开发者ID:rhodblinkbox,项目名称:testswarm,代码行数:31,代码来源:AdddevboxjobPage.php

示例5: initContent

 protected function initContent()
 {
     $request = $this->getContext()->getRequest();
     $resultsID = $request->getInt('item');
     $this->setTitle('Run result');
     $this->setRobots('noindex,nofollow');
     $this->bodyScripts[] = swarmpath('js/result.js');
     $error = $this->getAction()->getError();
     $data = $this->getAction()->getData();
     $html = '';
     if ($error) {
         $html .= html_tag('div', array('class' => 'alert alert-error'), $error['info']);
         return $html;
     }
     $this->setSubTitle('#' . $data['info']['id']);
     if ($data['job']) {
         $html = '<p><em>' . html_tag_open('a', array('href' => $data['job']['url'], 'title' => 'Back to Job #' . $data['job']['id'])) . '&laquo Back to Job #' . $data['job']['id'] . '</a>' . '</em></p>';
     } else {
         $html = '<p><em>Run #' . $data['info']['runID'] . ' has been deleted. Job info unavailable.</em></p>';
     }
     if ($data['otherRuns']) {
         $html .= '<table class="table table-bordered swarm-results"><thead>' . JobPage::getUaHtmlHeader($data['otherRuns']['userAgents']) . '</thead><tbody>' . JobPage::getUaRunsHtmlRows($data['otherRuns']['runs'], $data['otherRuns']['userAgents']) . '</tbody></table>';
     }
     $html .= '<h3>Information</h3>' . '<table class="table table-striped">' . '<tbody>' . '<tr><th>Run</th><td>' . ($data['job'] ? html_tag('a', array('href' => $data['job']['url']), 'Job #' . $data['job']['id']) . ' / ' : '') . 'Run #' . htmlspecialchars($data['info']['runID']) . '</td></tr>' . '<tr><th>Client</th><td>' . html_tag('a', array('href' => $data['client']['viewUrl']), 'Client #' . $data['info']['clientID']) . ' / ' . htmlspecialchars($data['client']['name']) . '</td></tr>' . '<tr><th>UA ID</th><td>' . '<code>' . htmlspecialchars($data['client']['uaID']) . '</code>' . '<tr><th>User-Agent</th><td>' . '<tt>' . htmlspecialchars($data['client']['uaRaw']) . '</tt>' . '</td></tr>' . '<tr><th>Run time</th><td>' . (isset($data['info']['runTime']) ? number_format(intval($data['info']['runTime'])) . 's' : '?') . '</td></tr>' . '<tr><th>Status</th><td>' . htmlspecialchars($data['info']['status']) . '</td></tr>' . '<tr><th>Started</th><td>' . self::getPrettyDateHtml($data['info'], 'started') . '</td></tr>' . (isset($data['info']['savedLocalFormatted']) ? '<tr><th>Saved</th><td>' . self::getPrettyDateHtml($data['info'], 'saved') . '</td></tr>' : '') . '</tbody></table>';
     $html .= '<h3>Results</h3>' . '<p class="swarm-toollinks">' . html_tag('a', array('href' => swarmpath('index.php') . '?' . http_build_query(array('action' => 'result', 'item' => $data['info']['id'], 'raw' => '')), 'target' => '_blank', 'class' => 'swarm-popuplink'), 'Open in new window') . '</p>' . html_tag('iframe', array('src' => swarmpath('index.php') . '?' . http_build_query(array('action' => 'result', 'item' => $data['info']['id'], 'raw' => '')), 'width' => '100%', 'class' => 'swarm-result-frame'));
     return $html;
 }
开发者ID:namminammi,项目名称:testswarm,代码行数:27,代码来源:ResultPage.php

示例6: getBrowsersOnlineHtml

 /** @return bool: Whether the current user was found in the swarm */
 public function getBrowsersOnlineHtml()
 {
     $conf = $this->getContext()->getConf();
     $db = $this->getContext()->getDB();
     $browserInfo = $this->getContext()->getBrowserInfo();
     $data = $this->getAction()->getData();
     $html = '';
     $itemsPerRow = 6;
     $browsersHtml = '<h2>State of the Swarm</h2>';
     $browserItemCount = 0;
     foreach ($data['userAgents'] as $uaID => $userAgent) {
         $isCurr = $uaID == $browserInfo->getSwarmUaID();
         $displayInfo = $userAgent['data']['displayInfo'];
         $item = '' . '<div class="span2">' . '<div class="well well-swarm-icon' . ($isCurr ? ' alert-info' : '') . '">' . html_tag('div', array('class' => $displayInfo['class'], 'title' => $displayInfo['title'])) . '<br>' . html_tag_open('span', array('class' => 'label swarm-browsername')) . $displayInfo['labelHtml'] . '</span>' . '<br>' . html_tag('span', array('class' => 'swarm-onlineclients ' . ($userAgent["stats"]["onlineClients"] > 0 ? "badge" : ($userAgent['stats']['pendingRuns'] > 0 ? 'badge badge-important' : 'badge')), "title" => $userAgent["stats"]["onlineClients"] . ' clients online'), $userAgent["stats"]["onlineClients"]) . html_tag("span", array("class" => "swarm-pendingruns " . ($userAgent["stats"]["pendingRuns"] > 0 ? $userAgent["stats"]["onlineClients"] > 0 ? "badge badge-info" : "badge badge-warning" : "badge badge-success")), $userAgent["stats"]["pendingRuns"] . ' runs') . ($userAgent["stats"]["pendingReRuns"] > 0 ? ' ' . html_tag("span", array("class" => "swarm-pendingreruns " . ($userAgent["stats"]["onlineClients"] > 0 ? "badge badge-info" : "badge badge-warning")), $userAgent["stats"]["pendingReRuns"] . ' re-runs') : "") . '</div>' . '</div>';
         // Properly close and start new rows
         if ($browserItemCount % $itemsPerRow === 0) {
             $browsersHtml .= '<div class="row">';
         }
         $browserItemCount += 1;
         $browsersHtml .= $item;
         if ($browserItemCount % $itemsPerRow === 0) {
             $browsersHtml .= '</div><!--/.row -->';
         }
     }
     // Close un-even items rows
     if ($browserItemCount % $itemsPerRow !== 0) {
         $browsersHtml .= '</div><!--/.row -->';
     }
     if ($browserItemCount === 0) {
         $browsersHtml .= '<p><em>This swarm is empty!</em></p>';
     }
     $html .= $browsersHtml;
     return $html;
 }
开发者ID:namminammi,项目名称:testswarm,代码行数:35,代码来源:HomePage.php

示例7: displayForm

 /** @inheritdoc */
 public static function displayForm($value, &$settings, $model)
 {
     // No point in ever showing this field if lang isn't enabled
     if (!\CMF::$lang_enabled) {
         return '';
     }
     \Lang::load('languages', true, 'en', true, true);
     $settings = static::settings($settings);
     $include_label = isset($settings['label']) ? $settings['label'] : true;
     $required = isset($settings['required']) ? $settings['required'] : false;
     $errors = $model->getErrorsForField($settings['mapping']['fieldName']);
     $has_errors = count($errors) > 0;
     $input_attributes = isset($settings['input_attributes']) ? $settings['input_attributes'] : array('class' => 'input-xxlarge');
     if ($settings['active_only']) {
         $options = array_map(function ($lang) {
             return \Arr::get(\Lang::$lines, 'en.languages.' . $lang['code'], \Lang::get('admin.errors.language.name_not_found'));
         }, \CMF\Model\Language::select('item.code', 'item', 'item.code')->orderBy('item.pos', 'ASC')->where('item.visible = true')->getQuery()->getArrayResult());
     } else {
         $options = \Arr::get(\Lang::$lines, 'en.languages', array());
     }
     // Whether to allow an empty option
     if (isset($settings['mapping']['nullable']) && $settings['mapping']['nullable'] && !$required && $settings['allow_empty']) {
         $options = array('' => '') + $options;
     }
     $label = !$include_label ? '' : \Form::label($settings['title'] . ($required ? ' *' : '') . ($has_errors ? ' - ' . $errors[0] : ''), $settings['mapping']['fieldName'], array('class' => 'item-label'));
     $input = \Form::select($settings['mapping']['fieldName'], $value, $options, $input_attributes);
     if (isset($settings['wrap']) && $settings['wrap'] === false) {
         return $label . $input;
     }
     return html_tag('div', array('class' => 'controls control-group' . ($has_errors ? ' error' : '')), $label . $input);
 }
开发者ID:soundintheory,项目名称:fuel-cmf,代码行数:32,代码来源:Language.php

示例8: initContent

 protected function initContent()
 {
     $request = $this->getContext()->getRequest();
     $resultsID = $request->getInt('item');
     $this->setTitle('Run result');
     $this->setRobots('noindex,nofollow');
     $this->bodyScripts[] = swarmpath('js/result.js');
     $error = $this->getAction()->getError();
     $data = $this->getAction()->getData();
     $html = '';
     if ($error) {
         $html .= html_tag('div', array('class' => 'alert alert-error'), $error['info']);
         return $html;
     }
     $this->setSubTitle('#' . $data['resultInfo']['id']);
     if ($data['job']) {
         $html = '<p><em>' . html_tag_open('a', array('href' => $data['job']['url'], 'title' => 'Back to Job #' . $data['job']['id'])) . '&laquo Back to Job #' . $data['job']['id'] . '</a>' . '</em></p>';
     } else {
         $html = '<p><em>Run #' . $data['resultInfo']['runID'] . ' has been deleted. Job info unavailable.</em></p>';
     }
     if ($data['otherRuns']) {
         $html .= '<table class="table table-bordered swarm-results"><thead>' . JobPage::getUaHtmlHeader($data['otherRuns']['userAgents']) . '</thead><tbody>' . JobPage::getUaRunsHtmlRows($data['otherRuns']['runs'], $data['otherRuns']['userAgents']) . '</tbody></table>';
     }
     $html .= '<h3>Information</h3>' . '<table class="table table-striped">' . '<colgroup><col class="span2"/><col/></colgroup>' . '<tbody>' . '<tr><th>Run</th><td>' . ($data['job'] ? html_tag('a', array('href' => $data['job']['url']), 'Job #' . $data['job']['id']) . ' / ' : '') . 'Run #' . htmlspecialchars($data['resultInfo']['runID']) . '</td></tr>' . '<tr><th>Client</th><td>' . html_tag('a', array('href' => $data['client']['userUrl']), $data['client']['userName']) . ' / Client #' . htmlspecialchars($data['resultInfo']['clientID']) . '</td></tr>' . ($data['client']['deviceName'] !== null ? '<tr><th>Device name</th><td>' . $data['client']['deviceName'] . ' / ' . html_tag('a', array('target' => '_blank', 'href' => 'http://wiki.blinkbox.local/wiki/index.php?profile=default&search=' . htmlspecialchars($data['client']['deviceName'])), 'search for ' . $data['client']['deviceName'] . ' on blinkbox wiki') . '</td></tr>' : '') . '<tr><th>User-Agent</th><td>' . '<code>' . htmlspecialchars($data['client']['uaID']) . '</code><br/>' . 'Raw: <br><code>' . htmlspecialchars($data['client']['userAgent']) . '</code><br/>' . html_tag('a', array('target' => '_blank', 'href' => 'http://wiki.blinkbox.local/wiki/index.php?profile=default&search=' . htmlspecialchars($data['client']['userAgent'])), 'search for this user agent on blinkbox wiki') . '</td></tr>' . '<tr><th>Run time</th><td>' . (isset($data['resultInfo']['runTime']) ? number_format(intval($data['resultInfo']['runTime'])) . 's' : '?') . '</td></tr>' . '<tr><th>Status</th><td>' . htmlspecialchars($data['resultInfo']['status']) . '</td></tr>' . '<tr><th>Total</th><td>' . htmlspecialchars($data['resultInfo']['total']) . '</td></tr>' . '<tr><th>Fail</th><td>' . htmlspecialchars($data['resultInfo']['fail']) . '</td></tr>' . '<tr><th>Error</th><td>' . htmlspecialchars($data['resultInfo']['error']) . '</td></tr>' . '<tr><th>Started</th><td>' . self::getPrettyDateHtml($data['resultInfo'], 'started') . '</td></tr>' . (isset($data['resultInfo']['savedLocalFormatted']) ? '<tr><th>Saved</th><td>' . self::getPrettyDateHtml($data['resultInfo'], 'saved') . '</td></tr>' : '') . '<tr><th>Results size</th><td>' . 'compressed: ' . self::formatBytes($data['resultInfo']['reportHtmlCompressedSize']) . ' / uncompressed: ' . self::formatBytes($data['resultInfo']['reportHtmlSize']) . ' / ratio: ' . $data['resultInfo']['reportHtmlCompressionRatio'] . '%' . '</td></tr>' . '</tbody></table>';
     $html .= '<h3>Results</h3>' . '<p class="swarm-toollinks">' . html_tag('a', array('href' => swarmpath('index.php') . '?' . http_build_query(array('action' => 'result', 'item' => $data['resultInfo']['id'], 'raw' => '')), 'target' => '_blank', 'class' => 'swarm-popuplink'), 'Open in new window') . '</p>' . html_tag('iframe', array('src' => swarmpath('index.php') . '?' . http_build_query(array('action' => 'result', 'item' => $data['resultInfo']['id'], 'raw' => '')), 'width' => '100%', 'class' => 'swarm-result-frame'));
     return $html;
 }
开发者ID:rhodblinkbox,项目名称:testswarm,代码行数:27,代码来源:ResultPage.php

示例9: displayForm

 public static function displayForm($value, &$settings, $model)
 {
     $settings = static::settings($settings);
     if (!is_array($value)) {
         $value = array();
     }
     // Search input or
     $searchInput = \Form::input($settings['mapping']['fieldName'] . '[search]', null, array('class' => 'input input-xxlarge search-input', 'placeholder' => \Lang::get('admin.common.map_search_placeholder')));
     $searchButton = \Form::button('mapsearch', \Lang::get('admin.verbs.search'), array('class' => 'btn btn-primary'));
     $searchInput = html_tag('div', array('class' => 'form form-inline search-form'), $searchInput . $searchButton);
     // Hidden inputs
     $latInput = \Form::hidden($settings['mapping']['fieldName'] . '[lat]', \Arr::get($value, 'lat'), array('class' => 'lat'));
     $lngInput = \Form::hidden($settings['mapping']['fieldName'] . '[lng]', \Arr::get($value, 'lng'), array('class' => 'lng'));
     $zoomInput = \Form::hidden($settings['mapping']['fieldName'] . '[zoom]', \Arr::get($value, 'zoom'), array('class' => 'zoom'));
     // Other elements
     $required = isset($settings['required']) ? $settings['required'] : false;
     $label_text = $settings['title'] . ($required ? ' *' : '');
     $label = \Form::label($label_text);
     $mapDiv = html_tag('div', array('class' => 'map', 'id' => \Inflector::friendly_title($settings['mapping']['fieldName'], '-', true) . '-bing-map'), ' ');
     // Check that we have an API key
     if (empty($settings['api_key'])) {
         $content = $label . '<div class="well"><p>' . \Lang::get('admin.bing.api_key_not_set') . '</p></div>';
     } else {
         $content = $label . $searchInput . $latInput . $lngInput . $zoomInput . $mapDiv;
     }
     $content = html_tag('div', array('class' => 'controls control-group field-type-bing-map', 'data-field-name' => $settings['mapping']['fieldName']), $content);
     return array('content' => $content, 'js_data' => $settings);
 }
开发者ID:soundintheory,项目名称:fuel-cmf,代码行数:28,代码来源:BingMap.php

示例10: getBrowsersOnlineHtml

 /** @return bool: Whether the current user was found in the swarm */
 public function getBrowsersOnlineHtml()
 {
     $conf = $this->getContext()->getConf();
     $db = $this->getContext()->getDB();
     $browserInfo = $this->getContext()->getBrowserInfo();
     $data = $this->getAction()->getData();
     $html = '';
     $itemsPerRow = 6;
     $browsersHtml = '<h2>Browsers</h2>';
     $browserItemCount = 0;
     foreach ($data["userAgents"] as $uaID => $userAgent) {
         if (!in_array($uaID, $conf->browserSets->default)) {
             continue;
         }
         $isCurr = $uaID == $browserInfo->getSwarmUaID();
         $item = '' . '<div class="span2">' . '<div class="well well-small swarm-browseronline' . ($isCurr ? " alert-info" : "") . '">' . html_tag("img", array("src" => swarmpath("img/" . $userAgent["data"]["displayicon"] . ".sm.png"), "class" => "swarm-browsericon", "alt" => "", "title" => $userAgent["data"]["displaytitle"])) . '<br>' . html_tag("span", array("class" => "badge swarm-browsername"), $userAgent["data"]["displaytitle"]) . '<br>' . html_tag("span", array("class" => "swarm-onlineclients " . ($userAgent["stats"]["onlineClients"] > 0 ? "badge" : ($userAgent['stats']['pendingRuns'] > 0 ? 'badge badge-important' : 'badge')), "title" => $userAgent["stats"]["onlineClients"] . ' clients online'), $userAgent["stats"]["onlineClients"]) . html_tag("span", array("class" => "swarm-pendingruns " . ($userAgent["stats"]["pendingRuns"] > 0 ? $userAgent["stats"]["onlineClients"] > 0 ? "label label-info" : "label label-warning" : "label label-success")), $userAgent["stats"]["pendingRuns"] . ' pending runs') . ($userAgent["stats"]["pendingReRuns"] > 0 ? '<br>' . html_tag("span", array("class" => "swarm-pendingreruns " . ($userAgent["stats"]["onlineClients"] > 0 ? "label label-info" : "label label-warning")), $userAgent["stats"]["pendingReRuns"] . ' pending re-runs') : "") . '</div>' . '</div>';
         // Properly close and start new rows
         if ($browserItemCount % $itemsPerRow === 0) {
             $browsersHtml .= '<div class="row">';
         }
         $browserItemCount += 1;
         $browsersHtml .= $item;
         if ($browserItemCount % $itemsPerRow === 0) {
             $browsersHtml .= '</div><!--/.row -->';
         }
     }
     // Close un-even items rows
     if ($browserItemCount % $itemsPerRow !== 0) {
         $browsersHtml .= '</div><!--/.row -->';
     }
     $html .= $browsersHtml;
     return $html;
 }
开发者ID:rosssclafani,项目名称:testswarm,代码行数:34,代码来源:HomePage.php

示例11: render_header

 /**
  * Render Header
  * 
  * Renders the header of a column
  * 
  * @access	public
  * @param	Spark\Grid_Column_Header	Header
  * @return	Spark\Grid_Column_Renderer_Interface
  */
 public function render_header(\Grid_Column_Header $header)
 {
     // Build a checkbox
     $checkbox = \Form::checkbox(null, 1, array('targets' => ($name = $header->get_column()->get_name()) ? $name : $header->get_column()->get_identifier() . '[]'));
     // Set the rendered value
     $header->set_rendered_value(html_tag('span', array('class' => 'header-checkbox'), $checkbox));
     return $this;
 }
开发者ID:EdgeCommerce,项目名称:edgecommerce,代码行数:17,代码来源:checkbox.php

示例12: title

 /**
  * Generates a html title tag
  *
  * @static
  * @access	public
  * @param	string	$content page title
  * @return	string
  */
 public static function title($content = '')
 {
     $title = \Config::get('app.site_name');
     if (!empty($content) and is_string($content)) {
         $title = sprintf('%s &mdash; %s', $content, $title);
     }
     return html_tag('title', array(), $title);
 }
开发者ID:huzairy,项目名称:feedmalaya,代码行数:16,代码来源:html.php

示例13: get_search

 public static function get_search($class, $col, $val)
 {
     $params = array('type' => 'text', 'name' => 'list_search[' . $col . ']');
     if ($val) {
         $params['value'] = $val;
     }
     return html_tag('input', $params);
 }
开发者ID:nathanharper,项目名称:fuel_cms_nh,代码行数:8,代码来源:adminfield.php

示例14: item_view

 public function item_view()
 {
     $value = $this->item->{$this->field};
     $class = str_replace('\\', '', $this->class);
     $id = $this->item->id ? $this->item->id : 'new';
     $format = $this->def('format', false);
     return html_tag('input', array('value' => $value ? date($format ? $format : \Config::get('date_format', 'm/d/Y'), $value) : '', 'type' => 'text', 'class' => 'datepicker', 'name' => "item_field[{$class}][{$id}][{$this->field}]"));
 }
开发者ID:nathanharper,项目名称:fuel_cms_nh,代码行数:8,代码来源:date.php

示例15: abook_take_options

function abook_take_options()
{
    global $abook_take_verify;
    echo '<tr>' . html_tag('td', _("Address Book Take:"), 'right', '', 'nowrap') . "\n" . '<td><input name="abook_take_abook_take_verify" type="checkbox"';
    if (isset($abook_take_verify) && $abook_take_verify) {
        echo ' checked';
    }
    echo ' /> ' . _("Try to verify addresses") . "</td></tr>\n";
}
开发者ID:jin255ff,项目名称:company_website,代码行数:9,代码来源:setup.php


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