示例#1
0
 public function withoutdeletstakeaction()
 {
     $contestparticipantid = Input::get('contestparticipantid');
     $reportflagid = Input::get('reportflagid');
     $reportflagcnt = reportflagModel::where('ID', $reportflagid)->get()->count();
     $inputdetails['action_taken'] = 1;
     if ($reportflagcnt) {
         reportflagModel::where('ID', $reportflagid)->update($inputdetails);
         $data['message'] = 'Action taken for this report';
         return Redirect::to('reportlist')->with('data', $data);
     }
 }
示例#2
0
                                <!----- Multi Select End --------->
                                </head>
                                <body >
                                    <!--Header-->
                                    <input type="hidden" id="sessionlanguage" value="<?php 
echo Session::get('language');
?>
">
                                        <div class="head_con">
                                            <div class="logo_con">
                                                <img src="{{ URL::to('assets/inner/img/DingDatt_logo_web1.png') }}" width="150" height="51">
                                            </div>
                                            <?php 
$admin = invitememberforgroupModel::where('group.createdby', Auth::user()->ID)->where('invitememberforgroup.invitetype', 'u')->LeftJoin('group', 'group.ID', '=', 'invitememberforgroup.group_id')->get()->count();
$user = invitememberforgroupModel::where('user_id', Auth::user()->ID)->where('invitetype', 'm')->get()->count();
$redflag = reportflagModel::where('action_taken', 0)->get()->count();
?>

                                            <div class="fright">
                                                <?php 
if (Auth::user()->ID == 1) {
    ?>
<div style="height:25px;"></div><?php 
}
?>
                                                <div class="noty fleft">
                                                    <?php 
if (Auth::user()->ID == 1) {
    ?>
                                                        <a href="<?php 
    echo url();
 function report()
 {
     $reporteddata = Input::get('reporteddata');
     $participantid = Input::get('participantid');
     $authuserid = Auth::user()->ID;
     $description = Input::get('');
     $participant_details = contestparticipantModel::select('user_id', 'contest_id')->where('ID', $participantid)->first();
     $inputdetails['contest_participant_id'] = $participantid;
     $inputdetails['report_description'] = $reporteddata;
     $inputdetails['report_userid'] = $authuserid;
     $inputdetails['postedby_userid'] = $participant_details['user_id'];
     $inputdetails['contest_id'] = $participant_details['contest_id'];
     $inputdetails['createddate'] = date('Y-m-d h:i:s');
     //reportflagModel::where()
     $validation = Validator::make($inputdetails, reportflagModel::$rules);
     if ($validation->passes()) {
         $created = reportflagModel::create($inputdetails);
         if ($created) {
             return 1;
         }
     }
 }
 function reportflag()
 {
     $reporteddata = Input::get('reporteddata');
     $participantid = Input::get('participantid');
     $authuserid = Input::get('user_id');
     $inputdetails['contest_participant_id'] = $participantid;
     $inputdetails['report_description'] = $reporteddata;
     $inputdetails['report_userid'] = $authuserid;
     $participant_details = contestparticipantModel::select('user_id', 'contest_id')->where('ID', $participantid)->first();
     $inputdetails['postedby_userid'] = $participant_details['user_id'];
     $inputdetails['contest_id'] = $participant_details['contest_id'];
     $inputdetails['createddate'] = date('Y-m-d h:i:s');
     //reportflagModel::where()
     //return $inputdetails;
     $validation = Validator::make($inputdetails, reportflagModel::$rules);
     if ($validation->passes()) {
         $created = reportflagModel::create($inputdetails);
         //if($created) return 1;
         $Response = array('success' => '1', 'message' => 'You are reported successfully', 'msgcode' => "c194");
         $final = array("response" => $Response);
         return json_encode($final);
     } else {
         $Response = array('success' => '0', 'message' => $validation->messages(), 'msgcode' => "c195");
         $final = array("response" => $Response);
         return json_encode($final);
     }
 }
示例#5
0
            <table class="display" cellspacing="0" width="100%" id="dd_group_list">
                <thead>
                    <tr>
                        <th>Action taken</th>
                        <th>Reported data</th>
                        <th>Contest name</th>
                        <th>Reported by</th>
                        <th>Posted by</th>
                        <th>Media</th> 
                        <th>View</th> 

                    </tr>
                </thead>
                <tbody>
                    <?php 
$reportdetails = reportflagModel::select('reportflag.contest_id', 'contestparticipant.dropbox_path', 'contestparticipant.uploadtopic', 'contestparticipant.user_id as participantuserid', 'contest.contesttype', 'reportflag.report_userid', 'contest.ID as contestid', 'reportflag.contest_participant_id', 'reportflag.ID as reportflagprimaryid', 'reportflag.action_taken', 'reportflag.postedby_userid', 'reportflag.report_description', 'contestparticipant.ID as contestpartipantid', 'contestparticipant.uploadfile')->LeftJoin('contestparticipant', 'contestparticipant.ID', '=', 'reportflag.contest_participant_id')->LeftJoin('contest', 'contest.ID', '=', 'contestparticipant.contest_id')->get();
for ($i = 0; $i < count($reportdetails); $i++) {
    $participantdetails = ProfileModel::select('firstname', 'lastname', 'username')->where('ID', $reportdetails[$i]['postedby_userid'])->get()->first();
    $reporteduserdetails = ProfileModel::select('firstname', 'lastname', 'username')->where('ID', $reportdetails[$i]['report_userid'])->get()->first();
    $contestname = contestModel::select('contest_name')->where('ID', $reportdetails[$i]['contest_id'])->first();
    ?>
                        <tr>
                            <td><input type="checkbox" id="action_<?php 
    echo $reportdetails[$i]['contest_participant_id'];
    ?>
" name="action" onclick="action('<?php 
    echo $reportdetails[$i]['contest_participant_id'];
    ?>
', '<?php 
    echo $reportdetails[$i]['reportflagprimaryid'];
    ?>