-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patholdnews.php
More file actions
148 lines (112 loc) · 3.41 KB
/
oldnews.php
File metadata and controls
148 lines (112 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?php
include_once 'bnav.php';
/* require_once 'config.php';
require __DIR__ . '/vendor/autoload.php';
const DEFAULT_PATH = '/NewsArticle';
$firebase = new \Firebase\FirebaseLib(DEFAULT_URL, DEFAULT_TOKEN); */
?>
<section id="aboutbrio">
<div class="container">
<div class="row">
<div class="text-center bgGFont opsix">NEWS</div>
<!-- <div class="arrow_box">
<h1 class="logo">css arrow please!</h1>
</div>-->
<div class="text-center meetbrio">WHAT'S NEW AT BRIO</div>
</div>
</div>
</section>
<!--HOME SECTION END -->
<section id="aboutus" class="arrow_box">
<div class="hidden-xs container">
<div class="row text-center pad-bottom">
<h4 class="brlineheight">Fair warning: This section may seem a bit flighty. We're constantly looking for ways to get involved in our community, share interesting tips and info, or give our awesome employees the recognition they deserve, so there's always something new for us to share with you here!
</h4>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-heading"> <span class="glyphicon glyphicon-list-alt"></span><b> NEWS AT BRIO</b></div>
<div class="panel-body">
<div class="row">
<div class="col-xs-12">
<ul id="nav">
<?php
$string = file_get_contents("NewsArticle.json");
$arrayj=json_decode($string,true);
//echo sizeof($arrayj);
$cnt=0;
foreach ($arrayj as $key =>&$value) {
echo "<li class='news-item' id="."><a href=#".$cnt."><strong>".$key."</strong></br>more...</a></li>";
$cnt+=1;
}//end of each
?>
</ul>
</div>
</div>
</div>
<div class="panel-footer"> </div>
</div>
</div>
<div class="col-md-9">
<div id="tab-content">
<?php
//$string = file_get_contents("NewsArticle.json");
//$arrayj=json_decode($string,true);
//echo sizeof($arrayj);
foreach ($arrayj as $key =>&$value) {
if($key=="2015-09-08T04:48:12 02:00")
{
echo "<div id=#".$key." >".array_values($value)[0]."</div>";
}
else
{
echo "<div id=#".$key." >".array_values($value)[0]."</div>";
}
}
?>
</div>
</div>
</div>
</div>
</section>
<script type="text/javascript">
$('#tab-content div').hide();
$('#tab-content div:first').show();
$(function () {
$("#nav").bootstrapNews({
newsPerPage: 3,
autoplay: false,
navigation:false,
onToDo: function () {
//console.log(this);
}
});
$('#nav li').click(function(event) {
$('#nav li a').removeClass("active");
$(this).find('a').addClass("active");
$('#tab-content div').hide();
var indexer = $(this).index(); //gets the current index of (this) which is #nav li
//var refid=$(this).find('a').attr('href');
//console.log($(this).html());
//console.log( $(refid).html());
//$(refid).find('a').addClass("active");
//$(refid).fadeIn();
//event.preventDefault();
//$(this).find('a').attr('href').fadeIn();
$('#tab-content div:eq(' + indexer + ')').fadeIn(); //uses whatever index the link has to open the corresponding box
// $(this).attr('id').fadeIn();
}); //end of click
});
</script>
<div class="container aboutbrio col-md-12">
<div class="row">
<div class="text-center bgGFont opsix"></div>
<div class="text-center meetbrio"></div>
</div>
</div>
<?php
include_once 'bfooter.php';
?>