public function getFeed()
 {
     $feed = Feed::make();
     //$feed->clearCache();
     $feed->setCache(180, 'shantavo-feed');
     if (!$feed->isCached()) {
         $pictures = Picture::orderBy('uploaded_at', 'desc')->take(20)->get();
         $feed->title = 'Нещо Шантаво';
         $feed->description = 'Последни снимки';
         $feed->link = 'https://neshto.shantavo.com/';
         $feed->logo = "https://neshto.shantavo.com/favicon.png";
         $feed->icon = "https://neshto.shantavo.com/favicon.png";
         $feed->pubdate = $pictures[0]->uploaded_at;
         $feed->lang = 'bg';
         $feed->setDateFormat('datetime');
         foreach ($pictures as $picture) {
             $feed->add($picture->title, $picture->user->username, secure_url('picture/' . $picture->id), $picture->uploaded_at, $picture->title, $picture->title);
         }
     }
     return $feed->render('atom');
 }
Beispiel #2
0
 /**
  * Request GitHub access
  *
  * @param string $scope  A comma separated list of scopes
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function requestGithubAccess($scope)
 {
     $clientId = $this->config['client_id'];
     $redirectUri = secure_url('/getaccesstoken');
     $state = csrf_token();
     return Redirect::to('https://github.com/login/oauth/authorize?client_id=' . $clientId . '&redirect_uri=' . $redirectUri . '&scope=' . $scope . '&state=' . $state);
 }
 /**
  * Handle the event.
  *
  * @param  UserWasRegistered $event
  *
  * @return mixed
  */
 public function handle(UserWasRegistered $event)
 {
     $user = $event->user;
     $receiver = $user->email;
     $subject = $this->subject();
     $data = ['user' => $user->present()->firstName, 'code' => $user->confirmation_code, 'link_' => secure_url(route('account.activate', ['code' => $user->confirmation_code]))];
     return $this->mailer->queue('emails.activation', compact('data'), function ($m) use($receiver, $subject) {
         $m->to($receiver);
         $m->subject($subject);
     });
 }
 /**
  * Remove the specified session from storage.
  * DELETE /session/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     // Check if already logged in
     if (Auth::check()) {
         // Close the session
         Auth::logout();
         Session::flush();
         Session::flash('alert_success', 'Logged out successfully.');
     }
     // Return to home page
     return Redirect::to(secure_url('/login'));
 }
 /**
  * Store a newly created resource in storage.
  * POST /user
  *
  * @return Response
  */
 public function store()
 {
     $validator = Validator::make($data = Input::all(), User::$rules);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     $data = $this->prepareUserRegistration();
     try {
         User::create($data);
         Session::flash('alert_success', 'User account created successfully. Please log in.');
         return Redirect::to(secure_url('/login'));
     } catch (\RuntimeException $e) {
         // dd($e->getMessage()); // debug
         Session::flash('alert_danger', 'Failed to create User account.');
         return Redirect::back()->withInput();
     }
 }
Beispiel #6
0
 /**
  * STATUS CODE
  * -----------
  * 0: Created
  * 1: Confirmed
  * 2: Suspended
  * 3: Deleted
  */
 public static function boot()
 {
     parent::boot();
     // Setup event bindings...
     Subscription::created(function ($subscription) {
         $user = $subscription->user;
         $project_id = $subscription->project_id;
         $confirm_url = secure_url('subscriptions/' . $subscription->confirm_token);
         if ($subscription->project_id == 0) {
             $map_image_link = 'https://api.tiles.mapbox.com/v4/codeforafrica.ji193j10' . '/geojson(' . urlencode($subscription->geojson) . ')' . '/auto/600x250.png?' . 'access_token=pk.eyJ1IjoiY29kZWZvcmFmcmljYSIsImEiOiJVLXZVVUtnIn0.JjVvqHKBGQTNpuDMJtZ8Qg';
         } else {
             $map_image_link = 'http://api.tiles.mapbox.com/v4/codeforafrica.ji193j10/' . $subscription->geojson . '/600x250.png256?' . 'access_token=pk.eyJ1IjoiY29kZWZvcmFmcmljYSIsImEiOiJVLXZVVUtnIn0.JjVvqHKBGQTNpuDMJtZ8Qg';
             $project_title = $subscription->project->title;
         }
         $data = compact('subscription', 'user', 'project_id', 'project_title', 'map_image_link', 'confirm_url');
         \Mail::queue('emails.subscription.new', $data, function ($message) use($user) {
             $message->to($user->email)->subject('#GreenAlert | Confirm Subscription!');
         });
     });
 }
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>

<div class="row" id="signup-form">

  <form method="POST" action="<?php 
