Esempio n. 1
0
function perch_content_check_preview()
{
    if (!defined('PERCH_PREVIEW_ARG')) {
        define('PERCH_PREVIEW_ARG', 'preview');
    }
    if (perch_get(PERCH_PREVIEW_ARG)) {
        $contentID = 'all';
        $rev = false;
        $var = perch_get(PERCH_PREVIEW_ARG);
        if ($var != 'all' && $var != 'preview') {
            $rev = $var;
            if (strpos($rev, 'r')) {
                $parts = explode('r', $rev);
                $contentID = (int) $parts[0];
                $rev = (int) $parts[1];
            }
        }
        $Users = new PerchUsers();
        $CurrentUser = $Users->get_current_user();
        if (is_object($CurrentUser) && $CurrentUser->logged_in()) {
            $Content = PerchContent::fetch();
            $Content->set_preview($contentID, $rev);
        }
    }
}
			    </div>
			</div>
			
			<nav class="sidebar">
			    <h2>Filter archive</h2>
			    <!--  By category listing -->
			    <?php 
perch_blog_categories(array('section' => perch_get('s')));
?>
			    <!--  By tag -->
			    <?php 
perch_blog_tags(array('section' => perch_get('s')));
?>
			    <!--  By year -->
			    <?php 
perch_blog_date_archive_years(array('section' => perch_get('s')));
?>
	    	</nav>
		</div>
		<footer class="layout-footer">
			<div class="wrapper">
				<ul class="social-links">
					<li class="twitter"><a href="#" rel="me">Twitter</a></li>
					<li class="facebook"><a href="#" rel="me">Facebook</a></li>
					<li class="flickr"><a href="#" rel="me">Flickr</a></li>
					<li class="linkedin"><a href="#" rel="me">LinkedIn</a></li>
					<li class="rss"><a href="#">RSS</a></li>
				</ul>
				<small>Copyright &copy; <?php 
echo date('Y');
?>
Esempio n. 3
0

<body class="events">
	
	<div class="flex-container">
				
		<?php 
perch_layout('page-header');
?>

		<div class="house empty-top">

			<div class="reed">
				
			<?php 
perch_events_custom(array('filter' => 'eventSlug', 'match' => 'eq', 'value' => perch_get('s'), 'template' => 'listing/event-detail.html'));
?>
	
			</div>
			
			<div class="side">
				<h3>Event Categories</h3>				
				<?php 
perch_events_categories(array('sort-order' => 'desc', 'template' => 'listing/events-categories.html'));
?>
			</div>

		</div>		
		

		<?php 
Esempio n. 4
0
		                <?php 
perch_blog_post_categories(perch_get('s'));
?>
		            </div>
		            <div class="tags">
		                <?php 
perch_blog_post_tags(perch_get('s'));
?>
		            </div>
		        </div>
				<div class="addthis_sharing_toolbox"></div>
		    	<?php 
perch_blog_post_comments(perch_get('s'));
?>
		    	<?php 
perch_blog_post_comment_form(perch_get('s'));
?>
		    </div> 
			<div class="blog-post-recent">
				<h2>Recent Blogs...</h2>	
				<?php 
perch_blog_custom(array('sort' => 'postDateTime', 'sort-order' => 'RAND', 'template' => 'blog/post_in_homepage.html', 'count' => '4'));
?>
	
			</div>	
			<div class="footer">		
				<footer>
					<ul>
						<li>	
							<a href="https://uk.linkedin.com/in/scottbrabazon" target="blank">
								<img src="../images/linkedin.png">
Esempio n. 5
0
			<?php 
perch_pages_navigation(array('levels' => 1));
?>
		</nav>
	</header>
	
	<!--  change cols2-nav-right to cols2-nav-left if you want the sidebar on the left -->
	<div class="wrapper cols2-nav-right">
	
		<div class="primary-content">
			<?php 
if (perch_get('s')) {
    // Output the large images
    perch_gallery_album_images(perch_get('s'), array('template' => 'd_list_image.html'));
    // Output the small images used for navigation
    perch_gallery_album_images(perch_get('s'), array('template' => 'd_nav_image.html'));
}
?>
    	</div>
    	<nav class="sidebar">
	    	<h2>Albums</h2>
		    <ul class="glist albums">
		    	<?php 
perch_gallery_albums();
?>
		    </ul>
		</nav>
	</div>

	<footer class="layout-footer">
		<div class="wrapper">
Esempio n. 6
0
<?php

use DrewM\MailChimp\Webhook as MailChimpWebhook;
include __DIR__ . '/../../env_runtime.php';
$API = new PerchAPI(1.0, 'perch_mailchimp');
$Settings = $API->get('Settings');
$secret = $Settings->get('perch_mailchimp_secret')->val();
if ($secret != perch_get('secret')) {
    die('Unauthorised.');
}
$Subscribers = new PerchMailChimp_Subscribers($API);
MailChimpWebhook::subscribe('subscribe', function ($data) use($API, $Subscribers) {
    $Subscriber = $Subscribers->get_one_by('subscriberMailChimpID', $data['id']);
    if (!$Subscriber) {
        $Subscriber = $Subscribers->lookup_and_create($data);
    }
    if ($Subscriber) {
        $Subscriber->update_subscription($data['list_id'], 'subscribe');
    }
    $Lists = new PerchMailChimp_Lists($API);
    $Lists->import();
});
MailChimpWebhook::subscribe('unsubscribe', function ($data) use($API, $Subscribers) {
    $Subscriber = $Subscribers->get_one_by('subscriberMailChimpID', $data['id']);
    if ($Subscriber) {
        $Subscriber->update_subscription($data['list_id'], 'unsubscribed');
    }
    $Lists = new PerchMailChimp_Lists($API);
    $Lists->import();
});
MailChimpWebhook::subscribe('cleaned', function ($data) use($API, $Subscribers) {
<?php

ini_set('display_errors', 1);
include '../admin/runtime.php';
if (perch_get('s')) {
    // Detail mode
    $page_details = perch_content_custom('Projects', array('template' => 'project.html', 'filter' => 'slug', 'match' => 'eq', 'value' => perch_get('s'), 'count' => 1, 'skip-template' => true));
    perch_layout('header', array('title' => $page_details[0]['title'], 'desc' => $page_details[0]['info']));
} else {
    perch_layout('header');
}
if (perch_get('s')) {
    // Detail mode
    perch_content_custom('Projects', array('template' => 'project.html', 'filter' => 'slug', 'match' => 'eq', 'value' => perch_get('s'), 'count' => 1));
} else {
    ?>

		<div class="wrapper">
			<div class="home-photography">
				<div class="head-photo" style="background-image: url(/images/work-banner.jpg);"></div>
				<div class="title-holder">
					<?php 
    perch_content('Page Title Banner');
    ?>
				</div>
			</div>
			<div class="portfolio portfolio-v2">
				<div class="container">
					<div class="filters">
						<ul id="filters">
							<li class="active" data-filter="*">All</li>
Esempio n. 8
0
<!DOCTYPE html>
<html>
<head>
<?php 
if (perch_layout_has('blog-post')) {
    perch_blog_post_meta(perch_get('s'));
    echo PHP_EOL;
    echo '<meta name="description" content="';
    echo perch_blog_post_field(perch_get('s'), 'postTitle') . '" />';
} else {
    echo '<title>';
    echo perch_content('title-tag') . '</title>';
    echo '<meta name="description" content="';
    echo perch_content('meta-desc') . '" />';
}
?>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192"  href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
Esempio n. 9
0
  </div>
</div>
<!-- /LOCATION -->
<!-- MAIN --> 
<div id="main" class="blog"> 
  <div class="top_main"></div> 
  <div class="middle_main"> 
	<!-- Main content --> 
	<!-- Fullwidth --> 
		  <div class="left_content_590"> 
			 <div class="post">
			<?php 
perch_blog_post($_GET['s']);
?>
			<?php 
perch_blog_post_tags(perch_get('s'));
?>
			</div>
			    <div id="disqus_thread"></div>
			    <script type="text/javascript">
			        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
			        var disqus_shortname = '4hair'; // required: replace example with your forum shortname

			        /* * * DON'T EDIT BELOW THIS LINE * * */
			        (function() {
			            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
			            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
			            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
			        })();
			    </script>
			    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
Esempio n. 10
0
                            locations.forEach(function(address) {
                                var marker = new google.maps.Marker({
                                    position: new google.maps.LatLng(address.addressLatitude, address.addressLongitude),
                                    map: map,
                                    title: address.locationTitle
                                });

                                bounds.extend(marker.getPosition());
                            });
                        }

                        // Zoom to map to fit the markers on display
                        map.fitBounds(bounds);
                    }
                </script>

                <!-- This is *not* the key you use in the Perch settings area. You will need a Browser key -->
                <script src="https://maps.googleapis.com/maps/api/js?callback=initMap&key=XXXXXXXXXX" async defer></script>

                <?php 
    root_locator_get_custom(array('address' => perch_get('address'), 'range' => 50));
    ?>
            <?php 
}
?>
        </div>
    </body>
