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


PHP html类代码示例

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


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

示例1: actionIndex

 /**
  * Lists all Articlecomment models.
  * @return mixed
  */
 public function actionIndex()
 {
     $list = '';
     $post = Yii::$app->request->post();
     if ($post['id']) {
         $mod = new Query();
         $comment = $mod->select(['a.id', 'a.parentId', 'a.articleId', 'a.content', 'a.createTime', 'b.username'])->from('articlecomment as a')->leftJoin('user as b', 'a.userId = b.id')->where(['commentId' => $post['id']])->orderBy(['createTime' => 'DESC', 'id' => 'DESC'])->createCommand()->queryAll();
         if ($comment) {
             foreach ($comment as $v) {
                 $content = '回复@' . Articlecomment::getCommentByParId($v['parentId']) . ':' . $v['content'];
                 $ahtml = html::a(html::tag("i", "", ["class" => "fa fa-thumbs-o-up"]) . html::tag("span", "回复"), ["/main/viewart", "id" => $v["articleId"], "parId" => $v['id']]);
                 $list .= '<div class="infos small-comment' . $post['id'] . '" style="border:1px solid;">
                         	<div class="media-body markdown-reply content-body">
                         		<p>' . $content . '</p>
                         		<span class="opts pull-right">
                         			<a class="author" >' . $v["username"] . '</a>
                         			•
                         			<addr title="' . $v["createTime"] . '">' . Html::tag("span", Yii::$app->formatter->asRelativeTime($v["createTime"])) . '</addr>
                         			' . $ahtml . '
                                 </span>
                         	</div>
                         </div>';
             }
         }
     }
     $result = array('success' => true, 'message' => $list);
     echo json_encode($result);
     die;
     return $this->renderAjax('index', ['success' => true, 'message' => '']);
 }
开发者ID:kennygp,项目名称:yii-myweb,代码行数:34,代码来源:ArticlecommentController.php

示例2: html_output

 /**
  * This callback function adds a box below the message content
  * if there is a vcard attachment available
  */
 function html_output($p)
 {
     $attach_script = false;
     $icon = 'plugins/vcard_attachments/' . $this->local_skin_path() . '/vcard_add_contact.png';
     foreach ($this->vcard_parts as $part) {
         $vcards = rcube_vcard::import($this->message->get_part_content($part));
         // successfully parsed vcards?
         if (empty($vcards)) {
             continue;
         }
         // remove part's body
         if (in_array($part, $this->vcard_bodies)) {
             $p['content'] = '';
         }
         $style = 'margin:0.5em 1em; padding:0.2em 0.5em; border:1px solid #999; ' . 'border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; width: auto';
         foreach ($vcards as $idx => $vcard) {
             $display = $vcard->displayname;
             if ($vcard->email[0]) {
                 $display .= ' <' . $vcard->email[0] . '>';
             }
             // add box below messsage body
             $p['content'] .= html::p(array('style' => $style), html::a(array('href' => "#", 'onclick' => "return plugin_vcard_save_contact('" . JQ($part . ':' . $idx) . "')", 'title' => $this->gettext('addvcardmsg')), html::img(array('src' => $icon, 'style' => "vertical-align:middle"))) . ' ' . html::span(null, Q($display)));
         }
         $attach_script = true;
     }
     if ($attach_script) {
         $this->include_script('vcardattach.js');
     }
     return $p;
 }
开发者ID:shishenkov,项目名称:zpanel,代码行数:34,代码来源:vcard_attachments.php

示例3: commonAction

 /**
  * Common actions.
  * 
  * @param  int    $productID 
  * @access public
  * @return void
  */
 public function commonAction($productID)
 {
     $this->loadModel('product');
     $this->view->product = $this->product->getById($productID);
     $this->view->position[] = html::a($this->createLink('product', 'browse', "productID={$this->view->product->id}"), $this->view->product->name);
     $this->product->setMenu($this->product->getPairs(), $productID);
 }
开发者ID:ppmon,项目名称:ppm,代码行数:14,代码来源:control.php

示例4: check_index

 /**
  * @return string An error message suitable for inclusion in the task log
  */
 static function check_index()
 {
     list($remaining) = search::stats();
     if ($remaining) {
         site_status::warning(t('Your search index needs to be updated.  <a href="%url" class="g-dialog-link">Fix this now</a>', array("url" => html::mark_clean(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))), "search_index_out_of_date");
     }
 }