echo $settings->enable_https ? secure_url('signup') : URL::to('signup');
?>
" class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1" id="payment-form">
    
    <input name="_token" type="hidden" value="<?php 
echo csrf_token();
?>
">
      
      <div class="panel panel-default registration">
        
        <div class="panel-heading">
          
          <div class="row">
                  
              <h1 class="panel-title col-lg-7 col-md-8 col-sm-6"><?php 
echo ThemeHelper::getThemeSetting(@$theme_settings->signup_message, 'Signup to Gain access to all content on the site for $7 a month.');
?>
</h1>

              <div class="cc-icons col-lg-5 col-md-4">
                  <img src="<?php 
echo THEME_URL;
?>
/assets/img/credit-cards.png" alt="All Credit Cards Supported" />
              </div>
Beispiel #8
0
 public function getTicketImageUrlAttribute()
 {
     return secure_url('img/tickets/' . $this->year . '/' . $this->slug . '.png');
 }
<div class="container">

    <?php 
if (Session::has('notification')) {
    ?>
        <span class="notification"><?php 
    echo Session::get('notification');
    ?>
</span>
    <?php 
}
?>
     

    <form method="POST" action="<?php 
echo $settings->enable_https ? secure_url('password/reset') : URL::to('password/reset');
?>
" accept-charset="UTF-8" class="form-signin">
        <?php 