</html>

<?php 
PerchUtil::output_debug();
Esempio n. 11
0
    $title_date_format = '%Y';
    // Month and Year?
    if (perch_get('month')) {
        $month = intval(perch_get('month'));
        $date_from = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01 00:00:00';
        $date_to = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-31 23:59:59';
        $title_date_format = '%B, %Y';
    }
    echo '<h2 class="page-title">Archive of: ' . strftime($title_date_format, strtotime($date_from)) . '</h2>';
    perch_blog_custom(array('filter' => 'postDateTime', 'match' => 'eqbetween', 'value' => $date_from . ',' . $date_to, 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
    $posts_displayed = true;
}
/* --------------------------- POSTS BY AUTHOR --------------------------- */
if (perch_get('author')) {
    echo '<h2 class="page-title">Posts by ' . perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true) . '</h2>';
    perch_blog_custom(array('author' => perch_get('author'), 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
    $posts_displayed = true;
}
/* --------------------------- DEFAULT: ALL POSTS --------------------------- */
if ($posts_displayed == false) {
    // No other options have been used; no posts have been displayed yet.
    // So display all posts.
    echo '<h2 class="page-title">Archive</h2>';
    perch_blog_custom(array('template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
}
?>
            </main>
            <?php 
perch_layout('sidebar');
?>
        </div>
Esempio n. 12
0
            print perch_blog_author(perch_get('author'));
            ?>
            </section>
            <section>
                <h2>Beiträge von <?php 
            echo perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true);
            ?>
</h2>
                <?php 
            perch_blog_custom(array('author' => perch_get('author'), 'template' => 'post_in_list.html', 'sort' => 'postDateTime', 'sort-order' => 'DESC'));
            ?>
            </section>
        <?php 
        } else {
            if (perch_get('year')) {
                $year = intval(perch_get('year'));
                $date_from = $year . '-01-01 00:00:00';
                $date_to = $year . '-12-31 23:59:59';
                ?>
            <h1><span class="arrow detail">Jahr</span> <?php 
                print strftime('%Y', strtotime($date_from));
                ?>
</h1>
            <section>
        <?php 
                perch_blog_custom(array('filter' => 'postDateTime', 'match' => 'eqbetween', 'value' => $date_from . ',' . $date_to, 'template' => 'post_in_list.html', 'sort' => 'postDateTime', 'sort-order' => 'DESC'));
                ?>
            </section>

        <?php 
            } else {
Esempio n. 13
0
" alt="Your Logo Here" class="logo"/>
		</div>
		<nav class="main-nav">
			<?php 
perch_pages_navigation(array('levels' => 1));
?>
		</nav>
	</header>
	
	<!--  change cols2-nav-right to cols2-nav-left if you want the sidebar on the left -->
	<div class="wrapper cols2-nav-right">
	
		<div class="primary-content">
			<?php 
if (perch_get('s')) {
    perch_gallery_album_images(perch_get('s'));
}
?>
		</div>
    	<nav class="sidebar">
			<h2>Albums</h2>
		    <ul class="glist albums">
		    	<?php 
perch_gallery_albums();
?>
		    </ul>

		</nav>
		
	</div>
Esempio n. 14
0
<?php

include '../perch/runtime.php';
// config
$bucket_name = 'secure';
$url_param = 'file';
// By default, deny downloads unless we've proved the member is allowed this file.
$allow_download = false;
// Check a member is logged in
if (perch_member_logged_in()) {
    $allow_download = true;
}
/*
	Alternatively, you could check for a specific tag, e.g.

	if (perch_member_has_tag('subscriber')) {
		$allow_download = true;
	}
*/
// Deliver the file.
if ($allow_download) {
    perch_members_secure_download(perch_get($url_param), $bucket_name);
}
exit;
Esempio n. 15
0
      
        <div class="outer-container">
            <main class="main-body">
                <h2 class="page-title">Handy links from around the web</h2>
                <p>It's early days. And we promise, at some stage, the following will be sorted much better, but here is a list of some great Perch resources from around the web. If you've got something to add, email <a href="mailto:hello@perchd.io">hello@perchd.io</a>.</p>
                <?php 
$tags = get_tags();
echo '<div class="tags">';
$active = perch_get('tag') == null ? ' active' : '';
echo '<a class="btn--secondary ' . $active . '" href="/links">All</a>&nbsp;';
foreach ($tags as $tag) {
    $active = perch_get('tag') == $tag ? ' active' : '';
    echo '<a class="btn--secondary' . $active . '" href="/links?tag=' . $tag . '">' . ucfirst(substr($tag, 6)) . '</a>&nbsp;';
}
echo '</div>';
$items = pinboard_bookmarks('perch ' . perch_get('tag'));
foreach ($items as $item) {
    echo '<article class="post--extended">';
    echo '<header class="post__header"><h3 class="post__title"><a href="' . $item['url'] . '">' . $item['title'] . '</a></h3>';
    //echo '<div class="post__byline"><time class="dt-published">'.$item['date'].'</time></div></header>';
    echo '<div class="post__content"><p>' . $item['description'] . '</p></div>';
    echo '</article>';
    echo '<hr />';
}
?>
            </main>
            <?php 
perch_layout('sidebar');
?>
        </div>
        
Esempio n. 16
0
<?php

if (!defined('PERCH_RUNWAY')) {
    include $_SERVER['DOCUMENT_ROOT'] . '/perch/runtime.php';
}
$title = perch_pages_title(true);
perch_layout('header', ['title' => $title . ' | perch.io']);
// perch_layout('homepage-header');
?>
      
        <div class="outer-container">
            <main class="main-body">
                <?php 
listing(perch_get('s'), array('template' => 'addons_item.html'));
?>
            </main>
            <?php 
perch_layout('user-sidebar');
?>
        </div>
        
    <?php 
perch_layout('footer');
Esempio n. 17
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . '/perch/runtime.php';
perch_mailchimp_campaign_content(perch_get('s'));
Esempio n. 18
0
//     echo '<h1>Archive of: '.$categoryTitle.'</h1>';
// }
// Tag?
if (perch_get('tag')) {
    $mode = 'tag';
    $tagSlug = perch_get('tag');
}
// Year?
if (perch_get('year')) {
    $mode = 'date';
    $year = intval(perch_get('year'));
    $date_from = $year . '-01-01 00:00:00';
    $date_to = $year . '-12-31 23:59:59';
    // Month and Year?
    if (perch_get('month')) {
        $month = intval(perch_get('month'));
        $date_from = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01 00:00:00';
        $date_to = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-31 23:59:59';
    }
}
// NOW WE KNOW WHAT MODE, LET'S DO THE PERCH STUFF
switch ($mode) {
    // case 'category':
    //     $opts = array(
    //         'category'=>rtrim($categorySlug, '/')
    //         );
    //     break;
    case 'tag':
        $opts = array('tag' => rtrim($tagSlug, '/'));
        break;
    case 'date':
Esempio n. 19
0
    <div class="hero-title-ctnr">
      <div class="hero-group">
        <h1 class="hero-title white text-shadow"><span itemprop="headline"><?php 
perch_blog_post_field(perch_get('s'), 'postTitle');
?>
</span></h1>
      </div>
    </div>
  </div>
</header>

<section>
  <div class="article-background">
    <article id="article" class="m0a">
      <?php 
perch_blog_post(perch_get('s'));
?>
    </article>
  </div>
</section>
</span>

<section class="cards">
  <div class="cards article-width--3">
    <header class="fp-header-ctnr">
      <h1 class="float-left medium blue">Latest news</h1>
      <p class="small"><a class="float-right link margin-top-05" href="/news/newsfeed/">All latest news &#8250;</a></p>
    </header>

    <?php 
perch_blog_custom(array('count' => 3, 'section' => 'newsfeed', 'template' => 'post_recent.html', 'sort' => 'postDateTime', 'sort-order' => 'DESC'));
Esempio n. 20
0
function perch_blog_check_preview()
{
    if (!defined('PERCH_PREVIEW_ARG')) {
        define('PERCH_PREVIEW_ARG', 'preview');
    }
    if (perch_get(PERCH_PREVIEW_ARG)) {
        $Users = new PerchUsers();
        $CurrentUser = $Users->get_current_user();
        if (is_object($CurrentUser) && $CurrentUser->logged_in()) {
            PerchUtil::debug('Entering preview mode');
            PerchBlog_Posts::$preview_mode = true;
        }
    }
}
Esempio n. 21
0
<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">      
    <?php 
if (perch_layout_has('blog-post')) {
    perch_blog_post_meta(perch_get('s'));
} else {
    echo '<title>' . perch_pages_title(true) . '</title>';
    perch_page_attributes();
}
?>
           
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="/assets/css/style.css">
        <link rel="shortcut icon" href="/assets/favicon.ico">
        <link rel="apple-touch-icon-precomposed" href="/assets/apple-touch-icon-152x152-precomposed.png">
        <script>
          (function(d) {
            var config = {
              kitId: 'lea0liy',
              scriptTimeout: 3000,
              async: true
            },
            h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
          })(document);
        </script>
    </head>
    <body>
        <header class="main-header">
Esempio n. 22
0
	</header>
	
	<!--  change cols2-nav-right to cols2-nav-left if you want the sidebar on the left -->
	<div class="wrapper cols2-nav-right">
	
		<div class="primary-content">	
			<?php 
perch_gallery_image(perch_get('id'));
?>
			<p><a href="index.php">&laquo; Back to listing</a></p>
    	</div>
    	
		<nav class="sidebar">
			<ul class="albums glist">
			<?php 
perch_gallery_adjacent_images(perch_get('id'));
?>
			</ul>
		</nav>
		
	</div>

	<footer class="layout-footer">
		<div class="wrapper">
			<ul class="social-links">
				<li class="twitter"><a href="#" rel="me">Twitter</a></li>
				<li class="facebook"><a href="#" rel="me">Facebook</a></li>
				<li class="flickr"><a href="#" rel="me">Flickr</a></li>
				<li class="linkedin"><a href="#" rel="me">LinkedIn</a></li>
				<li class="rss"><a href="#">RSS</a></li>
			</ul>
Esempio n. 23
0
<?php

setlocale(LC_ALL, 'de_DE.UTF8');
$currentpage = str_replace(".php", "", basename($_SERVER['PHP_SELF']));
PerchSystem::set_var('currentpage', $currentpage);
// print $currentpage;
?>
<!DOCTYPE html>
<html lang="de">
    <head>
    <meta charset="utf-8">
    <title>F R W S S R
    <?php 
if (perch_get('post')) {
    print "| geblogt: ";
    print perch_blog_post_field(perch_get('post'), 'postTitle');
}
?>
    </title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="FEUERWASSER">
    <meta name="publisher" content="FEUERWASSER">
    <meta name="copyright" content="FEUERWASSER">
    <meta name="description" content="">
    <meta name="keywords" content="Blog, FEUERWASSER, Agentur, Grafik, Webdesign, Grafikdesign, Walldorf, Wiesloch, Heidelberg">
    <meta name="page-topic" content="Design für Print und Web, FEEURWASSER Arbeitsweise, Design-Tipps für kleine und mittelgroße Unternehmen (KMU), Werkzeuge und Dienste für Design und Webentwicklung">
    <meta name="robots" content="all">
    <meta http-equiv="pragma" content="no-cache">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--     <link rel="alternate" type="application/rss+xml" title="RSS" href="rss.php" /> -->
<?php 
Esempio n. 24
0
				<div class="bigtop-head-wrap">			
					<div class="highlight-header-wrap">
						<img src="" alt="" title="" />
					</div>
				</div>				
			</div>
		</div>	

		<div class="house">

			<div class="reed">
				
								
				<h1>Events</h1>
				<h2>Category: <?php 
perch_events_category(perch_get('cat'));
?>
</h2>
							
				<?php 
perch_events_custom(array('filter' => 'eventDateTime', 'match' => 'gte', 'value' => date('Y-m-d'), 'sort' => 'eventDateTime', 'sort-order' => 'desc', 'template' => 'listing/events-list.html'));
?>
			</div>
			
			<div class="side">
				<h3>Event Categories</h3>				
				<?php 
perch_events_categories(array('sort-order' => 'desc', 'template' => 'listing/events-categories.html'));
?>
			</div>
Esempio n. 25
0
<?php

include 'perch/runtime.php';
perch_layout('global.header');
perch_gallery_album_details(perch_get('s'), array('template' => 'bespoke_designer_details.html'));
perch_gallery_album_images(perch_get('s'), array('template' => 'bespoke_designer_gallery.html'));
perch_layout('global.footer', array('activePage' => 'contact'));
?>

Esempio n. 26
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . '/perch/runtime.php';
perch_layout('blog.header');
?>
    <?php 
if (perch_get('q')) {
    perch_content_search(perch_get('q'));
    ?>
    <h2>Noch ’ne Suche?</h2>
    <?php 
    perch_search_form();
} else {
    ?>
    <h1>Suche</h1>
    <p>Einfach was eingeben uuund … ab die Post.</p>
    <?php 
    perch_search_form();
}
perch_layout('blog.footer');
Esempio n. 27
0
    $title_date_format = '%Y';
    // Month and Year?
    if (perch_get('month')) {
        $month = intval(perch_get('month'));
        $date_from = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01 00:00:00';
        $date_to = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-31 23:59:59';
        $title_date_format = '%B, %Y';
    }
    echo '<h1>Archive of: ' . strftime($title_date_format, strtotime($date_from)) . '</h1>';
    perch_blog_custom(array('filter' => 'postDateTime', 'match' => 'eqbetween', 'value' => $date_from . ',' . $date_to, 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order));
    $posts_displayed = true;
}
/* --------------------------- POSTS BY AUTHOR --------------------------- */
if (perch_get('author')) {
    echo '<h1>Posts by ' . perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true) . '</h1>';
    perch_blog_custom(array('author' => perch_get('author'), 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order));
    $posts_displayed = true;
}
/* --------------------------- DEFAULT: ALL POSTS --------------------------- */
if ($posts_displayed == false) {
    // No other options have been used; no posts have been displayed yet.
    // So display all posts.
    echo '<h1>Archive</h1>';
    perch_blog_custom(array('template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order));
}
?>
	    </div>
		<nav class="sidebar">
		    <h2>Filter archive</h2>
		    <!--  By category listing -->
		    <?php 
Esempio n. 28
0
				<div class="bigtop-head-wrap">			
					<div class="highlight-header-wrap">
						<img src="" alt="" title="" />
					</div>
				</div>				
			</div>
		</div>	

		

		<div class="house">

			<div class="monk">
				
				<?php 
$query = perch_get('q');
// 'q' query string argument e.g. search.php?q=apples
perch_content_search($query);
?>
							
			</div>
			
			<div class="side">
				<h2>Connect</h2><br>
				<a href="https://www.facebook.com/musichubbd"><button>Facebook</button></a>
				<a href="https://www.facebook.com/musichubbd"><button>Twitter</button></a>
				<a href="https://www.facebook.com/musichubbd"><button>Google+</button></a>

			</div>

		</div>		
Esempio n. 29
0
          			<li class="social-item"><a class="social-icon facebook no-link" href="javascript:window.open('https://www.facebook.com/sharer/sharer.php?u=https://waterford.sz/news/photos/album.php?s=<?php 
perch_gallery_album_field(perch_get('s'), 'albumSlug');
?>
)', 'Facebook', 'width=600, height=400' )"><i class="icon-facebook"></i></a></li>
          			<li class="social-item"><a class="social-icon twitter no-link" href="javascript:window.open('http://twitter.com/share?text=<?php 
perch_gallery_album_field(perch_get('s'), 'albumTitle');
?>
&url=https://waterford.sz/news/photos/album.php?s=<?php 
perch_gallery_album_field(perch_get('s'), 'albumSlug');
?>
', 'Twitter', 'width=600, height=400' )"><i class="icon-twitter"></i></a></li>
          			<li class="social-item"><a class="social-icon email no-link" href="mailto:?subject=<?php 
perch_gallery_album_field(perch_get('s'), 'albumTitle');
?>
&amp;body=https://waterford.sz/news/photos/album.php?s=<?php 
perch_gallery_album_field(perch_get('s'), 'albumSlug');
?>
"><i class="icon-email"></i></a></li>
        		</ul>
    		</div>
  		</div>   
	</div>
</div>

<section>
  <div class="cards">
    <header class="fp-header-ctnr">
      <h1 class="float-left medium blue">Latest photos</h1>
      <p class="small"><a class="float-right link margin-top-05" href="/news/photos/">All latest photos &#8250;</a></p>
    </header>
Esempio n. 30
0
<?php

session_start();
// Set the lang variable to our default
$lang = 'en';
// Get the lang query string from the URL
switch (perch_get('lang')) {
    // set the lang variable according to the query string
    case 'en':
        $lang = 'en';
        break;
    case 'it':
        $lang = 'it';
        break;
        // if there is no query string, check for a session cookie
    // if there is no query string, check for a session cookie
    default:
        if (isset($_SESSION['lang'])) {
            $lang = $_SESSION['lang'];
        }
        break;
}
// set our session cookie to whatever the lang variable is
$_SESSION['lang'] = $lang;
// make the $lang variable available in HTML templates
PerchSystem::set_var('lang', $lang);
?>

<!doctype html>
<html class="no-js" lang="<?php 
echo $lang;