Esempio n. 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($idkas)
 {
     $kas = Kas::find($idkas);
     $cust = Customer::all();
     $data = array('kas' => $kas, 'cust' => $cust);
     return View('kas.edit')->with('data', $data);
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $data['title'] = 'Tambah Berita';
     $data['kategori_berita'] = Kategori::all();
     return View('backend.berita.create', $data);
 }
Esempio n. 3
0
 public function users()
 {
     $ppk = Auth::user()->ppk->id;
     $level = Auth::user()->level->id;
     $users = User::where('ppk_id', $ppk)->where('level_id', '>', $level)->get();
     return View('ppk.rekod.users', compact('users'));
 }
 public function index()
 {
     $id = Auth::id();
     $user = User::find($id);
     $expire_date = Carbon::parse($user->activated_at)->addMonth($user->duration);
     return View('user.index')->with('expire_date', $expire_date);
 }
Esempio n. 5
0
 /**
  * Display the password reset view for the given token.
  *
  * @param  string  $token
  * @return Response
  */
 public function getReset($token = null)
 {
     if (is_null($token)) {
         throw new NotFoundHttpException();
     }
     return View('kagi::auth.reset')->with('token', $token);
 }
 public function index()
 {
     $brands = Brand::Listing(['status' => 1]);
     $categories = Category::Listing(['status' => 1]);
     $products = Product::Listing(['status' => 1]);
     return View('home', ['brands' => $brands['result'], 'categories' => $categories['result'], 'products' => $products['result']]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //get all watchlist items
     $watchlist = Watchlist::where('user_id', Auth::user()->id)->get();
     $data['watchlist'] = $watchlist;
     return View('Watchlist.index')->with($data);
 }
Esempio n. 8
0
 /**
  * Display login page.
  *
  * @return Response
  */
 public function index()
 {
     if (Auth::check() && Auth::user()->UserRoles->role >= 2) {
         return Redirect::to('/admin/dashboard');
     }
     return View('admin.login.index');
 }
Esempio n. 9
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     // $this->validate($request, [
     $fan = new Fans($request->all());
     $fan->save();
     return View('layouts/tabhub');
 }
Esempio n. 10
0
 public function getPayment($invoiceid)
 {
     $id = $invoiceid;
     $invoice = Invoice::with(['payments', 'comments'])->where('Id', $id)->get();
     //dd($invoice);
     return View('collectionmodule/payment')->with(array('invoice' => $invoice));
 }
Esempio n. 11
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function create($album_id = null)
 {
     //
     $data['album_id'] = $album_id;
     $data['title'] = 'Tambah Foto';
     return View('backend.foto.create', $data);
 }