if (Session::has('error')) {
    ?>
          <span class="error"><?php 
    echo trans(Session::get('reason'));
    ?>
</span>
        <?php 
} elseif (Session::has('success')) {
    ?>
          <span class="success"><?php 
    echo Lang::get('lang.email_sent');
    ?>
 /**
  * @param Request $request
  * @return $this|\Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\Response
  */
 protected function getLoginResponse(Request $request)
 {
     if ($this->data === AuthContract::ACCOUNT_NOT_ACTIVATED) {
         // user's account isn't activated
         return $this->getAccountActivationResponse($request);
     }
     if ($this->data === AuthContract::ACCOUNT_DISABLED) {
         // user's account is disabled
         return $this->getAccountDisabledResponse($request);
     }
     if ($request->ajax()) {
         if (!$this->data) {
             return response()->json(["message" => $this->loginErrorMessage], 401);
         }
         return response()->json(["target" => secure_url(session("url.intended", $this->redirectPath()))]);
     } else {
         if (!$this->data) {
             flash()->error($this->loginErrorMessage);
             return redirect($this->loginPath())->withInput($request->only('email', 'remember'));
         }
         return redirect()->intended($this->redirectPath());
     }
 }
 /**
  * @return string
  */
 private function filesystemEndpoint() : string
 {
     return rtrim(secure_url($this->config->get(sprintf('filesystems.disks.%s.public', $this->config->get('filesystems.default')))), '/');
 }
			<h3 class="panel-title"><i class="fa fa-exclamation-sign"></i> <?php 
echo lang('error');
?>
</h3>
		
		</div>

		<div class="panel-body">


			<p>

			<?php 
switch ($status_code) {
    case 426:
        printf(lang('error_' . $status_code), secure_url());
        break;
    default:
        echo lang('error_' . $status_code);
}
?>


			</p>

		

		</div>

	</div><!-- /panel -->
 /**
  * 결제창 호출
  * @param Request $request
  * @param $method
  * @return mixed
  */
 public function getPayment(Request $request, $method)
 {
     list($order_code, $goodname, $price, $buyername, $buyertel, $buyeremail, $identifier) = $this->preparePayment($request, $this->paymethod[$method]);
     if (in_array($method, $this->selfPaymethod)) {
         // 자체 포인트 / 마일리지 결제
         list($result, $msg) = $this->doSelfPayment($order_code, $goodname, $identifier, $method, $price);
         if (!$result) {
             return $this->paymentFailed($request, $msg);
         } else {
             return $this->paymentComplete($order_code, $identifier, $method, '', $price);
         }
     } else {
         // 이니시스 결제
         $config = config('inicis');
         $dev_mode = $config['dev_mode'];
         $merchantData = ['order_code' => $order_code, 'identifier' => $identifier, 'method' => $method];
         if (Agent::isMobile()) {
             if ($config['ssl']) {
                 $nexturl = secure_url($config['base_url'] . '/next');
                 $notiurl = url($config['base_url'] . '/noti');
                 $returnurl = secure_url($config['base_url'] . '/mobile-return');
             } else {
                 $nexturl = url($config['base_url'] . '/next');
                 $notiurl = url($config['base_url'] . '/noti');
                 $returnurl = url($config['base_url'] . '/mobile-return');
             }
             $appScheme = $this->getAppScheme();
             $dataField = ['P_MID' => $config['mid'], 'P_OID' => $order_code, 'P_AMT' => $price, 'P_UNAME' => $buyername, 'P_NOTI' => urlencode(serialize($merchantData)), 'P_GOODS' => $goodname, 'P_MOBILE' => $buyertel, 'P_EMAIL' => $buyeremail, 'P_CHARSET' => 'utf8'];
             $targetUrl = '';
             switch ($method) {
                 case 'card':
                     $targetUrl = 'https://mobile.inicis.com/smart/wcard/';
                     $dataField['P_RESERVED'] = 'twotrs_isp=Y&block_isp=Y&twotrs_isp_noti=N&apprun_check=Y&app_scheme=' . $appScheme;
                     $dataField['P_NEXT_URL'] = $nexturl;
                     break;
                 case 'hp':
                     $targetUrl = 'https://mobile.inicis.com/smart/mobile/';
                     $dataField['P_HPP_METHOD'] = '1';
                     $dataField['P_NEXT_URL'] = $nexturl;
                     break;
                 case 'va':
                     $targetUrl = 'https://mobile.inicis.com/smart/vbank/';
                     $dataField['P_RESERVED'] = 'vbank_receipt=Y';
                     $dataField['P_NOTI_URL'] = $notiurl;
                     $dataField['P_RETURN_URL'] = $returnurl;
                     $dataField['P_NEXT_URL'] = $nexturl;
                     break;
                 case 'ra':
                     $targetUrl = 'https://mobile.inicis.com/smart/bank/';
                     $dataField['P_NOTI_URL'] = $notiurl;
                     $dataField['P_RETURN_URL'] = $returnurl;
                     break;
             }
             return view('inicis::mobile.pay_request')->with(compact('dataField', 'targetUrl'));
         } else {
             $timestamp = INIStdPayUtil::getTimestamp();
             $sign = hash('sha256', 'oid=' . $order_code . '&price=' . $price . '&timestamp=' . $timestamp);
             $mKey = hash('sha256', $config['signKey']);
             if ($config['ssl']) {
                 $returnUrl = secure_url($config['base_url'] . '/return');
                 $closeUrl = secure_url($config['base_url'] . '/close');
                 $popupUrl = secure_url($config['base_url'] . '/popup');
             } else {
                 $returnUrl = url($config['base_url'] . '/return');
                 $closeUrl = url($config['base_url'] . '/close');
                 $popupUrl = url($config['base_url'] . '/popup');
             }
             $dataField = ['version' => '1.0', 'mid' => $config['mid'], 'oid' => $order_code, 'goodname' => $goodname, 'price' => $price, 'currency' => 'WON', 'buyername' => $buyername, 'buyertel' => $buyertel, 'buyeremail' => $buyeremail, 'timestamp' => $timestamp, 'signature' => $sign, 'returnUrl' => $returnUrl, 'payViewType' => $config['payViewType'], 'closeUrl' => $closeUrl, 'popupUrl' => $popupUrl, 'mKey' => $mKey, 'merchantData' => urlencode(serialize($merchantData))];
             // 결제수단 고정
             switch ($method) {
                 case 'card':
                     $dataField['gopaymethod'] = 'Card';
                     break;
                 case 'ra':
                     $dataField['gopaymethod'] = 'DirectBank';
                     break;
                 case 'va':
                     $dataField['gopaymethod'] = 'VBank';
                     break;
                 case 'hp':
                     $dataField['gopaymethod'] = 'HPP';
                     break;
             }
             // 결제 옵션 추가
             $option = $this->parseConfig($config[$method . '_option']);
             $dataField = array_merge($dataField, $option);
             return view('inicis::pay_request')->with(compact('dataField', 'dev_mode'));
         }
     }
 }
Beispiel #14
0
								<div class="col-md-6">
									<div class="feature-info">
										<h2><?php 
    echo $video->title;
    ?>
</h2>
										<div class="feature_duration"><i class="fa fa-clock-o"></i> <?php 
    echo TimeHelper::convert_seconds_to_HMS($video->duration);
    ?>
</div>
										<p><?php 
    echo $video->description;
    ?>
</p>
										<a href="<?php 
    echo $settings->enable_https ? secure_url('video') : URL::to('video');
    echo '/' . $video->id;
    ?>
" class="btn btn-primary">Watch Now</a>
									</div>

								</div>

							</div>
							<div style="clear:both"></div>
						</li>
					<?php 
}
?>

				</ul>
 public function logout()
 {
     // Removing session data
     redirect(secure_url('recruiter'));
 }
 public function logout()
 {
     // Removing session data
     redirect(secure_url($curr_lang . '/candidate'));
 }
 public function logout()
 {
     // Removing session data
     redirect(secure_url($curr_lang . '/site_admin'));
 }
Beispiel #18
0
" method="post" accept-charset="UTF-8" class="form-horizontal">
						<fieldset>
							<legend>
								<?php 
