示例#1
0
 public function sendquotation()
 {
     $input = Input::all();
     $name = $input['name'];
     $email_client = $input['email'];
     $phone_client = $input['phone'];
     $title = $input['title'];
     $msg_webneoo = nl2br($input['msg_webneoo']);
     Mail::send('emails.quotation', ['name' => $name, 'email_client' => $email_client, 'phone_client' => $phone_client, 'msg_webneoo' => $msg_webneoo], function ($m) use($email_client, $title) {
         $m->from($email_client, 'Webneoo')->subject($title);
         $m->to('*****@*****.**');
     });
     /*Mail::send('emails.contact', array('name' => $name, 'email_client' => $email_client, 'subject_client' => $subject_client, 'msg_webneoo' => $msg_webneoo), function($message) use ($email_client)
       {
           $message->from($email_client, 'Webneoo')->subject('From Webneoo Website');
           $message->to('*****@*****.**');
       });*/
     /*Mail::send('emails.quotation', array('name' => $name, 'email_client' => $email_client, 
       									'subject_client' => $subject_client, 'msg_webneoo' => $msg_webneoo), 
       										function($message) use ($email_client, $title)
       {
           $message->from($email_client, 'Webneoo')->subject($title);
           $message->to('*****@*****.**');
       });*/
     return View::make('pricing.index');
 }
 /**
  * Dipsplay image for resizing
  *
  * @return mixed
  */
 public function getResize()
 {
     $ratio = 1.0;
     $image = Input::get('img');
     $path_to_image = parent::getPath('directory') . $image;
     $original_width = Image::make($path_to_image)->width();
     $original_height = Image::make($path_to_image)->height();
     $scaled = false;
     if ($original_width > 600) {
         $ratio = 600 / $original_width;
         $width = $original_width * $ratio;
         $height = $original_height * $ratio;
         $scaled = true;
     } else {
         $width = $original_width;
         $height = $original_height;
     }
     if ($height > 400) {
         $ratio = 400 / $original_height;
         $width = $original_width * $ratio;
         $height = $original_height * $ratio;
         $scaled = true;
     }
     return View::make('laravel-filemanager::resize')->with('img', parent::getUrl('directory') . $image)->with('height', number_format($height, 0))->with('width', $width)->with('original_height', $original_height)->with('original_width', $original_width)->with('scaled', $scaled)->with('ratio', $ratio);
 }
示例#3
0
 /**
  * Setup the layout used by the controller.
  *
  * @return void
  */
 protected function setupLayout()
 {
     $this->layout = View::make(Config::get('syntara::views.master'));
     $this->layout->title = 'VietSol CMS';
     $this->layout->breadcrumb = array();
     View::share('siteName', 'VietSol CMS');
 }
 /**
  * Dipsplay image for resizing
  *
  * @return mixed
  */
 public function getResize()
 {
     $ratio = 1.0;
     $image = Input::get('img');
     $dir = Input::get('dir');
     $original_width = Image::make(base_path() . "/" . Config::get('lfm.images_dir') . $dir . "/" . $image)->width();
     $original_height = Image::make(base_path() . "/" . Config::get('lfm.images_dir') . $dir . "/" . $image)->height();
     $scaled = false;
     if ($original_width > 600) {
         $ratio = 600 / $original_width;
         $width = $original_width * $ratio;
         $height = $original_height * $ratio;
         $scaled = true;
     } else {
         $height = $original_height;
         $width = $original_width;
     }
     if ($height > 400) {
         $ratio = 400 / $original_height;
         $width = $original_width * $ratio;
         $height = $original_height * $ratio;
         $scaled = true;
     }
     return View::make('laravel-filemanager::resize')->with('img', Config::get('lfm.images_url') . $dir . "/" . $image)->with('dir', $dir)->with('image', $image)->with('height', number_format($height, 0))->with('width', $width)->with('original_height', $original_height)->with('original_width', $original_width)->with('scaled', $scaled)->with('ratio', $ratio);
 }
示例#5
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $task = Task::find($id);
     $projects = Project::lists('name', 'id');
     //
     return View::make('tasks.edit', compact('task', 'projects'));
 }