Esempio n. 12
0
 public function terkini()
 {
     $users = User::where('unit', Auth::user()->unit)->where('level_id', 3)->where('status', 1)->get();
     if (Auth::user()->level->id == 1) {
         $users = User::where('status', 1)->where('level_id', '>', 1)->get();
     }
     $data[] = null;
     $bil = 1;
     foreach ($users as $user) {
         //Belum Selesai
         $belumSelesai = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 0)->count();
         $user['belumSelesai'] = $belumSelesai;
         //            dd(Carbon::now()->startOfMonth()->format('Y-m-d'));
         //            dd($belumSelesai);
         //KIV
         $kiv = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 3)->count();
         $user['kiv'] = $kiv;
         //Selesai
         $selesai = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 4)->count();
         $user['selesai'] = $selesai;
         //Closing
         $closing = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 1)->count();
         $user['closing'] = $closing;
         //Jumlah tugasan current month
         $totalCurrentMonth = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->count();
         $user['totalCurrentMonth'] = $totalCurrentMonth;
         //Jumlah tugasan bulan sebelum dan belum selesai
         $totalPreviousMonth = Laporan::where('user', $user->username)->where('tarikh', '<', Carbon::now()->startOfMonth())->where('status', '!=', 4)->count();
         $user['totalPreviousMonth'] = $totalPreviousMonth;
         //Jumlah Bulan Semasa, KIV dan Belum Selesai
         $grandTotal = Laporan::where('user', $user->username)->where('status', '!=', 4)->count();
         $user['grandTotal'] = $grandTotal;
     }
     return View('members.supervisor.laporan.cetak.terkini', compact('bil', 'users'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     //
     $member = Member::find($id);
     // show the edit form and pass the member info to it
     return View('members.edit_form')->with('member', $member);
 }
Esempio n. 14
0
 public function setCalendar($start)
 {
     $month = $start->format('F Y');
     $nrOfDays = $start->daysInMonth;
     //count days in this month
     if ($start->dayOfWeek != Carbon::MONDAY) {
         $dayStartWeek = $start->startOfWeek()->format('d');
         //find the number day
         $daysInPrev = $start->startOfWeek()->daysInMonth;
         //days is previous month
         $daysToAddPrev = $daysInPrev - $dayStartWeek;
         // find the difference
     } else {
         $daysInPrev = 0;
         $daysToAddPrev = 0;
     }
     $daysToAddNext = 7 - ($daysToAddPrev + 1 + $nrOfDays) % 7;
     //+1 -> dayscount from 0
     //count all days add at the moment % 7
     // 1 week minus the rest
     $next = $start->addMonth()->format('F Y');
     $previous = $start->subMonth()->format('F Y');
     $data = array('month' => $month, 'nrOfDays' => $nrOfDays, 'daysInPrev' => $daysInPrev, 'daysToAddPrev' => $daysToAddPrev, 'daysToAddNext' => $daysToAddNext, 'next' => $next, 'previous' => $previous);
     return View('calender')->with($data);
 }
Esempio n. 15
0
 public function file_upload()
 {
     include "models/file_upload.php";
     $file = new File_upload();
     $file->id = $_SESSION["usuarios_id"];
     return View("file_upload/main", $file);
 }
Esempio n. 16
0
 public function index()
 {
     //        if(Input::has("data"))
     //            {
     //                $data = Input::get('data');
     //
     //                $validation = $validator = Validator::make(
     //                        array('Name'        => $data['name'],
     //                              'email'       => $data['email'],
     //                              'Telephone'   => $data['telephone'],
     //                              'Message'     => $data['description']),
     //                        array('Name'        => 'required',
     //                              'email'       => 'required|email',
     //                              'Telephone'   => 'required',
     //                              'Message'     => 'required')
     //                    );
     //                    if ($validation->fails())
     //                        {
     //                            return Redirect::to('contact')->withInput()->withErrors($validation);
     //                        }
     //
     //                        Mail::send('mail.contact', $data, function($message1) use($data)
     //                        {
     //                            $message1->from($data['email'], $data['name']);
     //                            $message1->to('*****@*****.**', 'Contact - Oxoniya')->subject('Contact - Oxoniya');
     //                        });
     //                        $validation1['message'] = 'Contact Form Successfully Submitted';
     //                        return Redirect::to('contact')->withErrors($validation1);
     //            }
     return View('contact');
 }
Esempio n. 17
0
 public function postApproveinvoice(Request $request)
 {
     $approve_id = Input::get('invoice_approve_id');
     $post = Input::get();
     $i = Invoice::where('Id', $approve_id)->update(array('Status' => $post['approve_status']));
     $invoicedata = Invoice::where('Id', $approve_id)->get();
     foreach ($invoicedata as $inv) {
         $email = $inv->ClientEmail;
         $invno = $inv->InvoiceCode;
         $clientmail = $inv->ClientName;
     }
     if ($i > 0) {
         $html22 = View('pdfgenerate')->with(array('invoicedata' => $invoicedata))->render();
         $html1 = "<h1>adsfadsfasdf</h1>";
         require_once app_path() . '/libs/html2pdf/html2pdf.class.php';
         $html2pdf = new \HTML2PDF('P', 'A4', 'en', true, 'UTF-8', array(0, 0, 0, 0));
         // $html2pdf->pdf->SetDisplayMode('fullpage');
         $html2pdf->WriteHTML($html22);
         $htmltosend = $html2pdf->Output('', 'S');
         $a = 'IDE | Proforma invoice_';
         $subject = $a . $invno . $clientmail;
         Mail::send('emails.invoice', ['Invoice' => 'hgff'], function ($message) use($subject, $htmltosend, $email) {
             // note: if you don't set this, it will use the defaults from config/mail.php
             $message->from('*****@*****.**', 'IDE Consulting Services Pvt Ltd');
             $message->to($email)->subject($subject)->attachData($htmltosend, 'invoice.pdf', array('mime' => 'application/pdf', 'Content-Disposition' => 'attachment'));
         });
         $request->session()->flash('alert-success', 'Invoice has been set to client !');
         return redirect('home2');
     }
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     if (Auth::check() && Auth::user()->hasRole('moderator')) {
         return Redirect::to('admin');
     }
     return View('admin/auth/login');
 }
Esempio n. 19
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getIndex()
 {
     $varr = Auth::user()->empid;
     $empid = Targetassign::where('Employeeid', $varr)->get();
     $cat = Event::all();
     return View('targetmodule/eventdeal')->with(array('cat' => $cat, 'empid' => $empid));
 }
Esempio n. 20
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $typeUsers = $this->typeUserRepository->orderBy('name', 'ASC');
     $schools = $this->schoolsRepository->orderBy('name', 'ASC');
     $menus = $this->menuRepository->orderBy('name', 'ASC');
     return View('users.create', compact('typeUsers', 'suppliers', 'schools', 'menus'));
 }
Esempio n. 21
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($idpic)
 {
     $pic = Pic::find($idpic);
     $cust = Customer::all();
     $data = array('pic' => $pic, 'cust' => $cust);
     return View('pic.edit')->with('data', $data);
 }
Esempio n. 22
0
 public function post_home(Request $request)
 {
     $user = \Auth::user();
     if ($request->field == 'email') {
         $oldemail = $request->data1;
         $email = $request->data2;
         User::where('email', $oldemail)->limit(1)->update(['email' => $email]);
         $user = \Auth::user();
         return view('user.index', ['user' => $user, 'message' => 'Updated Email!']);
     } elseif ($request->field == 'avatar') {
         $image = $request->data;
         $name = $user->username;
         if ($request->file('image')->isValid()) {
             $request->file('image')->move('users/', $user->username . '.png');
             return view('user.index', ['user' => $user, 'message' => 'Updated Avatar!']);
         } else {
             return view('user.index', ['user' => $user, 'message' => 'Failed to update Avatar... Please try again in a few minutes.']);
         }
     } elseif ($request->field == 'address') {
         $email = $user->email;
         User::where('email', $email)->limit(1)->update(['address' => $request->data1, 'city' => $request->data2, 'state' => $request->data3, 'zip' => $request->data4]);
         return view('user.index', ['user' => $user, 'message' => 'Updated Address!']);
     } elseif ($request->field == 'phones') {
         $email = $user->email;
         User::where('email', $email)->limit(1)->update(['phones' => $request->data1]);
         return view('user.index', ['user' => $user, 'message' => 'Updated Phone numbers!']);
     } elseif ($request->field == 'social') {
         return $request->data;
     } else {
         return View('errors.404');
     }
 }
Esempio n. 23
0
 public function getUserChatView($idUserChatWith = null)
 {
     $user = Session::get('user');
     if (!is_null($idUserChatWith)) {
         $userChatResult = self::$factory->getUserGroupChat($user['ID_USER'], $idUserChatWith);
         if (count($userChatResult) == 0) {
             $createGroupResult = self::$factory->createGroup(-1, -1, 3, $user['ID_USER'], $idUserChatWith);
             if ($createGroupResult == 1) {
                 $userChatResult = self::$factory->getUserGroupChat($user['ID_USER'], $idUserChatWith);
                 if (count($userChatResult) > 0) {
                     $this->processAddMemberToGroup($userChatResult[0]["ID_GROUP"], $user['ID_USER']);
                     $this->processAddMemberToGroup($userChatResult[0]["ID_GROUP"], $idUserChatWith);
                 } else {
                     Session::flash('alert-danger', 'Error occored, please contact administrator.[Can not create a chat]');
                     return redirect('chats')->send();
                 }
             } else {
                 Session::flash('alert-danger', 'Error occored, please contact administrator.[Can not create a chat]');
                 return redirect('chats')->send();
             }
         }
         $userChatWith = self::$factory->getUser($idUserChatWith);
         $messagesResult = $this->getChatMessage($user['ID_USER'], $userChatResult[0]['ID_GROUP'], $userChatResult[0]['IS_ADMIN']);
         return View('chats.chat')->with('user', $user)->with('userWith', $userChatWith)->with('chat', $userChatResult[0])->with('messages', $messagesResult);
     }
     return redirect('chats')->send();
 }
Esempio n. 24
0
 public function show($id)
 {
     $post = Blog::getPostsRepository()->findOrFail($id);
     $categories = Blog::getCategoriesRepository()->OrderBy('created_at')->get();
     // Show the page
     return View('public.blog.post', compact('post', 'categories'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $user_id = $this->auth->user()->id;
     $user = DB::table('users as u')->selectRaw('u.*, u.id as user_id, ut.type_name as type_name')->leftjoin('user_types as ut', 'u.type_id', '=', 'ut.id')->where('u.id', '=', $user_id)->first();
     return View('users.index', ['user' => $user]);
 }
Esempio n. 26
0
 public function editUser($id)
 {
     $user = User::find($id);
     //All item
     $allitems = DB::table('items')->get();
     return View('users.edit_user', ['user' => $user, 'item_list' => $allitems, 'item_id' => @$items->item_id]);
 }
Esempio n. 27
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function create($id = null)
 {
     //
     $data['id'] = $id;
     $data['title'] = 'Tambah Siswa';
     return View('backend.siswa.create', $data);
 }
Esempio n. 28
0
 public function show()
 {
     $news = App('news_model')->getLatestByLanguage(Env()->main['amount_latest_news']);
     $pages = App('page_model')->getLatestByLanguage(Env()->main['amount_latest_pages']);
     $breadcrumbs = App()->sitemap_model->getBreadcrumbs('main');
     View()->render('show', array('title' => Env()->main['title'], 'description' => Env()->main['description'], 'news' => $news, 'pages' => $pages, 'breadcrumbs' => $breadcrumbs));
 }
Esempio n. 29
0
 public function terkini()
 {
     $bil = 1;
     $laporans = Laporan::where('tarikh', 'like', Carbon::now()->format('Y-m') . '%')->where('user', Auth::user()->username)->get();
     //        dd($laporans);
     return View('members.technician.laporan.terkini', compact('bil', 'laporans'));
 }
Esempio n. 30
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function adminIndex()
 {
     $visas = Visa::with('Service', 'Service.country', 'Requirement')->get();
     $countries = Country::orderBy('name')->get();
     $requirements = Requirement::orderBy('title')->get();
     return View('admin.visas', ['visas' => $visas, 'countries' => $countries, 'requirements' => $requirements]);
 }