echo lang('auth_login');
?>

								<?php 
if (empty($_SERVER['HTTPS'])) {
    ?>

									- <?php 
    echo conf('sitename');
    ?>
<a href="<?php 
    echo secure_url();
    ?>
"><i title="<?php 
    echo lang('auth_insecure');
    ?>
" class="text-danger fa fa-unlock-alt pull-right"></i></a>

								<?php 
} else {
    ?>

									<i title="<?php 
    echo lang('auth_secure');
    ?>
" class="text-success fa fa-lock pull-right"></i>
Beispiel #19
0
    }
});
/*
|--------------------------------------------------------------------------
| CSRF Protection Filter
|--------------------------------------------------------------------------
|
| The CSRF filter is responsible for protecting your application against
| cross-site request forgery attacks. If this special token in a user
| session does not match the one given in this request, we'll bail.
|
*/
Route::filter('csrf', function () {
    if (Session::token() !== Input::get('_token')) {
        throw new Illuminate\Session\TokenMismatchException();
    }
});
/**
 * Custom Filters
 */
// Only allow owner to see this record
Route::filter('ownerMARecord', function ($route) {
    $ma_id = $route->getParameter('mentor_activities');
    // Check if owner
    $record = MentorActivity::getMA($ma_id);
    $isOwner = $record->user_id === Session::get('user_id');
    if (!$isOwner) {
        Session::flash('alert_danger', 'Access denied. You do not have access to the requested page.');
        return Redirect::to(secure_url('/dashboard'));
    }
});
Beispiel #20
0
/**
 * Generates a secure url to a route
 *
 * @param $name
 * @param array $params
 * @return string
 */
function link_to_secure_route($name, array $params = [])
{
    $url = route($name, $params);
    return secure_url($url);
}
<?php

foreach ($posts as $post) {
    ?>

<?php 
    $post_description = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', strip_tags($post->body));
    ?>

<div class="col-md-3 col-sm-6 col-xs-12">
	<article class="block">
		<a class="block-thumbnail" href="<?php 
    echo $settings->enable_https ? secure_url('post') : URL::to('post');
    echo '/' . $post->slug;
    ?>
">
			<div class="thumbnail-overlay"></div>
			<img src="<?php 
    echo ImageHandler::getImage($post->image, 'medium');
    ?>
">
			<div class="details">
				<h2><?php 
    echo $post->title;
    ?>
</h2>
				<span><?php 
    echo TimeHelper::convert_seconds_to_HMS($post->duration);
    ?>
</span>
			</div>
 /**
  * Returns the primary navigation array.
  *
  * @return array  of [key => url]
  */
 public function getNavigationPrimary()
 {
     $nav = ['home' => url('/'), 'boards' => url('boards.html'), 'recent_posts' => url('overboard.html'), 'panel' => url('cp')];
     if ($this->hasDB()) {
         global $app;
         $manager = $app->make(UserManager::class);
         if ($manager->user && $manager->user->canCreateBoard()) {
             $nav['new_board'] = url("cp/boards/create");
         }
     }
     if (env('CONTRIB_ENABLED', false)) {
         $nav['contribute'] = url("contribute");
         $nav['donate'] = secure_url("cp/donate");
     }
     if ($this->get('adventureEnabled')) {
         $nav['adventure'] = url("cp/adventure");
     }
     return $nav;
 }
Beispiel #23
0
    echo $category->name;
    ?>
</a></li>
						<?php 
}
?>
					</ul>
				</div>
				<div class="col-md-2">
					<h4>Links</h3>
					<ul>
						<?php 
foreach ($pages as $page) {
    ?>
							<li><a href="<?php 
    echo $settings->enable_https ? secure_url('/') : URL::to('page');
    echo '/' . $page->slug;
    ?>
"><?php 
    echo $page->title;
    ?>
</a></li>
						<?php 
}
?>
						<li><a href="/login">Login</a></li>
						<li><a href="/signup">Signup</a></li>
					</ul>
				</div>
			</div>
 /**
  * Remove the specified mentoractivity from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     MentorActivity::destroy($id);
     // return Redirect::route('mentor_activities.index');
     return Redirect::to(secure_url('/dashboard'));
 }
Beispiel #25
-9
 public static function createLink($link = NULL)
 {
     if (!is_null($link) && $link != "/" && mb_substr($link, 0, 1) != '/') {
         $link = '/' . $link;
     }
     #Helper::dd($link);
     #return url($link);
     return $link;
     $_locale = Session::get('locale');
     if (!is_null($_locale)) {
         $string = $_locale . $link;
         if (Request::secure()) {
             return secure_url($string);
         } else {
             return url($string);
         }
     } else {
         return url($link);
     }
 }