<?php session_start(); if (isset($_POST['submit'])) { include "dbconnection.php"; $story_comment_id = mysql_real_escape_string($_POST['story_comment_id']); $story_id = mysql_real_escape_string($_POST['story_id']); $rhymes = getStoryById($story_id); $rhyme = mysql_fetch_array($rhymes); $rhyme_seo = $rhyme['seo_story']; if (isset($_SESSION['user_id'])) { $comments = mysql_real_escape_string($_POST['comments']); updateStoryComment($story_comment_id, $story_id, $comments, $_SESSION['user_id']); header("location:kids-story-{$rhyme_seo}&comment#stories"); } elseif (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']; } $comments = mysql_real_escape_string($_POST['comments']); updateRhymecomment($rhyme_comment_id, $rhyme_id, $comments, $user_id); header("location:kids-story-{$rhyme_seo}&comment#stories"); } else { header("location:kids-story-{$rhyme_seo}&comment#rhymes"); } } else { header("location:kid-stories"); }
<div class="col-md-8"> <!-- MAP & BOX PANE --> <!-- /.box --> <!-- /.row --> <!-- TABLE: LATEST ORDERS --> <div class="box box-info"> <!-- /.box-header --> <div class="box-body"> <div class="table-responsive"> <!-- /.box-header --> <!-- form start --> <?php $story_id = mysql_real_escape_string($_REQUEST['id']); $result = getStoryById($story_id); $story = mysql_fetch_array($result); ?> <form role="form" method="post" action="doupdatestory.php" enctype="multipart/form-data"> <input type="hidden" name="story_id" value="<?php echo $story['story_id']; ?> "> <div class="form-group"> <label for="exampleInputEmail1">Story Name</label> <input type="story_name" name="story_name" class="form-control" id="exampleInputEmail1" placeholder="Enter story name" value="<?php echo $story['story_name']; ?> "> </div>
<?php session_start(); if (isset($_POST['submit'])) { include "dbconnection.php"; $story_id = mysql_real_escape_string($_POST['story_id']); $stories = getStoryById($story_id); $story = mysql_fetch_array($stories); $seo_story = $story['seo_story']; if (isset($_SESSION['user_id'])) { $comments = mysql_real_escape_string($_POST['comments']); addStorycomment($story_id, $comments, $_SESSION['user_id']); $base_url = "http://thefunkids.com/admin"; $subject = "Comments on Stories for Moderation"; $from = "*****@*****.**"; $to = "*****@*****.**"; $mail_body = "Dear All,<br/><br/> A comment has been posted on our website TheFunKids.com and is pending approval. Kindly review and <br /><br /> moderate whether the comment should be posted or not.<br /><br /><br/>Login Url:<a href=" . $base_url . ">" . $base_url . "</a><br/><br/><strong>User Name:</strong>admin@thefunkids.com<br><strong>Password:</strong>admin123<br/></br>Regards & Love<br/><br/>The Fun Kids Team"; $body = wordwrap($mail_body, 2000); //$body_user = wordwrap($mail_body_user,70); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= "From: " . $from . "\r\n"; $headers .= 'Bcc:raheelaslam@golive.com.pk,amohsin@golive.com.pk,saher@golive.com.pk' . "\r\n"; //------------------------Thanks You Email------------------------------------------------------------------- mail($to, $subject, $mail_body, $headers); header("location:kids-story-{$seo_story}&comment#stories"); } else { if (isset($_SESSION['FBID'])) { $user_facebook_id = getUserByFaceBookId($_SESSION['FBID']); if ($user_facebook_id) { $face_book_user = mysql_fetch_array($user_facebook_id);
?> <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"; ?> <?php $story_id = $_REQUEST['id']; $rhymedetails = getStoryById($story_id); $detailrhyme = mysql_fetch_array($rhymedetails); ?> <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-10"> <div class="row"> <div class="col-lg-6"> <?php echo $rhyme_detail['story_code']; ?>
<?php $request = $_POST['request']; switch ($request) { case 15: $cat = $_POST['cat']; echo getStories($cat); break; case 30: $cat = $_POST['cat']; $id = $_POST['id']; echo getStoryById($id, $cat); break; } function getURLOptions($file_to_open) { $urlData = array(); $x = array(); $y = array(); $height = array(); $width = array(); $k = array(); $b = array(); $file = fopen($file_to_open, "r"); while (!feof($file)) { $line = fgets($file); $read_line = explode('x=', $line); $read_line = explode('&y=', $read_line[1]); array_push($x, $read_line[0]); $read_line = explode('&height=', $read_line[1]); array_push($y, $read_line[0]);