public function postContactUs() { $rules = array('email' => "required|email", 'conact_us' => 'honeypot', 'contact_us_time' => 'required|honeytime:5'); $validator = Validator::make(Input::get(), $rules); if ($validator->passes()) { if (!LCP::sendEmailContactUs()) { return Redirect::to('contact-us')->with('error', Lang::get('core.email_not_sent')); } } else { return Redirect::to('contact-us')->withInput()->with('error', Lang::get('core.email_not_sent')); } return Redirect::to('contact-us')->with('success', Lang::get('core.email_sent')); }
public function emailmass() { $ids = explode(',', rtrim(Input::get('ids'), ',')); $multi = array(); $selected = array(); if (is_array($ids) && count($ids) > 0) { foreach ($ids as $id) { $user = $this->user->find($id); if (!empty($user)) { $multi[$id] = $user->email; $selected = $id; } } } $title = Lang::get('core.email'); $mode = 'edit'; $templates = LCP::emailTemplates(); return Theme::make('admin/users/send_email', compact('title', 'mode', 'multi', 'selected', 'templates')); }
public function deletemass() { $rows = json_decode(Input::get('rows')); if (is_array($rows) && count($rows) > 0) { foreach ($rows as $i => $r) { LCP::runDeleteMass($r); } } elseif (is_integer($rows)) { LCP::runDeleteMass($rows); } if (!Api::make(array('success'))) { return Response::json(array('result' => 'success')); } }
public function post() { return LCP::merge(); }