function listDoReviewsByTime($inuser) { $reviews = array(); $dbhandle = db_connect(); $query = "SELECT RatingID FROM DoRatings WHERE ResponderID={$inuser} ORDER BY TimeStamp"; $result = $dbhandle->query($query); while ($row = $result->fetch_array()) { $newreview = new review(); $newreview->getFromDBDoer($row['RatingID']); array_push($reviews, $newreview); } $dbhandle->close(); return $reviews; }
/** * Get the total file usage * @param bool $user * @return int */ function getFileUsage($user = false) { $total = 0; if (!empty($user)) { $search = ['user' => $user]; } else { $search = []; } if ($reviews = review::get($search, [], 9999, 0)) { foreach ($reviews as $review) { /* @var review $review */ if ($review instanceof review) { if ($attachments = $review->getAttachments()) { foreach ($attachments as $attachment) { $total += $attachment['length']; } } } } } return $total; }
<?php if (!$user || $user->type != "citizen") { die(json_encode(array("status" => "login_required"))); } if (isset($_POST["elected"]) && isset($_POST["text"])) { $elected = new elected($_POST["elected"]); if (!$elected->isvalid) { die(json_encode(array("status" => "invalid_elected"))); } review::create($_POST["text"], $elected, session::last_general_meeting()); die(json_encode(array("status" => "success"))); } else { die(json_encode(array("status" => "parameter_required"))); }
public function deleteReview(Request $data) { $userid = Auth::user()->id; if ($data->isMethod('post')) { $reviewid = $data->input('deletereviewid'); $reportid = $data->input('deletereportid'); $objReview = new review(); $result = $objReview->deleteReview($reviewid); if ($result) { return Redirect::back(); } else { return Redirect::back()->withErrors(['errMsg' => 'Not Deleted']); } } }
} if (!isset($_SESSION['userid'])) { die; } $error = array(); //get the task info $task = new task(); $error = $task->getFromDB($intaskid); if ($error != NULL) { die; } //review form was submitted if (isset($_POST['submit'])) { //prepare review info to be sent to POST $_POST['taskid'] = $intaskid; $review = new review(); $error = $review->getFromPOST($_POST); if (count($error) == 0) { $_SESSION['msg_reviewed'] = "Review placed"; header("Location: /ViewTask.php?id=" . $intaskid); die; } else { die; } } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<?php session_start(); include_once 'config/db_conn.php'; include_once 'db_config/db_gigs.php'; include_once 'db_config/db_catagory.php'; include_once 'db_config/db_user.php'; include_once 'db_config/db_review.php'; $user = new user(); $review = new review(); $arr_var = explode('_', $_REQUEST['title']); $gigs_title = str_replace('-', ' ', $arr_var[3]); $gigs = new gigs(); $rs_gigs = $gigs->uniq_gigs_list('gigs_title', $gigs_title); $i = 0; $data = mysql_fetch_array($rs_gigs); $catagory = new catagory(); $rs_catagory = $catagory->uniq_catagory_list('catagory_id', $data['catagory_id']); $data_catagory = mysql_fetch_array($rs_catagory); $rs_cat_gigs = $gigs->uniq_gigs_list('catagory_id', $data['catagory_id']); $rs_others_gigs = $gigs->uniq_gigs_list('user_id', $data['user_id']); $rs_uniq_user = $user->uniq_user_list('user_id', $data['user_id']); $data_uniq_user = mysql_fetch_array($rs_uniq_user); if ($_REQUEST['gigs_title'] != '') { $gigs_title = $_REQUEST['gigs_title']; } if ($_REQUEST['submit']) { $gigs_title = $_REQUEST['gigs_title']; $gig_category_id = $_REQUEST['gig_category_id']; $gigs_title = $_REQUEST['gigs_description']; }
<?php session_start(); include_once 'config/db_conn.php'; include_once 'db_config/db_gigs.php'; include_once 'db_config/db_user.php'; include_once 'db_config/db_order_payment.php'; include_once 'db_config/db_user_transaction.php'; include_once 'db_config/db_review.php'; $trans = new trans(); $review = new review(); $rs_trans = $trans->uniq_trans_list('user_id', $_SESSION['user_id']); $data_trans = mysql_fetch_array($rs_trans); $rs_trans_sum_pending_fund = $trans->sum_trans('pending_fund', $_SESSION['user_id']); $data_trans_sum_pending_fund = mysql_fetch_array($rs_trans_sum_pending_fund); $rs_trans_sum_withdraw = $trans->sum_trans('withdraw_request_ammount', $_SESSION['user_id']); $data_trans_sum_withdraw = mysql_fetch_array($rs_trans_sum_withdraw); $data_trans = mysql_fetch_array($rs_trans); //echo $data_trans['pending_fund']; $user = new user(); $gigs = new gigs(); $order_payment = new order_payment(); if ($_REQUEST['st']) { $rs = $order_payment->uniq_order_payment_list_double('buyer_id', $_SESSION['user_id'], 'order_status', $_REQUEST['st']); } else { $rs = $order_payment->uniq_order_payment_list('buyer_id', $_SESSION['user_id']); } $rs_review_list_by = $review->review_list("review_by", $_SESSION['user_id']); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy(Request $request) { foreach ($request->input('to_delete') as $item_id) { review::destroy($item_id); } Session::flash('message', 'Rol borrado Correctamente'); return Redirect::to('reviews'); }
<?php include_once 'config/db_conn.php'; include_once 'db_config/db_gigs.php'; include_once 'db_config/db_user.php'; include_once 'db_config/db_review.php'; $user = new user(); $gigs = new gigs(); $review = new review(); $rs_review = $review->review_list(); if ($_REQUEST['id']) { $user->delete($_REQUEST['id']); reDirect('users.php'); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Orders - Admin </title> <link rel="stylesheet" type="text/css" href="css/theme.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script> var StyleFile = "theme" + document.cookie.charAt(6) + ".css"; document.writeln('<link rel="stylesheet" type="text/css" href="css/' + StyleFile + '">'); </script> <script> function confirmDelete(delUrl) { if (confirm("Are you sure you want to delete")) { document.location = delUrl; }
public function ajaxAction(Request $data) { if ($data->isMethod('post')) { $method = $data->input('method'); switch ($method) { case "getsubcategory": $categoryid = $data->input('categoryid'); $objCategory = new category(); $result = $objCategory->getActiveSubCategory($categoryid); echo json_encode($result); die; break; case "editreport": $reportid = $data->input('reportid'); $objReport = new report(); $result = $objReport->getReportById($reportid); Session::forget('report'); $reportstepone = array(); $reportstepone['companyname'] = $result->company_or_individual_name; $reportstepone['aka'] = $result->company_or_individual_aka; $reportstepone['webaddress'] = $result->web_address; $reportstepone['locationtype'] = $result->location_type; $reportstepone['streetaddress'] = $result->street_address; $reportstepone['city'] = $result->city; $reportstepone['state'] = $result->state; $reportstepone['zipcode'] = $result->zip_code; $reportstepone['country'] = $result->country; $reportstepone['fax'] = $result->fax; $reportstepone['phone'] = $result->phone; $reportstepone['email'] = $result->email_address; Session::put('report.stepone', $reportstepone); Session::put('report.id', $reportid); $reportsteptwo = array(); $reportsteptwo['title'] = $result->report_title; $reportsteptwo['category'] = $result->category_id; $reportsteptwo['subcategory'] = $result->subcategory_id; Session::put('report.steptwo', $reportsteptwo); redirect('/admin/reportstepfour'); die; break; case "viewreport": $reportid = $data->input('reportid'); $objReport = new report(); $report = $objReport->getReportDetailsById($reportid); $reportarray = (array) $report; $file = $objReport->getReportFileDetailsById($reportid); $filearray = (array) $file; $reportarray['files'] = $filearray; echo json_encode($reportarray); die; break; case "getreviewdetails": $reviewid = $data->input('reviewid'); $objReview = new review(); $result = $objReview->getReviewDetailsById($reviewid); echo json_encode($result); die; case "getreports": $objReport = new report(); $result = $objReport->getAllReports(); echo json_encode($result); die; default: break; } } }