Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
smart_core_connect
/
core-connect
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
45b027dd
authored
May 31, 2018
by
Prasong Putichanchai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update view card
parent
dfe63f32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
611 additions
and
579 deletions
+611
-579
www/src/Template/UserCards/view_card.ctp
+611
-579
No files found.
www/src/Template/UserCards/view_card.ctp
View file @
45b027dd
<?php
<?php
use Cake\I18n\Time;
use Cake\I18n\Time;
?>
?>
<div class="owl-carousel owl-theme" data-plugin-options="{'items': 1}">
<div class="row">
<?php foreach ($UserCards as $value) { #pr($value);die;?>
<div class="owl-carousel owl-theme" data-plugin-options="{'items': 1}">
<div class="row">
<?php foreach ($UserCards as $value) { ?>
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow">
<div class="row">
<div>
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow left">
<i class = "fa fa-angle-left prev" > </i>
<i class="fa fa-angle-left prev"> </i>
</div>
</div>
</div>
<div class="col-xs-10 col-sm-10 col-md-10">
<div class="col-xs-9 col-sm-9 col-md-9 box-card">
<div class="box-card">
<div data-toggle="modal" data-target="#defaultModal" style="cursor: pointer; padding-right: 10px; padding-left: 10px;">
<div data-toggle="modal" data-target="#defaultModal" style="cursor: pointer; padding-right: 10px; padding-left: 10px;">
<div class="row">
<div class="row">
<!-- <div class="col-xs-1">
<div class="col-xs-8">
</div> -->
<div style="font-size: 17px">
<div class="col-xs-8">
<br>
<div style="font-size: 17px">
<label>id<label>
<br>
</div>
<label>id<label>
<div>
</div>
<?php echo $value['card_code'] ?>
<div>
</div>
<?php echo $value['card_code'] ?>
<div>
</div>
<label style="font-size: 17px">ชื่อ</label>
<div>
<?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
<label style="font-size: 17px">ชื่อ</label> <?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
</div>
</div>
</div>
</div>
<div class="col-xs-4">
<div class="col-xs-4">
<img src="/img/core/img/user-profile@3x.png" class="img-responsive">
<img src="/img/core/img/user-profile@3x.png" class="img-responsive">
</div>
</div>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-xs-10">
<!-- <div class="col-xs-1">
<label style="font-size: 17px">ตำแหน่ง</label>
</div> -->
<?php echo $value['position_name'] ?>
<div class="col-xs-10">
</div>
<label style="font-size: 17px">ตำแหน่ง</label> <?php echo $value['position_name'] ?>
</div>
</div>
<div class="row text-center">
</div>
<br>
<div class="row text-center">
<div class="col-xs-6">
<!-- <div class="col-xs-1">
<?php
</div> -->
<br>
<div class="col-xs-6">
<?php
$now = new Time($value['date_issued']);
$now = new Time($value['date_issued']);
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateIssued);
echo $this->DateFormat->formatDateThai($dateIssued);
?>
?>
</div>
</div>
<div class="col-xs-6">
<div class="col-xs-6">
<?php
<?php
$now = new Time($value['date_expiry']);
$now = new Time($value['date_expiry']);
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateExpiry);
echo $this->DateFormat->formatDateThai($dateExpiry);
?>
?>
</div>
</div>
</div>
</div>
<div class="row text-center">
<div class="row text-center">
<!-- <div class="col-xs-1">
<div class="col-xs-6">
</div> -->
<label style="font-size: 17px">วันออกบัตร</label>
<div class="col-xs-6">
</div>
<label style="font-size: 17px">วันออกบัตร</label>
<div class="col-xs-6">
</div>
<label style="font-size: 17px">วันหมดออายุ</label>
<div class="col-xs-6">
</div>
<label style="font-size: 17px">วันหมดออายุ</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--/.box-card -->
<!--/.box-card -->
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow right">
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow">
<i class="fa fa-angle-right next"></i>
<div>
</div>
<i class = "fa fa-angle-right next" ></i>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-12 col-sm-12 col-md-12">
<h4>ข้อมูลบริษัท</h4>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<h4>ข้อมูลบริษัท</h4>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">ชื่อ</label>
<div class="form-group has-feedback">
<?php echo $value['prefix_name_th'].$value['firstname_th'] ?>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">ชื่อ</label>
</div>
<?php echo $value['prefix_name_th'].$value['firstname_th'] ?>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">นามสกุล</label>
<div class="form-group has-feedback">
<?php echo $value['lastname_th'] ?>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">นามสกุล</label>
</div>
<?php echo $value['lastname_th'] ?>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">ชื่อบริษัท</label>
<div class="form-group has-feedback">
<?php echo $value['morg']['org_name_th'] ?>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">ชื่อบริษัท</label>
</div>
<?php echo $value['morg']['org_name_th'] ?>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">แผนก</label>
<div class="form-group has-feedback">
<?php echo $value['section_name'] ?>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">แผนก</label>
</div>
<?php echo $value['section_name'] ?>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">ตำแหน่ง</label>
<div class="form-group has-feedback">
<?php echo $value['position_name'] ?>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">ตำแหน่ง</label>
</div>
<?php echo $value['position_name'] ?>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">วันที่ออกบัตร</label>
<div class="form-group has-feedback">
<?php
<div class="col-xs-12 col-sm-12 col-md-12">
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">วันที่ออกบัตร</label>
<?php
$now = new Time($value['date_issued']);
$now = new Time($value['date_issued']);
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateIssued);
echo $this->DateFormat->formatDateThai($dateIssued);
?>
?>
</div>
</div>
</div>
</div>
<div class="form-group has-feedback">
<div class="form-group has-feedback">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-12 col-sm-12 col-md-12">
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">วันที่หมดอายุ</label>
<label style="font-size: 17px" class="col-xs-4 col-sm-4 col-md-4">วันที่หมดอายุ</label>
<?php
<?php
$now = new Time($value['date_expiry']);
$now = new Time($value['date_expiry']);
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateExpiry);
echo $this->DateFormat->formatDateThai($dateExpiry);
?>
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--/.col-xs-12 -->
<?php } ?>
</div>
<div class="row">
<!--/.row -->
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow">
<?php } ?>
<i class = "fa fa-angle-left prev" > </i>
</div>
<div class="col-xs-12">
<div class="col-xs-9 col-sm-9 col-md-9">
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow left">
<img src="/img/core/img/bloc-plus@3x.png" class="img-responsive" style="width: 100%">
<i class="fa fa-angle-left prev"> </i>
</div>
</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">
<img src="/img/core/img/bloc-plus@3x.png" class="img-responsive" style="width: 100%">
<div class="row">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-1 col-sm-1 col-md-1 box-arrow right"></div>
<?php echo $this->Form->create('UserCards', ['id' => 'frmSignIn', 'type' => 'file', 'onsubmit' => 'return check();']); ?>
<div class="form-group has-feedback">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Flash->render(); ?>
<?php echo $this->Form->create('UserCards', [
<?php echo $this->Form->hidden('UserCards.user_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'userId', 'type' => 'text', 'placeholder' => 'USERNAME']); ?>
'id' => 'frmSignIn',
<?php echo $this->Form->hidden('UserCards.organize_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_id', 'type' => 'text', 'label' => __('ไอดีใช้งาน'), 'placeholder' => 'USERNAME', 'required']); ?>
'type' => 'file',
<?php echo $this->Form->input('UserCards.organize_code', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_code', 'type' => 'text', 'label' => __('Company Code'), 'placeholder' => 'Company Code', 'required']); ?>
'onsubmit' => 'return check();',
<label id = "nameorg_th" style="color: green"></label>
'url' => ['controller' => 'user-cards', 'action' => 'view-card']
<label id = "noorg_th" style="color: red"></label>
]); ?>
</div>
<div class="form-group has-feedback">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group has-feedback">
<?php echo $this->Flash->render(); ?>
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->hidden('UserCards.user_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'userId', 'type' => 'text', 'placeholder' => 'USERNAME']); ?>
<?php echo $this->Form->input('UserCards.employee', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'employee', 'type' => 'text', 'label' => __('Ref 1'), 'placeholder' => 'Ref 1', 'disabled']); ?>
<?php echo $this->Form->hidden('UserCards.organize_id', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_id', 'type' => 'text', 'label' => __('ไอดีใช้งาน'), 'placeholder' => 'USERNAME', 'required']); ?>
<label id = "nameemp_th" style="color: green"></label>
<?php echo $this->Form->input('UserCards.organize_code', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'organize_code', 'type' => 'text', 'label' => __('Company Code'), 'placeholder' => 'Company Code', 'required']); ?>
<label id = "noepm_th" style="color: red"></label>
<label id="nameorg_th" style="color: green"></label>
</div>
<label id="noorg_th" style="color: red"></label>
</div>
</div>
<div class="form-group has-feedback bootstrap-iso">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group has-feedback">
<label class="label-text-sub"><?php echo __('Ref 2');?></label>
<div class="col-xs-12 col-sm-12 col-md-12">
<input type="text" name="UserCards[birthdate]" id="date" placeholder="Ref 2" value="" readonly placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy" class="form-control-reg border-bottom-from" disabled>
<?php echo $this->Form->input('UserCards.employee', ['class' => 'form-control-reg border-bottom-from label-text-sub required', 'id' => 'employee', 'type' => 'text', 'label' => __('Ref 1'), 'placeholder' => 'Ref 1', 'disabled']); ?>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
<label id="nameemp_th" style="color: green"></label>
</div>
<label id="noepm_th" style="color: red"></label>
</div>
</div>
<div>
</div>
<button type="submit" class="btn btn-quaternary mr-xs mb-sm button-text-profile" id="checkbutton">ตรวจสอบ</button>
<div class="form-group has-feedback bootstrap-iso">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $this->Form->end(); ?>
<label class="label-text-sub">
</div>
<?php echo __('Ref 2');?>
</div>
</label>
</div>
<input type="text" name="UserCards[birthdate]" id="date" placeholder="Ref 2" value="" readonly placeholder="DD-MM-YYYY" data-date-format="mm/dd/yyyy"
</div>
class="form-control-reg border-bottom-from" disabled>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
<div class="row">
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
</div>
<div class="modal fade" id="defaultModal" tabindex="-1" role="dialog" aria-labelledby="defaultModalLabel" aria-hidden="true">
<div>
<div class="modal-dialog box-ads">
<button type="submit" class="btn btn-quaternary mr-xs mb-sm button-text-profile" id="checkbutton">ตรวจสอบ</button>
<a class="close-modal" data-dismiss="modal">X </a>
</div>
<div class="container login-container">
<?php echo $this->Form->end(); ?>
<div class = "">
</div>
<div class="owl-carousel owl-theme" data-plugin-options="{'items': 1}">
</div>
<div class = "row rotate270 form_1">
</div>
<?php echo $this->Html->image('/img/core/img/card-bg-front@3x.png', array('div' => false, 'class' => 'img-responsive img-rounded','style' => 'position: absolute;')); ?>
<!--/.row -->
<div class="row date-name">
</div>
<!-- <div class="col-xs-1">
<!--/.owl-carousel -->
</div> -->
<div class="row">
<div class="col-xs-8 ">
<div class="col-xs-12 col-sm-12 col-md-12">
<br>
<div class="modal fade" id="defaultModal" tabindex="-1" role="dialog" aria-labelledby="defaultModalLabel" aria-hidden="true">
<div>
<div class="modal-dialog box-ads">
<label>id</label>
<a class="close-modal" data-dismiss="modal">X </a>
</div>
<div class="container login-container">
<div>
<div class="">
<?php echo $value['card_code'] ?>
<div class="owl-carousel owl-theme" data-plugin-options="{'items': 1}">
</div>
<div class="row rotate270 form_1">
<div>
<?php echo $this->Html->image('/img/core/img/card-bg-front@3x.png', array('div' => false, 'class' => 'img-responsive img-rounded','style' => 'position: absolute;')); ?>
<labe>ชื่อ</label> <?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
<div class="row date-name">
</div>
<div class="col-xs-8 ">
</div>
<br>
<div class="col-xs-4">
<div>
<img src="/img/core/img/user-profile@3x.png" class="img-responsive">
<label>id</label>
</div>
</div>
</div>
<div>
<div class="row date-position">
<?php echo $value['card_code'] ?>
<!-- <div class="col-xs-1">
</div>
</div> -->
<div>
<div class="col-xs-12">
<labe>ชื่อ</label>
<label>ตำแหน่ง</label> <?php echo $value['position_name'] ?>
<?php echo $value['prefix_name_th'].$value['firstname_th'].' '.$value['lastname_th'] ?>
</div>
</div>
</div>
</div>
<div class="row text-center date-time">
<div class="col-xs-4">
<!-- <div class="col-xs-1">
<img src="/img/core/img/user-profile@3x.png" class="img-responsive">
</div> -->
</div>
<div class="col-xs-6">
</div>
<?php
<div class="row date-position">
<div class="col-xs-12">
<label>ตำแหน่ง</label>
<?php echo $value['position_name'] ?>
</div>
</div>
<div class="row text-center date-time">
<div class="col-xs-6">
<?php
$now = new Time($value['date_issued']);
$now = new Time($value['date_issued']);
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
$dateIssued = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateIssued);
echo $this->DateFormat->formatDateThai($dateIssued);
?>
?>
</div>
</div>
<div class="col-xs-6">
<div class="col-xs-6">
<?php
<?php
$now = new Time($value['date_expiry']);
$now = new Time($value['date_expiry']);
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
$dateExpiry = $now->i18nFormat('yyyy-MM-dd');
echo $this->DateFormat->formatDateThai($dateExpiry);
echo $this->DateFormat->formatDateThai($dateExpiry);
?>
?>
</div>
</div>
</div>
</div>
<div class="row text-center date-label">
<div class="row text-center date-label">
<!-- <div class="col-xs-1">
<div class="col-xs-6">
</div> -->
<label>วันออกบัตร</label>
<div class="col-xs-6">
</div>
<label>วันออกบัตร</label>
<div class="col-xs-6">
</div>
<label>วันหมดออายุ</label>
<div class="col-xs-6">
</div>
<label>วันหมดออายุ</label>
</div>
</div>
</div>
</div>
<!--/ .font-card-->
</div>
<div>
<!--/ .font-card-->
<?php echo $this->Html->image('/img/core/img/card-bg-back@3x.png', array('div' => false, 'class' => 'img-responsive img-rounded','style' => '3position: absolute;')); ?>
<div>
</div>
<?php echo $this->Html->image('/img/core/img/card-bg-back@3x.png', array('div' => false, 'class' => 'img-responsive img-rounded','style' => '3position: absolute;')); ?>
<!--/ .back-card-->
</div>
</div>
<!--/ .back-card-->
<!--/.owl-carousel-->
</div>
</div>
<!--/.owl-carousel-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
#alertBox {
<style>
position: relative;
#alertBox {
width: 300px;
position:relative;
min-height: 100px;
width:300px;
/*margin-top:50px;*/
min-height:100px;
border: 1px solid #666;
/*margin-top:50px;*/
background-color: #fff;
border:1px solid #666;
background-repeat: no-repeat;
background-color:#fff;
background-position: 20px 30px;
background-repeat:no-repeat;
left: 0;
background-position:20px 30px;
right: 0;
left: 0;
top: 100px;
right: 0;
z-index: 2;
top: 100px;
z-index: 2;
}
#modalContainer > #alertBox {
position:fixed;
}
#alertBox h1 {
margin:0;
font:bold 0.9em verdana,arial;
background-color:#000;
color:#FFF;
border-bottom:1px solid #000;
padding:2px 0 2px 5px;
}
#alertBox p {
font-size: 14px;
height: 30px;
padding: 10px;
/* margin-left: 55px; */
text-align: center;
}
#alertBox #closeBtn {
display:block;
position:relative;
margin:5px auto;
padding:7px;
border:0 none;
width:70px;
font:0.7em verdana,arial;
text-transform:uppercase;
text-align:center;
color:#FFF;
background-color:#000;
border-radius: 3px;
text-decoration:none;
}
/* unrelated styles */
#mContainer {
position:relative;
width:600px;
margin:auto;
padding:5px;
border-top:2px solid #000;
border-bottom:2px solid #000;
font:0.7em verdana,arial;
}
h1,h2 {
margin:0;
padding:4px;
font:bold 1.5em verdana;
border-bottom:1px solid #000;
text-align: center;
}
code {
font-size:1.2em;
color:#069;
}
#credits {
position:relative;
margin:25px auto 0px auto;
width:350px;
font:0.7em verdana;
border-top:1px solid #000;
border-bottom:1px solid #000;
height:90px;
padding-top:4px;
}
#credits img {
float:left;
margin:5px 10px 5px 0px;
border:1px solid #000000;
width:80px;
height:79px;
}
.important {
background-color:#F5FCC8;
padding:2px;
}
code span {
color:green;
}
</style>
<style>
.box-card{
border: 1px solid #ccc;
height: 200px;
margin-top: 10px;
border-radius: 20px;
box-shadow: 2px 2px 4px #ccc;
margin-bottom: 10px;
}
.box-arrow{
font-size:36px;
height: 200px;
padding-top:20%;
cursor: pointer;
}
.box-ads{
width: 1%;
display: table;
margin: auto;
position: relative;
padding-top: 10px;
margin-top: 5px;
}
.box-ads .close-modal{
position:absolute;
top:0;
right: 0;
width: 40px;
height: 40px;
background-color: #000;
color: #fff;
cursor: pointer;
font-size: 20px;
border-radius: 20px;
padding-top: 10px;
margin-right: 10px;
text-align: center;
z-index: 9999;
}
.box-ads .close-modal:hover{
text-decoration: none;
}
.rotate270 .row{
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-o-transform: rotate(270deg);
writing-mode: rl-tb;
position: absolute;
font-size: 30px;
}
.form_1 .date-name{
width: 500px;
margin: 55% 0% 0% -40%;
border-bottom:0px solid red;
}
.date-name div div{
height:35px;
}
.form_1 .date-position{
width: 500px;
margin: 70% 0% 0% -15%;
border-bottom:0px solid #000;
}
.form_1 .date-time{
width: 500px;
margin: 70% 0% 0% 10%;
border-bottom:0px solid #000;
}
.form_1 .date-label{
width: 500px;
margin: 70% 0% 0% 20%;
border-bottom:0px solid #000;
}
</style>
<?php $this->append('scriptBottom'); ?>
<script>
var ALERT_TITLE = "";
var ALERT_BUTTON_TEXT = "Ok";
if (document.getElementById) {
window.alert = function (txt) {
createCustomAlert(txt);
}
}
}
function createCustomAlert(txt) {
#modalContainer>#alertBox {
d = document;
position: fixed;
if (d.getElementById("modalContainer"))
}
return;
mObj = d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));
#alertBox h1 {
mObj.id = "modalContainer";
margin: 0;
mObj.style.height = d.documentElement.scrollHeight + "px";
font: bold 0.9em verdana, arial;
background-color: #000;
alertObj = mObj.appendChild(d.createElement("div"));
color: #FFF;
alertObj.id = "alertBox";
border-bottom: 1px solid #000;
if (d.all && !window.opera)
padding: 2px 0 2px 5px;
alertObj.style.top = document.documentElement.scrollTop + "px";
}
alertObj.style.left = (d.documentElement.scrollWidth - alertObj.offsetWidth) / 2 + "px";
alertObj.style.visiblity = "visible";
#alertBox p {
font-size: 14px;
h1 = alertObj.appendChild(d.createElement("h1"));
height: 30px;
h1.appendChild(d.createTextNode(ALERT_TITLE));
padding: 10px;
/* margin-left: 55px; */
msg = alertObj.appendChild(d.createElement("p"));
text-align: center;
//msg.appendChild(d.createTextNode(txt));
}
msg.innerHTML = txt;
#alertBox #closeBtn {
btn = alertObj.appendChild(d.createElement("a"));
display: block;
btn.id = "closeBtn";
position: relative;
btn.appendChild(d.createTextNode(ALERT_BUTTON_TEXT));
margin: 5px auto;
btn.href = "#";
padding: 7px;
btn.focus();
border: 0 none;
btn.onclick = function () {
width: 70px;
removeCustomAlert();
font: 0.7em verdana, arial;
return false;
text-transform: uppercase;
text-align: center;
color: #FFF;
background-color: #000;
border-radius: 3px;
text-decoration: none;
}
/* unrelated styles */
#mContainer {
position: relative;
width: 600px;
margin: auto;
padding: 5px;
border-top: 2px solid #000;
border-bottom: 2px solid #000;
font: 0.7em verdana, arial;
}
h1,
h2 {
margin: 0;
padding: 4px;
font: bold 1.5em verdana;
border-bottom: 1px solid #000;
text-align: center;
}
code {
font-size: 1.2em;
color: #069;
}
#credits {
position: relative;
margin: 25px auto 0px auto;
width: 350px;
font: 0.7em verdana;
border-top: 1px solid #000;
border-bottom: 1px solid #000;
height: 90px;
padding-top: 4px;
}
#credits img {
float: left;
margin: 5px 10px 5px 0px;
border: 1px solid #000000;
width: 80px;
height: 79px;
}
.important {
background-color: #F5FCC8;
padding: 2px;
}
code span {
color: green;
}
</style>
<style>
.box-card {
border: 1px solid #ccc;
height: 200px;
margin-top: 10px;
border-radius: 20px;
box-shadow: 2px 2px 4px #ccc;
margin-bottom: 10px;
}
.box-arrow {
font-size: 36px;
height: 200px;
padding-top: 20%;
cursor: pointer;
}
.box-arrow.left {
padding-right: 0px;
text-align: right;
}
.box-arrow.right {
padding-left: 0px;
}
.box-ads {
width: 1%;
display: table;
margin: auto;
position: relative;
padding-top: 10px;
margin-top: 5px;
}
.box-ads .close-modal {
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 40px;
background-color: #000;
color: #fff;
cursor: pointer;
font-size: 20px;
border-radius: 20px;
padding-top: 10px;
margin-right: 10px;
text-align: center;
z-index: 9999;
}
.box-ads .close-modal:hover {
text-decoration: none;
}
.rotate270 .row {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-o-transform: rotate(270deg);
writing-mode: rl-tb;
position: absolute;
font-size: 30px;
}
.form_1 .date-name {
width: 500px;
margin: 55% 0% 0% -40%;
border-bottom: 0px solid red;
}
.date-name div div {
height: 35px;
}
.form_1 .date-position {
width: 500px;
margin: 70% 0% 0% -15%;
border-bottom: 0px solid #000;
}
.form_1 .date-time {
width: 500px;
margin: 70% 0% 0% 10%;
border-bottom: 0px solid #000;
}
}
alertObj.style.display = "block";
}
.form_1 .date-label {
width: 500px;
function removeCustomAlert() {
margin: 70% 0% 0% 20%;
document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"));
border-bottom: 0px solid #000;
}
}
function ful() {
alert('Alert this pages');
</style>
}
</script>
<?php $this->append('scriptBottom'); ?>
<script type="text/javascript">
<script>
$('.owl-carousel').owlCarousel({
var ALERT_TITLE = "";
loop:false,
var ALERT_BUTTON_TEXT = "Ok";
items:1,
rewindNav : false,
if (document.getElementById) {
onTranslated:callBack
window.alert = function (txt) {
});
createCustomAlert(txt);
owl = $('.owl-carousel').owlCarousel();
}
$(".prev").click(function () {
}
owl.trigger('prev.owl.carousel');
});
function createCustomAlert(txt) {
d = document;
$(".next").click(function () {
if (d.getElementById("modalContainer"))
owl.trigger('next.owl.carousel');
return;
});
mObj = d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));
mObj.id = "modalContainer";
function callBack(){
mObj.style.height = d.documentElement.scrollHeight + "px";
if($('.owl-carousel .owl-item').last().hasClass('active')){
$('.next').hide();
alertObj = mObj.appendChild(d.createElement("div"));
$('.prev').show();
alertObj.id = "alertBox";
if (d.all && !window.opera)
}else if($('.owl-carousel .owl-item').first().hasClass('active')){
alertObj.style.top = document.documentElement.scrollTop + "px";
$('.prev').hide();
alertObj.style.left = (d.documentElement.scrollWidth - alertObj.offsetWidth) / 2 + "px";
$('.next').show();
alertObj.style.visiblity = "visible";
}
}
h1 = alertObj.appendChild(d.createElement("h1"));
h1.appendChild(d.createTextNode(ALERT_TITLE));
var organize_id = $("#organize_id");
var employee = $("#employee");
msg = alertObj.appendChild(d.createElement("p"));
var date = $("#date");
//msg.appendChild(d.createTextNode(txt));
$(document).ready(function() {
msg.innerHTML = txt;
$("#organize_code").on('change',function(){
// alert(moment("05/22/2012", 'MM/DD/YYYY',true).isValid()); //true
btn = alertObj.appendChild(d.createElement("a"));
var organize_code = $("#organize_code").val();
btn.id = "closeBtn";
$('#employee').attr("disabled",true);
btn.appendChild(d.createTextNode(ALERT_BUTTON_TEXT));
$('#date').attr("disabled",true);
btn.href = "#";
$('#checkbutton').attr("disabled",true);
btn.focus();
organize_id.val('');
btn.onclick = function () {
employee.val('');
removeCustomAlert();
date.val('');
return false;
$.post("/UserCards/checkOrg", {organize_code: organize_code}, function(data) {
}
if(data!='false'){
alertObj.style.display = "block";
data = jQuery.parseJSON(data);
}
if(data['chkuser'] == true){
$("#noorg_th").text('ลงทะเบียนกับ '+data[0]['org_name_th']+' แล้ว');
function removeCustomAlert() {
document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"));
}
function ful() {
alert('Alert this pages');
}
</script>
<script type="text/javascript">
$('.owl-carousel').owlCarousel({
loop: false,
items: 1,
rewindNav: false,
onTranslated: callBack
});
owl = $('.owl-carousel').owlCarousel();
$(".prev").click(function () {
owl.trigger('prev.owl.carousel');
});
$(".next").click(function () {
owl.trigger('next.owl.carousel');
});
function callBack() {
if ($('.owl-carousel .owl-item').last().hasClass('active')) {
$('.next').hide();
$('.prev').show();
} else if ($('.owl-carousel .owl-item').first().hasClass('active')) {
$('.prev').hide();
$('.next').show();
}
}
var organize_id = $("#organize_id");
var employee = $("#employee");
var date = $("#date");
$(document).ready(function () {
$("#organize_code").on('change', function () {
// alert(moment("05/22/2012", 'MM/DD/YYYY',true).isValid()); //true
var organize_code = $("#organize_code").val();
$('#employee').attr("disabled", true);
$('#date').attr("disabled", true);
$('#checkbutton').attr("disabled", true);
organize_id.val('');
employee.val('');
date.val('');
$.post("/UserCards/checkOrg", {
organize_code: organize_code
}, function (data) {
if (data != 'false') {
data = jQuery.parseJSON(data);
if (data['chkuser'] == true) {
$("#noorg_th").text('ลงทะเบียนกับ ' + data[0]['org_name_th'] +
' แล้ว');
$("#nameorg_th").text('');
$('#employee').attr("disabled", true);
organize_id.val('');
employee.val('');
} else if (data['chkuser'] == false) {
$("#nameorg_th").text(data[0]['org_name_th']);
$("#noorg_th").text('');
$("#checkbutton").removeAttr("disabled");
$("#employee").removeAttr("disabled");
organize_id.val(data[0]['id']);
}
} else {
$("#noorg_th").text('ไม่พบข้อมูล');
$("#nameorg_th").text('');
$("#nameorg_th").text('');
$('#employee').attr("disabled",true);
$('#employee').attr("disabled",
true);
organize_id.val('');
organize_id.val('');
employee.val('');
employee.val('');
}else if(data['chkuser'] == false){
$("#nameorg_th").text(data[0]['org_name_th']);
$("#noorg_th").text('');
$("#checkbutton").removeAttr("disabled");
$("#employee").removeAttr("disabled");
organize_id.val(data[0]['id']);
}
}
}else{
});
$("#noorg_th").text('ไม่พบข้อมูล');
$("#nameorg_th").text('');
$('#employee').attr("disabled",true);
organize_id.val('');
employee.val('');
}
});
});
});
$("#employee").on('change', function () {
$("#employee").on('change',function(){
var employee_val = employee.val();
var employee_val = employee.val();
var organize_code = $("#organize_code").val();
var organize_code = $("#organize_code").val();
$('#date').attr("disabled", true);
$('#date').attr("disabled",true);
date.val('');
date.val('');
$.post("/UserCards/checkEmp", {
$.post("/UserCards/checkEmp", {employee_val: employee_val,organize_code: organize_code}, function(data) {
employee_val: employee_val,
if(data!='false'){
organize_code: organize_code
data = jQuery.parseJSON(data);
}, function (data) {
if(data['chkuser'] == true){
if (data != 'false') {
$("#noepm_th").text('ลงทะเบียนแล้ว');
data = jQuery.parseJSON(data);
if (data['chkuser'] == true) {
$("#noepm_th").text('ลงทะเบียนแล้ว');
$("#nameemp_th").text('');
$('#date').attr("disabled", true);
date.val('');
} else if (data['chkuser'] == false) {
$("#nameemp_th").text(data['prefix_name_th'] + data['firstname_th'] +
' ' + data['lastname_th']);
$("#noepm_th").text('');
$("#date").removeAttr("disabled");
}
} else {
$("#noepm_th").text(
'"ไม่พบข้อมูลที่ต้องการ" กรุณากรอกรหัสข้อมูลที่ถูกต้องและกดตรวจสอบ'
);
$("#nameemp_th").text('');
$("#nameemp_th").text('');
$('#date').attr("disabled",true);
$('#date').attr("disabled",
true);
date.val('');
date.val('');
}else if(data['chkuser'] == false){
$("#nameemp_th").text(data['prefix_name_th']+data['firstname_th']+' '+data['lastname_th']);
$("#noepm_th").text('');
$("#date").removeAttr("disabled");
}
}
}else{
});
$("#noepm_th").text('"ไม่พบข้อมูลที่ต้องการ" กรุณากรอกรหัสข้อมูลที่ถูกต้องและกดตรวจสอบ');
$("#nameemp_th").text('');
$('#date').attr("disabled",true);
date.val('');
}
});
});
});
});
});
function check() {
function check() {
if (employee.val() == '') {
if (employee.val() == '') {
alert('กรุณากรอก Ref1');
alert('กรุณากรอก Ref1');
employee.focus();
employee.focus();
return false;
return false;
}
}
if (date.val() == '') {
if (date.val() == '') {
alert('กรุณากรอก Ref2');
alert('กรุณากรอก Ref2');
date.focus();
date.focus();
return false;
return false;
}
}
}
}
$(document).ready(function () {
$(document).ready(function(){
var date_input = $('input[id="date"]'); //our date input has the name "date"
var date_input=$('input[id="date"]'); //our date input has the name "date"
var container = $('.bootstrap-iso form').length > 0 ? $('.bootstrap-iso form').parent() : "body";
var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
var options = {
var options={
format: 'dd/mm/yyyy',
format: 'dd/mm/yyyy',
container: container,
container: container,
todayHighlight: true,
todayHighlight: true,
autoclose: true,
autoclose: true,
};
};
date_input.datepicker(options);
date_input.datepicker(options);
})
})
</script>
</script>
<?php $this->end();?>
<?php $this->end();?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment