コード例 #1
0
ファイル: ContentTest.php プロジェクト: microweber/microweber
 public function testNextPrev()
 {
     $params = array('title' => 'this is my test next prev post', 'content_type' => 'post', 'is_active' => 1);
     //saving
     $save_post1 = save_content($params);
     $save_post2 = save_content($params);
     $save_post3 = save_content($params);
     //getting
     $next = next_content($save_post1);
     $prev = prev_content($save_post2);
     $this->assertEquals($save_post2, $next['id']);
     $this->assertEquals($save_post1, $prev['id']);
     $next = next_content($save_post2);
     $prev = prev_content($save_post3);
     $this->assertEquals($save_post3, $next['id']);
     $this->assertEquals($save_post2, $prev['id']);
     $del1 = delete_content($save_post1);
     $del2 = delete_content($save_post2);
     $del3 = delete_content($save_post3);
     //PHPUnit
     $this->assertEquals(true, is_array($del1));
     $this->assertEquals(true, is_array($del2));
     $this->assertEquals(true, is_array($del3));
     $this->assertEquals(true, is_array($next));
 }
コード例 #2
0
ファイル: shop_inner.php プロジェクト: Staalkoper/templates
<?php

include TEMPLATE_DIR . "header.php";
$next = next_content();
$prev = prev_content();
?>
<div class="mw-wrapper" style="padding: 40px 0px;" id="product-holder-<?php 
print CONTENT_ID;
?>
">
    <div data-mw="main">
        <div class="mw-ui-row shop-product-row">
            <div class="mw-ui-col" style="width:55%">
                <div class="mw-ui-col-container">
                    <div class="item-box" id="product-page-gallery">
                        <module type="pictures" rel="content" template="product_gallery"/>
                    </div>
                </div>
            </div>
            <div class="mw-ui-col" style="width:45%">
                <div class="mw-ui-col-container">
                    <div class="product-description">
                        <div class="item-box pad">
                            <div class="mw-ui-row">
                                <div class="mw-ui-col">
                                    <module type="breadcrumb">
                                </div>
                                <div class="mw-ui-col" style="width: 70px;">
                                    <div class="next-previous-content">
                                        <?php 
if ($prev != false) {