Example #1
0
 /**
  * Authenticating Login System.
  * GET /login
  *
  * @return Response
  */
 public function login()
 {
     if (Sentry::check()) {
         Session::reflash();
         return Redirect::to('dashboard');
     }
     return View::make('auth.login');
 }
Example #2
0
 public function login()
 {
     if (Auth::check()) {
         Session::reflash();
         return Redirect::to('admin');
     }
     return View::make('login')->withTitle('Login');
 }
Example #3
0
File: home.php Project: ajb/rfpez
 public function action_index()
 {
     if (Auth::check()) {
         if (Auth::user()->officer) {
             Session::reflash();
             return Redirect::to_route('my_projects');
         } else {
             Session::reflash();
             if (Auth::user()->vendor && Bid::where_vendor_id(Auth::vendor()->id)->count()) {
                 return Redirect::to_route('my_bids');
             } else {
                 return Redirect::to_route('projects');
             }
         }
     } else {
         $view = View::make('home.index_signed_out');
     }
     $this->layout->content = $view;
 }
 public function postPrint()
 {
     Session::reflash();
     $result = NULL;
     $tpl_id = Input::get('template', 0);
     $count = Input::get('count', 1);
     $type = Input::get('type');
     $voucher_ids = Session::get('vouchers', ['0']);
     $parser = new TemplateParser();
     $template = VoucherTemplate::find($tpl_id);
     switch ($type) {
         case 'prepaid_voucher':
             $vouchers = Voucher::variables($voucher_ids);
             break;
         case 'refill_coupon':
             $vouchers = refillcoupons::variables($voucher_ids);
             break;
         default:
             throw new Exception("Could not determine form type. Could not proceed.");
             break;
     }
     $i = 1;
     foreach ($vouchers as $voucher) {
         $parser->initData((array) $voucher);
         $result .= $parser->parseTemplateData($template->body);
         if ($i % $count == 0) {
             $result .= "<br />";
         } else {
             $result .= "&nbsp;";
         }
         $i++;
     }
     if ($i > 1) {
         $result .= "<br />" . Form::button('Print This Page', ['onclick' => 'window.print()', 'class' => 'btn btn-primary col-lg-offset-1']);
     } else {
         $result = "Please select atleast one voucher";
     }
     return View::make('admin.vouchers.print')->with('vouchers', $result);
 }
Example #5
0
 /**
  * Display a listing of the resource.
  * GET /
  *
  * @return Response
  */
 public function index($token = null)
 {
     $initialLocations = [];
     $mainTags = $this->tagRepository->findWithoutParent();
     $allLocations = $this->locationRepository->findAllWithOutImages();
     $allLocationsImg = $this->locationRepository->findAll();
     $showModalLogin = Input::get('showModalLogin');
     $myRankings = [];
     if (!is_null($token)) {
         Session::flash('token', $token);
         Session::flash('showReset', true);
         Session::flash('showSideBar', true);
         return View::make('app.layouts.master', compact('mainTags', 'allLocations'));
     }
     if ($showModalLogin) {
         Session::reflash();
     }
     $showModalRegister = Input::get('showModalRegister');
     if (Auth::check()) {
         $myRankings = $this->locationRepository->findRankingsByUser(Auth::user()->id);
     }
     return View::make('app.layouts.master', compact('mainTags', 'allLocations', 'allLocationsImg', 'showModalLogin', 'showModalRegister', 'myRankings'));
 }
 public function show_payment($invitationKey)
 {
     // For PayPal Express we redirect straight to their site
     $invitation = Invitation::with('invoice.client.account', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail();
     $account = $invitation->invoice->client->account;
     if ($account->isGatewayConfigured(GATEWAY_PAYPAL_EXPRESS)) {
         if (Session::has('error')) {
             Session::reflash();
             return Redirect::to('view/' . $invitationKey);
         } else {
             return self::do_payment($invitationKey, false);
         }
     }
     $invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail();
     $invoice = $invitation->invoice;
     $client = $invoice->client;
     $accountGateway = $invoice->client->account->account_gateways[0];
     $gateway = $invoice->client->account->account_gateways[0]->gateway;
     $paymentLibrary = $gateway->paymentlibrary;
     $acceptedCreditCardTypes = $accountGateway->getCreditcardTypes();
     $data = ['showBreadcrumbs' => false, 'hideHeader' => true, 'url' => 'payment/' . $invitationKey, 'amount' => $invoice->amount, 'client' => $client, 'contact' => $invitation->contact, 'paymentLibrary' => $paymentLibrary, 'gateway' => $gateway, 'acceptedCreditCardTypes' => $acceptedCreditCardTypes, 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), 'currencyId' => $client->currency_id];
     return View::make('payments.payment', $data);
 }
Example #7
0
 /**
  * Displays the login form
  *
  */
 public function login()
 {
     if (Confide::user()) {
         Event::fire('user.login');
         Session::reflash();
         return Redirect::to('/dashboard');
     } else {
         return View::make(Config::get('confide::login_form'));
     }
 }
Example #8
0
| and give it the controller to call when that URI is requested.
|
*/
// send users to the home page
$router->get('/', ['as' => 'base', function () {
    Session::flash('', '');
    // work around laravel bug if there is no session yet
    Session::reflash();
    return Redirect::to(Config::get('core.home', 'pages/home'));
}]);
// send users to the posts page
if (Config::get('cms.blogging')) {
    $router->get('blog', ['as' => 'blog', function () {
        Session::flash('', '');
        // work around laravel bug if there is no session yet
        Session::reflash();
        return Redirect::route('blog.posts.index');
    }]);
}
// page routes
$router->resource('pages', 'PageController');
// blog routes
if (Config::get('cms.blogging')) {
    $router->resource('blog/posts', 'PostController');
    $router->resource('blog/posts.comments', 'CommentController');
}
// event routes
if (Config::get('cms.events')) {
    $router->resource('events', 'EventController');
}
// caching routes
Example #9
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($publicId)
 {
     Session::reflash();
     return Redirect::to('invoices/' . $publicId . '/edit');
 }
 /**
  * Displays the login form
  *
  */
 public function login()
 {
     if (Confide::user()) {
         Event::fire('user.login');
         Session::reflash();
         return Redirect::to('/dashboard');
         /*
         $invoice = Invoice::scope()->orderBy('id', 'desc')->first();
         
         if ($invoice)
         {
             return Redirect::to('/invoices/' . $invoice->public_id);
         }
         else
         {
             return Redirect::to('/dashboard');
         }
         */
     } else {
         return View::make(Config::get('confide::login_form'));
     }
 }
Example #11
0
 public function silentReload()
 {
     Session::reflash();
     $this->silentLoad();
     return Redirect::route('estimateHome');
 }
Example #12
0
/**
 * Reflash all of the session flash data
 * @return void
 */
function zbase_sessions_reflash()
{
    \Session::reflash();
}