示例#6
0
 public function messages()
 {
     if ($this->hasMessages()) {
         $this->messages = Session::get('messages');
         return View::make(Platform::getPackageName() . '::page/messages')->with('items', $this->messages)->render();
     }
 }
 public function index($owner, $project)
 {
     $repository = $project->getRepository();
     $commitishPath = $repository->getHead();
     list($branch, $file) = $this->extractReference($repository, $commitishPath, $project->slug);
     return View::make('projects/merge_requests')->withOwner($owner)->withProject($project)->withBranch($branch);
 }
 public function crawler($action = "")
 {
     $action = Input::get('action') ? Input::get('action') : $action;
     //Available Maintenance Functions
     $this->available_maintenances = array('recreateurls' => Lang::get('cms::m.recreate-urls'), 'convertToPages' => Lang::get('cms::m.crawl-reate-pages'));
     return View::make('cms::admin/maintenance', array("available_maintenances" => $this->available_maintenances));
 }
 public function getEditBancaEntitate($id, $id_entitate, $entitate)
 {
     $banca_class = new BancaController();
     $banci = $banca_class->getBanciOrganizatie();
     $banca = DB::select("SELECT\n            id,\n            id_banca,\n            iban,     \n            sucursala\n            FROM banca_entitate\n\t\t\tWHERE id = :id", array('id' => $id));
     return View::make("banca::banca_entitate.edit")->with("banca", $banca[0])->with("banci", $banci)->with("id_entitate", $id_entitate)->with("entitate", $entitate);
 }
示例#10
0
 /**
  * Shows the live scoreboard
  */
 public function scoreboard()
 {
     $games = Game::with(['servers' => function ($query) {
         $query->active()->orderBy('ServerName');
     }])->get();
     return View::make('scoreboard', compact('games'))->with('page_title', Lang::get('navigation.main.items.scoreboard.title'));
 }
 public function user()
 {
     if (Session::get('isLogged') == true) {
         $path = storage_path() . '\\upload\\' . Session::get('index');
         $files = array_diff(scandir($path), array('.', '..'));
         $parse = array();
         foreach ($files as $k => $v) {
             // име на фајл
             $array = array();
             array_push($array, $v);
             // големина на фајл
             $path = storage_path() . '\\upload\\' . Session::get('index') . '\\' . $v;
             $bytes = File::size($path);
             $bytes = self::formatSizeUnits($bytes);
             array_push($array, $bytes);
             // пат до фајлот
             array_push($array, $path);
             // array-от кој се испраќа на view
             array_push($parse, $array);
         }
         $data = array('files' => $parse);
         return View::make('user')->with($data);
     } else {
         abort(404);
     }
 }
示例#12
0
 public function getUpdate($id)
 {
     $breadcrumbs = array(array("Kompetensi" => url("admin/competency/type")), array("Tipe Kompetensi" => ""), array("Ubah Data" => ""));
     $data = CompetencyType::find($id);
     $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs'));
     $this->layout->content = View::make('competency::adminType.update', compact('data'));
 }
示例#13
0
 public function send($view, array $data, $callback)
 {
     $message = new Message(new Swift_Message());
     if ($callback instanceof Closure) {
         // callback must assign $to and $subject, deal with it
         call_user_func($callback, $message);
     } else {
         throw new InvalidArgumentException('Callback is not valid.');
     }
     $m = $message->getSwiftMessage();
     $filteredTo = array_filter(array_keys($message->getTo()), function ($email) {
         $skip = DB::table('ses_feedback')->where('email', $email)->first();
         if ($skip) {
             Log::info("skipping email:{$email}");
         }
         return !$skip;
     });
     if ($filteredTo) {
         $converter = new CssToInlineStyles();
         $converter->setEncoding($message->getCharset());
         $converter->setStripOriginalStyleTags();
         $converter->setUseInlineStylesBlock();
         $converter->setExcludeMediaQueries(false);
         $converter->setCleanup();
         $converter->setHTML(View::make($view, $data)->render());
         $body = $converter->convert();
         $config = Config::get('services.amazon');
         SesClient::factory($config)->sendEmail(array('Source' => $config['from'], 'Destination' => array('ToAddresses' => $filteredTo), 'Message' => array('Subject' => array('Data' => $m->getSubject(), 'Charset' => 'UTF-8'), 'Body' => array('Text' => array('Data' => strip_tags(str_replace("<br/>", "\n", $body)), 'Charset' => 'UTF-8'), 'Html' => array('Data' => $body, 'Charset' => 'UTF-8'))), 'ReplyToAddresses' => array()));
     }
 }
示例#14
0
 public function testPjaxAndFullpageResponses()
 {
     $this->mockRequest->shouldReceive('wantsJson')->andReturn(false);
     View::shouldReceive('make')->with('view', [], [])->once()->andReturn('view');
     $this->respondable->respond('view');
     $this->assertEquals('whatever', $this->respondable->layout->main);
 }
示例#15
0
 public function index()
 {
     $lectures = Lessontype::join('ocena', 'ocena.lessonTypeId', '=', 'lessontypes.id')->where('userId', Auth::user()->id)->groupBy('lessontypes.id')->get(array('lessonTypeId'));
     $les = Lessontype::all('id');
     $data1 = array();
     $data2 = array();
     foreach ($lectures as $key => $value) {
         $data1[] = $value->lessonTypeId;
     }
     foreach ($les as $key => $value) {
         $data2[] = $value->id;
     }
     $data1;
     $data2;
     $collection1 = collect($data1);
     $collection2 = collect($data2);
     $diff = $collection2->diff($collection1);
     $data3 = array();
     foreach ($diff as $key => $value) {
         $data3[] = $value;
     }
     $data3;
     $users = Auth::user();
     $lessonNo = Lessontype::whereIn('id', $data3)->get();
     $lessonYes = Lessontype::join('ocena', 'lessontypes.id', '=', 'lessonTypeId')->selectRaw('lessontypes.*, SUM(ocena.jedinica) as total')->groupBy('lessontypes.id')->get();
     return View::make('dashboard', compact('users', 'les', 'lessonYes', 'lessonNo'));
 }
示例#16
0
 public function patientbill()
 {
     $id = $_GET['id'];
     //        $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id',$id)->get(['name']);
     $bill = \Illuminate\Support\Facades\DB::table('bills')->where('patient_id', $id)->get();
     return \Illuminate\Support\Facades\View::make('discharge.discharge_home', compact('bill'));
 }
 public function ProsesJadwal($id)
 {
     $data = DB::table('prestasi_kerja_rekap_penilaian')->join('lpp_kemenpan_siasik.daf_unit_staf', 'prestasi_kerja_rekap_penilaian.id_jabatan', '=', 'lpp_kemenpan_siasik.daf_unit_staf.unit_staf_id')->join('lpp_kemenpan_siasik.master_pegawai', 'prestasi_kerja_rekap_penilaian.nip', '=', 'lpp_kemenpan_siasik.master_pegawai.nip')->join('lpp_kemenpan_siasik.daf_gol', 'lpp_kemenpan_siasik.daf_unit_staf.eselon_id', '=', 'lpp_kemenpan_siasik.daf_gol.gol_id')->select('prestasi_kerja_rekap_penilaian.nip', 'prestasi_kerja_rekap_penilaian.id_jabatan', 'lpp_kemenpan_siasik.daf_unit_staf.nama_lengkap', 'lpp_kemenpan_siasik.daf_unit_staf.unit_staf_id', 'lpp_kemenpan_siasik.master_pegawai.nama', 'lpp_kemenpan_siasik.daf_gol.pangkat', 'lpp_kemenpan_siasik.daf_gol.golongan')->where('lpp_kemenpan_siasik.daf_unit_staf.unit_staf_id', '=', $id)->first();
     $breadcrumbs = array(array("Assessment Internal" => "javascript:void(0)"), array("Pengaturan" => ""), array("Tambah Kandidat Promosi" => ""));
     $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs'));
     $this->layout->content = View::make('career::jadwal/jadwalasessment', compact('data'));
 }
 /**
  * Show crop page
  *
  * @return mixed
  */
 public function getCrop()
 {
     $working_dir = Input::get('working_dir');
     $img = parent::getUrl('directory') . Input::get('img');
     $imgName = Input::get('img');
     return View::make('laravel-filemanager::crop')->with(compact('working_dir', 'img', 'imgName'));
 }
 public function getEdit($id)
 {
     // Find the product using the user id
     $product = Product::find($id);
     // No such id
     if ($product == null) {
         return \View::make('redminportal::pages/404');
     }
     $categories = array();
     foreach (Category::all() as $category) {
         $categories[$category->id] = $category->name;
     }
     $tagString = "";
     foreach ($product->tags as $tag) {
         if (!empty($tagString)) {
             $tagString .= ",";
         }
         $tagString .= $tag->name;
     }
     if (empty($product->options)) {
         $product_cn = (object) array('name' => $product->name, 'short_description' => $product->short_description, 'long_description' => $product->long_description);
     } else {
         $product_cn = json_decode($product->options);
     }
     return View::make('redminportal::products/edit')->with('product', $product)->with('product_cn', $product_cn)->with('imageUrl', 'assets/img/products/')->with('categories', $categories)->with('tagString', $tagString);
 }
示例#20
0
 public function __construct()
 {
     $this->middleware('auth');
     // Fetch the Site Settings object
     $this->currentModelName = Lang::get('crud.competitor');
     View::share('currentModelName', $this->currentModelName);
 }
 public function getIndex($id)
 {
     if (Auth::check()) {
         $users_id = Auth::user()->id;
         $role = DB::table('role_user')->where('user_id', '=', $users_id)->first();
         $role_id = $role->role_id;
         //dd($role_id);
         if ($role_id == 2 || $role_id == 3 || $role_id == 4) {
             return redirect(url());
         } else {
             //dd(\Config::get("mail"));
             $username = $id;
             $user_id = DB::table('users')->where('username', $id)->pluck('id');
             $email = DB::table('users')->where('username', $id)->pluck('email');
             $image = "images/users/" . $username . "/" . DB::table('users')->where('username', $id)->pluck('photo');
             $name = DB::table('users')->where('username', $id)->pluck('firstName') . " " . DB::table('users')->where('username', $id)->pluck('lastName');
             $verify = DB::table('users')->where('username', $id)->pluck('verify_key');
             $verification_link = "http://localhost/seriousdatings_app/public/users/" . $user_id . "/verify/" . $verify;
             $data = array();
             $data = ['email' => $email, 'image' => $image, 'name' => $name, 'username' => $id, 'verification_link' => $verification_link, 'image_link' => 'http://seriousdatings.com/images/logo.jpg', 'contact_address' => ''];
             Mail::send('mailtemplate', $data, function ($message) {
                 $message->to('*****@*****.**', 'ID')->subject('Verify your seriousdatings account');
             });
             //Session::flush();
             return View::make('verify_email')->withData($data);
         }
     } else {
         return redirect(url() . '/login');
     }
 }
 private function setWidgetComposer($widget)
 {
     View::composer('dashboard.dashboard', function ($view) use($widget) {
         $view->with('widget', $widget);
     });
     return $this;
 }
示例#23
0
 /**
  * @param Request $request
  * @param Closure $next
  */
 public function handle($request, Closure $next)
 {
     Lang::setFallback(self::getDefault());
     $setLocale = Session::get('setLocale');
     //flash data
     if (Config::get('app.locale_use_cookie')) {
         if ($setLocale) {
             Session::set('locale', $setLocale);
         }
         if (Session::has('locale')) {
             App::setLocale(Session::get('locale'));
         } else {
             self::autoDetect();
         }
     } else {
         if (Config::get('app.locale_use_url')) {
             if ($setLocale) {
                 self::setLocaleURLSegment($setLocale);
             } else {
                 $lang = self::getLocaleFromURL();
                 if ($lang) {
                     App::setLocale($lang);
                 } else {
                     if ($request->segment(1) != 'locale') {
                         //ignore set-locale URL
                         self::autoDetect();
                         self::setLocaleURLSegment(self::get());
                     }
                 }
             }
         }
     }
     View::share('lang', self::get());
 }
示例#24
0
 public function testIndex()
 {
     $this->markTestIncomplete('This test has not been implemented yet.');
     View::shouldReceive('make')->once()->with('cabinet::admin.index')->andReturn('admin index!');
     $response = $this->action('GET', self::$wardrobeControllers . 'AdminController@index');
     $this->assertSame('admin index!', $response->original);
 }
