/
edit-puzzle_comment.php
268 lines (251 loc) · 9.81 KB
/
edit-puzzle_comment.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
<?php
session_start();
if(isset($_GET['id']))
{
include("dbconnection.php");
$puzzle_id=$_GET['id'];
$rhyme_details= getPuzzleById($_GET['id']);
$puzzle= mysql_fetch_array($rhyme_details);
}else
{
header("location:kid-puzzles-games");
}
?>
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="<?php echo $puzzle['meta_tag_keyword']; ?>" name="keywords" />
<meta content="<?php echo $puzzle['meta_tag_description']; ?>" name="description"/>
<meta name="robots" content="noindex">
<title><?php echo $puzzle['puzzle_title']; ?></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/styletwo.css"/>
</head>
<body>
<?php include_once("analyticstracking.php"); ?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.4&appId=481352955356475";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<?php include( "includes/header.php"); ?>
<div class="container-fluid">
<div class="row"> <img src="images/cloud-1.png" alt="" class="cloud"/> </div>
</div>
<section class="sec1">
<div class="container">
<div class="row">
<div class="col-lg-12"> <div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1140" height="500" id="PUZZLE TWO" align="middle">
<param name="movie" value="funkid-puzzles/puzzle_files/<?php echo $puzzle['puzzle_file']; ?>" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="funkid-puzzles/puzzle_files/<?php echo $puzzle['puzzle_file']; ?>" width="1140" height="500">
<param name="movie" value="funkid-puzzles/puzzle_files/<?php echo $puzzle['puzzle_file']; ?>" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div> </div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="share-video">
<div class="row">
<div class="col-lg-9">
<h2>Share This Video</h2>
</div>
<div class="col-lg-3">
<a href="javascript:;"><img src="images/icon-twitter.png" alt="" class=""/></a>
<a href="javascript:;"><img src="images/icon-pintest.png" alt="" class=""/></a>
<a href="javascript:;"><img src="images/icon-instagram.png" alt="" class=""/></a>
<a href="javascript:;"><img src="images/icon-gplus.png" alt="" class=""/></a>
<a href="javascript:;"><img src="images/icon-fb.png" alt="" class=""/></a> </div>
</div>
</div>
</div>
</div>
<?php
if(!isset($_SESSION['user_id']))
{
?>
<div class="row">
<div class="col-lg-12">
<div class="leave-comment">
<div class="row">
<div class="col-lg-9 col-sm-4">
<h2>Leave A Comment<br/>
<span>You need to log in for commenting</span> </h2>
</div>
<div class="col-lg-3 col-sm-4"> <a href="javascript;" class="btn-coment sign-up">SIGN UP</a> <a href="javascript;" class="btn-coment sign-in">LOG IN</a> </div>
</div>
</div>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="col-lg-12">
<div class="comment-wrap">
<a name="puzzles"> </a>
<?php
if(isset($_REQUEST['comment']))
{
?>
<p class="text-center modiration">Your Comment Waiting For Moderation ...</p>
<?php
}
?>
<?php
if(isset($_REQUEST['error']))
{
?>
<p class="text-center modiration">Please Login for comments</p>
<?php
}
?>
<?php
$puzzle_comment_id=$_REQUEST['puzzle_comment_id'];
$rhyme_comments_view= getPuzzleCommentById($puzzle_comment_id);
$rhyme_comment_view= mysql_fetch_array($rhyme_comments_view);
?>
<form method="post" action="doeditpuzzlecoment.php">
<input type="hidden" name="puzzle_comment_id" value="<?php echo $puzzle_comment_id; ?>"/>
<input type="hidden" name="puzzle_id" value="<?php echo $puzzle_id; ?>"/>
<textarea name="comments" id="comments" cols="" rows=""><?php echo $rhyme_comment_view['comments']; ?></textarea>
<a href="#puzzles"><input type="submit" name="submit" value="POST A COMMENT" class="btn-coment sign-in"></a>
</form>
<div class="clearfix"></div>
<div class="discus">
<?php
$rhyme_comment=getApprovePuzzlesComment($puzzle_id);
if($rhyme_comment>0)
{
while($rhymecomment= mysql_fetch_array($rhyme_comment))
{
$user_id=$rhymecomment['user_id'];
$user_comment= getUserById($user_id);
while($user= mysql_fetch_array($user_comment))
{
?>
<div class="action">
<h4>
<?php
echo $user['name'];
?>
</h4>
<br/>
<?php
if($user['userimages']!='')
{
?>
<img src="userimages/<?php echo $user['userimages']; ?>" alt="" width="70" height="70"/>
<?php
}elseif(isset($_SESSION['FBID']))
{
?>
<img src="https://graph.facebook.com/<?php echo $user['Fuid'] ?>/picture" width="70" height="70">
<?php
}else{
?>
<img src="images/user-avatar.png" alt=""/>
<?php
}
?>
<p><?php echo $rhymecomment['comments']; ?>
<br/><?php if($rhymecomment['isActive']=='no'){ echo"your comments are pending and waiting for approval"; }?> </p>
<div class="clearfix"></div>
<?php
if(isset($_SESSION['user_id']))
{
if($_SESSION['user_id']==$rhymecomment['user_id'])
{
?>
<div class="share"> <a href="edit-puzzle_comment.php?id=<?php echo $puzzle_id; ?>&puzzle_comment_id=<?php echo $rhymecomment['puzzle_comment_id']; ?>">Edit |</a> <a href="delete-puzzle-comment.php?id=<?php echo $rhymecomment['puzzle_comment_id']; ?>&puzzle_id=<?php echo $puzzle_id; ?>">Delete</a> </div>
<?php
}
}
?>
<?php
if(isset($_SESSION['FBID']))
{
$user_facebook_id=getUserByFaceBookId($_SESSION['FBID']);
if($user_facebook_id){
$face_book_user= mysql_fetch_array($user_facebook_id);
$user_id=$face_book_user['user_id'];
}
if($user_id==$rhymecomment['user_id'])
{
?>
<div class="share"> <a href="edit-puzzle_comment.php?id=<?php echo $puzzle_id; ?>&puzzle_comment_id=<?php echo $rhymecomment['puzzle_comment_id']; ?>">Edit |</a> <a href="delete-puzzle-comment.php?id=<?php echo $rhymecomment['puzzle_comment_id']; ?>&puzzle_id=<?php echo $puzzle_id; ?>">Delete</a> </div>
<?php
}
}
?>
<!-- <div><a href="edit-rhyme_comment.php?id=<?php //echo $rhyme_id; ?>&rhyme_comment_id=<?php // echo $rhymecomment['rhyme_comment_id']; ?>">Edit</a> <a href="delete-rhyme_comment.php?id=<?php //echo $rhymecomment['rhyme_comment_id']; ?>&rhyme_id=<?php //echo $rhyme_id; ?>">Delete</a></div>
-->
<br>
<div class="clearfix"></div>
</div>
<?php
}
}
}
?>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3"> <img src="images/right-page.jpg" alt="" class="img-responsive"/> </div>
<div class="col-lg-9">
<div class="red-bg">
<div class="row">
<div class="col-lg-3"> <img src="images/puzzle-collage.jpg" alt="" class=""/> </div>
<div class="col-lg-9">
<p>Welcome to Fun Kids, we bring exciting rhymes, games, puzzles and stories for your little angels. Along with Kids section, we have discussion forums and other activities related to Moms and parenting.To make your journey more exciting with us, we come up with monthly contest and sweepstakes, where you can participate and win super mom gifts from us. We hope your journey with us will be refreshing and full of fun, do login daily to catch any surprise gifts coming your way. parenting.To make your journey more exciting with us, we come up with monthly contest and sweepstakes, where you can participate and win super mom gifts from us. We hope your journey with us will be refreshing and full of fun, do login daily to catch any surprise gifts coming your way.will be refreshing and full of fun, do login daily to catch any surprise gifts coming your way.</p>
</div>
</div>
</div>
</div>
</div>
<?php include "rhymes-stories-puzzles-games.php"; ?>
</div>
</section>
<div class="container-fluid">
<div class="row"> <img src="images/cloud-2.png" alt="" class="cloud"/> </div>
</div>
<?php include "includes/footer.php"; ?>
</body>
</html>