-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.php
More file actions
175 lines (139 loc) · 6.4 KB
/
Copy pathblog.php
File metadata and controls
175 lines (139 loc) · 6.4 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php include("includes/header.php"); ?>
<?php include("includes/connection.php"); ?>
<?php include("includes/new_functions.php"); ?>
<header>
<div class="container"><a href="#" data-activates="nav-mobile" class="button-collapse top-nav waves-effect waves-light circle"><i class="mdi-navigation-menu"></i></a></div>
<ul id="nav-mobile" class="side-nav fixed text-white" style="background-color:">
<li class="logo" style="background-color:;"><a id="logo-container" href="http://allinism.in/" class="brand-logo" >
<img id="front-page-logo" style="width:100px;height:100px;" class="responsive-img" src="img/allin.png"></a></li>
<li class="bold" style=";"><a href="blog.php?genre=ism" class="list-group-item <?php if($sel_genre =='ism'){ echo "active" ;} ?>">Poems</a></li>
<li class="bold"><a href="blog.php?genre=complex" class="list-group-item <?php if($sel_genre =='complex'){ echo "active" ;} ?>">Travelogues</a></li>
<li class="bold"><a href="blog.php?genre=fantasy" class="list-group-item <?php if($sel_genre =='fantasy'){ echo "active" ;} ?>">Writings</a></li>
<li class="bold"><a href="blog.php?genre=batch" class="list-group-item <?php if($sel_genre =='batch'){ echo "active" ;} ?>">Batch'15 Moments</a></li>
<br /><br /><br />
<br /><br /><br />
<li class="bold"><a href="add_blog.php" class="btn waves-effect waves-light btn-small">Add your Blog</a></li>
</ul>
</header>
<main><div class="section" id="index-banner">
<div class="container">
<div class="row">
<div class="col s12 m9">
<h6 class="header center-on-small-only right-align"><a style="text-decoration:none;color:white" href="http://allinism.in/">Home</a></h6>
<h1 class="header center-on-small-only">Blogger's Hub</h1>
<?php
if(!isset($_GET['genre'])){
echo '<h4 class ="light red-text text-lighten-4 center-on-small-only">For the travelogue writers, the poets, the sports fanatics, the critics, the foodies ,chai-sutta debaters and the people whom I am failing to classify.
For freshers may come and pass-outs may go,
Blogs stay on forever!</h4>';}
?>
<br />
</div>
</div>
</div>
</div>
<br /><br /><br />
<div class="container">
<!-- Outer row -->
<div class="row">
<div class="section col s12 m9 l10">
<?php
if(isset($_GET['genre']))
{
$sel_genre = $_GET['genre'];
$article_set = get_blogs_sorted($sel_genre);
/*echo '<div class="panel panel-default">';
echo '<div class="panel-body">';
echo '<a style="text-decoration:none;" href="view_blog.php?id=' . $article['id'] . '" class=""><div style="color:brown;"><b>' . $article['title'] . '</b></a></div>';
echo '<div style="color:grey;font-size:10px;">' . $article['article_by'] . ' ' . $article['time'] . '</div><hr>';
echo '<div style="">' . substr((nl2br($article['content'])), 0, 300) . '..........</div>';
echo '<br /><a href="view_blog.php?id=' . $article['id'] . '" class="btn btn-xs btn-danger pull-right">Read More</a>';
echo '</div>';
echo '</div>';
*/
while($article = mysql_fetch_array($article_set))
{
if($sel_genre != 'batch')
{
echo '<div class="card blue-grey darken-1">';
echo '<div class="card-content white-text">';
echo '<span class="card-title">' . $article['title'] . '</span><div class="right white-text text-darken-3" >By: ' . $article['article_by'] . '</div>';
echo '<p>' . substr((nl2br($article['content'])), 0, 400) . '</p>';
echo '<div class="card-action">';
echo '<a href="view_blog.php?id=' . $article['id'] . '" class="right">Read More</a>';
echo '</div>';
echo '</div>';
echo '</div>';
}
else
{
echo '<div class="card blue-grey darken-1">';
echo '<div class="card-content white-text">';
echo '<span class="card-title">' . $article['title'] . '</span>';
echo '<p>' . nl2br($article['content']). '</p>';
echo '</div>';
echo '</div>';
}
}
}
?>
<?php
if(isset($_GET['add'])){
echo '<h5 class="green-text text-lighten-1">Thanks your article has been submitted, it will soon be reviewed and then posted.</h5>';
}
if(!isset($_GET['genre'])){
echo '<div class="row">';
echo '<div class="col s12 m9 l12">';
echo '<div class="card-panel teal">';
echo '<span class="white-text">Please select a category Form the left and Blog On';
echo '</span>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="row">';
echo '<div class="col s12 m12">';
echo '<div class="card blue-grey darken-1">';
echo '<div class="card-content white-text">';
echo '<span class="card-title">Share your Blog or Article</span>';
echo '<p>Let your blog reach the masses of ISM. Mail us the link of your blog or Send us your article through the below links. <br /> Happy Blogging ang Go All In</p>';
echo '</div>';
echo '<div class="card-action">';
echo '<a href="add_blog.php">Send Article</a>';
echo '<a href="#">Mail the link</a>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
?>
</div>
<!-- Table of contents -->
</div>
</div>
<br /><br /><br />
<br /><br /><br />
<br /><br /><br />
</main> <footer class="page-footer">
<div class="container" style="opacity:0;background-color:white">
<div class="row" style="opacity:0;background-color:white">
<div class="col l4 s12" style="opacity:0;background-color:#000000">
<br /><br />
<br /><br />
<br /><br />
<br /><br />
<br /><br />
</div>
<div class="col l4 s12">
</div>
<div class="col l4 s12" style="overflow: hidden;">
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
© 2014-2015 ALLinISM, All rights reserved.
<a class="grey-text text-lighten-4 right" href="http://allinism.in/">Go Home</a>
</div>
</div>
</footer>
<?php include("includes/footer.php"); ?>