Commit 1f2c42df by Prasong Putichanchai

update user con

parent c06a328c
...@@ -92,10 +92,24 @@ class AppController extends Controller { ...@@ -92,10 +92,24 @@ class AppController extends Controller {
$this->request->session()->write('SessionLanguage', 'tha'); $this->request->session()->write('SessionLanguage', 'tha');
} }
$this->checkSessionAuth();
$this->Auth->allow(['signin', 'signout', 'signup', 'verify']); $this->Auth->allow(['signin', 'signout', 'signup', 'verify']);
} }
/** /**
*
* Function check for session
* @author sarawutt.b
* @return void
*/
public function checkSessionAuth() {
$currentPath = strtolower(trim($this->request->here));
if (!empty($this->Auth->user('id')) && ($currentPath == '/')) {
return $this->redirect(Configure::read('RedirectApplicationURL'));
}
}
/**
* Before render callback. * Before render callback.
* *
* @param \Cake\Event\Event $event The beforeRender event. * @param \Cake\Event\Event $event The beforeRender event.
......
...@@ -17,40 +17,40 @@ ...@@ -17,40 +17,40 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800%7CShadows+Into+Light" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800%7CShadows+Into+Light" rel="stylesheet" type="text/css">
<!-- Vendor CSS --> <!-- Vendor CSS -->
<?php echo $this->Html->css('/css/pakgon.css'); ?> <?php echo $this->Html->css('/css/pakgon.css'); ?>
<?php echo $this->Html->css('/css/bootstrap/css/bootstrap.min') ?> <?php echo $this->Html->css('/css/bootstrap/css/bootstrap.min'); ?>
<?php echo $this->Html->css('/css/font-awesome/css/font-awesome.min') ?> <?php echo $this->Html->css('/css/font-awesome/css/font-awesome.min'); ?>
<?php echo $this->Html->css('/css/animate/animate.min') ?> <?php echo $this->Html->css('/css/animate/animate.min'); ?>
<?php echo $this->Html->css('/css/simple-line-icons/css/simple-line-icons.min') ?> <?php echo $this->Html->css('/css/simple-line-icons/css/simple-line-icons.min'); ?>
<?php echo $this->Html->css('/css/owl.carousel/assets/owl.carousel.min') ?> <?php echo $this->Html->css('/css/owl.carousel/assets/owl.carousel.min'); ?>
<?php echo $this->Html->css('/css/owl.carousel/assets/owl.theme.default.min') ?> <?php echo $this->Html->css('/css/owl.carousel/assets/owl.theme.default.min'); ?>
<?php echo $this->Html->css('/css/magnific-popup/magnific-popup.min') ?> <?php echo $this->Html->css('/css/magnific-popup/magnific-popup.min'); ?>
<!-- Theme CSS --> <!-- Theme CSS -->
<?php echo $this->Html->css('/css/css/theme') ?> <?php echo $this->Html->css('/css/css/theme'); ?>
<?php echo $this->Html->css('/css/css/theme-elements') ?> <?php echo $this->Html->css('/css/css/theme-elements'); ?>
<?php echo $this->Html->css('/css/css/theme-blog') ?> <?php echo $this->Html->css('/css/css/theme-blog'); ?>
<?php echo $this->Html->css('/css/css/theme-shop') ?> <?php echo $this->Html->css('/css/css/theme-shop'); ?>
<!-- Skin CSS --> <!-- Skin CSS -->
<?php echo $this->Html->css('/css/css/skins/default') ?> <?php echo $this->Html->css('/css/css/skins/default'); ?>
<?php echo $this->Html->script('/js/master/style-switcher/style.switcher.localstorage'); ?> <?php echo $this->Html->script('/js/master/style-switcher/style.switcher.localstorage'); ?>
<!-- Theme Custom CSS --> <!-- Theme Custom CSS -->
<?php echo $this->Html->css('/css/css/custom') ?> <?php echo $this->Html->css('/css/css/custom'); ?>
<!-- Head Libs --> <!-- Head Libs -->
<?php echo $this->Html->script('/js/modernizr/modernizr.min'); ?> <?php echo $this->Html->script('/js/modernizr/modernizr.min'); ?>
<!-- APP --> <!-- APP -->
<?php echo $this->Html->script('custom/core'); ?> <?php echo $this->Html->script('custom/core'); ?>
<?php echo $this->Html->css('/css/pakgon.css'); ?> <?php echo $this->Html->css('/css/pakgon.css'); ?>
<style> <style type="text/css">
@font-face { @font-face {
font-family: 'Conv_supermarket'; font-family: 'Conv_supermarket';
src: url('../font/fonts/supermarket.eot'); src: url('/font/fonts/supermarket.eot');
src: local('☺'), url('../font/fonts/supermarket.woff') format('woff'), url('../font/fonts/supermarket.ttf') format('truetype'), url('../font/fonts/supermarket.svg') format('svg'); src: local('☺'), url('/font/fonts/supermarket.woff') format('woff'), url('/font/fonts/supermarket.ttf') format('truetype'), url('/font/fonts/supermarket.svg') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
</style> </style>
<?php echo $this->Html->script('/js/jquery/jquery-1.11.3.min'); ?> <?php echo $this->Html->script('/js/jquery/jquery-1.11.3.min'); ?>
<!-- Isolated Version of Bootstrap, not needed if your site already uses Bootstrap --> <!-- Isolated Version of Bootstrap, not needed if your site already uses Bootstrap -->
<?php echo $this->Html->css('/css/css/bootstrap-iso') ?> <?php echo $this->Html->css('/css/css/bootstrap-iso'); ?>
<?php echo $this->Html->script('/js/jquery/alex-date-time'); ?> <?php echo $this->Html->script('/js/jquery/alex-date-time'); ?>
<?php echo $this->Html->css('/css/chosen_v151/bootstrap-chosen/bootstrap-chosen.css'); ?> <?php echo $this->Html->css('/css/chosen_v151/bootstrap-chosen/bootstrap-chosen.css'); ?>
<?php echo $this->Html->script('/css/chosen_v151/chosen.jquery.min.js'); //Chosen select box?> <?php echo $this->Html->script('/css/chosen_v151/chosen.jquery.min.js'); //Chosen select box?>
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
</div> </div>
</div> </div>
</div> </div>
<?php echo $this->Html->script('/js/cleave-phone.th'); ?> <?php echo $this->Html->script('/js/cleave-phone.th'); ?>
<?php echo $this->Html->script('/js/cleave.min'); ?> <?php echo $this->Html->script('/js/cleave.min'); ?>
<?php echo $this->Html->script('jquery.appear/jquery.appear.min'); ?> <?php echo $this->Html->script('jquery.appear/jquery.appear.min'); ?>
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
$this->marginInRows=($marginInRows>0 && $marginInRows<10) ? $marginInRows:4; $this->marginInRows=($marginInRows>0 && $marginInRows<10) ? $marginInRows:4;
$this->debug = ($debug==true)? true:false; $this->debug = ($debug==true)? true:false;
} }
public function generate(){ public function generate(){
$QRLink = "https://chart.googleapis.com/chart?cht=qr&chs=".$this->size."x".$this->size. "&chl=" . $this->data . $QRLink = "https://chart.googleapis.com/chart?cht=qr&chs=".$this->size."x".$this->size. "&chl=" . $this->data .
"&choe=" . $this->encoding . "&choe=" . $this->encoding .
"&chld=" . $this->errorCorrectionLevel . "|" . $this->marginInRows; "&chld=" . $this->errorCorrectionLevel . "|" . $this->marginInRows;
if ($this->debug) echo $QRLink; if ($this->debug) echo $QRLink;
return $QRLink; return $QRLink;
} }
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
<div class="row"> <div class="row">
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow" ></div> <div class="col-xs-1 col-sm-1 col-md-1 box-arrow" ></div>
<div class="col-xs-10 col-sm-10 col-md-10"> <div class="col-xs-10 col-sm-10 col-md-10">
<div data-toggle="modal" data-target="#defaultModal" style="text-align: center; cursor: pointer;"> <div data-toggle="modal" data-target="#defaultModal" style="text-align: center; cursor: pointer;">
<img src="/img/core/img/connect-card-v3.png" class="img-responsive" id="img-upload" alt="Profile picture"> <img src="/img/core/img/connect-card-v3.png" class="img-responsive" id="img-upload" alt="Profile picture">
...@@ -193,7 +192,7 @@ ...@@ -193,7 +192,7 @@
<div class="col-xs-12 col-sm-12 col-md-12"> <div class="col-xs-12 col-sm-12 col-md-12">
<div class="modal fade" id="defaultModal" tabindex="-1" role="dialog" aria-labelledby="defaultModalLabel" aria-hidden="true"> <div class="modal fade" id="defaultModal" tabindex="-1" role="dialog" aria-labelledby="defaultModalLabel" aria-hidden="true">
<div class="modal-dialog box-ads"> <div class="modal-dialog box-ads">
<a class="close-modal" data-dismiss="modal">X </a> <a class="close-modal" data-dismiss="modal">X </a>
<div class="container login-container"> <div class="container login-container">
<div class="owl-carousel owl-theme" data-plugin-options="{'items': 1}"> <div class="owl-carousel owl-theme" data-plugin-options="{'items': 1}">
<div> <div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment