Пример #1
0
 public function putreplycomment()
 {
     $inputdetails['comment_id'] = $_GET['comment_id'];
     $inputdetails['replycomment'] = $_GET['replycmt'];
     $curdate = date('Y-m-d h:i:s');
     $inputdetails['createddate'] = $curdate;
     $inputdetails['user_id'] = Auth::user()->ID;
     $participant_id = $_GET['participant_id'];
     $contest_id = $_GET['contest_id'];
     $save = replycommentModel::create($inputdetails);
     if ($save) {
         return Redirect::to("contest_info/" . $contest_id)->with('tab', 'gallery')->with('gallerytype', 'comment')->with('viewcommentforparticipant', $participant_id)->with('Massage', 'Reply Comment added successfully');
     }
 }
Пример #2
0
 public function takeactionforreport()
 {
     $contestparticipantid = Input::get('contestparticipantid');
     $contest_id = Input::get('contest_id');
     $contest_partipant_id = Input::get('contest_partipant_id');
     if ($contestparticipantid != '') {
         $comment = commentModel::select('id')->where('contest_participant_id', $contestparticipantid)->get();
         for ($i = 0; $i < count($comment); $i++) {
             $replycmt = replycommentModel::where('comment_id', $comment[$i]['id'])->get()->count();
             if ($replycmt) {
                 replycommentModel::where('comment_id', $comment[$i]['id'])->delete();
             }
         }
         if (count($comment)) {
             commentModel::select('id')->where('contest_participant_id', $contestparticipantid)->delete();
         }
         $votingcnt = votingModel::where('contest_participant_id', $contestparticipantid)->get()->count();
         if ($votingcnt) {
             votingModel::where('contest_participant_id', $contestparticipantid)->delete();
         }
         $participantid = contestparticipantModel::where('ID', $contestparticipantid)->get()->count();
         if ($participantid) {
             $delete = contestparticipantModel::where('ID', $contestparticipantid)->delete();
             $data['message'] = 'That Contest participant details removed successfully';
         } else {
             $data['message'] = 'That Contest participant details already removed';
         }
         $reportflagcnt = reportflagModel::where('contest_participant_id', $contestparticipantid)->get()->count();
         $inputdetails['action_taken'] = 1;
         if ($reportflagcnt) {
             reportflagModel::where('contest_participant_id', $contestparticipantid)->update($inputdetails);
         }
         if ($contest_partipant_id == "") {
             return Redirect::to('contest_info/' . $contest_id)->with('data', $data)->with('tab', 'gallery');
         } else {
             $data['message'] = 'Action taken for this report';
             return Redirect::to('reportlist')->with('data', $data);
         }
     }
 }
Пример #3
0
        echo $commentcnt[$i]['comment_id'];
        ?>
 >
                                        <textarea  id="cmt_<?php 
        echo $i;
        ?>
" name="cmt" value="" class="full_cmt" placeholder="Reply for the comment"></textarea>

                                        <input type="button" value="Submit" id="replycmt_<?php 
        echo $i;
        ?>
" class="cmt_btn submit replycmtsub"  >
                                    </div>
        <?php 
        $replycmtcnt = replycommentModel::select('user.profilepicture', 'user.firstname', 'user.lastname', 'user.username', 'replycomment.replycomment')->where('comment_id', $commentcnt[$i]['comment_id'])->LeftJoin('user', 'user.ID', '=', 'replycomment.user_id')->get()->count();
        $replycmt = replycommentModel::select('user.profilepicture', 'user.firstname', 'user.lastname', 'user.username', 'replycomment.replycomment')->where('comment_id', $commentcnt[$i]['comment_id'])->LeftJoin('user', 'user.ID', '=', 'replycomment.user_id')->get();
        if ($replycmtcnt) {
            for ($j = 0; $j < count($replycmt); $j++) {
                ?>


                                            <table width="98%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="70" align="center" style="background:url(img/reply_right.png) no-repeat top right; min-width:70px;"><img src="{{ ($replycmt[$j]['profilepicture']!='')?(URL::to('public/assets/upload/profile/'.$replycmt[$j]['profilepicture'])):(URL::to('assets/inner/images/avator.png')) }}" width="50" height="50" class="roundedimg brd_grn"><br>
                                                        <div class="cmt_uname radius"><?php 
                if ($replycmt[$j]['firstname'] == '') {
                    echo $replycmt[$j]['username'];
                } else {
                    echo $replycmt[$j]['firstname'] . ' ' . $replycmt[$j]['lastname'];
                }
                ?>
 public function getreplycomments()
 {
     $comment_id = Input::get('comment_id');
     $user_id = Input::get('user_id');
     $getreplycnt = replycommentModel::where('comment_id', $comment_id)->get()->count();
     if ($getreplycnt) {
         $getreply = replycommentModel::select('user.username', 'user.firstname', 'user.lastname', 'user.profilepicture', 'replycomment.comment_id', 'replycomment.replycomment', 'replycomment.user_id')->where('comment_id', $comment_id)->LeftJoin('user', 'user.ID', '=', 'replycomment.user_id')->get();
         for ($i = 0; $i < count($getreply); $i++) {
             if ($getreply[$i]['firstname'] != '') {
                 $getreply[$i]['name'] = $getreply[$i]['firstname'] . ' ' . $getreply[$i]['lastname'];
             } else {
                 $getreply[$i]['name'] = $getreply[$i]['username'];
             }
             if ($getreply[$i]['profilepicture'] != '') {
                 $getreply[$i]['profilepicture'] = url() . '/public/assets/upload/profile/' . $getreply[$i]['profilepicture'];
             }
         }
         $Response = array('success' => '1', 'message' => 'Reply Fetched Successfully', 'msgcode' => "c163");
         $final = array("response" => $Response, "replydata" => $getreply);
         return json_encode($final);
     } else {
         $Response = array('success' => '0', 'message' => 'No reply Comments Available in this record', 'msgcode' => "c164");
         $final = array("response" => $Response);
         return json_encode($final);
     }
 }
 public function getreplycomments()
 {
     $comment_id = Input::get('comment_id');
     $user_id = Input::get('user_id');
     $getreplycnt = replycommentModel::where('comment_id', $comment_id)->get()->count();
     if ($getreplycnt) {
         $getreply = replycommentModel::where('comment_id', $comment_id)->get();
         $Response = array('success' => '0', 'message' => 'Reply Fetched Successfully');
         $final = array("response" => $Response, "replydata" => $getreply);
         return json_encode($final);
     } else {
         $Response = array('success' => '0', 'message' => 'No reply Comments Available in this record');
         $final = array("response" => $Response);
         return json_encode($final);
     }
 }