Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.25 KB | None | 0 0
  1. <?php
  2. if(!$banner['show']){ ?>
  3. <div style="margin-top: 10px;"><br/></div>
  4. <?php }
  5. ?>
  6. <section style="margin-top: 58px; margin-bottom: 100px;">
  7.  
  8. <?php
  9. if($banner['show']){
  10. $this->load->view('form/public/banner',$banner);
  11. }?>
  12.  
  13. <div class="container">
  14. <div class="row" style=" display: flex;
  15. flex-wrap: wrap;">
  16.  
  17. <?php if($keyword): ?>
  18.  
  19. <div class="col-12">
  20. <h4>Result of "<?=urldecode($keyword)?>"</h4><br/>
  21. </div>
  22.  
  23. <?php else: ?>
  24.  
  25. <?php if($show=="all"): ?>
  26. <div class="col-12">
  27. <h4>Semua Produk</h4><br/>
  28. </div>
  29. <?php endif; ?>
  30.  
  31. <?php endif; ?>
  32.  
  33.  
  34. <!-- <div class="col-lg-12">-->
  35. <!-- <h3>Sedang Pre-order</h3><br/>-->
  36. <!-- </div>-->
  37.  
  38. <?php foreach($form as $row):
  39.  
  40. $show=true;
  41.  
  42. if($row['start_date']!="0000-00-00"){
  43. if(strtotime('today') < strtotime($row['start_date'])){
  44. $show=false;
  45. }
  46. }
  47.  
  48. if($row['close_date']!="0000-00-00"){
  49. if(strtotime('today') > strtotime($row['close_date'])){
  50. $show=false;
  51. }
  52. }
  53.  
  54. $showAlways=true;
  55.  
  56. if($showAlways):
  57.  
  58. ?>
  59.  
  60. <div class="col-lg-4 shadow" style="display: flex;
  61. flex-direction: column;" >
  62. <div class="card" style=" flex: 1;">
  63. <a href="<?=base_url("detail/".$row['slug'])?>">
  64.  
  65. <?php
  66. $featuredImage = pathinfo($row['featured_image']);
  67. $ext = $featuredImage['extension'];
  68. $filenameThumb = $featuredImage['dirname']."/".$featuredImage['filename']."_thumb.".$ext;
  69.  
  70. $featuredImage=$row['featured_image'];
  71. if(file_exists('.'.$filenameThumb)){
  72. $featuredImage=$filenameThumb;
  73. }
  74. ?>
  75.  
  76. <img class="card-img-top" src="<?=base_url($featuredImage)?>" alt="<?=$row['group_name']?>">
  77. </a>
  78. <div class="card-body">
  79.  
  80. <?php if($show): ?>
  81. <a href="<?=base_url("detail/".$row['slug'])?>" class="btn btn-bluepop" style="margin-top: 10px; border-radius: 30px; padding-left: 30px; padding-right: 30px; padding-top: 7px;padding-bottom: 9px;">Beli Sekarang
  82. </a><br/>
  83. <?php if($row['close_date']!="0000-00-00"): ?>
  84. <small class="text-muted">Dibuka sampai <?=dateFormatMonthName($row['close_date'])?></small>
  85. <?php endif; ?>
  86. <?php else: ?>
  87. <a href="<?=base_url("detail/".$row['slug'])?>" class="btn btn-bluepop" style="margin-top: 10px; border-radius: 30px; padding-left: 30px; padding-right: 30px; padding-top: 7px;padding-bottom: 9px;">Detail</a>
  88. <br/>
  89. <small class="text-muted">Pemesanan sudah ditutup</small>
  90. <?php endif; ?>
  91.  
  92.  
  93. </div>
  94.  
  95. <!-- <div class="card-body">-->
  96. <!-- <a class="text-danger" href="--><?//=base_url("detail/".$row['slug'])?><!--"><h5 class="card-title text-dangerpop">--><?//=$row['group_name']?><!--</h5></a>-->
  97. <!-- <p class="card-text">--><?//=$row['description_short']?><!--</p>-->
  98. <!-- </div>-->
  99.  
  100. <div class="card-footer d-none">
  101.  
  102. </div>
  103. </div><br/>
  104. </div>
  105.  
  106. <?php
  107. endif;
  108. endforeach; ?>
  109.  
  110.  
  111. <div class="col-12"><br/><br/>
  112. <?=$links?>
  113. </div>
  114.  
  115.  
  116. </div>
  117.  
  118.  
  119.  
  120. </div>
  121.  
  122. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement