Advertisement
Guest User

Untitled

a guest
Feb 14th, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.72 KB | None | 0 0
  1. <div class="container" style="width: 600pt">
  2.     <div class="container-fluid" style="width: 600pt">
  3.         <div class="row-fluid">
  4.             <div class="span8">
  5.                 <?php
  6.                 $is_church_registered = $this->session->userdata('is_church_registered');
  7.                 $is_church_newly_registered = $this->session->userdata('is_church_newly_registered');
  8.                 $church_id = $this->session->userdata('church_id');
  9.                 $id = $this->session->userdata('id');
  10.                     if ($is_church_registered == 'false') { ?>
  11.                     <div>
  12.                         You are not apart of any churches.
  13.                         Please <a href="<?=base_url()?>index.php/churchlocator/church_directory">click here</a> to find your church.
  14.                     </div>
  15.             <?php } elseif($is_church_registered == 'true' || $is_church_newly_registered == 'true') {
  16.                 echo '<input type="text" id="updater" style="font-size: 14pt; width: 500pt" placeholder="What\'s on your mind?" required /><div id="wall">';
  17.         $query = $this->db->query("SELECT * FROM default_wallposts wp, default_frontend_users u WHERE u.idusers = wp.creator_id AND wp.church_id = '$church_id' ORDER BY wp.id DESC LIMIT 200");
  18.  
  19.         foreach($query->result() as $row) { ?>
  20.             <article class="comment-body" style="width: 500pt; padding: 8pt">
  21.                 <footer class="comment-meta">
  22.                     <div class="comment-author">
  23.                         <?php
  24.                             $q1 = $this->db->query("SELECT * FROM default_church_repo cr INNER JOIN default_frontend_users u ON u.church_id = cr.crid WHERE u.idusers = '$row->creator_id'");
  25.                             $row1 = $q1->row();
  26.                             if ($row1->account_type == 'Overseer') {}
  27.                             if ($row1->account_type == 'Regular Member') {
  28.                                 echo '<img alt="" src="'.base_url().$row->defaultImgURI.'">';
  29.                             }
  30.                         ?>
  31.                         </div>
  32.  
  33.                     <div class="comment-metadata">
  34.                         <a href="" style="text-decoration: none">
  35.                             <span class="large-font" style="font-family: Bitter, Georgia, serif">
  36.                             <?php
  37.                             $q2 = $this->db->query("SELECT * FROM default_church_repo cr INNER JOIN default_frontend_users u ON u.church_id = cr.crid WHERE u.idusers = '$row->creator_id'");
  38.                             $row1 = $q2->row();
  39.                             if ($row1->account_type == 'Overseer') {
  40.                                 echo $row1->church_name;
  41.                                 //echo '<img align="right" src="'.base_url().'assets/img/church-icon.png"/>';
  42.                             }
  43.                             if ($row1->account_type == 'Regular Member') {
  44.                                 echo $row->firstname.' '.$row->lastname;
  45.                             }
  46.                             ?></span>
  47.                         </a>
  48.                                             </div>
  49.  
  50.                                     </footer>
  51.  
  52.                 <div class="comment-content" style="font-family: Helvetica Neue, Helvetica, Helvetica, Arial, sans-serif">
  53.                     <?=$row->content?>
  54.                     <br>
  55.                     <span class="actions" style="display: none">
  56.                     <i class="fa fa-thumbs-o-up">
  57.                     <?php
  58.                         $q3 = $this->db->query("SELECT * FROM default_post_likes
  59.                                                 WHERE post_id = $row->id");
  60.                         $row2 = $q3->row();
  61.                         if ($row2->post_id == $row->id) {
  62.                             echo 'Unlike';
  63.                         } else {
  64.                             echo '<a class="like" posterid="'.$row->creator_id.'" postid="'.$row->id.'" href="javascript:void(0)">Like</a>';
  65.                         }
  66.                     ?>
  67.                     </i>
  68.                     &nbsp;&nbsp;
  69.                     <i class="fa fa-mail-reply-all">
  70.                         <a href="#">Reply</a>
  71.                     </i>
  72.                     &nbsp;&nbsp;
  73.                     <i class="fa fa-comments">
  74.                         <a href="javascript:void(0)">View Comments</a>
  75.                     </i>
  76.                    
  77.                     &nbsp;&nbsp;
  78.                     <i class="fa fa-arrow-circle-o-right">
  79.                         <a href="javascript:void(0)">View Likes</a>
  80.                     </i>
  81.                     <?php if ($row->idusers == $this->session->userdata('id')) { ?>
  82.                     &nbsp;&nbsp;
  83.                     <i class="fa fa-times">
  84.                         <a class="delete" postid="<?=$row->id?>" href="javascript:void(0)">Delete</a>
  85.                     </i>
  86.                     </span>
  87.                     <?php } else {} ?>
  88.                     <br>
  89.                 </div>
  90.             </article>
  91.         <?php
  92.         }
  93.            
  94.             } ?>
  95.             </div>
  96.             </div>
  97.  
  98.         </div>
  99.     </div>
  100. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement