本文整理汇总了PHP中h5函数的典型用法代码示例。如果您正苦于以下问题:PHP h5函数的具体用法?PHP h5怎么用?PHP h5使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了h5函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output_domain_block
function output_domain_block($project_id)
{
foreach (ProjectInfo::$mDomainList as $domain_handle) {
if ($domain_handle == 'home' || $domain_handle == 'misc') {
continue;
}
$domain_link = ProjectInfo::assemblePath($project_id, $domain_handle);
$domain_name = ProjectInfo::getDomainName($project_id, $domain_handle);
$domain_desc = ProjectInfo::getDomainDesc($project_id, $domain_handle);
switch ($domain_handle) {
case 'download':
$icon_name = 'download';
break;
case 'document':
$icon_name = 'book';
break;
case 'community':
$icon_name = 'group';
break;
case 'contribute':
$icon_name = 'heart';
break;
}
?>
<div class="col-sm-3 col-md-3 col-lg-3 note-block">
<div class="well text-center">
<div class="note-icon">
<a href="<?php
echo $domain_link;
?>
">
<span class="glyphicon glyphicon-<?php
echo $icon_name;
?>
"></span>
</a>
</div>
<div class="note-desc">
<h2>
<a href="<?php
echo $domain_link;
?>
">
<?php
echo h5($domain_name);
?>
</a>
</h2>
<p>
<?php
echo h5($domain_desc);
?>
</p>
</div>
</p>
</div>
</div>
<?php
}
}
示例2: getPersonalHomeLink
static function getPersonalHomeLink($fse_info = false, $with_tags = false, $style_class = false)
{
if ($fse_info == false) {
$fse_info = $_SESSION['FSEInfo'];
}
if ($fse_info == false) {
if ($with_tags) {
return '<a href="/" class="' . $style_class . '">' . t('No Name') . '</a>';
}
return '/';
}
if (preg_match("/^zh/i", $fse_info['def_locale'])) {
$doc_lang = 'zh';
} else {
$doc_lang = 'en';
}
$link = "/{$doc_lang}/engineer/" . $fse_info['user_name'];
if ($with_tags) {
return '<a href="' . $link . '" class="' . $style_class . '">' . h5($fse_info['nick_name']) . '</a>';
}
return $link;
}
示例3: takeaway_heading
/**
*######################################################################
*# takeaway heading
*######################################################################
*/
function takeaway_heading($atts)
{
if (isset($atts['type'])) {
switch ($atts['type']) {
case 'h1':
return h1($atts);
break;
case 'h2':
return h2($atts);
break;
case 'h3':
return h3($atts);
break;
case 'h4':
return h4($atts);
break;
case 'h5':
return h5($atts);
break;
}
}
return '';
}
示例4: getChapterDesc
public static function getChapterDesc($project_id, $domain_handle, $volume_handle, $part_handle, $chapter_handle)
{
$chapter_info = self::getChapterInfo($project_id, $domain_handle, $volume_handle, $part_handle, $chapter_handle);
if ($chapter_info == false) {
return false;
}
return h5($chapter_info['chapter_desc']);
}
示例5: h3
echo h3("Interplay of Relationship"), h4("Relative House Position of each other's Ascendant, Sun, Moon and Venus."), begin_ul();
foreach ($relationship_calculator->relative_positionals as $planet => $positional) {
$positional_text = '';
if ($positional) {
$positional_text = ", " . $positional;
}
echo li($planet, "- house ", $relationship_calculator->relative_houses[$planet], $positional_text);
}
echo end_ul();
echo h4("Deeper Synastry Analysis of each other's Ascendant, Sun, Moon and Venus."), h5("Influences to ", $female_data['report_name'], "'s Planets in ", $male_data['report_name'], "'s chart.");
foreach (array('Ascendant', 'Sun', 'Moon', 'Venus') as $planet) {
echo h5($planet), ul($relationship_calculator->female_male_influences[$planet]);
}
echo h5("Influences to ", $male_data['report_name'], "'s Planets in ", $female_data['report_name'], "'s chart.");
foreach (array('Ascendant', 'Sun', 'Moon', 'Venus') as $planet) {
echo h5($planet), ul($relationship_calculator->male_female_influences[$planet]);
}
echo h4("Marriage Compatibility Based on Indian Astrology");
echo "Male Nakshatra: ";
echo $kuta_calculator->male_nakshatra, br();
echo "Female Nakshatra: ";
echo $kuta_calculator->female_nakshatra, br(), br();
echo "Nadi Kuta Score: ";
echo $kuta_calculator->nadiKutaScore;
echo "/8", br();
echo "Male Dosha: ";
echo $kuta_calculator->male_dosha, br();
echo "Female Dosha: ";
echo $kuta_calculator->female_dosha, br(), br();
echo "Rashi Kuta Score: ";
echo $kuta_calculator->rashiKutaScore;
示例6: foreach
</h3>
</header>
<?php
if (count($normal_blogs) > 0) {
?>
<ul class="list-group">
<?php
foreach ($normal_blogs as $blg) {
?>
<li class="list-group-item">
<p>
<a href="<?php
echo ProjectInfo::assemblePath($project_id, $domain_handle, $volume_handle, $part_handle, $blg['chapter_handle']);
?>
"><?php
echo h5($blg['chapter_name']);
?>
</a>
</p>
</li>
<?php
}
?>
</ul>
<?php
}
?>
</div>
</div>
示例7: foreach
</a>
</li>
<?php
foreach ($volumes as $v) {
?>
<li>
<a href="<?php
echo ProjectInfo::assemblePath($sys_project_id, 'misc', $v['volume_handle']);
?>
"
title="<?php
echo h5($v['volume_desc']);
?>
"
class="inline-list small"><?php
echo h5($v['volume_name']);
?>
</a>
</li>
<?php
}
?>
</ul>
<ul>
<li><a class="inline-list small" target="_blank" href="http://www.concrete5.org">Concrete5</a></li>
<li><a class="inline-list small" target="_blank" href="http://getbootstrap.com">Bootstrap</a></li>
<li><a class="inline-list small" target="_blank" href="https://michelf.ca/projects/php-markdown/">PHP Markdown</a></li>
</ul>
</nav>
示例8: h5
src="<?php
echo $icon_url;
?>
" alt="<?php
echo h5($project_info['name']);
?>
" />
</section>
<section class="col-md-9">
<h1><?php
echo h5($project_info['name']);
?>
</h1>
<p><?php
echo h5($project_info['short_desc']);
?>
</p>
<?php
if (isset($gh_user)) {
?>
<div class="text-left">
<iframe src="http://ghbtns.com/github-btn.html?user=<?php
echo $gh_user;
?>
&repo=<?php
echo $gh_repo;
?>
&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=<?php
echo $gh_user;
示例9: edit_member_roles
public function edit_member_roles()
{
if (!fse_try_to_login()) {
header("location:/fse_login");
return;
}
$project_id = $this->post('projectID');
$area_handle = $this->post('areaHandle');
$domain_handle = $this->post('domainHandle');
$volume_handle = $this->post('volumeHandle');
$part_handle = $this->post('partHandle');
$chapter_handle = $this->post('chapterHandle');
$section_id = $this->post('sectionID');
$member_username = $this->post('memberUsername');
$member_display_name = $this->post('memberDisplayName');
$member_desc = $this->post('memberDescription');
$member_roles = array('g-mmb');
for ($i = 0; $i < ProjectInfo::NR_ROLES; $i++) {
$role = $this->post("memberRole{$i}");
if (in_array($role, ProjectInfo::$mMemberRoleList)) {
$member_roles[] = $role;
}
}
$member_roles = array_unique($member_roles);
$role_description = '';
$doc_lang = substr($project_id, -2);
foreach ($member_roles as $role) {
$role_description .= ProjectInfo::$mRoleDescriptions[$doc_lang][$role];
$role_description .= ' ';
}
$member_roles = implode('|', $member_roles);
$page_path = ProjectInfo::assemblePath($project_id, $domain_handle, $volume_handle, $part_handle, $chapter_handle);
error_log("Edit Member: {$page_path}\n", 3, '/var/tmp/fsen.log');
$page_id = Page::getByPath($page_path)->getCollectionID();
if ($page_id <= 0) {
header('Location: /');
return;
}
if (!fse_try_to_login()) {
set_page_action_status($page_id, t('Add/Edit Member Roles'), 'error', t('You do not sign in or session expired.'));
header("Location: {$page_path}");
return;
}
$curr_fse_id = $_SESSION['FSEInfo']['fse_id'];
$curr_rights = ProjectInfo::getUserRights($project_id, $curr_fse_id);
if ($curr_rights[0] != 't') {
set_page_action_status($page_id, t('Add/Edit Member Roles'), 'error', t('You have no right to edit member roles.'));
header("Location: {$page_path}");
return;
}
$fse_info = FSEInfo::getBasicProfile($member_username);
if ($fse_info == false) {
set_page_action_status($page_id, t('Add/Edit Member Roles'), 'error', t('No such user!'));
header("Location: {$page_path}");
return;
}
if (strlen($member_display_name) == 0) {
$member_display_name = $fse_info['nick_name'];
}
$member_rights = ProjectInfo::setUserRoles($project_id, $fse_info['fse_id'], $member_display_name, $member_desc, $member_roles);
if (substr($member_rights, 0, 3) == 'ttt') {
$style = "primary";
} else {
if ($member_rights[0] == 't') {
$style = "success";
} else {
if ($member_rights[1] == 't') {
$style = "info";
} else {
if ($member_rights[2] == 't') {
$style = "warning";
} else {
$style = "default";
}
}
}
}
$type_handle = "member:markdown_safe:{$member_username}:{$style}:none";
$section_content = sprintf(self::MEMBER_MARKDOWN_TEXT, $member_display_name, $fse_info['user_name'], $role_description, h5($member_desc), h5($fse_info['self_desc']), $fse_info['avatar_url']);
$section_manager = new DocSectionManager();
$res = $section_manager->addNewSectionVersion($project_id, $curr_fse_id, $domain_handle, $section_id, $type_handle, '', $section_content, '[]');
if ($res != DocSectionManager::EC_OK) {
set_page_action_status($page_id, t('Add/Edit Member Roles'), 'error', t('Failed to add/edit member roles: %s', $section_manager->getErrorMessage($res)));
header("Location: {$page_path}");
return;
}
set_page_action_status($page_id, t('Add/Edit Member Roles'), 'success', t('Succeed to edit the member roles.'));
header("Location: {$page_path}");
}
示例10: h5
</div>
<?php
if (count($latest_chapter) > 0) {
$author_info = FSEInfo::getNameInfo($latest_chapter['fse_id']);
?>
<div class="col-md-6 wrap-on-xs">
<span class="badge"><?php
echo $latest_chapter['nr_sections'] - 1;
?>
</span>
<h4 class="list-group-item-heading">
<a href="<?php
echo "{$page_path}/" . $vlm['volume_handle'] . '/' . $prt['part_handle'] . '/' . $latest_chapter['chapter_handle'];
?>
"><?php
echo h5($latest_chapter['chapter_name']);
?>
</a>
</h4>
<p class="list-group-item-text">
<?php
echo FSEInfo::getPersonalHomeLink($author_info, true);
?>
</p>
</div>
<?php
}
?>
</li>
<?php
}
示例11: get_url_from_file_id
href="<?php
echo ProjectInfo::assemblePath($project_id, 'download');
?>
" class="tab-item"><span
class="glyphicon glyphicon-download"></span></a>
<a <?php
echo $domain_handle == 'home' ? 'class="active"' : '';
?>
href="<?php
echo ProjectInfo::assemblePath($project_id, 'home');
?>
" class="tab-item"><span
class="glyphicon glyphicon-home"></span></a>
<?php
if ($domain_handle != 'home') {
?>
<img src="<?php
echo get_url_from_file_id($project_info['icon_file_id'], '/files/images/icon-fsen-144.png');
?>
"/ alt="Logo Icon" />
<h1><?php
echo h5($project_info['name']);
?>
</h1>
<?php
}
?>
</nav>
示例12: array
$db = Loader::db();
$projects = $db->getAll("SELECT project_id, fse_id, name FROM fsen_projects WHERE doc_lang=? AND project_id NOT LIKE 'sys-__' ORDER BY create_time DESC LIMIT 10", array($doc_lang));
if (count($projects) > 0) {
?>
<ul class="list-group">
<?php
foreach ($projects as $p) {
$link = "/{$doc_lang}/project/" . $p['project_id'];
$owner_info = FSEInfo::getNameInfo($p['fse_id']);
?>
<li class="list-group-item">
<h4 class="list-group-item-heading"><a href="<?php
echo $link;
?>
"><?php
echo h5($p['name']);
?>
</a></h4>
<h5 class="list-group-item-heading"><?php
echo FSEInfo::getPersonalHomeLink($owner_info, true);
?>
</h5>
</li>
<?php
}
?>
</ul>
<?php
}
?>
</h1>
示例13: addNewSectionVersion
public function addNewSectionVersion($project_id, $author_id, $domain_handle, $section_id, $type_handle, $section_subject, $section_content, $attached_files)
{
if (!in_array($domain_handle, $this->mDomainList)) {
return self::EC_BAD_DOMAIN;
}
$db = Loader::db();
$doc_lang = substr($project_id, -2);
$section_row = $db->getRow("SELECT page_id, area_handle, block_id, max_ver_code\n\tFROM fsen_document_sections_{$doc_lang} WHERE id=?", array($section_id));
if (count($section_row) == 0) {
return self::EC_NO_SUCH_ENTRY;
}
$page = Page::getByID($section_row['page_id']);
$area = Area::get($page, $section_row['area_handle']);
if (!is_object($area)) {
return self::EC_BAD_PAGEAREA;
}
$block = Block::getByID($section_row['block_id'], $page, $section_row['area_handle']);
if (!$block instanceof Block) {
return self::EC_NO_SUCH_OBJ;
}
$content_file_name = $section_id;
$new_ver_code = $section_row['max_ver_code'] + 1;
$full_content_path_name = $this->getSectionContentPath($content_file_name, $new_ver_code, '');
$fp = fopen($full_content_path_name . 'org', "w");
if ($fp === FALSE) {
return self::EC_FILE;
}
fwrite($fp, "{$author_id}\n");
fwrite($fp, "{$type_handle}\n");
fwrite($fp, "{$attached_files}\n");
fwrite($fp, h5($section_subject) . "\n");
fwrite($fp, h5($section_content));
fclose($fp);
$section_content_html = $this->org2html($section_subject, $section_content, $type_handle);
$fp = fopen($full_content_path_name . 'html', "w");
if ($fp === FALSE) {
return self::EC_FILE;
}
fwrite($fp, $section_content_html);
fclose($fp);
$query = "UPDATE fsen_document_sections_{$doc_lang}\n\tSET max_ver_code=max_ver_code+1, curr_ver_code=max_ver_code WHERE id=?";
$res = $db->Execute($query, array($section_id));
if ($db->Affected_Rows() == 0) {
return self::EC_DATABASE;
}
$block->update(array("domainHandle" => $domain_handle, "sectionID" => $content_file_name, "currentVerCode" => $new_ver_code));
self::updateCachedSectionInfo($domain_handle, $section_id, 'max_ver_code', $new_ver_code);
/* purge the full page cache */
$page_cache = PageCache::getLibrary();
$page_cache->purge($page);
return self::EC_OK;
}
示例14: h5
">
<div class="panel-heading">
<div class="media">
<a class="media-left" href="<?php
echo FSEInfo::getPersonalHomeLink($author_name_info);
?>
"><img class="middle-avatar" src="<?php
echo $author_name_info['avatar_url'];
?>
" alt="Avatar"></a>
<div class="media-body">
<div class="post-heading">
<h4>
<?php
if (strlen($content_subject)) {
echo h5($content_subject);
} else {
echo t('(No title)');
}
?>
</h4>
<p>
<small><span class="glyphicon glyphicon-pen"></span>
<?php
echo FSEInfo::getPersonalHomeLink($author_name_info, true, $link_style);
?>
<span class="glyphicon glyphicon-clock"></span>
<?php
echo $edit_time;
?>
示例15: unset
continue;
}
unset($replied_name_info);
if (preg_match("/^[0-9a-f]{32}\$/", $comment['replied_author_id'])) {
$replied_name_info = FSEInfo::getNameInfo($comment['replied_author_id']);
if ($replied_name_info == false) {
unset($replied_name_info);
}
}
if ($comment['action'] == DocSectionManager::COMMENT_ACTION_PRAISE) {
$body = '<span class="glyphicon glyphicon-thumbs-up" style="color:#eb7350;"></span>';
} else {
if ($comment['action'] == DocSectionManager::COMMENT_ACTION_FAVORITE) {
$body = '<span class="glyphicon glyphicon-heart" style="color:#eb7350;"></span>';
} else {
$body = h5($comment['body']);
}
}
?>
<li id="liComment<?php
echo $comment['id'];
?>
" class="list-group-item"
data-value="<?php
echo $comment['id'];
?>
">
<div class="media">
<span class="badge"><?php
echo $author_name_info['heat_level'];
?>