コード例 #1
0
    function showLoginPasswordProtect($error_msg)
    {
        ?>

<!-- Start template for the login form -->
 
<!-- Header -->
<?php 
        snippet('header');
        ?>

<!-- Login -->
<h2>Authorisation required:</h2>

<!-- Display error message -->
<h3><span style="color:#DB1010"><?php 
        echo $error_msg;
        ?>
</span></h3>
	<form method="post">
		<input type="text" name="access_login" placeholder="Username" /><br /><br />
		<input type="password" name="access_password" placeholder="Password" /><br /><br />
		<input type="submit" name="Login" value="Login" />
	</form>	

<!-- End template for the login form -->

<?php 
        // stop at this point
        die;
    }
コード例 #2
0
ファイル: reply.php プロジェクト: N3X15/ATBBS-Plus
 public function Parse($topic)
 {
     if ($_COOKIE['ostrich_mode'] == 1) {
         foreach ($User->IgnoreList as $ignored_phrase) {
             if (stripos($reply_body, $ignored_phrase) !== false) {
                 $this->Ignored = true;
                 $this->ParsedBody = '[This post has matched a phrase on your ignore list and is therefore hidden.]';
                 return;
             }
         }
     }
     $body = parse($this->Body);
     // Linkify citations. (This might be updated to use preg_replace_callback in the future.)
     preg_match_all('/^@([0-9,]+)/m', $body, $matches);
     foreach ($matches[0] as $formatted_id) {
         $name = '';
         $pure_id = str_replace(array('@', ','), '', $formatted_id);
         if (!array_key_exists($pure_id, $topic->Replies)) {
             $body = str_replace($formatted_id, '<span class="unimportant">(Citing a deleted or non-existent reply.)</span>', $body);
         } else {
             if ($topic->Replies[$pure_id]->isHidden()) {
                 $body = str_replace($formatted_id, '<span class="unimportant help" title="' . snippet($topic->Replies[$pure_id]->Body) . '">@hidden</span>', $body);
             } else {
                 if ($pure_id == $topic->PreviousReply->ID) {
                     $link_text = '@previous';
                 } else {
                     $link_text = $formatted_id;
                 }
                 $body = str_replace($formatted_id, '<a href="#reply_' . $pure_id . '" onclick="highlightReply(\'' . $pure_id . '\'); createSnapbackLink(\'' . $reply_id . '\')" class="unimportant help" title="' . snippet($topic->Replies[$pure_id]->Body) . '">' . $link_text . '</a> <span class="unimportant citation">(' . $topic->GetName($this, $pure_id) . ')</span>', $body);
             }
         }
     }
     $this->ParsedBody = preg_replace('/^@OP/', '<span class="unimportant">@OP</span>', $body);
 }
コード例 #3
0
ファイル: atomicdesign.php プロジェクト: cnoss/fubix
 /**
  * Übergbt der 'snippet'-Funktion den Pfad zu einem AtomicDesign-
  * 
  * @author 
  * @param $level    Name der AtomicDesign-Ebene (vereinfacht)
  * @param $uid      Eindeutiger Name eines existierenden Ebenen-Blocks
  * @param $vars     Array von Variablen, die im Snippet Verwendung finden
  * @param $return   Rückgabe des konstruierten Snippet aus AtomicDesign-Ebenen-Blocks
  * @return          Konstruiertes Snippet aus Atomic-Ebenen-Blocks
  */
 public static function output($level, $uid, $vars = array(), $return = false)
 {
     if (!isset(self::$levelmap[$level])) {
         throw new Exception("AtomicDesign-Level not found: " . $level);
     }
     $template = self::get_snip($uid, false, self::$levelmap[$level]);
     return snippet($template, $vars, $return);
     // the function 'snippet' is introduced by kirby
 }
コード例 #4
0
 /**
  * Handle the event
  *
  * @param League\Event\EventInterface $event
  * @return void
  */
 public function handle(EventInterface $event, $data = [])
 {
     $studio = $data['studio'];
     $event = $data['event'];
     $data['order'] = $event->children()->find('orders')->children()->findBy('uid', $data['orderId']);
     $email = new Mailer(['body' => snippet('emails/tickets-studio', $data, true), 'subject' => "[{$studio->title()->html()}] Tickets Purchased"]);
     $email->send();
     $custEmail = new Mailer(['body' => snippet('emails/tickets-customer', $data, true), 'to' => $data['order']->customerEmail()->toString(), 'subject' => "Your Tickets"]);
     $custEmail->send();
 }
コード例 #5
0
ファイル: email.php プロジェクト: pveinberg/code
function xmail($to, $subject, $body)
{
    $message = snippet(EMAIL_SHELL, array('body' => $body));
    $hdrs = array('From' => EMAIL_FROM, 'Subject' => $subject);
    $mime = new Mail_mime(array('eol' => $crlf));
    $mime->setTXTBody(strip_tags($html));
    $mime->setHTMLBody($message);
    $body = $mime->get();
    $hdrs = $mime->headers($hdrs);
    $mail =& Mail::factory('mail');
    $mail->send($to, $hdrs, $body);
}
コード例 #6
0
/**
 * Disqus Plugin
 *
 * @author Guillem Lorman <*****@*****.**>
 * @version 2.0.0
 */
function disqus_comments($post, $params = array())
{
    // set all default values
    $defaults = array('disqus_shortname' => c::get('disqus-shortname'), 'disqus_identifier ' => $post->slug(), 'disqus_title ' => $post->title()->title(), 'disqus_url ' => getPostUrl($post), 'snippet' => false);
    $options = array_merge($defaults, $params);
    if ($options['snippet']) {
        $html .= snippet($options['snippet'], $options, true);
    } else {
        $html .= tpl::load(__DIR__ . DS . 'comments.php', $options);
    }
    return $html;
}
コード例 #7
0
 function body()
 {
     $body = $this->option('body');
     if (empty($body)) {
         $body = snippet('contactform.mail', array(), true);
         if (empty($body)) {
             $body = 'Name: {name}' . PHP_EOL;
             $body .= '---------' . PHP_EOL;
             $body .= 'Email: {email}' . PHP_EOL;
             $body .= '---------' . PHP_EOL;
             $body .= 'Text: {text}' . PHP_EOL;
         }
     }
     foreach ($this->data() as $key => $value) {
         $body = str_replace('{' . $key . '}', $value, $body);
     }
     return trim($body);
 }
コード例 #8
0
 protected function afterSave($args)
 {
     // A record's search text is public by default, but there are times
     // when this is not desired, e.g. when an item is marked as
     // private. @todo: Make a check to see if the record is public or private.
     if (!$this->approved || $this->is_spam) {
         // Setting the search text to private makes it invisible to
         // most users.
         $this->setSearchTextPrivate();
     }
     // Set the record's title. This will be used to identify the record
     // in the search results.
     //comments don't have titles
     $this->setSearchTextTitle(snippet($this->body, 0, 40));
     // Set the record's search text. Records that implement the
     // Mixin_ElementText mixin during _initializeMixins() will
     // automatically have all element texts added. Note that you
     // can add multiple search texts, which simply appends them.
     //$this->addSearchText($recordTitle);
     $this->addSearchText($this->body);
 }
コード例 #9
0
ファイル: builder.php プロジェクト: cnoss/fubix
 public function entry($data)
 {
     if (isset($data->_fieldset)) {
         $fieldsetName = $data->_fieldset;
     } else {
         return "No fieldset found in entry.";
     }
     if (isset($this->fieldsets[$fieldsetName])) {
         $fieldset = $this->fieldsets[$fieldsetName];
         if (isset($fieldset["entry"])) {
             $this->entry = $fieldset["entry"];
         } else {
             $this->entry = null;
         }
         $this->fields = $fieldset["fields"];
     } else {
         return 'No fieldset with name "' . $fieldsetName . '" found.';
     }
     //$data->_fileUrl = $this->page->url() . DS;
     //return parent::entry($data);
     return snippet('form-builder/' . $fieldsetName, array("fields" => $this->fieldsets[$fieldsetName]['fields'], "data" => $data, "preview" => true));
     //return parent::entry($data);
 }
 public function toHTML()
 {
     $content = "";
     foreach ($this->data[self::ARRAY_IMAGES] as $image) {
         $imageExt = new ImageExtImage($this->imageExt, $image);
         $imageExt->generate();
         $imageExt->optimizeOutput();
         $content .= $imageExt->toHTML();
     }
     if ($this->data[self::ARRAY_ATTR][self::PARA_SNIPPET_GALLERY] !== false && file_exists(kirby()->roots->snippets() . '/' . $this->data[self::ARRAY_ATTR][self::PARA_SNIPPET_GALLERY] . '.php')) {
         $attr = array();
         if (!empty($this->data[self::ARRAY_ATTR][self::PARA_GALLERY_CLASS])) {
             $attr['class'] = $this->data[self::ARRAY_ATTR][self::PARA_GALLERY_CLASS];
         }
         $attr['images'] = $content;
         return (string) snippet($this->data[self::ARRAY_ATTR][self::PARA_SNIPPET_GALLERY], array('data' => $attr), true);
     } else {
         $attr = array();
         if (!empty($this->data[self::ARRAY_ATTR][self::PARA_GALLERY_CLASS])) {
             $attr['class'] = $this->data[self::ARRAY_ATTR][self::PARA_GALLERY_CLASS];
         }
         return \Html::tag("div", $content, $attr);
     }
 }
コード例 #11
0
echo css('https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css');
echo js('https://code.jquery.com/jquery-2.1.4.min.js');
echo js('assets/js/jquery.fitvids.js');
echo js('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js');
echo js('assets/js/main.js');
echo css('assets/css/main.css');
?>

</head>
<body>

  <header class="header" role="banner">
  <div class="top"></div>
   <div class="container">
    <h1><a href="<?php 
echo $site->url();
?>
"><span class="titleFirst">De <span class="Ttuut">t</span><span class="skew1">u</span><span class="skew2">u</span><span class="Ttuut">t</span> van</span><span class="titleSecond">tegenwoordig<strong>.</strong>be</span></a></h1>
    <div class="social">
      <ul>
        <li><a href="http://www.twitter.com/detuutbe" target="_blank"><i class="fa fa-twitter"></i></a></li>
        <li><a href="https://www.facebook.com/tuutvantegenwoordig" target="_blank"><i class="fa fa-facebook"></i></a></li>
        <!--<li><a href="#" class="search"><i class="fa fa-search"></i></a></li>-->
      </ul>
    </div>
        </div>
        <?php 
snippet('menu');
?>
     <div class="uuu"></div>
  </header>
コード例 #12
0
ファイル: coupons.php プロジェクト: evendev/paintcrazy
                    <?php 
        if ($coupon->active()->bool()) {
            ?>
                        <span class="text-success">Active</span>
                    <?php 
        } else {
            ?>
                        <span class="text-danger">Inactive</span>
                    <?php 
        }
        ?>
                </td>
            </tr>
        <?php 
    }
    ?>
        </tbody>
    </table>
<?php 
} else {
    ?>
    <div class="alert alert-warning">
        No coupons
    </div>
<?php 
}
?>

<?php 
snippet('layouts/manage/footer');
コード例 #13
0
ファイル: testpage.php プロジェクト: privamail/Protostrap
                    <h4>Filtertable</h4>
                    <div class="table-responsive table-responsive-maxheight">
                        <?php 
$tabledata = $firmen;
include snippet("makeTableFromData");
?>
                    </div>
                </div>
            </div>
        </div> <!-- /container -->

        <?php 
// JAVASCRIPT
// This includes the needed javascript files
// DO NOT REMOVE
include snippet("meta_javascripts");
?>
        <script>
        $(function(){
            $("#favoriteColorChange").change(function() {
                $("#favColor").html($(this).val());
                updateSessionVar("set","favoriteColor",$(this).val());
                $(this).val("");
                $("#reloadInfo").removeClass("hide");
            });

        })


        </script>
  </body>
コード例 #14
0
ファイル: home.php プロジェクト: ajmalafif/bradshawsguide
<?php

if (!isset($_GET['ajax'])) {
    snippet('_header');
}
?>
        <section class="cover">
<?php 
echo kirbytext($page->text());
?>
        </section>
<?php 
if (!isset($_GET['ajax'])) {
    snippet('_footer');
}
コード例 #15
0
ファイル: project.php プロジェクト: julienmillies/htdocs-home
<?php

snippet('header');
snippet('project-' . $page->title());
コード例 #16
0
ファイル: callback.php プロジェクト: samnabi/shopkit
<?php

// Set transaction
$txn = page('shop/orders/' . get('txn_id'));
// Set email if available
if (get('payer_email') != '') {
    try {
        // Update transaction record
        $txn->update(['payer-email' => get('payer_email')], 'en');
    } catch (Exception $e) {
        // $txn->update() failed
        snippet('mail.order.update.error', ['txn' => $txn, 'payment_status' => 'pending', 'payer_name' => $txn->payer_name(), 'payer_email' => get('payer_email'), 'payer_address' => $txn->payer_email()]);
        return false;
    }
}
try {
    // Update stock and notify staff
    snippet('order.callback', ['txn' => $txn, 'status' => 'pending', 'payer_name' => $txn->payer_name(), 'payer_email' => get('payer_email') != '' ? get('payer_email') : $txn->payer_email(), 'payer_address' => $txn->payer_address()]);
} catch (Exception $e) {
    // Update or notification failed
    snippet('mail.order.update.error', ['txn' => $txn, 'payment_status' => 'pending', 'payer_name' => $txn->payer_name(), 'payer_email' => get('payer_email') != '' ? get('payer_email') : $txn->payer_email(), 'payer_address' => $txn->payer_address()]);
    // Kick the user back to the cart
    go(url('shop/cart'));
}
// Go to confirm page
go('/shop/confirm?txn_id=' . $txn->txn_id());
コード例 #17
0
ファイル: header.php プロジェクト: samnabi/shopkit
<body>

<div class="uk-container uk-container-center">

<div class="uk-grid uk-margin-large-bottom">

	<div class="uk-width-small-1-1 uk-width-medium-2-3 uk-push-1-3">
		
		<!-- Logo -->
		<div class="uk-visible-small uk-text-center uk-margin">
			<?php 
snippet('logo');
?>
		</div>
		
		<div class="uk-container uk-padding-remove uk-margin-top uk-margin-bottom">
			<?php 
snippet('header.nav');
?>
		</div>

		<?php 
snippet('header.user');
?>
	
		
		<?php 
snippet('header.notifications');
?>

		<main class="uk-container uk-padding-remove">
コード例 #18
0
ファイル: blog.php プロジェクト: DerZyklop/gutesache.pxwrk.de
            </ul> -->
            <?php 
    snippet("interactive", array('company' => $featured_eg));
    ?>

            <?php 
    if ($i == 0) {
        ?>
             <p><?php 
        echo $blogpost->text();
        ?>
</p>
            <?php 
    }
    ?>
          </div>
        </div>
      </div>
      <?php 
    $i++;
    ?>
    <?php 
}
?>
  </section>
  <?php 
