本文整理汇总了PHP中getBareGalleryTitle函数的典型用法代码示例。如果您正苦于以下问题:PHP getBareGalleryTitle函数的具体用法?PHP getBareGalleryTitle怎么用?PHP getBareGalleryTitle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getBareGalleryTitle函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHeadTitle
/**
* Function to create the page title to be used within the html <head> <title></title> element.
* Usefull if you use one header.php for the header of all theme pages instead of individual ones on the theme pages
* It returns the title and site name in reversed breadcrumb order:
* <title of current page> | <parent item if present> | <gallery title>
* It supports standard gallery pages as well a custom and Zenpage news articles, categories and pages.
*
* @param string $separator How you wish the parts to be separated
* @param bool $listparentalbums If the parent albums should be printed in reversed order before the current
* @param bool $listparentpage If the parent Zenpage pages should be printed in reversed order before the current page
*/
function getHeadTitle($separator = ' | ', $listparentalbums = true, $listparentpages = true)
{
global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_page, $_myFavorites;
$mainsitetitle = html_encode(getBare(getMainSiteName()));
$separator = html_encode($separator);
if ($mainsitetitle) {
$mainsitetitle = $separator . $mainsitetitle;
}
$gallerytitle = html_encode(getBareGalleryTitle());
if ($_zp_page > 1) {
$pagenumber = ' (' . $_zp_page . ')';
} else {
$pagenumber = '';
}
switch ($_zp_gallery_page) {
case 'index.php':
return $gallerytitle . $mainsitetitle . $pagenumber;
break;
case 'album.php':
case 'image.php':
if ($listparentalbums) {
$parents = getParentAlbums();
$parentalbums = '';
if (count($parents) != 0) {
$parents = array_reverse($parents);
foreach ($parents as $parent) {
$parentalbums .= html_encode(getBare($parent->getTitle())) . $separator;
}
}
} else {
$parentalbums = '';
}
$albumtitle = html_encode(getBareAlbumTitle()) . $pagenumber . $separator . $parentalbums . $gallerytitle . $mainsitetitle;
switch ($_zp_gallery_page) {
case 'album.php':
return $albumtitle;
break;
case 'image.php':
return html_encode(getBareImageTitle()) . $separator . $albumtitle;
break;
}
break;
case 'news.php':
if (function_exists("is_NewsArticle")) {
if (is_NewsArticle()) {
return html_encode(getBareNewsTitle()) . $pagenumber . $separator . gettext('News') . $separator . $gallerytitle . $mainsitetitle;
} else {
if (is_NewsCategory()) {
return html_encode(getBare($_zp_current_category->getTitle())) . $pagenumber . $separator . gettext('News') . $separator . $gallerytitle . $mainsitetitle;
} else {
return gettext('News') . $pagenumber . $separator . $gallerytitle . $mainsitetitle;
}
}
}
break;
case 'pages.php':
if ($listparentpages) {
$parents = $_zp_current_zenpage_page->getParents();
$parentpages = '';
if (count($parents) != 0) {
$parents = array_reverse($parents);
foreach ($parents as $parent) {
$obj = new ZenpagePage($parent);
$parentpages .= html_encode(getBare($obj->getTitle())) . $separator;
}
}
} else {
$parentpages = '';
}
return html_encode(getBarePageTitle()) . $pagenumber . $separator . $parentpages . $gallerytitle . $mainsitetitle;
break;
case '404.php':
return gettext('Object not found') . $separator . $gallerytitle . $mainsitetitle;
break;
default:
// for all other possible static custom pages
$custompage = stripSuffix($_zp_gallery_page);
$standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
if (is_object($_myFavorites)) {
$standard['favorites'] = gettext('My favorites');
}
if (array_key_exists($custompage, $standard)) {
return $standard[$custompage] . $pagenumber . $separator . $gallerytitle . $mainsitetitle;
} else {
return $custompage . $pagenumber . $separator . $gallerytitle . $mainsitetitle;
}
break;
}
}
示例2: getHTMLMetaData
//.........这里部分代码省略.........
}
if ($_zp_page != 1) {
$canonicalurl .= '/' . $_zp_page;
}
}
break;
case 'pages.php':
$pagetitle = getBarePageTitle() . " - ";
$date = getPageDate();
$desc = trim(getBare(getPageContent()));
$canonicalurl = $host . $_zp_current_zenpage_page->getLink();
break;
default:
// for all other possible static custom pages
$custompage = stripSuffix($_zp_gallery_page);
$standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
if (is_object($_myFavorites)) {
$standard['favorites'] = gettext('My favorites');
}
if (array_key_exists($custompage, $standard)) {
$pagetitle = $standard[$custompage] . " - ";
} else {
$pagetitle = $custompage . " - ";
}
$desc = '';
$canonicalurl = $host . getCustomPageURL($custompage);
if ($_zp_page != 1) {
$canonicalurl .= '/' . $_zp_page;
}
break;
}
// shorten desc to the allowed 200 characters if necesssary.
$desc = html_encode(trim(substr(getBare($desc), 0, 160)));
$pagetitle = $pagetitle . getBareGalleryTitle();
// get master admin
$admin = $_zp_authority->getMasterUser();
$author = $admin->getName();
$meta = '';
if (getOption('htmlmeta_http-equiv-cache-control')) {
$meta .= '<meta http-equiv="Cache-control" content="' . getOption("htmlmeta_cache_control") . '">' . "\n";
}
if (getOption('htmlmeta_http-equiv-pragma')) {
$meta .= '<meta http-equiv="pragma" content="' . getOption("htmlmeta_pragma") . '">' . "\n";
}
if (getOption('htmlmeta_name-keywords')) {
$meta .= '<meta name="keywords" content="' . htmlmetatags::getMetaKeywords() . '">' . "\n";
}
if (getOption('htmlmeta_name-description')) {
$meta .= '<meta name="description" content="' . $desc . '">' . "\n";
}
if (getOption('htmlmeta_name-page-topic')) {
$meta .= '<meta name="page-topic" content="' . $desc . '">' . "\n";
}
if (getOption('htmlmeta_name-robots')) {
$meta .= '<meta name="robots" content="' . getOption("htmlmeta_robots") . '">' . "\n";
}
if (getOption('htmlmeta_name-publisher')) {
$meta .= '<meta name="publisher" content="' . FULLWEBPATH . '">' . "\n";
}
if (getOption('htmlmeta_name-creator')) {
$meta .= '<meta name="creator" content="' . FULLWEBPATH . '">' . "\n";
}
if (getOption('htmlmeta_name-author')) {
$meta .= '<meta name="author" content="' . $author . '">' . "\n";
}
if (getOption('htmlmeta_name-copyright')) {
示例3: html_encode
?>
/images/<?php
echo $zpfocus_logofile;
?>
" alt="<?php
echo html_encode(getBareGalleryTitle());
?>
" /></a>
<?php
} else {
?>
<h2 id="logo"><a href="<?php
echo html_encode(getGalleryIndexURL());
?>
"><?php
echo html_encode(getBareGalleryTitle());
?>
</a></h2>
<?php
}
?>
<div class="post">
<?php
printPageContent();
printCodeblock(1);
?>
<div class="newsarticlecredit">
<?php
printTags('links', gettext('Tags:') . ' ', 'taglist', ', ');
?>
示例4: gettext
$zpmin_metatitle = gettext('Password Required') . ' | ';
$zpmin_social = false;
break;
case '404.php':
$zpmin_metatitle = gettext('404 Not Found...') . ' | ';
$zpmin_social = false;
break;
default:
$zpmin_metatitle = '';
$zpmin_metadesc = truncate_string(getBareGalleryDesc(), 150, '...');
break;
}
?>
<title><?php
echo $zpmin_metatitle . getBareGalleryTitle();
?>
</title>
<meta name="description" content="<?php
echo $zpmin_metadesc;
?>
" />
<!--[if lt IE 8]>
<style type="text/css">.album-maxspace,.thumb-maxspace{zoom:1;display:inline;}#search{padding:2px 6px 6px 6px;}</style>
<![endif]-->
<?php
printRSSHeaderLink('Gallery', gettext('Gallery RSS'));
?>
<?php
if (function_exists("printRSSHeaderLink")) {
示例5: shortenContent
$zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
break;
case 'register.php':
$zpfocus_metatitle = gettext('Register') . ' | ' . getBareGalleryTitle();
$zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
break;
case 'password.php':
$zpfocus_metatitle = gettext('Password Required') . ' | ' . getBareGalleryTitle();
$zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
break;
case '404.php':
$zpfocus_metatitle = gettext('404 Not Found...') . ' | ' . getBareGalleryTitle();
$zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
break;
default:
$zpfocus_metatitle = getBareGalleryTitle();
$zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
break;
}
// Finish out header RSS links for inc-header.php
if (getOption('RSS_items')) {
printRSSHeaderLink('Gallery', gettext('Latest Images')) . "\n";
}
if (getOption('RSS_items_albums')) {
printRSSHeaderLink('AlbumsRSS', gettext('Latest Albums')) . "\n";
}
if ($zenpage) {
if (getOption('RSS_zenpage_items')) {
printRSSHeaderLink('News', '', gettext('Latest News')) . "\n";
}
if (function_exists('printCommentForm')) {
示例6: printContactForm
//.........这里部分代码省略.........
// no ticket
}
// CAPTCHA end
// If required fields are empty or not valide print note
if (count($error) != 0) {
?>
<div class="errorbox">
<h2>
<?php
$err = $error;
switch (count($err)) {
case 1:
printf(gettext('Please enter %s. Thanks.'), array_shift($err));
break;
case 2:
printf(gettext('Please enter %1$s and %2$s. Thanks.'), array_shift($err), array_shift($err));
break;
default:
$list = '<ul class="errorlist">';
foreach ($err as $item) {
$list .= '<li>' . $item . '</li>';
}
$list .= '</ul>';
printf(gettext('Please enter: %sThanks.'), $list);
break;
}
?>
</h2>
</div>
<?php
} else {
$mailaddress = $mailcontent['email'];
$name = $mailcontent['name'];
$subject = $mailcontent['subject'] . " (" . getBareGalleryTitle() . ")";
$message = $mailcontent['message'] . "\n\n";
if (!empty($mailcontent['title'])) {
$message .= $mailcontent['title'];
}
if (!empty($mailcontent['name'])) {
$message .= $mailcontent['name'] . "\n";
}
if (!empty($mailcontent['company'])) {
$message .= $mailcontent['company'] . "\n";
}
if (!empty($mailcontent['street'])) {
$message .= $mailcontent['street'] . "\n";
}
if (!empty($mailcontent['city'])) {
$message .= $mailcontent['city'] . "\n";
}
if (!empty($mailcontent['state'])) {
$message .= $mailcontent['state'] . "\n";
}
if (!empty($mailcontent['postal'])) {
$message .= $mailcontent['postal'] . "\n";
}
if (!empty($mailcontent['country'])) {
$message .= $mailcontent['country'] . "\n";
}
if (!empty($mailcontent['email'])) {
$message .= $mailcontent['email'] . "\n";
}
if (!empty($mailcontent['phone'])) {
$message .= $mailcontent['phone'] . "\n";
}
if (!empty($mailcontent['website'])) {
示例7: zp_apply_filter
if (function_exists('printGslideshow')) {
?>
<!DOCTYPE html>
<html>
<head>
<?php
zp_apply_filter('theme_head');
?>
<meta charset="<?php
echo LOCAL_CHARSET;
?>
" />
<meta name="viewport" content="width=device-width" />
<title><?php
echo gettext('Slideshow') . ' | ' . getBareGalleryTitle();
?>
</title>
</head>
<body>
<?php
zp_apply_filter('theme_body_open');
?>
<?php
printGslideshow();
?>
<?php
zp_apply_filter('theme_body_close');
?>
</body>
</html>
示例8: truncate_string
$zpmas_metadesc = truncate_string(getBareGalleryDesc(), 150, '...');
break;
case 'register.php':
$zpmas_metatitle = gettext('Register') . ' | ' . getBareGalleryTitle();
$zpmas_metadesc = truncate_string(getBareGalleryDesc(), 150, '...');
break;
case 'password.php':
$zpmas_metatitle = gettext('Password Required') . ' | ' . getBareGalleryTitle();
$zpmas_metadesc = truncate_string(getBareGalleryDesc(), 150, '...');
break;
case '404.php':
$zpmas_metatitle = gettext('404 Not Found...') . ' | ' . getBareGalleryTitle();
$zpmas_metadesc = truncate_string(getBareGalleryDesc(), 150, '...');
break;
default:
$zpmas_metatitle = getBareGalleryTitle();
$zpmas_metadesc = truncate_string(getBareGalleryDesc(), 150, '...');
break;
}
// Finish out header RSS links for inc-header.php
if (getOption('RSS_album_image')) {
printRSSHeaderLink('Gallery', gettext('Latest Images')) . "\n";
}
if (getOption('RSS_album_image')) {
printRSSHeaderLink('AlbumsRSS', gettext('Latest Albums')) . "\n";
}
if (getOption('zp_plugin-zenpage') && getOption('zpmas_usenews')) {
if (getOption('RSS_articles')) {
printRSSHeaderLink('News', '', gettext('Latest News')) . "\n";
}
if (function_exists('printCommentForm') && getOption('RSS_article_comments')) {
示例9: normalizeColumns
}
normalizeColumns(2, 8);
ob_start();
zenJavascript();
?>
<link rel="stylesheet" href="<?php
echo $_zp_themeroot;
?>
/zen.css" type="text/css" />
<?php
printRSSHeaderLink('Gallery', gettext('Gallery RSS'));
$headcontent = ob_get_clean();
$dir = getcwd();
chdir("../");
require_once "interface.php";
$layout = EpicInterface::render(getBareGalleryTitle(), $headcontent);
chdir($dir);
echo $layout['header'];
?>
<h1>
<?php
printHomeLink('', ' :: ');
echo getGalleryTitle();
?>
</h1>
<?php
while (next_album()) {
?>
示例10: getHTMLMetaData
//.........这里部分代码省略.........
} else {
$pagetitle = gettext('News') . " - ";
$desc = '';
$canonicalurl = $host . getNewsPathNav($_zp_page);
$type = 'website';
}
}
}
break;
case 'pages.php':
$pagetitle = getBarePageTitle() . " - ";
$date = getPageDate();
$desc = trim(getBare(getPageContent()));
$canonicalurl = $host . $_zp_current_page->getLink();
break;
default:
// for all other possible static custom pages
$custompage = stripSuffix($_zp_gallery_page);
$standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
if (is_object($_myFavorites)) {
$standard['favorites'] = gettext('My favorites');
}
if (array_key_exists($custompage, $standard)) {
$pagetitle = $standard[$custompage] . " - ";
} else {
$pagetitle = $custompage . " - ";
}
$desc = '';
$canonicalurl = $host . getCustomPageURL($custompage);
break;
}
// shorten desc to the allowed 200 characters if necesssary.
$desc = html_encode(trim(substr(getBare($desc), 0, 160)));
$pagetitle = $pagetitle . getBareGalleryTitle();
// get master admin
$admin = $_zp_authority->getMasterUser();
$author = $admin->getName();
$meta = '';
if (getOption('htmlmeta_http-equiv-cache-control')) {
$meta .= '<meta http-equiv="Cache-control" content="' . getOption("htmlmeta_cache_control") . '">' . "\n";
}
if (getOption('htmlmeta_http-equiv-pragma')) {
$meta .= '<meta http-equiv="pragma" content="' . getOption("htmlmeta_pragma") . '">' . "\n";
}
if (getOption('htmlmeta_name-keywords')) {
$meta .= '<meta name="keywords" content="' . htmlmetatags::getMetaKeywords() . '">' . "\n";
}
if (getOption('htmlmeta_name-description')) {
$meta .= '<meta name="description" content="' . $desc . '">' . "\n";
}
if (getOption('htmlmeta_name-page-topic')) {
$meta .= '<meta name="page-topic" content="' . $desc . '">' . "\n";
}
if (getOption('htmlmeta_name-robots')) {
$meta .= '<meta name="robots" content="' . getOption("htmlmeta_robots") . '">' . "\n";
}
if (getOption('htmlmeta_name-publisher')) {
$meta .= '<meta name="publisher" content="' . FULLWEBPATH . '">' . "\n";
}
if (getOption('htmlmeta_name-creator')) {
$meta .= '<meta name="creator" content="' . FULLWEBPATH . '">' . "\n";
}
if (getOption('htmlmeta_name-author')) {
$meta .= '<meta name="author" content="' . $author . '">' . "\n";
}
if (getOption('htmlmeta_name-copyright')) {
示例11: getHTMLMetaData
/**
* Prints html meta data to be used in the <head> section of a page
*
*/
function getHTMLMetaData()
{
global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority;
$url = sanitize("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
// Convert locale shorttag to allowed html meta format
$locale = getOption("locale");
$locale = strtr($locale, "_", "-");
// generate page title, get date
$pagetitle = "";
$date = strftime(DATE_FORMAT);
// if we don't have a item date use current date
$desc = getBareGalleryDesc();
if (is_object($_zp_current_image) and is_object($_zp_current_album)) {
$pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
$date = getImageDate();
$desc = getBareImageDesc();
}
if (is_object($_zp_current_album) and !is_object($_zp_current_image)) {
$pagetitle = getBareAlbumTitle() . " - ";
$date = getAlbumDate();
$desc = getBareAlbumDesc();
}
if (function_exists("is_NewsArticle")) {
if (is_NewsArticle()) {
$pagetitle = getBareNewsTitle() . " - ";
$date = getNewsDate();
$desc = strip_tags(getNewsContent());
} else {
if (is_NewsCategory()) {
$pagetitle = $_zp_current_category->getTitlelink() . " - ";
$date = strftime(DATE_FORMAT);
$desc = "";
} else {
if (is_Pages()) {
$pagetitle = getBarePageTitle() . " - ";
$date = getPageDate();
$desc = strip_tags(getPageContent());
}
}
}
}
// shorten desc to the allowed 200 characters if necesssary.
if (strlen($desc) > 200) {
$desc = substr($desc, 0, 200);
}
$pagetitle = $pagetitle . getBareGalleryTitle();
// get master admin
$admin = $_zp_authority->getAnAdmin(array('`user`=' => $_zp_authority->master_user, '`valid`=' => 1));
$author = $admin->getName();
$meta = '';
if (getOption('htmlmeta_http-equiv-language')) {
$meta .= '<meta http-equiv="language" content="' . $locale . '" />' . "\n";
}
if (getOption('htmlmeta_name-language')) {
$meta .= '<meta name="language" content="' . $locale . '" />' . "\n";
}
if (getOption('htmlmeta_name-content-language')) {
$meta .= '<meta name="content-language" content="' . $locale . '" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-imagetoolbar')) {
$meta .= '<meta http-equiv="imagetoolbar" content="false" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-cache-control')) {
$meta .= '<meta http-equiv="cache-control" content="' . getOption("htmlmeta_cache_control") . '" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-pragma')) {
$meta .= '<meta http-equiv="pragma" content="' . getOption("htmlmeta_pragma") . '" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-content-style-type')) {
$meta .= '<meta http-equiv="Content-Style-Type" content="text/css" />' . "\n";
}
if (getOption('htmlmeta_name-title')) {
$meta .= '<meta name="title" content="' . $pagetitle . '" />' . "\n";
}
if (getOption('htmlmeta_name-keywords')) {
$meta .= '<meta name="keywords" content="' . getMetaKeywords() . '" />' . "\n";
}
if (getOption('htmlmeta_name-description')) {
$meta .= '<meta name="description" content="' . $desc . '" />' . "\n";
}
if (getOption('htmlmeta_name-page-topic')) {
$meta .= '<meta name="page-topic" content="' . $desc . '" />' . "\n";
}
if (getOption('htmlmeta_name-robots')) {
$meta .= '<meta name="robots" content="' . getOption("htmlmeta_robots") . '" />' . "\n";
}
if (getOption('htmlmeta_name-publisher')) {
$meta .= '<meta name="publisher" content="' . FULLWEBPATH . '" />' . "\n";
}
if (getOption('htmlmeta_name-creator')) {
$meta .= '<meta name="creator" content="' . FULLWEBPATH . '" />' . "\n";
}
if (getOption('htmlmeta_name-author')) {
$meta .= '<meta name="author" content="' . $author . '" />' . "\n";
}
if (getOption('htmlmeta_name-copyright')) {
//.........这里部分代码省略.........
示例12: printSearchForm
?>
</div>
<?php
printSearchForm();
?>
</div>
<div id="menu">
<?php
printThemeMenu();
?>
</div>
<div id="breadcrumb">
<ul>
<?php
getFormattedMainSiteName('<li class="page">', '</li><li class="chevron"> > </li>');
echo '<li><a>' . getBareGalleryTitle() . '</a></li>';
?>
</ul>
</div>
<div id="content">
<div class="thumbs albums">
<ul class="list">
<?php
while (next_album()) {
?>
<li>
<div class="thumb">
<a title="<?php
echo html_encode(getAlbumDesc());
?>
" href="<?php
示例13: printContactForm
/**
* Prints the mail contact form, handles checks and the mail sending. It uses Zenphoto's check for valid e-mail adress and website url and also supports Captcha.
* The contact form itself is a separate file and is located within the /contact_form/form.php so that it can be style as needed.
*
*/
function printContactForm()
{
global $_zp_UTF8, $_zp_captcha;
$error = array();
if (isset($_POST['sendmail'])) {
$mailcontent = array();
$mailcontent['title'] = getField('title');
$mailcontent['name'] = getField('name');
$mailcontent['company'] = getField('company');
$mailcontent['street'] = getField('street');
$mailcontent['city'] = getField('city');
$mailcontent['country'] = getField('country');
$mailcontent['email'] = getField('email');
$mailcontent['website'] = getField('website');
$mailcontent['phone'] = getField('phone');
$mailcontent['subject'] = getField('subject');
$mailcontent['message'] = getField('message', 1);
// if you want other required fiels or less add/modify their checks here
if (getOption('contactform_title') == "required" && empty($mailcontent['title'])) {
$error[1] = gettext("a <strong>title</strong>");
}
if (getOption('contactform_name') == "required" && empty($mailcontent['name'])) {
$error[2] = gettext("a <strong>name</strong>");
}
if (getOption('contactform_company') == "required" && empty($mailcontent['company'])) {
$error[3] = gettext("a <strong>company</strong>");
}
if (getOption('contactform_street') == "required" && empty($mailcontent['street'])) {
$error[4] = gettext("a <strong>street</strong>");
}
if (getOption('contactform_city') == "required" && empty($mailcontent['city'])) {
$error[5] = gettext("a <strong>city</strong>");
}
if (getOption('contactform_country') == "required" && empty($mailcontent['country'])) {
$error[6] = gettext("a <strong>country</strong>");
}
if (getOption('contactform_email') == "required" && empty($mailcontent['email']) || !is_valid_email_zp($mailcontent['email'])) {
$error[7] = gettext("a <strong>valid email adress</strong>");
}
if (getOption('contactform_website') == "required" && empty($mailcontent['website'])) {
$error[8] = gettext('a <strong>website</strong>');
} else {
if (!empty($mailcontent['website'])) {
if (substr($mailcontent['website'], 0, 7) != "http://") {
$mailcontent['website'] = "http://" . $mailcontent['website'];
}
}
}
if (getOption("contactform_phone") == "required" && empty($mailcontent['phone'])) {
$error[9] = gettext("a <strong>phone number</strong>");
}
if (getOption("contactform_subject") == "required" && empty($mailcontent['subject'])) {
$error[10] = gettext("a <strong>subject</strong>");
}
if (getOption("contactform_message") == "required" && empty($mailcontent['message'])) {
$error[11] = gettext("a <strong>message</strong>");
}
// captcha start
if (getOption("contactform_captcha")) {
$code_ok = trim($_POST['code_h']);
$code = trim($_POST['code']);
if (!$_zp_captcha->checkCaptcha($code, $code_ok)) {
$error[5] = gettext("<strong>the correct captcha verification code</strong>");
}
// no ticket
}
// captcha end
// If required fields are empty or not valide print note
if (count($error) != 0) {
echo gettext("<p style='color:red'>Please enter ");
$count = 0;
foreach ($error as $err) {
$count++;
if (count($error) > 1) {
$separator = ", ";
}
echo $err;
if ($count != count($error)) {
if ($count === count($error) - 1) {
$separator = gettext(" and ");
}
echo $separator;
}
}
echo gettext(". Thanks.</p>");
} else {
$mailaddress = $mailcontent['email'];
$name = $mailcontent['name'];
$headers = 'From: ' . $mailaddress . '' . "\r\n";
//$headers .= 'Cc: '.$mailaddress.''."\r\n"; // somehow does not work on all servers!
$subject = $mailcontent['subject'] . " (" . getBareGalleryTitle() . ")";
$message = $mailcontent['message'] . "\n";
if (!empty($mailcontent['title'])) {
$message .= $mailcontent['title'];
}
//.........这里部分代码省略.........
示例14: getGalleryLogo
<div id="logo">
<?php
echo getGalleryLogo();
?>
</div>
<div id="gallery_title">
<?php
echo getGalleryTitleHeader();
?>
</div>
</div>
<div id="breadcrumb">
<ul>
<?php
getFormattedMainSiteName('<li class="page">', '</li><li class="chevron"> > </li>');
echo '<li><a href="' . getGalleryIndexURL() . '">' . getBareGalleryTitle() . '</a></li>';
getParentBreadcrumbTLB('<li class="chevron"><a> > </a></li>');
echo '<li class="chevron"><a> > </a></li>';
echo '<li><a href="' . getAlbumURL() . '">' . getBareAlbumTitle() . '</a></li>';
echo '<li class="chevron"><a> > </a></li>';
echo '<li><a>' . getBareImageTitle() . '</a></li>';
?>
</ul>
</div>
<div id="menu">
<?php
printThemeMenu();
?>
</div>
<div id="content" class="c">
<div id="description">
示例15: header
<?php
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
?>
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="<?php
echo $_zp_themeroot;
?>
/slideshow.css" type="text/css" />
<?php
zp_apply_filter('theme_head');
?>
<title><?php
echo getBareGalleryTitle();
?>
<?php
echo gettext("Slideshow");
?>
</title>
<meta http-equiv="content-type" content="text/html; charset=<?php
echo getOption('charset');
?>
" />
</head>
<body>
<?php
zp_apply_filter('theme_body_open');
?>
<div id="slideshowpage">