/
momforum.php
360 lines (288 loc) · 10.7 KB
/
momforum.php
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
<?php
session_start();
include("dbconnection.php");
/*if(isset($_SESSION['userId']))
{
}else
{
header("location:index.php");
}*/
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Fun Kids</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap.css"/>
<link rel="stylesheet" href="css/style.css"/>
<link href="owl-carousel/owl.carousel.css" rel="stylesheet">
<link href="owl-carousel/owl.theme.css" rel="stylesheet">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"/>
<link type="text/css" rel="stylesheet" href="css/styleext.css" />
<link href="css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<link href="css/df.css" rel="stylesheet" type="text/css" />
<script>
function displayTopic()
{
//alert('a');
document.getElementById('top_id').style.display="block";
}
</script>
</head>
<body>
<header>
<div class="container first">
<div class="row row1">
<div class="col-md-12 border1">
<?php include("includes/header.php"); ?>
</div>
<!--</div>--><!--/*col-md-12 first*/-->
</div><!--/*row first*/-->
</div><!--container-fluid first-->
</header>
<section>
<div class="container-fluid">
<div class="row momrow">
<img src="images/BADAL1.png" class="momcloud"/></section>
</div>
</div>
<section class="momgradient">
<div class="container">
<div class="row">
<div class="col-md-12" style="border:#000 px solid;">
<div style="float:right;">
<a class="btn btn-sm btn-info btn-flat pull-left" onclick="displayTopic();" style=""><span style="color:#FFF; font-size:1.3em;">Add New Topic</span></a>
</div>
<?php
$topicresult=getAllTopics();
if($topicresult>0)
{
while($topics=mysql_fetch_array($topicresult))
{
?>
<div>
<div>
<a href="view_topic_detail.php?topic_id=<?php echo $topics['topic_id']; ?>">
<h1 style="color:#FF0; padding:0; font-size:3em; border:#000 px solid; width:50%; font-family:myfont; font-style:italic; letter-spacing:2px;">
ALPHABET FUN
<?php //echo $topics['topic_name']; ?>
</h1>
</a>
<div align="right" style="color:#fff; font-size:1.3em;">
<?php echo date("d-m-y", strtotime($topics['createdAt'])); ?>
</div>
<p style="color:#fff; border:#000 px solid; width:75%; font-size:1.3em; margin:0; padding:0;">
<?php echo $topics['topic_description']?>
</p>
</div>
</div>
<?php
}
}
?>
<div id="top_id" style="display: none;">
<div class="col-md-6">
<!-- general form elements -->
<div class="">
<h3 style="color:#FF0; border:#000 px solid; width:60%; font-family:myfont; font-style:italic; letter-spacing:2px;">ADD NEW TOPIC</h3>
<!-- /.box-header -->
<!-- form start -->
<form role="form" method="post" action="doaadtopic.php">
<div class="form-group">
<label for="exampleInputEmail1"><span style="color:#FFF; border:#000 px solid;">Topic name</span></label>
<input type="text" name="topic_name" placeholder="Enter email" id="exampleInputEmail1" class="form-control">
</div>
<br/>
<div class="form-group">
<label><span style="color:#FFF; border:#000 px solid;">DescriptionM</span></label>
<textarea class="form-control" rows="3" placeholder="Enter ..." name="topic_description"></textarea>
</div>
<!-- /.box-body -->
<div class="" style="background:none; border:#000 px solid;">
<input class="btn btn-success" type="submit" name="submit" value="Submit">
</div>
</form>
</div><!-- /.box -->
<!-- Form Element sizes -->
<!-- /.box -->
<!-- /.box -->
<!-- Input addon -->
<!-- /.box -->
</div>
</div>
</div>
</div>
</section>
<section>
<!--<div class="container-fluid">
<div class="row momrow">
<img src="images/BADAL11.png" class="momcloud"/></section>
</div>
</div>
--><section>
<?php
include("includes/footer.php");
?>
<footer>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/jquery.leanModal.min.js"></script>
<script type="text/javascript">
$("#modal_trigger").leanModal({top : 0, overlay : 0.6, closeButton: ".modal_close" });
$(function(){
// Calling Login Form
$("#login_form").click(function(){
$(".social_login").hide();
$(".user_login").show();
return false;
});
// Calling Register Form
$("#register_form").click(function(){
$(".social_login").hide();
$(".user_register").show();
$(".header_title").text('Register');
return false;
});
// Going back to Social Forms
$(".back_btn").click(function(){
$(".user_login").hide();
$(".user_register").hide();
$(".social_login").show();
$(".header_title").text('Login');
return false;
});
})
</script>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="owl-carousel/jquery-1.9.1.min.js"></script>
<script src="owl-carousel/owl.carousel.js"></script>
<script type="text/javascript" src="js/jssor.js"></script>
<script type="text/javascript" src="js/jssor.slider.js"></script>
<script>
jssor_slider1_starter = function (containerId) {
var _SlideshowTransitions = [
//Fade
{ $Duration: 1200, $Opacity: 2 }
];
var options = {
$AutoPlay: true,
$AutoPlaySteps: 1,
$AutoPlayInterval: 3000,
$PauseOnHover: 1,
$ArrowKeyNavigation: true,
$SlideDuration: 500,
$MinDragOffsetToSlide: 20,
$SlideSpacing: 0,
$DisplayPieces: 1,
$ParkingPosition: 0,
$UISearchMode: 1,
$PlayOrientation: 1,
$DragOrientation: 3,
$SlideshowOptions: {
$Class: $JssorSlideshowRunner$,
$Transitions: _SlideshowTransitions,
$TransitionsOrder: 1,
$ShowLink: true
},
$BulletNavigatorOptions: {
$Class: $JssorBulletNavigator$,
$ChanceToShow: 2,
$AutoCenter: 1,
$Steps: 1,
$Lanes: 1,
$SpacingX: 10,
$SpacingY: 10,
$Orientation: 1
},
$ArrowNavigatorOptions: {
$Class: $JssorArrowNavigator$,
$ChanceToShow: 2,
$Steps: 1
}
};
var jssor_slider1 = new $JssorSlider$(containerId, options);
function ScaleSlider() {
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
if (parentWidth)
jssor_slider1.$ScaleWidth(Math.min(parentWidth, 600));
else
$Jssor$.$Delay(ScaleSlider, 30);
}
ScaleSlider();
$Jssor$.$AddEvent(window, "load", ScaleSlider);
$Jssor$.$AddEvent(window, "resize", $Jssor$.$WindowResizeFilter(window, ScaleSlider));
$Jssor$.$AddEvent(window, "orientationchange", ScaleSlider);
//responsive code end
};
</script>
<script>
jssor_slider1_starter('slider1_container');
</script>
<script>
$(document).ready(function() {
$("#owl-demo").owlCarousel({
autoPlay: 2000,
items : 4,
itemsDesktop : [1199,3],
itemsDesktopSmall : [979,3]
});
});
</script>
<!--<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>-->
<script type="text/javascript">
$(function() {
var $form_wrapper = $('#form_wrapper'),
$currentForm = $form_wrapper.children('form.active'),
//the change form links
$linkform = $form_wrapper.find('.linkform');
$form_wrapper.children('form').each(function(i){
var $theForm = $(this);
if(!$theForm.hasClass('active'))
$theForm.hide();
$theForm.data({
width : $theForm.width(),
height : $theForm.height()
});
});
setWrapperWidth();
$linkform.bind('click',function(e){
var $link = $(this);
var target = $link.attr('rel');
$currentForm.fadeOut(400,function(){
//remove class active from current form
$currentForm.removeClass('active');
//new current form
$currentForm= $form_wrapper.children('form.'+target);
//animate the wrapper
$form_wrapper.stop()
.animate({
width : $currentForm.data('width') + 'px',
height : $currentForm.data('height') + 'px'
},500,function(){
//new form gets class active
$currentForm.addClass('active');
//show the new form
$currentForm.fadeIn(400);
});
});
e.preventDefault();
});
function setWrapperWidth(){
$form_wrapper.css({
width : $currentForm.data('width') + 'px',
height : $currentForm.data('height') + 'px'
});
}
$form_wrapper.find('input[type="submit"]')
.click(function(e){
e.preventDefault();
});
});
</script>
</footer>
</body>
</html>