snippet("footer");
?>
</body>
</html>
コード例 #19
0
 /**
  * Bundles the form data to an e-mail body and sends it.
  */
 private function sendForm()
 {
     $mailBody = "";
     $snippet = $this->options['snippet'];
     if (empty($snippet)) {
         foreach ($this->data as $key => $value) {
             if (str::startsWith($key, '_')) {
                 continue;
             }
             $mailBody .= ucfirst($key) . ': ' . $value . "\n\n";
         }
     } else {
         $mailBody = snippet($snippet, array('data' => $this->data), true);
         if ($mailBody === false) {
             throw new Exception("The email snippet '" . $snippet . "' does not exist!");
         }
     }
     $params = array('service' => $this->options['service'], 'options' => $this->options['service-options'], 'to' => $this->options['to'], 'from' => a::get($this->data, 'name', '') . ' <' . a::get($this->data, '_from') . '>', 'subject' => $this->options['subject'], 'body' => $mailBody);
     $email = email($params);
     if ($email->send()) {
         $params['subject'] = l::get('sendform-email-copy') . ' ' . $params['subject'];
         // if everything was ok, send the copies
         foreach ($this->options['copy'] as $address) {
             $params['to'] = $address;
             email($params)->send();
         }
         $this->message = l::get('sendform-send-success');
         $this->sentSuccessful = true;
         // now this form send session is over, so destroy the token
         $this->destroyToken();
     } else {
         $this->message = l::get('sendform-send-error') . " " . $email->error();
     }
 }
コード例 #20
0
ファイル: sidebar.php プロジェクト: CelineDesign/shopkit
if (count($products)) {
    ?>
        <div class="panel">
            <?php 
    snippet('featured-list', array('products' => $products, 'calculations' => $calculations));
    ?>
        </div>
    <?php 
}
?>

    <!-- Global category listing -->
    <div class="panel">
        <h1>Shop by category</h1>
        <?php 
snippet('treemenu', array('subpages' => page('shop')->children(), 'template' => 'category', 'class' => 'side-nav'));
?>
    </div>

    <!-- Search -->
    <div class="panel">
        <h1>Search shop</h1>
        <form class="row searchForm" action="/search" method="get">
            <div class="small-12 large-8 columns">
                <input type="text" name="q" value="<?php 
echo get('q');
?>
" placeholder="">
            </div>
            <div class="small-12 large-4 columns">
                <button class="tiny info expand" type="submit">Search</button>
コード例 #21
0
ファイル: footer-blog.php プロジェクト: aizlewood/2016
  <footer class="footer-blog cf" role="contentinfo">

 <main class="main blog" role="main">

  <div class="inner">
  	<div class="author">
  		<?php 
snippet('author');
?>
	
  	</div>

	<div class="tags">
		Tagged with: <?php 
foreach (str::split($page->tags()) as $tag) {
    ?>
			<a href="<?php 
    echo url('articles/tag:' . urlencode($tag));
    ?>
">#<?php 
    echo html($tag);
    ?>
</a>
		<?php 
}
?>
	</div>  

  </div>
  
  <?php 
コード例 #22
0
ファイル: footer.php プロジェクト: evendev/paintcrazy
<?php 
snippet('layouts/_/footer');
コード例 #23
0
ファイル: footer.php プロジェクト: alkaest2002/risky2
echo date('Y');
?>
 | <?php 
echo html::email('*****@*****.**');
?>
</small>
		</div>
	</div>
</div>
	<!-- LOAD JS FILES -->
	<?php 
if ($page->template() == 'test') {
    ?>
		
		<?php 
    echo snippet('app');
    ?>
 

		<script src="../assets/js/require.js"  data-main="../assets/js/main"></script>

	<?php 
} else {
    ?>

		<?php 
    //load vendors' libs
    echo js(array('assets/js/app/lib/jquery.js', 'assets/js/app/lib/bootstrap.js'));
    ?>

	<?php 
コード例 #24
0
ファイル: feed.php プロジェクト: niklausgerber/monochrome
<?php

// get any list of items
// in this case we get all visible children of the blog section,
// flip them to get them in reverse order and make sure we only get the last 10
$items = $pages->find('articles')->children()->visible()->flip()->limit(10);
// this is how you embed the feed snippet with some options
snippet('feed', array('link' => url('articles'), 'items' => $items, 'descriptionField' => 'text', 'descriptionLength' => 300));
コード例 #25
0
ファイル: grid.php プロジェクト: veryrobert/altair
				</div>

				<div class="Grid-cell u-size1of1--small u-size1of2--compact u-size1of4--medium u-size2of6--wide">

					<p class="u-spaceTrailerM"><strong>Grid column II</strong>: nulla vestibulum magna quis eros accumsan in ultrices massa imperdiet. Curabitur at enim risus. Ut lacus nulla, tincidunt sit amet euismod eu, vehicula ut nisl. Duis a sapien.</p>

				</div>

				<div class="Grid-cell u-size1of1--small u-size1of2--compact u-size1of4--medium u-size1of6--wide">

					<p class="u-spaceTrailerM"><strong>Grid column III</strong>: nulla vestibulum magna quis eros accumsan in ultrices massa imperdiet. Curabitur at enim risus. Ut lacus nulla, tincidunt sit amet euismod eu, vehicula ut nisl. Duis a sapien.</p>

				</div>

				<div class="Grid-cell u-size1of1--small u-size1of2--compact u-size1of4--medium u-size1of6--wide">

					<p class="u-spaceTrailerM"><strong>Grid column IV</strong>: nulla vestibulum magna quis eros accumsan in ultrices massa imperdiet. Curabitur at enim risus. Ut lacus nulla, tincidunt sit amet euismod eu, vehicula ut nisl. Duis a sapien.</p>

				</div>

			</div>
		</section>

		<?php 
snippet('share_page');
?>

	</main>

<?php 
snippet_detect('footer');
コード例 #26
0
ファイル: project.meta.php プロジェクト: rafegoldberg/zazu
<?php

snippet('components/project.title', array('project' => $project));
snippet('components/project.tags', array('project' => $project));
コード例 #27
0
ファイル: home.php プロジェクト: chrishiam/LVSL
<?php

snippet('header');
foreach ($pages->visible() as $section) {
    snippet($section->uid(), array('data' => $section));
}
snippet('footer');
コード例 #28
0
ファイル: ajax.php プロジェクト: cnoss/fubix
<?php

// File with global functions
include 'assets/php/functions.php';
//include 'assets/php/functions-lumm.php';
$find = get('path') . "/" . get('id');
$find = preg_replace("=ajax/=", "", $find);
$container = $pages->find($find);
$template = get('template');
$idx = get('idx');
/*echo $find . "<hr>";
echo $template . "<hr>";
echo $container->title(); 
*/
// if no article could be found for that id…
if (!$container) {
    die('Invalid article ID');
}
// Zusaetzliche Klassen
$classes = get_additional_classes($container, $site);
// Bilder holen
$bilder = get_images_from_article($container);
// Dokumente holen
$docs = structhelper::get_documents_from_article($container);
// Snip holen
$template = atomicdesign::get_snip($container->uid(), "default");
$template = atomicdesign::get_snip($container->intendedTemplate(), $template);
snippet($template, array('content' => $container, 'snippet' => $template, 'class' => $container->layout(), 'bilder' => $bilder, 'docs' => $docs, 'behavior_classes' => $classes["behavior_classes"], 'heading' => false));
コード例 #29
0
ファイル: default.php プロジェクト: afincato/lucameneghel
<?php

snippet('header');
?>

  <main>

    <div class="text">
      <h1><?php 
echo $page->title()->html();
?>
</h1>
      <?php 
echo $page->text()->kirbytext();
?>
    </div>

  </main>

<?php 
snippet('bottom');
コード例 #30
0
ファイル: nav.php プロジェクト: rafegoldberg/zazu
<nav class="nav <?php 
echo r(isset($class), $class);
?>
" data-view="nav">
	<?php 
snippet('components/nav.items', array("collection" => $site->pages(), "class" => 'nav'));
?>
</nav>