示例#25
0
 /**
  * @return mixed
  */
 public function showNews()
 {
     $slug = Request::segment(2);
     $news_title = "Not active";
     $news_text = "Either this news item is not active, or it does not exist";
     $active = 1;
     $news_id = 0;
     $results = DB::table('news')->where('slug', '=', $slug)->get();
     foreach ($results as $result) {
         $active = $result->active;
         if ($active > 0 || Auth::check() && Auth::user()->hasRole('news')) {
             if (Session::get('lang') == null || Session::get('lang') == "en") {
                 $news_title = $result->title;
                 $news_text = $result->news_text;
                 $news_id = $result->id;
             } else {
                 $news_title = $result->title_fr;
                 $news_text = $result->news_text_fr;
                 $news_id = $result->id;
             }
             $news_image = $result->image;
             $news_date = $result->news_date;
         }
     }
     return View::make('public.news')->with('news_title', $news_title)->with('news_text', $news_text)->with('page_content', $news_text)->with('active', $active)->with('news_id', $news_id)->with('news_date', $news_date)->with('news_image', $news_image)->with('menu', $this->menu)->with('page_category_id', 0)->with('page_title', $news_title);
 }
示例#26
0
 protected function shareFis()
 {
     $fis = $this->app->make('fis');
     View::composer('*', function ($view) use($fis) {
         $view->with('__fis', $fis);
     });
 }
 public function __construct()
 {
     //        $this->middleware('auth');
     // Fetch the Site Settings object
     $this->currentModelName = Lang::get('crud.shiaiCategory');
     View::share('currentModelName', $this->currentModelName);
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     if (Auth::check()) {
         return Redirect::to('/profile');
     }
     return View::make('user-package::registration.create');
 }
示例#29
0
 public function login()
 {
     Session::set('admin_lock_url', null);
     $loginForm = new KForm();
     $loginForm->addField(FormFieldBase::createByType('login', FormFieldBase::Type_Text)->setRules('required')->setLabel('请输入工号'));
     $loginForm->addField(FormFieldBase::createByType('password', FormFieldBase::Type_Password)->setRules('required')->setLabel('请输入密码'));
     if (AuthModel::user() !== null) {
         return Redirect::action('admin.index');
     }
     if (Request::isMethod('POST')) {
         //是管理员登陆请求
         if ($loginForm->validation()) {
             $login = $loginForm->value('login');
             $password = $loginForm->value('password');
             if (AuthModel::attempt(['employee_id' => $login, 'password' => $password])) {
                 $admin = AuthModel::getUser();
                 $admin->last_login = new \Carbon\Carbon();
                 $admin->save();
                 return Redirect::action('admin.index');
             } else {
                 $loginForm->set_error('password', '错误的用户名或密码');
             }
         } else {
             //
         }
     }
     $this->layout = View::make('laravel-cms::admin-lte/login')->with('form', $loginForm);
 }
示例#30
-2
 public function submitForm(Request $request)
 {
     //Get input
     $input = Input::all();
     //Date
     $input["Date"] = date("j/ n/ Y");
     //Bools for Parties
     if ($input["party"] == "Republican") {
         $input["Rep"] = "Yes";
     } else {
         $input["Dem"] = "Yes";
     }
     //concat name
     $input["Voter_Name"] = $input["first_name"] . " " . $input["last_name"];
     $contents = Storage::disk('local');
     $storagePath = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix();
     // $contents = Storage::get('reg.pdf');
     //Save as FDF
     $fdf = new FdfFile($input);
     $fdf->saveAs('data.fdf');
     $docId = md5(uniqid(rand(), true));
     //Save as Pdf
     $pdf = new Pdf($storagePath . 'template.pdf');
     $pdf->fillForm($fdf->getFileName())->saveAs($storagePath . "generated/" . $docId . '.pdf');
     //Setting up Lob
     $apiKey = env('LOB_KEY');
     $lob = new \Lob\Lob($apiKey);
     //Send the letter
     $letter = $lob->letters()->create(array('description' => 'Voter Registration', 'to[name]' => 'Town Clerk', 'to[address_line1]' => '230 Main St, Ste 108', 'to[address_city]' => 'Brattleboro', 'to[address_zip]' => '05301', 'to[address_state]' => 'VT', 'to[address_country]' => 'US', 'from[name]' => 'Benjamin Franklin', 'from[address_line1]' => '123 Fake Street', 'from[address_city]' => 'Philadelphia', 'from[address_zip]' => '94041', 'from[address_state]' => 'PA', 'from[address_country]' => 'US', 'file' => '@' . realpath($storagePath . "generated/" . $docId . '.pdf'), 'color' => false));
     $letter['file'] = $storagePath . "generated/" . $docId . '.pdf';
     return View::make('thanks', $letter)->with('data', $letter);
 }