<commit_before><!doctype html>
<!--[if lte IE 9]> <html class="lte-ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]-->
<head>
    <?php
        $title = "Feeds";
        //Including common head configuration
        include_once "head.php";
    ?>
    <!-- dropify -->
    <link rel="stylesheet" href="assets/skins/dropify/css/dropify.css">
</head>
<body class="disable_transitions sidebar_main_open sidebar_main_swipe">
    <!-- main header -->
    <?php
        include_once "menu-header.php";
    ?>
    <!-- main sidebar -->
    <?php
        include_once "sidebar.php";
    ?>

    <div id="page_content">
        <?php
            //forums
            $forums = church_forums();
            if(!empty($_GET['branch'])){
                $branchid = $_GET['branch'];
                $branch_data = get_branch($branchid);
                $branch_name = $branch_data['name'];

                $branch_representative = branch_leader($branchid, 'representative');

                
                

                ?>
                    <div id="page_content_inner">
                        <h3 class="heading_b uk-margin-bottom"><?php echo $churchname." - $"; ?></h3>
                    </div>
                <?php
            }else{
                ?>
                <div id="page_content_inner">
                    <h3 class="uk-margin-bottom">Feeds</h3>

                    <!-- Feedds input -->
                    <div class="uk-grid" data-uk-grid-margin="">
                        <div class="uk-margin-bottom uk-width-medium-2-3 uk-row-first">
                            <div class="md-card">
                                <div class="md-card-content">
                                	<form id="feed_create_form">
	                                    <div class="uk-form-row">
	                                       <textarea cols="30" rows="4" class="md-input feeds-textarea" id="post_content" placeholder="Something to tell the church?" required="required"></textarea>
	                                    </div>
	                                    <div class="uk-form-row">
	                                       <div class="uk-grid">
		                                       	<div class="uk-width-1-4">
		                                       		<div class="uk-form-file md-btn" style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0), 0 1px 2px rgba(0, 0, 0, 0);">
		                                       			<img src="gallery/upload_feed_icon.png">
						                                <input id="feeds_attachment_input" type="file" multiple>
						                            </div>
		                                       	</div>
                                                <div class="uk-width-1-2" id="feed-thumbnail-tpl-cont">
                                                    <div class="feed-thumbnail-upload" style="display: none;" id="feed-thumbnail-tpl">
                                                        <div class='thumb-title'>Here <i class="material-icons" style="cursor: pointer; position: relative;left: 170%">close</i></div>
                                                        <div class="thumb-content"></div>
                                                        <div class="thumb-toolbar">
                                                            <progress class="uk-progress feed_attachment_progress" value="10" max="100">
                                                            <div class="uk-griad">
                                                                <div class="uploaded-size"> 0MB</div>
                                                                <div class="total-size"> 100mb</div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
											    <div class="uk-width-1-4">
										    		<div style="position: absolute; right: 2%; bottom: 12%">
												    	<ul class="uk-list" style="list-style: none; display: inline-block; margin-right: 50px">
				                                       		<li style="list-style: none; display: inline-block;">
				                                       			<input type="radio" name="postTo" id="public_post" value="<?php echo $churchID; ?>" data-md-icheck required/>
				                                        		<label for="public_post" class="inline-label">Public</label>
				                                       		</li>
				                                       		<li style="list-style: none; display: inline-block;">
				                                       			<input type="radio" name="postTo" id="church_post" value="<?php echo $churchID ?>" data-md-icheck required/>
				                                        		<label for="church_post" class="inline-label">My church</label>
				                                       		</li>
				                                       	</ul>
                                                        <!-- <div class=""><img style="width: 72px; height: 72px" src="assets/img/rot_loader.gif"></div> -->
                                                        <span class="progress-cont display-none"><img src="assets/img/spinners/spinner_success.gif" alt="" width="32" height="32"></span>
				                                       	<button class="md-btn md-btn-primary" id="submit_feed" type="submit">Post</button>
				                                    </div>
											    </div>
	                                       </div>
	                                    </div>
	                                </form>
                                </div>
                            </div>
                        </div>
                        <div class="uk-margin-bottom uk-width-medium-1-3">
                            <div class="md-card">
                                <div class="md-card-content">
                                    <h3 class="heading_c uk-margin-medium-bottom">Filter Feeds</h3>
                                    <div class="">
                                        <p>
                                            <input type="radio" name="radio_demo" id="radio_demo_1" data-md-icheck />
                                            <label for="radio_demo_1" class="inline-label">Public</label>
                                        </p>
                                        <p>
                                            <input type="radio" name="radio_demo" id="radio_demo_2" data-md-icheck />
                                            <label for="radio_demo_2" class="inline-label">My church</label>
                                        </p>
                                        <h3 class="heading_c uk-margin-bottom">Forums</h3>
                                        <?php
                                            foreach ($forums as $key => $forum) {
                                                ?>
                                                    <p>
                                                        <input type="radio" name="radio_demo" id="radio_demo_2" data-md-icheck />
                                                        <label for="radio_demo_2" class="inline-label"><?php echo $forum['forumtitle'] ?></label>
                                                    </p>
                                                <?php
                                            }
                                        ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- POsted feeds -->
                    <div class="uk-grid" data-uk-grid-margin="">
                        <?php
                            $posts = getPosts($churchID);
                            foreach ($posts as $key => $post) {
                                $post_title = $post['title'];
                                $post_content = $post['content'];
                                $post_pdate = $post['postedDate'];
                                $post_likes = $post['nlikes'];
                                $post_comments = $post['ncomments'];

                                $post_attachments = json_decode($post['attachment'], true);
                                ?>
                                    <div class="uk-margin-bottom uk-width-medium-2-3 uk-width-1-1">
                                        <div class="md-card">
                                            <div class="md-card-content small-padding">
                                                <div class="blog_list_teaser" style="margin-bottom: 12px;">
                                                    <?php if(!empty($post_title)){
                                                        ?>
                                                        <h2 class="blog_list_teaser_title uk-text-truncate"><?php echo $post_title; ?></h2>
                                                        <?php
                                                    } ?>                                                    
                                                    <p>
                                                        <?php echo $post_content; ?>
                                                    </p>
                                                </div>
                                                <div class="media-container">
                                                    <?php
                                                        for($n=0; $n<count($post_attachments); $n++){
                                                            $attachment = $post_attachments[$n];
                                                            $ext = strtolower(pathinfo($attachment, PATHINFO_EXTENSION)); //extensin
                                                            if($ext == 'png' || $ext == 'jpg'){
                                                                ?>
                                                                    <img src="<?php echo $attachment; ?>" alt="" style="max-height: 300px" class="blog_list_teaser_image">
                                                                <?php
                                                            }else if($ext == 'mp3' || $ext == 'aac'){
                                                                //audio
                                                                ?>
                                                                    <audio src="<?php echo $attachment ?>" controls></audio>
                                                                <?php 
                                                            }
                                                            else if($ext == 'mp4'){
                                                                //video
                                                                ?>
                                                                    <video src="<?php echo $attachment ?>" controls></video>
                                                                <?php 
                                                            }<commit_msg>video fit<commit_after><!doctype html>
<!--[if lte IE 9]> <html class="lte-ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]-->
<head>
    <?php
        $title = "Feeds";
        //Including common head configuration
        include_once "head.php";
    ?>
    <!-- dropify -->
    <link rel="stylesheet" href="assets/skins/dropify/css/dropify.css">
</head>
<body class="disable_transitions sidebar_main_open sidebar_main_swipe">
    <!-- main header -->
    <?php
        include_once "menu-header.php";
    ?>
    <!-- main sidebar -->
    <?php
        include_once "sidebar.php";
    ?>

    <div id="page_content">
        <?php
            //forums
            $forums = church_forums();
            if(!empty($_GET['branch'])){
                $branchid = $_GET['branch'];
                $branch_data = get_branch($branchid);
                $branch_name = $branch_data['name'];

                $branch_representative = branch_leader($branchid, 'representative');

                
                

                ?>
                    <div id="page_content_inner">
                        <h3 class="heading_b uk-margin-bottom"><?php echo $churchname." - $"; ?></h3>
                    </div>
                <?php
            }else{
                ?>
                <div id="page_content_inner">
                    <h3 class="uk-margin-bottom">Feeds</h3>

                    <!-- Feedds input -->
                    <div class="uk-grid" data-uk-grid-margin="">
                        <div class="uk-margin-bottom uk-width-medium-2-3 uk-row-first">
                            <div class="md-card">
                                <div class="md-card-content">
                                	<form id="feed_create_form">
	                                    <div class="uk-form-row">
	                                       <textarea cols="30" rows="4" class="md-input feeds-textarea" id="post_content" placeholder="Something to tell the church?" required="required"></textarea>
	                                    </div>
	                                    <div class="uk-form-row">
	                                       <div class="uk-grid">
		                                       	<div class="uk-width-1-4">
		                                       		<div class="uk-form-file md-btn" style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0), 0 1px 2px rgba(0, 0, 0, 0);">
		                                       			<img src="gallery/upload_feed_icon.png">
						                                <input id="feeds_attachment_input" type="file" multiple>
						                            </div>
		                                       	</div>
                                                <div class="uk-width-1-2" id="feed-thumbnail-tpl-cont">
                                                    <div class="feed-thumbnail-upload" style="display: none;" id="feed-thumbnail-tpl">
                                                        <div class='thumb-title'>Here <i class="material-icons" style="cursor: pointer; position: relative;left: 170%">close</i></div>
                                                        <div class="thumb-content"></div>
                                                        <div class="thumb-toolbar">
                                                            <progress class="uk-progress feed_attachment_progress" value="10" max="100">
                                                            <div class="uk-griad">
                                                                <div class="uploaded-size"> 0MB</div>
                                                                <div class="total-size"> 100mb</div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
											    <div class="uk-width-1-4">
										    		<div style="position: absolute; right: 2%; bottom: 12%">
												    	<ul class="uk-list" style="list-style: none; display: inline-block; margin-right: 50px">
				                                       		<li style="list-style: none; display: inline-block;">
				                                       			<input type="radio" name="postTo" id="public_post" value="<?php echo $churchID; ?>" data-md-icheck required/>
				                                        		<label for="public_post" class="inline-label">Public</label>
				                                       		</li>
				                                       		<li style="list-style: none; display: inline-block;">
				                                       			<input type="radio" name="postTo" id="church_post" value="<?php echo $churchID ?>" data-md-icheck required/>
				                                        		<label for="church_post" class="inline-label">My church</label>
				                                       		</li>
				                                       	</ul>
                                                        <!-- <div class=""><img style="width: 72px; height: 72px" src="assets/img/rot_loader.gif"></div> -->
                                                        <span class="progress-cont display-none"><img src="assets/img/spinners/spinner_success.gif" alt="" width="32" height="32"></span>
				                                       	<button class="md-btn md-btn-primary" id="submit_feed" type="submit">Post</button>
				                                    </div>
											    </div>
	                                       </div>
	                                    </div>
	                                </form>
                                </div>
                            </div>
                        </div>
                        <div class="uk-margin-bottom uk-width-medium-1-3">
                            <div class="md-card">
                                <div class="md-card-content">
                                    <h3 class="heading_c uk-margin-medium-bottom">Filter Feeds</h3>
                                    <div class="">
                                        <p>
                                            <input type="radio" name="radio_demo" id="radio_demo_1" data-md-icheck />
                                            <label for="radio_demo_1" class="inline-label">Public</label>
                                        </p>
                                        <p>
                                            <input type="radio" name="radio_demo" id="radio_demo_2" data-md-icheck />
                                            <label for="radio_demo_2" class="inline-label">My church</label>
                                        </p>
                                        <h3 class="heading_c uk-margin-bottom">Forums</h3>
                                        <?php
                                            foreach ($forums as $key => $forum) {
                                                ?>
                                                    <p>
                                                        <input type="radio" name="radio_demo" id="radio_demo_2" data-md-icheck />
                                                        <label for="radio_demo_2" class="inline-label"><?php echo $forum['forumtitle'] ?></label>
                                                    </p>
                                                <?php
                                            }
                                        ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- POsted feeds -->
                    <div class="uk-grid" data-uk-grid-margin="">
                        <?php
                            $posts = getPosts($churchID);
                            foreach ($posts as $key => $post) {
                                $post_title = $post['title'];
                                $post_content = $post['content'];
                                $post_pdate = $post['postedDate'];
                                $post_likes = $post['nlikes'];
                                $post_comments = $post['ncomments'];

                                $post_attachments = json_decode($post['attachment'], true);
                                ?>
                                    <div class="uk-margin-bottom uk-width-medium-2-3 uk-width-1-1">
                                        <div class="md-card">
                                            <div class="md-card-content small-padding">
                                                <div class="blog_list_teaser" style="margin-bottom: 12px;">
                                                    <?php if(!empty($post_title)){
                                                        ?>
                                                        <h2 class="blog_list_teaser_title uk-text-truncate"><?php echo $post_title; ?></h2>
                                                        <?php
                                                    } ?>                                                    
                                                    <p>
                                                        <?php echo $post_content; ?>
                                                    </p>
                                                </div>
                                                <div class="media-container">
                                                    <?php
                                                        for($n=0; $n<count($post_attachments); $n++){
                                                            $attachment = $post_attachments[$n];
                                                            $ext = strtolower(pathinfo($attachment, PATHINFO_EXTENSION)); //extensin
                                                            if($ext == 'png' || $ext == 'jpg'){
                                                                ?>
                                                                    <img src="<?php echo $attachment; ?>" alt="" style="max-height: 300px" class="blog_list_teaser_image">
                                                                <?php
                                                            }else if($ext == 'mp3' || $ext == 'aac'){
                                                                //audio
                                                                ?>
                                                                    <audio src="<?php echo $attachment ?>" controls></audio>
                                                                <?php 
                                                            }
                                                            else if($ext == 'mp4'){
                                                                //video
                                                                ?>
                                                                    <video src="<?php echo $attachment ?>" width='100%' controls></video>
                                                                <?php 
                                                            }
{'fraction_non_alphanumeric': 0.1099382418641321, 'fraction_numerical': 0.007402216284875827, 'mean_word_length': 0.6796880747443537, 'pattern_counts': {'":': 0, '<': 325, '<?xml version=': 0, '>': 323, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 324, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7105055', 'n_tokens_mistral': 4797, 'n_tokens_neox': 4288, 'n_words': 846}