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


PHP _html函数代码示例

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


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

示例1: PrintLinkedName

 function PrintLinkedName() {
   $classes = array("user");
   if ((time() - strtotime($this->lastLogin)) < 5 * 60) $classes[] = "online";
   if ($this->IsBanned()) $classes[] = "banned";
   //return "<a href='user.php?who=".(int)$this->id."' class='".implode(" ",$classes)."'>"._html($this->nickname)."</a>";
   return sprintf("<a href='user.php?who=%d' class='%s'>%s</a>",$this->id,implode(" ",$classes),_html($this->nickname));
 }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:7,代码来源:pouet-user.php

示例2: Render

 function Render()
 {
   echo "\n\n";
   echo "<div class='pouettbl' id='".$this->uniqueID."'>\n";
   $type = "";
   foreach($this->buttons as $b)
   {
     if ($type != $b->type)
     {
       if($type)
       {
         echo "</ul>\n";
         echo "</div>\n";
       }
       echo "<h2>"._html($b->type)."</h2>\n";
       echo "<div class='content'>\n";
       echo "<ul>\n";
       $type = $b->type;
     }
     echo "  <li><a href='"._html($b->url)."'><img src='".POUET_CONTENT_URL."buttons/".$b->img."' title='"._html($b->alt)."' alt='"._html($b->alt)."'/></a></li>\n";
   }
   echo "</ul>\n";
   echo "</div>\n";
   echo "</div>\n";
 }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:25,代码来源:buttons.php

示例3: RenderBody

  function RenderBody()
  {
    echo "<div class='content' id='faq_toc'>\n";
    $lastType = "";
    foreach($this->entries as $e)
    {
      if ($lastType != $e->category)
      {
        if ($lastType)
          echo "</ul>\n";
        echo "<h3>"._html($e->category)."</h3>\n";
        $lastType = $e->category;
        echo "<ul>\n";
      }
      echo "<li><a href='#faq"._html($e->id)."'>".$e->question."</a></li>\n";
    }
    echo "</ul>\n";
    echo "</div>\n";

    $lastType = "";
    foreach($this->entries as $e)
    {
      if ($lastType != $e->category)
      {
        if ($lastType)
          echo "</dl>\n";
        echo "<h2>:: "._html($e->category)."</h2>\n";
        $lastType = $e->category;
        echo "<dl class='faq'>\n";
      }
      echo "<dt id='faq"._html($e->id)."'>:: "._html($e->category)." :: ".$e->question."</dt>\n";
      echo "<dd>".$e->answer."</dd>\n";
    }
    echo "</dl>\n";
  }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:35,代码来源:faq.php

示例4: RenderBody

  function RenderBody() {
    global $POSTS_PER_PAGE;
    global $THREAD_CATEGORIES;
    global $currentUser;

    echo "<div class='threadcategory'>";
    echo "<b>category:</b> "._html($this->topic->category);
    if ($currentUser && $currentUser->CanEditBBS())
    {
      printf(" [<a href='admin_topic_edit.php?which=%d' class='adminlink'>edit</a>]\n",$this->id);
    }
    printf(" [<a href='gloperator_log.php?which=%d&amp;what=topic'>glöplog</a>]\n",$this->id);


    echo "</div>\n";

    if ($this->postcount > $POSTS_PER_PAGE) {
      echo $this->paginator->RenderNavbar();
    } else {
      echo "<div class='blank'>&nbsp;</div>\n";
    }

    foreach ($this->posts as $c) {
      $p = $c->post;
      $p = parse_message($p);
      echo "<div class='content cite-".$c->user->id."' id='c".$c->id."'>".$p."</div>\n";
      echo "<div class='foot'><span class='tools' data-cid='".$c->id."'></span> added on the <a href='topic.php?post=".$c->id."'>".$c->added."</a> by ".
        $c->user->PrintLinkedName()." ".$c->user->PrintLinkedAvatar()."</div>\n\n";
    }

    if ($this->postcount > $POSTS_PER_PAGE) {
      echo $this->paginator->RenderNavbar();
    }
  }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:34,代码来源:topic.php

示例5: Render

 function Render() {
   echo "<div class='pouettbl ".$this->uniqueID."'>\n";
   echo " <h3><a href='".$this->link."'>"._html($this->title)."</a></h3>\n";
   echo " <div class='content'>\n".str_replace("<br>","<br/>",$this->content)."\n</div>\n";
   echo " <div class='foot'>lobstregated at <a href='http://www.bitfellas.org/'>BitFellas.org</a> on ".($this->timestamp)."</div>\n";
   echo "</div>\n";
 }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:7,代码来源:box-index-news.php

示例6: bitsList

 public function bitsList($bits)
 {
     $html = '<ul>';
     $count = 2;
     foreach ($bits as $bit) {
         $settings = json_decode($bit->meta);
         $sampleCode = $bit->javascript ? $bit->javascript : ($bit->html ? $bit->html : ($bit->css ? $bit->css : false));
         if ($sampleCode) {
             $compressed = preg_replace("/\n/", '', preg_replace("/\t/", '', substr(base64_decode($sampleCode), 0, 200)));
             $sampleCode = '<pre class="sample-code">' . _html($compressed) . '</pre>';
         } else {
             $sampleCode = '';
         }
         if ($settings->bit_description) {
             $sampleCode = '<pre class="sample-code">' . _html($settings->bit_description) . '</pre>';
         }
         $klass = $count % 2 == 0 ? 'even' : 'odd';
         $html .= '<li class="' . $klass . '"><a href="' . home_url('code/bit/' . $bit->slug . '/' . $bit->latestVersion) . '" class="block-link">';
         $html .= '<div class="bit-title group">';
         $html .= '<p class="pull-left code-font">' . $settings->bit_title . ' <span>v' . $bit->latestVersion . '</span></p>';
         $html .= '<time class="pull-right" datetime="' . $bit->created . '">' . timeAgo($bit->created) . '</time>';
         $html .= '</div>';
         $html .= '<div class="bit-sample">';
         $html .= $sampleCode;
         $html .= '</div>';
         $html .= '</a></li>';
         $count++;
     }
     $html .= '</ul>';
     return $html;
 }
开发者ID:juanretamales,项目名称:Bits,代码行数:31,代码来源:format.php

示例7: RenderContent

 function RenderContent()
 {
   if ($_GET["font"]=="none")
   {
     echo "<pre>";
     echo _html( process_ascii( file_get_contents( get_local_partyresult_path( $_GET["which"], $_GET["when"] ) ) ) );
     echo "</pre>";
   }
   else
     printf("<img src='img_ascii.php?results=%d&amp;year=%d&amp;font=%d' alt='nfo'/>\n",$_GET["which"],$_GET["when"],$_GET["font"]);
 }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:11,代码来源:party_results.php

示例8: PouetBoxSubmitProdInfo

  function PouetBoxSubmitProdInfo( $id )
  {
    parent::__construct();


    $this->prod = PouetProd::Spawn( $id );
    $a = array(&$this->prod);
    PouetCollectPlatforms( $a );

    $this->title = "submit things for this prod: "._html($this->prod->name);
  }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:11,代码来源:submit_prod_info.php

示例9: PouetBoxAdminEditPartyEdition

  function PouetBoxAdminEditPartyEdition( $id, $year )
  {
    parent::__construct();

    $this->id = $id;
    $this->year = $year;

    $this->party = PouetParty::Spawn( $this->id );

    $this->title = sprintf("edit this party: %s %04d",_html($this->party->name),$this->year);
  }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:11,代码来源:admin_party_edition_edit.php

示例10: PouetBoxAdminEditTopic

  function PouetBoxAdminEditTopic( $id )
  {
    parent::__construct();
    $this->id = (int)$id;
    $this->uniqueID = "pouetbox_edittopic";
    $this->topic = SQLLib::SelectRow(sprintf_esc("select * from bbs_topics where id = %d",$this->id));
    $this->title = "edit this topic: "._html($this->topic->topic);
    $this->formifier = new Formifier();
    $this->fields = array();

    $row = SQLLib::selectRow("DESC bbs_topics category");
    preg_match_all("/'([^']+)'/",$row->Type,$m);
    $this->categories = $m[1];
  }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:14,代码来源:admin_topic_edit.php

示例11: RenderContent

  function RenderContent()
  {
    global $currentUser;

    if ($this->party->web)
      printf("[<a href='%s'>web</a>]\n",_html($this->party->web));
    if(file_exists($this->party->GetResultsLocalFileName($this->year)))
      echo $this->party->RenderResultsLink( $this->year );
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+results</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->download)
      echo "[<a href='".$this->partylinks->download."'>download</a>]\n";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+download</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->slengpung)
      echo " [<a href='http://www.slengpung.com/?eventid=".(int)$this->partylinks->slengpung."'>slengpung</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+slengpung</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->csdb)
      echo " [<a href='http://csdb.dk/event/?id=".(int)$this->partylinks->csdb."'>csdb</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+csdb</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->zxdemo)
      echo " [<a href='http://zxdemo.org/party.php?id=".(int)$this->partylinks->zxdemo."'>zxdemo</a>]";
    //else if ($currentUser && $currentUser->CanSubmitItems())
    //  printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+zxdemo</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->demozoo)
      echo " [<a href='http://demozoo.org/parties/".(int)$this->partylinks->demozoo."/'>demozoo</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+demozoo</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->artcity)
      echo " [<a href='http://artcity.bitfellas.org/index.php?a=search&type=tag&text=".rawurlencode($this->partylinks->artcity)."'>artcity</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+artcity</a>]\n",$this->party->id,$this->year);

    if ($currentUser && $currentUser->CanEditItems())
    {
      printf(" [<a href='admin_party_edit.php?which=%d' class='adminlink'>edit</a>]\n",$this->party->id);
      printf(" [<a href='admin_party_edition_edit.php?which=%d&amp;when=%d' class='adminlink'>edit year</a>]\n",$this->party->id,$this->year);
    }
    printf(" [<a href='gloperator_log.php?which=%d&amp;what=party'>glöplog</a>]\n",$this->party->id);

  }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:49,代码来源:party.php

示例12: RenderBody

 function RenderBody()
 {
   $title = "nfo added by "._html($this->nfo->user->nickname)." on "._html($this->nfo->added);
   echo "<div class='content' title='".$title."'>\n";
   if ($_GET["font"]=="none")
   {
     echo "<pre>";
     $text = file_get_contents( get_local_nfo_path( $_GET["which"] ) );
     echo _html( process_ascii( $text ) );
     echo "</pre>";
   }
   else
     printf("<img src='img_ascii.php?nfo=%d&amp;font=%d' alt='nfo'/>\n",$_GET["which"],$_GET["font"]);
   echo "</div>\n";
 }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:15,代码来源:prod_nfo.php

示例13: _html

/**
*_html()函数表示对字符串进行HTML过滤显示,如果是数组按
数组的方式过滤,如果是单独的字符串,那么就按单独的字符串过滤
*@param unknown_type $_string
*/
function _html($_string)
{
    if (is_array($_string)) {
        //判断是否为数组
        foreach ($_string as $_key => $_value) {
            //$_key数组下标值
            $_string[$_key] = _html($_value);
            //这里采用了递归,如果不理解,那么还是用htmlspecialchars
        }
    } else {
        //普通字符串
        $_string = htmlspecialchars($_string);
    }
    return $_string;
}
开发者ID:vagsy,项目名称:demoset,代码行数:20,代码来源:global.function.php

示例14: RenderBody

 function RenderBody() {
   echo "<ul class='boxlist'>\n";
   for($i=0; $i < min( count($this->jsonData),$this->limit); $i++)
   {
     echo "<li>\n";
     $p = "sucks";
     if($this->jsonData[$i]['status'] == "lost"   && $this->jsonData[$i]['intent'] == "lose weight") $p = "rulez";
     if($this->jsonData[$i]['status'] == "gained" && $this->jsonData[$i]['intent'] == "gain weight") $p = "rulez";
     if($this->jsonData[$i]['status'] == "hold"   && $this->jsonData[$i]['intent'] == "hold weight") $p = "rulez";
     if($this->jsonData[$i]['status'] == "hold"   && $this->jsonData[$i]['intent'] != "hold weight") $p = "isok";
     echo "<img src='".POUET_CONTENT_URL."gfx/".$p.".gif' alt='".$p."' />\n";
     echo "<a href='"._html($this->jsonData[$i]['url'])."'>"._html($this->jsonData[$i]['name'])."</a> "._html(strip_tags($this->jsonData[$i]['message']));
     echo "</li>\n";
   }
   echo "</ul>\n";
 }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:16,代码来源:box-index-feed-poundsoff.php

示例15: RenderBody

  function RenderBody()
  {
    global $currentUser;
    if (!get_login_id())
    {
      require_once("box-login.php");
      $box = new PouetBoxLogin();
      $box->RenderBody();
    }
    else
    {
      if (!$currentUser->CanPostInBBS())
        return;

      echo "<form action='add.php' method='post'>\n";

      $csrf = new CSRFProtect();
      $csrf->PrintToken();

      echo "<div class='content'>\n";
      echo " <input type='hidden' name='type' value='bbs'>\n";

      echo " <label for='topic'>topic:</label>\n";
      echo " <input name='topic' id='topic'/>\n";

      echo " <label for='category'>category:</label>\n";
      echo " <select name='category' id='category'>\n";
      foreach($this->categories as $v)
        printf("<option value='%s'>%s</option>",_html($v),_html($v));
      echo " </select>\n";

      echo " <label for='message'>message:</label>\n";
      echo " <textarea name='message' id='message'></textarea>\n";

      echo " <div><a href='faq.php#BB Code'><b>BB Code</b></a> is allowed here</div>\n";
      echo "</div>\n";
      echo "<div class='foot'>\n";
      echo " <script language='JavaScript' type='text/javascript'>\n";
      echo " <!--\n";
      echo "   document.observe('dom:loaded',function(){ AddPreviewButton($('submit')); });\n";
      echo " //-->\n";
      echo " </script>\n";
      echo " <input type='submit' value='Submit' id='submit'>";
      echo "</div>\n";
      echo "</form>\n";
    }
  }
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:47,代码来源:box-bbs-open.php


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