开发者ID:viosca,项目名称:gallery3,代码行数:10,代码来源:search.php

示例5: action_addFolder

 public function action_addFolder()
 {
     $properties = array();
     $properties["owner"] = Wi3::inst()->sitearea->auth->user;
     $properties["adminright"] = Wi3::inst()->sitearea->auth->user->username;
     $properties["title"] = "Nieuwe map";
     $properties["type"] = "folder";
     $properties["created"] = time();
     $properties["filename"] = $properties["created"];
     // needs to be unique
     $settings = array();
     if (isset($_POST["refid"]) and !empty($_POST["refid"]) and isset($_POST["location"]) and !empty($_POST["location"])) {
         $settings["under"] = (int) preg_replace("/[^0-9]/", "", $_POST["refid"]);
     }
     // Add it
     $folder = Wi3::inst()->sitearea->files->add($properties, $settings);
     if ($folder) {
         // Remove cache of everything, since we do not know how this change affects the site
         Wi3::inst()->cache->removeAll();
         $li = html::anchor($folder->id, $folder->title);
         if ($folder->lft == 1 and $folder->rgt == 2) {
             // The new folder is the only folder there is. For the javascript menu to work properly, we need to reload the page.
             echo json_encode(array("scriptsbefore" => array("reload" => "window.location.reload();")));
         } else {
             echo json_encode(array("alert" => "map is aangemaakt", "scriptsafter" => array("adminarea.currentTree().addNode('treeItem_" . $folder->id . "','" . addslashes($li) . "')")));
         }
     } else {
         echo json_encode(array("alert" => "map kon NIET aangemaakt worden"));
     }
 }
开发者ID:azuya,项目名称:Wi3,代码行数:30,代码来源:ajax.php

示例6: __construct

 function __construct()
 {
     parent::__construct("feed");
     /* Set feed ID and self link. */
     $this->id(html::specialchars(url::abs_current()));
     $this->link()->rel("self")->href(url::abs_current());
 }
开发者ID:needful,项目名称:gallery3-contrib,代码行数:7,代码来源:Gallery_Atom_Feed.php

示例7: init

 function init()
 {
     $this->rcmail = rcmail::get_instance();
     $this->out = html::tag('div', array('style' => 'font-size: 12px; text-align: justify; position: absolute; margin-left: auto; left: 50%; margin-left: -250px; width: 500px;'), html::tag('h3', null, 'Welcome to MyRoundcube Plugins - Plugin Manager Installer') . html::tag('span', null, 'Please ' . html::tag('a', array('href' => $this->svn), 'download') . ' Plugin Manager package and upload the entire package to your Roundcube\'s plugin folder.' . html::tag('br') . html::tag('br') . ' If you are prompted to overwrite <i>"./plugins/plugin_manager"</i> please do so.') . html::tag('br') . html::tag('br') . html::tag('div', array('style' => 'display: inline; float: left'), html::tag('a', array('href' => 'javascript:void(0)', 'onclick' => 'document.location.href=\'./\''), $this->gettext('done'))));
     $this->register_handler('plugin.body', array($this, 'download'));
     $this->rcmail->output->send('plugin');
 }
开发者ID:MetallianFR68,项目名称:myroundcube,代码行数:7,代码来源:plugin_manager.php

示例8: mailto_callback

 /**
  * Callback function used to build mailto: links around e-mail strings
  *
  * This also adds an onclick-handler to open the Rouncube compose message screen on such links
  *
  * @param array Matches result from preg_replace_callback
  * @return int Index of saved string value
  * @see rcube_string_replacer::mailto_callback()
  */
 public function mailto_callback($matches)
 {
     $href = $matches[1];
     $suffix = $this->parse_url_brackets($href);
     $i = $this->add(html::a(array('href' => 'mailto:' . $href, 'onclick' => "return " . rcmail_output::JS_OBJECT_NAME . ".command('compose','" . rcube::JQ($href) . "',this)"), rcube::Q($href)) . $suffix);
     return $i >= 0 ? $this->get_replacement($i) : '';
 }
开发者ID:noikiy,项目名称:roundcubemail,代码行数:16,代码来源:rcmail_string_replacer.php

示例9: postLine

 private function postLine()
 {
     $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
     switch ($this->rs->post_status) {
         case 1:
             $img_status = sprintf($img, __('published'), 'check-on.png');
             break;
         case 0:
             $img_status = sprintf($img, __('unpublished'), 'check-off.png');
             break;
         case -1:
             $img_status = sprintf($img, __('scheduled'), 'scheduled.png');
             break;
         case -2:
             $img_status = sprintf($img, __('pending'), 'check-wrn.png');
             break;
     }
     $protected = '';
     if ($this->rs->post_password) {
         $protected = sprintf($img, __('protected'), 'locker.png');
     }
     $selected = '';
     if ($this->rs->post_selected) {
         $selected = sprintf($img, __('selected'), 'selected.png');
     }
     $attach = '';
     $nb_media = $this->rs->countMedia();
     if ($nb_media > 0) {
         $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments');
         $attach = sprintf($img, sprintf($attach_str, $nb_media), 'attach.png');
     }
     $res = '<tr class="line' . ($this->rs->post_status != 1 ? ' offline' : '') . '"' . ' id="p' . $this->rs->post_id . '">';
     $res .= '<td class="nowrap">' . form::checkbox(array('entries[]'), $this->rs->post_id, '', '', '', !$this->rs->isEditable()) . '</td>' . '<td class="maximal"><a href="' . $this->core->getPostAdminURL($this->rs->post_type, $this->rs->post_id) . '">' . html::escapeHTML($this->rs->post_title) . '</a></td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->post_dt) . '</td>' . '<td class="nowrap">' . $this->rs->user_id . '</td>' . '<td class="nowrap">' . $this->rs->nb_comment . '</td>' . '<td class="nowrap">' . $this->rs->nb_trackback . '</td>' . '<td class="nowrap status">' . $img_status . ' ' . $selected . ' ' . $protected . ' ' . $attach . '</td>' . '</tr>';
     return $res;
 }
开发者ID:HackerMajor,项目名称:root,代码行数:35,代码来源:list.php

示例10: render_page

 /**
  * Callback function when HTML page is rendered
  * We'll add an overlay box here.
  */
 function render_page($p)
 {
     if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         $identity = $rcmail->user->get_identity();
         $identities_level = intval($rcmail->config->get('identities_level', 0));
         // compose user-identity dialog
         $table = new html_table(array('cols' => 2));
         $table->add('title', $this->gettext('name'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_name', 'value' => $identity['name'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => rcube_utils::idn_to_utf8($identity['email']), 'disabled' => in_array($identities_level, array(1, 3, 4)))));
         $table->add('title', $this->gettext('organization'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_organization', 'value' => $identity['organization'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('signature'));
         $table->add(null, html::tag('textarea', array('name' => '_signature', 'rows' => '3'), $identity['signature']));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::tag('form', array('id' => 'newuserdialog', 'action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save'))))));
         $title = rcube::JQ($this->gettext('identitydialogtitle'));
         $script = "\n\$('#newuserdialog').show()\n  .dialog({modal:true, resizable:false, closeOnEscape:false, width:450, title:'{$title}'})\n  .submit(function() {\n    var i, request = {}, form = \$(this).serializeArray();\n    for (i in form)\n      request[form[i].name] = form[i].value;\n\n      rcmail.http_post('plugin.newusersave', request, true);\n      return false;\n  });\n\n\$('input[name=_name]').focus();\nrcube_webmail.prototype.new_user_dialog_close = function() { \$('#newuserdialog').dialog('close'); }\n";
         // disable keyboard events for messages list (#1486726)
         $rcmail->output->add_script($script, 'docready');
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:30,代码来源:new_user_dialog.php

示例11: aworkstrackpage

 function aworkstrackpage()
 {
     $this->page();
     $this->stylesheet = "style.css";
     $this->__widgetfields[] = html::write("<script src=\"shortcuts.js\"></script><div id=\"header\"></div>");
     $this->__widgetfields[] = html::write("<h1>Seguimiento de Pedidos</h1>");
 }
开发者ID:Esleelkartea,项目名称:arotz,代码行数:7,代码来源:local.php

示例12: format

 /**
  * Форматирование значения. Вызывает обработчики вроде типографа.
  */
 public function format(Node $node, $em)
 {
     $value = $node->{$this->value};
     $ctx = Context::last();
     $ctx->registry->broadcast('ru.molinos.cms.format.text', array($ctx, $this->value, &$value));
     return html::wrap($em, html::cdata($value));
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:10,代码来源:control.textarea.php

示例13: prepend

 protected function prepend()
 {
     # chargement des principales locales
     l10n::set(__DIR__ . '/locales/' . $this->okt->user->language . '/main');
     global $oktAutoloadPaths;
     #autoload
     $oktAutoloadPaths['partnersController'] = __DIR__ . '/inc/class.partners.controller.php';
     $oktAutoloadPaths['partnersRecordset'] = __DIR__ . '/inc/class.partners.recordset.php';
     #permissions
     $this->okt->addPermGroup('partners', __('m_partners_perm_group'));
     $this->okt->addPerm('partners', __('m_partners_perm_global'), 'partners');
     $this->okt->addPerm('partners_add', __('m_partners_perm_add'), 'partners');
     $this->okt->addPerm('partners_remove', __('m_partners_perm_remove'), 'partners');
     $this->okt->addPerm('partners_display', __('m_partners_perm_display'), 'partners');
     $this->okt->addPerm('partners_config', __('m_partners_perm_config'), 'partners');
     #tables
     $this->t_partners = $this->db->prefix . 'mod_partners';
     $this->t_partners_locales = $this->db->prefix . 'mod_partners_locales';
     $this->t_categories = $this->db->prefix . 'mod_partners_categories';
     $this->t_categories_locales = $this->db->prefix . 'mod_partners_categories_locales';
     #config
     $this->config = $this->okt->newConfig('conf_partners');
     $this->config->url = $this->okt->page->getBaseUrl() . $this->config->public_url[$this->okt->user->language];
     # définition des routes
     $this->okt->router->addRoute('partnersPage', new oktRoute('^(' . html::escapeHTML(implode('|', $this->config->public_url)) . ')$', 'partnersController', 'partnersPage'));
     #répertoire upload
     $this->upload_dir = OKT_UPLOAD_PATH . '/partners/';
     $this->upload_url = OKT_UPLOAD_URL . '/partners/';
     # initialisation arbre catégories
     $this->tree = new nestedTree($this->okt, $this->t_categories, 'id', 'parent_id', 'ord', array('active', 'ord'));
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:module_handler.php

示例14: createModuleMenu

 public function createModuleMenu($method)
 {
     if (!isset($this->lang->my->{$method}->menu)) {
         return false;
     }
     $string = "<nav id='menu'><ul class='nav'>\n";
     /* Get menus of current module and current method. */
     $moduleMenus = $this->lang->my->{$method}->menu;
     $currentMethod = $this->app->getMethodName();
     /* Cycling to print every menus of current module. */
     foreach ($moduleMenus as $methodName => $methodMenu) {
         /* Split the methodMenu to label, module, method, vars. */
         list($label, $module, $method, $vars) = explode('|', $methodMenu);
         $class = '';
         if ($method == $currentMethod) {
             $class = "class='active'";
         }
         $hasPriv = commonModel::hasPriv($module, $method);
         if ($module == 'my' and $method == 'order') {
             $hasPriv = commonModel::hasPriv('order', 'browse');
         }
         if ($module == 'my' and $method == 'contract') {
             $hasPriv = commonModel::hasPriv('contract', 'browse');
         }
         if ($hasPriv) {
             $string .= "<li {$class}>" . html::a(helper::createLink($module, $method, $vars), $label) . "</li>\n";
         }
     }
     $string .= "</ul></nav>\n";
     return $string;
 }
开发者ID:leowh,项目名称:colla,代码行数:31,代码来源:model.php

示例15: delete

 public function delete($id)
 {
     access::verify_csrf();
     $item = model_cache::get("item", $id);
     access::required("view", $item);
     access::required("edit", $item);
     if ($item->is_album()) {
         $msg = t("Deleted album <b>%title</b>", array("title" => html::purify($item->title)));
     } else {
         $msg = t("Deleted photo <b>%title</b>", array("title" => html::purify($item->title)));
     }
     $parent = $item->parent();
     if ($item->is_album()) {
         // Album delete will trigger deletes for all children.  Do this in a batch so that we can be
         // smart about notifications, album cover updates, etc.
         batch::start();
         $item->delete();
         batch::stop();
     } else {
         $item->delete();
     }
     message::success($msg);
     $from_id = Input::instance()->get("from_id");
     if (Input::instance()->get("page_type") == "collection" && $from_id != $id) {
         json::reply(array("result" => "success", "reload" => 1));
     } else {
         json::reply(array("result" => "success", "location" => $parent->url()));
     }
 }
开发者ID:kandsten,项目名称:gallery3,代码行数:29,代码来源:quick.php


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