• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP HTML类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: urlToData

 function urlToData($url)
 {
     $html = new HTML();
     $url = explode("/", $url);
     foreach ($url as $el) {
         $el = $html->sanatizeString($el);
         $el = strtolower($el);
         if (!$el) {
             continue;
         }
         if (IMAGE_CHANGE_CODE && substr($el, 0, 10) == 'changecode') {
             $data['changecode'] = substr($el, 11);
         }
         if ($this->isImage($el)) {
             $data['hash'] = $el;
         } else {
             if ($el == 'mp4' || $el == 'raw' || $el == 'preview' || $el == 'webm') {
                 $data[$el] = 1;
             } else {
                 if ($this->isSize($el)) {
                     $data['size'] = $el;
                 } else {
                     if ($this->isRotation($el)) {
                         $data['rotate'] = $el;
                     } else {
                         if ($this->isFilter($el)) {
                             $data['filter'][] = $el;
                         } else {
                             if ($legacy = $this->isLegacyThumbnail($el)) {
                                 $data['hash'] = $legacy['hash'];
                                 $data['size'] = $legacy['size'];
                             } else {
                                 if ($el == 'forcesize') {
                                     $data['forcesize'] = true;
                                 } else {
                                     if (strlen(MASTER_DELETE_CODE) > 10 && $el == 'delete_' . MASTER_DELETE_CODE) {
                                         $data['delete'] = true;
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     if ($data['delete'] && $data['hash']) {
         $this->deleteImage($data['hash']);
         return false;
     }
     if ($data['mp4']) {
         $hash = $data['hash'];
         if (!$hash || $this->getTypeOfHash($hash) != 'gif') {
             unset($data['mp4']);
         }
     }
     return $data;
 }
开发者ID:cavebeat,项目名称:pictshare,代码行数:58,代码来源:pictsharemodel.php


示例2: getContent

 public function getContent($file)
 {
     $writer = new HTML(@IOFactory::load($file));
     $html = $writer->getContent();
     // Remove <style> manually
     $html = preg_replace('/<style>.*<\\/style>/s', '', $html);
     // Remove HTML tags
     return strip_tags($html);
 }
开发者ID:marcbp,项目名称:invoice-finder,代码行数:9,代码来源:PhpOfficeWordReader.php


示例3: createHiddenIDs

 function createHiddenIDs()
 {
     $input = new HTML("input");
     $input->addAttr("type", "hidden");
     $input->addAttr("evalID", Request::option('evalID'));
     $input = new HTML("input");
     $input->addAttr("type", "hidden");
     $input->addAttr("itemID", Request::option('itemID'));
     $input = new HTML("input");
     $input->addAttr("type", "hidden");
     $input->addAttr("rangeID", Request::option("rangeID"));
     return;
 }
开发者ID:ratbird,项目名称:hope,代码行数:13,代码来源:evaluation_admin_edit.lib.php


示例4: renderStyles

    public static function renderStyles(){
               
         if (count(self::$_styles) == 0)
               return FALSE;      
               
         self::$_styles = array_unique(self::$_styles);      
               
         switch ( Kohana::$environment){
           
              case Kohana::DEVELOPMENT:
              case Kohana::STAGING:
              case kohana::TESTING:     
              default:
                                      
                 foreach (self::$_styles as $style){
                       echo HTML::style("media/styles/".$style);
                 }
                  
                 break;
                 
             case Kohana::PRODUCTION:
               
               ?><link rel='stylesheet' type='text/css' href='<?php 
echo url::base();
?>
min/index.php?b=media/styles&amp;f=<?php 
echo implode(",", self::$_styles);
?>
' /><?

                 break;                        
          } 
          
    }
开发者ID:kippel,项目名称:kippel-util,代码行数:34,代码来源:media.php


示例5: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        foreach ($this->_group_by_city() as $city => $venues) {
            ?>

<header>
	<h4><?php 
            echo HTML::chars($city);
            ?>
</h4>
</header>

<ul class="list-unstyled row">
<?php 
            foreach ($venues as $venue) {
                ?>

	<li class="col-xs-6 col-sm-4 col-md-3"><?php 
                echo HTML::anchor(Route::model($venue), HTML::chars($venue->name));
                ?>
</li>

<?php 
            }
            ?>
</ul>

<?php 
        }
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:37,代码来源:index.php


示例6: summaryAsHTML

 function summaryAsHTML($rev)
 {
     if (!($summary = $this->summary($rev))) {
         return '';
     }
     return HTML::strong(array('class' => 'wiki-summary'), "(", TransformLinks($summary, $rev->get('markup'), $rev->getPageName()), ")");
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:7,代码来源:RecentChanges.php


示例7: create

 public static function create($view)
 {
     $view->tabs(function ($tabs) {
         $tabs->tab('Module Settings', function ($view) {
             $view->text('name', __('admin::module.create.form.name'), Input::old('name'));
             $view->actions(function ($view) {
                 $view->next_tab('Next up, add some schemas &nbsp; <i class="icon-arrow-right icon-white"></i>', 'primary');
             });
         });
         $tabs->tab('Schemas', function ($view) {
             $view->table(function ($table) {
                 $table->header(array('name' => array('title' => __('admin::account.read_multiple.table.name'), 'attributes' => array('class' => 'first big')), 'relationships', 'buttons' => array('attributes' => array('class' => 'buttons last'))));
                 $table->no_results(function ($table) {
                     $table->well(function ($table) {
                         $table->raw(__('admin::account.read_multiple.table.no_results'));
                     });
                 });
                 $table->display(array('relationships' => function ($schema) {
                     $relationships = '';
                     if (isset($schema->relationships)) {
                         foreach ($schema->relationships as $relationship) {
                             $relationships .= '<b>' . $relationship->name . '</b><br>' . $relationship->type;
                         }
                     }
                     return $relationships;
                 }, 'buttons' => function ($schema) {
                     return HTML::link(prefix('admin') . 'module/add/', '<span class="icon-pencil"></span>', array('class' => 'btn btn-small')) . HTML::link(prefix('admin') . 'module/add/', '<span class="icon-trash icon-white"></span>', array('class' => 'btn btn-primary'));
                 }));
             });
             $view->button('#add-schema', 'Add Schema', 'primary');
         });
     });
 }
开发者ID:reith2004,项目名称:admin,代码行数:33,代码来源:module.php


示例8: table

 /**
  * Returns a new table of all work orders.
  *
  * @param WorkOrder|Builder $workOrder
  *
  * @return \Orchestra\Contracts\Html\Builder
  */
 public function table($workOrder)
 {
     return $this->table->of('work-orders', function (TableGrid $table) use($workOrder) {
         $table->with($workOrder)->paginate($this->perPage);
         $table->attributes(['class' => 'table table-hover table-striped']);
         $table->column('ID', 'id');
         $table->column('subject', function (Column $column) {
             $column->value = function (WorkOrder $workOrder) {
                 return link_to_route('maintenance.work-orders.show', $workOrder->subject, [$workOrder->getKey()]);
             };
         });
         $table->column('Created At', 'created_at');
         $table->column('created_by', function (Column $column) {
             $column->value = function (WorkOrder $workOrder) {
                 return $workOrder->user->fullname;
             };
         });
         $table->column('priority', function (Column $column) {
             $column->value = function (WorkOrder $workOrder) {
                 if ($workOrder->priority instanceof Priority) {
                     return $workOrder->priority->getLabel();
                 }
                 return HTML::create('em', 'None');
             };
         });
         $table->column('status', function (Column $column) {
             $column->value = function (WorkOrder $workOrder) {
                 if ($workOrder->status instanceof Status) {
                     return $workOrder->status->getLabel();
                 }
                 return HTML::create('em', 'None');
             };
         });
     });
 }
开发者ID:stevebauman,项目名称:maintenance,代码行数:42,代码来源:WorkOrderPresenter.php


示例9: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        if (!$this->blog_entries) {
            return '';
        }
        ob_start();
        ?>

<ul class="list-unstyled">

	<?php 
        foreach ($this->blog_entries as $entry) {
            ?>
	<li><?php 
            echo __(':blog by :author', array(':blog' => HTML::anchor(Route::model($entry), HTML::chars($entry->name)), ':author' => HTML::user($entry->author())));
            ?>
</li>
	<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:31,代码来源:list.php


示例10: render

    /**
     * Render alert.
     *
     * @return  string
     */
    public function render()
    {
        ob_start();
        // Section attributes
        $attributes = array('class' => 'alert alert-block ' . $this->class);
        if ($this->header === true) {
            $this->header = self::generate_header();
        }
        ?>

<div <?php 
        echo HTML::attributes($attributes);
        ?>
>
	<?php 
        if ($this->header) {
            ?>
<strong><?php 
            echo HTML::chars($this->header);
            ?>
</strong><?php 
        }
        ?>

	<?php 
        echo $this->content;
        ?>
</div>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:37,代码来源:alert.php


示例11: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        if (!$this->blog_entries) {
            return '';
        }
        ob_start();
        ?>

<ul class="unstyled">

	<?php 
        foreach ($this->blog_entries as $entry) {
            ?>
	<li><?php 
            echo HTML::anchor(Route::model($entry), HTML::chars($entry->name));
            ?>
</li>
	<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:blog,代码行数:31,代码来源:list.php


示例12: paginate

 public function paginate($page = null, $link = null, $count = null)
 {
     if ($page == null) {
         $page = Arr::get($_GET, 'page', 1);
     }
     if (!empty($_GET['item_count'])) {
         $this->count = (int) Arr::get($_GET, 'item_count');
         $count = $this->count;
     } else {
         if ($count == null) {
             $count = $this->count;
         } else {
             $this->count = (int) $count;
         }
     }
     if ($link == null) {
         $link = Request::initial()->uri();
     }
     $count = (int) $count;
     $page = (int) $page;
     $start = $page * $count - $count;
     $max_page = $this->page_count();
     if ($page < 1) {
         $page = 1;
     } else {
         $page = min($page, $max_page);
     }
     $prev = $page == 1 ? false : true;
     $next = $page == $max_page ? false : true;
     $this->orm->limit($count)->offset($start);
     $this->view_vars = array('page' => $page, 'max_page' => $max_page, 'key' => $this->config->get('key', 'page'), 'count' => $count, 'link' => Security::xss_clean(HTML::chars($link)), 'next' => $next, 'prev' => $prev);
     return Security::xss_clean(HTML::chars($this));
 }
开发者ID:HappyKennyD,项目名称:teest,代码行数:33,代码来源:Paginate.php


示例13: content

    /**
     * Render content.
     *
     * @return  string
     */
    public function content()
    {
        if (!$this->events) {
            return '';
        }
        ob_start();
        ?>

<ul class="list-unstyled">

	<?php 
        foreach ($this->events as $event) {
            ?>
	<li>
		<span title="<?php 
            echo Date::format(Date::DATETIME, $event->stamp_begin) . ($event->stamp_end ? ' - ' . Date::format(Date::TIME, $event->stamp_end) : '');
            ?>
"><?php 
            echo Date::format(Date::DM_PADDED, $event->stamp_begin);
            ?>
</span>
		<?php 
            echo HTML::anchor(Route::model($event), HTML::chars($event->name), array('class' => 'hoverable', 'title' => HTML::chars($event->name)));
            ?>
	</li>
	<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:39,代码来源:list.php


示例14: PurgePage

function PurgePage(&$request)
{
    global $WikiTheme;
    $page = $request->getPage();
    $pagelink = WikiLink($page);
    if ($request->getArg('cancel')) {
        $request->redirect(WikiURL($page));
        // noreturn
    }
    $current = $page->getCurrentRevision();
    if (!$current or !($version = $current->getVersion())) {
        $html = HTML::p(array('class' => 'error'), _("Sorry, this page does not exist."));
    } elseif (!$request->isPost() || !$request->getArg('verify')) {
        $purgeB = Button('submit:verify', _("Purge Page"), 'wikiadmin');
        $cancelB = Button('submit:cancel', _("Cancel"), 'button');
        // use generic wiki button look
        $fieldset = HTML::fieldset(HTML::p(fmt("You are about to purge '%s'!", $pagelink)), HTML::form(array('method' => 'post', 'action' => $request->getPostURL()), HiddenInputs(array('currentversion' => $version, 'pagename' => $page->getName(), 'action' => 'purge')), HTML::div(array('class' => 'toolbar'), $purgeB, $WikiTheme->getButtonSeparator(), $cancelB)));
        $sample = HTML::div(array('class' => 'transclusion'));
        // simple and fast preview expanding only newlines
        foreach (explode("\n", firstNWordsOfContent(100, $current->getPackedContent())) as $s) {
            $sample->pushContent($s, HTML::br());
        }
        $html = HTML($fieldset, HTML::div(array('class' => 'wikitext'), $sample));
    } elseif ($request->getArg('currentversion') != $version) {
        $html = HTML(HTML::p(array('class' => 'error'), _("Someone has edited the page!")), HTML::p(fmt("Since you started the purge process, someone has saved a new version of %s.  Please check to make sure you still want to permanently purge the page from the database.", $pagelink)));
    } else {
        // Real purge.
        $pagename = $page->getName();
        $dbi = $request->getDbh();
        $dbi->purgePage($pagename);
        $dbi->touch();
        $html = HTML::div(array('class' => 'feedback'), fmt("Purged page '%s' successfully.", $pagename));
    }
    GeneratePage($html, _("Purge Page"));
}
开发者ID:hugcoday,项目名称:wiki,代码行数:35,代码来源:purgepage.php


示例15: html

 public function html()
 {
     $this->render_field->set('tag', 'option')->text($this->field->alias())->attr('value', HTML::entities($this->render_field->value));
     if ($this->field->parent()->val() == $this->render_field->value) {
         $this->render_field->attr('selected', 'selected');
     }
 }
开发者ID:salesignighter,项目名称:kohana-formo,代码行数:7,代码来源:core.php


示例16: linkUnknownWikiWord

 function linkUnknownWikiWord($wikiword, $linktext = '')
 {
     global $request;
     // Get rid of anchors on unknown wikiwords
     if (isa($wikiword, 'WikiPageName')) {
         $default_text = $wikiword->shortName;
         $wikiword = $wikiword->name;
     } else {
         $default_text = $wikiword;
     }
     $url = WikiURL($wikiword, array('action' => 'create'));
     //$link = HTML::span(HTML::a(array('href' => $url), '?'));
     $button = $this->makeButton('?', $url);
     $button->addTooltip(sprintf(_("Create: %s"), $wikiword));
     $link = HTML::span($button);
     if (!empty($linktext)) {
         $link->unshiftContent(HTML::u($linktext));
         $link->setAttr('class', 'named-wikiunknown');
     } else {
         $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($default_text)));
         $link->setAttr('class', 'wikiunknown');
     }
     if ($request->getArg('frame')) {
         $link->setAttr('target', '_top');
     }
     return $link;
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:27,代码来源:themeinfo.php


示例17: runActions

 /**
  * @since v3.0.3
  */
 public function runActions()
 {
     $action = null;
     $action_index = 1;
     if (count($_GET) > 1) {
         $requested_action = HTML::sanitize(basename(key(array_slice($_GET, 1, 1, true))));
         if ($requested_action == OSCOM::getSiteApplication()) {
             $requested_action = null;
             if (count($_GET) > 2) {
                 $requested_action = HTML::sanitize(basename(key(array_slice($_GET, 2, 1, true))));
                 $action_index = 2;
             }
         }
         if (!empty($requested_action) && self::siteApplicationActionExists($requested_action)) {
             $this->_current_action = $action = $requested_action;
         }
     }
     if (isset($action)) {
         call_user_func(array('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . $action, 'execute'), $this);
         $action_index++;
         if ($action_index < count($_GET)) {
             $action = array($action);
             for ($i = $action_index, $n = count($_GET); $i < $n; $i++) {
                 $subaction = HTML::sanitize(basename(key(array_slice($_GET, $i, 1, true))));
                 if (!in_array($subaction, $this->_ignored_actions) && self::siteApplicationActionExists(implode('\\', $action) . '\\' . $subaction)) {
                     call_user_func(array('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . implode('\\', $action) . '\\' . $subaction, 'execute'), $this);
                     $action[] = $subaction;
                     $this->_current_action = $subaction;
                 } else {
                     break;
                 }
             }
         }
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:38,代码来源:ApplicationAbstract.php


示例18: content

 /**
  * Render view.
  *
  * @return  string
  */
 public function content()
 {
     // Build short (friends) and long (others) user list
     $short = $long = array();
     $total = count($this->users);
     foreach ($this->users as $user) {
         $user = is_array($user) ? $user : Model_User::find_user_light($user);
         if ($total < 11 || Visitor::$user && Visitor::$user->is_friend($user)) {
             $short[mb_strtoupper($user['username'])] = HTML::user($user);
         } else {
             $long[mb_strtoupper($user['username'])] = HTML::user($user);
         }
     }
     ksort($long);
     // If no friends, pick random from long
     if (empty($short) && !empty($long)) {
         $shorts = (array) array_rand($long, min(10, count($long)));
         foreach ($shorts as $move) {
             $short[$move] = $long[$move];
             unset($long[$move]);
         }
     }
     ksort($short);
     ob_start();
     if (count($short)) {
         echo implode(', ', $short);
     }
     if (count($long)) {
         echo ' ', __('and'), ' ', HTML::anchor('#long', __(count($long) == 1 ? ':count other &#9662;' : ':count others &#9662;', array(':count' => count($long))), array('title' => __('Show all'), 'data-toggle' => 'collapse', 'data-target' => '#long', 'onclick' => 'return false;'));
         echo '<div id="long" class="collapse">', implode(', ', $long), '</div>';
     }
     return ob_get_clean();
 }
开发者ID:anqh,项目名称:anqh,代码行数:38,代码来源:list.php


示例19: render

 public function render()
 {
     $attributes = array('name' => $this->fieldname, 'id' => $this->field_id, 'class' => 'datepicker', 'tabindex' => $this->tabindex, 'value' => HTML::convertSpecialCharacters($this->field_data), 'data-value' => HTML::convertSpecialCharacters($this->field_data));
     $html = "<span class='ss-icon'>date</span>";
     $html .= HTML::makeInput('text', $attributes, $this->is_required);
     return $html;
 }
开发者ID:nob,项目名称:joi,代码行数:7,代码来源:ft.date.php


示例20: onGetHeadlineValue

 /**
  * @param DocumentInterface $document
  * @param mixed $value
  *
  * @return mixed
  */
 public function onGetHeadlineValue(DocumentInterface $document, $value)
 {
     $documents = $document->getAttribute($this->getRelationName())->map(function (DocumentInterface $doc) {
         return \HTML::link($doc->getEditLink(), $doc->getTitle(), ['class' => 'popup']);
     })->all();
     return !empty($documents) ? implode(', ', $documents) : null;
 }
开发者ID:KodiComponents,项目名称:module-datasource,代码行数:13,代码来源:HasMany.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP HTML2FPDF类代码示例发布时间:2022-05-23
下一篇:
PHP HSetting类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap