diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..dad62749 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/.settings +/.buildpath +/.project +/.idea diff --git a/CHANGELOG.txt b/CHANGELOG.txt new file mode 100644 index 00000000..dbfe8c7b --- /dev/null +++ b/CHANGELOG.txt @@ -0,0 +1,157 @@ +Release note v9.1 +----------------- +### Fixes + *Add missing S3FileSystem class + +Release note v9.0 +----------------- +### Features + *New user interface + *Decimal leave counts supported + + +Release note v8.4 +----------------- +### Fixes + * Fix leave carry forward rounding issues + * Fix issue: select2 default value not getting set for select2 + * Fix issue: email not sent when admin changing leave status + +Release note v8.3 +----------------- +### Fixes +* Fix user table issue on windows, this will resolve errors such as: (Note that this fix has no effect on unix based installations) + * Admin not able to view user uploaded documents + * Admin not able to upload documants for users + * Admin can not view employee attendance records + * Employee projects can not be added + + +Release note v8.2 +----------------- +### Features +*Instance verification added + +Release note v8.1 +----------------- +### Fixes +*Fixed bug that caused a fatal error in php v5.4 +*aws2.7.11 phar file replaced by a aws2.7.11 extracted files +*old aws sdk removed + +Release note v8.0 +----------------- +### Features +*Admin dashbord module +*If the employee joined in current leave period, his leave entitlement is calculated proportional to joined date +*Improvements to reporting module +*Adding new employee time tracking report +*Join date for employees made mandatory +*Sending welcome email when a user is added +*Let users directly reply to admin user from any email sent out from icehrm +*All the users who are not admins must have an employee object attached +*Upgrade aws sdk to v2.7.11 +*Allow employees to change password +*Use only the email address defined under user for sending mails +*Making work_email and private_email fields optional + + +### Fixes +*Upload dialog close button issue fixed + + +Release note v7.2 +----------------- +*Fixes +*Some critical vulnerabilities are fixed as recommend by http://zeroscience.mk/en/ + +Release note v7.1 +----------------- +*Features +*Improved company structure graph +*Leave notes implementation – Supervisor can add a note when approving or rejecting leaves +*Filtering support +*Select boxes with long lists are now searchable +*Add/Edit/Delete company structure permissions added for managers +*Add ability to disable employee information editing + +*Fixes +*Make loans editable only by admin +*Fix: permissions not getting applied to employee documents +*Fix error adding employee documents when no user assigned to the admin + +*Code Quality +*Moving all module related code and data into module folders + +Release note v6.0 +----------------- +* Features +* Notifications for leaves and timesheets +* Leave module accrue and leave carry forward +* Employee leave entitlement sub module +* Ability to put system on debug mode +* Allow admins to see documents of all the employees at one place +* Backup data when deleting an employee +* Employee attendance report added +* Changes to time entry form in timesheet module to make time entry process faster +* Admin can make all projects available to employees or just the set of prjects assigned to them using Setting "Projects: Make All Projects Available to Employees" +* Employee document, date added field can not be changed by the employee anymore +* About dialog added for admins + +* Fixes +* Fix default employee delete issue (when the default employee is deleted the admin user attached to it also get deleted) +* Fix user duplicate email issue +* Fix manager can not logout from switched employee +* Remove admin guide from non admin users + +Release note v5.3 +----------------- +* Fixes +* Fix missing employee name in employee details report + +Release note v5.2 +----------------- +* Fixes +* Remove unwanted error logs +* Fix attendance module employee permission issue +* Resolve warnings +* Remove add new button from subordinates module +* Adding administrators' guide + +Release note v5.1 +----------------- +* Fixes +* Fixing for non updating null fields +* https://bitbucket.org/thilina/icehrm-opensource/commits/df57308b53484a2e43ef5c72967ed1cd0dc756cc + +Release note v5.0 +----------------- +* Features +* New user permission implementation +* Adding new user level - Manager + +* Fixes +* Fixing remote table loading issue + +Release note v4.2 +----------------- +* Fixes +* https://bitbucket.org/thilina/icehrm-opensource/issue/23/subordinate-leaves-pagination-not-working +* https://bitbucket.org/thilina/icehrm-opensource/issue/20/error-occured-while-time-punch + + +Release note v4.1 +----------------- +* Features +* Better email format for notifications +* Convert upload dialog to a bootstrp model + +* Fixes +* Fix error sending emails with amazon SES +* Fix errors related to XAMPP and WAMPP servers +* Fix php warnings and notifications +* Fix company structure graph issues +* Allow icehrm client to work without an internet connection +* Fix installer incorrect base url issue +* Fix empty user creation issue + diff --git a/build.xml b/build.xml new file mode 100644 index 00000000..8a0b6273 --- /dev/null +++ b/build.xml @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core-ext/app/config.sample.php b/core-ext/app/config.sample.php new file mode 100644 index 00000000..f91261af --- /dev/null +++ b/core-ext/app/config.sample.php @@ -0,0 +1,18 @@ +baseService = $baseService; + } + + public function addNotification($toEmployee, $message, $action, $type, $toUserId = null, $fromSystem = false){ + + $userEmp = new User(); + + if(!empty($toEmployee)){ + $userEmp->load("employee = ?",array($toEmployee)); + + if(!empty($userEmp->employee) && $userEmp->employee == $toEmployee){ + $toUser = $userEmp->id; + }else{ + return; + } + }else if(!empty($toUserId)){ + $toUser = $toUserId; + } + + + $noti = new Notification(); + if($fromSystem){ + $noti->fromUser = 0; + $noti->fromEmployee = 0; + $noti->image = BASE_URL."images/icehrm.png"; + }else{ + $user = $this->baseService->getCurrentUser(); + $noti->fromUser = $user->id; + $noti->fromEmployee = $user->employee; + } + + $noti->toUser = $toUser; + $noti->message = $message; + + if(!empty($noti->fromEmployee) && $noti->fromEmployee != 0){ + $employee = $this->baseService->getElement('Employee',$noti->fromEmployee,null,true); + if(!empty($employee)){ + $employee = FileService::getInstance()->updateProfileImage($employee); + $noti->image = $employee->image; + } + } + + if(empty($noti->image)){ + if($employee->gender == 'Male'){ + $noti->image = BASE_URL."images/user_male.png"; + }else{ + $noti->image = BASE_URL."images/user_female.png"; + } + + } + + $noti->action = $action; + $noti->type = $type; + $noti->time = date('Y-m-d H:i:s'); + $noti->status = 'Unread'; + + $ok = $noti->Save(); + if(!$ok){ + error_log("Error adding notification: ".$noti->ErrorMsg()); + } + } + + public function clearNotifications($userId){ + $notification = new Notification(); + + $listUnread = $notification->Find("toUser = ? and status = ?",array($userId,'Unread')); + + foreach($listUnread as $not){ + $not->status = "Read"; + $not->Save(); + } + } + + public function getNotificationByTypeAndDate($type, $date){ + $noti = new Notification(); + $noti->Load("date(time) = ? and type = ?",array($date,$type)); + if(!empty($noti->id) && $noti->type = $type){ + return $noti; + } + return null; + } + + public function getLatestNotificationsAndCounts($userId){ + $notification = new Notification(); + + $listUnread = $notification->Find("toUser = ? and status = ?",array($userId,'Unread')); + $unreadCount = count($listUnread); + + $limit = ($unreadCount < 10)?10:$unreadCount; + + $list = $notification->Find("toUser = ? order by time desc limit ?",array($userId,$limit)); + + $newList = array(); + $fs = FileService::getInstance(); + + foreach($list as $noti){ + if($noti->fromEmployee > 0){ + $employee = $this->baseService->getElement('Employee',$noti->fromEmployee,null,true); + if(!empty($employee)){ + $employee = $fs->updateProfileImage($employee); + $noti->image = $employee->image; + + if(empty($noti->image)){ + if($employee->gender == 'Male'){ + $noti->image = BASE_URL."images/user_male.png"; + }else{ + $noti->image = BASE_URL."images/user_female.png"; + } + + } + $newList[] = $noti; + } + }else{ + $noti->image = BASE_URL."images/icehrm.png"; + $newList[] = $noti; + } + + } + + return array($unreadCount, $list); + + } + +} \ No newline at end of file diff --git a/core-ext/config.base.php b/core-ext/config.base.php new file mode 100644 index 00000000..727c7c6d --- /dev/null +++ b/core-ext/config.base.php @@ -0,0 +1,21 @@ + li > a { +font-weight: bold; +font-size: 12px; +} + +.categoryWrap p{ + font-size:16px; + font-weight:bold; + padding: 3px; +} + +.categoryWrap p:hover{ + font-size:16px; + font-weight:bold; + color:white; + background: gray; + padding: 3px; + cursor:pointer; + border-radius: 4px; + +} + +.resultLogo{ + text-align: center; +} + +.pbar{ + font-weight:bold; + font-size:11px; +} + +.pbar .progress{ + height: 10px; +} + +.bs-docs-sidenav { + width: 228px; + margin: 30px 0 0; + padding: 0; + background-color: #fff; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065); + -moz-box-shadow: 0 1px 4px rgba(0,0,0,.065); + box-shadow: 0 1px 4px rgba(0,0,0,.065); +} +.bs-docs-sidenav > li > a { + display: block; + *width: 190px; + margin: 0 0 -1px; + padding: 8px 14px; + border: 1px solid #e5e5e5; +} +.bs-docs-sidenav > li:first-child > a { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.bs-docs-sidenav > li:last-child > a { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.bs-docs-sidenav > .active > a { + position: relative; + z-index: 2; + padding: 9px 15px; + border: 0; + text-shadow: 0 1px 0 rgba(0,0,0,.15); + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); + box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); +} +/* Chevrons */ +.bs-docs-sidenav .icon-chevron-right { + float: right; + margin-top: 2px; + margin-right: -6px; + opacity: .25; +} +.bs-docs-sidenav > li > a:hover { + background-color: #f5f5f5; +} +.bs-docs-sidenav a:hover .icon-chevron-right { + opacity: .5; +} +.bs-docs-sidenav .active .icon-chevron-right, +.bs-docs-sidenav .active a:hover .icon-chevron-right { + background-image: url(../img/glyphicons-halflings-white.png); + opacity: 1; +} +.bs-docs-sidenav.affix { + top: 40px; +} +.bs-docs-sidenav.affix-bottom { + position: absolute; + top: auto; + bottom: 270px; +} + + + + +/* Responsive +-------------------------------------------------- */ + +/* Desktop large +------------------------- */ +@media (min-width: 1200px) { + .bs-docs-container { + max-width: 970px; + } + .bs-docs-sidenav { + width: 258px; + } +} + +.reviewPoints{ + margin-top:10px; +} + +.reviewPoints .star{ + margin-left: 10px; +} + +.reviewBlock { +position: relative; +margin: 0px 0; +padding: 39px 19px 14px; +background-color: white; +border: 1px solid #DDD; +/* +-webkit-border-radius: 4px; +-moz-border-radius: 4px; +border-radius: 4px; +*/ +font-size:12px; +} + +/*.reviewBlock::after { +content: attr(data-content); +position: absolute; +top: -1px; +left: -1px; +padding: 3px 7px; +font-size: 12px; +font-weight: bold; +background-color: whiteSmoke; +border: 1px solid #DDD; +color: #9DA0A4; +-webkit-border-radius: 4px 0 4px 0; +-moz-border-radius: 4px 0 4px 0; +border-radius: 4px 0 4px 0; +}*/ + +.box_ws{ + background: white; + border-left: 1px solid #DDD; + border-right: 1px solid #DDD; + border-bottom: 1px solid #DDD; + color: #555; +} + +.cal_box_ws{ + background: white; + border: 1px solid #DDD; + color: #555; + height: 100px; +} + +.cal_box_ws .wd_date_full{ + font-weight:bold; + font-size:10px; + float: right; + margin-right: 5px; +} + +.cal_box_ws .wd_date{ + font-size:10px; + float: right; + margin-right: 5px; +} + +.nav-pills li a:hover{ + background: #1D64AD; + color:white; +}; + +.nav-tabs > li > a { + color:white; +} + +.nav-tabs > li > a:hover{ + color:#555; +} + + +.topheader { +background: -moz-linear-gradient(#829AA8, #405A6A); +background: -webkit-linear-gradient(#829AA8, #405A6A); +background: linear-gradient(#829AA8, #405A6A); +border: 1px solid #677C89; +border-bottom-color: #6B808D; +box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4),0 0px 10px rgba(0, 0, 0, 0.1); +} + + +.bgbody{ +background: #FAFAFA; +background: -moz-linear-gradient(#FAFAFA, #EAEAEA); +background: -webkit-linear-gradient(#FAFAFA, #EAEAEA); +background: linear-gradient(#FAFAFA, #EAEAEA); +border-bottom: 1px solid #CACACA; +box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4),0 0px 10px rgba(0, 0, 0, 0.1); +} + +.leftMenu{ + background-color: #E9F1F4; + border-style: solid; + border-width: 1px 1px 2px; + border-color: #E9F1F4 #D8DEE2 #D8DEE2; + border-radius: 0 0 5px 5px; +} + +.nav > li > a:hover { +text-decoration: none; +background-color: whitesmoke; +border-radius: 5px; +} + +/* +.nav-list > .active > a, .nav-list > .active > a:hover{ +color: white; +text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); +background-color: #405A6A; +box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4),0 0px 10px rgba(0, 0, 0, 0.1); +border-radius: 5px; +} +*/ + +a { +color: #405A6A; +text-decoration: none; +} + +.nav-header { +display: block; +padding: 3px 15px; +font-size: 15px; +font-weight: bold; +line-height: 20px; +text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +text-transform: none; +background: -moz-linear-gradient(#829AA8, #405A6A); +background: -webkit-linear-gradient(#829AA8, #405A6A); +background: linear-gradient(#829AA8, #405A6A); +color: white; +border-radius: 2px; +} + +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.4; + filter: alpha(opacity=40); +} + +.error{ + color:red; +} + +.columnMain{ + font-weight: bold; +} + +.borderBox{ +padding-bottom: 10px; +padding-left: 10px; +padding-top: 10px; +-moz-border-radius: 5px; +border-radius: 5px; +-webkit-border-radius: 5px; +margin-bottom: 20px; +-moz-box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.1); +-webkit-box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.1); +box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.1); +border: 1px solid #EEE; +} + + +.iceicon_edit{ + background-image: url("../images/edit.png"); +} + +.iceicon_delete{ + background-image: url("../images/delete.png"); +} + +.iceicon_user{ + background-image: url("../images/user.png"); +} + +.dropdown-menu{ + z-index: 10000; +} + +.lightface .lightfaceContent .lightfaceTitle { +font-size: 14px; +color: #fff; +background-color: #405A6A; +border: 1px solid #405A6A; +font-weight: bold; +margin: -1px; +margin-bottom: 0; +padding: 5px 10px; +line-height: 30px; +} + +.label-ice, .badge-ice{ +background-color: #405A6A; +} + +.dataTables_processing{ +position: absolute; +margin-left: 40px; +font-weight: bold; +font-size: 13px; +color: gray; +} + + + +/*changes to full caledar*/ +.fc-header-title h2 { +margin-top: 0; +white-space: nowrap; +font-size: 20px; +margin-left: 10px; +color:#405A6A; +} + +table.dataTable{ + font-size: 1.1em; +} + +.form-horizontal{ + font-size: 1.2em; +} + +.form-horizontal .row{ + margin-bottom: 10px; +} + +.table.dataTable {width:100% !important;} + +.iceLabel{ + font-size: 12px !important; + font-weight: bold; + color: #3c8dbc; +} + +.nav-tabs>li>a{ + border-radius:0px; +} + +.nav > li > a:hover { + border-radius:0px; +} + +.btn { + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; + +} + + +/* select2 style overide */ +.select2-choice{ +border: none !important; +width: 100% !important; +border-radius: 0px !important; +background-color: #FFF !important; +background-image: none !important; +} + + +.select2-container{ + padding:3px !important; +} + +.select2-container-multi{ + padding:0px !important; + border:none; +} + +.select2-arrow{ +background-image: none !important; +background: #FFF !important; +border: none !important; +} + +.select2-drop-active { +/*border: 1px solid black !important;*/ +border-top: none !important; +background: #f0f0f0 !important; +} + +.logTime{ + font-weight: bold; + font-size: 13px; + font-style: italic; +} + +.popupForm{ + border: none !important; + padding: 0px 19px 14px !important; +} + +.content { +background: #FFF; +} + +.wrapper { +background: #FFF; +} + +.user-panel > .info > p { +margin-bottom: 9px; +max-width: 135px; +line-height: 17px; +} + +.list-group-item-text{ + margin-bottom:5px; +} + +.list-group-item{ + padding-bottom:30px; +} + + + + + + + + + + + + + + +/custom for v11.0 */ + + +.table-bordered>thead>tr>th{ + border:none !important; +} + +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td { + border-bottom-width: 2px; + border: none; +} + +.table{ + -webkit-transition: margin-left .15s linear; + transition: margin-left .15s linear; + -webkit-user-select: none; + background-color: #fff; + -webkit-box-shadow: 0 1px 2px 0 rgba(0,0,0,.2); + box-shadow: 0 1px 2px 0 rgba(0,0,0,.2); +} + +.reviewBlock{ + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.treeview-menu li:hover{ + font-weight:bold; +} \ No newline at end of file diff --git a/core-ext/images/connect-no.png b/core-ext/images/connect-no.png new file mode 100644 index 00000000..ccac9f60 Binary files /dev/null and b/core-ext/images/connect-no.png differ diff --git a/core-ext/images/icehrm.png b/core-ext/images/icehrm.png new file mode 100644 index 00000000..2e28250c Binary files /dev/null and b/core-ext/images/icehrm.png differ diff --git a/core-ext/images/logo.png b/core-ext/images/logo.png new file mode 100644 index 00000000..6f8efc4c Binary files /dev/null and b/core-ext/images/logo.png differ diff --git a/core-ext/images/redo.png b/core-ext/images/redo.png new file mode 100644 index 00000000..f1e45cff Binary files /dev/null and b/core-ext/images/redo.png differ diff --git a/core-ext/login.php b/core-ext/login.php new file mode 100644 index 00000000..4108c87b --- /dev/null +++ b/core-ext/login.php @@ -0,0 +1,317 @@ +Load("(username = ? or email = ?) and password = ?",array($_REQUEST['username'],$_REQUEST['username'],md5($_REQUEST['password']))); + } + + if($suser->password == md5($_REQUEST['password']) || $ssoUserLoaded){ + $user = $suser; + SessionUtils::saveSessionObject('user', $user); + $suser->last_login = date("Y-m-d H:i:s"); + $suser->Save(); + + if(!$ssoUserLoaded && !empty(BaseService::getInstance()->auditManager)){ + BaseService::getInstance()->auditManager->user = $user; + BaseService::getInstance()->audit(IceConstants::AUDIT_AUTHENTICATION, "User Login"); + } + + if($user->user_level == "Admin"){ + header("Location:".HOME_LINK_ADMIN); + }else{ + header("Location:".HOME_LINK_OTHERS); + } + }else{ + header("Location:".CLIENT_BASE_URL."login.php?f=1"); + } + } +}else{ + if($user->user_level == "Admin"){ + header("Location:".HOME_LINK_ADMIN); + }else{ + header("Location:".HOME_LINK_OTHERS); + } + +} + +$tuser = SessionUtils::getSessionObject('user'); +//check user + +$logoFileName = CLIENT_BASE_PATH."data/logo.png"; +$logoFileUrl = CLIENT_BASE_URL."data/logo.png"; +if(!file_exists($logoFileName)){ + $logoFileUrl = BASE_URL."images/logo.png"; +} + +?> + + + + <?=APP_NAME?> Login v<?=VERSION?> © http://icehrm.com + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ IceHrm Pro - + + REQUIRES Windows, OSX, Linux + + + RATING: +
+ 4.5 ( + 12 ratings ) +
+ +
+ Price: $199.99 + +
+
+ + + +
+ +
+ + +
+ +
+
+ +
+
+
+ + diff --git a/core-ext/model/models.base.php b/core-ext/model/models.base.php new file mode 100644 index 00000000..649a3f46 --- /dev/null +++ b/core-ext/model/models.base.php @@ -0,0 +1,72 @@ +getUserAccess(); + } + + public function getAnonymousAccess(){ + return array(); + } + + public function getUserOnlyMeAccess(){ + return array("get","element"); + } + + public function getUserOnlyMeAccessField(){ + return "employee"; + } + + public function getUserOnlyMeAccessRequestField(){ + return "employee"; + } + + public function validateSave($obj){ + return new IceResponse(IceResponse::SUCCESS,""); + } + + public function executePreSaveActions($obj){ + return new IceResponse(IceResponse::SUCCESS,$obj); + } + + public function executePreUpdateActions($obj){ + return new IceResponse(IceResponse::SUCCESS,$obj); + } + + public function executePostSaveActions($obj){ + + } + + public function executePostUpdateActions($obj){ + + } + + public function postProcessGetData($obj){ + return $obj; + } + + public function getDefaultAccessLevel(){ + return array("get","element","save","delete"); + } + + public function getVirtualFields(){ + return array( + ); + } +} \ No newline at end of file diff --git a/core-ext/popups.php b/core-ext/popups.php new file mode 100644 index 00000000..6c3e48ac --- /dev/null +++ b/core-ext/popups.php @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + +user_level == 'Admin'){?> + + + + \ No newline at end of file diff --git a/core-ext/scripts/icehrm_master_data.sql b/core-ext/scripts/icehrm_master_data.sql new file mode 100644 index 00000000..d8ed3ee5 --- /dev/null +++ b/core-ext/scripts/icehrm_master_data.sql @@ -0,0 +1,892 @@ +INSERT INTO `CurrencyTypes`(`id`, `code`, `name`) VALUES + (3, 'AED', 'Utd. Arab Emir. Dirham'), + (4, 'AFN', 'Afghanistan Afghani'), + (5, 'ALL', 'Albanian Lek'), + (6, 'ANG', 'NL Antillian Guilder'), + (7, 'AOR', 'Angolan New Kwanza'), + (177, 'ARP', 'Argentina Pesos'), + (8, 'ARS', 'Argentine Peso'), + (10, 'AUD', 'Australian Dollar'), + (11, 'AWG', 'Aruban Florin'), + (12, 'BBD', 'Barbados Dollar'), + (13, 'BDT', 'Bangladeshi Taka'), + (15, 'BGL', 'Bulgarian Lev'), + (16, 'BHD', 'Bahraini Dinar'), + (17, 'BIF', 'Burundi Franc'), + (18, 'BMD', 'Bermudian Dollar'), + (19, 'BND', 'Brunei Dollar'), + (20, 'BOB', 'Bolivian Boliviano'), + (21, 'BRL', 'Brazilian Real'), + (22, 'BSD', 'Bahamian Dollar'), + (23, 'BTN', 'Bhutan Ngultrum'), + (24, 'BWP', 'Botswana Pula'), + (25, 'BZD', 'Belize Dollar'), + (26, 'CAD', 'Canadian Dollar'), + (27, 'CHF', 'Swiss Franc'), + (28, 'CLP', 'Chilean Peso'), + (29, 'CNY', 'Chinese Yuan Renminbi'), + (30, 'COP', 'Colombian Peso'), + (31, 'CRC', 'Costa Rican Colon'), + (171, 'CZK', 'Czech Koruna'), + (32, 'CUP', 'Cuban Peso'), + (33, 'CVE', 'Cape Verde Escudo'), + (34, 'CYP', 'Cyprus Pound'), + (37, 'DJF', 'Djibouti Franc'), + (38, 'DKK', 'Danish Krona'), + (39, 'DOP', 'Dominican Peso'), + (40, 'DZD', 'Algerian Dinar'), + (41, 'ECS', 'Ecuador Sucre'), + (43, 'EEK', 'Estonian Krona'), + (44, 'EGP', 'Egyptian Pound'), + (46, 'ETB', 'Ethiopian Birr'), + (42, 'EUR', 'Euro'), + (48, 'FJD', 'Fiji Dollar'), + (49, 'FKP', 'Falkland Islands Pound'), + (51, 'GBP', 'Pound Sterling'), + (52, 'GHC', 'Ghanaian Cedi'), + (53, 'GIP', 'Gibraltar Pound'), + (54, 'GMD', 'Gambian Dalasi'), + (55, 'GNF', 'Guinea Franc'), + (57, 'GTQ', 'Guatemalan Quetzal'), + (58, 'GYD', 'Guyanan Dollar'), + (59, 'HKD', 'Hong Kong Dollar'), + (60, 'HNL', 'Honduran Lempira'), + (61, 'HRK', 'Croatian Kuna'), + (62, 'HTG', 'Haitian Gourde'), + (63, 'HUF', 'Hungarian Forint'), + (64, 'IDR', 'Indonesian Rupiah'), + (66, 'ILS', 'Israeli New Shekel'), + (67, 'INR', 'Indian Rupee'), + (68, 'IQD', 'Iraqi Dinar'), + (69, 'IRR', 'Iranian Rial'), + (70, 'ISK', 'Iceland Krona'), + (72, 'JMD', 'Jamaican Dollar'), + (73, 'JOD', 'Jordanian Dinar'), + (74, 'JPY', 'Japanese Yen'), + (75, 'KES', 'Kenyan Shilling'), + (76, 'KHR', 'Kampuchean Riel'), + (77, 'KMF', 'Comoros Franc'), + (78, 'KPW', 'North Korean Won'), + (79, 'KRW', 'Korean Won'), + (80, 'KWD', 'Kuwaiti Dinar'), + (81, 'KYD', 'Cayman Islands Dollar'), + (82, 'KZT', 'Kazakhstan Tenge'), + (83, 'LAK', 'Lao Kip'), + (84, 'LBP', 'Lebanese Pound'), + (85, 'LKR', 'Sri Lanka Rupee'), + (86, 'LRD', 'Liberian Dollar'), + (87, 'LSL', 'Lesotho Loti'), + (88, 'LTL', 'Lithuanian Litas'), + (90, 'LVL', 'Latvian Lats'), + (91, 'LYD', 'Libyan Dinar'), + (92, 'MAD', 'Moroccan Dirham'), + (93, 'MGF', 'Malagasy Franc'), + (94, 'MMK', 'Myanmar Kyat'), + (95, 'MNT', 'Mongolian Tugrik'), + (96, 'MOP', 'Macau Pataca'), + (97, 'MRO', 'Mauritanian Ouguiya'), + (98, 'MTL', 'Maltese Lira'), + (99, 'MUR', 'Mauritius Rupee'), + (100, 'MVR', 'Maldive Rufiyaa'), + (101, 'MWK', 'Malawi Kwacha'), + (102, 'MXN', 'Mexican New Peso'), + (172, 'MXP', 'Mexican Peso'), + (103, 'MYR', 'Malaysian Ringgit'), + (104, 'MZM', 'Mozambique Metical'), + (105, 'NAD', 'Namibia Dollar'), + (106, 'NGN', 'Nigerian Naira'), + (107, 'NIO', 'Nicaraguan Cordoba Oro'), + (109, 'NOK', 'Norwegian Krona'), + (110, 'NPR', 'Nepalese Rupee'), + (111, 'NZD', 'New Zealand Dollar'), + (112, 'OMR', 'Omani Rial'), + (113, 'PAB', 'Panamanian Balboa'), + (114, 'PEN', 'Peruvian Nuevo Sol'), + (115, 'PGK', 'Papua New Guinea Kina'), + (116, 'PHP', 'Philippine Peso'), + (117, 'PKR', 'Pakistan Rupee'), + (118, 'PLN', 'Polish Zloty'), + (120, 'PYG', 'Paraguay Guarani'), + (121, 'QAR', 'Qatari Rial'), + (122, 'ROL', 'Romanian Leu'), + (123, 'RUB', 'Russian Rouble'), + (180, 'RUR', 'Russia Rubles'), + (125, 'SBD', 'Solomon Islands Dollar'), + (126, 'SCR', 'Seychelles Rupee'), + (127, 'SDD', 'Sudanese Dinar'), + (128, 'SDP', 'Sudanese Pound'), + (129, 'SEK', 'Swedish Krona'), + (131, 'SGD', 'Singapore Dollar'), + (132, 'SHP', 'St. Helena Pound'), + (130, 'SKK', 'Slovak Koruna'), + (135, 'SLL', 'Sierra Leone Leone'), + (136, 'SOS', 'Somali Shilling'), + (137, 'SRD', 'Surinamese Dollar'), + (138, 'STD', 'Sao Tome/Principe Dobra'), + (139, 'SVC', 'El Salvador Colon'), + (140, 'SYP', 'Syrian Pound'), + (141, 'SZL', 'Swaziland Lilangeni'), + (142, 'THB', 'Thai Baht'), + (143, 'TND', 'Tunisian Dinar'), + (144, 'TOP', 'Tongan Pa''anga'), + (145, 'TRL', 'Turkish Lira'), + (146, 'TTD', 'Trinidad/Tobago Dollar'), + (147, 'TWD', 'Taiwan Dollar'), + (148, 'TZS', 'Tanzanian Shilling'), + (149, 'UAH', 'Ukraine Hryvnia'), + (150, 'UGX', 'Uganda Shilling'), + (151, 'USD', 'United States Dollar'), + (152, 'UYP', 'Uruguayan Peso'), + (153, 'VEB', 'Venezuelan Bolivar'), + (154, 'VND', 'Vietnamese Dong'), + (155, 'VUV', 'Vanuatu Vatu'), + (156, 'WST', 'Samoan Tala'), + (158, 'XAF', 'CFA Franc BEAC'), + (159, 'XAG', 'Silver (oz.)'), + (160, 'XAU', 'Gold (oz.)'), + (161, 'XCD', 'Eastern Caribbean Dollars'), + (179, 'XDR', 'IMF Special Drawing Right'), + (162, 'XOF', 'CFA Franc BCEAO'), + (163, 'XPD', 'Palladium (oz.)'), + (164, 'XPF', 'CFP Franc'), + (165, 'XPT', 'Platinum (oz.)'), + (166, 'YER', 'Yemeni Riyal'), + (167, 'YUM', 'Yugoslavian Dinar'), + (175, 'YUN', 'Yugoslav Dinar'), + (168, 'ZAR', 'South African Rand'), + (176, 'ZMK', 'Zambian Kwacha'), + (169, 'ZRN', 'New Zaire'), + (170, 'ZWD', 'Zimbabwe Dollar'), + (173, 'SAR', 'Saudi Arabia Riyal'); + + +INSERT INTO `Country`(`code`, `namecap`, `name`, `iso3`, `numcode`) VALUES + ('AF', 'AFGHANISTAN', 'Afghanistan', 'AFG', 4), + ('AL', 'ALBANIA', 'Albania', 'ALB', 8), + ('DZ', 'ALGERIA', 'Algeria', 'DZA', 12), + ('AS', 'AMERICAN SAMOA', 'American Samoa', 'ASM', 16), + ('AD', 'ANDORRA', 'Andorra', 'AND', 20), + ('AO', 'ANGOLA', 'Angola', 'AGO', 24), + ('AI', 'ANGUILLA', 'Anguilla', 'AIA', 660), + ('AQ', 'ANTARCTICA', 'Antarctica', NULL, NULL), + ('AG', 'ANTIGUA AND BARBUDA', 'Antigua and Barbuda', 'ATG', 28), + ('AR', 'ARGENTINA', 'Argentina', 'ARG', 32), + ('AM', 'ARMENIA', 'Armenia', 'ARM', 51), + ('AW', 'ARUBA', 'Aruba', 'ABW', 533), + ('AU', 'AUSTRALIA', 'Australia', 'AUS', 36), + ('AT', 'AUSTRIA', 'Austria', 'AUT', 40), + ('AZ', 'AZERBAIJAN', 'Azerbaijan', 'AZE', 31), + ('BS', 'BAHAMAS', 'Bahamas', 'BHS', 44), + ('BH', 'BAHRAIN', 'Bahrain', 'BHR', 48), + ('BD', 'BANGLADESH', 'Bangladesh', 'BGD', 50), + ('BB', 'BARBADOS', 'Barbados', 'BRB', 52), + ('BY', 'BELARUS', 'Belarus', 'BLR', 112), + ('BE', 'BELGIUM', 'Belgium', 'BEL', 56), + ('BZ', 'BELIZE', 'Belize', 'BLZ', 84), + ('BJ', 'BENIN', 'Benin', 'BEN', 204), + ('BM', 'BERMUDA', 'Bermuda', 'BMU', 60), + ('BT', 'BHUTAN', 'Bhutan', 'BTN', 64), + ('BO', 'BOLIVIA', 'Bolivia', 'BOL', 68), + ('BA', 'BOSNIA AND HERZEGOVINA', 'Bosnia and Herzegovina', 'BIH', 70), + ('BW', 'BOTSWANA', 'Botswana', 'BWA', 72), + ('BV', 'BOUVET ISLAND', 'Bouvet Island', NULL, NULL), + ('BR', 'BRAZIL', 'Brazil', 'BRA', 76), + ('IO', 'BRITISH INDIAN OCEAN TERRITORY', 'British Indian Ocean Territory', NULL, NULL), + ('BN', 'BRUNEI DARUSSALAM', 'Brunei Darussalam', 'BRN', 96), + ('BG', 'BULGARIA', 'Bulgaria', 'BGR', 100), + ('BF', 'BURKINA FASO', 'Burkina Faso', 'BFA', 854), + ('BI', 'BURUNDI', 'Burundi', 'BDI', 108), + ('KH', 'CAMBODIA', 'Cambodia', 'KHM', 116), + ('CM', 'CAMEROON', 'Cameroon', 'CMR', 120), + ('CA', 'CANADA', 'Canada', 'CAN', 124), + ('CV', 'CAPE VERDE', 'Cape Verde', 'CPV', 132), + ('KY', 'CAYMAN ISLANDS', 'Cayman Islands', 'CYM', 136), + ('CF', 'CENTRAL AFRICAN REPUBLIC', 'Central African Republic', 'CAF', 140), + ('TD', 'CHAD', 'Chad', 'TCD', 148), + ('CL', 'CHILE', 'Chile', 'CHL', 152), + ('CN', 'CHINA', 'China', 'CHN', 156), + ('CX', 'CHRISTMAS ISLAND', 'Christmas Island', NULL, NULL), + ('CC', 'COCOS (KEELING) ISLANDS', 'Cocos (Keeling) Islands', NULL, NULL), + ('CO', 'COLOMBIA', 'Colombia', 'COL', 170), + ('KM', 'COMOROS', 'Comoros', 'COM', 174), + ('CG', 'CONGO', 'Congo', 'COG', 178), + ('CD', 'CONGO, THE DEMOCRATIC REPUBLIC OF THE', 'Congo, the Democratic Republic of the', 'COD', 180), + ('CK', 'COOK ISLANDS', 'Cook Islands', 'COK', 184), + ('CR', 'COSTA RICA', 'Costa Rica', 'CRI', 188), + ('CI', 'COTE D''IVOIRE', 'Cote D''Ivoire', 'CIV', 384), + ('HR', 'CROATIA', 'Croatia', 'HRV', 191), + ('CU', 'CUBA', 'Cuba', 'CUB', 192), + ('CY', 'CYPRUS', 'Cyprus', 'CYP', 196), + ('CZ', 'CZECH REPUBLIC', 'Czech Republic', 'CZE', 203), + ('DK', 'DENMARK', 'Denmark', 'DNK', 208), + ('DJ', 'DJIBOUTI', 'Djibouti', 'DJI', 262), + ('DM', 'DOMINICA', 'Dominica', 'DMA', 212), + ('DO', 'DOMINICAN REPUBLIC', 'Dominican Republic', 'DOM', 214), + ('EC', 'ECUADOR', 'Ecuador', 'ECU', 218), + ('EG', 'EGYPT', 'Egypt', 'EGY', 818), + ('SV', 'EL SALVADOR', 'El Salvador', 'SLV', 222), + ('GQ', 'EQUATORIAL GUINEA', 'Equatorial Guinea', 'GNQ', 226), + ('ER', 'ERITREA', 'Eritrea', 'ERI', 232), + ('EE', 'ESTONIA', 'Estonia', 'EST', 233), + ('ET', 'ETHIOPIA', 'Ethiopia', 'ETH', 231), + ('FK', 'FALKLAND ISLANDS (MALVINAS)', 'Falkland Islands (Malvinas)', 'FLK', 238), + ('FO', 'FAROE ISLANDS', 'Faroe Islands', 'FRO', 234), + ('FJ', 'FIJI', 'Fiji', 'FJI', 242), + ('FI', 'FINLAND', 'Finland', 'FIN', 246), + ('FR', 'FRANCE', 'France', 'FRA', 250), + ('GF', 'FRENCH GUIANA', 'French Guiana', 'GUF', 254), + ('PF', 'FRENCH POLYNESIA', 'French Polynesia', 'PYF', 258), + ('TF', 'FRENCH SOUTHERN TERRITORIES', 'French Southern Territories', NULL, NULL), + ('GA', 'GABON', 'Gabon', 'GAB', 266), + ('GM', 'GAMBIA', 'Gambia', 'GMB', 270), + ('GE', 'GEORGIA', 'Georgia', 'GEO', 268), + ('DE', 'GERMANY', 'Germany', 'DEU', 276), + ('GH', 'GHANA', 'Ghana', 'GHA', 288), + ('GI', 'GIBRALTAR', 'Gibraltar', 'GIB', 292), + ('GR', 'GREECE', 'Greece', 'GRC', 300), + ('GL', 'GREENLAND', 'Greenland', 'GRL', 304), + ('GD', 'GRENADA', 'Grenada', 'GRD', 308), + ('GP', 'GUADELOUPE', 'Guadeloupe', 'GLP', 312), + ('GU', 'GUAM', 'Guam', 'GUM', 316), + ('GT', 'GUATEMALA', 'Guatemala', 'GTM', 320), + ('GN', 'GUINEA', 'Guinea', 'GIN', 324), + ('GW', 'GUINEA-BISSAU', 'Guinea-Bissau', 'GNB', 624), + ('GY', 'GUYANA', 'Guyana', 'GUY', 328), + ('HT', 'HAITI', 'Haiti', 'HTI', 332), + ('HM', 'HEARD ISLAND AND MCDONALD ISLANDS', 'Heard Island and Mcdonald Islands', NULL, NULL), + ('VA', 'HOLY SEE (VATICAN CITY STATE)', 'Holy See (Vatican City State)', 'VAT', 336), + ('HN', 'HONDURAS', 'Honduras', 'HND', 340), + ('HK', 'HONG KONG', 'Hong Kong', 'HKG', 344), + ('HU', 'HUNGARY', 'Hungary', 'HUN', 348), + ('IS', 'ICELAND', 'Iceland', 'ISL', 352), + ('IN', 'INDIA', 'India', 'IND', 356), + ('ID', 'INDONESIA', 'Indonesia', 'IDN', 360), + ('IR', 'IRAN, ISLAMIC REPUBLIC OF', 'Iran, Islamic Republic of', 'IRN', 364), + ('IQ', 'IRAQ', 'Iraq', 'IRQ', 368), + ('IE', 'IRELAND', 'Ireland', 'IRL', 372), + ('IL', 'ISRAEL', 'Israel', 'ISR', 376), + ('IT', 'ITALY', 'Italy', 'ITA', 380), + ('JM', 'JAMAICA', 'Jamaica', 'JAM', 388), + ('JP', 'JAPAN', 'Japan', 'JPN', 392), + ('JO', 'JORDAN', 'Jordan', 'JOR', 400), + ('KZ', 'KAZAKHSTAN', 'Kazakhstan', 'KAZ', 398), + ('KE', 'KENYA', 'Kenya', 'KEN', 404), + ('KI', 'KIRIBATI', 'Kiribati', 'KIR', 296), + ('KP', 'KOREA, DEMOCRATIC PEOPLE''S REPUBLIC OF', 'Korea, Democratic People''s Republic of', 'PRK', 408), + ('KR', 'KOREA, REPUBLIC OF', 'Korea, Republic of', 'KOR', 410), + ('KW', 'KUWAIT', 'Kuwait', 'KWT', 414), + ('KG', 'KYRGYZSTAN', 'Kyrgyzstan', 'KGZ', 417), + ('LA', 'LAO PEOPLE''S DEMOCRATIC REPUBLIC', 'Lao People''s Democratic Republic', 'LAO', 418), + ('LV', 'LATVIA', 'Latvia', 'LVA', 428), + ('LB', 'LEBANON', 'Lebanon', 'LBN', 422), + ('LS', 'LESOTHO', 'Lesotho', 'LSO', 426), + ('LR', 'LIBERIA', 'Liberia', 'LBR', 430), + ('LY', 'LIBYAN ARAB JAMAHIRIYA', 'Libyan Arab Jamahiriya', 'LBY', 434), + ('LI', 'LIECHTENSTEIN', 'Liechtenstein', 'LIE', 438), + ('LT', 'LITHUANIA', 'Lithuania', 'LTU', 440), + ('LU', 'LUXEMBOURG', 'Luxembourg', 'LUX', 442), + ('MO', 'MACAO', 'Macao', 'MAC', 446), + ('MK', 'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF', 'Macedonia, the Former Yugoslav Republic of', 'MKD', 807), + ('MG', 'MADAGASCAR', 'Madagascar', 'MDG', 450), + ('MW', 'MALAWI', 'Malawi', 'MWI', 454), + ('MY', 'MALAYSIA', 'Malaysia', 'MYS', 458), + ('MV', 'MALDIVES', 'Maldives', 'MDV', 462), + ('ML', 'MALI', 'Mali', 'MLI', 466), + ('MT', 'MALTA', 'Malta', 'MLT', 470), + ('MH', 'MARSHALL ISLANDS', 'Marshall Islands', 'MHL', 584), + ('MQ', 'MARTINIQUE', 'Martinique', 'MTQ', 474), + ('MR', 'MAURITANIA', 'Mauritania', 'MRT', 478), + ('MU', 'MAURITIUS', 'Mauritius', 'MUS', 480), + ('YT', 'MAYOTTE', 'Mayotte', NULL, NULL), + ('MX', 'MEXICO', 'Mexico', 'MEX', 484), + ('FM', 'MICRONESIA, FEDERATED STATES OF', 'Micronesia, Federated States of', 'FSM', 583), + ('MD', 'MOLDOVA, REPUBLIC OF', 'Moldova, Republic of', 'MDA', 498), + ('MC', 'MONACO', 'Monaco', 'MCO', 492), + ('MN', 'MONGOLIA', 'Mongolia', 'MNG', 496), + ('MS', 'MONTSERRAT', 'Montserrat', 'MSR', 500), + ('MA', 'MOROCCO', 'Morocco', 'MAR', 504), + ('MZ', 'MOZAMBIQUE', 'Mozambique', 'MOZ', 508), + ('MM', 'MYANMAR', 'Myanmar', 'MMR', 104), + ('NA', 'NAMIBIA', 'Namibia', 'NAM', 516), + ('NR', 'NAURU', 'Nauru', 'NRU', 520), + ('NP', 'NEPAL', 'Nepal', 'NPL', 524), + ('NL', 'NETHERLANDS', 'Netherlands', 'NLD', 528), + ('AN', 'NETHERLANDS ANTILLES', 'Netherlands Antilles', 'ANT', 530), + ('NC', 'NEW CALEDONIA', 'New Caledonia', 'NCL', 540), + ('NZ', 'NEW ZEALAND', 'New Zealand', 'NZL', 554), + ('NI', 'NICARAGUA', 'Nicaragua', 'NIC', 558), + ('NE', 'NIGER', 'Niger', 'NER', 562), + ('NG', 'NIGERIA', 'Nigeria', 'NGA', 566), + ('NU', 'NIUE', 'Niue', 'NIU', 570), + ('NF', 'NORFOLK ISLAND', 'Norfolk Island', 'NFK', 574), + ('MP', 'NORTHERN MARIANA ISLANDS', 'Northern Mariana Islands', 'MNP', 580), + ('NO', 'NORWAY', 'Norway', 'NOR', 578), + ('OM', 'OMAN', 'Oman', 'OMN', 512), + ('PK', 'PAKISTAN', 'Pakistan', 'PAK', 586), + ('PW', 'PALAU', 'Palau', 'PLW', 585), + ('PS', 'PALESTINIAN TERRITORY, OCCUPIED', 'Palestinian Territory, Occupied', NULL, NULL), + ('PA', 'PANAMA', 'Panama', 'PAN', 591), + ('PG', 'PAPUA NEW GUINEA', 'Papua New Guinea', 'PNG', 598), + ('PY', 'PARAGUAY', 'Paraguay', 'PRY', 600), + ('PE', 'PERU', 'Peru', 'PER', 604), + ('PH', 'PHILIPPINES', 'Philippines', 'PHL', 608), + ('PN', 'PITCAIRN', 'Pitcairn', 'PCN', 612), + ('PL', 'POLAND', 'Poland', 'POL', 616), + ('PT', 'PORTUGAL', 'Portugal', 'PRT', 620), + ('PR', 'PUERTO RICO', 'Puerto Rico', 'PRI', 630), + ('QA', 'QATAR', 'Qatar', 'QAT', 634), + ('RE', 'REUNION', 'Reunion', 'REU', 638), + ('RO', 'ROMANIA', 'Romania', 'ROM', 642), + ('RU', 'RUSSIAN FEDERATION', 'Russian Federation', 'RUS', 643), + ('RW', 'RWANDA', 'Rwanda', 'RWA', 646), + ('SH', 'SAINT HELENA', 'Saint Helena', 'SHN', 654), + ('KN', 'SAINT KITTS AND NEVIS', 'Saint Kitts and Nevis', 'KNA', 659), + ('LC', 'SAINT LUCIA', 'Saint Lucia', 'LCA', 662), + ('PM', 'SAINT PIERRE AND MIQUELON', 'Saint Pierre and Miquelon', 'SPM', 666), + ('VC', 'SAINT VINCENT AND THE GRENADINES', 'Saint Vincent and the Grenadines', 'VCT', 670), + ('WS', 'SAMOA', 'Samoa', 'WSM', 882), + ('SM', 'SAN MARINO', 'San Marino', 'SMR', 674), + ('ST', 'SAO TOME AND PRINCIPE', 'Sao Tome and Principe', 'STP', 678), + ('SA', 'SAUDI ARABIA', 'Saudi Arabia', 'SAU', 682), + ('SN', 'SENEGAL', 'Senegal', 'SEN', 686), + ('CS', 'SERBIA AND MONTENEGRO', 'Serbia and Montenegro', NULL, NULL), + ('SC', 'SEYCHELLES', 'Seychelles', 'SYC', 690), + ('SL', 'SIERRA LEONE', 'Sierra Leone', 'SLE', 694), + ('SG', 'SINGAPORE', 'Singapore', 'SGP', 702), + ('SK', 'SLOVAKIA', 'Slovakia', 'SVK', 703), + ('SI', 'SLOVENIA', 'Slovenia', 'SVN', 705), + ('SB', 'SOLOMON ISLANDS', 'Solomon Islands', 'SLB', 90), + ('SO', 'SOMALIA', 'Somalia', 'SOM', 706), + ('ZA', 'SOUTH AFRICA', 'South Africa', 'ZAF', 710), + ('GS', 'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS', 'South Georgia and the South Sandwich Islands', NULL, NULL), + ('ES', 'SPAIN', 'Spain', 'ESP', 724), + ('LK', 'SRI LANKA', 'Sri Lanka', 'LKA', 144), + ('SD', 'SUDAN', 'Sudan', 'SDN', 736), + ('SR', 'SURINAME', 'Suriname', 'SUR', 740), + ('SJ', 'SVALBARD AND JAN MAYEN', 'Svalbard and Jan Mayen', 'SJM', 744), + ('SZ', 'SWAZILAND', 'Swaziland', 'SWZ', 748), + ('SE', 'SWEDEN', 'Sweden', 'SWE', 752), + ('CH', 'SWITZERLAND', 'Switzerland', 'CHE', 756), + ('SY', 'SYRIAN ARAB REPUBLIC', 'Syrian Arab Republic', 'SYR', 760), + ('TW', 'TAIWAN, PROVINCE OF CHINA', 'Taiwan', 'TWN', 158), + ('TJ', 'TAJIKISTAN', 'Tajikistan', 'TJK', 762), + ('TZ', 'TANZANIA, UNITED REPUBLIC OF', 'Tanzania, United Republic of', 'TZA', 834), + ('TH', 'THAILAND', 'Thailand', 'THA', 764), + ('TL', 'TIMOR-LESTE', 'Timor-Leste', NULL, NULL), + ('TG', 'TOGO', 'Togo', 'TGO', 768), + ('TK', 'TOKELAU', 'Tokelau', 'TKL', 772), + ('TO', 'TONGA', 'Tonga', 'TON', 776), + ('TT', 'TRINIDAD AND TOBAGO', 'Trinidad and Tobago', 'TTO', 780), + ('TN', 'TUNISIA', 'Tunisia', 'TUN', 788), + ('TR', 'TURKEY', 'Turkey', 'TUR', 792), + ('TM', 'TURKMENISTAN', 'Turkmenistan', 'TKM', 795), + ('TC', 'TURKS AND CAICOS ISLANDS', 'Turks and Caicos Islands', 'TCA', 796), + ('TV', 'TUVALU', 'Tuvalu', 'TUV', 798), + ('UG', 'UGANDA', 'Uganda', 'UGA', 800), + ('UA', 'UKRAINE', 'Ukraine', 'UKR', 804), + ('AE', 'UNITED ARAB EMIRATES', 'United Arab Emirates', 'ARE', 784), + ('GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826), + ('US', 'UNITED STATES', 'United States', 'USA', 840), + ('UM', 'UNITED STATES MINOR OUTLYING ISLANDS', 'United States Minor Outlying Islands', NULL, NULL), + ('UY', 'URUGUAY', 'Uruguay', 'URY', 858), + ('UZ', 'UZBEKISTAN', 'Uzbekistan', 'UZB', 860), + ('VU', 'VANUATU', 'Vanuatu', 'VUT', 548), + ('VE', 'VENEZUELA', 'Venezuela', 'VEN', 862), + ('VN', 'VIET NAM', 'Viet Nam', 'VNM', 704), + ('VG', 'VIRGIN ISLANDS, BRITISH', 'Virgin Islands, British', 'VGB', 92), + ('VI', 'VIRGIN ISLANDS, U.S.', 'Virgin Islands, U.s.', 'VIR', 850), + ('WF', 'WALLIS AND FUTUNA', 'Wallis and Futuna', 'WLF', 876), + ('EH', 'WESTERN SAHARA', 'Western Sahara', 'ESH', 732), + ('YE', 'YEMEN', 'Yemen', 'YEM', 887), + ('ZM', 'ZAMBIA', 'Zambia', 'ZMB', 894), + ('ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716); + +INSERT INTO `Province`(`id`, `name`, `code`, `country`) VALUES + (1, 'Alaska', 'AK', 'US'), + (2, 'Alabama', 'AL', 'US'), + (3, 'American Samoa', 'AS', 'US'), + (4, 'Arizona', 'AZ', 'US'), + (5, 'Arkansas', 'AR', 'US'), + (6, 'California', 'CA', 'US'), + (7, 'Colorado', 'CO', 'US'), + (8, 'Connecticut', 'CT', 'US'), + (9, 'Delaware', 'DE', 'US'), + (10, 'District of Columbia', 'DC', 'US'), + (11, 'Federated States of Micronesia', 'FM', 'US'), + (12, 'Florida', 'FL', 'US'), + (13, 'Georgia', 'GA', 'US'), + (14, 'Guam', 'GU', 'US'), + (15, 'Hawaii', 'HI', 'US'), + (16, 'Idaho', 'ID', 'US'), + (17, 'Illinois', 'IL', 'US'), + (18, 'Indiana', 'IN', 'US'), + (19, 'Iowa', 'IA', 'US'), + (20, 'Kansas', 'KS', 'US'), + (21, 'Kentucky', 'KY', 'US'), + (22, 'Louisiana', 'LA', 'US'), + (23, 'Maine', 'ME', 'US'), + (24, 'Marshall Islands', 'MH', 'US'), + (25, 'Maryland', 'MD', 'US'), + (26, 'Massachusetts', 'MA', 'US'), + (27, 'Michigan', 'MI', 'US'), + (28, 'Minnesota', 'MN', 'US'), + (29, 'Mississippi', 'MS', 'US'), + (30, 'Missouri', 'MO', 'US'), + (31, 'Montana', 'MT', 'US'), + (32, 'Nebraska', 'NE', 'US'), + (33, 'Nevada', 'NV', 'US'), + (34, 'New Hampshire', 'NH', 'US'), + (35, 'New Jersey', 'NJ', 'US'), + (36, 'New Mexico', 'NM', 'US'), + (37, 'New York', 'NY', 'US'), + (38, 'North Carolina', 'NC', 'US'), + (39, 'North Dakota', 'ND', 'US'), + (40, 'Northern Mariana Islands', 'MP', 'US'), + (41, 'Ohio', 'OH', 'US'), + (42, 'Oklahoma', 'OK', 'US'), + (43, 'Oregon', 'OR', 'US'), + (44, 'Palau', 'PW', 'US'), + (45, 'Pennsylvania', 'PA', 'US'), + (46, 'Puerto Rico', 'PR', 'US'), + (47, 'Rhode Island', 'RI', 'US'), + (48, 'South Carolina', 'SC', 'US'), + (49, 'South Dakota', 'SD', 'US'), + (50, 'Tennessee', 'TN', 'US'), + (51, 'Texas', 'TX', 'US'), + (52, 'Utah', 'UT', 'US'), + (53, 'Vermont', 'VT', 'US'), + (54, 'Virgin Islands', 'VI', 'US'), + (55, 'Virginia', 'VA', 'US'), + (56, 'Washington', 'WA', 'US'), + (57, 'West Virginia', 'WV', 'US'), + (58, 'Wisconsin', 'WI', 'US'), + (59, 'Wyoming', 'WY', 'US'), + (60, 'Armed Forces Africa', 'AE', 'US'), + (61, 'Armed Forces Americas (except Canada)', 'AA', 'US'), + (62, 'Armed Forces Canada', 'AE', 'US'), + (63, 'Armed Forces Europe', 'AE', 'US'), + (64, 'Armed Forces Middle East', 'AE', 'US'), + (65, 'Armed Forces Pacific', 'AP', 'US'); + + + +INSERT INTO `Nationality` (`id`, `name`) VALUES +(1, 'Afghan'), +(2, 'Albanian'), +(3, 'Algerian'), +(4, 'American'), +(5, 'Andorran'), +(6, 'Angolan'), +(7, 'Antiguans'), +(8, 'Argentinean'), +(9, 'Armenian'), +(10, 'Australian'), +(11, 'Austrian'), +(12, 'Azerbaijani'), +(13, 'Bahamian'), +(14, 'Bahraini'), +(15, 'Bangladeshi'), +(16, 'Barbadian'), +(17, 'Barbudans'), +(18, 'Batswana'), +(19, 'Belarusian'), +(20, 'Belgian'), +(21, 'Belizean'), +(22, 'Beninese'), +(23, 'Bhutanese'), +(24, 'Bolivian'), +(25, 'Bosnian'), +(26, 'Brazilian'), +(27, 'British'), +(28, 'Bruneian'), +(29, 'Bulgarian'), +(30, 'Burkinabe'), +(31, 'Burmese'), +(32, 'Burundian'), +(33, 'Cambodian'), +(34, 'Cameroonian'), +(35, 'Canadian'), +(36, 'Cape Verdean'), +(37, 'Central African'), +(38, 'Chadian'), +(39, 'Chilean'), +(40, 'Chinese'), +(41, 'Colombian'), +(42, 'Comoran'), +(43, 'Congolese'), +(44, 'Costa Rican'), +(45, 'Croatian'), +(46, 'Cuban'), +(47, 'Cypriot'), +(48, 'Czech'), +(49, 'Danish'), +(50, 'Djibouti'), +(51, 'Dominican'), +(52, 'Dutch'), +(53, 'East Timorese'), +(54, 'Ecuadorean'), +(55, 'Egyptian'), +(56, 'Emirian'), +(57, 'Equatorial Guinean'), +(58, 'Eritrean'), +(59, 'Estonian'), +(60, 'Ethiopian'), +(61, 'Fijian'), +(62, 'Filipino'), +(63, 'Finnish'), +(64, 'French'), +(65, 'Gabonese'), +(66, 'Gambian'), +(67, 'Georgian'), +(68, 'German'), +(69, 'Ghanaian'), +(70, 'Greek'), +(71, 'Grenadian'), +(72, 'Guatemalan'), +(73, 'Guinea-Bissauan'), +(74, 'Guinean'), +(75, 'Guyanese'), +(76, 'Haitian'), +(77, 'Herzegovinian'), +(78, 'Honduran'), +(79, 'Hungarian'), +(80, 'I-Kiribati'), +(81, 'Icelander'), +(82, 'Indian'), +(83, 'Indonesian'), +(84, 'Iranian'), +(85, 'Iraqi'), +(86, 'Irish'), +(87, 'Israeli'), +(88, 'Italian'), +(89, 'Ivorian'), +(90, 'Jamaican'), +(91, 'Japanese'), +(92, 'Jordanian'), +(93, 'Kazakhstani'), +(94, 'Kenyan'), +(95, 'Kittian and Nevisian'), +(96, 'Kuwaiti'), +(97, 'Kyrgyz'), +(98, 'Laotian'), +(99, 'Latvian'), +(100, 'Lebanese'), +(101, 'Liberian'), +(102, 'Libyan'), +(103, 'Liechtensteiner'), +(104, 'Lithuanian'), +(105, 'Luxembourger'), +(106, 'Macedonian'), +(107, 'Malagasy'), +(108, 'Malawian'), +(109, 'Malaysian'), +(110, 'Maldivan'), +(111, 'Malian'), +(112, 'Maltese'), +(113, 'Marshallese'), +(114, 'Mauritanian'), +(115, 'Mauritian'), +(116, 'Mexican'), +(117, 'Micronesian'), +(118, 'Moldovan'), +(119, 'Monacan'), +(120, 'Mongolian'), +(121, 'Moroccan'), +(122, 'Mosotho'), +(123, 'Motswana'), +(124, 'Mozambican'), +(125, 'Namibian'), +(126, 'Nauruan'), +(127, 'Nepalese'), +(128, 'New Zealander'), +(129, 'Nicaraguan'), +(130, 'Nigerian'), +(131, 'Nigerien'), +(132, 'North Korean'), +(133, 'Northern Irish'), +(134, 'Norwegian'), +(135, 'Omani'), +(136, 'Pakistani'), +(137, 'Palauan'), +(138, 'Panamanian'), +(139, 'Papua New Guinean'), +(140, 'Paraguayan'), +(141, 'Peruvian'), +(142, 'Polish'), +(143, 'Portuguese'), +(144, 'Qatari'), +(145, 'Romanian'), +(146, 'Russian'), +(147, 'Rwandan'), +(148, 'Saint Lucian'), +(149, 'Salvadoran'), +(150, 'Samoan'), +(151, 'San Marinese'), +(152, 'Sao Tomean'), +(153, 'Saudi'), +(154, 'Scottish'), +(155, 'Senegalese'), +(156, 'Serbian'), +(157, 'Seychellois'), +(158, 'Sierra Leonean'), +(159, 'Singaporean'), +(160, 'Slovakian'), +(161, 'Slovenian'), +(162, 'Solomon Islander'), +(163, 'Somali'), +(164, 'South African'), +(165, 'South Korean'), +(166, 'Spanish'), +(167, 'Sri Lankan'), +(168, 'Sudanese'), +(169, 'Surinamer'), +(170, 'Swazi'), +(171, 'Swedish'), +(172, 'Swiss'), +(173, 'Syrian'), +(174, 'Taiwanese'), +(175, 'Tajik'), +(176, 'Tanzanian'), +(177, 'Thai'), +(178, 'Togolese'), +(179, 'Tongan'), +(180, 'Trinidadian or Tobagonian'), +(181, 'Tunisian'), +(182, 'Turkish'), +(183, 'Tuvaluan'), +(184, 'Ugandan'), +(185, 'Ukrainian'), +(186, 'Uruguayan'), +(187, 'Uzbekistani'), +(188, 'Venezuelan'), +(189, 'Vietnamese'), +(190, 'Welsh'), +(191, 'Yemenite'), +(192, 'Zambian'), +(193, 'Zimbabwean'); + +INSERT INTO `WorkDays` (`id`, `name`, `status`, `country`) VALUES +(1, 'Monday', 'Full Day',NULL), +(2, 'Tuesday', 'Full Day',NULL), +(3, 'Wednesday', 'Full Day',NULL), +(4, 'Thursday', 'Full Day',NULL), +(5, 'Friday', 'Full Day',NULL), +(6, 'Saturday', 'Non-working Day',NULL), +(7, 'Sunday', 'Non-working Day',NULL); + + +INSERT INTO `Reports` (`id`, `name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES +(1, 'Employee Details Report', 'This report list all employee details and you can filter employees by department, employment status or job title', '[\r\n[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "employment_status", {"label":"Employment Status","type":"select2","remote-source":["EmploymentStatus","id","name"],"allow-null":true}],\r\n[ "job_title", {"label":"Job Title","type":"select2","remote-source":["JobTitle","id","name"],"allow-null":true}]\r\n]', 'Select id, employee_id as ''Employee ID'',\r\nconcat(`first_name`,'' '',`middle_name`,'' '', `last_name`) as ''Name'',\r\n(SELECT name from Nationality where id = nationality) as ''Nationality'',\r\nbirthday as ''Birthday'',\r\ngender as ''Gender'',\r\nmarital_status as ''Marital Status'',\r\nssn_num as ''SSN Number'',\r\nnic_num as ''NIC Number'',\r\nother_id as ''Other IDs'',\r\ndriving_license as ''Driving License Number'',\r\n(SELECT name from EmploymentStatus where id = employment_status) as ''Employment Status'',\r\n(SELECT name from JobTitles where id = job_title) as ''Job Title'',\r\n(SELECT name from PayGrades where id = pay_grade) as ''Pay Grade'',\r\nwork_station_id as ''Work Station ID'',\r\naddress1 as ''Address 1'',\r\naddress2 as ''Address 2'',\r\ncity as ''City'',\r\n(SELECT name from Country where code = country) as ''Country'',\r\n(SELECT name from Province where id = province) as ''Province'',\r\npostal_code as ''Postal Code'',\r\nhome_phone as ''Home Phone'',\r\nmobile_phone as ''Mobile Phone'',\r\nwork_phone as ''Work Phone'',\r\nwork_email as ''Work Email'',\r\nprivate_email as ''Private Email'',\r\njoined_date as ''Joined Date'',\r\nconfirmation_date as ''Confirmation Date'',\r\n(SELECT title from CompanyStructures where id = department) as ''Department'',\r\n(SELECT concat(`first_name`,'' '',`middle_name`,'' '', `last_name`,'' [Employee ID:'',`employee_id`,'']'') from Employees e1 where e1.id = e.supervisor) as ''Supervisor'' \r\nFROM Employees e _where_', '["department","employment_status","job_title"]', 'Query'), +(3, 'Employee Time Entry Report', 'This report list all employee time entries by employee, date range and project', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "project", {"label":"Project","type":"select","allow-null":true,"remote-source":["Project","id","name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeTimesheetReport', '["employee","date_start","date_end","status"]', 'Class'), +(4, 'Employee Attendance Report', 'This report list all employee attendance entries by employee and date range', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeAttendanceReport', '["employee","date_start","date_end"]', 'Class'), +(5, 'Employee Time Tracking Report', 'This report list employee working hours and attendance details for each day for a given period ', '[\r\n[ "employee", {"label":"Employee","type":"select2","allow-null":false,"remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeTimeTrackReport', '["employee","date_start","date_end"]', 'Class'); + + + +INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +('Company: Name', 'Sample Company Pvt Ltd', 'Update your company name - For updating company logo copy a file named logo.png to /app/data/ folder', ''), +('Email: Enable', '1', '0 will disable all outgoing emails from modules. Value 1 will enable outgoing emails','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('Email: Mode', 'SMTP', 'SMTP, PHP Mailer or Amazon SES. SMTP = send emails using local or a remote smtp server. PHP Mailer = send emails using mail function provided by php. Amazon SES = send emails trough amazon Simple Email Service.','["value", {"label":"Value","type":"select","source":[["SMTP","SMTP"],["PHP Mailer","PHP Mailer"],["SES","Amazon SES"]]}]'), +('Email: SMTP Host', 'localhost', 'SMTP host IP',''), +('Email: SMTP Authentication Required', '0', 'Is authentication required by this SMTP server','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('Email: SMTP User', 'none', 'SMTP user',''), +('Email: SMTP Password', 'none', 'SMTP password',''), +('Email: SMTP Port', 'none', '25',''), +('Email: Amazon Access Key ID', '', 'If email mode is Amazon SNS please provide SNS Key',''), +('Email: Amazon Secret Access Key', '', 'If email mode is Amazon SNS please provide SNS Secret',''), +('Email: Email From', 'icehrm@mydomain.com', '',''), +('System: Do not pass JSON in request', '0', 'Select Yes if you are having trouble loading data for some tables','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('System: Reset Modules and Permissions', '0', 'Select this to reset module and permission information in Database (If you have done any changes to meta files)','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('System: Add New Permissions', '0', 'Select this to add new permission changes done to meta.json file of any module','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('System: Debug Mode', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('Projects: Make All Projects Available to Employees', '1', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('Attendance: Time-sheet Cross Check', '0', 'Only allow users to add an entry to a timesheet only if they have marked atteandance for the selected period','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), +('Api: REST Api Enabled', '0', '','["value", {"label":"Value","type":"select","source":[["0","No"],["1","Yes"]]}]'); + + +INSERT INTO `Certifications` (`id`, `name`, `description`) VALUES +(1, 'Red Hat Certified Architect (RHCA)', 'Red Hat Certified Architect (RHCA)'), +(2, 'GIAC Secure Software Programmer -Java', 'GIAC Secure Software Programmer -Java'), +(3, 'Risk Management Professional (PMI)', 'Risk Management Professional (PMI)'), +(4, 'IT Infrastructure Library (ITIL) Expert Certification', 'IT Infrastructure Library (ITIL) Expert Certification'), +(5, 'Microsoft Certified Architect', 'Microsoft Certified Architect'), +(6, 'Oracle Exadata 11g Certified Implementation Specialist', 'Oracle Exadata 11g Certified Implementation Specialist'), +(7, 'Cisco Certified Design Professional (CCDP)', 'Cisco Certified Design Professional (CCDP)'), +(8, 'Cisco Certified Internetwork Expert (CCIE)', 'Cisco Certified Internetwork Expert (CCIE)'), +(9, 'Cisco Certified Network Associate', 'Cisco Certified Network Associate'), +(10, 'HP/Master Accredited Solutions Expert (MASE)', 'HP/Master Accredited Solutions Expert (MASE)'), +(11, 'HP/Master Accredited Systems Engineer (Master ASE)', 'HP/Master Accredited Systems Engineer (Master ASE)'), +(12, 'Certified Information Security Manager (CISM)', 'Certified Information Security Manager (CISM)'), +(13, 'Certified Information Systems Auditor (CISA)', 'Certified Information Systems Auditor (CISA)'), +(14, 'CyberSecurity Forensic Analyst (CSFA)', 'CyberSecurity Forensic Analyst (CSFA)'), +(15, 'Open Group Certified Architect (OpenCA)', 'Open Group Certified Architect (OpenCA)'), +(16, 'Oracle DBA Administrator Certified Master OCM', 'Oracle DBA Administrator Certified Master OCM'), +(17, 'Project Management Professional', 'Project Management Professional'), +(18, 'Apple Certified Support Professional', 'Apple Certified Support Professional'), +(19, 'Certified Public Accountant (CPA)', 'Certified Public Accountant (CPA)'), +(20, 'Chartered Financial Analyst', 'Chartered Financial Analyst'), +(21, 'Professional in Human Resources (PHR)', 'Professional in Human Resources (PHR)'); + + + +INSERT INTO `Clients` (`id`, `name`, `details`, `first_contact_date`, `created`, `address`, `contact_number`, `contact_email`, `company_url`, `status`) VALUES +(1, 'IceHrm Sample Client 1', NULL, '2012-01-04', '2013-01-03 05:47:33', '001, Sample Road,\nSample City, USA', '678-894-1047', 'icehrm+client1@web-stalk.com', 'http://icehrm.com', 'Active'), +(2, 'IceHrm Sample Client 2', NULL, '2012-01-04', '2013-01-03 05:47:33', '001, Sample Road,\nSample City, USA', '678-894-1047', 'icehrm+client1@web-stalk.com', 'http://icehrm.com', 'Active'), +(3, 'IceHrm Sample Client 3', NULL, '2012-01-04', '2013-01-03 05:47:33', '001, Sample Road,\nSample City, USA', '678-894-1047', 'icehrm+client1@web-stalk.com', 'http://icehrm.com', 'Active'); + + +INSERT INTO `CompanyLoans` (`id`, `name`, `details`) VALUES +(1, 'Personal loan', 'Personal loans'), +(2, 'Educational loan', 'Educational loan'); + + +INSERT INTO `CompanyStructures` (`id`, `title`, `description`, `address`, `type`, `country`, `parent`) VALUES +(1, 'Your Company', 'Please update your company name here. You can update, delete or add units according to your needs', '', 'Company', 'US', NULL), +(2, 'Head Office', 'US Head office', 'PO Box 001002\nSample Road, Sample Town', 'Head Office', 'US', 1), +(3, 'Marketing Department', 'Marketing Department', 'PO Box 001002\nSample Road, Sample Town', 'Department', 'US', 2); + + +INSERT INTO `Documents` (`id`, `name`, `details`) VALUES +(1, 'ID Copy', 'Your ID copy'), +(2, 'Degree Ceritficate', 'Degree Ceritficate'), +(3, 'Driving License', 'Driving License'); + + +INSERT INTO `Educations` (`id`, `name`, `description`) VALUES +(1, 'Bachelors Degree', 'Bachelors Degree'), +(2, 'Diploma', 'Diploma'), +(3, 'Masters Degree', 'Masters Degree'), +(4, 'Doctorate', 'Doctorate'); + +INSERT INTO `HoliDays` (`id`, `name`, `dateh`, `status`) VALUES +(1, 'New Year''s Day', '2015-01-01', 'Full Day'), +(2, 'Christmas Day', '2015-12-25', 'Full Day'); + + +INSERT INTO `JobTitles` (`id`, `code`, `name`, `description`, `specification`) VALUES +(1, 'SE', 'Software Engineer', 'The work of a software engineer typically includes designing and programming system-level software: operating systems, database systems, embedded systems and so on. They understand how both software a', 'Software Engineer'), +(2, 'ASE', 'Assistant Software Engineer', 'Assistant Software Engineer', 'Assistant Software Engineer'), +(3, 'PM', 'Project Manager', 'Project Manager', 'Project Manager'), +(4, 'QAE', 'QA Engineer', 'Quality Assurance Engineer ', 'Quality Assurance Engineer '), +(5, 'PRM', 'Product Manager', 'Product Manager', 'Product Manager'), +(6, 'AQAE', 'Assistant QA Engineer ', 'Assistant QA Engineer ', 'Assistant QA Engineer '), +(7, 'TPM', 'Technical Project Manager', 'Technical Project Manager', 'Technical Project Manager'), +(8, 'PRS', 'Pre-Sales Executive', 'Pre-Sales Executive', 'Pre-Sales Executive'), +(9, 'ME', 'Marketing Executive', 'Marketing Executive', 'Marketing Executive'), +(10, 'DH', 'Department Head', 'Department Head', 'Department Head'), +(11, 'CEO', 'Chief Executive Officer', 'Chief Executive Officer', 'Chief Executive Officer'), +(12, 'DBE', 'Database Engineer', 'Database Engineer', 'Database Engineer'), +(13, 'SA', 'Server Admin', 'Server Admin', 'Server Admin'); + + +INSERT INTO `Languages` (`id`, `name`, `description`) VALUES +(1, 'English', 'English'), +(2, 'French', 'French'), +(3, 'German', 'German'), +(4, 'Chinese', 'Chinese'); + + + +INSERT INTO `PayGrades` (`id`, `name`, `currency`, `min_salary`, `max_salary`) VALUES +(1, 'Manager', 'SGD', '5000.00', '15000.00'), +(2, 'Executive', 'SGD', '3500.00', '7000.00'), +(3, 'Assistant ', 'SGD', '2000.00', '4000.00'), +(4, 'Administrator', 'SGD', '2000.00', '6000.00'); + +INSERT INTO `Projects` (`id`, `name`, `client`, `details`, `created`, `status`) VALUES +(1, 'Project 1', 3, NULL, '2013-01-03 05:53:38', 'Active'), +(2, 'Project 2', 3, NULL, '2013-01-03 05:54:22', 'Active'), +(3, 'Project 3', 1, NULL, '2013-01-03 05:55:02', 'Active'), +(4, 'Project 4', 2, NULL, '2013-01-03 05:56:16', 'Active'); + +INSERT INTO `Skills` (`id`, `name`, `description`) VALUES +(1, 'Programming and Application Development', 'Programming and Application Development'), +(2, 'Project Management', 'Project Management'), +(3, 'Help Desk/Technical Support', 'Help Desk/Technical Support'), +(4, 'Networking', 'Networking'), +(5, 'Databases', 'Databases'), +(6, 'Business Intelligence', 'Business Intelligence'), +(7, 'Cloud Computing', 'Cloud Computing'), +(8, 'Information Security', 'Information Security'), +(9, 'HTML Skills', 'HTML Skills'), +(10, 'Graphic Designing', 'Graphic Designing'); + +INSERT INTO `EmploymentStatus` (`id`, `name`, `description`) VALUES +(1, 'Full Time Contract', 'Full Time Contract'), +(2, 'Full Time Internship', 'Full Time Internship'), +(3, 'Full Time Permanent', 'Full Time Permanent'), +(4, 'Part Time Contract', 'Part Time Contract'), +(5, 'Part Time Internship', 'Part Time Internship'), +(6, 'Part Time Permanent', 'Part Time Permanent'); + +INSERT INTO `FieldNameMappings` (`type`, `name`, `textOrig`, `textMapped`, `display`) VALUES + ('Employee', 'employee_id', 'Employee Number', 'Employee Number', 'Table and Form'), + ('Employee', 'first_name', 'First Name', 'First Name', 'Table and Form'), + ('Employee', 'middle_name', 'Middle Name', 'Middle Name', 'Form'), + ('Employee', 'last_name', 'Last Name', 'Last Name', 'Table and Form'), + ('Employee', 'nationality', 'Nationality', 'Nationality', 'Form'), + ('Employee', 'ethnicity', 'Ethnicity', 'Ethnicity', 'Form'), + ('Employee', 'immigration_status', 'Immigration Status', 'Immigration Status', 'Form'), + ('Employee', 'birthday', 'Date of Birth', 'Date of Birth', 'Form'), + ('Employee', 'gender', 'Gender', 'Gender', 'Form'), + ('Employee', 'marital_status', 'Marital Status', 'Marital Status', 'Form'), + ('Employee', 'ssn_num', 'SSN/NRIC', 'SSN/NRIC', 'Form'), + ('Employee', 'nic_num', 'NIC', 'NIC', 'Form'), + ('Employee', 'other_id', 'Other ID', 'Other ID', 'Form'), + ('Employee', 'driving_license', 'Driving License No', 'Driving License No', 'Form'), + ('Employee', 'employment_status', 'Employment Status', 'Employment Status', 'Form'), + ('Employee', 'job_title', 'Job Title', 'Job Title', 'Form'), + ('Employee', 'pay_grade', 'Pay Grade', 'Pay Grade', 'Form'), + ('Employee', 'work_station_id', 'Work Station Id', 'Work Station Id', 'Form'), + ('Employee', 'address1', 'Address Line 1', 'Address Line 1', 'Form'), + ('Employee', 'address2', 'Address Line 2', 'Address Line 2', 'Form'), + ('Employee', 'city', 'City', 'City', 'Form'), + ('Employee', 'country', 'Country', 'Country', 'Form'), + ('Employee', 'province', 'Province', 'Province', 'Form'), + ('Employee', 'postal_code', 'Postal/Zip Code', 'Postal/Zip Code', 'Form'), + ('Employee', 'home_phone', 'Home Phone', 'Home Phone', 'Form'), + ('Employee', 'mobile_phone', 'Mobile Phone', 'Mobile Phone', 'Table and Form'), + ('Employee', 'work_phone', 'Work Phone', 'Work Phone', 'Form'), + ('Employee', 'work_email', 'Work Email', 'Work Email', 'Form'), + ('Employee', 'private_email', 'Private Email', 'Private Email', 'Form'), + ('Employee', 'joined_date', 'Joined Date', 'Joined Date', 'Form'), + ('Employee', 'confirmation_date', 'Confirmation Date', 'Confirmation Date', 'Form'), + ('Employee', 'termination_date', 'Termination Date', 'Termination Date', 'Form'), + ('Employee', 'supervisor', 'Supervisor', 'Supervisor', 'Table and Form'), + ('Employee', 'department', 'Department', 'Department', 'Table and Form'), + ('Employee', 'notes', 'Notes', 'Notes', 'Form'); + + +INSERT INTO `CustomFields` (`type`, `name`, `data`,`display`) VALUES + ('Employee', 'custom1', '', 'Hidden'), + ('Employee', 'custom2', '', 'Hidden'), + ('Employee', 'custom3', '', 'Hidden'), + ('Employee', 'custom4', '', 'Hidden'), + ('Employee', 'custom5', '', 'Hidden'), + ('Employee', 'custom6', '', 'Hidden'), + ('Employee', 'custom7', '', 'Hidden'), + ('Employee', 'custom8', '', 'Hidden'), + ('Employee', 'custom9', '', 'Hidden'), + ('Employee', 'custom10', '', 'Hidden'); + + +INSERT INTO `Employees` (`id`, `employee_id`, `first_name`, `middle_name`, `last_name`, `nationality`, `birthday`, `gender`, `marital_status`, `ssn_num`, `nic_num`, `other_id`, `driving_license`, `driving_license_exp_date`, `employment_status`, `job_title`, `pay_grade`, `work_station_id`, `address1`, `address2`, `city`, `country`, `province`, `postal_code`, `home_phone`, `mobile_phone`, `work_phone`, `work_email`, `private_email`, `joined_date`, `confirmation_date`, `supervisor`, `department`, `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `custom6`, `custom7`, `custom8`, `custom9`, `custom10`) VALUES +(1, 'EMP001', 'IceHrm', 'Sample', 'Employee', 35, '1984-03-17 18:30:00', 'Male', 'Married', '', '294-38-3535', '294-38-3535', '', NULL, 3, 11, 2, '', '2772 Flynn Street', 'Willoughby', 'Willoughby', 'US', 41, '44094', '440-953-4578', '440-953-4578', '440-953-4578', 'icehrm+admin@web-stalk.com', 'icehrm+admin@web-stalk.com', '2005-08-03 18:00:00', '0000-00-00 00:00:00', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +INSERT INTO `UserRoles` VALUES + (1,'Report Manager'), + (2,'Attendance Manager'); + + +INSERT INTO `Users` VALUES +(1,'admin','icehrm+admin@web-stalk.com','21232f297a57a5a743894a0e4a801fc3',1,NULL,'Admin','',NULL,NULL,NULL); + + +INSERT INTO `SalaryComponentType` (`id`,`code`, `name`) VALUES + (1,'B001', 'Basic'), + (2,'B002', 'Allowance'); + + +INSERT INTO `SalaryComponent` VALUES +(1,'Basic Salary', 1,''),(2,'Fixed Allowance', 1,''),(3,'Car Allowance', 2,''),(4,'Telephone Allowance', 2,''); + diff --git a/core-ext/scripts/icehrm_sample_data.sql b/core-ext/scripts/icehrm_sample_data.sql new file mode 100644 index 00000000..14f287e7 --- /dev/null +++ b/core-ext/scripts/icehrm_sample_data.sql @@ -0,0 +1,93 @@ +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; + + +INSERT INTO `CompanyStructures` (`id`, `title`, `description`, `address`, `type`, `country`, `parent`) VALUES +(4, 'Development Center', 'Development Center', 'PO Box 001002\nSample Road, Sample Town', 'Regional Office', 'SG', 1), +(5, 'Engineering Department', 'Engineering Department', 'PO Box 001002\nSample Road, Sample Town, 341234', 'Department', 'SG', 4), +(6, 'Development Team', 'Development Team', '', 'Unit', 'SG', 5), +(7, 'QA Team', 'QA Team', '', 'Unit', 'SG', 5), +(8, 'Server Administration', 'Server Administration', '', 'Unit', 'SG', 5), +(9, 'Administration & HR', 'Administration and Human Resource', '', 'Department', 'SG', 4); + + +INSERT INTO `Employees` (`id`, `employee_id`, `first_name`, `middle_name`, `last_name`, `nationality`, `birthday`, `gender`, `marital_status`, `ssn_num`, `nic_num`, `other_id`, `driving_license`, `driving_license_exp_date`, `employment_status`, `job_title`, `pay_grade`, `work_station_id`, `address1`, `address2`, `city`, `country`, `province`, `postal_code`, `home_phone`, `mobile_phone`, `work_phone`, `work_email`, `private_email`, `joined_date`, `confirmation_date`, `supervisor`, `department`, `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `custom6`, `custom7`, `custom8`, `custom9`, `custom10`) VALUES +(2, 'EMP002', 'Lala', 'Nadila ', 'Lamees', 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+manager@web-stalk.com', 'icehrm+manager@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 1, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(3, 'EMP003', 'Sofia', '', 'O''Sullivan', 4, '1975-08-28 18:30:00', 'Female', 'Married', '', '768-20-4394', '768-20-4394', '', NULL, 3, 10, 2, '', '2792 Trails End Road', 'Fort Lauderdale', 'Fort Lauderdale', 'US', 12, '33308', '954-388-3340', '954-388-3340', '954-388-3340', 'icehrm+user1@web-stalk.com', 'icehrm+user1@web-stalk.com', '2010-02-08 18:30:00', '0000-00-00 00:00:00', 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(4, 'EMP004', 'Taylor', '', 'Holmes', 10, '1979-07-15 18:30:00', 'Male', 'Single', '158-06-2292', '158-06-2292', '', '', NULL, 1, 5, 2, '', '1164', 'Walnut Avenue', 'Rochelle Park', 'US', 35, '7662', '201-474-8048', '201-474-8048', '201-474-8048', 'icehrm+user2@web-stalk.com', 'icehrm+user2@web-stalk.com', '2006-07-12 18:30:00', '0000-00-00 00:00:00', 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + + + +INSERT INTO `EmergencyContacts` (`id`, `employee`, `name`, `relationship`, `home_phone`, `work_phone`, `mobile_phone`) VALUES +(1, 1, 'Emma Owns', 'Mother', '+874463422', '+874463422', '+874463422'), +(2, 2, 'Casey Watson', 'Sister', '231-453-876', '231-453-876', '231-453-876'); + + +INSERT INTO `EmployeeCertifications` (`id`, `certification_id`, `employee`, `institute`, `date_start`, `date_end`) VALUES +(1, 21, 1, 'PHR', '2012-06-04', '2016-06-13'), +(2, 19, 1, 'CPA', '2010-02-16', '2019-02-28'), +(3, 17, 2, 'PMP', '2011-06-14', '2019-10-20'), +(4, 3, 2, 'PMI', '2004-06-08', '2017-09-14'); + +INSERT INTO `EmployeeCompanyLoans` (`id`, `employee`, `loan`, `start_date`, `last_installment_date`, `period_months`, `amount`, `monthly_installment`, `status`, `details`) VALUES +(1, 2, 2, '2013-02-05', '0000-00-00', 12, '12000.00', '1059.45', 'Approved', ''); + +INSERT INTO `EmployeeDependents` (`id`, `employee`, `name`, `relationship`, `dob`, `id_number`) VALUES +(1, 1, 'Emma Owns', 'Parent', '1940-06-11', '475209UHB'), +(2, 1, 'Mica Singroo', 'Other', '2000-06-13', ''); + + +INSERT INTO `EmployeeDocuments` (`id`, `employee`, `document`, `date_added`, `valid_until`, `status`, `details`) VALUES +(1, 2, 2, '2013-01-08', '0000-00-00', 'Active', 'zxczx'); + + +INSERT INTO `EmployeeEducations` (`id`, `education_id`, `employee`, `institute`, `date_start`, `date_end`) VALUES +(1, 1, 1, 'National University of Turky', '2004-02-03', '2006-06-13'), +(2, 1, 2, 'MIT', '1995-02-21', '1999-10-12'); + + +INSERT INTO `EmployeeLanguages` (`id`, `language_id`, `employee`, `reading`, `speaking`, `writing`, `understanding`) VALUES +(1, 1, 1, 'Full Professional Proficiency', 'Full Professional Proficiency', 'Full Professional Proficiency', 'Native or Bilingual Proficiency'), +(2, 1, 2, 'Native or Bilingual Proficiency', 'Native or Bilingual Proficiency', 'Native or Bilingual Proficiency', 'Native or Bilingual Proficiency'), +(3, 2, 2, 'Limited Working Proficiency', 'Professional Working Proficiency', 'Limited Working Proficiency', 'Professional Working Proficiency'); + + +INSERT INTO `EmployeeProjects` (`id`, `employee`, `project`, `date_start`, `date_end`, `status`, `details`) VALUES +(1, 2, 1, '2010-03-18', '2014-03-06', 'Inactive', ''), +(3, 2, 2, '2013-02-05', '2013-02-11', 'Current', ''), +(5, 2, 3, '2013-02-24', '0000-00-00', 'Current', ''); + + + +INSERT INTO `EmployeeSalary` (`id`, `employee`, `component`, `pay_frequency`, `currency`, `amount`, `details`) VALUES +(1, 1, 'Basic', 'Monthly', 131, '2700.00', ''), +(2, 2, 'Basic Salary', 'Monthly', 151, '12000.00', ''), +(3, 2, 'Travelling Allowance', 'Monthly', 131, '5000.00', ''); + + +INSERT INTO `EmployeeSkills` (`id`, `skill_id`, `employee`, `details`) VALUES +(1, 9, 1, 'Creating web sites'), +(2, 6, 2, 'Certified Business Intelligence Professional'); + + + +INSERT INTO `Users` (`id`, `username`, `email`, `password`, `employee`, `user_level`, `last_login`, `last_update`, `created`) VALUES +(2, 'manager', 'icehrm+manager@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 2, 'Manager', '2013-01-03 02:47:37', '2013-01-03 02:47:37', '2013-01-03 02:47:37'), +(3, 'user1', 'icehrm+user1@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 3, 'Employee', '2013-01-03 02:48:32', '2013-01-03 02:48:32', '2013-01-03 02:48:32'), +(4, 'user2', 'icehrm+user2@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 4, 'Employee', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'); + + +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; + + + + + + + + + + + + + + diff --git a/core-ext/scripts/icehrm_upgrade_opensource_latest_to_12.6.sql b/core-ext/scripts/icehrm_upgrade_opensource_latest_to_12.6.sql new file mode 100644 index 00000000..0ea2898c --- /dev/null +++ b/core-ext/scripts/icehrm_upgrade_opensource_latest_to_12.6.sql @@ -0,0 +1,248 @@ +/* Upgrade v10.2 to v11.0 */ + +ALTER TABLE `LeaveTypes` ADD COLUMN `leave_color` varchar(10) NULL; + +create table `RestAccessTokens` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `userId` bigint(20) NOT NULL, + `hash` varchar(32) default null, + `token` varchar(500) default null, + `created` DATETIME default '0000-00-00 00:00:00', + `updated` DATETIME default '0000-00-00 00:00:00', + primary key (`id`), + unique key `userId` (`userId`) +) engine=innodb default charset=utf8; + +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +('Api: REST Api Enabled', '0', '','["value", {"label":"Value","type":"select","source":[["0","No"],["1","Yes"]]}]'); + +ALTER TABLE Employees ADD COLUMN `status` enum('Active','Terminated') default 'Active'; + +ALTER TABLE EmployeeLeaves MODIFY COLUMN `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending'; + +ALTER TABLE EmployeeLeaveLog MODIFY COLUMN `status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending'; +ALTER TABLE EmployeeLeaveLog MODIFY COLUMN `status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending'; + +create table `ArchivedEmployees` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `ref_id` bigint(20) NOT NULL, + `employee_id` varchar(50) default null, + `first_name` varchar(100) default '' not null, + `last_name` varchar(100) default '' not null, + `gender` enum('Male','Female') default NULL, + `ssn_num` varchar(100) default '', + `nic_num` varchar(100) default '', + `other_id` varchar(100) default '', + `work_email` varchar(100) default null, + `joined_date` DATETIME default '0000-00-00 00:00:00', + `confirmation_date` DATETIME default '0000-00-00 00:00:00', + `supervisor` bigint(20) default null, + `department` bigint(20) default null, + `termination_date` DATETIME default '0000-00-00 00:00:00', + `notes` text default null, + `data` longtext default null, + primary key (`id`) + +) engine=innodb default charset=utf8; + + +/* Upgrade v11.0 to v11.1 */ + +create table `FieldNameMappings` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(20) NOT NULL, + `name` varchar(20) NOT NULL, + `textOrig` varchar(200) default null, + `textMapped` varchar(200) default null, + `display` enum('Form','Table and Form','Hidden') default 'Form', + `created` DATETIME default '0000-00-00 00:00:00', + `updated` DATETIME default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + +INSERT INTO `FieldNameMappings` (`type`, `name`, `textOrig`, `textMapped`, `display`) VALUES + ('Employee', 'employee_id', 'Employee Number', 'Employee Number', 'Table and Form'), + ('Employee', 'first_name', 'First Name', 'First Name', 'Table and Form'), + ('Employee', 'middle_name', 'Middle Name', 'Middle Name', 'Form'), + ('Employee', 'last_name', 'Last Name', 'Last Name', 'Table and Form'), + ('Employee', 'nationality', 'Nationality', 'Nationality', 'Form'), + ('Employee', 'ethnicity', 'Ethnicity', 'Ethnicity', 'Form'), + ('Employee', 'immigration_status', 'Immigration Status', 'Immigration Status', 'Form'), + ('Employee', 'birthday', 'Date of Birth', 'Date of Birth', 'Form'), + ('Employee', 'gender', 'Gender', 'Gender', 'Form'), + ('Employee', 'marital_status', 'Marital Status', 'Marital Status', 'Form'), + ('Employee', 'ssn_num', 'SSN/NRIC', 'SSN/NRIC', 'Form'), + ('Employee', 'nic_num', 'NIC', 'NIC', 'Form'), + ('Employee', 'other_id', 'Other ID', 'Other ID', 'Form'), + ('Employee', 'driving_license', 'Driving License No', 'Driving License No', 'Form'), + ('Employee', 'employment_status', 'Employment Status', 'Employment Status', 'Form'), + ('Employee', 'job_title', 'Job Title', 'Job Title', 'Form'), + ('Employee', 'pay_grade', 'Pay Grade', 'Pay Grade', 'Form'), + ('Employee', 'work_station_id', 'Work Station Id', 'Work Station Id', 'Form'), + ('Employee', 'address1', 'Address Line 1', 'Address Line 1', 'Form'), + ('Employee', 'address2', 'Address Line 2', 'Address Line 2', 'Form'), + ('Employee', 'city', 'City', 'City', 'Form'), + ('Employee', 'country', 'Country', 'Country', 'Form'), + ('Employee', 'province', 'Province', 'Province', 'Form'), + ('Employee', 'postal_code', 'Postal/Zip Code', 'Postal/Zip Code', 'Form'), + ('Employee', 'home_phone', 'Home Phone', 'Home Phone', 'Form'), + ('Employee', 'mobile_phone', 'Mobile Phone', 'Mobile Phone', 'Table and Form'), + ('Employee', 'work_phone', 'Work Phone', 'Work Phone', 'Form'), + ('Employee', 'work_email', 'Work Email', 'Work Email', 'Form'), + ('Employee', 'private_email', 'Private Email', 'Private Email', 'Form'), + ('Employee', 'joined_date', 'Joined Date', 'Joined Date', 'Form'), + ('Employee', 'confirmation_date', 'Confirmation Date', 'Confirmation Date', 'Form'), + ('Employee', 'termination_date', 'Termination Date', 'Termination Date', 'Form'), + ('Employee', 'supervisor', 'Supervisor', 'Supervisor', 'Table and Form'), + ('Employee', 'department', 'Department', 'Department', 'Table and Form'), + ('Employee', 'notes', 'Notes', 'Notes', 'Form'); + + + create table `CustomFields` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(20) NOT NULL, + `name` varchar(20) NOT NULL, + `data` text default null, + `display` enum('Form','Table and Form','Hidden') default 'Form', + `created` DATETIME default '0000-00-00 00:00:00', + `updated` DATETIME default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +INSERT INTO `CustomFields` (`type`, `name`, `data`,`display`) VALUES + ('Employee', 'custom1', '', 'Hidden'), + ('Employee', 'custom2', '', 'Hidden'), + ('Employee', 'custom3', '', 'Hidden'), + ('Employee', 'custom4', '', 'Hidden'), + ('Employee', 'custom5', '', 'Hidden'), + ('Employee', 'custom6', '', 'Hidden'), + ('Employee', 'custom7', '', 'Hidden'), + ('Employee', 'custom8', '', 'Hidden'), + ('Employee', 'custom9', '', 'Hidden'), + ('Employee', 'custom10', '', 'Hidden'); + + +Alter table `Employees` MODIFY COLUMN `middle_name` varchar(100) default null; +Alter table `Employees` MODIFY COLUMN `last_name` varchar(100) default null; +Alter table `Employees` MODIFY COLUMN `ssn_num` varchar(100) default NULL; +Alter table `Employees` MODIFY COLUMN `nic_num` varchar(100) default NULL; +Alter table `Employees` MODIFY COLUMN `other_id` varchar(100) default NULL; +Alter table `Employees` MODIFY COLUMN `driving_license` varchar(100) default NULL; +Alter table `Employees` MODIFY COLUMN `work_station_id` varchar(100) default NULL; +Alter table `Employees` MODIFY COLUMN `address1` varchar(100) default NULL; +Alter table `Employees` MODIFY COLUMN `address2` varchar(100) default NULL; +Alter table `Employees` MODIFY COLUMN `city` varchar(150) default NULL; + + +Alter table `Employees` ADD COLUMN `ethnicity` bigint(20) default null; +Alter table `Employees` ADD COLUMN `immigration_status` bigint(20) default null; + + +Alter table `EmployeeSalary` MODIFY COLUMN `component` bigint(20) NOT NULL; +Alter table `EmployeeSalary` MODIFY COLUMN `currency` bigint(20) NULL; + +INSERT INTO `SalaryComponentType` (`id`,`code`, `name`) VALUES + (1,'B001', 'Basic'), + (2,'B002', 'Allowance'); + + +INSERT INTO `SalaryComponent` VALUES + (1,'Basic Salary', 1,''),(2,'Fixed Allowance', 1,''),(3,'Car Allowance', 2,''),(4,'Telephone Allowance', 2,''); + + + +/* Upgrade v11.1 to v12.0 */ + +ALTER TABLE Users ADD COLUMN user_roles text null; +ALTER TABLE Users ADD COLUMN `default_module` bigint(20) null after `employee`; +ALTER TABLE Modules ADD COLUMN user_roles text null AFTER `user_levels`; +ALTER TABLE Modules ADD COLUMN label varchar(100) NOT NULL AFTER `name`; + +create table `UserRoles` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + primary key (`id`), + unique key `name` (`name`) +) engine=innodb default charset=utf8; + +ALTER TABLE `Users` CHANGE `user_level` `user_level` enum('Admin','Employee','Manager','Other') default NULL; + +create table `EmployeeEducationsTemp` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `education_id` bigint(20) NULL, + `employee` bigint(20) NOT NULL, + `institute` varchar(400) default null, + `date_start` date default '0000-00-00', + `date_end` date default '0000-00-00', + primary key (`id`) +) engine=innodb default charset=utf8; + +insert into EmployeeEducationsTemp select * from EmployeeEducations; + +drop table EmployeeEducations; + +create table `EmployeeEducations` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `education_id` bigint(20) NULL, + `employee` bigint(20) NOT NULL, + `institute` varchar(400) default null, + `date_start` date default '0000-00-00', + `date_end` date default '0000-00-00', + CONSTRAINT `Fk_EmployeeEducations_Educations` FOREIGN KEY (`education_id`) REFERENCES `Educations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeEducations_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +insert into EmployeeEducations select * from EmployeeEducationsTemp; + +drop table EmployeeEducationsTemp; + +UPDATE `Settings` set value = '1' where name = 'System: Reset Modules and Permissions'; +UPDATE `Settings` set value = '1' where name = 'System: Add New Permissions'; + +create table `SalaryComponentType` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `code` varchar(10) NOT NULL, + `name` varchar(100) NOT NULL, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `SalaryComponent` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `componentType` bigint(20) NULL, + `details` text default null, + CONSTRAINT `Fk_SalaryComponent_SalaryComponentType` FOREIGN KEY (`componentType`) REFERENCES `SalaryComponentType` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `ImmigrationStatus` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Ethnicity` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeImmigrationStatus` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `status` bigint(20) NOT NULL, + CONSTRAINT `Fk_EmployeeImmigrationStatus_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeImmigrationStatus_Type` FOREIGN KEY (`status`) REFERENCES `ImmigrationStatus` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeEthnicity` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `ethnicity` bigint(20) NOT NULL, + CONSTRAINT `Fk_EmployeeEthnicity_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeEthnicity_Ethnicity` FOREIGN KEY (`ethnicity`) REFERENCES `Ethnicity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; \ No newline at end of file diff --git a/core-ext/scripts/icehrmdb.sql b/core-ext/scripts/icehrmdb.sql new file mode 100644 index 00000000..56c46e77 --- /dev/null +++ b/core-ext/scripts/icehrmdb.sql @@ -0,0 +1,775 @@ +create table `CompanyStructures` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `title` tinytext not null, + `description` text not null, + `address` text default NULL, + `type` enum('Company','Head Office','Regional Office','Department','Unit','Sub Unit','Other') default NULL, + `country` varchar(2) not null default '0', + `parent` bigint(20) NULL, + CONSTRAINT `Fk_CompanyStructures_Own` FOREIGN KEY (`parent`) REFERENCES `CompanyStructures` (`id`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Country` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `code` char(2) not null default '', + `namecap` varchar(80) null default '', + `name` varchar(80) not null default '', + `iso3` char(3) default null, + `numcode` smallint(6) default null, + UNIQUE KEY `code` (`code`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Province` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(40) not null default '', + `code` char(2) not null default '', + `country` char(2) not null default 'US', + CONSTRAINT `Fk_Province_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`code`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `CurrencyTypes` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `code` varchar(3) not null default '', + `name` varchar(70) not null default '', + primary key (`id`), + UNIQUE KEY `CurrencyTypes_code` (`code`) +) engine=innodb default charset=utf8; + +create table `PayGrades` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `currency` varchar(3) not null, + `min_salary` decimal(12,2) DEFAULT 0.00, + `max_salary` decimal(12,2) DEFAULT 0.00, + CONSTRAINT `Fk_PayGrades_CurrencyTypes` FOREIGN KEY (`currency`) REFERENCES `CurrencyTypes` (`code`), + primary key(`id`) +) engine=innodb default charset=utf8; + +create table `JobTitles` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `code` varchar(10) not null default '', + `name` varchar(100) default null, + `description` varchar(200) default null, + `specification` varchar(400) default null, + primary key(`id`) +) engine=innodb default charset=utf8; + +create table `EmploymentStatus` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `description` varchar(400) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Skills` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `description` varchar(400) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Educations` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `description` varchar(400) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Certifications` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `description` varchar(400) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Languages` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `description` varchar(400) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Nationality` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Employees` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee_id` varchar(50) default null, + `first_name` varchar(100) default '' not null, + `middle_name` varchar(100) default null, + `last_name` varchar(100) default null, + `nationality` bigint(20) default null, + `birthday` DATETIME default '0000-00-00 00:00:00', + `gender` enum('Male','Female') default NULL, + `marital_status` enum('Married','Single','Divorced','Widowed','Other') default NULL, + `ssn_num` varchar(100) default NULL, + `nic_num` varchar(100) default NULL, + `other_id` varchar(100) default NULL, + `driving_license` varchar(100) default NULL, + `driving_license_exp_date` date default '0000-00-00', + `employment_status` bigint(20) default null, + `job_title` bigint(20) default null, + `pay_grade` bigint(20) null, + `work_station_id` varchar(100) default NULL, + `address1` varchar(100) default NULL, + `address2` varchar(100) default NULL, + `city` varchar(150) default NULL, + `country` char(2) default null, + `province` bigint(20) default null, + `postal_code` varchar(20) default null, + `home_phone` varchar(50) default null, + `mobile_phone` varchar(50) default null, + `work_phone` varchar(50) default null, + `work_email` varchar(100) default null, + `private_email` varchar(100) default null, + `joined_date` DATETIME default '0000-00-00 00:00:00', + `confirmation_date` DATETIME default '0000-00-00 00:00:00', + `supervisor` bigint(20) default null, + `department` bigint(20) default null, + `custom1` varchar(250) default null, + `custom2` varchar(250) default null, + `custom3` varchar(250) default null, + `custom4` varchar(250) default null, + `custom5` varchar(250) default null, + `custom6` varchar(250) default null, + `custom7` varchar(250) default null, + `custom8` varchar(250) default null, + `custom9` varchar(250) default null, + `custom10` varchar(250) default null, + `termination_date` DATETIME default '0000-00-00 00:00:00', + `notes` text default null, + `status` enum('Active','Terminated') default 'Active', + `ethnicity` bigint(20) default null, + `immigration_status` bigint(20) default null, + CONSTRAINT `Fk_Employee_Nationality` FOREIGN KEY (`nationality`) REFERENCES `Nationality` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_JobTitle` FOREIGN KEY (`job_title`) REFERENCES `JobTitles` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_EmploymentStatus` FOREIGN KEY (`employment_status`) REFERENCES `EmploymentStatus` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`code`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_Province` FOREIGN KEY (`province`) REFERENCES `Province` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_Supervisor` FOREIGN KEY (`supervisor`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_CompanyStructures` FOREIGN KEY (`department`) REFERENCES `CompanyStructures` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_PayGrades` FOREIGN KEY (`pay_grade`) REFERENCES `PayGrades` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`), + unique key `employee_id` (`employee_id`) + +) engine=innodb default charset=utf8; + +create table `ArchivedEmployees` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `ref_id` bigint(20) NOT NULL, + `employee_id` varchar(50) default null, + `first_name` varchar(100) default '' not null, + `last_name` varchar(100) default '' not null, + `gender` enum('Male','Female') default NULL, + `ssn_num` varchar(100) default '', + `nic_num` varchar(100) default '', + `other_id` varchar(100) default '', + `work_email` varchar(100) default null, + `joined_date` DATETIME default '0000-00-00 00:00:00', + `confirmation_date` DATETIME default '0000-00-00 00:00:00', + `supervisor` bigint(20) default null, + `department` bigint(20) default null, + `termination_date` DATETIME default '0000-00-00 00:00:00', + `notes` text default null, + `data` longtext default null, + primary key (`id`) + +) engine=innodb default charset=utf8; + +create table `UserRoles` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + primary key (`id`), + unique key `name` (`name`) +) engine=innodb default charset=utf8; + +create table `Users` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `username` varchar(100) default null, + `email` varchar(100) default null, + `password` varchar(100) default null, + `employee` bigint(20) null, + `default_module` bigint(20) null, + `user_level` enum('Admin','Employee','Manager','Other') default NULL, + `user_roles` text null, + `last_login` timestamp default '0000-00-00 00:00:00', + `last_update` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + CONSTRAINT `Fk_User_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`), + unique key `username` (`username`) +) engine=innodb default charset=utf8; + + +create table `EmployeeSkills` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `skill_id` bigint(20) NULL, + `employee` bigint(20) NOT NULL, + `details` varchar(400) default null, + CONSTRAINT `Fk_EmployeeSkills_Skills` FOREIGN KEY (`skill_id`) REFERENCES `Skills` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeSkills_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`), + unique key (`employee`,`skill_id`) +) engine=innodb default charset=utf8; + +create table `EmployeeEducations` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `education_id` bigint(20) NULL, + `employee` bigint(20) NOT NULL, + `institute` varchar(400) default null, + `date_start` date default '0000-00-00', + `date_end` date default '0000-00-00', + CONSTRAINT `Fk_EmployeeEducations_Educations` FOREIGN KEY (`education_id`) REFERENCES `Educations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeEducations_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeCertifications` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `certification_id` bigint(20) NULL, + `employee` bigint(20) NOT NULL, + `institute` varchar(400) default null, + `date_start` date default '0000-00-00', + `date_end` date default '0000-00-00', + CONSTRAINT `Fk_EmployeeCertifications_Certifications` FOREIGN KEY (`certification_id`) REFERENCES `Certifications` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeCertifications_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`), + unique key (`employee`,`certification_id`) +) engine=innodb default charset=utf8; + + +create table `EmployeeLanguages` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `language_id` bigint(20) NULL, + `employee` bigint(20) NOT NULL, + `reading` enum('Elementary Proficiency','Limited Working Proficiency','Professional Working Proficiency','Full Professional Proficiency','Native or Bilingual Proficiency') default NULL, + `speaking` enum('Elementary Proficiency','Limited Working Proficiency','Professional Working Proficiency','Full Professional Proficiency','Native or Bilingual Proficiency') default NULL, + `writing` enum('Elementary Proficiency','Limited Working Proficiency','Professional Working Proficiency','Full Professional Proficiency','Native or Bilingual Proficiency') default NULL, + `understanding` enum('Elementary Proficiency','Limited Working Proficiency','Professional Working Proficiency','Full Professional Proficiency','Native or Bilingual Proficiency') default NULL, + CONSTRAINT `Fk_EmployeeLanguages_Languages` FOREIGN KEY (`language_id`) REFERENCES `Languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeLanguages_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`), + unique key (`employee`,`language_id`) +) engine=innodb default charset=utf8; + +create table `EmergencyContacts` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `name` varchar(100) NOT NULL, + `relationship` varchar(100) default null, + `home_phone` varchar(15) default null, + `work_phone` varchar(15) default null, + `mobile_phone` varchar(15) default null, + CONSTRAINT `Fk_EmergencyContacts_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeDependents` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `name` varchar(100) NOT NULL, + `relationship` enum('Child','Spouse','Parent','Other') default NULL, + `dob` date default '0000-00-00', + `id_number` varchar(25) default null, + CONSTRAINT `Fk_EmployeeDependents_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + + +create table `Files` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `filename` varchar(100) NOT NULL, + `employee` bigint(20) NULL, + `file_group` varchar(100) NOT NULL, + primary key (`id`), + unique key `filename` (`filename`) +) engine=innodb default charset=utf8; + +create table `Clients` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `details` text default null, + `first_contact_date` date default '0000-00-00', + `created` timestamp default '0000-00-00 00:00:00', + `address` text default null, + `contact_number` varchar(25) NULL, + `contact_email` varchar(25) NULL, + `company_url` varchar(500) NULL, + `status` enum('Active','Inactive') default 'Active', + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Projects` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `client` bigint(20) NULL, + `details` text default null, + `created` timestamp default '0000-00-00 00:00:00', + `status` enum('Active','Inactive') default 'Active', + CONSTRAINT `Fk_Projects_Client` FOREIGN KEY (`client`) REFERENCES `Clients` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeTimeSheets` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `date_start` date NOT NULL, + `date_end` date NOT NULL, + `status` enum('Approved','Pending','Rejected','Submitted') default 'Pending', + CONSTRAINT `Fk_EmployeeTimeSheets_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + UNIQUE KEY `EmployeeTimeSheetsKey` (`employee`,`date_start`,`date_end`), + KEY `EmployeeTimeSheets_date_end` (`date_end`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeProjects` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `project` bigint(20) NULL, + `date_start` date NULL, + `date_end` date NULL, + `status` enum('Current','Inactive','Completed') default 'Current', + `details` text default null, + CONSTRAINT `Fk_EmployeeProjects_Projects` FOREIGN KEY (`project`) REFERENCES `Projects` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeProjects_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + UNIQUE KEY `EmployeeProjectsKey` (`employee`,`project`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeTimeEntry` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `project` bigint(20) NULL, + `employee` bigint(20) NOT NULL, + `timesheet` bigint(20) NOT NULL, + `details` text default null, + `created` timestamp default '0000-00-00 00:00:00', + `date_start` timestamp default '0000-00-00 00:00:00', + `time_start` varchar(10) NOT NULL, + `date_end` timestamp default '0000-00-00 00:00:00', + `time_end` varchar(10) NOT NULL, + `status` enum('Active','Inactive') default 'Active', + CONSTRAINT `Fk_EmployeeTimeEntry_Projects` FOREIGN KEY (`project`) REFERENCES `Projects` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeTimeEntry_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeTimeEntry_EmployeeTimeSheets` FOREIGN KEY (`timesheet`) REFERENCES `EmployeeTimeSheets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + KEY `employee_project` (`employee`,`project`), + KEY `employee_project_date_start` (`employee`,`project`,`date_start`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Documents` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `details` text default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeDocuments` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `document` bigint(20) NULL, + `date_added` date NOT NULL, + `valid_until` date NOT NULL, + `status` enum('Active','Inactive','Draft') default 'Active', + `details` text default null, + `attachment` varchar(100) NULL, + CONSTRAINT `Fk_EmployeeDocuments_Documents` FOREIGN KEY (`document`) REFERENCES `Documents` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeDocuments_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `CompanyLoans` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `details` text default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeCompanyLoans` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `loan` bigint(20) NULL, + `start_date` date NOT NULL, + `last_installment_date` date NOT NULL, + `period_months` bigint(20) NULL, + `currency` bigint(20) NULL DEFAULT NULL, + `amount` decimal(10,2) NOT NULL, + `monthly_installment` decimal(10,2) NOT NULL, + `status` enum('Approved','Repayment','Paid','Suspended') default 'Approved', + `details` text default null, + CONSTRAINT `Fk_EmployeeCompanyLoans_CompanyLoans` FOREIGN KEY (`loan`) REFERENCES `CompanyLoans` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeCompanyLoans_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Settings` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `value` text default null, + `description` text default null, + `meta` text default null, + primary key (`id`), + UNIQUE KEY(`name`) +) engine=innodb default charset=utf8; + + +create table `Modules` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `menu` varchar(30) NOT NULL, + `name` varchar(100) NOT NULL, + `label` varchar(100) NOT NULL, + `icon` VARCHAR( 50 ) NULL, + `mod_group` varchar(30) NOT NULL, + `mod_order` INT(11) NULL, + `status` enum('Enabled','Disabled') default 'Enabled', + `version` varchar(10) default '', + `update_path` varchar(500) default '', + `user_levels` varchar(500) NOT NULL, + `user_roles` text null, + primary key (`id`), + UNIQUE KEY `Modules_name_modgroup` (`name`,`mod_group`) +) engine=innodb default charset=utf8; + +create table `Reports` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `details` text default null, + `parameters` text default null, + `query` text default null, + `paramOrder` varchar(500) NOT NULL, + `type` enum('Query','Class') default 'Query', + primary key (`id`), + UNIQUE KEY `Reports_Name` (`name`) +) engine=innodb default charset=utf8; + + +create table `Attendance` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `in_time` timestamp default '0000-00-00 00:00:00', + `out_time` timestamp default '0000-00-00 00:00:00', + `note` varchar(500) default null, + CONSTRAINT `Fk_Attendance_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + KEY `in_time` (`in_time`), + KEY `out_time` (`out_time`), + KEY `employee_in_time` (`employee`,`in_time`), + KEY `employee_out_time` (`employee`,`out_time`), + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `Permissions` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `user_level` enum('Admin','Employee','Manager') default NULL, + `module_id` bigint(20) NOT NULL, + `permission` varchar(200) default null, + `meta` varchar(500) default null, + `value` varchar(200) default null, + UNIQUE KEY `Module_Permission` (`user_level`,`module_id`,`permission`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `DataEntryBackups` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `tableType` varchar(200) default null, + `data` longtext default null, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `AuditLog` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `time` datetime default '0000-00-00 00:00:00', + `user` bigint(20) NOT NULL, + `ip` varchar(100) NULL, + `type` varchar(100) NOT NULL, + `employee` varchar(300) NULL, + `details` text default null, + CONSTRAINT `Fk_AuditLog_Users` FOREIGN KEY (`user`) REFERENCES `Users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `Notifications` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `time` datetime default '0000-00-00 00:00:00', + `fromUser` bigint(20) NULL, + `fromEmployee` bigint(20) NULL, + `toUser` bigint(20) NOT NULL, + `image` varchar(500) default null, + `message` text default null, + `action` text default null, + `type` varchar(100) NULL, + `status` enum('Unread','Read') default 'Unread', + CONSTRAINT `Fk_Notifications_Users` FOREIGN KEY (`touser`) REFERENCES `Users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`), + KEY `toUser_time` (`toUser`,`time`), + KEY `toUser_status_time` (`toUser`,`status`,`time`) +) engine=innodb default charset=utf8; + +create table `Courses` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `code` varchar(300) NOT NULL, + `name` varchar(300) NOT NULL, + `description` text default null, + `coordinator` bigint(20) NULL, + `trainer` varchar(300) NULL, + `trainer_info` text default null, + `paymentType` enum('Company Sponsored','Paid by Employee') default 'Company Sponsored', + `currency` varchar(3) not null, + `cost` decimal(12,2) DEFAULT 0.00, + `status` enum('Active','Inactive') default 'Active', + `created` datetime default '0000-00-00 00:00:00', + `updated` datetime default '0000-00-00 00:00:00', + CONSTRAINT `Fk_Courses_Employees` FOREIGN KEY (`coordinator`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `TrainingSessions` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(300) NOT NULL, + `course` bigint(20) NOT NULL, + `description` text default null, + `scheduled` datetime default '0000-00-00 00:00:00', + `dueDate` datetime default '0000-00-00 00:00:00', + `deliveryMethod` enum('Classroom','Self Study','Online') default 'Classroom', + `deliveryLocation` varchar(500) NULL, + `status` enum('Pending','Approved','Completed','Cancelled') default 'Pending', + `attendanceType` enum('Sign Up','Assign') default 'Sign Up', + `attachment` varchar(300) NULL, + `created` datetime default '0000-00-00 00:00:00', + `updated` datetime default '0000-00-00 00:00:00', + CONSTRAINT `Fk_TrainingSessions_Courses` FOREIGN KEY (`course`) REFERENCES `Courses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `EmployeeTrainingSessions` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `trainingSession` bigint(20) NULL, + `feedBack` varchar(1500) NULL, + `status` enum('Scheduled','Attended','Not-Attended') default 'Scheduled', + CONSTRAINT `Fk_EmployeeTrainingSessions_TrainingSessions` FOREIGN KEY (`trainingSession`) REFERENCES `TrainingSessions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeTrainingSessions_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `ImmigrationDocuments` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `details` text default null, + `required` enum('Yes','No') default 'Yes', + `alert_on_missing` enum('Yes','No') default 'Yes', + `alert_before_expiry` enum('Yes','No') default 'Yes', + `alert_before_day_number` int(11) NOT NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeImmigrations` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `document` bigint(20) NULL, + `documentname` varchar(150) NOT NULL, + `valid_until` date NOT NULL, + `status` enum('Active','Inactive','Draft') default 'Active', + `details` text default null, + `attachment1` varchar(100) NULL, + `attachment2` varchar(100) NULL, + `attachment3` varchar(100) NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + CONSTRAINT `Fk_EmployeeImmigrations_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeImmigrations_ImmigrationDocuments` FOREIGN KEY (`document`) REFERENCES `ImmigrationDocuments` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `EmployeeTravelRecords` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `type` enum('Local','International') default 'Local', + `purpose` varchar(200) NOT NULL, + `travel_from` varchar(200) NOT NULL, + `travel_to` varchar(200) NOT NULL, + `travel_date` datetime NULL default '0000-00-00 00:00:00', + `return_date` datetime NULL default '0000-00-00 00:00:00', + `details` varchar(500) default null, + `attachment1` varchar(100) NULL, + `attachment2` varchar(100) NULL, + `attachment3` varchar(100) NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + CONSTRAINT `Fk_EmployeeTravelRecords_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `RestAccessTokens` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `userId` bigint(20) NOT NULL, + `hash` varchar(32) default null, + `token` varchar(500) default null, + `created` DATETIME default '0000-00-00 00:00:00', + `updated` DATETIME default '0000-00-00 00:00:00', + primary key (`id`), + unique key `userId` (`userId`) +) engine=innodb default charset=utf8; + +create table `FieldNameMappings` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(20) NOT NULL, + `name` varchar(20) NOT NULL, + `textOrig` varchar(200) default null, + `textMapped` varchar(200) default null, + `display` enum('Form','Table and Form','Hidden') default 'Form', + `created` DATETIME default '0000-00-00 00:00:00', + `updated` DATETIME default '0000-00-00 00:00:00', + primary key (`id`), + unique key `name` (`name`) +) engine=innodb default charset=utf8; + +create table `CustomFields` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(20) NOT NULL, + `name` varchar(20) NOT NULL, + `data` text default null, + `display` enum('Form','Table and Form','Hidden') default 'Form', + `created` DATETIME default '0000-00-00 00:00:00', + `updated` DATETIME default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `SalaryComponentType` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `code` varchar(10) NOT NULL, + `name` varchar(100) NOT NULL, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `SalaryComponent` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `componentType` bigint(20) NULL, + `details` text default null, + CONSTRAINT `Fk_SalaryComponent_SalaryComponentType` FOREIGN KEY (`componentType`) REFERENCES `SalaryComponentType` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `ImmigrationStatus` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Ethnicity` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeImmigrationStatus` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `status` bigint(20) NOT NULL, + CONSTRAINT `Fk_EmployeeImmigrationStatus_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeImmigrationStatus_Type` FOREIGN KEY (`status`) REFERENCES `ImmigrationStatus` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeEthnicity` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `ethnicity` bigint(20) NOT NULL, + CONSTRAINT `Fk_EmployeeEthnicity_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeEthnicity_Ethnicity` FOREIGN KEY (`ethnicity`) REFERENCES `Ethnicity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `EmployeeSalary` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `component` bigint(20) NOT NULL, + `pay_frequency` enum('Hourly','Daily','Bi Weekly','Weekly','Semi Monthly','Monthly') default NULL, + `currency` bigint(20) NULL, + `amount` decimal(10,2) NOT NULL, + `details` text default null, + CONSTRAINT `Fk_EmployeeSalary_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeSalary_Currency` FOREIGN KEY (`currency`) REFERENCES `CurrencyTypes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Deductions` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `contributor` enum('Employee','Employer') default NULL, + `type` enum('Fixed','Percentage') default NULL, + `percentage_type` enum('On Component','On Component Type') default NULL, + `componentType` bigint(20) NULL, + `component` bigint(20) NULL, + `rangeAmounts` text default null, + `country` bigint(20) NULL, + CONSTRAINT `Fk_Deductions_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `Tax` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `contributor` enum('Employee','Employer') default NULL, + `type` enum('Fixed','Percentage') default NULL, + `percentage_type` enum('On Component','On Component Type') default NULL, + `componentType` bigint(20) NULL, + `component` bigint(20) NULL, + `rangeAmounts` text default null, + `country` bigint(20) NULL, + CONSTRAINT `Fk_Tax_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `TaxRules` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `apply` enum('Yes','No') default 'Yes', + `application_type` enum('All','Condition - OR','Condition - AND') default 'All', + `tax` bigint(20) NOT NULL, + `job_title` bigint(20) NULL, + `ethnicity` bigint(20) NULL, + `nationality` bigint(20) NULL, + `immigration_status` bigint(20) NULL, + `pay_grade` bigint(20) NULL, + `country` bigint(20) NULL, + CONSTRAINT `Fk_TaxRules_Tax` FOREIGN KEY (`tax`) REFERENCES `Tax` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_TaxRules_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `DeductionRules` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `apply` enum('Yes','No') default 'Yes', + `application_type` enum('All','Condition - OR','Condition - AND') default 'All', + `deduction` bigint(20) NOT NULL, + `job_title` bigint(20) NULL, + `ethnicity` bigint(20) NULL, + `nationality` bigint(20) NULL, + `immigration_status` bigint(20) NULL, + `pay_grade` bigint(20) NULL, + `country` bigint(20) NULL, + CONSTRAINT `Fk_DeductionRules_Deductions` FOREIGN KEY (`deduction`) REFERENCES `Deductions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_DeductionRules_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + + + diff --git a/core-ext/scripts/reports/active_employees.txt b/core-ext/scripts/reports/active_employees.txt new file mode 100644 index 00000000..e69de29b diff --git a/core-ext/scripts/reports/employee_details.txt b/core-ext/scripts/reports/employee_details.txt new file mode 100644 index 00000000..25b16ec9 --- /dev/null +++ b/core-ext/scripts/reports/employee_details.txt @@ -0,0 +1,35 @@ + + +Select id, employee_id as 'Employee ID', +concat(`first_name`,' ',`middle_name`,' ', `last_name`) as 'Name', +(SELECT name from Nationality where id = nationality) as 'Nationality', +birthday as 'Birthday', +gender as 'Gender', +marital_status as 'Marital Status', +ssn_num as 'SSN Number', +nic_num as 'NIC Number', +other_id as 'Other IDs', +driving_license as 'Driving License Number', +(SELECT name from EmploymentStatus where id = employment_status) as 'Employment Status', +(SELECT name from JobTitles where id = job_title) as 'Job Title', +(SELECT name from PayGrades where id = pay_grade) as 'Pay Grade', +work_station_id as 'Work Station ID', +address1 as 'Address 1', +address2 as 'Address 2', +city as 'City', +(SELECT name from Country where code = country) as 'Country', +(SELECT name from Province where id = province) as 'Province', +postal_code as 'Postal Code', +home_phone as 'Home Phone', +mobile_phone as 'Mobile Phone', +work_phone as 'Work Phone', +work_email as 'Work Email', +private_email as 'Private Email', +joined_date as 'Joined Date', +confirmation_date as 'Confirmation Date', +(SELECT title from CompanyStructures where id = department) as 'Department', +(SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`,' [Employee ID:',`employee_id`,']') from Employees e1 where e1.id = e.supervisor) as 'Supervisor' +FROM Employees e _where_ + + +This report list all employee details and you can filter employees by department, employment status or job title \ No newline at end of file diff --git a/core-ext/scripts/reports/employee_leaves.txt b/core-ext/scripts/reports/employee_leaves.txt new file mode 100644 index 00000000..bc1df011 --- /dev/null +++ b/core-ext/scripts/reports/employee_leaves.txt @@ -0,0 +1,24 @@ +[ +[ "employee", {"label":"Employee","type":"select","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}], +[ "date_start", {"label":"Start Date","type":"date"}], +[ "date_end", {"label":"End Date","type":"date"}], +[ "status", {"label":"Leave Status","type":"select","source":[["NULL","All Statuses"],["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"]]}] +] + +["employee","date_start","date_end","status"] + + +SELECT *, +(SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`) from Employees where id = employee) as 'Employee', +(SELECT name from LeaveTypes where id = leave_type) as 'Leave Type', +(SELECT name from LeavePeriods where id = leave_type) as 'Leave Type', +date_start as 'Start Date', +date_end as 'End Date', +details as 'Reason', +status as 'Leave Status', +(select count(*) from EmployeeLeaveDays d where d.employee_leave = lv.id and leave_type = 'Full Day') as 'Full Day Count', +(select count(*) from EmployeeLeaveDays d where d.employee_leave = lv.id and leave_type = 'Half Day - Morning') as 'Half Day (Morning) Count', +(select count(*) from EmployeeLeaveDays d where d.employee_leave = lv.id and leave_type = 'Half Day - Afternoon') as 'Half Day (Afternoon) Count' +from EmployeeLeaves lv where employee = ? and date_start >= ? and date_end <= ? and status = ?; + +This report list all employee leaves by employee, date range and leave status \ No newline at end of file diff --git a/core-ext/scripts/reports/employee_timesheet.txt b/core-ext/scripts/reports/employee_timesheet.txt new file mode 100644 index 00000000..e2e34562 --- /dev/null +++ b/core-ext/scripts/reports/employee_timesheet.txt @@ -0,0 +1,20 @@ +[ +[ "employee", {"label":"Employee","type":"select","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}], +[ "project", {"label":"Project","type":"select","allow-null":true,"remote-source":["Project","id","name"]}], +[ "date_start", {"label":"Start Date","type":"date"}], +[ "date_end", {"label":"End Date","type":"date"}] +] + +["date_start","date_end","project","employee"] + +SELECT +(SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`) from Employees where id = te.employee) as 'Employee', +(SELECT name from Projects where id = te.project) as 'Project', +details as 'Details', +date_start as 'Start Time', +date_end as 'End Time', +SEC_TO_TIME(TIMESTAMPDIFF(SECOND,te.date_start,te.date_end)) as 'Duration' +FROM EmployeeTimeEntry te +WHERE date_start >= ? and date_end <= ? and project = ? and employee = ? + +This report list all employee time entries by employee, date range and project \ No newline at end of file diff --git a/core-ext/scripts/test/add_attendance.sql b/core-ext/scripts/test/add_attendance.sql new file mode 100644 index 00000000..fd79d7f9 --- /dev/null +++ b/core-ext/scripts/test/add_attendance.sql @@ -0,0 +1,169 @@ +SET @employee = 1; +SET @startInTime = '2014-08-01 08:15:15'; +SET @startOutTime = '2014-08-01 12:15:15'; + +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + +SET @startInTime = DATE_ADD(@startInTime, INTERVAL 1 DAY); +SET @startOutTime = DATE_ADD(@startOutTime, INTERVAL 1 DAY); +INSERT INTO `Attendance` (`employee`, `in_time`, `out_time`, `note`) VALUES +(@employee, FROM_UNIXTIME(UNIX_TIMESTAMP(@startInTime) + FLOOR(0 + (RAND() * 60*60*4))), FROM_UNIXTIME(UNIX_TIMESTAMP(@startOutTime) + FLOOR(0 + (RAND() * 60*60*4))), 'Test Entry'); + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core-ext/scripts/test/add_test_employees.sql b/core-ext/scripts/test/add_test_employees.sql new file mode 100644 index 00000000..d45aedce --- /dev/null +++ b/core-ext/scripts/test/add_test_employees.sql @@ -0,0 +1,267 @@ +INSERT INTO `Employees` (`employee_id`, `first_name`, `middle_name`, `last_name`, `nationality`, `birthday`, `gender`, `marital_status`, `ssn_num`, `nic_num`, `other_id`, `driving_license`, `driving_license_exp_date`, `employment_status`, `job_title`, `pay_grade`, `work_station_id`, `address1`, `address2`, `city`, `country`, `province`, `postal_code`, `home_phone`, `mobile_phone`, `work_phone`, `work_email`, `private_email`, `joined_date`, `confirmation_date`, `supervisor`, `department`, `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `custom6`, `custom7`, `custom8`, `custom9`, `custom10`) VALUES +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(FLOOR(RAND() * 50000), concat('Employee ',FLOOR(RAND() * 50000)), '', concat('E',FLOOR(RAND() * 50000)), 175, '1984-03-12 18:30:00', 'Female', 'Single', '', '4594567WE3', '4595567WE3', '349-066-YUO', '2012-03-01', 1, 8, 2, 'W001', 'Green War Rd, 00123', '', 'Istanbul', 'TR', NULL, '909066', '+960112345', '+960112345', '+960112345', 'icehrm+1@web-stalk.com', 'icehrm+1@web-stalk.com', '2011-03-07 18:30:00', '2012-02-14 18:30:00', 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); \ No newline at end of file diff --git a/ext/admin/attendance/api/AttendanceActionManager.php b/ext/admin/attendance/api/AttendanceActionManager.php new file mode 100644 index 00000000..8c30f95c --- /dev/null +++ b/ext/admin/attendance/api/AttendanceActionManager.php @@ -0,0 +1,105 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) +*/ + +class AttendanceActionManager extends SubActionManager{ + + public function savePunch($req){ + + + $employee = $this->baseService->getElement('Employee',$req->employee,null,true); + $inDateTime = $req->in_time; + $inDateArr = explode(" ",$inDateTime); + $inDate = $inDateArr[0]; + $outDateTime = $req->out_time; + $outDate = ""; + if(!empty($outDateTime)){ + $outDateArr = explode(" ",$outDateTime); + $outDate = $outDateArr[0]; + } + + $note = $req->note; + + //check if dates are differnet + if(!empty($outDate) && $inDate != $outDate){ + return new IceResponse(IceResponse::ERROR,"Attendance entry should be within a single day"); + } + + //compare dates + if(!empty($outDateTime) && strtotime($outDateTime) <= strtotime($inDateTime)){ + return new IceResponse(IceResponse::ERROR,"Punch-in time should be lesser than Punch-out time"); + } + + + //Find all punches for the day + $attendance = new Attendance(); + $attendanceList = $attendance->Find("employee = ? and DATE_FORMAT( in_time, '%Y-%m-%d' ) = ?",array($employee->id,$inDate)); + + foreach($attendanceList as $attendance){ + if(!empty($req->id) && $req->id == $attendance->id){ + continue; + } + if(empty($attendance->out_time) || $attendance->out_time == "0000-00-00 00:00:00"){ + return new IceResponse(IceResponse::ERROR,"There is a non closed attendance entry for today. Please mark punch-out time of the open entry before adding a new one"); + }else if(!empty($outDateTime)){ + if(strtotime($attendance->out_time) >= strtotime($outDateTime) && strtotime($attendance->in_time) <= strtotime($outDateTime)){ + //-1---0---1---0 || ---0--1---1---0 + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one"); + }else if(strtotime($attendance->out_time) >= strtotime($inDateTime) && strtotime($attendance->in_time) <= strtotime($inDateTime)){ + //---0---1---0---1 || ---0--1---1---0 + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one"); + }else if(strtotime($attendance->out_time) <= strtotime($outDateTime) && strtotime($attendance->in_time) >= strtotime($inDateTime)){ + //--1--0---0--1-- + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one"); + } + }else{ + if(strtotime($attendance->out_time) >= strtotime($inDateTime) && strtotime($attendance->in_time) <= strtotime($inDateTime)){ + //---0---1---0 + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one"); + } + } + } + + $attendance = new Attendance(); + if(!empty($req->id)){ + $attendance->Load("id = ?",array($req->id)); + } + $attendance->in_time = $inDateTime; + if(empty($outDateTime)){ + $attendance->out_time = "0000-00-00 00:00:00"; + }else{ + $attendance->out_time = $outDateTime; + } + + $attendance->employee = $req->employee; + $attendance->note = $note; + $ok = $attendance->Save(); + if(!$ok){ + LogManager::getInstance()->info($attendance->ErrorMsg()); + return new IceResponse(IceResponse::ERROR,"Error occured while saving attendance"); + } + return new IceResponse(IceResponse::SUCCESS,$attendance); + + } + + +} \ No newline at end of file diff --git a/ext/admin/attendance/api/AttendanceAdminManager.php b/ext/admin/attendance/api/AttendanceAdminManager.php new file mode 100644 index 00000000..2ff20ff2 --- /dev/null +++ b/ext/admin/attendance/api/AttendanceAdminManager.php @@ -0,0 +1,176 @@ +addModelClass('Attendance'); + } + + } +} + + +//Model Classes + +if (!class_exists('Attendance')) { + class Attendance extends ICEHRM_Record { + var $_table = 'Attendance'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } +} + + + +if (!class_exists('AttendanceStatus')) { + class AttendanceStatus extends ICEHRM_Record { + var $_table = 'Attendance'; + + + public function getRecentAttendanceEntries($limit){ + $shift = intval(SettingsManager::getInstance()->getSetting("Attendance: Shift (Minutes)")); + $attendance = new Attendance(); + $attendanceToday = $attendance->Find("1 = 1 order by in_time desc limit ".$limit,array()); + $attendanceData = array(); + $employees = array(); + foreach($attendanceToday as $atEntry){ + $entry = new stdClass(); + $entry->id = $atEntry->employee; + $dayArr = explode(" ",$atEntry->in_time); + $day = $dayArr[0]; + if($atEntry->out_time == "0000-00-00 00:00:00" || empty($atEntry->out_time)){ + if(strtotime($atEntry->in_time) < (time() + $shift * 60) && $day == date("Y-m-d")){ + $entry->status = "Clocked In"; + $entry->statusId = 0; + $entry->color = 'green'; + + $employee = new Employee(); + $employee->Load("id = ?",array($entry->id)); + $entry->employee = $employee->first_name." ".$employee->last_name; + $employees[$entry->id] = $entry; + } + } + + if(!isset($employees[$entry->id])){ + $employee = new Employee(); + $employee->Load("id = ?",array($entry->id)); + if($day == date("Y-m-d")){ + $entry->status = "Clocked Out"; + $entry->statusId = 1; + $entry->color = 'yellow'; + }else{ + $entry->status = "Not Clocked In"; + $entry->statusId = 2; + $entry->color = 'gray'; + } + $entry->employee = $employee->first_name." ".$employee->last_name; + $employees[$entry->id] = $entry; + } + + } + + return array_values($employees); + } + + public function Find($whereOrderBy,$bindarr=false,$pkeysArr=false,$extra=array()){ + $shift = intval(SettingsManager::getInstance()->getSetting("Attendance: Shift (Minutes)")); + $employee = new Employee(); + $data = array(); + $employees = $employee->Find("1=1"); + + $attendance = new Attendance(); + $attendanceToday = $attendance->Find("date(in_time) = ?",array(date("Y-m-d"))); + $attendanceData = array(); + //Group by employee + foreach($attendanceToday as $attendance){ + if(isset($attendanceData[$attendance->employee])){ + $attendanceData[$attendance->employee][] = $attendance; + }else{ + $attendanceData[$attendance->employee] = array($attendance); + } + } + + + foreach($employees as $employee){ + + $entry = new stdClass(); + $entry->id = $employee->id; + $entry->employee = $employee->id; + + + + if(isset($attendanceData[$employee->id])){ + $attendanceEntries = $attendanceData[$employee->id]; + foreach($attendanceEntries as $atEntry){ + if($atEntry->out_time == "0000-00-00 00:00:00" || empty($atEntry->out_time)){ + if(strtotime($atEntry->in_time) < time() + $shift * 60){ + $entry->status = "Clocked In"; + $entry->statusId = 0; + } + } + } + + if(empty($entry->status)){ + $entry->status = "Clocked Out"; + $entry->statusId = 1; + } + }else{ + $entry->status = "Not Clocked In"; + $entry->statusId = 2; + } + + $data[] = $entry; + } + + function cmp($a, $b) { + return $a->statusId - $b->statusId; + } + usort($data, "cmp"); + + return $data; + } + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } +} \ No newline at end of file diff --git a/ext/admin/attendance/index.php b/ext/admin/attendance/index.php new file mode 100644 index 00000000..4301f9c0 --- /dev/null +++ b/ext/admin/attendance/index.php @@ -0,0 +1,82 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'attendance_monitor'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+ + +
+ +
+ + \ No newline at end of file diff --git a/ext/admin/attendance/lib.js b/ext/admin/attendance/lib.js new file mode 100644 index 00000000..5fc641b7 --- /dev/null +++ b/ext/admin/attendance/lib.js @@ -0,0 +1,218 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function AttendanceAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +AttendanceAdapter.inherits(AdapterBase); + + + +AttendanceAdapter.method('getDataMapping', function() { + return [ + "id", + "employee", + "in_time", + "out_time", + "note" + ]; +}); + +AttendanceAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Employee" }, + { "sTitle": "Time-In" }, + { "sTitle": "Time-Out"}, + { "sTitle": "Note"} + ]; +}); + +AttendanceAdapter.method('getFormFields', function() { + return [ + [ "employee", {"label":"Employee","type":"select2","allow-null":false,"remote-source":["Employee","id","first_name+last_name"]}], + [ "id", {"label":"ID","type":"hidden"}], + [ "in_time", {"label":"Time-In","type":"datetime"}], + [ "out_time", {"label":"Time-Out","type":"datetime", "validation":"none"}], + [ "note", {"label":"Note","type":"textarea","validation":"none"}] + ]; +}); + +AttendanceAdapter.method('getFilters', function() { + return [ + [ "employee", {"label":"Employee","type":"select2","allow-null":false,"remote-source":["Employee","id","first_name+last_name"]}] + + ]; +}); + + +AttendanceAdapter.method('getCustomTableParams', function() { + var that = this; + var dataTableParams = { + "aoColumnDefs": [ + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 2) + } , + "aTargets": [2] + }, + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 3) + } , + "aTargets": [3] + }, + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 4) + } , + "aTargets": [4] + }, + { + "fnRender": that.getActionButtons, + "aTargets": [that.getDataMapping().length] + } + ] + }; + return dataTableParams; +}); + +AttendanceAdapter.method('preProcessRemoteTableData', function(data, cell, id) { + if(id == 2){ + if(cell == '0000-00-00 00:00:00' || cell == "" || cell == undefined || cell == null){ + return ""; + } + return Date.parse(cell).toString('yyyy MMM d HH:mm'); + }else if(id == 3){ + if(cell == '0000-00-00 00:00:00' || cell == "" || cell == undefined || cell == null){ + return ""; + } + return Date.parse(cell).toString('MMM d HH:mm'); + }else if(id == 4){ + if(cell != undefined && cell != null){ + if(cell.length > 10){ + return cell.substring(0,10)+".."; + } + } + return cell; + } + +}); + + + +AttendanceAdapter.method('save', function() { + var validator = new FormValidation(this.getTableName()+"_submit",true,{'ShowPopup':false,"LabelErrorClass":"error"}); + if(validator.checkValues()){ + var params = validator.getFormParameters(); + + var msg = this.doCustomValidation(params); + if(msg == null){ + var id = $('#'+this.getTableName()+"_submit #id").val(); + if(id != null && id != undefined && id != ""){ + $(params).attr('id',id); + } + + var reqJson = JSON.stringify(params); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'saveSuccessCallback'; + callBackData['callBackFail'] = 'saveFailCallback'; + + this.customAction('savePunch','admin=attendance',reqJson,callBackData); + }else{ + $("#"+this.getTableName()+'Form .label').html(msg); + $("#"+this.getTableName()+'Form .label').show(); + } + + } +}); + + +AttendanceAdapter.method('saveSuccessCallback', function(callBackData) { + this.get(callBackData); +}); + + +AttendanceAdapter.method('saveFailCallback', function(callBackData) { + this.showMessage("Error saving attendance entry", callBackData); +}); + + + +/* + Attendance Status + */ + + +function AttendanceStatusAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +AttendanceStatusAdapter.inherits(AdapterBase); + + + +AttendanceStatusAdapter.method('getDataMapping', function() { + return [ + "id", + "employee", + "status" + ]; +}); + +AttendanceStatusAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Employee" }, + { "sTitle": "Clocked In Status" } + ]; +}); + +AttendanceStatusAdapter.method('getFormFields', function() { + return [ + + ]; +}); + +AttendanceStatusAdapter.method('getFilters', function() { + return [ + [ "employee", {"label":"Employee","type":"select2","allow-null":false,"remote-source":["Employee","id","first_name+last_name"]}] + + ]; +}); + +AttendanceStatusAdapter.method('getActionButtonsHtml', function(id,data) { + + + html = '
'; + html = html.replace(/_BASE_/g,this.baseUrl); + if(data[2] == "Not Clocked In"){ + html = html.replace(/_COLOR_/g,'gray'); + }else if(data[2] == "Clocked Out"){ + html = html.replace(/_COLOR_/g,'yellow'); + }else if(data[2] == "Clocked In"){ + html = html.replace(/_COLOR_/g,'green'); + } + return html; +}); \ No newline at end of file diff --git a/ext/admin/attendance/meta.json b/ext/admin/attendance/meta.json new file mode 100644 index 00000000..c41a9c98 --- /dev/null +++ b/ext/admin/attendance/meta.json @@ -0,0 +1,10 @@ +{ +"label":"Monitor Attendance", +"menu":"Employees", +"order":"8", +"icon":"fa-clock-o", +"user_levels":["Admin"], + +"permissions": + {} +} \ No newline at end of file diff --git a/ext/admin/company_structure/api/Company_structureAdminManager.php b/ext/admin/company_structure/api/Company_structureAdminManager.php new file mode 100644 index 00000000..5a1aba9b --- /dev/null +++ b/ext/admin/company_structure/api/Company_structureAdminManager.php @@ -0,0 +1,52 @@ +addDatabaseErrorMapping("CONSTRAINT `Fk_Employee_CompanyStructures` FOREIGN KEY (`department`) REFERENCES `CompanyStructures` (`id`)", "Can not delete a company structure while employees are assigned to it"); + $this->addDatabaseErrorMapping("CONSTRAINT `Fk_CompanyStructures_Own` FOREIGN KEY (`parent`) REFERENCES ", "Can not delete a parent structure"); + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('CompanyStructure'); + } + + } +} + + +if (!class_exists('CompanyStructure')) { + class CompanyStructure extends ICEHRM_Record { + var $_table = 'CompanyStructures'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get","element"); + } + + public function validateSave($obj){ + if($obj->id == $obj->parent && !empty($obj->parent)){ + return new IceResponse(IceResponse::ERROR,"A Company structure unit can not be the parent of the same unit"); + } + + return new IceResponse(IceResponse::SUCCESS,""); + } + } +} \ No newline at end of file diff --git a/ext/admin/company_structure/index.php b/ext/admin/company_structure/index.php new file mode 100644 index 00000000..4e629453 --- /dev/null +++ b/ext/admin/company_structure/index.php @@ -0,0 +1,96 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'company_structure'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?> + + + + + +
+ + + +
+
+
+ +
+ +
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/company_structure/lib.js b/ext/admin/company_structure/lib.js new file mode 100644 index 00000000..7c0330f2 --- /dev/null +++ b/ext/admin/company_structure/lib.js @@ -0,0 +1,306 @@ +/** + * Author: Thilina Hasantha + */ + +function CompanyStructureAdapter(endPoint) { + this.initAdapter(endPoint); +} + +CompanyStructureAdapter.inherits(AdapterBase); + + + +CompanyStructureAdapter.method('getDataMapping', function() { + return [ + "id", + "title", + "address", + "type", + "country", + "parent" + ]; +}); + +CompanyStructureAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID","bVisible":false }, + { "sTitle": "Name" }, + { "sTitle": "Address","bSortable":false}, + { "sTitle": "Type"}, + { "sTitle": "Country", "sClass": "center" }, + { "sTitle": "Parent Structure"} + ]; +}); + +CompanyStructureAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden","validation":""}], + [ "title", {"label":"Name","type":"text","validation":""}], + [ "description", {"label":"Details","type":"textarea","validation":""}], + [ "address", {"label":"Address","type":"textarea","validation":"none"}], + [ "type", {"label":"Type","type":"select","source":[["Company","Company"],["Head Office","Head Office"],["Regional Office","Regional Office"],["Department","Department"],["Unit","Unit"],["Sub Unit","Sub Unit"],["Other","Other"]]}], + [ "country", {"label":"Country","type":"select","remote-source":["Country","code","name"]}], + [ "parent", {"label":"Parent Structure","type":"select","allow-null":true,"remote-source":["CompanyStructure","id","title"]}] + ]; +}); + + +/* + * Company Graph + */ + + +function CompanyGraphAdapter(endPoint) { + this.initAdapter(endPoint); + this.nodeIdCounter = 0; +} + +CompanyGraphAdapter.inherits(CompanyStructureAdapter); + + +CompanyGraphAdapter.method('convertToTree', function(data) { + var ice = {}; + ice['id'] = -1; + ice['title'] = ''; + ice['name'] = ''; + ice['children'] = []; + + var parent = null; + + var added = {}; + + + for(var i=0;i"; + obj.parent = null; + break; + } + parentIdArr[parent.id] = 1; + curObj = parent; + } + } + + if(errorMsg != ""){ + this.showMessage("Company Structure is having a cyclic dependency","We found a cyclic dependency due to following reasons:
"+errorMsg); + return false; + } + + return true; + +}); + +CompanyGraphAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=61'; +}); + + + + diff --git a/ext/admin/company_structure/meta.json b/ext/admin/company_structure/meta.json new file mode 100644 index 00000000..7d226ff1 --- /dev/null +++ b/ext/admin/company_structure/meta.json @@ -0,0 +1,16 @@ +{ +"label":"Company Structure", +"menu":"Admin", +"order":"2", +"icon":"fa-building-o", +"user_levels":["Admin","Manager"], + +"permissions": + { + "Manager":{ + "Add Company Structure":"No", + "Edit Company Structure":"No", + "Delete Company Structure":"No" + } + } +} \ No newline at end of file diff --git a/ext/admin/dashboard/api/DashboardActionManager.php b/ext/admin/dashboard/api/DashboardActionManager.php new file mode 100644 index 00000000..ea0f1946 --- /dev/null +++ b/ext/admin/dashboard/api/DashboardActionManager.php @@ -0,0 +1,55 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) +*/ + + +class DashboardActionManager extends SubActionManager{ + + public function getInitData($req){ + $data = array(); + $employees = new Employee(); + $data['numberOfEmployees'] = $employees->Count("1 = 1"); + + $company = new CompanyStructure(); + $data['numberOfCompanyStuctures'] = $company->Count("1 = 1"); + + $user = new User(); + $data['numberOfUsers'] = $user->Count("1 = 1"); + + $project = new Project(); + $data['numberOfProjects'] = $project->Count("status = 'Active'"); + + $attendance = new Attendance(); + $data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'"); + + $empLeave = new EmployeeLeave(); + $data['numberOfLeaves'] = $empLeave->Count("date_start > '".date("Y-m-d")."'"); + + $timeEntry = new EmployeeTimeEntry(); + $data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'"); + + + return new IceResponse(IceResponse::SUCCESS,$data); + + } + +} \ No newline at end of file diff --git a/ext/admin/dashboard/api/DashboardAdminManager.php b/ext/admin/dashboard/api/DashboardAdminManager.php new file mode 100644 index 00000000..5d3b871a --- /dev/null +++ b/ext/admin/dashboard/api/DashboardAdminManager.php @@ -0,0 +1,22 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'dashboard'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+
+
+

Why not upgrade to IceHrm Pro Version

+

+ IceHrm Pro is the feature rich upgrade to IceHrm open source version. It comes with improved modules for + employee management, leave management, LDAP support and number of other features over open source version. + Hit this link to do a full one to one comparison. + + Also you can learn more about IceHrm Pro here +
+
+ Buy IceHrm Pro +

+
+
+ +
+
+ +
+
+

+ People +

+

+ .. Employees +

+
+
+ +
+ + Manage Employees + +
+
+
+ +
+
+

..

+

+ Company Structures +

+
+
+ +
+ + Manage Company + +
+
+
+ +
+
+

Users

+

+ .. Users +

+
+
+ +
+ + Manage Users + +
+
+
+ +
+
+

..

+

+ Active Projects +

+
+
+ +
+ + Update Clients/Projects + +
+
+
+ +
+
+ +
+
+

+ Attendance +

+

+ .. Entries Last Week +

+
+
+ +
+ + Monitor Attendance + +
+
+
+ +
+
+

..

+

Upcoming Leaves

+
+
+ +
+ + Leave Management + +
+
+
+ +
+
+

Reports

+

+ View / Download Reports +

+
+
+ +
+ + Create a Report + +
+
+
+ +
+
+

Settings

+

+ Configure IceHrm +

+
+
+ +
+ + Update Settings + +
+
+
+ + + +
+ + \ No newline at end of file diff --git a/ext/admin/dashboard/lib.js b/ext/admin/dashboard/lib.js new file mode 100644 index 00000000..dedc9f53 --- /dev/null +++ b/ext/admin/dashboard/lib.js @@ -0,0 +1,76 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function DashboardAdapter(endPoint) { + this.initAdapter(endPoint); +} + +DashboardAdapter.inherits(AdapterBase); + + + +DashboardAdapter.method('getDataMapping', function() { + return []; +}); + +DashboardAdapter.method('getHeaders', function() { + return []; +}); + +DashboardAdapter.method('getFormFields', function() { + return []; +}); + + +DashboardAdapter.method('get', function(callBackData) { +}); + + +DashboardAdapter.method('getInitData', function() { + var that = this; + var object = {}; + var reqJson = JSON.stringify(object); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'getInitDataSuccessCallBack'; + callBackData['callBackFail'] = 'getInitDataFailCallBack'; + + this.customAction('getInitData','admin=dashboard',reqJson,callBackData); +}); + + + +DashboardAdapter.method('getInitDataSuccessCallBack', function(data) { + + $("#numberOfEmployees").html(data['numberOfEmployees']+" Employees"); + $("#numberOfCompanyStuctures").html(data['numberOfCompanyStuctures']); + $("#numberOfUsers").html(data['numberOfUsers']+" Users"); + $("#numberOfProjects").html(data['numberOfProjects']); + $("#numberOfAttendanceLastWeek").html(data['numberOfAttendanceLastWeek']+" Entries Last Week"); + $("#numberOfLeaves").html(data['numberOfLeaves']); + $("#numberOfTimeEntries").html(data['numberOfTimeEntries']); + +}); + +DashboardAdapter.method('getInitDataFailCallBack', function(callBackData) { + +}); diff --git a/ext/admin/dashboard/meta.json b/ext/admin/dashboard/meta.json new file mode 100644 index 00000000..1383aecd --- /dev/null +++ b/ext/admin/dashboard/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Dashboard", +"menu":"Admin", +"order":"1", +"icon":"fa-desktop", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/documents/api/DocumentsAdminManager.php b/ext/admin/documents/api/DocumentsAdminManager.php new file mode 100644 index 00000000..31cfaee3 --- /dev/null +++ b/ext/admin/documents/api/DocumentsAdminManager.php @@ -0,0 +1,69 @@ +addFileFieldMapping('EmployeeDocument', 'attachment', 'name'); + } + + public function initializeDatabaseErrorMappings(){ + $this->addDatabaseErrorMapping('CONSTRAINT `Fk_EmployeeDocuments_Documents` FOREIGN KEY','Can not delete Document Type, users have already uploaded these types of documents'); + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('Document'); + $this->addModelClass('EmployeeDocument'); + } + + } +} + + +if (!class_exists('Document')) { + class Document extends ICEHRM_Record { + var $_table = 'Documents'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + + public function getUserAccess(){ + return array(); + } + } +} + +if (!class_exists('EmployeeDocument')) { + class EmployeeDocument extends ICEHRM_Record { + var $_table = 'EmployeeDocuments'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + + public function Insert(){ + if(empty($this->date_added)){ + $this->date_added = date("Y-m-d H:i:s"); + } + return parent::Insert(); + } + } +} \ No newline at end of file diff --git a/ext/admin/documents/index.php b/ext/admin/documents/index.php new file mode 100644 index 00000000..2d317fee --- /dev/null +++ b/ext/admin/documents/index.php @@ -0,0 +1,64 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'documents'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/documents/lib.js b/ext/admin/documents/lib.js new file mode 100644 index 00000000..f2fb7200 --- /dev/null +++ b/ext/admin/documents/lib.js @@ -0,0 +1,107 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * DocumentAdapter + */ + +function DocumentAdapter(endPoint) { + this.initAdapter(endPoint); +} + +DocumentAdapter.inherits(AdapterBase); + + + +DocumentAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "details" + ]; +}); + +DocumentAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Details"} + ]; +}); + +DocumentAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text","validation":""}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}] + ]; +}); + +DocumentAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=88'; +}); + + +function EmployeeDocumentAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeDocumentAdapter.inherits(AdapterBase); + + + +EmployeeDocumentAdapter.method('getDataMapping', function() { + return [ + "id", + "employee", + "document", + "details", + "date_added", + "status", + "attachment" + ]; +}); + +EmployeeDocumentAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Employee" }, + { "sTitle": "Document" }, + { "sTitle": "Details" }, + { "sTitle": "Date Added"}, + { "sTitle": "Status"}, + { "sTitle": "Attachment","bVisible":false} + ]; +}); + +EmployeeDocumentAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}], + [ "document", {"label":"Document","type":"select2","remote-source":["Document","id","name"]}], + [ "date_added", {"label":"Date Added","type":"date","validation":""}], + [ "valid_until", {"label":"Valid Until","type":"date","validation":"none"}], + [ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"],["Draft","Draft"]]}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}], + [ "attachment", {"label":"Attachment","type":"fileupload","validation":"none"}] + ]; +}); + + +EmployeeDocumentAdapter.method('getFilters', function() { + return [ + [ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}] + + ]; +}); + + +EmployeeDocumentAdapter.method('getActionButtonsHtml', function(id,data) { + var html = '
'; + html = html.replace(/_id_/g,id); + html = html.replace(/_attachment_/g,data[6]); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); diff --git a/ext/admin/documents/meta.json b/ext/admin/documents/meta.json new file mode 100644 index 00000000..ddba8cdc --- /dev/null +++ b/ext/admin/documents/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Document Management", +"menu":"Employees", +"order":"2", +"icon":"fa-files-o", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/employees/api/EmployeesAdminManager.php b/ext/admin/employees/api/EmployeesAdminManager.php new file mode 100644 index 00000000..219156b2 --- /dev/null +++ b/ext/admin/employees/api/EmployeesAdminManager.php @@ -0,0 +1,71 @@ +addDatabaseErrorMapping('CONSTRAINT `Fk_User_Employee` FOREIGN KEY',"Can not delete Employee, please delete the User for this employee first."); + $this->addDatabaseErrorMapping("Duplicate entry|for key 'employee'","A duplicate entry found"); + } + + public function setupModuleClassDefinitions(){ + $this->addModelClass('Employee'); + $this->addModelClass('EmploymentStatus'); + } + + } +} + +if (!class_exists('Employee')) { + class Employee extends ICEHRM_Record { + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save"); + } + + public function getUserOnlyMeAccessField(){ + return "id"; + } + + var $_table = 'Employees'; + } +} + +if (!class_exists('EmploymentStatus')) { + class EmploymentStatus extends ICEHRM_Record { + + var $_table = 'EmploymentStatus'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save"); + } + + public function getUserAccess(){ + return array(); + } + } +} + diff --git a/ext/admin/employees/index.php b/ext/admin/employees/index.php new file mode 100644 index 00000000..0765d325 --- /dev/null +++ b/ext/admin/employees/index.php @@ -0,0 +1,34 @@ +
+ + + +
+
+
+ +
+ +
+ +
+ +
+ + diff --git a/ext/admin/employees/lib.js b/ext/admin/employees/lib.js new file mode 100644 index 00000000..133bf7f7 --- /dev/null +++ b/ext/admin/employees/lib.js @@ -0,0 +1,96 @@ +/** + * Author: Thilina Hasantha + */ + +function EmployeeAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeAdapter.inherits(AdapterBase); + + + +EmployeeAdapter.method('getDataMapping', function() { + return [ + "id", + "employee_id", + "first_name", + "last_name", + "mobile_phone", + "department", + "gender", + "supervisor" + ]; +}); + +EmployeeAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" }, + { "sTitle": "Employee Number" }, + { "sTitle": "First Name" }, + { "sTitle": "Last Name"}, + { "sTitle": "Mobile"}, + { "sTitle": "Department"}, + { "sTitle": "Gender"}, + { "sTitle": "Supervisor"} + ]; +}); + +EmployeeAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden","validation":""}], + [ "employee_id", {"label":"Employee Number","type":"text","validation":""}], + [ "first_name", {"label":"First Name","type":"text","validation":""}], + [ "middle_name", {"label":"Middle Name","type":"text","validation":"none"}], + [ "last_name", {"label":"Last Name","type":"text","validation":""}], + [ "nationality", {"label":"Nationality","type":"select2","remote-source":["Nationality","id","name"]}], + [ "birthday", {"label":"Date of Birth","type":"date","validation":""}], + [ "gender", {"label":"Gender","type":"select","source":[["Male","Male"],["Female","Female"]]}], + [ "marital_status", {"label":"Marital Status","type":"select","source":[["Married","Married"],["Single","Single"],["Divorced","Divorced"],["Widowed","Widowed"],["Other","Other"]]}], + [ "ssn_num", {"label":"SSN/NRIC","type":"text","validation":"none"}], + [ "nic_num", {"label":"NIC","type":"text","validation":"none"}], + [ "other_id", {"label":"Other ID","type":"text","validation":"none"}], + [ "driving_license", {"label":"Driving License No","type":"text","validation":"none"}], + /*[ "driving_license_exp_date", {"label":"License Exp Date","type":"date","validation":"none"}],*/ + [ "employment_status", {"label":"Employment Status","type":"select2","remote-source":["EmploymentStatus","id","name"]}], + [ "job_title", {"label":"Job Title","type":"select2","remote-source":["JobTitle","id","name"]}], + [ "pay_grade", {"label":"Pay Grade","type":"select2","allow-null":true,"remote-source":["PayGrade","id","name"]}], + [ "work_station_id", {"label":"Work Station Id","type":"text","validation":"none"}], + [ "address1", {"label":"Address Line 1","type":"text","validation":"none"}], + [ "address2", {"label":"Address Line 2","type":"text","validation":"none"}], + [ "city", {"label":"City","type":"text","validation":"none"}], + [ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}], + [ "province", {"label":"Province","type":"select2","allow-null":true,"remote-source":["Province","id","name"]}], + [ "postal_code", {"label":"Postal/Zip Code","type":"text","validation":"none"}], + [ "home_phone", {"label":"Home Phone","type":"text","validation":"none"}], + [ "mobile_phone", {"label":"Mobile Phone","type":"text","validation":"none"}], + [ "work_phone", {"label":"Work Phone","type":"text","validation":"none"}], + [ "work_email", {"label":"Work Email","type":"text","validation":"emailOrEmpty"}], + [ "private_email", {"label":"Private Email","type":"text","validation":"emailOrEmpty"}], + [ "joined_date", {"label":"Joined Date","type":"date","validation":""}], + [ "confirmation_date", {"label":"Confirmation Date","type":"date","validation":"none"}], + [ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"]}], + [ "supervisor", {"label":"Supervisor","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}] + ]; +}); + +EmployeeAdapter.method('getFilters', function() { + return [ + [ "job_title", {"label":"Job Title","type":"select2","allow-null":true,"null-label":"All Job Titles","remote-source":["JobTitle","id","name"]}], + [ "department", {"label":"Department","type":"select2","allow-null":true,"null-label":"All Departments","remote-source":["CompanyStructure","id","title"]}], + [ "supervisor", {"label":"Supervisor","type":"select2","allow-null":true,"null-label":"Anyone","remote-source":["Employee","id","first_name+last_name"]}] + ]; +}); + +EmployeeAdapter.method('getActionButtonsHtml', function(id) { + var html = '
'; + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); + +EmployeeAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=69'; +}); + + diff --git a/ext/admin/employees/meta.json b/ext/admin/employees/meta.json new file mode 100644 index 00000000..ac5d18ed --- /dev/null +++ b/ext/admin/employees/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Employees", +"menu":"Employees", +"order":"1", +"icon":"fa-users", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/jobs/api/JobsAdminManager.php b/ext/admin/jobs/api/JobsAdminManager.php new file mode 100644 index 00000000..ce9b177f --- /dev/null +++ b/ext/admin/jobs/api/JobsAdminManager.php @@ -0,0 +1,54 @@ +addModelClass('JobTitle'); + $this->addModelClass('PayGrade'); + + } + + } +} + + +if (!class_exists('JobTitle')) { + class JobTitle extends ICEHRM_Record { + var $_table = 'JobTitles'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } +} + +if (!class_exists('PayGrade')) { + class PayGrade extends ICEHRM_Record { + var $_table = 'PayGrades'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } +} \ No newline at end of file diff --git a/ext/admin/jobs/index.php b/ext/admin/jobs/index.php new file mode 100644 index 00000000..b3744499 --- /dev/null +++ b/ext/admin/jobs/index.php @@ -0,0 +1,74 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'jobs'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/jobs/lib.js b/ext/admin/jobs/lib.js new file mode 100644 index 00000000..36142741 --- /dev/null +++ b/ext/admin/jobs/lib.js @@ -0,0 +1,139 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * JobTitleAdapter + */ + +function JobTitleAdapter(endPoint) { + this.initAdapter(endPoint); +} + +JobTitleAdapter.inherits(AdapterBase); + + + +JobTitleAdapter.method('getDataMapping', function() { + return [ + "id", + "code", + "name" + ]; +}); + +JobTitleAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Code" }, + { "sTitle": "Name" } + ]; +}); + +JobTitleAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "code", {"label":"Job Title Code","type":"text"}], + [ "name", {"label":"Job Title","type":"text"}], + [ "description", {"label":"Description","type":"textarea"}], + [ "specification", {"label":"Specification","type":"textarea"}] + ]; +}); + +JobTitleAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=80'; +}); + + +/** + * PayGradeAdapter + */ + +function PayGradeAdapter(endPoint) { + this.initAdapter(endPoint); +} + +PayGradeAdapter.inherits(AdapterBase); + + + +PayGradeAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "currency", + "min_salary", + "max_salary" + ]; +}); + +PayGradeAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Currency"}, + { "sTitle": "Min Salary" }, + { "sTitle": "Max Salary"} + ]; +}); + +PayGradeAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Pay Grade Name","type":"text"}], + [ "currency", {"label":"Currency","type":"select2","remote-source":["CurrencyType","code","name"]}], + [ "min_salary", {"label":"Min Salary","type":"text","validation":"float"}], + [ "max_salary", {"label":"Max Salary","type":"text","validation":"float"}] + ]; +}); + +PayGradeAdapter.method('doCustomValidation', function(params) { + try{ + if(parseFloat(params.min_salary)>parseFloat(params.max_salary)){ + return "Min Salary should be smaller than Max Salary"; + } + }catch(e){ + + } + return null; +}); + + + +/** + * EmploymentStatusAdapter + */ + +function EmploymentStatusAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmploymentStatusAdapter.inherits(AdapterBase); + + + +EmploymentStatusAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "description" + ]; +}); + +EmploymentStatusAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" }, + { "sTitle": "Name" }, + { "sTitle": "Description"} + ]; +}); + +EmploymentStatusAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Employment Status","type":"text"}], + [ "description", {"label":"Description","type":"textarea","validation":""}] + ]; +}); + diff --git a/ext/admin/jobs/meta.json b/ext/admin/jobs/meta.json new file mode 100644 index 00000000..8e8ade44 --- /dev/null +++ b/ext/admin/jobs/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Job Details Setup", +"menu":"Admin", +"order":"3", +"icon":"fa-columns", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/loans/api/LoansAdminManager.php b/ext/admin/loans/api/LoansAdminManager.php new file mode 100644 index 00000000..022aa360 --- /dev/null +++ b/ext/admin/loans/api/LoansAdminManager.php @@ -0,0 +1,37 @@ +addModelClass('CompanyLoan'); + } + + } +} + +if (!class_exists('CompanyLoan')) { + class CompanyLoan extends ICEHRM_Record { + var $_table = 'CompanyLoans'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } +} \ No newline at end of file diff --git a/ext/admin/loans/index.php b/ext/admin/loans/index.php new file mode 100644 index 00000000..c00e9b7c --- /dev/null +++ b/ext/admin/loans/index.php @@ -0,0 +1,64 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'CompanyLoans'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/loans/lib.js b/ext/admin/loans/lib.js new file mode 100644 index 00000000..fcd72542 --- /dev/null +++ b/ext/admin/loans/lib.js @@ -0,0 +1,102 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * CompanyLoanAdapter + */ + +function CompanyLoanAdapter(endPoint) { + this.initAdapter(endPoint); +} + +CompanyLoanAdapter.inherits(AdapterBase); + + + +CompanyLoanAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "details" + ]; +}); + +CompanyLoanAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Details"} + ]; +}); + +CompanyLoanAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text","validation":""}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}] + ]; +}); + +/* + * EmployeeCompanyLoanAdapter + */ + +function EmployeeCompanyLoanAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeCompanyLoanAdapter.inherits(AdapterBase); + + + +EmployeeCompanyLoanAdapter.method('getDataMapping', function() { + return [ + "id", + "employee", + "loan", + "start_date", + "period_months", + "currency", + "amount", + "status" + ]; +}); + +EmployeeCompanyLoanAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Employee" }, + { "sTitle": "Loan Type" }, + { "sTitle": "Loan Start Date"}, + { "sTitle": "Loan Period (Months)"}, + { "sTitle": "Currency"}, + { "sTitle": "Amount"}, + { "sTitle": "Status"} + ]; +}); + +EmployeeCompanyLoanAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}], + [ "loan", {"label":"Loan Type","type":"select","remote-source":["CompanyLoan","id","name"]}], + [ "start_date", {"label":"Loan Start Date","type":"date","validation":""}], + [ "last_installment_date", {"label":"Last Installment Date","type":"date","validation":"none"}], + [ "period_months", {"label":"Loan Period (Months)","type":"text","validation":"number"}], + [ "currency", {"label":"Currency","type":"select2","remote-source":["CurrencyType","id","name"]}], + [ "amount", {"label":"Loan Amount","type":"text","validation":"float"}], + [ "monthly_installment", {"label":"Monthly Installment","type":"text","validation":"float"}], + [ "status", {"label":"Status","type":"select","source":[["Approved","Approved"],["Paid","Paid"],["Suspended","Suspended"]]}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}] + ]; +}); + +EmployeeCompanyLoanAdapter.method('getFilters', function() { + return [ + [ "employee", {"label":"Employee","type":"select2","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}], + [ "loan", {"label":"Loan Type","type":"select","allow-null":true,"null-label":"All Loan Types","remote-source":["CompanyLoan","id","name"]}], + + ]; +}); diff --git a/ext/admin/loans/meta.json b/ext/admin/loans/meta.json new file mode 100644 index 00000000..b05e249e --- /dev/null +++ b/ext/admin/loans/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Company Loans", +"menu":"Admin", +"order":"7", +"icon":"fa-shield", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/meta.json b/ext/admin/meta.json new file mode 100644 index 00000000..97a79006 --- /dev/null +++ b/ext/admin/meta.json @@ -0,0 +1,7 @@ +{ +"Admin":"fa-cubes", +"Employees":"fa-users", +"Reports":"fa-file-text", +"System":"fa-cogs", +"Salary Details":"fa-money" +} diff --git a/ext/admin/metadata/api/MetadataAdminManager.php b/ext/admin/metadata/api/MetadataAdminManager.php new file mode 100644 index 00000000..de42a1b5 --- /dev/null +++ b/ext/admin/metadata/api/MetadataAdminManager.php @@ -0,0 +1,144 @@ +addModelClass('Country'); + $this->addModelClass('Province'); + $this->addModelClass('CurrencyType'); + $this->addModelClass('Nationality'); + $this->addModelClass('ImmigrationStatus'); + $this->addModelClass('Ethnicity'); + } + + } +} + +if (!class_exists('Country')) { + class Country extends ICEHRM_Record { + var $_table = 'Country'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + public function getAnonymousAccess(){ + return array("get","element"); + } + } +} + +if (!class_exists('Province')) { + class Province extends ICEHRM_Record { + var $_table = 'Province'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + public function getAnonymousAccess(){ + return array("get","element"); + } + } +} + + +if (!class_exists('CurrencyType')) { + class CurrencyType extends ICEHRM_Record { + var $_table = 'CurrencyTypes'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + public function getAnonymousAccess(){ + return array("get","element"); + } + } +} + + +if (!class_exists('Nationality')) { + class Nationality extends ICEHRM_Record { + var $_table = 'Nationality'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + public function getAnonymousAccess(){ + return array("get","element"); + } + } +} + + +if (!class_exists('ImmigrationStatus')) { + class ImmigrationStatus extends ICEHRM_Record { + var $_table = 'ImmigrationStatus'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + public function getAnonymousAccess(){ + return array("get","element"); + } + } +} + + +if (!class_exists('Ethnicity')) { + class Ethnicity extends ICEHRM_Record { + var $_table = 'Ethnicity'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + public function getAnonymousAccess(){ + return array("get","element"); + } + } +} + + + + diff --git a/ext/admin/metadata/index.php b/ext/admin/metadata/index.php new file mode 100644 index 00000000..8001d10c --- /dev/null +++ b/ext/admin/metadata/index.php @@ -0,0 +1,42 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'metadata'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; + +$moduleBuilder = new ModuleBuilder(); + +$moduleBuilder->addModuleOrGroup(new ModuleTab('Country','Country','Countries','CountryAdapter','','',true)); +$moduleBuilder->addModuleOrGroup(new ModuleTab('Province','Province','Provinces','ProvinceAdapter','','')); +$moduleBuilder->addModuleOrGroup(new ModuleTab('CurrencyType','CurrencyType','Currency Types','CurrencyTypeAdapter','','')); +$moduleBuilder->addModuleOrGroup(new ModuleTab('Nationality','Nationality','Nationality','NationalityAdapter','','')); +$moduleBuilder->addModuleOrGroup(new ModuleTab('Nationality','Nationality','Nationality','NationalityAdapter','','')); +$moduleBuilder->addModuleOrGroup(new ModuleTab('Ethnicity','Ethnicity','Ethnicity','EthnicityAdapter','','')); +$moduleBuilder->addModuleOrGroup(new ModuleTab('ImmigrationStatus','ImmigrationStatus','Immigration Status','ImmigrationStatusAdapter','','')); + + +echo UIManager::getInstance()->renderModule($moduleBuilder); + +include APP_BASE_PATH.'footer.php'; \ No newline at end of file diff --git a/ext/admin/metadata/lib.js b/ext/admin/metadata/lib.js new file mode 100644 index 00000000..c7d66274 --- /dev/null +++ b/ext/admin/metadata/lib.js @@ -0,0 +1,158 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * CountryAdapter + */ + +function CountryAdapter(endPoint) { + this.initAdapter(endPoint); +} + +CountryAdapter.inherits(AdapterBase); + + + +CountryAdapter.method('getDataMapping', function() { + return [ + "id", + "code", + "name" + ]; +}); + +CountryAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Code" }, + { "sTitle": "Name"} + ]; +}); + +CountryAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "code", {"label":"Code","type":"text","validation":""}], + [ "name", {"label":"Name","type":"text","validation":""}] + ]; +}); + + +/** + * ProvinceAdapter + */ + +function ProvinceAdapter(endPoint) { + this.initAdapter(endPoint); +} + +ProvinceAdapter.inherits(AdapterBase); + + + +ProvinceAdapter.method('getDataMapping', function() { + return [ + "id", + "code", + "name", + "country" + ]; +}); + +ProvinceAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Code" }, + { "sTitle": "Name"}, + { "sTitle": "Country"}, + ]; +}); + +ProvinceAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "code", {"label":"Code","type":"text","validation":""}], + [ "name", {"label":"Name","type":"text","validation":""}], + [ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}] + ]; +}); + +ProvinceAdapter.method('getFilters', function() { + return [ + [ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}] + + ]; +}); + + +/** + * CurrencyTypeAdapter + */ + +function CurrencyTypeAdapter(endPoint) { + this.initAdapter(endPoint); +} + +CurrencyTypeAdapter.inherits(AdapterBase); + + + +CurrencyTypeAdapter.method('getDataMapping', function() { + return [ + "id", + "code", + "name" + ]; +}); + +CurrencyTypeAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Code" }, + { "sTitle": "Name"} + ]; +}); + +CurrencyTypeAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "code", {"label":"Code","type":"text","validation":""}], + [ "name", {"label":"Name","type":"text","validation":""}] + ]; +}); + +/** + * NationalityAdapter + */ + +function NationalityAdapter(endPoint) { + this.initAdapter(endPoint); +} + +NationalityAdapter.inherits(IdNameAdapter); + +/** + * ImmigrationStatusAdapter + */ + +function ImmigrationStatusAdapter(endPoint) { + this.initAdapter(endPoint); +} + +ImmigrationStatusAdapter.inherits(IdNameAdapter); + + +/** + * EthnicityAdapter + */ + +function EthnicityAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EthnicityAdapter.inherits(IdNameAdapter); + + + diff --git a/ext/admin/metadata/meta.json b/ext/admin/metadata/meta.json new file mode 100644 index 00000000..ff24da01 --- /dev/null +++ b/ext/admin/metadata/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Manage Metadata", +"menu":"System", +"order":"6", +"icon":"fa-sort-alpha-asc", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/modules/api/ModulesAdminManager.php b/ext/admin/modules/api/ModulesAdminManager.php new file mode 100644 index 00000000..208f3190 --- /dev/null +++ b/ext/admin/modules/api/ModulesAdminManager.php @@ -0,0 +1,35 @@ +addModelClass('Module'); + } + + } +} + +if (!class_exists('Module')) { + class Module extends ICEHRM_Record { + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + var $_table = 'Modules'; + } +} \ No newline at end of file diff --git a/ext/admin/modules/index.php b/ext/admin/modules/index.php new file mode 100644 index 00000000..51aa4602 --- /dev/null +++ b/ext/admin/modules/index.php @@ -0,0 +1,54 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'Modules'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/modules/lib.js b/ext/admin/modules/lib.js new file mode 100644 index 00000000..ba70d1e8 --- /dev/null +++ b/ext/admin/modules/lib.js @@ -0,0 +1,78 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * ModuleAdapter + */ + +function ModuleAdapter(endPoint) { + this.initAdapter(endPoint); +} + +ModuleAdapter.inherits(AdapterBase); + + + +ModuleAdapter.method('getDataMapping', function() { + return [ + "id", + "label", + "menu", + "mod_group", + "mod_order", + "status", + "version", + "update_path" + ]; +}); + +ModuleAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Menu" ,"bVisible":false}, + { "sTitle": "Group"}, + { "sTitle": "Order"}, + { "sTitle": "Status"}, + { "sTitle": "Version","bVisible":false}, + { "sTitle": "Path" ,"bVisible":false} + ]; +}); + +ModuleAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "label", {"label":"Label","type":"text","validation":""}], + [ "status", {"label":"Status","type":"select","source":[["Enabled","Enabled"],["Disabled","Disabled"]]}], + [ "user_levels", {"label":"User Levels","type":"select2multi","source":[["Admin","Admin"],["Manager","Manager"],["Employee","Employee"],["Other","Other"]]}] + ]; +}); + + +ModuleAdapter.method('getActionButtonsHtml', function(id,data) { + + + var nonEditableFields = {}; + nonEditableFields["admin_Company Structure"] = 1; + nonEditableFields["admin_Employees"] = 1; + nonEditableFields["admin_Jobs"] = 1; + nonEditableFields["admin_Leaves"] = 1; + nonEditableFields["admin_Manage Modules"] = 1; + nonEditableFields["admin_Projects"] = 1; + nonEditableFields["admin_Qualifications"] = 1; + nonEditableFields["admin_Settings"] = 1; + nonEditableFields["admin_Users"] = 1; + nonEditableFields["admin_Upgrade"] = 1; + + nonEditableFields["user_Basic Information"] = 1; + + if(nonEditableFields[data[3]+"_"+data[1]] == 1){ + return ""; + } + var html = '
'; + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); diff --git a/ext/admin/modules/meta.json b/ext/admin/modules/meta.json new file mode 100644 index 00000000..517e2109 --- /dev/null +++ b/ext/admin/modules/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Manage Modules", +"menu":"System", +"order":"3", +"icon":"fa-folder-open", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/permissions/api/PermissionsAdminManager.php b/ext/admin/permissions/api/PermissionsAdminManager.php new file mode 100644 index 00000000..09f664bb --- /dev/null +++ b/ext/admin/permissions/api/PermissionsAdminManager.php @@ -0,0 +1,37 @@ +addModelClass('Permission'); + } + + } +} + +if (!class_exists('Permission')) { + class Permission extends ICEHRM_Record { + var $_table = 'Permissions'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + } +} \ No newline at end of file diff --git a/ext/admin/permissions/index.php b/ext/admin/permissions/index.php new file mode 100644 index 00000000..f960f4c3 --- /dev/null +++ b/ext/admin/permissions/index.php @@ -0,0 +1,54 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'Permissions'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/permissions/lib.js b/ext/admin/permissions/lib.js new file mode 100644 index 00000000..52b8c048 --- /dev/null +++ b/ext/admin/permissions/lib.js @@ -0,0 +1,73 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * PermissionAdapter + */ + +function PermissionAdapter(endPoint) { + this.initAdapter(endPoint); +} + +PermissionAdapter.inherits(AdapterBase); + + + +PermissionAdapter.method('getDataMapping', function() { + return [ + "id", + "user_level", + "module_id", + "permission", + "value" + ]; +}); + +PermissionAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "User Level" }, + { "sTitle": "Module"}, + { "sTitle": "Permission"}, + { "sTitle": "Value"} + ]; +}); + +PermissionAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "user_level", {"label":"User Level","type":"placeholder","validation":"none"}], + [ "module_id", {"label":"Module","type":"placeholder","remote-source":["Module","id","menu+name"]}], + [ "permission", {"label":"Permission","type":"placeholder","validation":"none"}], + [ "value", {"label":"Value","type":"text","validation":"none"}] + ]; +}); + +PermissionAdapter.method('getFilters', function() { + return [ + [ "module_id", {"label":"Module","type":"select2","allow-null":true,"null-label":"All Modules","remote-source":["Module","id","menu+name"]}] + ]; +}); + +PermissionAdapter.method('getActionButtonsHtml', function(id,data) { + var html = '
'; + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); + + +PermissionAdapter.method('getMetaFieldForRendering', function(fieldName) { + if(fieldName == "value"){ + return "meta"; + } + return ""; +}); + + +PermissionAdapter.method('fillForm', function(object) { + this.uber('fillForm',object); + $("#helptext").html(object.description); +}); diff --git a/ext/admin/permissions/meta.json b/ext/admin/permissions/meta.json new file mode 100644 index 00000000..a33dca1c --- /dev/null +++ b/ext/admin/permissions/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Manage Permissions", +"menu":"System", +"order":"4", +"icon":"fa-unlock", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/projects/api/ProjectsAdminManager.php b/ext/admin/projects/api/ProjectsAdminManager.php new file mode 100644 index 00000000..72dad203 --- /dev/null +++ b/ext/admin/projects/api/ProjectsAdminManager.php @@ -0,0 +1,60 @@ +addDatabaseErrorMapping("key 'EmployeeProjectsKey'", "Employee already added to this project"); + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('Client'); + $this->addModelClass('Project'); + + } + + } +} + + +if (!class_exists('Client')) { + class Client extends ICEHRM_Record { + var $_table = 'Clients'; + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } +} + +if (!class_exists('Project')) { + class Project extends ICEHRM_Record { + var $_table = 'Projects'; + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get","element"); + } + } +} \ No newline at end of file diff --git a/ext/admin/projects/index.php b/ext/admin/projects/index.php new file mode 100644 index 00000000..9d7db1d5 --- /dev/null +++ b/ext/admin/projects/index.php @@ -0,0 +1,113 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'projects'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/projects/lib.js b/ext/admin/projects/lib.js new file mode 100644 index 00000000..fd6ae476 --- /dev/null +++ b/ext/admin/projects/lib.js @@ -0,0 +1,177 @@ +/** + * Author: Thilina Hasantha + */ + +/** + * ClientAdapter + */ + +function ClientAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +ClientAdapter.inherits(AdapterBase); + + + +ClientAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "details", + "address", + "contact_number" + ]; +}); + +ClientAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID","bVisible":false }, + { "sTitle": "Name" }, + { "sTitle": "Details"}, + { "sTitle": "Address"}, + { "sTitle": "Contact Number"} + ]; +}); + +ClientAdapter.method('getFormFields', function() { + if(this.showSave){ + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text"}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}], + [ "address", {"label":"Address","type":"textarea","validation":"none"}], + [ "contact_number", {"label":"Contact Number","type":"text","validation":"none"}], + [ "contact_email", {"label":"Contact Email","type":"text","validation":"none"}], + [ "company_url", {"label":"Company Url","type":"text","validation":"none"}], + [ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"]]}], + [ "first_contact_date", {"label":"First Contact Date","type":"date","validation":"none"}] + ]; + }else{ + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"placeholder"}], + [ "details", {"label":"Details","type":"placeholder","validation":"none"}], + [ "address", {"label":"Address","type":"placeholder","validation":"none"}], + [ "contact_number", {"label":"Contact Number","type":"placeholder","validation":"none"}], + [ "contact_email", {"label":"Contact Email","type":"placeholder","validation":"none"}], + [ "company_url", {"label":"Company Url","type":"placeholder","validation":"none"}], + [ "status", {"label":"Status","type":"placeholder","source":[["Active","Active"],["Inactive","Inactive"]]}], + [ "first_contact_date", {"label":"First Contact Date","type":"placeholder","validation":"none"}] + ]; + } +}); + +ClientAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=85'; +}); + +/** + * ProjectAdapter + */ + +function ProjectAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +ProjectAdapter.inherits(AdapterBase); + + + +ProjectAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "client" + ]; +}); + +ProjectAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID","bVisible":false }, + { "sTitle": "Name" }, + { "sTitle": "Client"}, + ]; +}); + +ProjectAdapter.method('getFormFields', function() { + if(this.showSave){ + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text"}], + [ "client", {"label":"Client","type":"select2","allow-null":true,"remote-source":["Client","id","name"]}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}], + [ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"]]}] + ]; + }else{ + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"placeholder"}], + [ "client", {"label":"Client","type":"placeholder","allow-null":true,"remote-source":["Client","id","name"]}], + [ "details", {"label":"Details","type":"placeholder","validation":"none"}], + [ "status", {"label":"Status","type":"placeholder","source":[["Active","Active"],["Inactive","Inactive"]]}] + ]; + } + +}); + +ProjectAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=85'; +}); + + +/* + * EmployeeProjectAdapter + */ + + +function EmployeeProjectAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeProjectAdapter.inherits(AdapterBase); + + + +EmployeeProjectAdapter.method('getDataMapping', function() { + return [ + "id", + "employee", + "project", + "status" + ]; +}); + +EmployeeProjectAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Employee" }, + { "sTitle": "Project" }, + /*{ "sTitle": "Start Date"},*/ + { "sTitle": "Status"} + ]; +}); + +EmployeeProjectAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}], + [ "project", {"label":"Project","type":"select2","remote-source":["Project","id","name"]}], + /*[ "date_start", {"label":"Start Date","type":"date","validation":""}], + [ "date_end", {"label":"End Date","type":"date","validation":"none"}],*/ + [ "status", {"label":"Status","type":"select","source":[["Current","Current"],["Inactive","Inactive"],["Completed","Completed"]]}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}] + ]; +}); + +EmployeeProjectAdapter.method('getFilters', function() { + return [ + [ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}] + + ]; +}); + +EmployeeProjectAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=85'; +}); + diff --git a/ext/admin/projects/meta.json b/ext/admin/projects/meta.json new file mode 100644 index 00000000..3a566411 --- /dev/null +++ b/ext/admin/projects/meta.json @@ -0,0 +1,19 @@ +{ +"label":"Projects/Client Setup", +"menu":"Admin", +"order":"5", +"icon":"fa-list-alt", +"user_levels":["Admin","Manager"], + +"permissions": + { + "Manager":{ + "Add Projects":"Yes", + "Edit Projects":"Yes", + "Delete Projects":"No", + "Add Clients":"Yes", + "Edit Clients":"Yes", + "Delete Clients":"No" + } + } +} \ No newline at end of file diff --git a/ext/admin/qualifications/api/QualificationsAdminManager.php b/ext/admin/qualifications/api/QualificationsAdminManager.php new file mode 100644 index 00000000..f141a999 --- /dev/null +++ b/ext/admin/qualifications/api/QualificationsAdminManager.php @@ -0,0 +1,95 @@ +addModelClass('Skill'); + $this->addModelClass('Education'); + $this->addModelClass('Certification'); + $this->addModelClass('Language'); + + + } + } +} + + +if (!class_exists('Skill')) { + class Skill extends ICEHRM_Record { + var $_table = 'Skills'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } + + class Education extends ICEHRM_Record { + var $_table = 'Educations'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } + + class Certification extends ICEHRM_Record { + var $_table = 'Certifications'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } + + class Language extends ICEHRM_Record { + var $_table = 'Languages'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + } + +} diff --git a/ext/admin/qualifications/index.php b/ext/admin/qualifications/index.php new file mode 100644 index 00000000..5bdc338f --- /dev/null +++ b/ext/admin/qualifications/index.php @@ -0,0 +1,127 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'company_structure'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/qualifications/lib.js b/ext/admin/qualifications/lib.js new file mode 100644 index 00000000..7e0ef265 --- /dev/null +++ b/ext/admin/qualifications/lib.js @@ -0,0 +1,161 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * SkillAdapter + */ + +function SkillAdapter(endPoint) { + this.initAdapter(endPoint); +} + +SkillAdapter.inherits(AdapterBase); + + + +SkillAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "description" + ]; +}); + +SkillAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID","bVisible":false }, + { "sTitle": "Name" }, + { "sTitle": "Description"} + ]; +}); + +SkillAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text"}], + [ "description", {"label":"Description","type":"textarea","validation":""}] + ]; +}); + +SkillAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=83'; +}); + + + +/** + * EducationAdapter + */ + +function EducationAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EducationAdapter.inherits(AdapterBase); + + + +EducationAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "description" + ]; +}); + +EducationAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID","bVisible":false }, + { "sTitle": "Name" }, + { "sTitle": "Description"} + ]; +}); + +EducationAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text"}], + [ "description", {"label":"Description","type":"textarea","validation":""}] + ]; +}); + + + + + +/** + * CertificationAdapter + */ + +function CertificationAdapter(endPoint) { + this.initAdapter(endPoint); +} + +CertificationAdapter.inherits(AdapterBase); + + + +CertificationAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "description" + ]; +}); + +CertificationAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Description"} + ]; +}); + +CertificationAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text"}], + [ "description", {"label":"Description","type":"textarea","validation":""}] + ]; +}); + + + +/** + * LanguageAdapter + */ + +function LanguageAdapter(endPoint) { + this.initAdapter(endPoint); +} + +LanguageAdapter.inherits(AdapterBase); + + + +LanguageAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "description" + ]; +}); + +LanguageAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Description"} + ]; +}); + +LanguageAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text"}], + [ "description", {"label":"Description","type":"textarea","validation":""}] + ]; +}); + diff --git a/ext/admin/qualifications/meta.json b/ext/admin/qualifications/meta.json new file mode 100644 index 00000000..47ef334e --- /dev/null +++ b/ext/admin/qualifications/meta.json @@ -0,0 +1,26 @@ +{ +"label":"Qualifications Setup", +"menu":"Admin", +"order":"4", +"icon":"fa-check-square-o", + +"user_levels":["Admin","Manager"], + +"permissions": + { + "Manager":{ + "Add Skills":"Yes", + "Edit Skills":"Yes", + "Delete Skills":"No", + "Add Education":"Yes", + "Edit Education":"Yes", + "Delete Education":"No", + "Add Certifications":"Yes", + "Edit Certifications":"Yes", + "Delete Certifications":"No", + "Add Languages":"Yes", + "Edit Languages":"Yes", + "Delete Languages":"No" + } + } +} \ No newline at end of file diff --git a/ext/admin/reports/api/ReportsAdminManager.php b/ext/admin/reports/api/ReportsAdminManager.php new file mode 100644 index 00000000..35d6a98a --- /dev/null +++ b/ext/admin/reports/api/ReportsAdminManager.php @@ -0,0 +1,23 @@ +
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/reports/lib.js b/ext/admin/reports/lib.js new file mode 100644 index 00000000..94ac4ec5 --- /dev/null +++ b/ext/admin/reports/lib.js @@ -0,0 +1,167 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * ReportAdapter + */ + +function ReportAdapter(endPoint) { + this.initAdapter(endPoint); + this._formFileds = [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"label","validation":""}], + [ "parameters", {"label":"Parameters","type":"fieldset","validation":"none"}] + ]; +} + +ReportAdapter.inherits(AdapterBase); + +ReportAdapter.method('_initLocalFormFields', function() { + this._formFileds = [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"label","validation":""}], + [ "parameters", {"label":"Parameters","type":"fieldset","validation":"none"}] + ]; +}); + +ReportAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "details", + "parameters" + ]; +}); + +ReportAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Details"}, + { "sTitle": "Parameters","bVisible":false}, + ]; +}); + +ReportAdapter.method('getFormFields', function() { + return this._formFileds; +}); + +ReportAdapter.method('processFormFieldsWithObject', function(object) { + var that = this; + this._initLocalFormFields(); + var len = this._formFileds.length; + var fieldIDsToDelete = []; + var fieldsToDelete = []; + for(var i=0;iDownload Report '; + //this.showMessage("Download Report",link); + + var fileName = serverData[0]; + var link; + + if(fileName.indexOf("https:") == 0){ + link = 'Download Report '; + }else{ + link = 'Download Report '; + } + link = link.replace(/_BASE_/g,this.baseUrl); + + var tableHtml = link+'

'; + + //Delete existing temp report table + $("#tempReportTable").remove(); + + //this.showMessage("Report",tableHtml); + + $("#Report").html(tableHtml); + $("#Report").show(); + $("#ReportForm").hide(); + + //Prepare headers + var headers = []; + for(title in serverData[1]){ + headers.push({ "sTitle": serverData[1][title]}); + } + + var data = serverData[2]; + + + var dataTableParams = { + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + }, + "aaData": data, + "aoColumns": headers, + "bSort": false, + "iDisplayLength": 15, + "iDisplayStart": 0 + }; + + $("#tempReportTable").dataTable( dataTableParams ); + + $(".dataTables_paginate ul").addClass("pagination"); + $(".dataTables_length").hide(); + $(".dataTables_filter input").addClass("form-control"); + $(".dataTables_filter input").attr("placeholder","Search"); + $(".dataTables_filter label").contents().filter(function(){ + return (this.nodeType == 3); + }).remove(); + $('.tableActionButton').tooltip(); +}); + + +ReportAdapter.method('fillForm', function(object) { + var fields = this.getFormFields(); + for(var i=0;igetChildCompanyStuctures($request['department']); + $query = "where department in (".implode(",",$depts).") and (((termination_date = '0001-01-01 00:00:00' or termination_date = '0000-00-00 00:00:00') and joined_date < NOW()) or (termination_date > NOW() and joined_date < NOW()))"; + } + + + return array($query, $params); + } + + public function getChildCompanyStuctures($companyStructId){ + $childIds = array(); + $childIds[] = $companyStructId; + $nodeIdsAtLastLevel = $childIds; + $count = 0; + do{ + $count++; + $companyStructTemp = new CompanyStructure(); + if(empty($nodeIdsAtLastLevel) || empty($childIds)){ + break; + } + $idQuery = "parent in (".implode(",",$nodeIdsAtLastLevel).") and id not in(".implode(",",$childIds).")"; + LogManager::getInstance()->debug($idQuery); + $list = $companyStructTemp->Find($idQuery, array()); + if(!$list){ + LogManager::getInstance()->debug($companyStructTemp->ErrorMsg()); + } + $nodeIdsAtLastLevel = array(); + foreach($list as $item){ + $childIds[] = $item->id; + $nodeIdsAtLastLevel[] = $item->id; + } + }while(count($list) > 0 && $count < 10); + + return $childIds; + } + + + +} \ No newline at end of file diff --git a/ext/admin/reports/reportClasses/EmployeeAttendanceReport.php b/ext/admin/reports/reportClasses/EmployeeAttendanceReport.php new file mode 100644 index 00000000..df69c214 --- /dev/null +++ b/ext/admin/reports/reportClasses/EmployeeAttendanceReport.php @@ -0,0 +1,50 @@ += ? and out_time <= ? order by in_time desc;"; + $params = array( + $request['date_start']." 00:00:00", + $request['date_end']." 23:59:59", + ); + }else{ + $query = "where in_time >= ? and out_time <= ? order by in_time desc;"; + $params = array( + $request['date_start']." 00:00:00", + $request['date_end']." 23:59:59", + ); + } + + LogManager::getInstance()->info("Query:".$query); + LogManager::getInstance()->info("Params:".json_encode($params)); + + return array($query, $params); + } +} \ No newline at end of file diff --git a/ext/admin/reports/reportClasses/EmployeeLeavesReport.php b/ext/admin/reports/reportClasses/EmployeeLeavesReport.php new file mode 100644 index 00000000..fa33924b --- /dev/null +++ b/ext/admin/reports/reportClasses/EmployeeLeavesReport.php @@ -0,0 +1,70 @@ += ? and date_end <= ? and status = ?;"; + $params = array( + $request['date_start'], + $request['date_end'], + $request['status'] + ); + }else if(!empty($employeeList)){ + $query = "where employee in (".implode(",", $employeeList).") and date_start >= ? and date_end <= ?;"; + $params = array( + $request['date_start'], + $request['date_end'] + ); + }else if(($request['status'] != "NULL" && !empty($request['status']))){ + $query = "where status = ? and date_start >= ? and date_end <= ?;"; + $params = array( + $request['status'], + $request['date_start'], + $request['date_end'] + ); + }else{ + $query = "where date_start >= ? and date_end <= ?;"; + $params = array( + $request['date_start'], + $request['date_end'] + ); + } + + LogManager::getInstance()->info("Query:".$query); + LogManager::getInstance()->info("Params:".json_encode($params)); + + return array($query, $params); + } +} \ No newline at end of file diff --git a/ext/admin/reports/reportClasses/EmployeeTimeTrackReport.php b/ext/admin/reports/reportClasses/EmployeeTimeTrackReport.php new file mode 100644 index 00000000..07b9785f --- /dev/null +++ b/ext/admin/reports/reportClasses/EmployeeTimeTrackReport.php @@ -0,0 +1,104 @@ +info(json_encode($report)); + LogManager::getInstance()->info(json_encode($req)); + + $employeeTimeEntry = new EmployeeTimeEntry(); + + $timeEntryList = $employeeTimeEntry->Find("employee = ? and date(date_start) >= ? and date(date_end) <= ?",array($req['employee'], $req['date_start'], $req['date_end'])); + + + $seconds = 0; + $graphTimeArray = array(); + foreach($timeEntryList as $entry){ + $seconds = (strtotime($entry->date_end) - strtotime($entry->date_start)); + $key = date("Y-m-d",strtotime($entry->date_end)); + if(isset($graphTimeArray[$key])){ + $graphTimeArray[$key] += $seconds; + }else{ + $graphTimeArray[$key] = $seconds; + } + } + + //$minutes = (int)($seconds/60); + + + //Find Attendance Entries + + $attendance = new Attendance(); + $atteandanceList = $attendance->Find("employee = ? and date(in_time) >= ? and date(out_time) <= ? and in_time < out_time",array($req['employee'], $req['date_start'], $req['date_end'])); + + $seconds = 0; + $graphAttendanceArray = array(); + $firstTimeInArray = array(); + $lastTimeOutArray = array(); + foreach($atteandanceList as $entry){ + $seconds = (strtotime($entry->out_time) - strtotime($entry->in_time)); + $key = date("Y-m-d",strtotime($entry->in_time)); + if(isset($graphAttendanceArray[$key])){ + $graphAttendanceArray[$key] += $seconds; + $lastTimeOutArray[$key] = $entry->out_time; + }else{ + $graphAttendanceArray[$key] = $seconds; + $firstTimeInArray[$key] = $entry->in_time; + $lastTimeOutArray[$key] = $entry->out_time; + } + } + + + ///////////////////////////////////////// + + $employeeObject = new Employee(); + $employeeObject->Load("id = ?",array($req['employee'])); + + + $reportData = array(); + //$reportData[] = array($employeeObject->first_name." ".$employeeObject->last_name,"","","",""); + $reportData[] = array("Date","First Punch-In Time","Last Punch-Out Time","Time in Office","Time in Timesheets"); + + + //Iterate date range + + $interval = DateInterval::createFromDateString('1 day'); + $period = new DatePeriod(new DateTime($req['date_start']), $interval, new DateTime($req['date_end'])); + + foreach ( $period as $dt ){ + $dataRow = array(); + $key = $dt->format("Y-m-d"); + + $dataRow[] = $key; + + if(isset($firstTimeInArray[$key])){ + $dataRow[] = $firstTimeInArray[$key]; + }else{ + $dataRow[] = "Not Found"; + } + + if(isset($lastTimeOutArray[$key])){ + $dataRow[] = $lastTimeOutArray[$key]; + }else{ + $dataRow[] = "Not Found"; + } + + if(isset($graphAttendanceArray[$key])){ + $dataRow[] = round(($graphAttendanceArray[$key]/3600),2); + }else{ + $dataRow[] = 0; + } + + if(isset($graphTimeArray[$key])){ + $dataRow[] = round(($graphTimeArray[$key]/3600),2); + }else{ + $dataRow[] = 0; + } + + $reportData[] = $dataRow; + } + return $reportData; + } +} \ No newline at end of file diff --git a/ext/admin/reports/reportClasses/EmployeeTimesheetReport.php b/ext/admin/reports/reportClasses/EmployeeTimesheetReport.php new file mode 100644 index 00000000..40751a4e --- /dev/null +++ b/ext/admin/reports/reportClasses/EmployeeTimesheetReport.php @@ -0,0 +1,66 @@ += ? and date_end <= ? and project = ?;"; + $params = array( + $request['date_start'], + $request['date_end'], + $request['project'] + ); + }else if(!empty($employeeList)){ + $query = "where employee in (".implode(",", $employeeList).") and date_start >= ? and date_end <= ?;"; + $params = array( + $request['date_start'], + $request['date_end'] + ); + }else if(($request['project'] != "NULL" && !empty($request['project']))){ + $query = "where project = ? and date_start >= ? and date_end <= ?;"; + $params = array( + $request['project'], + $request['date_start'], + $request['date_end'] + ); + }else{ + $query = "where date_start >= ? and date_end <= ?;"; + $params = array( + $request['date_start'], + $request['date_end'] + ); + } + + LogManager::getInstance()->info("Query:".$query); + LogManager::getInstance()->info("Params:".json_encode($params)); + + return array($query, $params); + } +} \ No newline at end of file diff --git a/ext/admin/reports/reportClasses/NewHiresEmployeeReport.php b/ext/admin/reports/reportClasses/NewHiresEmployeeReport.php new file mode 100644 index 00000000..57dab491 --- /dev/null +++ b/ext/admin/reports/reportClasses/NewHiresEmployeeReport.php @@ -0,0 +1,34 @@ +getChildCompanyStuctures($request['department']); + $query.="department in(".implode(",",$depts).") and "; + } + + if(empty($request['date_start']) || $request['date_start'] == "NULL"){ + $request['date_start'] = date("Y-m-d 00:00:00"); + } + + if(empty($request['date_end']) || $request['date_end'] == "NULL"){ + $request['date_end'] = date("Y-m-d 23:59:59"); + } + + $query.="joined_date >= ? "; + $params[] = $request['date_start']." 00:00:00"; + + + + $query.="and joined_date <= ? "; + $params[] = $request['date_end']." 23:59:59"; + + return array($query, $params); + } +} \ No newline at end of file diff --git a/ext/admin/reports/reportClasses/ReportBuilder.php b/ext/admin/reports/reportClasses/ReportBuilder.php new file mode 100644 index 00000000..47292867 --- /dev/null +++ b/ext/admin/reports/reportClasses/ReportBuilder.php @@ -0,0 +1,57 @@ +getMainQuery(); + $where = $this->getWhereQuery($request); + $query.=" ".$where[0]; + return $this->execute($report, $query, $where[1]); + } + + protected function execute($report, $query, $parameters){ + $report->DB()->SetFetchMode(ADODB_FETCH_ASSOC); + LogManager::getInstance()->debug("Query: ".$query); + LogManager::getInstance()->debug("Parameters: ".json_encode($parameters)); + $rs = $report->DB()->Execute($query,$parameters); + if(!$rs){ + LogManager::getInstance()->info($report->DB()->ErrorMsg()); + return array("ERROR","Error generating report"); + } + + $reportNamesFilled = false; + $columnNames = array(); + $reportData = array(); + foreach ($rs as $rowId => $row) { + $reportData[] = array(); + if(!$reportNamesFilled){ + $countIt = 0; + foreach ($row as $name=> $value){ + $countIt++; + $columnNames[$countIt] = $name; + $reportData[count($reportData)-1][] = $value; + } + $reportNamesFilled = true; + }else{ + foreach ($row as $name=> $value){ + $reportData[count($reportData)-1][] = $this->transformData($name, $value); + } + } + } + + + array_unshift($reportData,$columnNames); + + return $reportData; + } + + abstract public function getWhereQuery($request); + + abstract public function getMainQuery(); + + public function transformData($name, $value){ + return $value; + } +} \ No newline at end of file diff --git a/ext/admin/reports/reportClasses/ReportBuilderInterface.php b/ext/admin/reports/reportClasses/ReportBuilderInterface.php new file mode 100644 index 00000000..474469a1 --- /dev/null +++ b/ext/admin/reports/reportClasses/ReportBuilderInterface.php @@ -0,0 +1,4 @@ +getChildCompanyStuctures($request['department']); + $query.="department in(".implode(",",$depts).") and "; + } + + if(empty($request['date_start']) || $request['date_start'] == "NULL"){ + $request['date_start'] = date("Y-m-d 00:00:00"); + } + + if(empty($request['date_end']) || $request['date_end'] == "NULL"){ + $request['date_end'] = date("Y-m-d 23:59:59"); + } + + $query.="termination_date >= ? "; + $params[] = $request['date_start']." 00:00:00"; + + + + $query.="and termination_date <= ? "; + $params[] = $request['date_end']." 23:59:59"; + + return array($query, $params); + } +} \ No newline at end of file diff --git a/ext/admin/reports/scripts/reports.sql b/ext/admin/reports/scripts/reports.sql new file mode 100644 index 00000000..579c62ed --- /dev/null +++ b/ext/admin/reports/scripts/reports.sql @@ -0,0 +1,18 @@ +INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES +('Active Employee Report', 'This report list employees who are currently active based on joined date and termination date ', +'[\r\n[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}]\r\n]', + 'ActiveEmployeeReport', + '["department"]', 'Class'); + + +INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES +('New Hires Employee Report', 'This report list employees who are joined between given two dates ', +'[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'NewHiresEmployeeReport', + '["department","date_start","date_end"]', 'Class'); + +INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES +('Terminated Employee Report', 'This report list employees who are terminated between given two dates ', +'[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'TerminatedEmployeeReport', + '["department","date_start","date_end"]', 'Class'); \ No newline at end of file diff --git a/ext/admin/reports/templates/fields/label.html b/ext/admin/reports/templates/fields/label.html new file mode 100644 index 00000000..1b7a7480 --- /dev/null +++ b/ext/admin/reports/templates/fields/label.html @@ -0,0 +1,6 @@ +
+
+ +
+
+
\ No newline at end of file diff --git a/ext/admin/reports/templates/form_template.html b/ext/admin/reports/templates/form_template.html new file mode 100644 index 00000000..5896e827 --- /dev/null +++ b/ext/admin/reports/templates/form_template.html @@ -0,0 +1,14 @@ +
+
+
+ +
+
+ _fields_ +
+
+ + +
+
+
\ No newline at end of file diff --git a/ext/admin/settings/api/SettingsAdminManager.php b/ext/admin/settings/api/SettingsAdminManager.php new file mode 100644 index 00000000..4d16ac85 --- /dev/null +++ b/ext/admin/settings/api/SettingsAdminManager.php @@ -0,0 +1,23 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +class SettingsInitialize extends AbstractInitialize{ + + public function init(){ + if(SettingsManager::getInstance()->getSetting("Api: REST Api Enabled") == "1"){ + $user = BaseService::getInstance()->getCurrentUser(); + $dbUser = new User(); + $dbUser->Load("id = ?",array($user->id)); + $resp = RestApiManager::getInstance()->getAccessTokenForUser($dbUser); + if($resp->getStatus() != IceResponse::SUCCESS){ + LogManager::getInstance()->error("Error occured while creating REST Api acces token for ".$user->username); + } + } + + } + +} \ No newline at end of file diff --git a/ext/admin/settings/index.php b/ext/admin/settings/index.php new file mode 100644 index 00000000..85fea88e --- /dev/null +++ b/ext/admin/settings/index.php @@ -0,0 +1,55 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'settings'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/settings/lib.js b/ext/admin/settings/lib.js new file mode 100644 index 00000000..0098525a --- /dev/null +++ b/ext/admin/settings/lib.js @@ -0,0 +1,67 @@ +/** + * Author: Thilina Hasantha + */ + + +/** + * SettingAdapter + */ + +function SettingAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +SettingAdapter.inherits(AdapterBase); + + + +SettingAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "value", + "description" + ]; +}); + +SettingAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Value"}, + { "sTitle": "Details"} + ]; +}); + +SettingAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "value", {"label":"Value","type":"text","validation":"none"}] + ]; +}); + +SettingAdapter.method('getActionButtonsHtml', function(id,data) { + var html = '
'; + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); + + +SettingAdapter.method('getMetaFieldForRendering', function(fieldName) { + if(fieldName == "value"){ + return "meta"; + } + return ""; +}); + + +SettingAdapter.method('fillForm', function(object) { + this.uber('fillForm',object); + $("#helptext").html(object.description); +}); + + +SettingAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=126'; +}); \ No newline at end of file diff --git a/ext/admin/settings/meta.json b/ext/admin/settings/meta.json new file mode 100644 index 00000000..1cb09f75 --- /dev/null +++ b/ext/admin/settings/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Settings", +"menu":"System", +"order":"1", +"icon":"fa-cogs", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/settings/templates/form_template.html b/ext/admin/settings/templates/form_template.html new file mode 100644 index 00000000..f1a029df --- /dev/null +++ b/ext/admin/settings/templates/form_template.html @@ -0,0 +1,16 @@ +
+
+
+ +
+
+ _fields_ +
+
+
+
+ + +
+
+
\ No newline at end of file diff --git a/ext/admin/users/api/UsersActionManager.php b/ext/admin/users/api/UsersActionManager.php new file mode 100644 index 00000000..18123bb1 --- /dev/null +++ b/ext/admin/users/api/UsersActionManager.php @@ -0,0 +1,100 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +class UsersActionManager extends SubActionManager{ + public function changePassword($req){ + if($this->user->user_level == 'Admin' || $this->user->id == $req->id){ + $user = $this->baseService->getElement('User',$req->id); + if(empty($user->id)){ + return new IceResponse(IceResponse::ERROR,"Please save the user first"); + } + $user->password = md5($req->pwd); + $ok = $user->Save(); + if(!$ok){ + return new IceResponse(IceResponse::ERROR,$user->ErrorMsg()); + } + return new IceResponse(IceResponse::SUCCESS,$user); + } + return new IceResponse(IceResponse::ERROR); + } + + public function saveUser($req){ + if($this->user->user_level == 'Admin'){ + + $user = new User(); + $user->Load("email = ?",array($req->email)); + + if($user->email == $req->email){ + return new IceResponse(IceResponse::ERROR,"User with same email already exists"); + } + + $user->Load("username = ?",array($req->username)); + + if($user->username == $req->username){ + return new IceResponse(IceResponse::ERROR,"User with same username already exists"); + } + + $user = new User(); + $user->email = $req->email; + $user->username = $req->username; + $password = $this->generateRandomString(6); + $user->password = md5($password); + $user->employee = (empty($req->employee) || $req->employee == "NULL" )?NULL:$req->employee; + $user->user_level = $req->user_level; + $user->last_login = date("Y-m-d H:i:s"); + $user->last_update = date("Y-m-d H:i:s"); + $user->created = date("Y-m-d H:i:s"); + + $employee = null; + if(!empty($user->employee)){ + $employee = $this->baseService->getElement('Employee',$user->employee,null,true); + } + + $ok = $user->Save(); + if(!$ok){ + LogManager::getInstance()->info($user->ErrorMsg()."|".json_encode($user)); + return new IceResponse(IceResponse::ERROR,"Error occured while saving the user"); + } + $user->password = ""; + $user = $this->baseService->cleanUpAdoDB($user); + + if(!empty($this->emailSender)){ + $usersEmailSender = new UsersEmailSender($this->emailSender, $this); + $usersEmailSender->sendWelcomeUserEmail($user, $password, $employee); + } + return new IceResponse(IceResponse::SUCCESS,$user); + } + return new IceResponse(IceResponse::ERROR, "Not Allowed"); + } + + + private function generateRandomString($length = 10) { + $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $charactersLength = strlen($characters); + $randomString = ''; + for ($i = 0; $i < $length; $i++) { + $randomString .= $characters[rand(0, $charactersLength - 1)]; + } + return $randomString; + } +} \ No newline at end of file diff --git a/ext/admin/users/api/UsersAdminManager.php b/ext/admin/users/api/UsersAdminManager.php new file mode 100644 index 00000000..768df568 --- /dev/null +++ b/ext/admin/users/api/UsersAdminManager.php @@ -0,0 +1,56 @@ +addModelClass('User'); + } + + } +} + +if (!class_exists('User')) { + class User extends ICEHRM_Record { + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array(); + } + + + public function validateSave($obj){ + $userTemp = new User(); + + if(empty($obj->id)){ + $users = $userTemp->Find("email = ?",array($obj->email)); + if(count($users) > 0){ + return new IceResponse(IceResponse::ERROR,"A user with same authentication email already exist"); + } + }else{ + $users = $userTemp->Find("email = ? and id <> ?",array($obj->email, $obj->id)); + if(count($users) > 0){ + return new IceResponse(IceResponse::ERROR,"A user with same authentication email already exist"); + } + } + + return new IceResponse(IceResponse::SUCCESS,""); + } + + var $_table = 'Users'; + } +} \ No newline at end of file diff --git a/ext/admin/users/api/UsersEmailSender.php b/ext/admin/users/api/UsersEmailSender.php new file mode 100644 index 00000000..9c932acf --- /dev/null +++ b/ext/admin/users/api/UsersEmailSender.php @@ -0,0 +1,46 @@ +emailSender = $emailSender; + $this->subActionManager = $subActionManager; + } + + public function sendWelcomeUserEmail($user, $password, $employee = NULL){ + + $params = array(); + if(!empty($employee)){ + $params['name'] = $employee->first_name." ".$employee->last_name; + }else{ + $params['name'] = $user->username; + } + $params['url'] = CLIENT_BASE_URL; + $params['password'] = $password; + $params['email'] = $user->email; + $params['username'] = $user->username; + + $email = $this->subActionManager->getEmailTemplate('welcomeUser.html'); + + + $emailTo = null; + if(!empty($user)){ + $emailTo = $user->email; + } + + + + if(!empty($emailTo)){ + if(!empty($this->emailSender)){ + LogManager::getInstance()->info("[sendWelcomeUserEmail] sending email to $emailTo : ".$email); + $this->emailSender->sendEmail("Your IceHrm account is ready",$emailTo,$email,$params); + } + }else{ + LogManager::getInstance()->info("[sendWelcomeUserEmail] email is empty"); + } + + } + +} \ No newline at end of file diff --git a/ext/admin/users/emailTemplates/welcomeUser.html b/ext/admin/users/emailTemplates/welcomeUser.html new file mode 100644 index 00000000..d67217b9 --- /dev/null +++ b/ext/admin/users/emailTemplates/welcomeUser.html @@ -0,0 +1,17 @@ +Dear #_name_#,

+Your account in IceHrm has been created on #_url_#

+ +Please find your account information below:

+Username: #_username_#
+Email: #_email_# (You can use, username or email to login)
+Password: #_password_# (Strongly advised to change this password once logged in)
+
+ + +To get started, follow this link: #_url_#

+ + +THIS IS AN AUTOMATED EMAIL - REPLIES WILL BE SENT TO #_adminEmail_# + +
+
\ No newline at end of file diff --git a/ext/admin/users/index.php b/ext/admin/users/index.php new file mode 100644 index 00000000..3f6d57bf --- /dev/null +++ b/ext/admin/users/index.php @@ -0,0 +1,57 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'users'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; + +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/admin/users/lib.js b/ext/admin/users/lib.js new file mode 100644 index 00000000..aaa08749 --- /dev/null +++ b/ext/admin/users/lib.js @@ -0,0 +1,162 @@ +/** + * Author: Thilina Hasantha + */ + +function UserAdapter(endPoint) { + this.initAdapter(endPoint); +} + +UserAdapter.inherits(AdapterBase); + + +UserAdapter.method('getDataMapping', function() { + return [ + "id", + "username", + "email", + "employee", + "user_level" + ]; +}); + +UserAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" }, + { "sTitle": "User Name" }, + { "sTitle": "Authentication Email" }, + { "sTitle": "Employee"}, + { "sTitle": "User Level"} + ]; +}); + +UserAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden","validation":""}], + [ "username", {"label":"User Name","type":"text","validation":"username"}], + [ "email", {"label":"Email","type":"text","validation":"email"}], + [ "employee", {"label":"Employee","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}], + [ "user_level", {"label":"User Level","type":"select","source":[["Admin","Admin"],["Manager","Manager"],["Employee","Employee"]]}] + ]; +}); + +UserAdapter.method('postRenderForm', function(object, $tempDomObj) { + if(object == null || object == undefined){ + $tempDomObj.find("#changePasswordBtn").remove(); + } +}); + +UserAdapter.method('changePassword', function() { + $('#adminUsersModel').modal('show'); + $('#adminUsersChangePwd #newpwd').val(''); + $('#adminUsersChangePwd #conpwd').val(''); +}); + +UserAdapter.method('saveUserSuccessCallBack', function(callBackData,serverData) { + this.showMessage("Create User","An email has been sent to "+callBackData['email']+" with a temporary password to login to IceHrm."); + this.get([]); +}); + +UserAdapter.method('saveUserFailCallBack', function(callBackData,serverData) { + this.showMessage("Error",callBackData); +}); + +UserAdapter.method('doCustomValidation', function(params) { + var msg = null; + if(params['user_level'] != "Admin" && params['employee'] == "NULL"){ + msg = "For non Admin users, you have to assign an employee when adding or editing the user.
"; + msg += " You may create a new employee through 'Admin'->'Employees' menu"; + } + return msg; +}); + +UserAdapter.method('save', function() { + var validator = new FormValidation(this.getTableName()+"_submit",true,{'ShowPopup':false,"LabelErrorClass":"error"}); + if(validator.checkValues()){ + var params = validator.getFormParameters(); + + var msg = this.doCustomValidation(params); + if(msg == null){ + var id = $('#'+this.getTableName()+"_submit #id").val(); + if(id != null && id != undefined && id != ""){ + $(params).attr('id',id); + this.add(params,[]); + }else{ + + var reqJson = JSON.stringify(params); + + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'saveUserSuccessCallBack'; + callBackData['callBackFail'] = 'saveUserFailCallBack'; + + this.customAction('saveUser','admin=users',reqJson,callBackData); + } + + }else{ + //$("#"+this.getTableName()+'Form .label').html(msg); + //$("#"+this.getTableName()+'Form .label').show(); + this.showMessage("Error Saving User",msg); + } + + + + } +}); + + +UserAdapter.method('changePasswordConfirm', function() { + $('#adminUsersChangePwd_error').hide(); + + var passwordValidation = function (str) { + var val = /^[a-zA-Z0-9]\w{6,}$/; + return str != null && val.test(str); + }; + + var password = $('#adminUsersChangePwd #newpwd').val(); + + if(!passwordValidation(password)){ + $('#adminUsersChangePwd_error').html("Password may contain only letters, numbers and should be longer than 6 characters"); + $('#adminUsersChangePwd_error').show(); + return; + } + + var conPassword = $('#adminUsersChangePwd #conpwd').val(); + + if(conPassword != password){ + $('#adminUsersChangePwd_error').html("Passwords don't match"); + $('#adminUsersChangePwd_error').show(); + return; + } + + var req = {"id":this.currentId,"pwd":conPassword}; + var reqJson = JSON.stringify(req); + + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'changePasswordSuccessCallBack'; + callBackData['callBackFail'] = 'changePasswordFailCallBack'; + + this.customAction('changePassword','admin=users',reqJson,callBackData); + +}); + +UserAdapter.method('closeChangePassword', function() { + $('#adminUsersModel').modal('hide'); +}); + +UserAdapter.method('changePasswordSuccessCallBack', function(callBackData,serverData) { + this.closeChangePassword(); + this.showMessage("Password Change","Password changed successfully"); +}); + +UserAdapter.method('changePasswordFailCallBack', function(callBackData,serverData) { + this.closeChangePassword(); + this.showMessage("Error",callBackData); +}); + +UserAdapter.method('getHelpLink', function () { + return 'http://blog.icehrm.com/?page_id=132'; +}); + + + diff --git a/ext/admin/users/meta.json b/ext/admin/users/meta.json new file mode 100644 index 00000000..9d1a901f --- /dev/null +++ b/ext/admin/users/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Users", +"menu":"System", +"order":"2", +"icon":"fa-user", +"user_levels":["Admin"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/admin/users/templates/form_template.html b/ext/admin/users/templates/form_template.html new file mode 100644 index 00000000..a07f7354 --- /dev/null +++ b/ext/admin/users/templates/form_template.html @@ -0,0 +1,55 @@ +
+
+
+ +
+
+ _fields_ +
+
+ + + +
+
+
+ + + + diff --git a/ext/modules/attendance/api/AttendanceActionManager.php b/ext/modules/attendance/api/AttendanceActionManager.php new file mode 100644 index 00000000..91fe67bb --- /dev/null +++ b/ext/modules/attendance/api/AttendanceActionManager.php @@ -0,0 +1,137 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) +*/ + +class AttendanceActionManager extends SubActionManager{ + + public function getPunch($req){ + $date = $req->date; + $arr = explode(" ",$date); + $date = $arr[0]; + + $employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true); + + //Find any open punch + $attendance = new Attendance(); + $attendance->Load("employee = ? and DATE_FORMAT( in_time, '%Y-%m-%d' ) = ? and (out_time is NULL or out_time = '0000-00-00 00:00:00')",array($employee->id,$date)); + + if($attendance->employee == $employee->id){ + //found an open punch + return new IceResponse(IceResponse::SUCCESS,$attendance); + }else{ + return new IceResponse(IceResponse::SUCCESS,null); + } + + + } + + + public function savePunch($req){ + $req->date = $req->time; + + /* + if(strtotime($req->date) > strtotime($req->cdate)){ + return new IceResponse(IceResponse::ERROR,"You are not allowed to punch a future time"); + } + */ + + //check if there is an open punch + $openPunch = $this->getPunch($req)->getData(); + + if(empty($openPunch)){ + $openPunch = new Attendance(); + } + + $dateTime = $req->date; + $arr = explode(" ",$dateTime); + $date = $arr[0]; + + $currentDateTime = $req->cdate; + $arr = explode(" ",$currentDateTime); + $currentDate = $arr[0]; + + if($currentDate != $date){ + return new IceResponse(IceResponse::ERROR,"You are not allowed to punch time for a previous date"); + } + + $employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true); + + //check if dates are differnet + $arr = explode(" ",$openPunch->in_time); + $inDate = $arr[0]; + if(!empty($openPunch->in_time) && $inDate != $date){ + return new IceResponse(IceResponse::ERROR,"Attendance entry should be within a single day"); + } + + //compare dates + if(!empty($openPunch->in_time) && strtotime($dateTime) <= strtotime($openPunch->in_time)){ + return new IceResponse(IceResponse::ERROR,"Punch-in time should be lesser than Punch-out time"); + } + + //Find all punches for the day + $attendance = new Attendance(); + $attendanceList = $attendance->Find("employee = ? and DATE_FORMAT( in_time, '%Y-%m-%d' ) = ?",array($employee->id,$date)); + + foreach($attendanceList as $attendance){ + if(!empty($openPunch->in_time)){ + if($openPunch->id == $attendance->id){ + continue; + } + if(strtotime($attendance->out_time) >= strtotime($dateTime) && strtotime($attendance->in_time) <= strtotime($dateTime)){ + //-1---0---1---0 || ---0--1---1---0 + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 1"); + }else if(strtotime($attendance->out_time) >= strtotime($openPunch->in_time) && strtotime($attendance->in_time) <= strtotime($openPunch->in_time)){ + //---0---1---0---1 || ---0--1---1---0 + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 2"); + }else if(strtotime($attendance->out_time) <= strtotime($dateTime) && strtotime($attendance->in_time) >= strtotime($openPunch->in_time)){ + //--1--0---0--1-- + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 3 ".$attendance->id); + } + }else{ + if(strtotime($attendance->out_time) >= strtotime($dateTime) && strtotime($attendance->in_time) <= strtotime($dateTime)){ + //---0---1---0 + return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 4"); + } + } + } + if(!empty($openPunch->in_time)){ + $openPunch->out_time = $dateTime; + $openPunch->note = $req->note; + $this->baseService->audit(IceConstants::AUDIT_ACTION, "Punch Out \ time:".$openPunch->out_time); + }else{ + $openPunch->in_time = $dateTime; + $openPunch->out_time = '0000-00-00 00:00:00'; + $openPunch->note = $req->note; + $openPunch->employee = $employee->id; + $this->baseService->audit(IceConstants::AUDIT_ACTION, "Punch In \ time:".$openPunch->in_time); + } + $ok = $openPunch->Save(); + + if(!$ok){ + LogManager::getInstance()->info($openPunch->ErrorMsg()); + return new IceResponse(IceResponse::ERROR,"Error occured while saving attendance"); + } + return new IceResponse(IceResponse::SUCCESS,$openPunch); + + } + +} \ No newline at end of file diff --git a/ext/modules/attendance/api/AttendanceModulesManager.php b/ext/modules/attendance/api/AttendanceModulesManager.php new file mode 100644 index 00000000..1f00b20f --- /dev/null +++ b/ext/modules/attendance/api/AttendanceModulesManager.php @@ -0,0 +1,24 @@ +addUserClass("Attendance"); + } + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + } + + } +} \ No newline at end of file diff --git a/ext/modules/attendance/index.php b/ext/modules/attendance/index.php new file mode 100644 index 00000000..c873bcac --- /dev/null +++ b/ext/modules/attendance/index.php @@ -0,0 +1,70 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'attendance'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/ext/modules/attendance/lib.js b/ext/modules/attendance/lib.js new file mode 100644 index 00000000..fcf7b7e2 --- /dev/null +++ b/ext/modules/attendance/lib.js @@ -0,0 +1,236 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function AttendanceAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); + this.punch = null; +} + +AttendanceAdapter.inherits(AdapterBase); + +AttendanceAdapter.method('updatePunchButton', function() { + this.getPunch('changePunchButtonSuccessCallBack'); +}); + + +AttendanceAdapter.method('getDataMapping', function() { + return [ + "id", + "in_time", + "out_time", + "note" + ]; +}); + +AttendanceAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Time-In" }, + { "sTitle": "Time-Out"}, + { "sTitle": "Note"} + ]; +}); + +AttendanceAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "time", {"label":"Time","type":"datetime"}], + [ "note", {"label":"Note","type":"textarea","validation":"none"}] + ]; +}); + + +AttendanceAdapter.method('getCustomTableParams', function() { + var that = this; + var dataTableParams = { + "aoColumnDefs": [ + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 1) + } , + "aTargets": [1] + }, + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 2) + } , + "aTargets": [2] + }, + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 3) + } , + "aTargets": [3] + }, + { + "fnRender": that.getActionButtons, + "aTargets": [that.getDataMapping().length] + } + ] + }; + return dataTableParams; +}); + +AttendanceAdapter.method('preProcessRemoteTableData', function(data, cell, id) { + if(id == 1){ + if(cell == '0000-00-00 00:00:00' || cell == "" || cell == undefined || cell == null){ + return ""; + } + return Date.parse(cell).toString('yyyy MMM d HH:mm'); + }else if(id == 2){ + if(cell == '0000-00-00 00:00:00' || cell == "" || cell == undefined || cell == null){ + return ""; + } + return Date.parse(cell).toString('MMM d HH:mm'); + }else if(id == 3){ + if(cell != undefined && cell != null){ + if(cell.length > 20){ + return cell.substring(0,20)+".."; + } + } + return cell; + } + +}); + + +AttendanceAdapter.method('getActionButtonsHtml', function(id,data) { + /* + var html = '
'; + html = html.replace(/_id_/g,id); + html = html.replace(/_attachment_/g,data[5]); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; + */ + return ""; +}); + +AttendanceAdapter.method('getTableTopButtonHtml', function() { + if(this.punch == null || this.punch == undefined){ + return ''; + }else{ + return ''; + } + +}); + + +AttendanceAdapter.method('save', function() { + var that = this; + var validator = new FormValidation(this.getTableName()+"_submit",true,{'ShowPopup':false,"LabelErrorClass":"error"}); + if(validator.checkValues()){ + var params = validator.getFormParameters(); + params['cdate'] = this.getClientDate(new Date()).toISOString().slice(0, 19).replace('T', ' '); + var reqJson = JSON.stringify(params); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'saveSuccessCallback'; + callBackData['callBackFail'] = 'getPunchFailCallBack'; + + this.customAction('savePunch','modules=attendance',reqJson,callBackData); + } +}); + +AttendanceAdapter.method('saveSuccessCallback', function(callBackData) { + this.punch = callBackData; + this.getPunch('changePunchButtonSuccessCallBack'); + $('#PunchModel').modal('hide'); + this.get([]); +}); + + +AttendanceAdapter.method('cancel', function() { + $('#PunchModel').modal('hide'); +}); + +AttendanceAdapter.method('showPunchDialog', function() { + this.getPunch('showPunchDialogShowPunchSuccessCallBack'); +}); + +AttendanceAdapter.method('getPunch', function(successCallBack) { + var that = this; + var object = {}; + + object['date'] = this.getClientDate(new Date()).toISOString().slice(0, 19).replace('T', ' '); + object['offset'] = this.getClientGMTOffset(); + var reqJson = JSON.stringify(object); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = successCallBack; + callBackData['callBackFail'] = 'getPunchFailCallBack'; + + this.customAction('getPunch','modules=attendance',reqJson,callBackData); +}); + +AttendanceAdapter.method('postRenderForm', function(object, $tempDomObj) { + $("#Attendance").show(); +}); + + + +AttendanceAdapter.method('showPunchDialogShowPunchSuccessCallBack', function(callBackData) { + this.punch = callBackData; + $('#PunchModel').modal('show'); + if(this.punch == null){ + $('#PunchModel').find("h3").html("Punch Time-in"); + modJs.renderForm(); + }else{ + $('#PunchModel').find("h3").html("Punch Time-out"); + modJs.renderForm(this.punch); + } + + var picker = $('#time_datetime').data('datetimepicker'); + picker.setLocalDate(new Date()); +}); + +AttendanceAdapter.method('changePunchButtonSuccessCallBack', function(callBackData) { + this.punch = callBackData; + if(this.punch == null){ + $("#punchButton").html('Punch-in '); + }else{ + $("#punchButton").html('Punch-out '); + } +}); + +AttendanceAdapter.method('getPunchFailCallBack', function(callBackData) { + this.showMessage("Error Occured while Time Punch", callBackData); +}); + +AttendanceAdapter.method('getClientDate', function (date) { + + var offset = this.getClientGMTOffset(); + var tzDate = date.addMinutes(offset*60); + return tzDate; + +}); + +AttendanceAdapter.method('getClientGMTOffset', function () { + + var rightNow = new Date(); + var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0); + var temp = jan1.toGMTString(); + var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1)); + var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60); + + return std_time_offset; + +}); diff --git a/ext/modules/attendance/meta.json b/ext/modules/attendance/meta.json new file mode 100644 index 00000000..4f663c67 --- /dev/null +++ b/ext/modules/attendance/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Attendance", +"menu":"Time Management", +"order":"2", +"icon":"fa-clock-o", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/modules/dashboard/api/DashboardActionManager.php b/ext/modules/dashboard/api/DashboardActionManager.php new file mode 100644 index 00000000..c57257e1 --- /dev/null +++ b/ext/modules/dashboard/api/DashboardActionManager.php @@ -0,0 +1,76 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) +*/ + +include (APP_BASE_PATH."modules/leaves/api/LeavesActionManager.php"); + +class DashboardActionManager extends SubActionManager{ + + public function getPendingLeaves($req){ + + $lam = new LeavesActionManager(); + $leavePeriod = $lam->getCurrentLeavePeriod(date("Y-m-d H:i:s"), date("Y-m-d H:i:s")); + + $leave = new EmployeeLeave(); + $pendingLeaves = $leave->Find("status = ? and employee = ?",array("Pending", $this->getCurrentProfileId())); + + return new IceResponse(IceResponse::SUCCESS,count($pendingLeaves)); + + } + + public function getLastTimeSheetHours($req){ + $timeSheet = new EmployeeTimeSheet(); + $timeSheet->Load("employee = ? order by date_end desc limit 1",array($this->getCurrentProfileId())); + + if(empty($timeSheet->employee)){ + return new IceResponse(IceResponse::SUCCESS,"0:00"); + } + + $timeSheetEntry = new EmployeeTimeEntry(); + $list = $timeSheetEntry->Find("timesheet = ?",array($timeSheet->id)); + + $seconds = 0; + foreach($list as $entry){ + $seconds += (strtotime($entry->date_end) - strtotime($entry->date_start)); + } + + $minutes = (int)($seconds/60); + $rem = $minutes % 60; + $hours = ($minutes - $rem)/60; + if($rem < 10){ + $rem ="0".$rem; + } + return new IceResponse(IceResponse::SUCCESS,$hours.":".$rem); + + } + + public function getEmployeeActiveProjects($req){ + $project = new EmployeeProject(); + $projects = $project->Find("employee = ? and status =?",array($this->getCurrentProfileId(),'Current')); + + + return new IceResponse(IceResponse::SUCCESS,count($projects)); + + } + + +} \ No newline at end of file diff --git a/ext/modules/dashboard/api/DashboardModulesManager.php b/ext/modules/dashboard/api/DashboardModulesManager.php new file mode 100644 index 00000000..2136d94f --- /dev/null +++ b/ext/modules/dashboard/api/DashboardModulesManager.php @@ -0,0 +1,22 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'dashboard'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ +
+
+ +
+
+

+ .. +

+

+ Waiting for Response.. +

+
+
+ +
+ + Record Attendance + +
+
+
+ +
+
+

..

+

+ Pending Leaves +

+
+
+ +
+ + Check Leave Status + +
+
+
+ +
+
+

..

+

+ Hours worked Last Week +

+
+
+ +
+ + Update Time Sheet + +
+
+
+ +
+
+

..

+

+ Active Projects +

+
+
+ +
+ + More info + +
+
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/dashboard/lib.js b/ext/modules/dashboard/lib.js new file mode 100644 index 00000000..a14c72d0 --- /dev/null +++ b/ext/modules/dashboard/lib.js @@ -0,0 +1,173 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function DashboardAdapter(endPoint) { + this.initAdapter(endPoint); +} + +DashboardAdapter.inherits(AdapterBase); + + + +DashboardAdapter.method('getDataMapping', function() { + return []; +}); + +DashboardAdapter.method('getHeaders', function() { + return []; +}); + +DashboardAdapter.method('getFormFields', function() { + return []; +}); + + +DashboardAdapter.method('get', function(callBackData) { +}); + + +DashboardAdapter.method('getPunch', function() { + var that = this; + var object = {}; + + object['date'] = this.getClientDate(new Date()).toISOString().slice(0, 19).replace('T', ' '); + object['offset'] = this.getClientGMTOffset(); + var reqJson = JSON.stringify(object); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'getPunchSuccessCallBack'; + callBackData['callBackFail'] = 'getPunchFailCallBack'; + + this.customAction('getPunch','modules=attendance',reqJson,callBackData); +}); + + + +DashboardAdapter.method('getPunchSuccessCallBack', function(callBackData) { + var punch = callBackData; + if(punch == null){ + $("#lastPunchTime").html("Not"); + $("#punchTimeText").html("Punched In"); + }else{ + $("#lastPunchTime").html(Date.parse(punch.in_time).toString('h:mm tt')); + $("#punchTimeText").html("Punched In"); + } +}); + +DashboardAdapter.method('getPunchFailCallBack', function(callBackData) { + +}); + + +DashboardAdapter.method('getPendingLeaves', function() { + var that = this; + var object = {}; + + var reqJson = JSON.stringify(object); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'getPendingLeavesSuccessCallBack'; + callBackData['callBackFail'] = 'getPendingLeavesFailCallBack'; + + this.customAction('getPendingLeaves','modules=dashboard',reqJson,callBackData); +}); + + + +DashboardAdapter.method('getPendingLeavesSuccessCallBack', function(callBackData) { + var leaveCount = callBackData; + $("#pendingLeaveCount").html(leaveCount); +}); + +DashboardAdapter.method('getPendingLeavesFailCallBack', function(callBackData) { + +}); + +DashboardAdapter.method('getLastTimeSheetHours', function() { + var that = this; + var object = {}; + + var reqJson = JSON.stringify(object); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'getLastTimeSheetHoursSuccessCallBack'; + callBackData['callBackFail'] = 'getLastTimeSheetHoursFailCallBack'; + + this.customAction('getLastTimeSheetHours','modules=dashboard',reqJson,callBackData); +}); + + + +DashboardAdapter.method('getLastTimeSheetHoursSuccessCallBack', function(callBackData) { + var hours = callBackData; + $("#timeSheetHoursWorked").html(hours); +}); + +DashboardAdapter.method('getLastTimeSheetHoursFailCallBack', function(callBackData) { + +}); + + + +DashboardAdapter.method('getEmployeeActiveProjects', function() { + var that = this; + var object = {}; + + var reqJson = JSON.stringify(object); + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'getEmployeeActiveProjectsSuccessCallBack'; + callBackData['callBackFail'] = 'getEmployeeActiveProjectsFailCallBack'; + + this.customAction('getEmployeeActiveProjects','modules=dashboard',reqJson,callBackData); +}); + + + +DashboardAdapter.method('getEmployeeActiveProjectsSuccessCallBack', function(callBackData) { + var hours = callBackData; + $("#numberOfProjects").html(hours); +}); + +DashboardAdapter.method('getEmployeeActiveProjectsFailCallBack', function(callBackData) { + +}); + +DashboardAdapter.method('getClientDate', function (date) { + + var offset = this.getClientGMTOffset(); + var tzDate = date.addMinutes(offset*60); + return tzDate; + +}); + +DashboardAdapter.method('getClientGMTOffset', function () { + + var rightNow = new Date(); + var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0); + var temp = jan1.toGMTString(); + var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1)); + var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60); + + return std_time_offset; + +}); diff --git a/ext/modules/dashboard/meta.json b/ext/modules/dashboard/meta.json new file mode 100644 index 00000000..70a5f4a1 --- /dev/null +++ b/ext/modules/dashboard/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Dashboard", +"menu":"Personal Information", +"order":"1", +"icon":"fa-desktop", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/modules/dependents/api/DependentsModulesManager.php b/ext/modules/dependents/api/DependentsModulesManager.php new file mode 100644 index 00000000..fd22081d --- /dev/null +++ b/ext/modules/dependents/api/DependentsModulesManager.php @@ -0,0 +1,51 @@ +addUserClass("EmployeeDependent"); + } + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('EmployeeDependent'); + + } + + } +} + + +if (!class_exists('EmployeeDependent')) { + + class EmployeeDependent extends ICEHRM_Record { + var $_table = 'EmployeeDependents'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } +} \ No newline at end of file diff --git a/ext/modules/dependents/index.php b/ext/modules/dependents/index.php new file mode 100644 index 00000000..080ed763 --- /dev/null +++ b/ext/modules/dependents/index.php @@ -0,0 +1,63 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'emergency_contact'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/dependents/lib.js b/ext/modules/dependents/lib.js new file mode 100644 index 00000000..937b600a --- /dev/null +++ b/ext/modules/dependents/lib.js @@ -0,0 +1,64 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + + +/** + * EmployeeDependentAdapter + */ + +function EmployeeDependentAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeDependentAdapter.inherits(AdapterBase); + + + +EmployeeDependentAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "relationship", + "dob", + "id_number" + ]; +}); + +EmployeeDependentAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Relationship"}, + { "sTitle": "Date of Birth"}, + { "sTitle": "Id Number"} + ]; +}); + +EmployeeDependentAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text","validation":""}], + [ "relationship", {"label":"Relationship","type":"select","source":[["Child","Child"],["Spouse","Spouse"],["Parent","Parent"],["Other","Other"]]}], + [ "dob", {"label":"Date of Birth","type":"date","validation":""}], + [ "id_number", {"label":"Id Number","type":"text","validation":"none"}] + ]; +}); diff --git a/ext/modules/dependents/meta.json b/ext/modules/dependents/meta.json new file mode 100644 index 00000000..959dd3b5 --- /dev/null +++ b/ext/modules/dependents/meta.json @@ -0,0 +1,22 @@ +{ +"label":"Dependents", +"menu":"Personal Information", +"order":"5", +"icon":"fa-sliders", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + "Manager":{ + "Add Dependents":"Yes", + "Edit Dependents":"Yes", + "Delete Dependents":"Yes" + }, + + "Employee":{ + "Add Dependents":"Yes", + "Edit Dependents":"Yes", + "Delete Dependents":"Yes" + } + } +} \ No newline at end of file diff --git a/ext/modules/documents/api/DocumentsModulesManager.php b/ext/modules/documents/api/DocumentsModulesManager.php new file mode 100644 index 00000000..4848434b --- /dev/null +++ b/ext/modules/documents/api/DocumentsModulesManager.php @@ -0,0 +1,25 @@ +addUserClass("EmployeeDocument"); + } + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + } + + } +} \ No newline at end of file diff --git a/ext/modules/documents/index.php b/ext/modules/documents/index.php new file mode 100644 index 00000000..80d0e0d4 --- /dev/null +++ b/ext/modules/documents/index.php @@ -0,0 +1,64 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'documents'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/documents/lib.js b/ext/modules/documents/lib.js new file mode 100644 index 00000000..a09d2017 --- /dev/null +++ b/ext/modules/documents/lib.js @@ -0,0 +1,90 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function EmployeeDocumentAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeDocumentAdapter.inherits(AdapterBase); + + + +EmployeeDocumentAdapter.method('getDataMapping', function() { + return [ + "id", + "document", + "details", + "date_added", + "status", + "attachment" + ]; +}); + +EmployeeDocumentAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Document" }, + { "sTitle": "Details" }, + { "sTitle": "Date Added"}, + { "sTitle": "Status"}, + { "sTitle": "Attachment","bVisible":false} + ]; +}); + +EmployeeDocumentAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "document", {"label":"Document","type":"select2","remote-source":["Document","id","name"]}], + //[ "date_added", {"label":"Date Added","type":"date","validation":""}], + [ "valid_until", {"label":"Valid Until","type":"date","validation":"none"}], + [ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"],["Draft","Draft"]]}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}], + [ "attachment", {"label":"Attachment","type":"fileupload","validation":"none"}] + ]; +}); + + +EmployeeDocumentAdapter.method('getActionButtonsHtml', function(id,data) { + var downloadButton = ''; + var editButton = ''; + var deleteButton = ''; + var html = '
_edit__download__delete_
'; + + html = html.replace('_download_',downloadButton); + + if(this.showDelete){ + html = html.replace('_delete_',deleteButton); + }else{ + html = html.replace('_delete_',''); + } + + if(this.showEdit){ + html = html.replace('_edit_',editButton); + }else{ + html = html.replace('_edit_',''); + } + + html = html.replace(/_id_/g,id); + html = html.replace(/_attachment_/g,data[5]); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); diff --git a/ext/modules/documents/meta.json b/ext/modules/documents/meta.json new file mode 100644 index 00000000..864b9993 --- /dev/null +++ b/ext/modules/documents/meta.json @@ -0,0 +1,22 @@ +{ +"label":"My Documents", +"menu":"Documents", +"order":"1", +"icon":"fa-files-o", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + "Manager":{ + "Add Documents":"Yes", + "Edit Documents":"Yes", + "Delete Documents":"Yes" + }, + + "Employee":{ + "Add Documents":"Yes", + "Edit Documents":"Yes", + "Delete Documents":"Yes" + } + } +} \ No newline at end of file diff --git a/ext/modules/emergency_contact/api/Emergency_contactModulesManager.php b/ext/modules/emergency_contact/api/Emergency_contactModulesManager.php new file mode 100644 index 00000000..de097b79 --- /dev/null +++ b/ext/modules/emergency_contact/api/Emergency_contactModulesManager.php @@ -0,0 +1,49 @@ +addUserClass("EmergencyContact"); + } + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('EmergencyContact'); + + } + + } +} + +if (!class_exists('EmergencyContact')) { + class EmergencyContact extends ICEHRM_Record { + var $_table = 'EmergencyContacts'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } +} \ No newline at end of file diff --git a/ext/modules/emergency_contact/index.php b/ext/modules/emergency_contact/index.php new file mode 100644 index 00000000..afabbd22 --- /dev/null +++ b/ext/modules/emergency_contact/index.php @@ -0,0 +1,64 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'emergency_contact'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/emergency_contact/lib.js b/ext/modules/emergency_contact/lib.js new file mode 100644 index 00000000..3d485d93 --- /dev/null +++ b/ext/modules/emergency_contact/lib.js @@ -0,0 +1,63 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + + +function EmergencyContactAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmergencyContactAdapter.inherits(AdapterBase); + + + +EmergencyContactAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "relationship", + "home_phone", + "work_phone", + "mobile_phone" + ]; +}); + +EmergencyContactAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Relationship"}, + { "sTitle": "Home Phone"}, + { "sTitle": "Work Phone"}, + { "sTitle": "Mobile Phone"} + ]; +}); + +EmergencyContactAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text","validation":""}], + [ "relationship", {"label":"Relationship","type":"text","validation":"none"}], + [ "home_phone", {"label":"Home Phone","type":"text","validation":"none"}], + [ "work_phone", {"label":"Work Phone","type":"text","validation":"none"}], + [ "mobile_phone", {"label":"Mobile Phone","type":"text","validation":"none"}] + ]; +}); diff --git a/ext/modules/emergency_contact/meta.json b/ext/modules/emergency_contact/meta.json new file mode 100644 index 00000000..d281fd9d --- /dev/null +++ b/ext/modules/emergency_contact/meta.json @@ -0,0 +1,22 @@ +{ +"label":"Emergency Contacts", +"menu":"Personal Information", +"order":"6", +"icon":"fa-phone-square", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + "Manager":{ + "Add Emergency Contacts":"Yes", + "Edit Emergency Contacts":"Yes", + "Delete Emergency Contacts":"Yes" + }, + + "Employee":{ + "Add Emergency Contacts":"Yes", + "Edit Emergency Contacts":"Yes", + "Delete Emergency Contacts":"Yes" + } + } +} \ No newline at end of file diff --git a/ext/modules/employees/api/EmployeesActionManager.php b/ext/modules/employees/api/EmployeesActionManager.php new file mode 100644 index 00000000..b1ef0129 --- /dev/null +++ b/ext/modules/employees/api/EmployeesActionManager.php @@ -0,0 +1,80 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +class EmployeesActionManager extends SubActionManager{ + public function get($req){ + + $employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),$req->map,true); + + $subordinate = new Employee(); + $subordinates = $subordinate->Find("supervisor = ?",array($employee->id)); + $employee->subordinates = $subordinates; + + $fs = FileService::getInstance(); + $employee = $fs->updateProfileImage($employee); + + if(!empty($employee->birthday)){ + $employee->birthday = date("F jS, Y",strtotime($employee->birthday)); + } + + if(!empty($employee->driving_license_exp_date)){ + $employee->driving_license_exp_date = date("F jS, Y",strtotime($employee->driving_license_exp_date)); + } + + if(!empty($employee->joined_date)){ + $employee->joined_date = date("F jS, Y",strtotime($employee->joined_date)); + } + + + if(empty($employee->id)){ + return new IceResponse(IceResponse::ERROR,$employee); + } + return new IceResponse(IceResponse::SUCCESS,array($employee,$this->getCurrentProfileId(),$this->user->employee)); + } + + public function deleteProfileImage($req){ + if($this->user->user_level == 'Admin' || $this->user->employee == $req->id){ + $fs = FileService::getInstance(); + $res = $fs->deleteProfileImage($req->id); + return new IceResponse(IceResponse::SUCCESS,$res); + } + } + + public function changePassword($req){ + + if($this->getCurrentProfileId() != $this->user->employee || empty($this->user->employee)){ + return new IceResponse(IceResponse::ERROR,"You are not allowed to change passwords of other employees"); + } + + $user = $this->baseService->getElement('User',$this->user->id); + if(empty($user->id)){ + return new IceResponse(IceResponse::ERROR,"Error occured while changing password"); + } + $user->password = md5($req->pwd); + $ok = $user->Save(); + if(!$ok){ + return new IceResponse(IceResponse::ERROR,$user->ErrorMsg()); + } + return new IceResponse(IceResponse::SUCCESS,$user); + } +} \ No newline at end of file diff --git a/ext/modules/employees/api/EmployeesModulesManager.php b/ext/modules/employees/api/EmployeesModulesManager.php new file mode 100644 index 00000000..b5093ecb --- /dev/null +++ b/ext/modules/employees/api/EmployeesModulesManager.php @@ -0,0 +1,23 @@ + +
+
+
+ +
+ +
+
+
+
+
+
+ + + + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+
+ Personal Information

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+ Contact Information

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+ Job Details

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/ext/modules/employees/index.php b/ext/modules/employees/index.php new file mode 100644 index 00000000..061ebdbf --- /dev/null +++ b/ext/modules/employees/index.php @@ -0,0 +1,66 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'employees'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?> + + +
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/employees/lib.js b/ext/modules/employees/lib.js new file mode 100644 index 00000000..f0f8d1d5 --- /dev/null +++ b/ext/modules/employees/lib.js @@ -0,0 +1,385 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function EmployeeAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeAdapter.inherits(AdapterBase); + +this.currentUserId = null; + +EmployeeAdapter.method('getDataMapping', function() { + return [ + "id", + "employee_id", + "first_name", + "last_name", + "mobile_phone", + "department", + "gender", + "supervisor" + ]; +}); + +EmployeeAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" }, + { "sTitle": "Employee Number" }, + { "sTitle": "First Name" }, + { "sTitle": "Last Name"}, + { "sTitle": "Mobile"}, + { "sTitle": "Department"}, + { "sTitle": "Gender"}, + { "sTitle": "Supervisor"} + ]; +}); + +EmployeeAdapter.method('getFormFields', function() { + + var employee_id, ssn_num, employment_status, job_title, pay_grade, joined_date, department, work_email, country; + + if(this.checkPermission("Edit Employee Number") == "Yes"){ + employee_id = [ "employee_id", {"label":"Employee Number","type":"text","validation":""}]; + }else{ + employee_id = [ "employee_id", {"label":"Employee Number","type":"placeholder","validation":""}]; + } + + if(this.checkPermission("Edit EPF/CPF Number") == "Yes"){ + ssn_num = [ "ssn_num", {"label":"EPF/CPF/SS No","type":"text","validation":"none"}]; + }else{ + ssn_num = [ "ssn_num", {"label":"EPF/CPF/SS No","type":"placeholder","validation":"none"}]; + } + + if(this.checkPermission("Edit Employment Status") == "Yes"){ + employment_status = [ "employment_status", {"label":"Employment Status","type":"select2","remote-source":["EmploymentStatus","id","name"]}]; + }else{ + employment_status = [ "employment_status", {"label":"Employment Status","type":"placeholder","remote-source":["EmploymentStatus","id","name"]}]; + } + + if(this.checkPermission("Edit Job Title") == "Yes"){ + job_title = [ "job_title", {"label":"Job Title","type":"select2","remote-source":["JobTitle","id","name"]}]; + }else{ + job_title = [ "job_title", {"label":"Job Title","type":"placeholder","remote-source":["JobTitle","id","name"]}]; + } + + if(this.checkPermission("Edit Pay Grade") == "Yes"){ + pay_grade = [ "pay_grade", {"label":"Pay Grade","type":"select2","allow-null":true,"remote-source":["PayGrade","id","name"]}]; + }else{ + pay_grade = [ "pay_grade", {"label":"Pay Grade","type":"placeholder","allow-null":true,"remote-source":["PayGrade","id","name"]}]; + } + + if(this.checkPermission("Edit Joined Date") == "Yes"){ + joined_date = [ "joined_date", {"label":"Joined Date","type":"date","validation":""}]; + }else{ + joined_date = [ "joined_date", {"label":"Joined Date","type":"placeholder","validation":""}]; + } + + if(this.checkPermission("Edit Department") == "Yes"){ + department = [ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"]}]; + }else{ + department = [ "department", {"label":"Department","type":"placeholder","remote-source":["CompanyStructure","id","title"]}]; + } + + if(this.checkPermission("Edit Work Email") == "Yes"){ + work_email = [ "work_email", {"label":"Work Email","type":"text","validation":"email"}]; + }else{ + work_email = [ "work_email", {"label":"Work Email","type":"placeholder","validation":"emailOrEmpty"}]; + } + + if(this.checkPermission("Edit Country") == "Yes"){ + country = [ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}]; + }else{ + country = [ "country", {"label":"Country","type":"placeholder","remote-source":["Country","code","name"]}]; + } + + return [ + [ "id", {"label":"ID","type":"hidden","validation":""}], + employee_id, + [ "first_name", {"label":"First Name","type":"text","validation":""}], + [ "middle_name", {"label":"Middle Name","type":"text","validation":"none"}], + [ "last_name", {"label":"Last Name","type":"text","validation":""}], + [ "nationality", {"label":"Nationality","type":"select2","remote-source":["Nationality","id","name"]}], + [ "birthday", {"label":"Date of Birth","type":"date","validation":""}], + [ "gender", {"label":"Gender","type":"select","source":[["Male","Male"],["Female","Female"]]}], + [ "marital_status", {"label":"Marital Status","type":"select","source":[["Married","Married"],["Single","Single"],["Divorced","Divorced"],["Widowed","Widowed"],["Other","Other"]]}], + ssn_num, + [ "nic_num", {"label":"NIC","type":"text","validation":"none"}], + [ "other_id", {"label":"Other ID","type":"text","validation":"none"}], + [ "driving_license", {"label":"Driving License No","type":"text","validation":"none"}], + employment_status, + job_title, + pay_grade, + [ "work_station_id", {"label":"Work Station Id","type":"text","validation":"none"}], + [ "address1", {"label":"Address Line 1","type":"text","validation":"none"}], + [ "address2", {"label":"Address Line 2","type":"text","validation":"none"}], + [ "city", {"label":"City","type":"text","validation":"none"}], + country, + [ "province", {"label":"Province","type":"select2","allow-null":true,"remote-source":["Province","id","name"]}], + [ "postal_code", {"label":"Postal/Zip Code","type":"text","validation":"none"}], + [ "home_phone", {"label":"Home Phone","type":"text","validation":"none"}], + [ "mobile_phone", {"label":"Mobile Phone","type":"text","validation":"none"}], + [ "work_phone", {"label":"Work Phone","type":"text","validation":"none"}], + work_email, + [ "private_email", {"label":"Private Email","type":"text","validation":"emailOrEmpty"}], + joined_date, + department + ]; +}); + +EmployeeAdapter.method('getSourceMapping' , function() { + var k = this.sourceMapping ; + k['supervisor'] = ["Employee","id","first_name+last_name"]; + return k; +}); + + +EmployeeAdapter.method('get', function() { + var that = this; + var sourceMappingJson = JSON.stringify(this.getSourceMapping()); + + var req = {"map":sourceMappingJson}; + var reqJson = JSON.stringify(req); + + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'modEmployeeGetSuccessCallBack'; + callBackData['callBackFail'] = 'modEmployeeGetFailCallBack'; + + this.customAction('get','modules=employees',reqJson,callBackData); +}); + +EmployeeAdapter.method('deleteProfileImage', function(empId) { + var that = this; + + var req = {"id":empId}; + var reqJson = JSON.stringify(req); + + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'modEmployeeDeleteProfileImageCallBack'; + callBackData['callBackFail'] = 'modEmployeeDeleteProfileImageCallBack'; + + this.customAction('deleteProfileImage','modules=employees',reqJson,callBackData); +}); + +EmployeeAdapter.method('modEmployeeDeleteProfileImageCallBack', function(data) { + top.location.href = top.location.href; +}); + +EmployeeAdapter.method('modEmployeeGetSuccessCallBack' , function(data) { + var currentEmpId = data[1]; + var userEmpId = data[2]; + data = data[0]; + var html = this.getCustomTemplate('myDetails.html'); + + html = html.replace(/_id_/g,data.id); + + $("#"+this.getTableName()).html(html); + var fields = this.getFormFields(); + for(var i=0;iaddUserClass("EmployeeCompanyLoan"); + } + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('EmployeeCompanyLoan'); + + } + + } +} + + +if (!class_exists('EmployeeCompanyLoan')) { + + class EmployeeCompanyLoan extends ICEHRM_Record { + var $_table = 'EmployeeCompanyLoans'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("get","element"); + } + } +} \ No newline at end of file diff --git a/ext/modules/loans/index.php b/ext/modules/loans/index.php new file mode 100644 index 00000000..4b1b6163 --- /dev/null +++ b/ext/modules/loans/index.php @@ -0,0 +1,58 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'loans'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/loans/lib.js b/ext/modules/loans/lib.js new file mode 100644 index 00000000..148449f3 --- /dev/null +++ b/ext/modules/loans/lib.js @@ -0,0 +1,91 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function EmployeeCompanyLoanAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeCompanyLoanAdapter.inherits(AdapterBase); + + + +EmployeeCompanyLoanAdapter.method('getDataMapping', function() { + return [ + "id", + "loan", + "start_date", + "period_months", + "currency", + "amount", + "status" + ]; +}); + +EmployeeCompanyLoanAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Loan Type" }, + { "sTitle": "Loan Start Date"}, + { "sTitle": "Loan Period (Months)"}, + { "sTitle": "Currency"}, + { "sTitle": "Amount"}, + { "sTitle": "Status"} + ]; +}); + +EmployeeCompanyLoanAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "loan", {"label":"Loan Type","type":"placeholder","remote-source":["CompanyLoan","id","name"]}], + [ "start_date", {"label":"Loan Start Date","type":"placeholder","validation":""}], + [ "last_installment_date", {"label":"Last Installment Date","type":"placeholder","validation":"none"}], + [ "period_months", {"label":"Loan Period (Months)","type":"placeholder","validation":"number"}], + [ "currency", {"label":"Currency","type":"placeholder","remote-source":["CurrencyType","id","name"]}], + [ "amount", {"label":"Loan Amount","type":"placeholder","validation":"float"}], + [ "monthly_installment", {"label":"Monthly Installment","type":"placeholder","validation":"float"}], + [ "status", {"label":"Status","type":"placeholder","source":[["Approved","Approved"],["Paid","Paid"],["Suspended","Suspended"]]}], + [ "details", {"label":"Details","type":"placeholder","validation":"none"}] + ]; +}); + + +EmployeeCompanyLoanAdapter.method('getActionButtonsHtml', function(id,data) { + var editButton = ''; + var deleteButton = ''; + var html = '
_edit__delete_
'; + + if(this.showDelete){ + html = html.replace('_delete_',deleteButton); + }else{ + html = html.replace('_delete_',''); + } + + if(this.showEdit){ + html = html.replace('_edit_',editButton); + }else{ + html = html.replace('_edit_',''); + } + + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); diff --git a/ext/modules/loans/meta.json b/ext/modules/loans/meta.json new file mode 100644 index 00000000..a80215bb --- /dev/null +++ b/ext/modules/loans/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Loans", +"menu":"Loans", +"order":"1", +"icon":"fa-shield", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/modules/meta.json b/ext/modules/meta.json new file mode 100644 index 00000000..d63106fc --- /dev/null +++ b/ext/modules/meta.json @@ -0,0 +1,9 @@ +{ +"Personal Information":"fa-male", +"Subordinates":"fa-user", +"Leaves":"fa-calendar-o", +"Time Management":"fa-clock-o", +"Documents":"fa-files-o", +"Training":"fa-briefcase", +"Loans":"fa-list-alt" +} \ No newline at end of file diff --git a/ext/modules/projects/api/ProjectsModulesManager.php b/ext/modules/projects/api/ProjectsModulesManager.php new file mode 100644 index 00000000..97551827 --- /dev/null +++ b/ext/modules/projects/api/ProjectsModulesManager.php @@ -0,0 +1,51 @@ +addUserClass("EmployeeProject"); + } + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('EmployeeProject'); + + } + + } +} + + +if (!class_exists('EmployeeProject')) { + + class EmployeeProject extends ICEHRM_Record { + var $_table = 'EmployeeProjects'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } +} \ No newline at end of file diff --git a/ext/modules/projects/index.php b/ext/modules/projects/index.php new file mode 100644 index 00000000..b403a467 --- /dev/null +++ b/ext/modules/projects/index.php @@ -0,0 +1,64 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'projects'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/projects/lib.js b/ext/modules/projects/lib.js new file mode 100644 index 00000000..63818b15 --- /dev/null +++ b/ext/modules/projects/lib.js @@ -0,0 +1,54 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function EmployeeProjectAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeProjectAdapter.inherits(AdapterBase); + + + +EmployeeProjectAdapter.method('getDataMapping', function() { + return [ + "id", + "project", + "status" + ]; +}); + +EmployeeProjectAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Project" }, + { "sTitle": "Status"} + ]; +}); + +EmployeeProjectAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "project", {"label":"Project","type":"select2","remote-source":["Project","id","name"]}], + [ "status", {"label":"Status","type":"select","source":[["Current","Current"],["Inactive","Inactive"],["Completed","Completed"]]}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}] + ]; +}); diff --git a/ext/modules/projects/meta.json b/ext/modules/projects/meta.json new file mode 100644 index 00000000..1bc57478 --- /dev/null +++ b/ext/modules/projects/meta.json @@ -0,0 +1,22 @@ +{ +"label":"Projects", +"menu":"Time Management", +"order":"1", +"icon":"fa-pencil-square", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + "Manager":{ + "Add Projects":"Yes", + "Edit Projects":"Yes", + "Delete Projects":"Yes" + }, + + "Employee":{ + "Add Projects":"No", + "Edit Projects":"No", + "Delete Projects":"No" + } + } +} \ No newline at end of file diff --git a/ext/modules/qualifications/api/QualificationsModulesManager.php b/ext/modules/qualifications/api/QualificationsModulesManager.php new file mode 100644 index 00000000..f39a841c --- /dev/null +++ b/ext/modules/qualifications/api/QualificationsModulesManager.php @@ -0,0 +1,119 @@ +addUserClass("EmployeeSkill"); + $this->addUserClass("EmployeeEducation"); + $this->addUserClass("EmployeeCertification"); + $this->addUserClass("EmployeeLanguage"); + } + + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('EmployeeSkill'); + $this->addModelClass('EmployeeEducation'); + $this->addModelClass('EmployeeCertification'); + $this->addModelClass('EmployeeLanguage'); + + + } + + } +} + + +if (!class_exists('EmployeeSkill')) { + + class EmployeeSkill extends ICEHRM_Record { + var $_table = 'EmployeeSkills'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } + + class EmployeeEducation extends ICEHRM_Record { + var $_table = 'EmployeeEducations'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } + + class EmployeeCertification extends ICEHRM_Record { + var $_table = 'EmployeeCertifications'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } + + class EmployeeLanguage extends ICEHRM_Record { + var $_table = 'EmployeeLanguages'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } +} \ No newline at end of file diff --git a/ext/modules/qualifications/index.php b/ext/modules/qualifications/index.php new file mode 100644 index 00000000..58fc3902 --- /dev/null +++ b/ext/modules/qualifications/index.php @@ -0,0 +1,84 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'qualifications'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/qualifications/lib.js b/ext/modules/qualifications/lib.js new file mode 100644 index 00000000..4b7de574 --- /dev/null +++ b/ext/modules/qualifications/lib.js @@ -0,0 +1,200 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function EmployeeSkillAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeSkillAdapter.inherits(AdapterBase); + + + +EmployeeSkillAdapter.method('getDataMapping', function() { + return [ + "id", + "skill_id", + "details" + ]; +}); + +EmployeeSkillAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Skill" }, + { "sTitle": "Details"} + ]; +}); + +EmployeeSkillAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "skill_id", {"label":"Skill","type":"select2","allow-null":true,"remote-source":["Skill","id","name"]}], + [ "details", {"label":"Details","type":"textarea","validation":""}] + ]; +}); + + + + + +/** + * EmployeeEducationAdapter + */ + +function EmployeeEducationAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeEducationAdapter.inherits(AdapterBase); + + + +EmployeeEducationAdapter.method('getDataMapping', function() { + return [ + "id", + "education_id", + "institute", + "date_start", + "date_end" + ]; +}); + +EmployeeEducationAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID", "bVisible":false}, + { "sTitle": "Qualification" }, + { "sTitle": "Institute"}, + { "sTitle": "Start Date"}, + { "sTitle": "Completed On"}, + ]; +}); + +EmployeeEducationAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "education_id", {"label":"Qualification","type":"select2","allow-null":false,"remote-source":["Education","id","name"]}], + [ "institute", {"label":"Institute","type":"text","validation":""}], + [ "date_start", {"label":"Start Date","type":"date","validation":"none"}], + [ "date_end", {"label":"Completed On","type":"date","validation":"none"}] + ]; +}); + + + + + +/** + * EmployeeCertificationAdapter + */ + +function EmployeeCertificationAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeCertificationAdapter.inherits(AdapterBase); + + + +EmployeeCertificationAdapter.method('getDataMapping', function() { + return [ + "id", + "certification_id", + "institute", + "date_start", + "date_start" + ]; +}); + +EmployeeCertificationAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID","bVisible":false}, + { "sTitle": "Certification" }, + { "sTitle": "Institute"}, + { "sTitle": "Granted On"}, + { "sTitle": "Valid Thru"}, + ]; +}); + +EmployeeCertificationAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "certification_id", {"label":"Certification","type":"select2","allow-null":false,"remote-source":["Certification","id","name"]}], + [ "institute", {"label":"Institute","type":"text","validation":""}], + [ "date_start", {"label":"Granted On","type":"date","validation":"none"}], + [ "date_end", {"label":"Valid Thru","type":"date","validation":"none"}] + ]; +}); + + + +/** + * EmployeeLanguageAdapter + */ + +function EmployeeLanguageAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeLanguageAdapter.inherits(AdapterBase); + + + +EmployeeLanguageAdapter.method('getDataMapping', function() { + return [ + "id", + "language_id", + "reading", + "speaking", + "writing", + "understanding" + ]; +}); + +EmployeeLanguageAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID", "bVisible":false }, + { "sTitle": "Language" }, + { "sTitle": "Reading"}, + { "sTitle": "Speaking"}, + { "sTitle": "Writing"}, + { "sTitle": "Understanding"} + ]; +}); + +EmployeeLanguageAdapter.method('getFormFields', function() { + + var compArray = [["Elementary Proficiency","Elementary Proficiency"], + ["Limited Working Proficiency","Limited Working Proficiency"], + ["Professional Working Proficiency","Professional Working Proficiency"], + ["Full Professional Proficiency","Full Professional Proficiency"], + ["Native or Bilingual Proficiency","Native or Bilingual Proficiency"]]; + + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "language_id", {"label":"Language","type":"select2","allow-null":false,"remote-source":["Language","id","name"]}], + [ "reading", {"label":"Reading","type":"select","source":compArray}], + [ "speaking", {"label":"Speaking","type":"select","source":compArray}], + [ "writing", {"label":"Writing","type":"select","source":compArray}], + [ "understanding", {"label":"Understanding","type":"select","source":compArray}] + ]; +}); + diff --git a/ext/modules/qualifications/meta.json b/ext/modules/qualifications/meta.json new file mode 100644 index 00000000..f3b5c479 --- /dev/null +++ b/ext/modules/qualifications/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Qualifications", +"menu":"Personal Information", +"order":"3", +"icon":"fa-graduation-cap", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/modules/salary/api/SalaryModulesManager.php b/ext/modules/salary/api/SalaryModulesManager.php new file mode 100644 index 00000000..511bd876 --- /dev/null +++ b/ext/modules/salary/api/SalaryModulesManager.php @@ -0,0 +1,51 @@ +addUserClass("EmployeeSalary"); + } + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('EmployeeSalary'); + + } + + } +} + + +if (!class_exists('EmployeeSalary')) { + + class EmployeeSalary extends ICEHRM_Record { + var $_table = 'EmployeeSalary'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } +} \ No newline at end of file diff --git a/ext/modules/salary/index.php b/ext/modules/salary/index.php new file mode 100644 index 00000000..4ba94220 --- /dev/null +++ b/ext/modules/salary/index.php @@ -0,0 +1,64 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'salary'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/salary/lib.js b/ext/modules/salary/lib.js new file mode 100644 index 00000000..cae57723 --- /dev/null +++ b/ext/modules/salary/lib.js @@ -0,0 +1,62 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function EmployeeSalaryAdapter(endPoint) { + this.initAdapter(endPoint); +} + +EmployeeSalaryAdapter.inherits(AdapterBase); + + + +EmployeeSalaryAdapter.method('getDataMapping', function() { + return [ + "id", + "component", + "pay_frequency", + "currency", + "amount", + "details" + ]; +}); + +EmployeeSalaryAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Salary Component" }, + { "sTitle": "Pay Frequency"}, + { "sTitle": "Currency"}, + { "sTitle": "Amount"}, + { "sTitle": "Details"} + ]; +}); + +EmployeeSalaryAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "component", {"label":"Salary Component","type":"select2","remote-source":["SalaryComponent","id","name"]}], + [ "pay_frequency", {"label":"Pay Frequency","type":"select","source":[["Hourly","Hourly"],["Daily","Daily"],["Bi Weekly","Bi Weekly"],["Weekly","Weekly"],["Semi Monthly","Semi Monthly"],["Monthly","Monthly"]]}], + [ "currency", {"label":"Currency","type":"select","remote-source":["CurrencyType","id","name"]}], + [ "amount", {"label":"Amount","type":"text","validation":"float"}], + [ "details", {"label":"Details","type":"textarea","validation":"none"}] + ]; +}); diff --git a/ext/modules/salary/meta.json b/ext/modules/salary/meta.json new file mode 100644 index 00000000..1cce4a78 --- /dev/null +++ b/ext/modules/salary/meta.json @@ -0,0 +1,22 @@ +{ +"label":"Salary", +"menu":"Personal Information", +"order":"4", +"icon":"fa-calculator", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + "Manager":{ + "Add Salary":"No", + "Edit Salary":"No", + "Delete Salary":"No" + }, + + "Employee":{ + "Add Salary":"No", + "Edit Salary":"No", + "Delete Salary":"No" + } + } +} \ No newline at end of file diff --git a/ext/modules/subordinates/api/SubordinatesModulesManager.php b/ext/modules/subordinates/api/SubordinatesModulesManager.php new file mode 100644 index 00000000..00c58f9c --- /dev/null +++ b/ext/modules/subordinates/api/SubordinatesModulesManager.php @@ -0,0 +1,23 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'subordinates'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; +?>
+ + + +
+
+
+ +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/ext/modules/subordinates/lib.js b/ext/modules/subordinates/lib.js new file mode 100644 index 00000000..c5225e7f --- /dev/null +++ b/ext/modules/subordinates/lib.js @@ -0,0 +1,83 @@ +/** + * Author: Thilina Hasantha + */ + +function SubordinateAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +SubordinateAdapter.inherits(AdapterBase); + + + +SubordinateAdapter.method('getDataMapping', function() { + return [ + "id", + "employee_id", + "first_name", + "last_name", + "mobile_phone", + "department", + "gender", + "supervisor" + ]; +}); + +SubordinateAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" }, + { "sTitle": "Employee Number" }, + { "sTitle": "First Name" }, + { "sTitle": "Last Name"}, + { "sTitle": "Mobile"}, + { "sTitle": "Department"}, + { "sTitle": "Gender"}, + { "sTitle": "Supervisor"} + ]; +}); + +SubordinateAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden","validation":""}], + [ "employee_id", {"label":"Employee Number","type":"text","validation":""}], + [ "first_name", {"label":"First Name","type":"text","validation":""}], + [ "middle_name", {"label":"Middle Name","type":"text","validation":"none"}], + [ "last_name", {"label":"Last Name","type":"text","validation":""}], + [ "nationality", {"label":"Nationality","type":"select2","remote-source":["Nationality","id","name"]}], + [ "birthday", {"label":"Date of Birth","type":"date","validation":""}], + [ "gender", {"label":"Gender","type":"select","source":[["Male","Male"],["Female","Female"]]}], + [ "marital_status", {"label":"Marital Status","type":"select","source":[["Married","Married"],["Single","Single"],["Divorced","Divorced"],["Widowed","Widowed"],["Other","Other"]]}], + [ "ssn_num", {"label":"SSN/NRIC","type":"text","validation":"none"}], + [ "nic_num", {"label":"NIC","type":"text","validation":"none"}], + [ "other_id", {"label":"Other ID","type":"text","validation":"none"}], + [ "driving_license", {"label":"Driving License No","type":"text","validation":"none"}], + /*[ "driving_license_exp_date", {"label":"License Exp Date","type":"date","validation":"none"}],*/ + [ "employment_status", {"label":"Employment Status","type":"select2","remote-source":["EmploymentStatus","id","name"]}], + [ "job_title", {"label":"Job Title","type":"select2","remote-source":["JobTitle","id","name"]}], + [ "pay_grade", {"label":"Pay Grade","type":"select2","allow-null":true,"remote-source":["PayGrade","id","name"]}], + [ "work_station_id", {"label":"Work Station Id","type":"text","validation":"none"}], + [ "address1", {"label":"Address Line 1","type":"text","validation":"none"}], + [ "address2", {"label":"Address Line 2","type":"text","validation":"none"}], + [ "city", {"label":"City","type":"text","validation":"none"}], + [ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}], + [ "province", {"label":"Province","type":"select2","allow-null":true,"remote-source":["Province","id","name"]}], + [ "postal_code", {"label":"Postal/Zip Code","type":"text","validation":"none"}], + [ "home_phone", {"label":"Home Phone","type":"text","validation":"none"}], + [ "mobile_phone", {"label":"Mobile Phone","type":"text","validation":"none"}], + [ "work_phone", {"label":"Work Phone","type":"text","validation":"none"}], + [ "work_email", {"label":"Work Email","type":"text","validation":"email"}], + [ "private_email", {"label":"Private Email","type":"text","validation":"email"}], + [ "joined_date", {"label":"Joined Date","type":"date","validation":"none"}], + [ "confirmation_date", {"label":"Confirmation Date","type":"date","validation":"none"}], + [ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"]}], + [ "supervisor", {"label":"Supervisor","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}] + ]; +}); + +SubordinateAdapter.method('getActionButtonsHtml', function(id) { + var html = '
'; + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); + diff --git a/ext/modules/subordinates/meta.json b/ext/modules/subordinates/meta.json new file mode 100644 index 00000000..7711b282 --- /dev/null +++ b/ext/modules/subordinates/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Subordinates", +"menu":"Subordinates", +"order":"1", +"icon":"fa-users", +"user_levels":["Admin","Manager"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/modules/time_sheets/api/Time_sheetsActionManager.php b/ext/modules/time_sheets/api/Time_sheetsActionManager.php new file mode 100644 index 00000000..ff66e214 --- /dev/null +++ b/ext/modules/time_sheets/api/Time_sheetsActionManager.php @@ -0,0 +1,165 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +class Time_sheetsActionManager extends SubActionManager{ + public function getTimeEntries($req){ + $employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true); + $timeSheetEntry = new EmployeeTimeEntry(); + $list = $timeSheetEntry->Find("timesheet = ? order by date_start",array($req->id)); + $mappingStr = $req->sm; + $map = json_decode($mappingStr); + if(!$list){ + LogManager::getInstance()->info($timeSheetEntry->ErrorMsg()); + } + + if(!empty($mappingStr)){ + $list = $this->baseService->populateMapping($list,$map); + } + return new IceResponse(IceResponse::SUCCESS,$list); + } + + public function changeTimeSheetStatus($req){ + $employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true); + + $subordinate = new Employee(); + $subordinates = $subordinate->Find("supervisor = ?",array($employee->id)); + + $subordinatesIds = array(); + foreach($subordinates as $sub){ + $subordinatesIds[] = $sub->id; + } + + + $timeSheet = new EmployeeTimeSheet(); + $timeSheet->Load("id = ?",array($req->id)); + if($timeSheet->id != $req->id){ + return new IceResponse(IceResponse::ERROR,"Timesheet not found"); + } + + if($req->status == 'Submitted' && $employee->id == $timeSheet->employee){ + + }else if(!in_array($timeSheet->employee, $subordinatesIds) && $this->user->user_level != 'Admin'){ + return new IceResponse(IceResponse::ERROR,"This Timesheet does not belong to any of your subordinates"); + } + + $oldStatus = $timeSheet->status; + $timeSheet->status = $req->status; + + if($oldStatus == $req->status){ + return new IceResponse(IceResponse::SUCCESS,""); + } + + $ok = $timeSheet->Save(); + if(!$ok){ + LogManager::getInstance()->info($timeSheet->ErrorMsg()); + } + + + $timeSheetEmployee = $this->baseService->getElement('Employee',$timeSheet->employee,null,true); + + + $this->baseService->audit(IceConstants::AUDIT_ACTION, "Timesheet [".$timeSheetEmployee->first_name." ".$timeSheetEmployee->last_name." - ".date("M d, Y (l)",strtotime($timeSheet->date_start))." to ".date("M d, Y (l)",strtotime($timeSheet->date_end))."] status changed from:".$oldStatus." to:".$req->status); + + if($timeSheet->status == "Submitted" && $employee->id == $timeSheet->employee){ + $notificationMsg = $employee->first_name." ".$employee->last_name." submitted timesheet from ".date("M d, Y (l)",strtotime($timeSheet->date_start))." to ".date("M d, Y (l)",strtotime($timeSheet->date_end)); + $this->baseService->notificationManager->addNotification($employee->supervisor,$notificationMsg,'{"type":"url","url":"g=modules&n=time_sheets&m=module_Time_Management#tabSubEmployeeTimeSheetAll"}',IceConstants::NOTIFICATION_TIMESHEET); + + }else if($timeSheet->status == "Approved" || $timeSheet->status == "Rejected"){ + $notificationMsg = $employee->first_name." ".$employee->last_name." ".$timeSheet->status." timesheet from ".date("M d, Y (l)",strtotime($timeSheet->date_start))." to ".date("M d, Y (l)",strtotime($timeSheet->date_end)); + $this->baseService->notificationManager->addNotification($timeSheet->employee,$notificationMsg,'{"type":"url","url":"g=modules&n=time_sheets&m=module_Time_Management#tabEmployeeTimeSheetApproved"}',IceConstants::NOTIFICATION_TIMESHEET); + } + + + return new IceResponse(IceResponse::SUCCESS,""); + } + + public function createPreviousTimesheet($req){ + $employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true); + + + + $timeSheet = new EmployeeTimeSheet(); + $timeSheet->Load("id = ?",array($req->id)); + if($timeSheet->id != $req->id){ + return new IceResponse(IceResponse::ERROR,"Timesheet not found"); + } + + if($timeSheet->employee != $employee->id){ + return new IceResponse(IceResponse::ERROR,"You don't have permissions to add this Timesheet"); + } + + $end = date("Y-m-d", strtotime("last Saturday", strtotime($timeSheet->date_start))); + $start = date("Y-m-d", strtotime("last Sunday", strtotime($end))); + + $tempTimeSheet = new EmployeeTimeSheet(); + $tempTimeSheet->Load("employee = ? and date_start = ?",array($employee->id, $start)); + if($employee->id == $tempTimeSheet->employee){ + return new IceResponse(IceResponse::ERROR,"Timesheet already exists"); + } + + $newTimeSheet = new EmployeeTimeSheet(); + $newTimeSheet->employee = $employee->id; + $newTimeSheet->date_start = $start; + $newTimeSheet->date_end = $end; + $newTimeSheet->status = "Pending"; + $ok = $newTimeSheet->Save(); + if(!$ok){ + LogManager::getInstance()->info("Error creating time sheet : ".$newTimeSheet->ErrorMsg()); + return new IceResponse(IceResponse::ERROR,"Error creating Timesheet"); + } + + + return new IceResponse(IceResponse::SUCCESS,""); + } + + public function getSubEmployeeTimeSheets($req){ + + $employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true); + + $subordinate = new Employee(); + $subordinates = $subordinate->Find("supervisor = ?",array($employee->id)); + + $subordinatesIds = ""; + foreach($subordinates as $sub){ + if($subordinatesIds != ""){ + $subordinatesIds.=","; + } + $subordinatesIds.=$sub->id; + } + $subordinatesIds.=""; + + + $mappingStr = $req->sm; + $map = json_decode($mappingStr); + $timeSheet = new EmployeeTimeSheet(); + $list = $timeSheet->Find("employee in (".$subordinatesIds.")",array()); + if(!$list){ + LogManager::getInstance()->info($timeSheet->ErrorMsg()); + } + if(!empty($mappingStr)){ + $list = $this->baseService->populateMapping($list,$map); + } + + return new IceResponse(IceResponse::SUCCESS,$list); + } +} \ No newline at end of file diff --git a/ext/modules/time_sheets/api/Time_sheetsInitialize.php b/ext/modules/time_sheets/api/Time_sheetsInitialize.php new file mode 100644 index 00000000..5e3157c7 --- /dev/null +++ b/ext/modules/time_sheets/api/Time_sheetsInitialize.php @@ -0,0 +1,67 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +class Time_sheetsInitialize extends AbstractInitialize{ + + public function init(){ + //Add Employee time sheets if it is not already created for current week + $empId = $this->getCurrentProfileId(); + if(date('w', strtotime("now")) == 0) { + $start = date("Y-m-d", strtotime("now")); + }else{ + $start = date("Y-m-d", strtotime("last Sunday")); + } + + if(date('w', strtotime("now")) == 6) { + $end = date("Y-m-d", strtotime("now")); + }else{ + $end = date("Y-m-d", strtotime("next Saturday")); + } + + + + $timeSheet = new EmployeeTimeSheet(); + $timeSheet->Load("employee = ? and date_start = ? and date_end = ?",array($empId,$start,$end)); + if($timeSheet->date_start == $start && $timeSheet->employee == $empId){ + + }else{ + if(!empty($empId)){ + $timeSheet->employee = $empId; + $timeSheet->date_start = $start; + $timeSheet->date_end = $end; + $timeSheet->status = "Pending"; + $ok = $timeSheet->Save(); + if(!$ok){ + LogManager::getInstance()->info("Error creating time sheet : ".$timeSheet->ErrorMsg()); + } + } + + } + + + //Generate missing timesheets + + + } + +} \ No newline at end of file diff --git a/ext/modules/time_sheets/api/Time_sheetsModulesManager.php b/ext/modules/time_sheets/api/Time_sheetsModulesManager.php new file mode 100644 index 00000000..df57ae83 --- /dev/null +++ b/ext/modules/time_sheets/api/Time_sheetsModulesManager.php @@ -0,0 +1,82 @@ +addUserClass("EmployeeTimeSheet"); + $this->addUserClass("EmployeeTimeEntry"); + } + + public function initializeFieldMappings(){ + + } + + public function initializeDatabaseErrorMappings(){ + + } + + public function setupModuleClassDefinitions(){ + + $this->addModelClass('EmployeeTimeSheet'); + $this->addModelClass('EmployeeTimeEntry'); + + } + + } +} + +if (!class_exists('EmployeeTimeSheet')) { + + class EmployeeTimeSheet extends ICEHRM_Record { + var $_table = 'EmployeeTimeSheets'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get","element"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + } + + class EmployeeTimeEntry extends ICEHRM_Record { + var $_table = 'EmployeeTimeEntry'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save","delete"); + } + + public function getUserAccess(){ + return array("get"); + } + + public function getUserOnlyMeAccess(){ + return array("element","save","delete"); + } + + public function validateSave($obj){ + if(SettingsManager::getInstance()->getSetting("Attendance: Time-sheet Cross Check") == "1"){ + $attendance = new Attendance(); + $list = $attendance->Find("employee = ? and in_time <= ? and out_time >= ?",array($obj->employee,$obj->date_start,$obj->date_end)); + if(empty($list) || count($list) == 0){ + return new IceResponse(IceResponse::ERROR,"The time entry can not be added since you have not marked attendance for selected period"); + } + } + return new IceResponse(IceResponse::SUCCESS,""); + } + } + +} \ No newline at end of file diff --git a/ext/modules/time_sheets/customTemplates/time_entry_form.html b/ext/modules/time_sheets/customTemplates/time_entry_form.html new file mode 100644 index 00000000..78468dc5 --- /dev/null +++ b/ext/modules/time_sheets/customTemplates/time_entry_form.html @@ -0,0 +1,19 @@ + +
+
+
+
+ +
+
+ _fields_ +
+
+ + +
+
+
+
+
+
diff --git a/ext/modules/time_sheets/index.php b/ext/modules/time_sheets/index.php new file mode 100644 index 00000000..4739fe82 --- /dev/null +++ b/ext/modules/time_sheets/index.php @@ -0,0 +1,163 @@ +. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +$moduleName = 'employee_TimeSheet'; +define('MODULE_PATH',dirname(__FILE__)); +include APP_BASE_PATH.'header.php'; +include APP_BASE_PATH.'modulejslibs.inc.php'; + + +//custom code +$employeeProjects = array(); +$allowAllProjects = $settingsManager->getSetting("Projects: Make All Projects Available to Employees"); +if($allowAllProjects == 0){ + $employeeProjects = array(); + $employeeProjectsTemp = $baseService->get("EmployeeProject"); + foreach($employeeProjectsTemp as $p){ + $project = new Project(); + $project->Load("id = ?",$p->project); + $p->name = $project->name; + $employeeProjects[] = $p; + } +}else{ + $employeeProjects = $baseService->get("Project"); +} + + +?>
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + + + + + \ No newline at end of file diff --git a/ext/modules/time_sheets/lib.js b/ext/modules/time_sheets/lib.js new file mode 100644 index 00000000..efae5e5d --- /dev/null +++ b/ext/modules/time_sheets/lib.js @@ -0,0 +1,696 @@ +/* +This file is part of iCE Hrm. + +iCE Hrm is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +iCE Hrm is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with iCE Hrm. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function EmployeeTimeSheetAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +EmployeeTimeSheetAdapter.inherits(AdapterBase); + +this.currentTimesheetId = null; +this.currentTimesheet = null; + +EmployeeTimeSheetAdapter.method('getDataMapping', function() { + return [ + "id", + "date_start", + "date_end", + "status" + ]; +}); + +EmployeeTimeSheetAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Start Date"}, + { "sTitle": "End Date"}, + { "sTitle": "Status"} + ]; +}); + +EmployeeTimeSheetAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "date_start", {"label":"TimeSheet Start Date","type":"date","validation":""}], + [ "date_end", {"label":"TimeSheet End Date","type":"date","validation":""}], + [ "details", {"label":"Reason","type":"textarea","validation":"none"}] + ]; +}); + +EmployeeTimeSheetAdapter.method('preProcessTableData', function(row) { + row[1] = Date.parse(row[1]).toString('MMM d, yyyy (dddd)'); + row[2] = Date.parse(row[2]).toString('MMM d, yyyy (dddd)'); + return row; +}); + +EmployeeTimeSheetAdapter.method('renderForm', function(object) { + var formHtml = this.templates['formTemplate']; + var html = ""; + + $("#"+this.getTableName()+'Form').html(formHtml); + $("#"+this.getTableName()+'Form').show(); + $("#"+this.getTableName()).hide(); + + $('#timesheet_start').html(Date.parse(object.date_start).toString('MMM d, yyyy (dddd)')); + $('#timesheet_end').html(Date.parse(object.date_end).toString('MMM d, yyyy (dddd)')); + + this.currentTimesheet = object; + + this.getTimeEntries(); + +}); + + +EmployeeTimeSheetAdapter.method('openTimeEntryDialog', function() { + this.currentTimesheetId = this.currentId; + var obj = modJsList['tabEmployeeTimeEntry']; + $('#TimeEntryModel').modal({ + backdrop: 'static', + keyboard: false + }); + obj.currentTimesheet = this.currentTimesheet; + obj.renderForm(); + obj.timesheetId = this.currentId; + +}); + +EmployeeTimeSheetAdapter.method('closeTimeEntryDialog', function() { + $('#TimeEntryModel').modal('hide'); +}); + + +EmployeeTimeSheetAdapter.method('getTimeEntries', function() { + timesheetId = this.currentId; + var sourceMappingJson = JSON.stringify(modJsList['tabEmployeeTimeEntry'].getSourceMapping()); + object = {"id":timesheetId,"sm":sourceMappingJson}; + + var reqJson = JSON.stringify(object); + + var callBackData = []; + callBackData['callBackData'] = []; + callBackData['callBackSuccess'] = 'getTimeEntriesSuccessCallBack'; + callBackData['callBackFail'] = 'getTimeEntriesFailCallBack'; + + this.customAction('getTimeEntries','modules=time_sheets',reqJson,callBackData); +}); + +EmployeeTimeSheetAdapter.method('getTimeEntriesSuccessCallBack', function(callBackData) { + var entries = callBackData; + var html = ""; + var temp = '_start__end__duration__project__details_'; + + for(var i=0;i'; + + + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + html = html.replace(/_status_/g,data[3]); + return html; +}); + + +SubEmployeeTimeSheetAdapter.method('getCustomTableParams', function() { + var that = this; + var dataTableParams = { + "aoColumnDefs": [ + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 2) + } , + "aTargets": [2] + }, + { + "fnRender": function(data, cell){ + return that.preProcessRemoteTableData(data, cell, 3) + } , + "aTargets": [3] + }, + { + "fnRender": that.getActionButtons, + "aTargets": [that.getDataMapping().length] + } + ] + }; + return dataTableParams; +}); + + +/** + * EmployeeTimeEntryAdapter + */ + +function EmployeeTimeEntryAdapter(endPoint,tab,filter,orderBy) { + this.initAdapter(endPoint,tab,filter,orderBy); +} + +EmployeeTimeEntryAdapter.inherits(AdapterBase); + +this.timesheetId = null; +this.currentTimesheet = null; +this.allProjectsAllowed = 1; +this.employeeProjects = []; + +EmployeeTimeEntryAdapter.method('getDataMapping', function() { + return [ + "id", + "project", + "date_start", + "time_start", + "date_end", + "time_end", + "details" + ]; +}); + +EmployeeTimeEntryAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Project"}, + { "sTitle": "Start Date"}, + { "sTitle": "Start Time"}, + { "sTitle": "End Date"}, + { "sTitle": "End Time"}, + { "sTitle": "Details"} + ]; +}); + +EmployeeTimeEntryAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "project", {"label":"Project","type":"select2","allow-null":true,"remote-source":["Project","id","name"]}], + //[ "project", {"label":"Project","type":"select","source":[]}], + [ "date_select", {"label":"Date","type":"select","source":[]}], + [ "date_start", {"label":"Start Time","type":"time","validation":""}], + /*[ "time_start", {"label":"Start Time","type":"time"}],*/ + [ "date_end", {"label":"End Time","type":"time","validation":""}], + /*[ "time_end", {"label":"End Time","type":"time"}],*/ + [ "details", {"label":"Details","type":"textarea","validation":""}] + ]; +}); + +/* +EmployeeTimeEntryAdapter.method('renderForm', function(object) { + var formHtml = this.templates['orig_formTemplate']; + formHtml = formHtml.replace(/modJs/g,"modJsList['tabEmployeeTimeEntry']"); + var html = ""; + var fields = this.getFormFields(); + for(var i=0;i'+datesArray[i].toString("d-MMM-yyyy")+''; + } + + + + formHtml = formHtml.replace(/_id_/g,this.getTableName()+"_submit"); + formHtml = formHtml.replace(/_fields_/g,html); + $("#"+this.getTableName()+'Form').html(formHtml); + $("#"+this.getTableName()+'Form').show(); + $("#"+this.getTableName()).hide(); + + $("#"+this.getTableName()+'Form .datefield').datepicker({'viewMode':2}); + $("#"+this.getTableName()+'Form .datetimefield').datetimepicker({ + language: 'en' + }); + $("#"+this.getTableName()+'Form .timefield').datetimepicker({ + language: 'en', + pickDate: false + }); + + $("#"+this.getTableName()+'Form .select2Field').select2(); + + $("#date_select").html(optionList); + + var projectOptionList = ""; + projectOptionList += ''; + if(this.allProjectsAllowed == 0){ + for(var i=0;i'+this.employeeProjects[i].name+''; + } + }else{ + for(var i=0;i'+this.employeeProjects[i].name+''; + } + } + + $("#project").html(projectOptionList); + + if(object != undefined && object != null){ + this.fillForm(object); + } +}); + + +EmployeeTimeEntryAdapter.method('cancel', function() { + $('#TimeEntryModel').modal('hide'); +}); + +EmployeeTimeEntryAdapter.method('setAllProjectsAllowed', function(allProjectsAllowed) { + this.allProjectsAllowed = allProjectsAllowed; +}); + +EmployeeTimeEntryAdapter.method('setEmployeeProjects', function(employeeProjects) { + this.employeeProjects = employeeProjects; +}); + +/* +EmployeeTimeEntryAdapter.method('save', function() { + var validator = new FormValidation(this.getTableName()+"_submit",true,{'ShowPopup':false,"LabelErrorClass":"error"}); + + if(validator.checkValues()){ + var params = validator.getFormParameters(); + params.date_end = params.date_start; + $(params).attr('timesheet',this.timesheetId); + + if(params.time_start.indexOf("am") != -1 && params.time_start.indexOf("12:") != -1){ + params.time_start = params.time_start.replace("12:","00:"); + } + + if(params.time_end.indexOf("am") != -1 && params.time_end.indexOf("12:") != -1){ + params.time_end = params.time_end.replace("12:","00:"); + } + + params.date_start = Date.parse(params.date_start+" "+params.time_start.replace('am',' AM').replace('pm',' PM')).toString("yyyy-MM-dd HH:mm:ss"); + params.date_end = Date.parse(params.date_end+" "+params.time_end.replace('am',' AM').replace('pm',' PM')).toString("yyyy-MM-dd HH:mm:ss"); + var msg = this.doCustomValidation(params); + + if(msg == null){ + var id = $('#'+this.getTableName()+"_submit #id").val(); + if(id != null && id != undefined && id != ""){ + $(params).attr('id',id); + } + this.add(params,[]); + this.cancel(); + }else{ + $("#"+this.getTableName()+'Form .label').html(msg); + $("#"+this.getTableName()+'Form .label').show(); + } + + } +}); +*/ + +EmployeeTimeEntryAdapter.method('save', function() { + var validator = new FormValidation(this.getTableName()+"_submit",true,{'ShowPopup':false,"LabelErrorClass":"error"}); + + if(validator.checkValues()){ + var params = validator.getFormParameters(); + $(params).attr('timesheet',this.timesheetId); + + params.time_start = params.date_start; + params.time_end = params.date_end; + + params.date_start = params.date_select+" "+params.date_start; + params.date_end = params.date_select+" "+params.date_end; + + + var msg = this.doCustomValidation(params); + + if(msg == null){ + var id = $('#'+this.getTableName()+"_submit #id").val(); + if(id != null && id != undefined && id != ""){ + $(params).attr('id',id); + } + this.add(params,[]); + this.cancel(); + }else{ + $("#"+this.getTableName()+'Form .label').html(msg); + $("#"+this.getTableName()+'Form .label').show(); + } + + } +}); + +EmployeeTimeEntryAdapter.method('doCustomValidation', function(params) { + var st = Date.parse(params.date_start.replace(" ","T")); + var et = Date.parse(params.date_end.replace(" ","T")); + if(st.compareTo(et) != -1){ + return "Start time should be less than End time"; + } + /* + var sd = Date.parse(this.currentTimesheet.date_start); + var ed = Date.parse(this.currentTimesheet.date_end).addDays(1); + + if(sd.compareTo(et) != -1 || sd.compareTo(st) > 0 || st.compareTo(ed) != -1 || et.compareTo(ed) != -1){ + return "Start time and end time shoud be with in " + sd.toString('MMM d, yyyy (dddd)') + " and " + ed.toString('MMM d, yyyy (dddd)'); + } + */ + return null; +}); + +EmployeeTimeEntryAdapter.method('addSuccessCallBack', function(callBackData,serverData) { + this.get(callBackData); + modJs.getTimeEntries(); +}); + +EmployeeTimeEntryAdapter.method('deleteRow', function(id) { + this.deleteObj(id,[]); + +}); + +EmployeeTimeEntryAdapter.method('deleteSuccessCallBack', function(callBackData,serverData) { + modJs.getTimeEntries(); +}); \ No newline at end of file diff --git a/ext/modules/time_sheets/meta.json b/ext/modules/time_sheets/meta.json new file mode 100644 index 00000000..e0149e17 --- /dev/null +++ b/ext/modules/time_sheets/meta.json @@ -0,0 +1,11 @@ +{ +"label":"Time Sheets", +"menu":"Time Management", +"order":"3", +"icon":"fa-check-circle-o", +"user_levels":["Admin","Manager","Employee"], + +"permissions": + { + } +} \ No newline at end of file diff --git a/ext/modules/time_sheets/templates/form_template.html b/ext/modules/time_sheets/templates/form_template.html new file mode 100644 index 00000000..d979b513 --- /dev/null +++ b/ext/modules/time_sheets/templates/form_template.html @@ -0,0 +1,23 @@ +
+ + Timesheet From to + + + + + + + + + + + + + + +
StartEndDurationProjectDetails
+
+ + +
+
\ No newline at end of file diff --git a/lib/Mail.php b/lib/Mail.php new file mode 100644 index 00000000..4347dc5f --- /dev/null +++ b/lib/Mail.php @@ -0,0 +1,270 @@ + + * @copyright 1997-2010 Chuck Hagenbuch + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Mail.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @link http://pear.php.net/package/Mail/ + */ + +//require_once 'PEAR.php'; + +/** + * PEAR's Mail:: interface. Defines the interface for implementing + * mailers under the PEAR hierarchy, and provides supporting functions + * useful in multiple mailer backends. + * + * @access public + * @version $Revision: 294747 $ + * @package Mail + */ +class Mail +{ + /** + * Line terminator used for separating header lines. + * @var string + */ + var $sep = "\r\n"; + + /** + * Provides an interface for generating Mail:: objects of various + * types + * + * @param string $driver The kind of Mail:: object to instantiate. + * @param array $params The parameters to pass to the Mail:: object. + * @return object Mail a instance of the driver class or if fails a PEAR Error + * @access public + */ + function &factory($driver, $params = array()) + { + $driver = strtolower($driver); + @include_once 'Mail/' . $driver . '.php'; + $class = 'Mail_' . $driver; + if (class_exists($class)) { + $mailer = new $class($params); + return $mailer; + } else { + return PEAR::raiseError('Unable to find class for driver ' . $driver); + } + } + + /** + * Implements Mail::send() function using php's built-in mail() + * command. + * + * @param mixed $recipients Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of recipients, + * each RFC822 valid. This may contain recipients not + * specified in the headers, for Bcc:, resending + * messages, etc. + * + * @param array $headers The array of headers to send with the mail, in an + * associative array, where the array key is the + * header name (ie, 'Subject'), and the array value + * is the header value (ie, 'test'). The header + * produced from those values would be 'Subject: + * test'. + * + * @param string $body The full text of the message body, including any + * Mime parts, etc. + * + * @return mixed Returns true on success, or a PEAR_Error + * containing a descriptive error message on + * failure. + * + * @access public + * @deprecated use Mail_mail::send instead + */ + function send($recipients, $headers, $body) + { + if (!is_array($headers)) { + return PEAR::raiseError('$headers must be an array'); + } + + $result = $this->_sanitizeHeaders($headers); + if (is_a($result, 'PEAR_Error')) { + return $result; + } + + // if we're passed an array of recipients, implode it. + if (is_array($recipients)) { + $recipients = implode(', ', $recipients); + } + + // get the Subject out of the headers array so that we can + // pass it as a seperate argument to mail(). + $subject = ''; + if (isset($headers['Subject'])) { + $subject = $headers['Subject']; + unset($headers['Subject']); + } + + // flatten the headers out. + list(, $text_headers) = Mail::prepareHeaders($headers); + + return mail($recipients, $subject, $body, $text_headers); + } + + /** + * Sanitize an array of mail headers by removing any additional header + * strings present in a legitimate header's value. The goal of this + * filter is to prevent mail injection attacks. + * + * @param array $headers The associative array of headers to sanitize. + * + * @access private + */ + function _sanitizeHeaders(&$headers) + { + foreach ($headers as $key => $value) { + $headers[$key] = + preg_replace('=((||0x0A/%0A|0x0D/%0D|\\n|\\r)\S).*=i', + null, $value); + } + } + + /** + * Take an array of mail headers and return a string containing + * text usable in sending a message. + * + * @param array $headers The array of headers to prepare, in an associative + * array, where the array key is the header name (ie, + * 'Subject'), and the array value is the header + * value (ie, 'test'). The header produced from those + * values would be 'Subject: test'. + * + * @return mixed Returns false if it encounters a bad address, + * otherwise returns an array containing two + * elements: Any From: address found in the headers, + * and the plain text version of the headers. + * @access private + */ + function prepareHeaders($headers) + { + $lines = array(); + $from = null; + + foreach ($headers as $key => $value) { + if (strcasecmp($key, 'From') === 0) { + include_once 'Mail/RFC822.php'; + $parser = new Mail_RFC822(); + $addresses = $parser->parseAddressList($value, 'localhost', false); + if (is_a($addresses, 'PEAR_Error')) { + return $addresses; + } + + $from = $addresses[0]->mailbox . '@' . $addresses[0]->host; + + // Reject envelope From: addresses with spaces. + if (strstr($from, ' ')) { + return false; + } + + $lines[] = $key . ': ' . $value; + } elseif (strcasecmp($key, 'Received') === 0) { + $received = array(); + if (is_array($value)) { + foreach ($value as $line) { + $received[] = $key . ': ' . $line; + } + } + else { + $received[] = $key . ': ' . $value; + } + // Put Received: headers at the top. Spam detectors often + // flag messages with Received: headers after the Subject: + // as spam. + $lines = array_merge($received, $lines); + } else { + // If $value is an array (i.e., a list of addresses), convert + // it to a comma-delimited string of its elements (addresses). + if (is_array($value)) { + $value = implode(', ', $value); + } + $lines[] = $key . ': ' . $value; + } + } + + return array($from, join($this->sep, $lines)); + } + + /** + * Take a set of recipients and parse them, returning an array of + * bare addresses (forward paths) that can be passed to sendmail + * or an smtp server with the rcpt to: command. + * + * @param mixed Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of recipients, + * each RFC822 valid. + * + * @return mixed An array of forward paths (bare addresses) or a PEAR_Error + * object if the address list could not be parsed. + * @access private + */ + function parseRecipients($recipients) + { + include_once 'Mail/RFC822.php'; + + // if we're passed an array, assume addresses are valid and + // implode them before parsing. + if (is_array($recipients)) { + $recipients = implode(', ', $recipients); + } + + // Parse recipients, leaving out all personal info. This is + // for smtp recipients, etc. All relevant personal information + // should already be in the headers. + $addresses = Mail_RFC822::parseAddressList($recipients, 'localhost', false); + + // If parseAddressList() returned a PEAR_Error object, just return it. + if (is_a($addresses, 'PEAR_Error')) { + return $addresses; + } + + $recipients = array(); + if (is_array($addresses)) { + foreach ($addresses as $ob) { + $recipients[] = $ob->mailbox . '@' . $ob->host; + } + } + + return $recipients; + } + +} diff --git a/lib/Mail/RFC822.php b/lib/Mail/RFC822.php new file mode 100644 index 00000000..58d36465 --- /dev/null +++ b/lib/Mail/RFC822.php @@ -0,0 +1,951 @@ + + * @author Chuck Hagenbuch + * @author Chuck Hagenbuch + * @version $Revision: 294749 $ + * @license BSD + * @package Mail + */ +class Mail_RFC822 { + + /** + * The address being parsed by the RFC822 object. + * @var string $address + */ + var $address = ''; + + /** + * The default domain to use for unqualified addresses. + * @var string $default_domain + */ + var $default_domain = 'localhost'; + + /** + * Should we return a nested array showing groups, or flatten everything? + * @var boolean $nestGroups + */ + var $nestGroups = true; + + /** + * Whether or not to validate atoms for non-ascii characters. + * @var boolean $validate + */ + var $validate = true; + + /** + * The array of raw addresses built up as we parse. + * @var array $addresses + */ + var $addresses = array(); + + /** + * The final array of parsed address information that we build up. + * @var array $structure + */ + var $structure = array(); + + /** + * The current error message, if any. + * @var string $error + */ + var $error = null; + + /** + * An internal counter/pointer. + * @var integer $index + */ + var $index = null; + + /** + * The number of groups that have been found in the address list. + * @var integer $num_groups + * @access public + */ + var $num_groups = 0; + + /** + * A variable so that we can tell whether or not we're inside a + * Mail_RFC822 object. + * @var boolean $mailRFC822 + */ + var $mailRFC822 = true; + + /** + * A limit after which processing stops + * @var int $limit + */ + var $limit = null; + + /** + * Sets up the object. The address must either be set here or when + * calling parseAddressList(). One or the other. + * + * @access public + * @param string $address The address(es) to validate. + * @param string $default_domain Default domain/host etc. If not supplied, will be set to localhost. + * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. + * @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. + * + * @return object Mail_RFC822 A new Mail_RFC822 object. + */ + function Mail_RFC822($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null) + { + if (isset($address)) $this->address = $address; + if (isset($default_domain)) $this->default_domain = $default_domain; + if (isset($nest_groups)) $this->nestGroups = $nest_groups; + if (isset($validate)) $this->validate = $validate; + if (isset($limit)) $this->limit = $limit; + } + + /** + * Starts the whole process. The address must either be set here + * or when creating the object. One or the other. + * + * @access public + * @param string $address The address(es) to validate. + * @param string $default_domain Default domain/host etc. + * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. + * @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. + * + * @return array A structured array of addresses. + */ + function parseAddressList($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null) + { + if (!isset($this) || !isset($this->mailRFC822)) { + $obj = new Mail_RFC822($address, $default_domain, $nest_groups, $validate, $limit); + return $obj->parseAddressList(); + } + + if (isset($address)) $this->address = $address; + if (isset($default_domain)) $this->default_domain = $default_domain; + if (isset($nest_groups)) $this->nestGroups = $nest_groups; + if (isset($validate)) $this->validate = $validate; + if (isset($limit)) $this->limit = $limit; + + $this->structure = array(); + $this->addresses = array(); + $this->error = null; + $this->index = null; + + // Unfold any long lines in $this->address. + $this->address = preg_replace('/\r?\n/', "\r\n", $this->address); + $this->address = preg_replace('/\r\n(\t| )+/', ' ', $this->address); + + while ($this->address = $this->_splitAddresses($this->address)); + + if ($this->address === false || isset($this->error)) { + require_once 'PEAR.php'; + return PEAR::raiseError($this->error); + } + + // Validate each address individually. If we encounter an invalid + // address, stop iterating and return an error immediately. + foreach ($this->addresses as $address) { + $valid = $this->_validateAddress($address); + + if ($valid === false || isset($this->error)) { + require_once 'PEAR.php'; + return PEAR::raiseError($this->error); + } + + if (!$this->nestGroups) { + $this->structure = array_merge($this->structure, $valid); + } else { + $this->structure[] = $valid; + } + } + + return $this->structure; + } + + /** + * Splits an address into separate addresses. + * + * @access private + * @param string $address The addresses to split. + * @return boolean Success or failure. + */ + function _splitAddresses($address) + { + if (!empty($this->limit) && count($this->addresses) == $this->limit) { + return ''; + } + + if ($this->_isGroup($address) && !isset($this->error)) { + $split_char = ';'; + $is_group = true; + } elseif (!isset($this->error)) { + $split_char = ','; + $is_group = false; + } elseif (isset($this->error)) { + return false; + } + + // Split the string based on the above ten or so lines. + $parts = explode($split_char, $address); + $string = $this->_splitCheck($parts, $split_char); + + // If a group... + if ($is_group) { + // If $string does not contain a colon outside of + // brackets/quotes etc then something's fubar. + + // First check there's a colon at all: + if (strpos($string, ':') === false) { + $this->error = 'Invalid address: ' . $string; + return false; + } + + // Now check it's outside of brackets/quotes: + if (!$this->_splitCheck(explode(':', $string), ':')) { + return false; + } + + // We must have a group at this point, so increase the counter: + $this->num_groups++; + } + + // $string now contains the first full address/group. + // Add to the addresses array. + $this->addresses[] = array( + 'address' => trim($string), + 'group' => $is_group + ); + + // Remove the now stored address from the initial line, the +1 + // is to account for the explode character. + $address = trim(substr($address, strlen($string) + 1)); + + // If the next char is a comma and this was a group, then + // there are more addresses, otherwise, if there are any more + // chars, then there is another address. + if ($is_group && substr($address, 0, 1) == ','){ + $address = trim(substr($address, 1)); + return $address; + + } elseif (strlen($address) > 0) { + return $address; + + } else { + return ''; + } + + // If you got here then something's off + return false; + } + + /** + * Checks for a group at the start of the string. + * + * @access private + * @param string $address The address to check. + * @return boolean Whether or not there is a group at the start of the string. + */ + function _isGroup($address) + { + // First comma not in quotes, angles or escaped: + $parts = explode(',', $address); + $string = $this->_splitCheck($parts, ','); + + // Now we have the first address, we can reliably check for a + // group by searching for a colon that's not escaped or in + // quotes or angle brackets. + if (count($parts = explode(':', $string)) > 1) { + $string2 = $this->_splitCheck($parts, ':'); + return ($string2 !== $string); + } else { + return false; + } + } + + /** + * A common function that will check an exploded string. + * + * @access private + * @param array $parts The exloded string. + * @param string $char The char that was exploded on. + * @return mixed False if the string contains unclosed quotes/brackets, or the string on success. + */ + function _splitCheck($parts, $char) + { + $string = $parts[0]; + + for ($i = 0; $i < count($parts); $i++) { + if ($this->_hasUnclosedQuotes($string) + || $this->_hasUnclosedBrackets($string, '<>') + || $this->_hasUnclosedBrackets($string, '[]') + || $this->_hasUnclosedBrackets($string, '()') + || substr($string, -1) == '\\') { + if (isset($parts[$i + 1])) { + $string = $string . $char . $parts[$i + 1]; + } else { + $this->error = 'Invalid address spec. Unclosed bracket or quotes'; + return false; + } + } else { + $this->index = $i; + break; + } + } + + return $string; + } + + /** + * Checks if a string has unclosed quotes or not. + * + * @access private + * @param string $string The string to check. + * @return boolean True if there are unclosed quotes inside the string, + * false otherwise. + */ + function _hasUnclosedQuotes($string) + { + $string = trim($string); + $iMax = strlen($string); + $in_quote = false; + $i = $slashes = 0; + + for (; $i < $iMax; ++$i) { + switch ($string[$i]) { + case '\\': + ++$slashes; + break; + + case '"': + if ($slashes % 2 == 0) { + $in_quote = !$in_quote; + } + // Fall through to default action below. + + default: + $slashes = 0; + break; + } + } + + return $in_quote; + } + + /** + * Checks if a string has an unclosed brackets or not. IMPORTANT: + * This function handles both angle brackets and square brackets; + * + * @access private + * @param string $string The string to check. + * @param string $chars The characters to check for. + * @return boolean True if there are unclosed brackets inside the string, false otherwise. + */ + function _hasUnclosedBrackets($string, $chars) + { + $num_angle_start = substr_count($string, $chars[0]); + $num_angle_end = substr_count($string, $chars[1]); + + $this->_hasUnclosedBracketsSub($string, $num_angle_start, $chars[0]); + $this->_hasUnclosedBracketsSub($string, $num_angle_end, $chars[1]); + + if ($num_angle_start < $num_angle_end) { + $this->error = 'Invalid address spec. Unmatched quote or bracket (' . $chars . ')'; + return false; + } else { + return ($num_angle_start > $num_angle_end); + } + } + + /** + * Sub function that is used only by hasUnclosedBrackets(). + * + * @access private + * @param string $string The string to check. + * @param integer &$num The number of occurences. + * @param string $char The character to count. + * @return integer The number of occurences of $char in $string, adjusted for backslashes. + */ + function _hasUnclosedBracketsSub($string, &$num, $char) + { + $parts = explode($char, $string); + for ($i = 0; $i < count($parts); $i++){ + if (substr($parts[$i], -1) == '\\' || $this->_hasUnclosedQuotes($parts[$i])) + $num--; + if (isset($parts[$i + 1])) + $parts[$i + 1] = $parts[$i] . $char . $parts[$i + 1]; + } + + return $num; + } + + /** + * Function to begin checking the address. + * + * @access private + * @param string $address The address to validate. + * @return mixed False on failure, or a structured array of address information on success. + */ + function _validateAddress($address) + { + $is_group = false; + $addresses = array(); + + if ($address['group']) { + $is_group = true; + + // Get the group part of the name + $parts = explode(':', $address['address']); + $groupname = $this->_splitCheck($parts, ':'); + $structure = array(); + + // And validate the group part of the name. + if (!$this->_validatePhrase($groupname)){ + $this->error = 'Group name did not validate.'; + return false; + } else { + // Don't include groups if we are not nesting + // them. This avoids returning invalid addresses. + if ($this->nestGroups) { + $structure = new stdClass; + $structure->groupname = $groupname; + } + } + + $address['address'] = ltrim(substr($address['address'], strlen($groupname . ':'))); + } + + // If a group then split on comma and put into an array. + // Otherwise, Just put the whole address in an array. + if ($is_group) { + while (strlen($address['address']) > 0) { + $parts = explode(',', $address['address']); + $addresses[] = $this->_splitCheck($parts, ','); + $address['address'] = trim(substr($address['address'], strlen(end($addresses) . ','))); + } + } else { + $addresses[] = $address['address']; + } + + // Check that $addresses is set, if address like this: + // Groupname:; + // Then errors were appearing. + if (!count($addresses)){ + $this->error = 'Empty group.'; + return false; + } + + // Trim the whitespace from all of the address strings. + array_map('trim', $addresses); + + // Validate each mailbox. + // Format could be one of: name + // geezer@domain.com + // geezer + // ... or any other format valid by RFC 822. + for ($i = 0; $i < count($addresses); $i++) { + if (!$this->validateMailbox($addresses[$i])) { + if (empty($this->error)) { + $this->error = 'Validation failed for: ' . $addresses[$i]; + } + return false; + } + } + + // Nested format + if ($this->nestGroups) { + if ($is_group) { + $structure->addresses = $addresses; + } else { + $structure = $addresses[0]; + } + + // Flat format + } else { + if ($is_group) { + $structure = array_merge($structure, $addresses); + } else { + $structure = $addresses; + } + } + + return $structure; + } + + /** + * Function to validate a phrase. + * + * @access private + * @param string $phrase The phrase to check. + * @return boolean Success or failure. + */ + function _validatePhrase($phrase) + { + // Splits on one or more Tab or space. + $parts = preg_split('/[ \\x09]+/', $phrase, -1, PREG_SPLIT_NO_EMPTY); + + $phrase_parts = array(); + while (count($parts) > 0){ + $phrase_parts[] = $this->_splitCheck($parts, ' '); + for ($i = 0; $i < $this->index + 1; $i++) + array_shift($parts); + } + + foreach ($phrase_parts as $part) { + // If quoted string: + if (substr($part, 0, 1) == '"') { + if (!$this->_validateQuotedString($part)) { + return false; + } + continue; + } + + // Otherwise it's an atom: + if (!$this->_validateAtom($part)) return false; + } + + return true; + } + + /** + * Function to validate an atom which from rfc822 is: + * atom = 1* + * + * If validation ($this->validate) has been turned off, then + * validateAtom() doesn't actually check anything. This is so that you + * can split a list of addresses up before encoding personal names + * (umlauts, etc.), for example. + * + * @access private + * @param string $atom The string to check. + * @return boolean Success or failure. + */ + function _validateAtom($atom) + { + if (!$this->validate) { + // Validation has been turned off; assume the atom is okay. + return true; + } + + // Check for any char from ASCII 0 - ASCII 127 + if (!preg_match('/^[\\x00-\\x7E]+$/i', $atom, $matches)) { + return false; + } + + // Check for specials: + if (preg_match('/[][()<>@,;\\:". ]/', $atom)) { + return false; + } + + // Check for control characters (ASCII 0-31): + if (preg_match('/[\\x00-\\x1F]+/', $atom)) { + return false; + } + + return true; + } + + /** + * Function to validate quoted string, which is: + * quoted-string = <"> *(qtext/quoted-pair) <"> + * + * @access private + * @param string $qstring The string to check + * @return boolean Success or failure. + */ + function _validateQuotedString($qstring) + { + // Leading and trailing " + $qstring = substr($qstring, 1, -1); + + // Perform check, removing quoted characters first. + return !preg_match('/[\x0D\\\\"]/', preg_replace('/\\\\./', '', $qstring)); + } + + /** + * Function to validate a mailbox, which is: + * mailbox = addr-spec ; simple address + * / phrase route-addr ; name and route-addr + * + * @access public + * @param string &$mailbox The string to check. + * @return boolean Success or failure. + */ + function validateMailbox(&$mailbox) + { + // A couple of defaults. + $phrase = ''; + $comment = ''; + $comments = array(); + + // Catch any RFC822 comments and store them separately. + $_mailbox = $mailbox; + while (strlen(trim($_mailbox)) > 0) { + $parts = explode('(', $_mailbox); + $before_comment = $this->_splitCheck($parts, '('); + if ($before_comment != $_mailbox) { + // First char should be a (. + $comment = substr(str_replace($before_comment, '', $_mailbox), 1); + $parts = explode(')', $comment); + $comment = $this->_splitCheck($parts, ')'); + $comments[] = $comment; + + // +2 is for the brackets + $_mailbox = substr($_mailbox, strpos($_mailbox, '('.$comment)+strlen($comment)+2); + } else { + break; + } + } + + foreach ($comments as $comment) { + $mailbox = str_replace("($comment)", '', $mailbox); + } + + $mailbox = trim($mailbox); + + // Check for name + route-addr + if (substr($mailbox, -1) == '>' && substr($mailbox, 0, 1) != '<') { + $parts = explode('<', $mailbox); + $name = $this->_splitCheck($parts, '<'); + + $phrase = trim($name); + $route_addr = trim(substr($mailbox, strlen($name.'<'), -1)); + + if ($this->_validatePhrase($phrase) === false || ($route_addr = $this->_validateRouteAddr($route_addr)) === false) { + return false; + } + + // Only got addr-spec + } else { + // First snip angle brackets if present. + if (substr($mailbox, 0, 1) == '<' && substr($mailbox, -1) == '>') { + $addr_spec = substr($mailbox, 1, -1); + } else { + $addr_spec = $mailbox; + } + + if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) { + return false; + } + } + + // Construct the object that will be returned. + $mbox = new stdClass(); + + // Add the phrase (even if empty) and comments + $mbox->personal = $phrase; + $mbox->comment = isset($comments) ? $comments : array(); + + if (isset($route_addr)) { + $mbox->mailbox = $route_addr['local_part']; + $mbox->host = $route_addr['domain']; + $route_addr['adl'] !== '' ? $mbox->adl = $route_addr['adl'] : ''; + } else { + $mbox->mailbox = $addr_spec['local_part']; + $mbox->host = $addr_spec['domain']; + } + + $mailbox = $mbox; + return true; + } + + /** + * This function validates a route-addr which is: + * route-addr = "<" [route] addr-spec ">" + * + * Angle brackets have already been removed at the point of + * getting to this function. + * + * @access private + * @param string $route_addr The string to check. + * @return mixed False on failure, or an array containing validated address/route information on success. + */ + function _validateRouteAddr($route_addr) + { + // Check for colon. + if (strpos($route_addr, ':') !== false) { + $parts = explode(':', $route_addr); + $route = $this->_splitCheck($parts, ':'); + } else { + $route = $route_addr; + } + + // If $route is same as $route_addr then the colon was in + // quotes or brackets or, of course, non existent. + if ($route === $route_addr){ + unset($route); + $addr_spec = $route_addr; + if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) { + return false; + } + } else { + // Validate route part. + if (($route = $this->_validateRoute($route)) === false) { + return false; + } + + $addr_spec = substr($route_addr, strlen($route . ':')); + + // Validate addr-spec part. + if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) { + return false; + } + } + + if (isset($route)) { + $return['adl'] = $route; + } else { + $return['adl'] = ''; + } + + $return = array_merge($return, $addr_spec); + return $return; + } + + /** + * Function to validate a route, which is: + * route = 1#("@" domain) ":" + * + * @access private + * @param string $route The string to check. + * @return mixed False on failure, or the validated $route on success. + */ + function _validateRoute($route) + { + // Split on comma. + $domains = explode(',', trim($route)); + + foreach ($domains as $domain) { + $domain = str_replace('@', '', trim($domain)); + if (!$this->_validateDomain($domain)) return false; + } + + return $route; + } + + /** + * Function to validate a domain, though this is not quite what + * you expect of a strict internet domain. + * + * domain = sub-domain *("." sub-domain) + * + * @access private + * @param string $domain The string to check. + * @return mixed False on failure, or the validated domain on success. + */ + function _validateDomain($domain) + { + // Note the different use of $subdomains and $sub_domains + $subdomains = explode('.', $domain); + + while (count($subdomains) > 0) { + $sub_domains[] = $this->_splitCheck($subdomains, '.'); + for ($i = 0; $i < $this->index + 1; $i++) + array_shift($subdomains); + } + + foreach ($sub_domains as $sub_domain) { + if (!$this->_validateSubdomain(trim($sub_domain))) + return false; + } + + // Managed to get here, so return input. + return $domain; + } + + /** + * Function to validate a subdomain: + * subdomain = domain-ref / domain-literal + * + * @access private + * @param string $subdomain The string to check. + * @return boolean Success or failure. + */ + function _validateSubdomain($subdomain) + { + if (preg_match('|^\[(.*)]$|', $subdomain, $arr)){ + if (!$this->_validateDliteral($arr[1])) return false; + } else { + if (!$this->_validateAtom($subdomain)) return false; + } + + // Got here, so return successful. + return true; + } + + /** + * Function to validate a domain literal: + * domain-literal = "[" *(dtext / quoted-pair) "]" + * + * @access private + * @param string $dliteral The string to check. + * @return boolean Success or failure. + */ + function _validateDliteral($dliteral) + { + return !preg_match('/(.)[][\x0D\\\\]/', $dliteral, $matches) && $matches[1] != '\\'; + } + + /** + * Function to validate an addr-spec. + * + * addr-spec = local-part "@" domain + * + * @access private + * @param string $addr_spec The string to check. + * @return mixed False on failure, or the validated addr-spec on success. + */ + function _validateAddrSpec($addr_spec) + { + $addr_spec = trim($addr_spec); + + // Split on @ sign if there is one. + if (strpos($addr_spec, '@') !== false) { + $parts = explode('@', $addr_spec); + $local_part = $this->_splitCheck($parts, '@'); + $domain = substr($addr_spec, strlen($local_part . '@')); + + // No @ sign so assume the default domain. + } else { + $local_part = $addr_spec; + $domain = $this->default_domain; + } + + if (($local_part = $this->_validateLocalPart($local_part)) === false) return false; + if (($domain = $this->_validateDomain($domain)) === false) return false; + + // Got here so return successful. + return array('local_part' => $local_part, 'domain' => $domain); + } + + /** + * Function to validate the local part of an address: + * local-part = word *("." word) + * + * @access private + * @param string $local_part + * @return mixed False on failure, or the validated local part on success. + */ + function _validateLocalPart($local_part) + { + $parts = explode('.', $local_part); + $words = array(); + + // Split the local_part into words. + while (count($parts) > 0){ + $words[] = $this->_splitCheck($parts, '.'); + for ($i = 0; $i < $this->index + 1; $i++) { + array_shift($parts); + } + } + + // Validate each word. + foreach ($words as $word) { + // If this word contains an unquoted space, it is invalid. (6.2.4) + if (strpos($word, ' ') && $word[0] !== '"') + { + return false; + } + + if ($this->_validatePhrase(trim($word)) === false) return false; + } + + // Managed to get here, so return the input. + return $local_part; + } + + /** + * Returns an approximate count of how many addresses are in the + * given string. This is APPROXIMATE as it only splits based on a + * comma which has no preceding backslash. Could be useful as + * large amounts of addresses will end up producing *large* + * structures when used with parseAddressList(). + * + * @param string $data Addresses to count + * @return int Approximate count + */ + function approximateCount($data) + { + return count(preg_split('/(?@. This can be sufficient for most + * people. Optional stricter mode can be utilised which restricts + * mailbox characters allowed to alphanumeric, full stop, hyphen + * and underscore. + * + * @param string $data Address to check + * @param boolean $strict Optional stricter mode + * @return mixed False if it fails, an indexed array + * username/domain if it matches + */ + function isValidInetAddress($data, $strict = false) + { + $regex = $strict ? '/^([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i' : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i'; + if (preg_match($regex, trim($data), $matches)) { + return array($matches[1], $matches[2]); + } else { + return false; + } + } + +} diff --git a/lib/Mail/mail.php b/lib/Mail/mail.php new file mode 100644 index 00000000..a8b4b5db --- /dev/null +++ b/lib/Mail/mail.php @@ -0,0 +1,168 @@ + + * @copyright 2010 Chuck Hagenbuch + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: mail.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @link http://pear.php.net/package/Mail/ + */ + +/** + * internal PHP-mail() implementation of the PEAR Mail:: interface. + * @package Mail + * @version $Revision: 294747 $ + */ +class Mail_mail extends Mail { + + /** + * Any arguments to pass to the mail() function. + * @var string + */ + var $_params = ''; + + /** + * Constructor. + * + * Instantiates a new Mail_mail:: object based on the parameters + * passed in. + * + * @param array $params Extra arguments for the mail() function. + */ + function Mail_mail($params = null) + { + // The other mail implementations accept parameters as arrays. + // In the interest of being consistent, explode an array into + // a string of parameter arguments. + if (is_array($params)) { + $this->_params = join(' ', $params); + } else { + $this->_params = $params; + } + + /* Because the mail() function may pass headers as command + * line arguments, we can't guarantee the use of the standard + * "\r\n" separator. Instead, we use the system's native line + * separator. */ + if (defined('PHP_EOL')) { + $this->sep = PHP_EOL; + } else { + $this->sep = (strpos(PHP_OS, 'WIN') === false) ? "\n" : "\r\n"; + } + } + + /** + * Implements Mail_mail::send() function using php's built-in mail() + * command. + * + * @param mixed $recipients Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of recipients, + * each RFC822 valid. This may contain recipients not + * specified in the headers, for Bcc:, resending + * messages, etc. + * + * @param array $headers The array of headers to send with the mail, in an + * associative array, where the array key is the + * header name (ie, 'Subject'), and the array value + * is the header value (ie, 'test'). The header + * produced from those values would be 'Subject: + * test'. + * + * @param string $body The full text of the message body, including any + * Mime parts, etc. + * + * @return mixed Returns true on success, or a PEAR_Error + * containing a descriptive error message on + * failure. + * + * @access public + */ + function send($recipients, $headers, $body) + { + if (!is_array($headers)) { + return PEAR::raiseError('$headers must be an array'); + } + + $result = $this->_sanitizeHeaders($headers); + if (is_a($result, 'PEAR_Error')) { + return $result; + } + + // If we're passed an array of recipients, implode it. + if (is_array($recipients)) { + $recipients = implode(', ', $recipients); + } + + // Get the Subject out of the headers array so that we can + // pass it as a seperate argument to mail(). + $subject = ''; + if (isset($headers['Subject'])) { + $subject = $headers['Subject']; + unset($headers['Subject']); + } + + // Also remove the To: header. The mail() function will add its own + // To: header based on the contents of $recipients. + unset($headers['To']); + + // Flatten the headers out. + $headerElements = $this->prepareHeaders($headers); + if (is_a($headerElements, 'PEAR_Error')) { + return $headerElements; + } + list(, $text_headers) = $headerElements; + + // We only use mail()'s optional fifth parameter if the additional + // parameters have been provided and we're not running in safe mode. + if (empty($this->_params) || ini_get('safe_mode')) { + $result = mail($recipients, $subject, $body, $text_headers); + } else { + $result = mail($recipients, $subject, $body, $text_headers, + $this->_params); + } + + // If the mail() function returned failure, we need to create a + // PEAR_Error object and return it instead of the boolean result. + if ($result === false) { + $result = PEAR::raiseError('mail() returned failure'); + } + + return $result; + } + +} diff --git a/lib/Mail/mock.php b/lib/Mail/mock.php new file mode 100644 index 00000000..61570ba4 --- /dev/null +++ b/lib/Mail/mock.php @@ -0,0 +1,143 @@ + + * @copyright 2010 Chuck Hagenbuch + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: mock.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @link http://pear.php.net/package/Mail/ + */ + +/** + * Mock implementation of the PEAR Mail:: interface for testing. + * @access public + * @package Mail + * @version $Revision: 294747 $ + */ +class Mail_mock extends Mail { + + /** + * Array of messages that have been sent with the mock. + * + * @var array + * @access public + */ + var $sentMessages = array(); + + /** + * Callback before sending mail. + * + * @var callback + */ + var $_preSendCallback; + + /** + * Callback after sending mai. + * + * @var callback + */ + var $_postSendCallback; + + /** + * Constructor. + * + * Instantiates a new Mail_mock:: object based on the parameters + * passed in. It looks for the following parameters, both optional: + * preSendCallback Called before an email would be sent. + * postSendCallback Called after an email would have been sent. + * + * @param array Hash containing any parameters. + * @access public + */ + function Mail_mock($params) + { + if (isset($params['preSendCallback']) && + is_callable($params['preSendCallback'])) { + $this->_preSendCallback = $params['preSendCallback']; + } + + if (isset($params['postSendCallback']) && + is_callable($params['postSendCallback'])) { + $this->_postSendCallback = $params['postSendCallback']; + } + } + + /** + * Implements Mail_mock::send() function. Silently discards all + * mail. + * + * @param mixed $recipients Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of recipients, + * each RFC822 valid. This may contain recipients not + * specified in the headers, for Bcc:, resending + * messages, etc. + * + * @param array $headers The array of headers to send with the mail, in an + * associative array, where the array key is the + * header name (ie, 'Subject'), and the array value + * is the header value (ie, 'test'). The header + * produced from those values would be 'Subject: + * test'. + * + * @param string $body The full text of the message body, including any + * Mime parts, etc. + * + * @return mixed Returns true on success, or a PEAR_Error + * containing a descriptive error message on + * failure. + * @access public + */ + function send($recipients, $headers, $body) + { + if ($this->_preSendCallback) { + call_user_func_array($this->_preSendCallback, + array(&$this, $recipients, $headers, $body)); + } + + $entry = array('recipients' => $recipients, 'headers' => $headers, 'body' => $body); + $this->sentMessages[] = $entry; + + if ($this->_postSendCallback) { + call_user_func_array($this->_postSendCallback, + array(&$this, $recipients, $headers, $body)); + } + + return true; + } + +} diff --git a/lib/Mail/null.php b/lib/Mail/null.php new file mode 100644 index 00000000..f8d58272 --- /dev/null +++ b/lib/Mail/null.php @@ -0,0 +1,84 @@ + + * @copyright 2010 Phil Kernick + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: null.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @link http://pear.php.net/package/Mail/ + */ + +/** + * Null implementation of the PEAR Mail:: interface. + * @access public + * @package Mail + * @version $Revision: 294747 $ + */ +class Mail_null extends Mail { + + /** + * Implements Mail_null::send() function. Silently discards all + * mail. + * + * @param mixed $recipients Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of recipients, + * each RFC822 valid. This may contain recipients not + * specified in the headers, for Bcc:, resending + * messages, etc. + * + * @param array $headers The array of headers to send with the mail, in an + * associative array, where the array key is the + * header name (ie, 'Subject'), and the array value + * is the header value (ie, 'test'). The header + * produced from those values would be 'Subject: + * test'. + * + * @param string $body The full text of the message body, including any + * Mime parts, etc. + * + * @return mixed Returns true on success, or a PEAR_Error + * containing a descriptive error message on + * failure. + * @access public + */ + function send($recipients, $headers, $body) + { + return true; + } + +} diff --git a/lib/Mail/sendmail.php b/lib/Mail/sendmail.php new file mode 100644 index 00000000..b056575e --- /dev/null +++ b/lib/Mail/sendmail.php @@ -0,0 +1,171 @@ + | +// +----------------------------------------------------------------------+ + +/** + * Sendmail implementation of the PEAR Mail:: interface. + * @access public + * @package Mail + * @version $Revision: 294744 $ + */ +class Mail_sendmail extends Mail { + + /** + * The location of the sendmail or sendmail wrapper binary on the + * filesystem. + * @var string + */ + var $sendmail_path = '/usr/sbin/sendmail'; + + /** + * Any extra command-line parameters to pass to the sendmail or + * sendmail wrapper binary. + * @var string + */ + var $sendmail_args = '-i'; + + /** + * Constructor. + * + * Instantiates a new Mail_sendmail:: object based on the parameters + * passed in. It looks for the following parameters: + * sendmail_path The location of the sendmail binary on the + * filesystem. Defaults to '/usr/sbin/sendmail'. + * + * sendmail_args Any extra parameters to pass to the sendmail + * or sendmail wrapper binary. + * + * If a parameter is present in the $params array, it replaces the + * default. + * + * @param array $params Hash containing any parameters different from the + * defaults. + * @access public + */ + function Mail_sendmail($params) + { + if (isset($params['sendmail_path'])) { + $this->sendmail_path = $params['sendmail_path']; + } + if (isset($params['sendmail_args'])) { + $this->sendmail_args = $params['sendmail_args']; + } + + /* + * Because we need to pass message headers to the sendmail program on + * the commandline, we can't guarantee the use of the standard "\r\n" + * separator. Instead, we use the system's native line separator. + */ + if (defined('PHP_EOL')) { + $this->sep = PHP_EOL; + } else { + $this->sep = (strpos(PHP_OS, 'WIN') === false) ? "\n" : "\r\n"; + } + } + + /** + * Implements Mail::send() function using the sendmail + * command-line binary. + * + * @param mixed $recipients Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of recipients, + * each RFC822 valid. This may contain recipients not + * specified in the headers, for Bcc:, resending + * messages, etc. + * + * @param array $headers The array of headers to send with the mail, in an + * associative array, where the array key is the + * header name (ie, 'Subject'), and the array value + * is the header value (ie, 'test'). The header + * produced from those values would be 'Subject: + * test'. + * + * @param string $body The full text of the message body, including any + * Mime parts, etc. + * + * @return mixed Returns true on success, or a PEAR_Error + * containing a descriptive error message on + * failure. + * @access public + */ + function send($recipients, $headers, $body) + { + if (!is_array($headers)) { + return PEAR::raiseError('$headers must be an array'); + } + + $result = $this->_sanitizeHeaders($headers); + if (is_a($result, 'PEAR_Error')) { + return $result; + } + + $recipients = $this->parseRecipients($recipients); + if (is_a($recipients, 'PEAR_Error')) { + return $recipients; + } + $recipients = implode(' ', array_map('escapeshellarg', $recipients)); + + $headerElements = $this->prepareHeaders($headers); + if (is_a($headerElements, 'PEAR_Error')) { + return $headerElements; + } + list($from, $text_headers) = $headerElements; + + /* Since few MTAs are going to allow this header to be forged + * unless it's in the MAIL FROM: exchange, we'll use + * Return-Path instead of From: if it's set. */ + if (!empty($headers['Return-Path'])) { + $from = $headers['Return-Path']; + } + + if (!isset($from)) { + return PEAR::raiseError('No from address given.'); + } elseif (strpos($from, ' ') !== false || + strpos($from, ';') !== false || + strpos($from, '&') !== false || + strpos($from, '`') !== false) { + return PEAR::raiseError('From address specified with dangerous characters.'); + } + + $from = escapeshellarg($from); // Security bug #16200 + + $mail = @popen($this->sendmail_path . (!empty($this->sendmail_args) ? ' ' . $this->sendmail_args : '') . " -f$from -- $recipients", 'w'); + if (!$mail) { + return PEAR::raiseError('Failed to open sendmail [' . $this->sendmail_path . '] for execution.'); + } + + // Write the headers following by two newlines: one to end the headers + // section and a second to separate the headers block from the body. + fputs($mail, $text_headers . $this->sep . $this->sep); + + fputs($mail, $body); + $result = pclose($mail); + if (version_compare(phpversion(), '4.2.3') == -1) { + // With older php versions, we need to shift the pclose + // result to get the exit code. + $result = $result >> 8 & 0xFF; + } + + if ($result != 0) { + return PEAR::raiseError('sendmail returned error code ' . $result, + $result); + } + + return true; + } + +} diff --git a/lib/Mail/smtp.php b/lib/Mail/smtp.php new file mode 100644 index 00000000..52ea6020 --- /dev/null +++ b/lib/Mail/smtp.php @@ -0,0 +1,444 @@ + + * @author Chuck Hagenbuch + * @copyright 2010 Chuck Hagenbuch + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: smtp.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @link http://pear.php.net/package/Mail/ + */ + +/** Error: Failed to create a Net_SMTP object */ +define('PEAR_MAIL_SMTP_ERROR_CREATE', 10000); + +/** Error: Failed to connect to SMTP server */ +define('PEAR_MAIL_SMTP_ERROR_CONNECT', 10001); + +/** Error: SMTP authentication failure */ +define('PEAR_MAIL_SMTP_ERROR_AUTH', 10002); + +/** Error: No From: address has been provided */ +define('PEAR_MAIL_SMTP_ERROR_FROM', 10003); + +/** Error: Failed to set sender */ +define('PEAR_MAIL_SMTP_ERROR_SENDER', 10004); + +/** Error: Failed to add recipient */ +define('PEAR_MAIL_SMTP_ERROR_RECIPIENT', 10005); + +/** Error: Failed to send data */ +define('PEAR_MAIL_SMTP_ERROR_DATA', 10006); + +/** + * SMTP implementation of the PEAR Mail interface. Requires the Net_SMTP class. + * @access public + * @package Mail + * @version $Revision: 294747 $ + */ +class Mail_smtp extends Mail { + + /** + * SMTP connection object. + * + * @var object + * @access private + */ + var $_smtp = null; + + /** + * The list of service extension parameters to pass to the Net_SMTP + * mailFrom() command. + * @var array + */ + var $_extparams = array(); + + /** + * The SMTP host to connect to. + * @var string + */ + var $host = 'localhost'; + + /** + * The port the SMTP server is on. + * @var integer + */ + var $port = 25; + + /** + * Should SMTP authentication be used? + * + * This value may be set to true, false or the name of a specific + * authentication method. + * + * If the value is set to true, the Net_SMTP package will attempt to use + * the best authentication method advertised by the remote SMTP server. + * + * @var mixed + */ + var $auth = false; + + /** + * The username to use if the SMTP server requires authentication. + * @var string + */ + var $username = ''; + + /** + * The password to use if the SMTP server requires authentication. + * @var string + */ + var $password = ''; + + /** + * Hostname or domain that will be sent to the remote SMTP server in the + * HELO / EHLO message. + * + * @var string + */ + var $localhost = 'localhost'; + + /** + * SMTP connection timeout value. NULL indicates no timeout. + * + * @var integer + */ + var $timeout = null; + + /** + * Turn on Net_SMTP debugging? + * + * @var boolean $debug + */ + var $debug = false; + + /** + * Indicates whether or not the SMTP connection should persist over + * multiple calls to the send() method. + * + * @var boolean + */ + var $persist = false; + + /** + * Use SMTP command pipelining (specified in RFC 2920) if the SMTP server + * supports it. This speeds up delivery over high-latency connections. By + * default, use the default value supplied by Net_SMTP. + * @var bool + */ + var $pipelining; + + /** + * Constructor. + * + * Instantiates a new Mail_smtp:: object based on the parameters + * passed in. It looks for the following parameters: + * host The server to connect to. Defaults to localhost. + * port The port to connect to. Defaults to 25. + * auth SMTP authentication. Defaults to none. + * username The username to use for SMTP auth. No default. + * password The password to use for SMTP auth. No default. + * localhost The local hostname / domain. Defaults to localhost. + * timeout The SMTP connection timeout. Defaults to none. + * verp Whether to use VERP or not. Defaults to false. + * DEPRECATED as of 1.2.0 (use setMailParams()). + * debug Activate SMTP debug mode? Defaults to false. + * persist Should the SMTP connection persist? + * pipelining Use SMTP command pipelining + * + * If a parameter is present in the $params array, it replaces the + * default. + * + * @param array Hash containing any parameters different from the + * defaults. + * @access public + */ + function Mail_smtp($params) + { + if (isset($params['host'])) $this->host = $params['host']; + if (isset($params['port'])) $this->port = $params['port']; + if (isset($params['auth'])) $this->auth = $params['auth']; + if (isset($params['username'])) $this->username = $params['username']; + if (isset($params['password'])) $this->password = $params['password']; + if (isset($params['localhost'])) $this->localhost = $params['localhost']; + if (isset($params['timeout'])) $this->timeout = $params['timeout']; + if (isset($params['debug'])) $this->debug = (bool)$params['debug']; + if (isset($params['persist'])) $this->persist = (bool)$params['persist']; + if (isset($params['pipelining'])) $this->pipelining = (bool)$params['pipelining']; + + // Deprecated options + if (isset($params['verp'])) { + $this->addServiceExtensionParameter('XVERP', is_bool($params['verp']) ? null : $params['verp']); + } + + register_shutdown_function(array(&$this, '_Mail_smtp')); + } + + /** + * Destructor implementation to ensure that we disconnect from any + * potentially-alive persistent SMTP connections. + */ + function _Mail_smtp() + { + $this->disconnect(); + } + + /** + * Implements Mail::send() function using SMTP. + * + * @param mixed $recipients Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of recipients, + * each RFC822 valid. This may contain recipients not + * specified in the headers, for Bcc:, resending + * messages, etc. + * + * @param array $headers The array of headers to send with the mail, in an + * associative array, where the array key is the + * header name (e.g., 'Subject'), and the array value + * is the header value (e.g., 'test'). The header + * produced from those values would be 'Subject: + * test'. + * + * @param string $body The full text of the message body, including any + * MIME parts, etc. + * + * @return mixed Returns true on success, or a PEAR_Error + * containing a descriptive error message on + * failure. + * @access public + */ + function send($recipients, $headers, $body) + { + /* If we don't already have an SMTP object, create one. */ + $result = &$this->getSMTPObject(); + if (PEAR::isError($result)) { + return $result; + } + + if (!is_array($headers)) { + return PEAR::raiseError('$headers must be an array'); + } + + $this->_sanitizeHeaders($headers); + + $headerElements = $this->prepareHeaders($headers); + if (is_a($headerElements, 'PEAR_Error')) { + $this->_smtp->rset(); + return $headerElements; + } + list($from, $textHeaders) = $headerElements; + + /* Since few MTAs are going to allow this header to be forged + * unless it's in the MAIL FROM: exchange, we'll use + * Return-Path instead of From: if it's set. */ + if (!empty($headers['Return-Path'])) { + $from = $headers['Return-Path']; + } + + if (!isset($from)) { + $this->_smtp->rset(); + return PEAR::raiseError('No From: address has been provided', + PEAR_MAIL_SMTP_ERROR_FROM); + } + + $params = null; + if (!empty($this->_extparams)) { + foreach ($this->_extparams as $key => $val) { + $params .= ' ' . $key . (is_null($val) ? '' : '=' . $val); + } + } + if (PEAR::isError($res = $this->_smtp->mailFrom($from, ltrim($params)))) { + $error = $this->_error("Failed to set sender: $from", $res); + $this->_smtp->rset(); + return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_SENDER); + } + + $recipients = $this->parseRecipients($recipients); + if (is_a($recipients, 'PEAR_Error')) { + $this->_smtp->rset(); + return $recipients; + } + + foreach ($recipients as $recipient) { + $res = $this->_smtp->rcptTo($recipient); + if (is_a($res, 'PEAR_Error')) { + $error = $this->_error("Failed to add recipient: $recipient", $res); + $this->_smtp->rset(); + return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_RECIPIENT); + } + } + + /* Send the message's headers and the body as SMTP data. */ + $res = $this->_smtp->data($textHeaders . "\r\n\r\n" . $body); + list(,$args) = $this->_smtp->getResponse(); + + if (preg_match("/Ok: queued as (.*)/", $args, $queued)) { + $this->queued_as = $queued[1]; + } + + /* we need the greeting; from it we can extract the authorative name of the mail server we've really connected to. + * ideal if we're connecting to a round-robin of relay servers and need to track which exact one took the email */ + $this->greeting = $this->_smtp->getGreeting(); + + if (is_a($res, 'PEAR_Error')) { + $error = $this->_error('Failed to send data', $res); + $this->_smtp->rset(); + return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_DATA); + } + + /* If persistent connections are disabled, destroy our SMTP object. */ + if ($this->persist === false) { + $this->disconnect(); + } + + return true; + } + + /** + * Connect to the SMTP server by instantiating a Net_SMTP object. + * + * @return mixed Returns a reference to the Net_SMTP object on success, or + * a PEAR_Error containing a descriptive error message on + * failure. + * + * @since 1.2.0 + * @access public + */ + function &getSMTPObject() + { + if (is_object($this->_smtp) !== false) { + return $this->_smtp; + } + + include_once 'Net/SMTP.php'; + $this->_smtp = &new Net_SMTP($this->host, + $this->port, + $this->localhost); + + /* If we still don't have an SMTP object at this point, fail. */ + if (is_object($this->_smtp) === false) { + return PEAR::raiseError('Failed to create a Net_SMTP object', + PEAR_MAIL_SMTP_ERROR_CREATE); + } + + /* Configure the SMTP connection. */ + if ($this->debug) { + $this->_smtp->setDebug(true); + } + + /* Attempt to connect to the configured SMTP server. */ + if (PEAR::isError($res = $this->_smtp->connect($this->timeout))) { + $error = $this->_error('Failed to connect to ' . + $this->host . ':' . $this->port, + $res); + return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_CONNECT); + } + + /* Attempt to authenticate if authentication has been enabled. */ + if ($this->auth) { + $method = is_string($this->auth) ? $this->auth : ''; + + if (PEAR::isError($res = $this->_smtp->auth($this->username, + $this->password, + $method))) { + $error = $this->_error("$method authentication failure", + $res); + $this->_smtp->rset(); + return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_AUTH); + } + } + + return $this->_smtp; + } + + /** + * Add parameter associated with a SMTP service extension. + * + * @param string Extension keyword. + * @param string Any value the keyword needs. + * + * @since 1.2.0 + * @access public + */ + function addServiceExtensionParameter($keyword, $value = null) + { + $this->_extparams[$keyword] = $value; + } + + /** + * Disconnect and destroy the current SMTP connection. + * + * @return boolean True if the SMTP connection no longer exists. + * + * @since 1.1.9 + * @access public + */ + function disconnect() + { + /* If we have an SMTP object, disconnect and destroy it. */ + if (is_object($this->_smtp) && $this->_smtp->disconnect()) { + $this->_smtp = null; + } + + /* We are disconnected if we no longer have an SMTP object. */ + return ($this->_smtp === null); + } + + /** + * Build a standardized string describing the current SMTP error. + * + * @param string $text Custom string describing the error context. + * @param object $error Reference to the current PEAR_Error object. + * + * @return string A string describing the current SMTP error. + * + * @since 1.1.7 + * @access private + */ + function _error($text, &$error) + { + /* Split the SMTP response into a code and a response string. */ + list($code, $response) = $this->_smtp->getResponse(); + + /* Build our standardized error string. */ + return $text + . ' [SMTP: ' . $error->getMessage() + . " (code: $code, response: $response)]"; + } + +} diff --git a/lib/Mail/smtpmx.php b/lib/Mail/smtpmx.php new file mode 100644 index 00000000..f0b69408 --- /dev/null +++ b/lib/Mail/smtpmx.php @@ -0,0 +1,502 @@ + + * @copyright 2010 gERD Schaufelberger + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: smtpmx.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @link http://pear.php.net/package/Mail/ + */ + +require_once 'Net/SMTP.php'; + +/** + * SMTP MX implementation of the PEAR Mail interface. Requires the Net_SMTP class. + * + * + * @access public + * @author gERD Schaufelberger + * @package Mail + * @version $Revision: 294747 $ + */ +class Mail_smtpmx extends Mail { + + /** + * SMTP connection object. + * + * @var object + * @access private + */ + var $_smtp = null; + + /** + * The port the SMTP server is on. + * @var integer + * @see getservicebyname() + */ + var $port = 25; + + /** + * Hostname or domain that will be sent to the remote SMTP server in the + * HELO / EHLO message. + * + * @var string + * @see posix_uname() + */ + var $mailname = 'localhost'; + + /** + * SMTP connection timeout value. NULL indicates no timeout. + * + * @var integer + */ + var $timeout = 10; + + /** + * use either PEAR:Net_DNS or getmxrr + * + * @var boolean + */ + var $withNetDns = true; + + /** + * PEAR:Net_DNS_Resolver + * + * @var object + */ + var $resolver; + + /** + * Whether to use VERP or not. If not a boolean, the string value + * will be used as the VERP separators. + * + * @var mixed boolean or string + */ + var $verp = false; + + /** + * Whether to use VRFY or not. + * + * @var boolean $vrfy + */ + var $vrfy = false; + + /** + * Switch to test mode - don't send emails for real + * + * @var boolean $debug + */ + var $test = false; + + /** + * Turn on Net_SMTP debugging? + * + * @var boolean $peardebug + */ + var $debug = false; + + /** + * internal error codes + * + * translate internal error identifier to PEAR-Error codes and human + * readable messages. + * + * @var boolean $debug + * @todo as I need unique error-codes to identify what exactly went wrond + * I did not use intergers as it should be. Instead I added a "namespace" + * for each code. This avoids conflicts with error codes from different + * classes. How can I use unique error codes and stay conform with PEAR? + */ + var $errorCode = array( + 'not_connected' => array( + 'code' => 1, + 'msg' => 'Could not connect to any mail server ({HOST}) at port {PORT} to send mail to {RCPT}.' + ), + 'failed_vrfy_rcpt' => array( + 'code' => 2, + 'msg' => 'Recipient "{RCPT}" could not be veryfied.' + ), + 'failed_set_from' => array( + 'code' => 3, + 'msg' => 'Failed to set sender: {FROM}.' + ), + 'failed_set_rcpt' => array( + 'code' => 4, + 'msg' => 'Failed to set recipient: {RCPT}.' + ), + 'failed_send_data' => array( + 'code' => 5, + 'msg' => 'Failed to send mail to: {RCPT}.' + ), + 'no_from' => array( + 'code' => 5, + 'msg' => 'No from address has be provided.' + ), + 'send_data' => array( + 'code' => 7, + 'msg' => 'Failed to create Net_SMTP object.' + ), + 'no_mx' => array( + 'code' => 8, + 'msg' => 'No MX-record for {RCPT} found.' + ), + 'no_resolver' => array( + 'code' => 9, + 'msg' => 'Could not start resolver! Install PEAR:Net_DNS or switch off "netdns"' + ), + 'failed_rset' => array( + 'code' => 10, + 'msg' => 'RSET command failed, SMTP-connection corrupt.' + ), + ); + + /** + * Constructor. + * + * Instantiates a new Mail_smtp:: object based on the parameters + * passed in. It looks for the following parameters: + * mailname The name of the local mail system (a valid hostname which matches the reverse lookup) + * port smtp-port - the default comes from getservicebyname() and should work fine + * timeout The SMTP connection timeout. Defaults to 30 seconds. + * vrfy Whether to use VRFY or not. Defaults to false. + * verp Whether to use VERP or not. Defaults to false. + * test Activate test mode? Defaults to false. + * debug Activate SMTP and Net_DNS debug mode? Defaults to false. + * netdns whether to use PEAR:Net_DNS or the PHP build in function getmxrr, default is true + * + * If a parameter is present in the $params array, it replaces the + * default. + * + * @access public + * @param array Hash containing any parameters different from the + * defaults. + * @see _Mail_smtpmx() + */ + function __construct($params) + { + if (isset($params['mailname'])) { + $this->mailname = $params['mailname']; + } else { + // try to find a valid mailname + if (function_exists('posix_uname')) { + $uname = posix_uname(); + $this->mailname = $uname['nodename']; + } + } + + // port number + if (isset($params['port'])) { + $this->_port = $params['port']; + } else { + $this->_port = getservbyname('smtp', 'tcp'); + } + + if (isset($params['timeout'])) $this->timeout = $params['timeout']; + if (isset($params['verp'])) $this->verp = $params['verp']; + if (isset($params['test'])) $this->test = $params['test']; + if (isset($params['peardebug'])) $this->test = $params['peardebug']; + if (isset($params['netdns'])) $this->withNetDns = $params['netdns']; + } + + /** + * Constructor wrapper for PHP4 + * + * @access public + * @param array Hash containing any parameters different from the defaults + * @see __construct() + */ + function Mail_smtpmx($params) + { + $this->__construct($params); + register_shutdown_function(array(&$this, '__destruct')); + } + + /** + * Destructor implementation to ensure that we disconnect from any + * potentially-alive persistent SMTP connections. + */ + function __destruct() + { + if (is_object($this->_smtp)) { + $this->_smtp->disconnect(); + $this->_smtp = null; + } + } + + /** + * Implements Mail::send() function using SMTP direct delivery + * + * @access public + * @param mixed $recipients in RFC822 style or array + * @param array $headers The array of headers to send with the mail. + * @param string $body The full text of the message body, + * @return mixed Returns true on success, or a PEAR_Error + */ + function send($recipients, $headers, $body) + { + if (!is_array($headers)) { + return PEAR::raiseError('$headers must be an array'); + } + + $result = $this->_sanitizeHeaders($headers); + if (is_a($result, 'PEAR_Error')) { + return $result; + } + + // Prepare headers + $headerElements = $this->prepareHeaders($headers); + if (is_a($headerElements, 'PEAR_Error')) { + return $headerElements; + } + list($from, $textHeaders) = $headerElements; + + // use 'Return-Path' if possible + if (!empty($headers['Return-Path'])) { + $from = $headers['Return-Path']; + } + if (!isset($from)) { + return $this->_raiseError('no_from'); + } + + // Prepare recipients + $recipients = $this->parseRecipients($recipients); + if (is_a($recipients, 'PEAR_Error')) { + return $recipients; + } + + foreach ($recipients as $rcpt) { + list($user, $host) = explode('@', $rcpt); + + $mx = $this->_getMx($host); + if (is_a($mx, 'PEAR_Error')) { + return $mx; + } + + if (empty($mx)) { + $info = array('rcpt' => $rcpt); + return $this->_raiseError('no_mx', $info); + } + + $connected = false; + foreach ($mx as $mserver => $mpriority) { + $this->_smtp = new Net_SMTP($mserver, $this->port, $this->mailname); + + // configure the SMTP connection. + if ($this->debug) { + $this->_smtp->setDebug(true); + } + + // attempt to connect to the configured SMTP server. + $res = $this->_smtp->connect($this->timeout); + if (is_a($res, 'PEAR_Error')) { + $this->_smtp = null; + continue; + } + + // connection established + if ($res) { + $connected = true; + break; + } + } + + if (!$connected) { + $info = array( + 'host' => implode(', ', array_keys($mx)), + 'port' => $this->port, + 'rcpt' => $rcpt, + ); + return $this->_raiseError('not_connected', $info); + } + + // Verify recipient + if ($this->vrfy) { + $res = $this->_smtp->vrfy($rcpt); + if (is_a($res, 'PEAR_Error')) { + $info = array('rcpt' => $rcpt); + return $this->_raiseError('failed_vrfy_rcpt', $info); + } + } + + // mail from: + $args['verp'] = $this->verp; + $res = $this->_smtp->mailFrom($from, $args); + if (is_a($res, 'PEAR_Error')) { + $info = array('from' => $from); + return $this->_raiseError('failed_set_from', $info); + } + + // rcpt to: + $res = $this->_smtp->rcptTo($rcpt); + if (is_a($res, 'PEAR_Error')) { + $info = array('rcpt' => $rcpt); + return $this->_raiseError('failed_set_rcpt', $info); + } + + // Don't send anything in test mode + if ($this->test) { + $result = $this->_smtp->rset(); + $res = $this->_smtp->rset(); + if (is_a($res, 'PEAR_Error')) { + return $this->_raiseError('failed_rset'); + } + + $this->_smtp->disconnect(); + $this->_smtp = null; + return true; + } + + // Send data + $res = $this->_smtp->data("$textHeaders\r\n$body"); + if (is_a($res, 'PEAR_Error')) { + $info = array('rcpt' => $rcpt); + return $this->_raiseError('failed_send_data', $info); + } + + $this->_smtp->disconnect(); + $this->_smtp = null; + } + + return true; + } + + /** + * Recieve mx rexords for a spciefied host + * + * The MX records + * + * @access private + * @param string $host mail host + * @return mixed sorted + */ + function _getMx($host) + { + $mx = array(); + + if ($this->withNetDns) { + $res = $this->_loadNetDns(); + if (is_a($res, 'PEAR_Error')) { + return $res; + } + + $response = $this->resolver->query($host, 'MX'); + if (!$response) { + return false; + } + + foreach ($response->answer as $rr) { + if ($rr->type == 'MX') { + $mx[$rr->exchange] = $rr->preference; + } + } + } else { + $mxHost = array(); + $mxWeight = array(); + + if (!getmxrr($host, $mxHost, $mxWeight)) { + return false; + } + for ($i = 0; $i < count($mxHost); ++$i) { + $mx[$mxHost[$i]] = $mxWeight[$i]; + } + } + + asort($mx); + return $mx; + } + + /** + * initialize PEAR:Net_DNS_Resolver + * + * @access private + * @return boolean true on success + */ + function _loadNetDns() + { + if (is_object($this->resolver)) { + return true; + } + + if (!include_once 'Net/DNS.php') { + return $this->_raiseError('no_resolver'); + } + + $this->resolver = new Net_DNS_Resolver(); + if ($this->debug) { + $this->resolver->test = 1; + } + + return true; + } + + /** + * raise standardized error + * + * include additional information in error message + * + * @access private + * @param string $id maps error ids to codes and message + * @param array $info optional information in associative array + * @see _errorCode + */ + function _raiseError($id, $info = array()) + { + $code = $this->errorCode[$id]['code']; + $msg = $this->errorCode[$id]['msg']; + + // include info to messages + if (!empty($info)) { + $search = array(); + $replace = array(); + + foreach ($info as $key => $value) { + array_push($search, '{' . strtoupper($key) . '}'); + array_push($replace, $value); + } + + $msg = str_replace($search, $replace, $msg); + } + + return PEAR::raiseError($msg, $code); + } + +} diff --git a/lib/aws.phar b/lib/aws.phar new file mode 100644 index 00000000..036aa8f9 Binary files /dev/null and b/lib/aws.phar differ diff --git a/phpdox.xml b/phpdox.xml new file mode 100644 index 00000000..67ece022 --- /dev/null +++ b/phpdox.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 00000000..3f2a8b71 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,36 @@ + + + + + + ./test/admin + + + + + + + + + + + + + src + + ./src/composer + ./src/lib + ./src/lib/Mail + ./src/adodb512 + ./src/classes/crypt + ./test/bootstrap.php + ./test/test.config.php + ./test/test.includes.php + + + + diff --git a/readme.md b/readme.md new file mode 100644 index 00000000..29b61090 --- /dev/null +++ b/readme.md @@ -0,0 +1,247 @@ +IceHrm +=========== + +Installation +------------ +Download the latest release https://github.com/thilinah/icehrm/releases/latest + +Copy the downloaded file to the path you want to install iCE Hrm in your server and extract. + +Create a mysql DB for and user. Grant all on iCE Hrm DB to new DB user. + +Visit iCE Hrm installation path in your browser. + +During the installation form, fill in details appropriately. + +Once the application is installed use the username = admin and password = admin to login to your system. + +Note: Please rename or delete the install folder (/app/install) since it could pose a security threat to your iCE Hrm instance. + +Release note v12.6 +----------------- + +### Features + * Charts module + * Code level security improvements + +### Fixes + * Employee switching issue fixed + +Release note v10.2 +----------------- + +### Fixes + * Improvements to date time pickers + * Fixing fatal error due to non writable log file + * Latest changes from ice-framework v2.0 + + +Release note v10.1 +----------------- +### Features + * Integration with ice-framework (http://github.com/thilinah/ice-framework) + * Travel module + * Meta data module + * Option for only allow users to add an entry to a timesheet only if they have marked atteandance for the selected period + * Restricting availability of leave types to employees using leave groups + +### Fixes + * Add missing S3FileSystem class + * Fix issue: passing result of a method call directly into empty method is not supported in php v5.3 + + +Release note v9.1 +----------------- +### Fixes + * Add missing S3FileSystem class + * Fix issue: passing result of a method call directly into empty method is not supported in php v5.3 + + +Release note v9.0 +----------------- +### Features + * New user interface + * Decimal leave counts supported + +Update icehrm v8.4 to v9.0 +-------------------------- + * Make a backup of your icehrm db + * Run db script "icehrmdb_update_v8.4_to_v9.0.sql" which can be found inside script folder of icehrm_v9.0 + * remove all folders except app folder in icehrm root folder + * copy all folders except app folder from new installation to icehrm root folder + + +Release note v8.4 +----------------- +### Fixes + * Fix leave carry forward rounding issues + * Fix issue: select2 default value not getting set for select2 + * Fix issue: email not sent when admin changing leave status + +Release note v8.3 +----------------- +### Fixes +* Fix user table issue on windows, this will resolve errors such as: (Note that this fix has no effect on unix based installations) + * Admin not able to view user uploaded documents + * Admin not able to upload documants for users + * Admin can not view employee attendance records + * Employee projects can not be added + + +Update icehrm v8.2 to v8.3 +-------------------------- + +Copy server.includes.inc.php from v8.3 to your icehrm folder + +Update icehrm v7.x to v8.0 +-------------------------- +Delete all folders except /app directory + +Copy contents of icehrm_v8.0.zip to existing icehrm directory except app directory + +Execute 'icehrmdb_os_update_v7.x_to_v8.0.sql' on your icehrm database + +Update icehrm v7.1 to v7.2 +-------------------------- +Download update from https://bitbucket.org/thilina/icehrm-opensource/downloads/icehrm_update_from_7.1_to_7.2.zip + +Unzip icehrm_update_from_7.1_to_7.2.zip inside your icehrm installation + +Update icehrm v6.1 to v7.1 +-------------------------- +Delete all folders except /app directory + +Copy contents of icehrm_v7.1.zip to existing icehrm directory except app directory + +Execute 'icehrmdb_os_update_v6.1_to_v7.1.sql' on your icehrm database + +Release note v8.2 +----------------- +### Features +*Instance verification added + +Release note v8.1 +----------------- +### Fixes +*Fixed bug that caused a fatal error in php v5.4 +*aws2.7.11 phar file replaced by a aws2.7.11 extracted files +*old aws sdk removed + +Release note v8.0 +----------------- +### Features +*Admin dashbord module +*If the employee joined in current leave period, his leave entitlement is calculated proportional to joined date +*Improvements to reporting module +*Adding new employee time tracking report +*Join date for employees made mandatory +*Sending welcome email when a user is added +*Let users directly reply to admin user from any email sent out from icehrm +*All the users who are not admins must have an employee object attached +*Upgrade aws sdk to v2.7.11 +*Allow employees to change password +*Use only the email address defined under user for sending mails +*Making work_email and private_email fields optional + + +### Fixes +*Upload dialog close button issue fixed + +Release note v7.2 +----------------- +*Fixes +*Some critical vulnerabilities are fixed as recommend by http://zeroscience.mk/en/ + +Release note v7.1 +----------------- +*Features +*Improved company structure graph +*Leave notes implementation � Supervisor can add a note when approving or rejecting leaves +*Filtering support +*Select boxes with long lists are now searchable +*Add/Edit/Delete company structure permissions added for managers +*Add ability to disable employee information editing + +*Fixes +*Make loans editable only by admin +*Fix: permissions not getting applied to employee documents +*Fix error adding employee documents when no user assigned to the admin + +*Code Quality +*Moving all module related code and data into module folders + +Release note v6.1 +----------------- +Leave carry forwared related isue fixed + +Release note v6.0 +----------------- +* Features +* Notifications for leaves and timesheets +* Leave module accrue and leave carry forward +* Employee leave entitlement sub module +* Ability to put system on debug mode +* Allow admins to see documents of all the employees at one place +* Backup data when deleting an employee +* Employee attendance report added +* Changes to time entry form in timesheet module to make time entry process faster +* Admin can make all projects available to employees or just the set of prjects assigned to them using Setting "Projects: Make All Projects Available to Employees" +* Employee document, date added field can not be changed by the employee anymore +* About dialog added for admins + +* Fixes +* Fix default employee delete issue (when the default employee is deleted the admin user attached to it also get deleted) +* Fix user duplicate email issue +* Fix manager can not logout from switched employee +* Remove admin guide from non admin users + +Release note v5.3 +----------------- +* Fixes +* Fix missing employee name in employee details report + +Release note v5.2 +----------------- +* Fixes +* Remove unwanted error logs +* Fix attendance module employee permission issue +* Resolve warnings +* Remove add new button from subordinates module +* Adding administrators' guide + +Release note v5.1 +----------------- +* Fixes +* Fixing for non updating null fields +* https://bitbucket.org/thilina/icehrm-opensource/commits/df57308b53484a2e43ef5c72967ed1cd0dc756cc + +Release note v5.0 +----------------- +* Features +* New user permission implementation +* Adding new user level - Manager + +* Fixes +* Fixing remote table loading issue + +Release note v4.2 +----------------- +* Fixes +* https://bitbucket.org/thilina/icehrm-opensource/issue/23/subordinate-leaves-pagination-not-working +* https://bitbucket.org/thilina/icehrm-opensource/issue/20/error-occured-while-time-punch + + +Release note v4.1 +----------------- +* Features +* Better email format for notifications +* Convert upload dialog to a bootstrp model + +* Fixes +* Fix error sending emails with amazon SES +* Fix errors related to XAMPP and WAMPP servers +* Fix php warnings and notifications +* Fix company structure graph issues +* Allow icehrm client to work without an internet connection +* Fix installer incorrect base url issue +* Fix empty user creation issue diff --git a/src/api/AdapterBase.js b/src/api/AdapterBase.js new file mode 100644 index 00000000..08da122c --- /dev/null +++ b/src/api/AdapterBase.js @@ -0,0 +1,556 @@ +/* +This file is part of Ice Framework. + +Ice Framework is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Ice Framework is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Ice Framework. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + + +function AdapterBase(endPoint) { + +} + +this.moduleRelativeURL = null; +this.tableData = new Array(); +this.sourceData = new Array(); +this.filter = null; +this.origFilter = null; +this.orderBy = null; +this.currentElement = null; + +AdapterBase.inherits(IceHRMBase); + +AdapterBase.method('initAdapter' , function(endPoint,tab,filter,orderBy) { + this.moduleRelativeURL = baseUrl; + this.table = endPoint; + if(tab == undefined || tab == null){ + this.tab = endPoint; + }else{ + this.tab = tab; + } + + if(filter == undefined || filter == null){ + this.filter = null; + }else{ + this.filter = filter; + } + + this.origFilter = this.filter; + + if(orderBy == undefined || orderBy == null){ + this.orderBy = null; + }else{ + this.orderBy = orderBy; + } + + this.trackEvent("initAdapter",tab); + + this.requestCache = new RequestCache(); + +}); + +AdapterBase.method('setFilter', function(filter) { + this.filter = filter; +}); + +AdapterBase.method('getFilter', function() { + return this.filter; +}); + +AdapterBase.method('setOrderBy', function(orderBy) { + this.orderBy = orderBy; +}); + +AdapterBase.method('getOrderBy', function() { + return this.orderBy; +}); + +/** + * @method add + * @param object {Array} object data to be added to database + * @param getFunctionCallBackData {Array} once a success is returned call get() function for this module with these parameters + * @param callGetFunction {Boolean} if false the get function of the module will not be called (default: true) + * @param successCallback {Function} this will get called after success response + */ + +AdapterBase.method('add', function(object,getFunctionCallBackData,callGetFunction,successCallback) { + var that = this; + if(callGetFunction == undefined || callGetFunction == null){ + callGetFunction = true; + } + $(object).attr('a','add'); + $(object).attr('t',this.table); + $.post(this.moduleRelativeURL, object, function(data) { + if(data.status == "SUCCESS"){ + that.addSuccessCallBack(getFunctionCallBackData,data.object, callGetFunction, successCallback, that); + }else{ + that.addFailCallBack(getFunctionCallBackData,data.object); + } + },"json"); + this.trackEvent("add",this.tab,this.table); +}); + +AdapterBase.method('addSuccessCallBack', function(callBackData,serverData, callGetFunction, successCallback, thisObject) { + if(callGetFunction){ + this.get(callBackData); + } + this.initFieldMasterData(); + if(successCallback != undefined && successCallback != null){ + successCallback.apply(thisObject,[serverData]); + } + this.trackEvent("addSuccess",this.tab,this.table); +}); + +AdapterBase.method('addFailCallBack', function(callBackData,serverData) { + this.showMessage("Error saving",serverData); + this.trackEvent("addFailed",this.tab,this.table); +}); + +AdapterBase.method('deleteObj', function(id,callBackData) { + var that = this; + $.post(this.moduleRelativeURL, {'t':this.table,'a':'delete','id':id}, function(data) { + if(data.status == "SUCCESS"){ + that.deleteSuccessCallBack(callBackData,data.object); + }else{ + that.deleteFailCallBack(callBackData,data.object); + } + },"json"); + this.trackEvent("delete",this.tab,this.table); +}); + +AdapterBase.method('deleteSuccessCallBack', function(callBackData,serverData) { + this.get(callBackData); + this.clearDeleteParams(); +}); + +AdapterBase.method('deleteFailCallBack', function(callBackData,serverData) { + this.clearDeleteParams(); + this.showMessage("Error Occurred while Deleting Item",serverData); +}); + +AdapterBase.method('get', function(callBackData) { + var that = this; + + if(this.getRemoteTable()){ + this.createTableServer(this.getTableName()); + $("#"+this.getTableName()+'Form').hide(); + $("#"+this.getTableName()).show(); + return; + } + + var sourceMappingJson = JSON.stringify(this.getSourceMapping()); + + var filterJson = ""; + if(this.getFilter() != null){ + filterJson = JSON.stringify(this.getFilter()); + } + + var orderBy = ""; + if(this.getOrderBy() != null){ + orderBy = this.getOrderBy(); + } + + sourceMappingJson = this.fixJSON(sourceMappingJson); + filterJson = this.fixJSON(filterJson); + + $.post(this.moduleRelativeURL, {'t':this.table,'a':'get','sm':sourceMappingJson,'ft':filterJson,'ob':orderBy}, function(data) { + if(data.status == "SUCCESS"){ + that.getSuccessCallBack(callBackData,data.object); + }else{ + that.getFailCallBack(callBackData,data.object); + } + },"json"); + + that.initFieldMasterData(); + + this.trackEvent("get",this.tab,this.table); + //var url = this.getDataUrl(); + //console.log(url); +}); + + +AdapterBase.method('getDataUrl', function(columns) { + var that = this; + var sourceMappingJson = JSON.stringify(this.getSourceMapping()); + + var columns = JSON.stringify(columns); + + var filterJson = ""; + if(this.getFilter() != null){ + filterJson = JSON.stringify(this.getFilter()); + } + + var orderBy = ""; + if(this.getOrderBy() != null){ + orderBy = this.getOrderBy(); + } + + var url = this.moduleRelativeURL.replace("service.php","data.php"); + url = url+"?"+"t="+this.table; + url = url+"&"+"sm="+this.fixJSON(sourceMappingJson); + url = url+"&"+"cl="+this.fixJSON(columns); + url = url+"&"+"ft="+this.fixJSON(filterJson); + url = url+"&"+"ob="+orderBy; + + if(this.isSubProfileTable()){ + url = url+"&"+"type=sub"; + } + + if(this.remoteTableSkipProfileRestriction()){ + url = url+"&"+"skip=1"; + } + + return url; +}); + +AdapterBase.method('isSubProfileTable', function() { + return false; +}); + +AdapterBase.method('remoteTableSkipProfileRestriction', function() { + return false; +}); + +AdapterBase.method('preProcessTableData', function(row) { + return row; +}); + +AdapterBase.method('getSuccessCallBack', function(callBackData,serverData) { + var data = []; + var mapping = this.getDataMapping(); + for(var i=0;i
  • '; + var editButton = ''; + + var table = $('
    '); + + //add Header + var header = this.getSubHeader(); + table.append(header); + if(data.length == 0){ + table.append(''+this.getNoDataMessage()+''); + }else{ + for(var i=0;i

    '+this.getSubHeaderTitle()+'

    '); + return header; +}); + + + +/** + * IdNameAdapter + */ + +function IdNameAdapter(endPoint) { + this.initAdapter(endPoint); +} + +IdNameAdapter.inherits(AdapterBase); + + + +IdNameAdapter.method('getDataMapping', function() { + return [ + "id", + "name" + ]; +}); + +IdNameAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name"} + ]; +}); + +IdNameAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "name", {"label":"Name","type":"text","validation":""}] + ]; +}); + + + +/** + * RequestCache + */ + +function RequestCache() { + +} + +RequestCache.method('getKey', function(url,params) { + var key = url+"|"; + for(index in params){ + key += index+"="+params[index]+"|"; + } + return key; +}); + +RequestCache.method('getData', function(key) { + var data; + if (typeof(Storage) == "undefined") { + return null; + } + + var strData = localStorage.getItem(key); + if(strData != undefined && strData != null && strData != ""){ + return JSON.parse(strData); + } + + return null; +}); + +RequestCache.method('setData', function(key, data) { + + if (typeof(Storage) == "undefined") { + return null; + } + + var strData = JSON.stringify(data); + var strData = localStorage.setItem(key,strData); + return strData; +}); diff --git a/src/api/AesCrypt.js b/src/api/AesCrypt.js new file mode 100644 index 00000000..d5204009 --- /dev/null +++ b/src/api/AesCrypt.js @@ -0,0 +1,503 @@ +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +/* AES implementation in JavaScript (c) Chris Veness 2005-2014 / MIT Licence */ +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +/* jshint node:true *//* global define */ +'use strict'; + + +/** + * AES (Rijndael cipher) encryption routines, + * + * Reference implementation of FIPS-197 http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf. + * + * @namespace + */ +var Aes = {}; + + +/** + * AES Cipher function: encrypt 'input' state with Rijndael algorithm [§5.1]; + * applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage. + * + * @param {number[]} input - 16-byte (128-bit) input state array. + * @param {number[][]} w - Key schedule as 2D byte-array (Nr+1 x Nb bytes). + * @returns {number[]} Encrypted output state array. + */ +Aes.cipher = function(input, w) { + var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES) + var Nr = w.length/Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys + + var state = [[],[],[],[]]; // initialise 4xNb byte-array 'state' with input [§3.4] + for (var i=0; i<4*Nb; i++) state[i%4][Math.floor(i/4)] = input[i]; + + state = Aes.addRoundKey(state, w, 0, Nb); + + for (var round=1; round 6 && i%Nk == 4) { + temp = Aes.subWord(temp); + } + // xor w[i] with w[i-1] and w[i-Nk] + for (var t=0; t<4; t++) w[i][t] = w[i-Nk][t] ^ temp[t]; + } + + return w; +}; + + +/** + * Apply SBox to state S [§5.1.1] + * @private + */ +Aes.subBytes = function(s, Nb) { + for (var r=0; r<4; r++) { + for (var c=0; c>> i*8) & 0xff; + for (var i=0; i<2; i++) counterBlock[i+2] = (nonceRnd >>> i*8) & 0xff; + for (var i=0; i<4; i++) counterBlock[i+4] = (nonceSec >>> i*8) & 0xff; + + // and convert it to a string to go on the front of the ciphertext + var ctrTxt = ''; + for (var i=0; i<8; i++) ctrTxt += String.fromCharCode(counterBlock[i]); + + // generate key schedule - an expansion of the key into distinct Key Rounds for each round + var keySchedule = Aes.keyExpansion(key); + + var blockCount = Math.ceil(plaintext.length/blockSize); + var ciphertxt = new Array(blockCount); // ciphertext as array of strings + + for (var b=0; b>> c*8) & 0xff; + for (var c=0; c<4; c++) counterBlock[15-c-4] = (b/0x100000000 >>> c*8); + + var cipherCntr = Aes.cipher(counterBlock, keySchedule); // -- encrypt counter block -- + + // block size is reduced on final block + var blockLength = b>> c*8) & 0xff; + for (var c=0; c<4; c++) counterBlock[15-c-4] = (((b+1)/0x100000000-1) >>> c*8) & 0xff; + + var cipherCntr = Aes.cipher(counterBlock, keySchedule); // encrypt counter block + + var plaintxtByte = new Array(ciphertext[b].length); + for (var i=0; i. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + + + +/** + * The base class for providing core functions to all module classes. + * @class Base.js + */ +function IceHRMBase() { + this.deleteParams = {}; + this.createRemoteTable = false; + this.instanceId = "None"; + this.ga = []; + this.showEdit = true; + this.showDelete = true; + this.showSave = true; + this.showCancel = true; + this.showFormOnPopup = false; + this.filtersAlreadySet = false; + this.currentFilterString = ""; + this.sorting = 0; +} + +this.fieldTemplates = null; +this.templates = null; +this.customTemplates = null; +this.emailTemplates = null; +this.fieldMasterData = null; +this.fieldMasterDataKeys = null; +this.fieldMasterDataCallback = null; +this.sourceMapping = null; +this.currentId = null; +this.user = null; +this.currentProfile = null; +this.permissions = {}; + + + +this.baseUrl = null; + +IceHRMBase.method('init' , function(appName, currentView, dataUrl, permissions) { + +}); + +/** + * Some browsers do not support sending JSON in get parameters. Set this to true to avoid sending JSON + * @method setNoJSONRequests + * @param val {Boolean} + */ +IceHRMBase.method('setNoJSONRequests' , function(val) { + this.noJSONRequests = val; +}); + + +IceHRMBase.method('setPermissions' , function(permissions) { + this.permissions = permissions; +}); + +IceHRMBase.method('sortingStarted' , function(val) { + this.sorting = val; +}); + +/** + * Check if the current user has a permission + * @method checkPermission + * @param permission {String} + * @example + * this.checkPermission("Upload/Delete Profile Image") + */ +IceHRMBase.method('checkPermission' , function(permission) { + if(this.permissions[permission] == undefined || this.permissions[permission] == null || this.permissions[permission] == "Yes"){ + return "Yes"; + }else{ + return this.permissions[permission]; + } +}); + +IceHRMBase.method('setBaseUrl' , function(url) { + this.baseUrl = url; +}); + +IceHRMBase.method('setUser' , function(user) { + this.user = user; +}); + +IceHRMBase.method('getUser' , function() { + return this.user; +}); + +IceHRMBase.method('setInstanceId' , function(id) { + this.instanceId = id; +}); + +IceHRMBase.method('setGoogleAnalytics' , function(ga) { + this.ga = ga; +}); + +/** + * If this method returned false the action buttons in data table for modules will not be displayed. + * Override this method in module lib.js to hide action buttons + * @method showActionButtons + * @param permission {String} + * @example + * EmployeeLeaveEntitlementAdapter.method('showActionButtons' , function() { + * return false; + * }); + */ +IceHRMBase.method('showActionButtons' , function() { + return true; +}); + +IceHRMBase.method('trackEvent' , function(action, label, value) { + try{ + if(label == undefined || label == null){ + this.ga.push(['_trackEvent', this.instanceId, action]); + }else if(value == undefined || value == null){ + this.ga.push(['_trackEvent', this.instanceId, action, label]); + }else{ + this.ga.push(['_trackEvent', this.instanceId, action, label, value]); + } + }catch(e){ + + } + + +}); + + +IceHRMBase.method('setCurrentProfile' , function(currentProfile) { + this.currentProfile = currentProfile; +}); + +/** + * Get the current profile + * @method getCurrentProfile + * @returns Profile of the current user if the profile is not switched if not switched profile + */ + +IceHRMBase.method('getCurrentProfile' , function() { + return this.currentProfile; +}); + +/** + * Retrive data required to create select boxes for add new /edit forms for a given module. This is called when loading the module + * @method initFieldMasterData + * @param callback {Function} call this once loading completed + * @param callback {Function} call this once all field loading completed. This indicate that the form can be displayed saftly + * @example + * ReportAdapter.method('renderForm', function(object) { + * var that = this; + * this.processFormFieldsWithObject(object); + * var cb = function(){ + * that.uber('renderForm',object); + * }; + * this.initFieldMasterData(cb); + * }); + */ +IceHRMBase.method('initFieldMasterData' , function(callback, loadAllCallback, loadAllCallbackData) { + var values; + if(this.showAddNew == undefined || this.showAddNew == null){ + this.showAddNew = true; + } + this.fieldMasterData = {}; + this.fieldMasterDataKeys = {}; + this.fieldMasterDataCallback = loadAllCallback; + this.fieldMasterDataCallbackData = loadAllCallbackData; + this.sourceMapping = {}; + var fields = this.getFormFields(); + var filterFields = this.getFilters(); + + if(filterFields != null){ + for(var j=0;j'; + } + + if(this.getFilters() != null){ + if(html != ""){ + html += "  "; + } + html+=''; + html += "  "; + if(this.filtersAlreadySet){ + html+=''; + }else{ + html+=''; + } + + } + + html = html.replace(/__id__/g, this.getTableName()); + + if(this.currentFilterString != "" && this.currentFilterString != null){ + html = html.replace(/__filterString__/g, this.currentFilterString); + }else{ + html = html.replace(/__filterString__/g, 'Reset Filters'); + } + + if(html != ""){ + html = '
    '+html+'
    '; + } + + return html; +}); + + +IceHRMBase.method('getActionButtonHeader', function() { + return { "sTitle": "", "sClass": "center" }; +}); + +IceHRMBase.method('getTableHTMLTemplate', function() { + return '
    '; +}); + +/** + * Create the data table on provided element id + * @method createTable + * @param val {Boolean} + */ + +IceHRMBase.method('createTable', function(elementId) { + + if(this.getRemoteTable()){ + this.createTableServer(elementId); + return; + } + + + var headers = this.getHeaders(); + var data = this.getTableData(); + + if(this.showActionButtons()){ + headers.push(this.getActionButtonHeader()); + } + + + if(this.showActionButtons()){ + for(var i=0;i
    '; + }else{ + html = '
    '; + } + */ + //Find current page + var activePage = $('#'+elementId +" .dataTables_paginate .active a").html(); + var start = 0; + if(activePage != undefined && activePage != null){ + start = parseInt(activePage, 10)*15 - 15; + } + + $('#'+elementId).html(html); + + var dataTableParams = { + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + }, + "aaData": data, + "aoColumns": headers, + "bSort": true, + "iDisplayLength": 15, + "iDisplayStart": start + }; + + + var customTableParams = this.getCustomTableParams(); + + $.extend(dataTableParams, customTableParams); + + $('#'+elementId+' #grid').dataTable( dataTableParams ); + + $(".dataTables_paginate ul").addClass("pagination"); + $(".dataTables_length").hide(); + $(".dataTables_filter input").addClass("form-control"); + $(".dataTables_filter input").attr("placeholder","Search"); + $(".dataTables_filter label").contents().filter(function(){ + return (this.nodeType == 3); + }).remove(); + $('.tableActionButton').tooltip(); +}); + +/** + * Create a data table on provided element id which loads data page by page + * @method createTableServer + * @param val {Boolean} + */ + +IceHRMBase.method('createTableServer', function(elementId) { + var that = this; + var headers = this.getHeaders(); + + headers.push({ "sTitle": "", "sClass": "center" }); + + var html = ""; + html = this.getTableTopButtonHtml() + this.getTableHTMLTemplate(); + /* + if(this.getShowAddNew()){ + html = this.getTableTopButtonHtml()+'
    '; + }else{ + html = '
    '; + } + */ + + //Find current page + var activePage = $('#'+elementId +" .dataTables_paginate .active a").html(); + var start = 0; + if(activePage != undefined && activePage != null){ + start = parseInt(activePage, 10)*15 - 15; + } + + + $('#'+elementId).html(html); + + var dataTableParams = { + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + }, + "bProcessing": true, + "bServerSide": true, + "sAjaxSource": that.getDataUrl(that.getDataMapping()), + "aoColumns": headers, + "bSort": true, + "parent":that, + "iDisplayLength": 15, + "iDisplayStart": start + }; + + if(this.showActionButtons()){ + dataTableParams["aoColumnDefs"] = [ + { + "fnRender": that.getActionButtons, + "aTargets": [that.getDataMapping().length] + } + ]; + } + + var customTableParams = this.getCustomTableParams(); + + $.extend(dataTableParams, customTableParams); + + $('#'+elementId+' #grid').dataTable( dataTableParams ); + + $(".dataTables_paginate ul").addClass("pagination"); + $(".dataTables_length").hide(); + $(".dataTables_filter input").addClass("form-control"); + $(".dataTables_filter input").attr("placeholder","Search"); + $(".dataTables_filter label").contents().filter(function(){ + return (this.nodeType == 3); + }).remove(); + + $('.tableActionButton').tooltip(); +}); + +/** + * This should be overridden in module lib.js classes to return module headers which are used to create the data table. + * @method getHeaders + * @example + SettingAdapter.method('getHeaders', function() { + return [ + { "sTitle": "ID" ,"bVisible":false}, + { "sTitle": "Name" }, + { "sTitle": "Value"}, + { "sTitle": "Details"} + ]; + }); + */ +IceHRMBase.method('getHeaders', function() { + +}); + + +/** + * This should be overridden in module lib.js classes to return module field values which are used to create the data table. + * @method getDataMapping + * @example + SettingAdapter.method('getDataMapping', function() { + return [ + "id", + "name", + "value", + "description" + ]; + }); + */ + +IceHRMBase.method('getDataMapping', function() { + +}); + +/** + * This should be overridden in module lib.js classes to return module from fields which are used to create the add/edit form and also used for initializing select box values in form. + * @method getFormFields + * @example + SettingAdapter.method('getFormFields', function() { + return [ + [ "id", {"label":"ID","type":"hidden"}], + [ "value", {"label":"Value","type":"text","validation":"none"}] + ]; + }); + */ +IceHRMBase.method('getFormFields', function() { + +}); + +IceHRMBase.method('getTableData', function() { + +}); + +/** + * This can be overridden in module lib.js classes inorder to show a filter form + * @method getFilters + * @example + EmployeeAdapter.method('getFilters', function() { + return [ + [ "job_title", {"label":"Job Title","type":"select2","allow-null":true,"null-label":"All Job Titles","remote-source":["JobTitle","id","name"]}], + [ "department", {"label":"Department","type":"select2","allow-null":true,"null-label":"All Departments","remote-source":["CompanyStructure","id","title"]}], + [ "supervisor", {"label":"Supervisor","type":"select2","allow-null":true,"null-label":"Anyone","remote-source":["Employee","id","first_name+last_name"]}] + ]; + }); + */ +IceHRMBase.method('getFilters', function() { + return null; +}); + +/** + * Show the edit form for an item + * @method edit + * @param id {int} id of the item to edit + */ +IceHRMBase.method('edit', function(id) { + this.currentId = id; + this.getElement(id,[]); +}); + +IceHRMBase.method('renderModel', function(id,header,body) { + $('#'+id+'ModelBody').html(""); + + if(body == undefined || body == null){ + body = ""; + } + + $('#'+id+'ModelLabel').html(header); + $('#'+id+'ModelBody').html(body); +}); + +IceHRMBase.method('renderModelFromDom', function(id,header,element) { + $('#'+id+'ModelBody').html(""); + + if(element == undefined || element == null){ + element = $("
    "); + } + + $('#'+id+'ModelLabel').html(header); + $('#'+id+'ModelBody').html(""); + $('#'+id+'ModelBody').append(element); +}); + +/** + * Delete an item + * @method deleteRow + * @param id {int} id of the item to edit + */ + +IceHRMBase.method('deleteRow', function(id) { + this.deleteParams['id'] = id; + this.renderModel('delete',"Confirm Deletion","Are you sure you want to delete this item ?"); + $('#deleteModel').modal('show'); + +}); + +/** + * Show a popup with message + * @method showMessage + * @param title {String} title of the message box + * @param message {String} message + * @param closeCallback {Function} this will be called once the dialog is closed (optional) + * @param closeCallback {Function} data to pass to close callback (optional) + * @param isPlain {Boolean} if true buttons are not shown (optional / default = true) + * @example + * this.showMessage("Error Occured while Applying Leave", callBackData); + */ +IceHRMBase.method('showMessage', function(title,message,closeCallback,closeCallbackData, isPlain) { + var that = this; + var modelId = ""; + if(isPlain){ + modelId = "#plainMessageModel"; + this.renderModel('plainMessage',title,message); + }else{ + modelId = "#messageModel"; + this.renderModel('message',title,message); + } + + $(modelId).unbind('hide'); + if(closeCallback != null && closeCallback != undefined){ + $(modelId).on('hidden.bs.modal',function(){ + closeCallback.apply(that,closeCallbackData); + $(modelId).unbind('hidden.bs.modal'); + }); + } + $(modelId).modal({ + backdrop: 'static' + }); +}); + +IceHRMBase.method('showDomElement', function(title,element,closeCallback,closeCallbackData, isPlain) { + var that = this; + var modelId = ""; + if(isPlain){ + modelId = "#plainMessageModel"; + this.renderModelFromDom('plainMessage',title,element); + }else{ + modelId = "#messageModel"; + this.renderModelFromDom('message',title,element); + } + + $(modelId).unbind('hide'); + if(closeCallback != null && closeCallback != undefined){ + $(modelId).on('hidden.bs.modal',function(){ + closeCallback.apply(that,closeCallbackData); + $(modelId).unbind('hidden.bs.modal'); + }); + } + $(modelId).modal({ + backdrop: 'static' + }); +}); + +IceHRMBase.method('confirmDelete', function() { + if(this.deleteParams['id'] != undefined || this.deleteParams['id'] != null){ + this.deleteObj(this.deleteParams['id'],[]); + } + $('#deleteModel').modal('hide'); +}); + +IceHRMBase.method('cancelDelete', function() { + $('#deleteModel').modal('hide'); + this.deleteParams['id'] = null; +}); + +IceHRMBase.method('closeMessage', function() { + $('#messageModel').modal('hide'); +}); + +IceHRMBase.method('closePlainMessage', function() { + $('#plainMessageModel').modal('hide'); +}); + + +/** + * Create or edit an element + * @method save + * @param getFunctionCallBackData {Array} once a success is returned call get() function for this module with these parameters + * @param successCallback {Function} this will get called after success response + */ + +IceHRMBase.method('save', function(callGetFunction, successCallback) { + var validator = new FormValidation(this.getTableName()+"_submit",true,{'ShowPopup':false,"LabelErrorClass":"error"}); + if(validator.checkValues()){ + var params = validator.getFormParameters(); + params = this.forceInjectValuesBeforeSave(params); + var msg = this.doCustomValidation(params); + if(msg == null){ + var id = $('#'+this.getTableName()+"_submit #id").val(); + if(id != null && id != undefined && id != ""){ + $(params).attr('id',id); + } + this.add(params,[],callGetFunction, successCallback); + }else{ + $("#"+this.getTableName()+'Form .label').html(msg); + $("#"+this.getTableName()+'Form .label').show(); + } + + } +}); + +/** + * Override this method to inject attitional parameters or modify existing parameters retrived from add/edit form before sending to the server + * @method forceInjectValuesBeforeSave + * @param params {Array} keys and values in form + * @returns {Array} modified parameters + */ +IceHRMBase.method('forceInjectValuesBeforeSave', function(params) { + return params; +}); + +/** + * Override this method to do custom validations at client side + * @method doCustomValidation + * @param params {Array} keys and values in form + * @returns {Null or String} return null if validation success, returns error message if unsuccessful + * @example + EmployeeLeaveAdapter.method('doCustomValidation', function(params) { + try{ + if(params['date_start'] != params['date_end']){ + var ds = new Date(params['date_start']); + var de = new Date(params['date_end']); + if(de < ds){ + return "Start date should be earlier than end date of the leave period"; + } + } + }catch(e){ + + } + return null; +}); + */ +IceHRMBase.method('doCustomValidation', function(params) { + return null; +}); + +IceHRMBase.method('filterQuery', function() { + + var validator = new FormValidation(this.getTableName()+"_filter",true,{'ShowPopup':false,"LabelErrorClass":"error"}); + if(validator.checkValues()){ + var params = validator.getFormParameters(); + if(this.doCustomFilterValidation(params)){ + + //remove null params + for (var prop in params) { + if(params.hasOwnProperty(prop)){ + if(params[prop] == "NULL"){ + delete(params[prop]); + } + } + } + + this.setFilter(params); + this.filtersAlreadySet = true; + $("#"+this.getTableName()+"_resetFilters").show(); + this.currentFilterString = this.getFilterString(params); + + this.get([]); + this.closePlainMessage(); + } + + } +}); + + +IceHRMBase.method('getFilterString', function(filters) { + + var str = ''; + var rmf, source, values, select2MVal, value, valueOrig; + + var filterFields = this.getFilters(); + + + if(values == null){ + values = []; + } + + for (var prop in filters) { + if(filters.hasOwnProperty(prop)){ + values = this.getMetaFieldValues(prop,filterFields); + value = ""; + valueOrig = null; + + if((values['type'] == 'select' || values['type'] == 'select2')){ + + if(values['remote-source']!= undefined && values['remote-source']!= null){ + rmf = values['remote-source']; + if(filters[prop] == "NULL"){ + if(values['null-label'] != undefined && values['null-label'] != null){ + value = values['null-label']; + }else{ + value = "Not Selected"; + } + }else{ + value = this.fieldMasterData[rmf[0]+"_"+rmf[1]+"_"+rmf[2]][filters[prop]]; + valueOrig = value; + } + + + }else{ + source = values['source'][0]; + if(filters[prop] == "NULL"){ + if(values['null-label'] != undefined && values['null-label'] != null){ + value = values['null-label']; + }else{ + value = "Not Selected"; + } + }else{ + for(var i=0; i'); + $tempDomObj.attr('id',randomFormId); + + $tempDomObj.html(formHtml); + + + $tempDomObj.find('.datefield').datepicker({'viewMode':2}); + $tempDomObj.find('.timefield').datetimepicker({ + language: 'en', + pickDate: false + }); + $tempDomObj.find('.datetimefield').datetimepicker({ + language: 'en' + }); + + $tempDomObj.find('.colorpick').colorpicker(); + + //$tempDomObj.find('.select2Field').select2(); + $tempDomObj.find('.select2Field').each(function() { + $(this).select2().select2('val', $(this).find("option:eq(0)").val()); + }); + + $tempDomObj.find('.select2Multi').each(function() { + $(this).select2().on("change",function(e){ + var parentRow = $(this).parents(".row"); + var height = parentRow.find(".select2-choices").height(); + parentRow.height(parseInt(height)); + }); + }); + + //var tHtml = $tempDomObj.wrap('
    ').parent().html(); + this.showDomElement("Edit",$tempDomObj,null,null,true); + $(".filterBtn").off(); + $(".filterBtn").on('click',function(e) { + e.preventDefault(); + e.stopPropagation(); + try{ + modJs.filterQuery(); + + }catch(e){ + }; + return false; + }); + + if(this.filter != undefined && this.filter != null){ + this.fillForm(this.filter,"#"+this.getTableName()+"_filter", this.getFilters()); + } + +}); + + +/** + * Override this method in your module class to make changes to data fo the form before showing the form + * @method preRenderForm + * @param object {Array} keys value list for populating form + */ + +IceHRMBase.method('preRenderForm', function(object) { + +}); + +/** + * Create the form + * @method renderForm + * @param object {Array} keys value list for populating form + */ + +IceHRMBase.method('renderForm', function(object) { + + var that = this; + if(object == null || object == undefined){ + this.currentId = null; + } + + this.preRenderForm(object); + + var formHtml = this.templates['formTemplate']; + var html = ""; + var fields = this.getFormFields(); + + for(var i=0;i
    '); + $tempDomObj.attr('id',randomFormId); + + } + + $tempDomObj.html(formHtml); + + + $tempDomObj.find('.datefield').datepicker({'viewMode':2}); + $tempDomObj.find('.timefield').datetimepicker({ + language: 'en', + pickDate: false + }); + $tempDomObj.find('.datetimefield').datetimepicker({ + language: 'en' + }); + + $tempDomObj.find('.colorpick').colorpicker(); + + //$tempDomObj.find('.select2Field').select2(); + $tempDomObj.find('.select2Field').each(function() { + $(this).select2().select2('val', $(this).find("option:eq(0)").val()); + + }); + + $tempDomObj.find('.select2Multi').each(function() { + $(this).select2().on("change",function(e){ + var parentRow = $(this).parents(".row"); + var height = parentRow.find(".select2-choices").height(); + parentRow.height(parseInt(height)); + }); + + }); + + for(var i=0;i').parent().html(); + //this.showMessage("Edit",tHtml,null,null,true); + this.showMessage("Edit","",null,null,true); + + $("#plainMessageModel .modal-body").html(""); + $("#plainMessageModel .modal-body").append($tempDomObj); + + if(object != undefined && object != null){ + this.fillForm(object,"#"+randomFormId); + } + } + + this.postRenderForm(object,$tempDomObj); + + + +}); + + +IceHRMBase.method('retriveItemsAfterSave', function() { + return true; +}); + +/** + * Override this method in your module class to make changes to data fo the form after showing it + * @method postRenderForm + * @param object {Array} keys value list for populating form + * @param $tempDomObj {DOM} a DOM element for the form + * @example + * UserAdapter.method('postRenderForm', function(object, $tempDomObj) { + if(object == null || object == undefined){ + $tempDomObj.find("#changePasswordBtn").remove(); + } + }); + */ + +IceHRMBase.method('postRenderForm', function(object, $tempDomObj) { + +}); + +/** + * Convert data group field to HTML + * @method dataGroupToHtml + * @param val {String} value in the field + * @param field {Array} field meta data + */ + +IceHRMBase.method('dataGroupToHtml', function(val, field) { + var data = JSON.parse(val), + deleteButton, t, sortFunction, item,key = null, i, html, template, itemHtml, itemVal; + + deleteButton = ''; + editButton = ''; + + template = field[1]['html']; + + if(data != null && data != undefined && field[1]['sort-function'] != undefined && field[1]['sort-function'] != null){ + data.sort(field[1]['sort-function']); + } + + + html = $("
    "); + + + + for(i=0;i'); + } + t = t.replace('#_'+key+'_#', itemVal); + } + + if(field[1]['render'] != undefined && field[1]['render'] != null){ + t = t.replace('#_renderFunction_#', field[1]['render'](item)); + } + + itemHtml = $(t); + itemHtml.attr('fieldId',field[0]+"_div"); + html.append(itemHtml); + } + + + + return html.wrap('
    ').parent().html(); +}); + +/** + * Reset the DataGroup for a given field + * @method resetDataGroup + * @param field {Array} field meta data + */ +IceHRMBase.method('resetDataGroup', function(field) { + $("#"+field[0]).val(""); + $("#"+field[0]+"_div").html(""); +}); + +IceHRMBase.method('showDataGroup', function(field, object) { + var formHtml = this.templates['datagroupTemplate']; + var html = ""; + var fields = field[1]['form']; + + if(object != undefined && object != null && object.id != undefined){ + this.currentDataGroupItemId = object.id; + }else{ + this.currentDataGroupItemId = null; + } + + for(var i=0;i
    '); + $tempDomObj.attr('id',randomFormId); + + $tempDomObj.html(formHtml); + + + $tempDomObj.find('.datefield').datepicker({'viewMode':2}); + $tempDomObj.find('.timefield').datetimepicker({ + language: 'en', + pickDate: false + }); + $tempDomObj.find('.datetimefield').datetimepicker({ + language: 'en' + }); + + $tempDomObj.find('.colorpick').colorpicker(); + + $tempDomObj.find('.select2Field').each(function() { + $(this).select2().select2('val', $(this).find("option:eq(0)").val()); + }); + + + $tempDomObj.find('.select2Multi').each(function() { + $(this).select2().on("change",function(e){ + var parentRow = $(this).parents(".row"); + var height = parentRow.find(".select2-choices").height(); + parentRow.height(parseInt(height)); + }); + }); + + + + this.currentDataGroupField = field; + this.showDomElement("Add "+field[1]['label'],$tempDomObj,null,null,true); + + if(object != undefined && object != null){ + this.fillForm(object,"#"+this.getTableName()+"_field_"+field[0], field[1]['form']); + } + + + $(".groupAddBtn").off(); + if(object != undefined && object != null && object.id != undefined){ + $(".groupAddBtn").on('click',function(e) { + e.preventDefault(); + e.stopPropagation(); + try{ + modJs.editDataGroup(); + + }catch(e){ + }; + return false; + }); + }else{ + $(".groupAddBtn").on('click',function(e) { + e.preventDefault(); + e.stopPropagation(); + try{ + modJs.addDataGroup(); + + }catch(e){ + }; + return false; + }); + } + + +}); + +IceHRMBase.method('addDataGroup', function() { + var field = this.currentDataGroupField, tempParams; + $("#"+this.getTableName()+"_field_"+field[0]+"_error").html(""); + $("#"+this.getTableName()+"_field_"+field[0]+"_error").hide(); + var validator = new FormValidation(this.getTableName()+"_field_"+field[0],true,{'ShowPopup':false,"LabelErrorClass":"error"}); + if(validator.checkValues()){ + var params = validator.getFormParameters(); + if(field[1]['custom-validate-function'] != undefined && field[1]['custom-validate-function'] != null){ + tempParams = field[1]['custom-validate-function'].apply(this,[params]); + if(tempParams['valid']){ + params = tempParams['params']; + }else{ + $("#"+this.getTableName()+"_field_"+field[0]+"_error").html(tempParams['message']); + $("#"+this.getTableName()+"_field_"+field[0]+"_error").show(); + return false; + } + } + + var val = $("#"+field[0]).val(); + if(val == ""){ + val = "[]"; + } + var data = JSON.parse(val); + + params['id'] = field[0]+"_"+this.dataGroupGetNextAutoIncrementId(data); + data.push(params); + + if(field[1]['sort-function'] != undefined && field[1]['sort-function'] != null){ + data.sort(field[1]['sort-function']); + } + + val = JSON.stringify(data); + $("#"+field[0]).val(val); + + var html = this.dataGroupToHtml(val,field); + + $("#"+field[0]+"_div").html(html); + + this.closePlainMessage(); + + } +}); + + +IceHRMBase.method('editDataGroup', function() { + var field = this.currentDataGroupField; + var id = this.currentDataGroupItemId; + var validator = new FormValidation(this.getTableName()+"_field_"+field[0],true,{'ShowPopup':false,"LabelErrorClass":"error"}); + if(validator.checkValues()){ + var params = validator.getFormParameters(); + if(this.doCustomFilterValidation(params)){ + + var val = $("#"+field[0]).val(); + if(val == ""){ + val = "[]"; + } + var data = JSON.parse(val); + + var editVal = {}; + var newVals = []; + for(var i=0;i= autoId){ + autoId = parseInt(id) + 1; + } + } + + return autoId; + +}); + +IceHRMBase.method('deleteDataGroupItem', function(id) { + var fieldId = id.substring(0,id.lastIndexOf("_")); + + var val = $("#"+fieldId).val(); + var data = JSON.parse(val); + + var newVal = []; + + for(var i=0;i'); + } + + + + + $(formId + ' #'+fields[i][0]).html(placeHolderVal); + }else if(fields[i][1].type == 'fileupload'){ + if(object[fields[i][0]] != null && object[fields[i][0]] != undefined && object[fields[i][0]] != ""){ + $(formId + ' #'+fields[i][0]).html(object[fields[i][0]]); + $(formId + ' #'+fields[i][0]).attr("val",object[fields[i][0]]); + $(formId + ' #'+fields[i][0]).show(); + $(formId + ' #'+fields[i][0]+"_download").show(); + + } + if(fields[i][1].readonly == true){ + $(formId + ' #'+fields[i][0]+"_upload").remove(); + } + }else if(fields[i][1].type == 'select'){ + if(object[fields[i][0]] == undefined || object[fields[i][0]] == null || object[fields[i][0]] == ""){ + object[fields[i][0]] = "NULL"; + } + $(formId + ' #'+fields[i][0]).val(object[fields[i][0]]); + + }else if(fields[i][1].type == 'select2'){ + if(object[fields[i][0]] == undefined || object[fields[i][0]] == null || object[fields[i][0]] == ""){ + object[fields[i][0]] = "NULL"; + } + $(formId + ' #'+fields[i][0]).select2('val',object[fields[i][0]]); + + }else if(fields[i][1].type == 'select2multi'){ + //TODO - SM + if(object[fields[i][0]] == undefined || object[fields[i][0]] == null || object[fields[i][0]] == ""){ + object[fields[i][0]] = "NULL"; + } + + var msVal = []; + if(object[fields[i][0]] != undefined && object[fields[i][0]] != null && object[fields[i][0]] != ""){ + try{ + msVal = JSON.parse(object[fields[i][0]]); + }catch(e){} + } + + $(formId + ' #'+fields[i][0]).select2('val',msVal); + + }else if(fields[i][1].type == 'datagroup'){ + try{ + var html = this.dataGroupToHtml(object[fields[i][0]],fields[i]); + $(formId + ' #'+fields[i][0]).val(object[fields[i][0]]); + $(formId + ' #'+fields[i][0]+"_div").html(html); + }catch(e){} + }else{ + $(formId + ' #'+fields[i][0]).val(object[fields[i][0]]); + } + + } +}); + +/** + * Cancel edit or add new on modules + * @method cancel + */ + +IceHRMBase.method('cancel', function() { + $("#"+this.getTableName()+'Form').hide(); + $("#"+this.getTableName()).show(); +}); + +IceHRMBase.method('renderFormField', function(field) { + var userId = 0; + if(this.fieldTemplates[field[1].type] == undefined || this.fieldTemplates[field[1].type] == null){ + return ""; + } + var t = this.fieldTemplates[field[1].type]; + if(field[1].validation != "none" && field[1].validation != "emailOrEmpty" && field[1].validation != "numberOrEmpty" && field[1].type != "placeholder" && field[1].label.indexOf('*') < 0){ + field[1].label = field[1].label + '*'; + } + if(field[1].type == 'text' || field[1].type == 'textarea' || field[1].type == 'hidden' || field[1].type == 'label' || field[1].type == 'placeholder'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + + }else if(field[1].type == 'select' || field[1].type == 'select2' || field[1].type == 'select2multi'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + if(field[1]['source'] != undefined && field[1]['source'] != null ){ + t = t.replace('_options_',this.renderFormSelectOptions(field[1].source, field)); + }else if(field[1]['remote-source'] != undefined && field[1]['remote-source'] != null ){ + var key = field[1]['remote-source'][0]+"_"+field[1]['remote-source'][1]+"_"+field[1]['remote-source'][2]; + t = t.replace('_options_',this.renderFormSelectOptionsRemote(this.fieldMasterData[key],field)); + } + + }else if(field[1].type == 'colorpick'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + + }else if(field[1].type == 'date'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + + }else if(field[1].type == 'datetime'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + + }else if(field[1].type == 'time'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + + }else if(field[1].type == 'fileupload'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + var ce = this.getCurrentProfile(); + if(ce != null && ce != undefined){ + userId = ce.id; + }else{ + userId = this.getUser().id * -1; + } + t = t.replace(/_userId_/g,userId); + t = t.replace(/_group_/g,this.tab); + + /* + if(object != null && object != undefined && object[field[0]] != null && object[field[0]] != undefined && object[field[0]] != ""){ + t = t.replace(/_id___rand_/g,field[0]); + } + */ + t = t.replace(/_rand_/g,this.generateRandom(14)); + + }else if(field[1].type == 'datagroup'){ + t = t.replace(/_id_/g,field[0]); + t = t.replace(/_label_/g,field[1].label); + } + + if(field[1].validation != undefined && field[1].validation != null && field[1].validation != ""){ + t = t.replace(/_validation_/g,'validation="'+field[1].validation+'"'); + }else{ + t = t.replace(/_validation_/g,''); + } + return t; +}); + +IceHRMBase.method('renderFormSelectOptions', function(options, field) { + var html = ""; + + if(field != null && field != undefined){ + if(field[1]['allow-null'] == true){ + if(field[1]['null-label'] != undefined && field[1]['null-label'] != null){ + html += ''; + }else{ + html += ''; + } + + } + } + + + //Sort options + + var tuples = []; + + for (var key in options) { + tuples.push(options[key]); + } + if(field[1]['sort'] != 'none'){ + tuples.sort(function(a, b) { + a = a[1]; + b = b[1]; + + return a < b ? -1 : (a > b ? 1 : 0); + }); + } + + + for (var i = 0; i < tuples.length; i++) { + var prop = tuples[i][0]; + var value = tuples[i][1]; + var t = ''; + t = t.replace('_id_', prop); + t = t.replace('_val_', value); + html += t; + + } + return html; + +}); + +IceHRMBase.method('renderFormSelectOptionsRemote', function(options,field) { + var html = ""; + if(field[1]['allow-null'] == true){ + if(field[1]['null-label'] != undefined && field[1]['null-label'] != null){ + html += ''; + }else{ + html += ''; + } + + } + + //Sort options + + var tuples = []; + + for (var key in options) { + tuples.push([key, options[key]]); + } + if(field[1]['sort'] != 'none') { + tuples.sort(function (a, b) { + a = a[1]; + b = b[1]; + + return a < b ? -1 : (a > b ? 1 : 0); + }); + } + + for (var i = 0; i < tuples.length; i++) { + var prop = tuples[i][0]; + var value = tuples[i][1]; + + var t = ''; + t = t.replace('_id_', prop); + t = t.replace('_val_', value); + html += t; + } + + + return html; + +}); + +IceHRMBase.method('setTemplates', function(templates) { + this.templates = templates; +}); + +IceHRMBase.method('setCustomTemplates', function(templates) { + this.customTemplates = templates; +}); + +IceHRMBase.method('setEmailTemplates', function(templates) { + this.emailTemplates = templates; +}); + +IceHRMBase.method('getCustomTemplate', function(file) { + return this.customTemplates[file]; +}); + +IceHRMBase.method('setFieldTemplates', function(templates) { + this.fieldTemplates = templates; +}); + + +IceHRMBase.method('getMetaFieldForRendering', function(fieldName) { + return ""; +}); + +IceHRMBase.method('clearDeleteParams', function() { + this.deleteParams = {}; +}); + +IceHRMBase.method('getShowAddNew', function() { + return this.showAddNew; +}); + +/** + * Override this method to change add new button label + * @method getAddNewLabel + */ + +IceHRMBase.method('getAddNewLabel', function() { + return "Add New"; +}); + +/** + * Used to set whether to show the add new button for a module + * @method setShowAddNew + * @param showAddNew {Boolean} value + */ + +IceHRMBase.method('setShowAddNew', function(showAddNew) { + this.showAddNew = showAddNew; +}); + +/** + * Used to set whether to show delete button for each entry in module + * @method setShowDelete + * @param val {Boolean} value + */ +IceHRMBase.method('setShowDelete', function(val) { + this.showDelete = val; +}); + + +/** + * Used to set whether to show edit button for each entry in module + * @method setShowEdit + * @param val {Boolean} value + */ + +IceHRMBase.method('setShowEdit', function(val) { + this.showEdit = val; +}); + +/** + * Used to set whether to show save button in form + * @method setShowSave + * @param val {Boolean} value + */ + + +IceHRMBase.method('setShowSave', function(val) { + this.showSave = val; +}); + + +/** + * Used to set whether to show cancel button in form + * @method setShowCancel + * @param val {Boolean} value + */ + +IceHRMBase.method('setShowCancel', function(val) { + this.showCancel = val; +}); + +/** + * Datatable option array will be extended with associative array provided here + * @method getCustomTableParams + * @param val {Boolean} value + */ + + +IceHRMBase.method('getCustomTableParams', function() { + return {}; +}); + +IceHRMBase.method('getActionButtons', function(obj) { + return modJs.getActionButtonsHtml(obj.aData[0],obj.aData); +}); + + +/** + * This return html for action buttons in each row. Override this method if you need to make changes to action buttons. + * @method getActionButtonsHtml + * @param id {int} id of the row + * @param data {Array} data for the row + * @returns {String} html for action buttons + */ + +IceHRMBase.method('getActionButtonsHtml', function(id,data) { + var editButton = ''; + var deleteButton = ''; + var html = '
    _edit__delete_
    '; + + if(this.showDelete){ + html = html.replace('_delete_',deleteButton); + }else{ + html = html.replace('_delete_',''); + } + + if(this.showEdit){ + html = html.replace('_edit_',editButton); + }else{ + html = html.replace('_edit_',''); + } + + html = html.replace(/_id_/g,id); + html = html.replace(/_BASE_/g,this.baseUrl); + return html; +}); + + +/** + * Generates a random string + * @method generateRandom + * @param length {int} required length of the string + * @returns {String} random string + */ + +IceHRMBase.method('generateRandom', function(length) { + var d = new Date(); + var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + var result = ''; + for (var i = length; i > 0; --i) result += chars[Math.round(Math.random() * (chars.length - 1))]; + return result+d.getTime(); +}); + + + +IceHRMBase.method('checkFileType', function (elementName, fileTypes) { + var fileElement = document.getElementById(elementName); + var fileExtension = ""; + if (fileElement.value.lastIndexOf(".") > 0) { + fileExtension = fileElement.value.substring(fileElement.value.lastIndexOf(".") + 1, fileElement.value.length); + } + + fileExtension = fileExtension.toLowerCase(); + + var allowed = fileTypes.split(","); + + if (allowed.indexOf(fileExtension) < 0) { + fileElement.value = ""; + this.showMessage("File Type Error",'Selected file type is not supported'); + this.clearFileElement(elementName); + return false; + } + + return true; + +}); + +IceHRMBase.method('clearFileElement', function (elementName) { + + var control = $("#"+elementName); + control.replaceWith( control = control.val('').clone( true ) ); +}); + + +IceHRMBase.method('fixJSON', function (json) { + if(this.noJSONRequests == "1"){ + json = json.replace(/"/g,'|'); + } + return json; +}); + + +IceHRMBase.method('getClientDate', function (date) { + + var offset = this.getClientGMTOffset(); + var tzDate = date.addMinutes(offset*60); + return tzDate; + +}); + +IceHRMBase.method('getClientGMTOffset', function () { + + var rightNow = new Date(); + var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0); + var temp = jan1.toGMTString(); + var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1)); + var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60); + + return std_time_offset; + +}); + +/** + * Override this method in a module to provide the help link for the module. Help link of the module on frontend will get updated with this. + * @method getHelpLink + * @returns {String} help link + */ + +IceHRMBase.method('getHelpLink', function () { + + return null; + +}); diff --git a/src/api/FormValidation.js b/src/api/FormValidation.js new file mode 100644 index 00000000..81d82e84 --- /dev/null +++ b/src/api/FormValidation.js @@ -0,0 +1,270 @@ +/* +This file is part of Ice Framework. + +Ice Framework is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Ice Framework is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Ice Framework. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function FormValidation(formId,validateAll,options) { + this.tempOptions = {}; + this.formId = formId; + this.formError = false; + this.formObject = null; + this.errorMessages = ""; + this.popupDialog = null; + this.validateAll = validateAll; + this.errorMap = new Array(); + + this.settings = {"thirdPartyPopup":null,"LabelErrorClass":false, "ShowPopup":true}; + + this.settings = jQuery.extend(this.settings,options); + + this.inputTypes = new Array( "text", "radio", "checkbox", "file", "password", "select-one","select-multi", "textarea","fileupload"); + + this.validator = { + + float: function (str) { + var floatstr = /^[-+]?[0-9]+(\.[0-9]+)?$/; + if (str != null && str.match(floatstr)) { + return true; + } else { + return false; + } + }, + + number: function (str) { + var numstr = /^[0-9]+$/; + if (str != null && str.match(numstr)) { + return true; + } else { + return false; + } + }, + + numberOrEmpty: function (str) { + if(str == ""){ + return true; + } + var numstr = /^[0-9]+$/; + if (str != null && str.match(numstr)) { + return true; + } else { + return false; + } + }, + + email: function (str) { + var emailPattern = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/; + return str != null && emailPattern.test(str); + }, + + emailOrEmpty: function (str) { + if(str == ""){ + return true; + } + var emailPattern = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/; + return str != null && emailPattern.test(str); + }, + + username: function (str) { + var username = /^[a-zA-Z0-9]+$/; + return str != null && username.test(str); + }, + + input: function (str) { + if (str != null && str.length > 0) { + return true; + } else { + return false; + } + } + + + }; + +} + +FormValidation.method('clearError' , function(formInput, overrideMessage) { + var id = formInput.attr("id"); + $('#'+ this.formId +' #field_'+id).removeClass('error'); + $('#'+ this.formId +' #help_'+id).html(''); +}); + +FormValidation.method('addError' , function(formInput, overrideMessage) { + this.formError = true; + if(formInput.attr("message") != null) { + this.errorMessages += (formInput.attr("message") + "\n"); + this.errorMap[formInput.attr("name")] = formInput.attr("message"); + }else{ + this.errorMap[formInput.attr("name")] = ""; + } + + var id = formInput.attr("id"); + var validation = formInput.attr("validation"); + var message = formInput.attr("validation"); + $('#'+ this.formId +' #field_'+id).addClass('error'); + if(message == undefined || message == null || message == ""){ + $('#'+ this.formId +' #help_'+id).html(message); + }else{ + if(validation == undefined || validation == null || validation == ""){ + $('#'+ this.formId +' #help_'+id).html("Required"); + }else{ + if(validation == "float" || validation == "number"){ + $('#'+ this.formId +' #help_'+id).html("Number required"); + }else if(validation == "email"){ + $('#'+ this.formId +' #help_'+id).html("Email required"); + }else{ + $('#'+ this.formId +' #help_'+id).html("Required"); + } + } + } + + +}); + + +FormValidation.method('showErrors' , function() { + if(this.formError) { + if(this.settings['thirdPartyPopup'] != undefined && this.settings['thirdPartyPopup'] != null){ + this.settings['thirdPartyPopup'].alert(); + }else{ + if(this.settings['ShowPopup'] == true){ + if(this.tempOptions['popupTop'] != undefined && this.tempOptions['popupTop'] != null){ + this.alert("Errors Found",this.errorMessages,this.tempOptions['popupTop']); + }else{ + this.alert("Errors Found",this.errorMessages,-1); + } + + } + } + } +}); + + +FormValidation.method('checkValues' , function(options) { + this.tempOptions = options; + var that = this; + this.formError = false; + this.errorMessages = ""; + this.formObject = new Object(); + var validate = function (inputObject) { + if(that.settings['LabelErrorClass'] != false){ + $("label[for='" + name + "']").removeClass(that.settings['LabelErrorClass']); + } + var id = inputObject.attr("id"); + var name = inputObject.attr("name"); + var type = inputObject.attr("type"); + + if(inputObject.hasClass('select2-focusser') || inputObject.hasClass('select2-input')){ + return true; + } + + if(jQuery.inArray(type, that.inputTypes ) >= 0) { + if(inputObject.hasClass('uploadInput')){ + inputValue = inputObject.attr("val"); + //}else if(inputObject.hasClass('datetimeInput')){ + //inputValue = inputObject.getDate()+":00"; + }else{ + //inputValue = (type == "radio" || type == "checkbox")?$("input[name='" + name + "']:checked").val():inputObject.val(); + + inputValue = null; + if(type == "radio" || type == "checkbox"){ + inputValue = $("input[name='" + name + "']:checked").val(); + }else if(inputObject.hasClass('select2Field')){ + if($('#'+id).select2('data') != null && $('#'+id).select2('data') != undefined){ + inputValue = $('#'+id).select2('data').id; + }else{ + inputValue = ""; + } + + }else if(inputObject.hasClass('select2Multi')){ + if($('#'+id).select2('data') != null && $('#'+id).select2('data') != undefined){ + inputValueObjects = $('#'+id).select2('data'); + inputValue = []; + for(var i=0;i. + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function NotificationManager() { + this.baseUrl = ""; + this.templates = {}; +} + +NotificationManager.method('setBaseUrl' , function(url) { + this.baseUrl = url; +}); + +NotificationManager.method('setTemplates' , function(data) { + this.templates = data; +}); + +NotificationManager.method('setTimeUtils' , function(timeUtils) { + this.timeUtils = timeUtils; +}); + +NotificationManager.method('getNotifications' , function(name, data) { + var that = this; + $.getJSON(this.baseUrl, {'a':'getNotifications'}, function(data) { + if(data.status == "SUCCESS"){ + that.renderNotifications(data.data[1],data.data[0]); + } + }); +}); + +NotificationManager.method('clearPendingNotifications' , function(name, data) { + var that = this; + $.getJSON(this.baseUrl, {'a':'clearNotifications'}, function(data) { + + }); +}); + +NotificationManager.method('renderNotifications' , function(notifications, unreadCount) { + + if(notifications.length == 0){ + return; + } + + var t = this.templates['notifications']; + if(unreadCount > 0){ + t = t.replace('#_count_#',unreadCount); + if(unreadCount > 1){ + t = t.replace('#_header_#',"You have "+unreadCount+" new notifications"); + }else{ + t = t.replace('#_header_#',"You have "+unreadCount+" new notification"); + } + + }else{ + t = t.replace('#_count_#',""); + t = t.replace('#_header_#',"You have no new notifications"); + } + + var notificationStr = ""; + + for (index in notifications){ + notificationStr += this.renderNotification(notifications[index]); + } + + t = t.replace('#_notifications_#',notificationStr); + + $obj = $(t); + + if(unreadCount == 0){ + $obj.find('.label-danger').remove(); + } + + $obj.attr("id","notifications"); + var k = $("#notifications"); + k.replaceWith($obj); + + $(".navbar .menu").slimscroll({ + height: "320px", + alwaysVisible: false, + size: "3px" + }).css("width", "100%"); + + this.timeUtils.convertToRelativeTime($(".notificationTime")); +}); + + +NotificationManager.method('renderNotification' , function(notification) { + var t = this.templates['notification']; + t = t.replace('#_image_#',notification.image); + + try{ + var json = JSON.parse(notification.action); + t = t.replace('#_url_#',this.baseUrl.replace('service.php','?')+json['url']); + }catch(e){ + t = t.replace('#_url_#',""); + } + + t = t.replace('#_time_#',notification.time); + t = t.replace('#_fromName_#',notification.type); + t = t.replace('#_message_#',this.getLineBreakString(notification.message,27)); + return t; +}); + + +NotificationManager.method('getLineBreakString' , function(str, len) { + var t = ""; + try{ + var arr = str.split(" "); + var count = 0; + for(var i=0;i len){ + t += arr[i] + "
    "; + count = 0; + }else{ + t += arr[i] + " "; + } + } + }catch(e){} + return t; +}); \ No newline at end of file diff --git a/src/api/SocialShare.js b/src/api/SocialShare.js new file mode 100644 index 00000000..ea7a42b2 --- /dev/null +++ b/src/api/SocialShare.js @@ -0,0 +1,47 @@ +function SocialShare(){ +}; + +SocialShare.facebook = function(url) { + var w = 700; + var h = 500; + var left = (screen.width/2)-(w/2); + var top = (screen.height/2)-(h/2); + + var url = "https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(url); + + window.open(url, "Share on Facebook", "width="+w+",height="+h+",left="+left+",top="+top); + return false; + +}; + +SocialShare.google = function(url) { + var w = 500; + var h = 500; + var left = (screen.width/2)-(w/2); + var top = (screen.height/2)-(h/2); + + var url = "https://plus.google.com/share?url="+encodeURIComponent(url); + + window.open(url, "Share on Google", "width="+w+",height="+h+",left="+left+",top="+top); + return false; + +}; + +SocialShare.linkedin = function(url) { + var w = 500; + var h = 500; + var left = (screen.width/2)-(w/2); + var top = (screen.height/2)-(h/2); + + var url = "https://www.linkedin.com/cws/share?url="+encodeURIComponent(url); + + window.open(url, "Share on Linked in", "width="+w+",height="+h+",left="+left+",top="+top); + return false; + +}; + +SocialShare.twitter = function(url, msg) { + window.open('http://twitter.com/share?text='+escape(msg) + '&url=' + escape(url),'popup','width=550,height=260,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=200,top=200'); + return false; + +}; \ No newline at end of file diff --git a/src/api/TimeUtils.js b/src/api/TimeUtils.js new file mode 100644 index 00000000..a187b7c2 --- /dev/null +++ b/src/api/TimeUtils.js @@ -0,0 +1,152 @@ +/* +This file is part of Ice Framework. + +Ice Framework is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Ice Framework is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Ice Framework. If not, see . + +------------------------------------------------------------------ + +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) + */ + +function TimeUtils() { + +} + +TimeUtils.method('setServerGMToffset' , function(serverGMToffset) { + this.serverGMToffset = serverGMToffset; +}); + +TimeUtils.method('convertToRelativeTime',function(selector) { + + var that = this; + + var getAmPmTime = function(curHour, curMin) { + var amPm = "am"; + var amPmHour = curHour; + if (amPmHour >= 12) { + amPm = "pm"; + if (amPmHour > 12) { + amPmHour = amPmHour - 12; + } + } + var prefixCurMin = ""; + if (curMin < 10) { + prefixCurMin = "0"; + } + + var prefixCurHour = ""; + if (curHour == 0) { + prefixCurHour = "0"; + } + return " at " + prefixCurHour + amPmHour + ":" + prefixCurMin + curMin + amPm; + }; + + var getBrowserTimeZone = function() { + var current_date = new Date(); + var gmt_offset = current_date.getTimezoneOffset() / 60; + return -gmt_offset; + }; + + var curDate = new Date(); + var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + + + var timezoneDiff = this.serverGMToffset - getBrowserTimeZone(); + var timezoneTimeDiff = timezoneDiff*60*60*1000; + + + selector.each(function () { + try{ + var thisValue = $(this).html(); + // Split value into date and time + var thisValueArray = thisValue.split(" "); + var thisValueDate = thisValueArray[0]; + var thisValueTime = thisValueArray[1]; + + // Split date into components + var thisValueDateArray = thisValueDate.split("-"); + var curYear = thisValueDateArray[0]; + var curMonth = thisValueDateArray[1]-1; + var curDay = thisValueDateArray[2]; + + // Split time into components + var thisValueTimeArray = thisValueTime.split(":"); + var curHour = thisValueTimeArray[0]; + var curMin = thisValueTimeArray[1]; + var curSec = thisValueTimeArray[2]; + + // Create this date + var thisDate = new Date(curYear, curMonth, curDay, curHour, curMin, curSec); + var thisTime = thisDate.getTime(); + var tzDate = new Date(thisTime - timezoneTimeDiff); + //var tzDay = tzDate.getDay();//getDay will return the day of the week not the month + //var tzDay = tzDate.getUTCDate(); //getUTCDate will return the day of the month + var tzDay = tzDate.toString('d'); // + var tzYear = tzDate.getFullYear(); + var tzHour = tzDate.getHours(); + var tzMin = tzDate.getMinutes(); + + // Create the full date + //var fullDate = days[tzDate.getDay()] + ", " + months[tzDate.getMonth()] + " " + tzDay + ", " + tzYear + getAmPmTime(tzHour, tzMin); + var fullDate = days[tzDate.getDay()] + ", " + months[tzDate.getMonth()] + " " + tzDay + ", " + tzYear + getAmPmTime(tzHour, tzMin); + + // Get the time different + var timeDiff = (curDate.getTime() - tzDate.getTime())/1000; + var minDiff = Math.abs(timeDiff/60); + var hourDiff = Math.abs(timeDiff/(60*60)); + var dayDiff = Math.abs(timeDiff/(60*60*24)); + var yearDiff = Math.abs(timeDiff/(60*60*24*365)); + + // If more than a day old, display the month, day and time (and year, if applicable) + var fbDate = ''; + if (dayDiff > 1) { + //fbDate = curDay + " " + months[tzDate.getMonth()].substring(0,3); + fbDate = tzDay + " " + months[tzDate.getMonth()].substring(0,3); + // Add the year, if applicable + if (yearDiff > 1) { + fbDate = fbDate + " "+ curYear; + } + + // Add the time + fbDate = fbDate + getAmPmTime(tzHour, tzMin); + } + // Less than a day old, and more than an hour old + else if (hourDiff >= 1) { + var roundedHour = Math.round(hourDiff); + if (roundedHour == 1) + fbDate = "about an hour ago"; + else + fbDate = roundedHour + " hours ago"; + } + // Less than an hour, and more than a minute + else if (minDiff >= 1) { + var roundedMin = Math.round(minDiff); + if (roundedMin == 1) + fbDate = "about a minute ago"; + else + fbDate = roundedMin + " minutes ago"; + } + // Less than a minute + else if (minDiff < 1) { + fbDate = "less than a minute ago"; + } + + // Update this element + $(this).html(fbDate); + $(this).attr('title', fullDate); + }catch(e){} + }); +}); \ No newline at end of file diff --git a/src/app/config.sample.php b/src/app/config.sample.php new file mode 100644 index 00000000..3aa84d4e --- /dev/null +++ b/src/app/config.sample.php @@ -0,0 +1,26 @@ + li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} + +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} + +@media (max-width: 767px) { + body { + padding-right: 20px; + padding-left: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-right: -20px; + margin-left: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + width: auto; + clear: none; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .row-fluid [class*="span"] { + display: block; + float: none; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + right: 20px; + left: 20px; + width: auto; + margin: 0; + } + .modal.fade.in { + top: auto; + } +} + +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 20px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-right: 10px; + padding-left: 10px; + } + .modal { + top: 10px; + right: 10px; + left: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} + +@media (max-width: 979px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 20px; + } + .navbar-fixed-bottom { + margin-top: 20px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-right: 10px; + padding-left: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 10px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #777777; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #777777; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .dropdown-menu a:hover { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:hover { + background-color: #111111; + } + .nav-collapse.in .btn-group { + padding: 0; + margin-top: 5px; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + display: block; + float: none; + max-width: none; + padding: 0; + margin: 0 15px; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 10px 15px; + margin: 10px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + height: 0; + overflow: hidden; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-right: 10px; + padding-left: 10px; + } +} + +@media (min-width: 980px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} diff --git a/src/app/install/bootstrap/css/bootstrap-responsive.min.css b/src/app/install/bootstrap/css/bootstrap-responsive.min.css new file mode 100644 index 00000000..7b0158da --- /dev/null +++ b/src/app/install/bootstrap/css/bootstrap-responsive.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap Responsive v2.1.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/src/app/install/bootstrap/css/bootstrap.css b/src/app/install/bootstrap/css/bootstrap.css new file mode 100644 index 00000000..9fa6f766 --- /dev/null +++ b/src/app/install/bootstrap/css/bootstrap.css @@ -0,0 +1,5774 @@ +/*! + * Bootstrap v2.1.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +audio:not([controls]) { + display: none; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +a:hover, +a:active { + outline: 0; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + width: auto\9; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +#map_canvas img { + max-width: none; +} + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} + +button, +input { + *overflow: visible; + line-height: normal; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; +} + +a { + color: #0088cc; + text-decoration: none; +} + +a:hover { + color: #005580; + text-decoration: underline; +} + +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} + +.row { + margin-left: -20px; + *zoom: 1; +} + +.row:before, +.row:after { + display: table; + line-height: 0; + content: ""; +} + +.row:after { + clear: both; +} + +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} + +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.span12 { + width: 940px; +} + +.span11 { + width: 860px; +} + +.span10 { + width: 780px; +} + +.span9 { + width: 700px; +} + +.span8 { + width: 620px; +} + +.span7 { + width: 540px; +} + +.span6 { + width: 460px; +} + +.span5 { + width: 380px; +} + +.span4 { + width: 300px; +} + +.span3 { + width: 220px; +} + +.span2 { + width: 140px; +} + +.span1 { + width: 60px; +} + +.offset12 { + margin-left: 980px; +} + +.offset11 { + margin-left: 900px; +} + +.offset10 { + margin-left: 820px; +} + +.offset9 { + margin-left: 740px; +} + +.offset8 { + margin-left: 660px; +} + +.offset7 { + margin-left: 580px; +} + +.offset6 { + margin-left: 500px; +} + +.offset5 { + margin-left: 420px; +} + +.offset4 { + margin-left: 340px; +} + +.offset3 { + margin-left: 260px; +} + +.offset2 { + margin-left: 180px; +} + +.offset1 { + margin-left: 100px; +} + +.row-fluid { + width: 100%; + *zoom: 1; +} + +.row-fluid:before, +.row-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.row-fluid:after { + clear: both; +} + +.row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} + +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} + +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} + +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} + +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} + +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} + +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} + +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} + +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} + +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} + +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} + +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} + +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} + +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} + +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} + +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} + +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} + +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} + +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} + +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} + +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} + +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} + +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} + +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} + +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} + +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} + +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} + +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} + +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} + +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} + +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} + +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} + +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} + +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} + +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} + +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} + +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} + +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} + +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} + +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} + +.container:before, +.container:after { + display: table; + line-height: 0; + content: ""; +} + +.container:after { + clear: both; +} + +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} + +.container-fluid:before, +.container-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.container-fluid:after { + clear: both; +} + +p { + margin: 0 0 10px; +} + +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; +} + +small { + font-size: 85%; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +cite { + font-style: normal; +} + +.muted { + color: #999999; +} + +.text-warning { + color: #c09853; +} + +.text-error { + color: #b94a48; +} + +.text-info { + color: #3a87ad; +} + +.text-success { + color: #468847; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: inherit; + font-weight: bold; + line-height: 1; + color: inherit; + text-rendering: optimizelegibility; +} + +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} + +h1 { + font-size: 36px; + line-height: 40px; +} + +h2 { + font-size: 30px; + line-height: 40px; +} + +h3 { + font-size: 24px; + line-height: 40px; +} + +h4 { + font-size: 18px; + line-height: 20px; +} + +h5 { + font-size: 14px; + line-height: 20px; +} + +h6 { + font-size: 12px; + line-height: 20px; +} + +h1 small { + font-size: 24px; +} + +h2 small { + font-size: 18px; +} + +h3 small { + font-size: 14px; +} + +h4 small { + font-size: 14px; +} + +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #eeeeee; +} + +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} + +li { + line-height: 20px; +} + +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} + +dl { + margin-bottom: 20px; +} + +dt, +dd { + line-height: 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 10px; +} + +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + +.dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dl-horizontal dd { + margin-left: 180px; +} + +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} + +abbr[title] { + cursor: help; + border-bottom: 1px dotted #999999; +} + +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} + +blockquote p { + margin-bottom: 0; + font-size: 16px; + font-weight: 300; + line-height: 25px; +} + +blockquote small { + display: block; + line-height: 20px; + color: #999999; +} + +blockquote small:before { + content: '\2014 \00A0'; +} + +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} + +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} + +blockquote.pull-right small:before { + content: ''; +} + +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} + +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} + +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +pre.prettyprint { + margin-bottom: 20px; +} + +pre code { + padding: 0; + color: inherit; + background-color: transparent; + border: 0; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +form { + margin: 0 0 20px; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} + +legend small { + font-size: 15px; + color: #999999; +} + +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} + +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +label { + display: block; + margin-bottom: 5px; +} + +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 9px; + font-size: 14px; + line-height: 20px; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +input, +textarea, +.uneditable-input { + width: 206px; +} + +textarea { + height: auto; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + *margin-top: 0; + line-height: normal; + cursor: pointer; +} + +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} + +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} + +select { + width: 220px; + background-color: #ffffff; + border: 1px solid #cccccc; +} + +select[multiple], +select[size] { + height: auto; +} + +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.uneditable-input, +.uneditable-textarea { + color: #999999; + cursor: not-allowed; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); +} + +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} + +.uneditable-textarea { + width: auto; + height: auto; +} + +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} + +.radio, +.checkbox { + min-height: 18px; + padding-left: 18px; +} + +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -18px; +} + +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} + +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} + +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} + +.input-mini { + width: 60px; +} + +.input-small { + width: 90px; +} + +.input-medium { + width: 150px; +} + +.input-large { + width: 210px; +} + +.input-xlarge { + width: 270px; +} + +.input-xxlarge { + width: 530px; +} + +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} + +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} + +input, +textarea, +.uneditable-input { + margin-left: 0; +} + +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} + +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} + +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} + +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} + +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} + +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} + +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} + +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} + +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} + +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} + +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} + +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} + +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} + +.controls-row { + *zoom: 1; +} + +.controls-row:before, +.controls-row:after { + display: table; + line-height: 0; + content: ""; +} + +.controls-row:after { + clear: both; +} + +.controls-row [class*="span"] { + float: left; +} + +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} + +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} + +.control-group.warning > label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} + +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} + +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} + +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} + +.control-group.error > label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} + +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} + +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} + +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} + +.control-group.success > label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} + +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} + +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} + +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} + +.control-group.info > label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} + +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} + +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} + +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} + +input:focus:required:invalid, +textarea:focus:required:invalid, +select:focus:required:invalid { + color: #b94a48; + border-color: #ee5f5b; +} + +input:focus:required:invalid:focus, +textarea:focus:required:invalid:focus, +select:focus:required:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} + +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} + +.form-actions:before, +.form-actions:after { + display: table; + line-height: 0; + content: ""; +} + +.form-actions:after { + clear: both; +} + +.help-block, +.help-inline { + color: #595959; +} + +.help-block { + display: block; + margin-bottom: 10px; +} + +.help-inline { + display: inline-block; + *display: inline; + padding-left: 5px; + vertical-align: middle; + *zoom: 1; +} + +.input-append, +.input-prepend { + margin-bottom: 5px; + font-size: 0; + white-space: nowrap; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + font-size: 14px; + vertical-align: top; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} + +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} + +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} + +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} + +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} + +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} + +.input-append .add-on, +.input-append .btn { + margin-left: -1px; +} + +.input-append .add-on:last-child, +.input-append .btn:last-child { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} + +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +/* Allow for input prepend/append in search forms */ + +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + margin-bottom: 0; + vertical-align: middle; + *zoom: 1; +} + +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} + +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} + +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} + +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} + +.control-group { + margin-bottom: 10px; +} + +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} + +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} + +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + line-height: 0; + content: ""; +} + +.form-horizontal .control-group:after { + clear: both; +} + +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} + +.form-horizontal .controls:first-child { + *padding-left: 180px; +} + +.form-horizontal .help-block { + margin-bottom: 0; +} + +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block { + margin-top: 10px; +} + +.form-horizontal .form-actions { + padding-left: 180px; +} + +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} + +.table { + width: 100%; + margin-bottom: 20px; +} + +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} + +.table th { + font-weight: bold; +} + +.table thead th { + vertical-align: bottom; +} + +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} + +.table tbody + tbody { + border-top: 2px solid #dddddd; +} + +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} + +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} + +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} + +.table-bordered thead:first-child tr:first-child th:first-child, +.table-bordered tbody:first-child tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered thead:first-child tr:first-child th:last-child, +.table-bordered tbody:first-child tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-bordered thead:last-child tr:last-child th:first-child, +.table-bordered tbody:last-child tr:last-child td:first-child, +.table-bordered tfoot:last-child tr:last-child td:first-child { + -webkit-border-radius: 0 0 0 4px; + -moz-border-radius: 0 0 0 4px; + border-radius: 0 0 0 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.table-bordered thead:last-child tr:last-child th:last-child, +.table-bordered tbody:last-child tr:last-child td:last-child, +.table-bordered tfoot:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; +} + +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-striped tbody tr:nth-child(odd) td, +.table-striped tbody tr:nth-child(odd) th { + background-color: #f9f9f9; +} + +.table-hover tbody tr:hover td, +.table-hover tbody tr:hover th { + background-color: #f5f5f5; +} + +table [class*=span], +.row-fluid table [class*=span] { + display: table-cell; + float: none; + margin-left: 0; +} + +.table .span1 { + float: none; + width: 44px; + margin-left: 0; +} + +.table .span2 { + float: none; + width: 124px; + margin-left: 0; +} + +.table .span3 { + float: none; + width: 204px; + margin-left: 0; +} + +.table .span4 { + float: none; + width: 284px; + margin-left: 0; +} + +.table .span5 { + float: none; + width: 364px; + margin-left: 0; +} + +.table .span6 { + float: none; + width: 444px; + margin-left: 0; +} + +.table .span7 { + float: none; + width: 524px; + margin-left: 0; +} + +.table .span8 { + float: none; + width: 604px; + margin-left: 0; +} + +.table .span9 { + float: none; + width: 684px; + margin-left: 0; +} + +.table .span10 { + float: none; + width: 764px; + margin-left: 0; +} + +.table .span11 { + float: none; + width: 844px; + margin-left: 0; +} + +.table .span12 { + float: none; + width: 924px; + margin-left: 0; +} + +.table .span13 { + float: none; + width: 1004px; + margin-left: 0; +} + +.table .span14 { + float: none; + width: 1084px; + margin-left: 0; +} + +.table .span15 { + float: none; + width: 1164px; + margin-left: 0; +} + +.table .span16 { + float: none; + width: 1244px; + margin-left: 0; +} + +.table .span17 { + float: none; + width: 1324px; + margin-left: 0; +} + +.table .span18 { + float: none; + width: 1404px; + margin-left: 0; +} + +.table .span19 { + float: none; + width: 1484px; + margin-left: 0; +} + +.table .span20 { + float: none; + width: 1564px; + margin-left: 0; +} + +.table .span21 { + float: none; + width: 1644px; + margin-left: 0; +} + +.table .span22 { + float: none; + width: 1724px; + margin-left: 0; +} + +.table .span23 { + float: none; + width: 1804px; + margin-left: 0; +} + +.table .span24 { + float: none; + width: 1884px; + margin-left: 0; +} + +.table tbody tr.success td { + background-color: #dff0d8; +} + +.table tbody tr.error td { + background-color: #f2dede; +} + +.table tbody tr.warning td { + background-color: #fcf8e3; +} + +.table tbody tr.info td { + background-color: #d9edf7; +} + +.table-hover tbody tr.success:hover td { + background-color: #d0e9c6; +} + +.table-hover tbody tr.error:hover td { + background-color: #ebcccc; +} + +.table-hover tbody tr.warning:hover td { + background-color: #faf2cc; +} + +.table-hover tbody tr.info:hover td { + background-color: #c4e3f3; +} + +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; +} + +/* White icons with optional class, or on hover/active states of certain elements */ + +.icon-white, +.nav-tabs > .active > a > [class^="icon-"], +.nav-tabs > .active > a > [class*=" icon-"], +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} + +.icon-glass { + background-position: 0 0; +} + +.icon-music { + background-position: -24px 0; +} + +.icon-search { + background-position: -48px 0; +} + +.icon-envelope { + background-position: -72px 0; +} + +.icon-heart { + background-position: -96px 0; +} + +.icon-star { + background-position: -120px 0; +} + +.icon-star-empty { + background-position: -144px 0; +} + +.icon-user { + background-position: -168px 0; +} + +.icon-film { + background-position: -192px 0; +} + +.icon-th-large { + background-position: -216px 0; +} + +.icon-th { + background-position: -240px 0; +} + +.icon-th-list { + background-position: -264px 0; +} + +.icon-ok { + background-position: -288px 0; +} + +.icon-remove { + background-position: -312px 0; +} + +.icon-zoom-in { + background-position: -336px 0; +} + +.icon-zoom-out { + background-position: -360px 0; +} + +.icon-off { + background-position: -384px 0; +} + +.icon-signal { + background-position: -408px 0; +} + +.icon-cog { + background-position: -432px 0; +} + +.icon-trash { + background-position: -456px 0; +} + +.icon-home { + background-position: 0 -24px; +} + +.icon-file { + background-position: -24px -24px; +} + +.icon-time { + background-position: -48px -24px; +} + +.icon-road { + background-position: -72px -24px; +} + +.icon-download-alt { + background-position: -96px -24px; +} + +.icon-download { + background-position: -120px -24px; +} + +.icon-upload { + background-position: -144px -24px; +} + +.icon-inbox { + background-position: -168px -24px; +} + +.icon-play-circle { + background-position: -192px -24px; +} + +.icon-repeat { + background-position: -216px -24px; +} + +.icon-refresh { + background-position: -240px -24px; +} + +.icon-list-alt { + background-position: -264px -24px; +} + +.icon-lock { + background-position: -287px -24px; +} + +.icon-flag { + background-position: -312px -24px; +} + +.icon-headphones { + background-position: -336px -24px; +} + +.icon-volume-off { + background-position: -360px -24px; +} + +.icon-volume-down { + background-position: -384px -24px; +} + +.icon-volume-up { + background-position: -408px -24px; +} + +.icon-qrcode { + background-position: -432px -24px; +} + +.icon-barcode { + background-position: -456px -24px; +} + +.icon-tag { + background-position: 0 -48px; +} + +.icon-tags { + background-position: -25px -48px; +} + +.icon-book { + background-position: -48px -48px; +} + +.icon-bookmark { + background-position: -72px -48px; +} + +.icon-print { + background-position: -96px -48px; +} + +.icon-camera { + background-position: -120px -48px; +} + +.icon-font { + background-position: -144px -48px; +} + +.icon-bold { + background-position: -167px -48px; +} + +.icon-italic { + background-position: -192px -48px; +} + +.icon-text-height { + background-position: -216px -48px; +} + +.icon-text-width { + background-position: -240px -48px; +} + +.icon-align-left { + background-position: -264px -48px; +} + +.icon-align-center { + background-position: -288px -48px; +} + +.icon-align-right { + background-position: -312px -48px; +} + +.icon-align-justify { + background-position: -336px -48px; +} + +.icon-list { + background-position: -360px -48px; +} + +.icon-indent-left { + background-position: -384px -48px; +} + +.icon-indent-right { + background-position: -408px -48px; +} + +.icon-facetime-video { + background-position: -432px -48px; +} + +.icon-picture { + background-position: -456px -48px; +} + +.icon-pencil { + background-position: 0 -72px; +} + +.icon-map-marker { + background-position: -24px -72px; +} + +.icon-adjust { + background-position: -48px -72px; +} + +.icon-tint { + background-position: -72px -72px; +} + +.icon-edit { + background-position: -96px -72px; +} + +.icon-share { + background-position: -120px -72px; +} + +.icon-check { + background-position: -144px -72px; +} + +.icon-move { + background-position: -168px -72px; +} + +.icon-step-backward { + background-position: -192px -72px; +} + +.icon-fast-backward { + background-position: -216px -72px; +} + +.icon-backward { + background-position: -240px -72px; +} + +.icon-play { + background-position: -264px -72px; +} + +.icon-pause { + background-position: -288px -72px; +} + +.icon-stop { + background-position: -312px -72px; +} + +.icon-forward { + background-position: -336px -72px; +} + +.icon-fast-forward { + background-position: -360px -72px; +} + +.icon-step-forward { + background-position: -384px -72px; +} + +.icon-eject { + background-position: -408px -72px; +} + +.icon-chevron-left { + background-position: -432px -72px; +} + +.icon-chevron-right { + background-position: -456px -72px; +} + +.icon-plus-sign { + background-position: 0 -96px; +} + +.icon-minus-sign { + background-position: -24px -96px; +} + +.icon-remove-sign { + background-position: -48px -96px; +} + +.icon-ok-sign { + background-position: -72px -96px; +} + +.icon-question-sign { + background-position: -96px -96px; +} + +.icon-info-sign { + background-position: -120px -96px; +} + +.icon-screenshot { + background-position: -144px -96px; +} + +.icon-remove-circle { + background-position: -168px -96px; +} + +.icon-ok-circle { + background-position: -192px -96px; +} + +.icon-ban-circle { + background-position: -216px -96px; +} + +.icon-arrow-left { + background-position: -240px -96px; +} + +.icon-arrow-right { + background-position: -264px -96px; +} + +.icon-arrow-up { + background-position: -289px -96px; +} + +.icon-arrow-down { + background-position: -312px -96px; +} + +.icon-share-alt { + background-position: -336px -96px; +} + +.icon-resize-full { + background-position: -360px -96px; +} + +.icon-resize-small { + background-position: -384px -96px; +} + +.icon-plus { + background-position: -408px -96px; +} + +.icon-minus { + background-position: -433px -96px; +} + +.icon-asterisk { + background-position: -456px -96px; +} + +.icon-exclamation-sign { + background-position: 0 -120px; +} + +.icon-gift { + background-position: -24px -120px; +} + +.icon-leaf { + background-position: -48px -120px; +} + +.icon-fire { + background-position: -72px -120px; +} + +.icon-eye-open { + background-position: -96px -120px; +} + +.icon-eye-close { + background-position: -120px -120px; +} + +.icon-warning-sign { + background-position: -144px -120px; +} + +.icon-plane { + background-position: -168px -120px; +} + +.icon-calendar { + background-position: -192px -120px; +} + +.icon-random { + width: 16px; + background-position: -216px -120px; +} + +.icon-comment { + background-position: -240px -120px; +} + +.icon-magnet { + background-position: -264px -120px; +} + +.icon-chevron-up { + background-position: -288px -120px; +} + +.icon-chevron-down { + background-position: -313px -119px; +} + +.icon-retweet { + background-position: -336px -120px; +} + +.icon-shopping-cart { + background-position: -360px -120px; +} + +.icon-folder-close { + background-position: -384px -120px; +} + +.icon-folder-open { + width: 16px; + background-position: -408px -120px; +} + +.icon-resize-vertical { + background-position: -432px -119px; +} + +.icon-resize-horizontal { + background-position: -456px -118px; +} + +.icon-hdd { + background-position: 0 -144px; +} + +.icon-bullhorn { + background-position: -24px -144px; +} + +.icon-bell { + background-position: -48px -144px; +} + +.icon-certificate { + background-position: -72px -144px; +} + +.icon-thumbs-up { + background-position: -96px -144px; +} + +.icon-thumbs-down { + background-position: -120px -144px; +} + +.icon-hand-right { + background-position: -144px -144px; +} + +.icon-hand-left { + background-position: -168px -144px; +} + +.icon-hand-up { + background-position: -192px -144px; +} + +.icon-hand-down { + background-position: -216px -144px; +} + +.icon-circle-arrow-right { + background-position: -240px -144px; +} + +.icon-circle-arrow-left { + background-position: -264px -144px; +} + +.icon-circle-arrow-up { + background-position: -288px -144px; +} + +.icon-circle-arrow-down { + background-position: -312px -144px; +} + +.icon-globe { + background-position: -336px -144px; +} + +.icon-wrench { + background-position: -360px -144px; +} + +.icon-tasks { + background-position: -384px -144px; +} + +.icon-filter { + background-position: -408px -144px; +} + +.icon-briefcase { + background-position: -432px -144px; +} + +.icon-fullscreen { + background-position: -456px -144px; +} + +.dropup, +.dropdown { + position: relative; +} + +.dropdown-toggle { + *margin-bottom: -3px; +} + +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.dropdown-menu a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} + +.dropdown-menu li > a:hover, +.dropdown-menu li > a:focus, +.dropdown-submenu:hover > a { + color: #ffffff; + text-decoration: none; + background-color: #0088cc; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu .active > a, +.dropdown-menu .active > a:hover { + color: #ffffff; + text-decoration: none; + background-color: #0088cc; + background-color: #0081c2; + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-repeat: repeat-x; + outline: 0; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu .disabled > a, +.dropdown-menu .disabled > a:hover { + color: #999999; +} + +.dropdown-menu .disabled > a:hover { + text-decoration: none; + cursor: default; + background-color: transparent; +} + +.open { + *z-index: 1000; +} + +.open > .dropdown-menu { + display: block; +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +.dropdown-submenu > a:after { + display: block; + float: right; + width: 0; + height: 0; + margin-top: 5px; + margin-right: -10px; + border-color: transparent; + border-left-color: #cccccc; + border-style: solid; + border-width: 5px 0 5px 5px; + content: " "; +} + +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} + +.dropdown .dropdown-menu .nav-header { + padding-right: 20px; + padding-left: 20px; +} + +.typeahead { + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} + +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} + +.fade.in { + opacity: 1; +} + +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} + +.collapse.in { + height: auto; +} + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} + +.close:hover { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.btn { + display: inline-block; + *display: inline; + padding: 4px 14px; + margin-bottom: 0; + *margin-left: .3em; + font-size: 14px; + line-height: 20px; + *line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + *background-color: #e6e6e6; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #bbbbbb; + *border: 0; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn:hover, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} + +.btn:active, +.btn.active { + background-color: #cccccc \9; +} + +.btn:first-child { + *margin-left: 0; +} + +.btn:hover { + color: #333333; + text-decoration: none; + background-color: #e6e6e6; + *background-color: #d9d9d9; + /* Buttons in IE7 don't get borders, so darken on hover */ + + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} + +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.btn.active, +.btn:active { + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn.disabled, +.btn[disabled] { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-large { + padding: 9px 14px; + font-size: 16px; + line-height: normal; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.btn-large [class^="icon-"] { + margin-top: 2px; +} + +.btn-small { + padding: 3px 9px; + font-size: 12px; + line-height: 18px; +} + +.btn-small [class^="icon-"] { + margin-top: 0; +} + +.btn-mini { + padding: 2px 6px; + font-size: 11px; + line-height: 17px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} + +.btn { + border-color: #c5c5c5; + border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); +} + +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #006dcc; + *background-color: #0044cc; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-repeat: repeat-x; + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); +} + +.btn-primary:hover, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} + +.btn-primary:active, +.btn-primary.active { + background-color: #003399 \9; +} + +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + *background-color: #f89406; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-repeat: repeat-x; + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); +} + +.btn-warning:hover, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} + +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} + +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + *background-color: #bd362f; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-repeat: repeat-x; + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); +} + +.btn-danger:hover, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} + +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} + +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + *background-color: #51a351; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-repeat: repeat-x; + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); +} + +.btn-success:hover, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} + +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} + +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #49afcd; + *background-color: #2f96b4; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); + background-repeat: repeat-x; + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); +} + +.btn-info:hover, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} + +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} + +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #363636; + *background-color: #222222; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); + background-image: -webkit-linear-gradient(top, #444444, #222222); + background-image: -o-linear-gradient(top, #444444, #222222); + background-image: linear-gradient(to bottom, #444444, #222222); + background-image: -moz-linear-gradient(top, #444444, #222222); + background-repeat: repeat-x; + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); +} + +.btn-inverse:hover, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} + +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} + +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} + +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} + +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} + +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-link { + color: #0088cc; + cursor: pointer; + border-color: transparent; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-link:hover { + color: #005580; + text-decoration: underline; + background-color: transparent; +} + +.btn-link[disabled]:hover { + color: #333333; + text-decoration: none; +} + +.btn-group { + position: relative; + *margin-left: .3em; + font-size: 0; + white-space: nowrap; + vertical-align: middle; +} + +.btn-group:first-child { + *margin-left: 0; +} + +.btn-group + .btn-group { + margin-left: 5px; +} + +.btn-toolbar { + margin-top: 10px; + margin-bottom: 10px; + font-size: 0; +} + +.btn-toolbar .btn-group { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} + +.btn-toolbar .btn + .btn, +.btn-toolbar .btn-group + .btn, +.btn-toolbar .btn + .btn-group { + margin-left: 5px; +} + +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group > .btn + .btn { + margin-left: -1px; +} + +.btn-group > .btn, +.btn-group > .dropdown-menu { + font-size: 14px; +} + +.btn-group > .btn-mini { + font-size: 11px; +} + +.btn-group > .btn-small { + font-size: 12px; +} + +.btn-group > .btn-large { + font-size: 16px; +} + +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + +.btn-group > .btn + .dropdown-toggle { + *padding-top: 5px; + padding-right: 8px; + *padding-bottom: 5px; + padding-left: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group > .btn-mini + .dropdown-toggle { + *padding-top: 2px; + padding-right: 5px; + *padding-bottom: 2px; + padding-left: 5px; +} + +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} + +.btn-group > .btn-large + .dropdown-toggle { + *padding-top: 7px; + padding-right: 12px; + *padding-bottom: 7px; + padding-left: 12px; +} + +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} + +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #0044cc; +} + +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} + +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} + +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} + +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} + +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} + +.btn .caret { + margin-top: 8px; + margin-left: 0; +} + +.btn-mini .caret, +.btn-small .caret, +.btn-large .caret { + margin-top: 6px; +} + +.btn-large .caret { + border-top-width: 5px; + border-right-width: 5px; + border-left-width: 5px; +} + +.dropup .btn-large .caret { + border-top: 0; + border-bottom: 5px solid #000000; +} + +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} + +.btn-group-vertical .btn { + display: block; + float: none; + width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group-vertical .btn + .btn { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.btn-group-vertical .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.btn-group-vertical .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} + +.btn-group-vertical .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + color: #c09853; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.alert h4 { + margin: 0; +} + +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; +} + +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} + +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} + +.alert-block p + p { + margin-top: 5px; +} + +.nav { + margin-bottom: 20px; + margin-left: 0; + list-style: none; +} + +.nav > li > a { + display: block; +} + +.nav > li > a:hover { + text-decoration: none; + background-color: #eeeeee; +} + +.nav > .pull-right { + float: right; +} + +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} + +.nav li + .nav-header { + margin-top: 9px; +} + +.nav-list { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 0; +} + +.nav-list > li > a, +.nav-list .nav-header { + margin-right: -15px; + margin-left: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} + +.nav-list > li > a { + padding: 3px 15px; +} + +.nav-list > .active > a, +.nav-list > .active > a:hover { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #0088cc; +} + +.nav-list [class^="icon-"] { + margin-right: 2px; +} + +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.nav-tabs, +.nav-pills { + *zoom: 1; +} + +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + line-height: 0; + content: ""; +} + +.nav-tabs:after, +.nav-pills:after { + clear: both; +} + +.nav-tabs > li, +.nav-pills > li { + float: left; +} + +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} + +.nav-tabs { + border-bottom: 1px solid #ddd; +} + +.nav-tabs > li { + margin-bottom: -1px; +} + +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #dddddd; +} + +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover { + color: #555555; + cursor: default; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.nav-pills > .active > a, +.nav-pills > .active > a:hover { + color: #ffffff; + background-color: #0088cc; +} + +.nav-stacked > li { + float: none; +} + +.nav-stacked > li > a { + margin-right: 0; +} + +.nav-tabs.nav-stacked { + border-bottom: 0; +} + +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; +} + +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.nav-tabs.nav-stacked > li > a:hover { + z-index: 2; + border-color: #ddd; +} + +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} + +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} + +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.nav .dropdown-toggle .caret { + margin-top: 6px; + border-top-color: #0088cc; + border-bottom-color: #0088cc; +} + +.nav .dropdown-toggle:hover .caret { + border-top-color: #005580; + border-bottom-color: #005580; +} + +/* move down carets for tabs */ + +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} + +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} + +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.nav > .dropdown.active > a:hover { + cursor: pointer; +} + +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} + +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-stacked .open > a:hover { + border-color: #999999; +} + +.tabbable { + *zoom: 1; +} + +.tabbable:before, +.tabbable:after { + display: table; + line-height: 0; + content: ""; +} + +.tabbable:after { + clear: both; +} + +.tab-content { + overflow: auto; +} + +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} + +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} + +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.tabs-below > .nav-tabs > li > a:hover { + border-top-color: #ddd; + border-bottom-color: transparent; +} + +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover { + border-color: transparent #ddd #ddd #ddd; +} + +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} + +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} + +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.tabs-left > .nav-tabs > li > a:hover { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} + +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} + +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} + +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.tabs-right > .nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} + +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} + +.nav > .disabled > a { + color: #999999; +} + +.nav > .disabled > a:hover { + text-decoration: none; + cursor: default; + background-color: transparent; +} + +.navbar { + *position: relative; + *z-index: 2; + margin-bottom: 20px; + overflow: visible; + color: #777777; +} + +.navbar-inner { + min-height: 40px; + padding-right: 20px; + padding-left: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + border: 1px solid #d4d4d4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + *zoom: 1; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); +} + +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + +.navbar .container { + width: auto; +} + +.nav-collapse.collapse { + height: auto; +} + +.navbar .brand { + display: block; + float: left; + padding: 10px 20px 10px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #777777; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .brand:hover { + text-decoration: none; +} + +.navbar-text { + margin-bottom: 0; + line-height: 40px; +} + +.navbar-link { + color: #777777; +} + +.navbar-link:hover { + color: #333333; +} + +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-right: 1px solid #ffffff; + border-left: 1px solid #f2f2f2; +} + +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} + +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn { + margin-top: 0; +} + +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} + +.navbar-form:before, +.navbar-form:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-form:after { + clear: both; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} + +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} + +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 6px; + white-space: nowrap; +} + +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} + +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} + +.navbar-search .search-query { + padding: 4px 14px; + margin-bottom: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.navbar-static-top { + position: static; + width: 100%; + margin-bottom: 0; +} + +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} + +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-right: 0; + padding-left: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.navbar-fixed-top { + top: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar-fixed-bottom { + bottom: 0; +} + +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} + +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} + +.navbar .nav > li { + float: left; +} + +.navbar .nav > li > a { + float: none; + padding: 10px 15px 10px; + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} + +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + color: #333333; + text-decoration: none; + background-color: transparent; +} + +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} + +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-right: 5px; + margin-left: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + *background-color: #e5e5e5; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); +} + +.navbar .btn-navbar:hover, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} + +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} + +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} + +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} + +.navbar .nav > li > .dropdown-menu:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.navbar .nav > li > .dropdown-menu:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-left: 6px solid transparent; + content: ''; +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + top: auto; + bottom: -7px; + border-top: 7px solid #ccc; + border-bottom: 0; + border-top-color: rgba(0, 0, 0, 0.2); +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + top: auto; + bottom: -6px; + border-top: 6px solid #ffffff; + border-bottom: 0; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + color: #555555; + background-color: #e5e5e5; +} + +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + right: 12px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + right: 13px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + right: 100%; + left: auto; + margin-right: -1px; + margin-left: 0; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.navbar-inverse { + color: #999999; +} + +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + border-color: #252525; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); +} + +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; +} + +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; + background-color: transparent; +} + +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .navbar-link { + color: #999999; +} + +.navbar-inverse .navbar-link:hover { + color: #ffffff; +} + +.navbar-inverse .divider-vertical { + border-right-color: #222222; + border-left-color: #111111; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + outline: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} + +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + *background-color: #040404; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-image: -moz-linear-gradient(top, #151515, #040404); + background-repeat: repeat-x; + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); +} + +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} + +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} + +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.breadcrumb li { + display: inline-block; + *display: inline; + text-shadow: 0 1px 0 #ffffff; + *zoom: 1; +} + +.breadcrumb .divider { + padding: 0 5px; + color: #ccc; +} + +.breadcrumb .active { + color: #999999; +} + +.pagination { + height: 40px; + margin: 20px 0; +} + +.pagination ul { + display: inline-block; + *display: inline; + margin-bottom: 0; + margin-left: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *zoom: 1; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.pagination ul > li { + display: inline; +} + +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 0 14px; + line-height: 38px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} + +.pagination ul > li > a:hover, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} + +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} + +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover { + color: #999999; + cursor: default; + background-color: transparent; +} + +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} + +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +.pagination-centered { + text-align: center; +} + +.pagination-right { + text-align: right; +} + +.pager { + margin: 20px 0; + text-align: center; + list-style: none; + *zoom: 1; +} + +.pager:before, +.pager:after { + display: table; + line-height: 0; + content: ""; +} + +.pager:after { + clear: both; +} + +.pager li { + display: inline; +} + +.pager a, +.pager span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.pager a:hover { + text-decoration: none; + background-color: #f5f5f5; +} + +.pager .next a, +.pager .next span { + float: right; +} + +.pager .previous a { + float: left; +} + +.pager .disabled a, +.pager .disabled a:hover, +.pager .disabled span { + color: #999999; + cursor: default; + background-color: #fff; +} + +.modal-open .modal .dropdown-menu { + z-index: 2050; +} + +.modal-open .modal .dropdown.open { + *z-index: 2050; +} + +.modal-open .modal .popover { + z-index: 2060; +} + +.modal-open .modal .tooltip { + z-index: 2080; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} + +.modal-backdrop.fade { + opacity: 0; +} + +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.modal { + position: fixed; + top: 50%; + left: 50%; + z-index: 1050; + width: 560px; + margin: -250px 0 0 -280px; + overflow: auto; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} + +.modal.fade { + top: -25%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out; +} + +.modal.fade.in { + top: 50%; +} + +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} + +.modal-header .close { + margin-top: 2px; +} + +.modal-header h3 { + margin: 0; + line-height: 30px; +} + +.modal-body { + max-height: 400px; + padding: 15px; + overflow-y: auto; +} + +.modal-form { + margin-bottom: 0; +} + +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + line-height: 0; + content: ""; +} + +.modal-footer:after { + clear: both; +} + +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} + +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} + +.tooltip { + position: absolute; + z-index: 1030; + display: block; + padding: 5px; + font-size: 11px; + opacity: 0; + filter: alpha(opacity=0); + visibility: visible; +} + +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.tooltip.top { + margin-top: -3px; +} + +.tooltip.right { + margin-left: 3px; +} + +.tooltip.bottom { + margin-top: 3px; +} + +.tooltip.left { + margin-left: -3px; +} + +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #000000; + border-width: 5px 5px 5px 0; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #000000; + border-width: 5px 0 5px 5px; +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + width: 236px; + padding: 1px; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.popover.top { + margin-bottom: 10px; +} + +.popover.right { + margin-left: 10px; +} + +.popover.bottom { + margin-top: 10px; +} + +.popover.left { + margin-right: 10px; +} + +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} + +.popover-content { + padding: 9px 14px; +} + +.popover-content p, +.popover-content ul, +.popover-content ol { + margin-bottom: 0; +} + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: inline-block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover .arrow:after { + z-index: -1; + content: ""; +} + +.popover.top .arrow { + bottom: -10px; + left: 50%; + margin-left: -10px; + border-top-color: #ffffff; + border-width: 10px 10px 0; +} + +.popover.top .arrow:after { + bottom: -1px; + left: -11px; + border-top-color: rgba(0, 0, 0, 0.25); + border-width: 11px 11px 0; +} + +.popover.right .arrow { + top: 50%; + left: -10px; + margin-top: -10px; + border-right-color: #ffffff; + border-width: 10px 10px 10px 0; +} + +.popover.right .arrow:after { + bottom: -11px; + left: -1px; + border-right-color: rgba(0, 0, 0, 0.25); + border-width: 11px 11px 11px 0; +} + +.popover.bottom .arrow { + top: -10px; + left: 50%; + margin-left: -10px; + border-bottom-color: #ffffff; + border-width: 0 10px 10px; +} + +.popover.bottom .arrow:after { + top: -1px; + left: -11px; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-width: 0 11px 11px; +} + +.popover.left .arrow { + top: 50%; + right: -10px; + margin-top: -10px; + border-left-color: #ffffff; + border-width: 10px 0 10px 10px; +} + +.popover.left .arrow:after { + right: -1px; + bottom: -11px; + border-left-color: rgba(0, 0, 0, 0.25); + border-width: 11px 0 11px 11px; +} + +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} + +.thumbnails:before, +.thumbnails:after { + display: table; + line-height: 0; + content: ""; +} + +.thumbnails:after { + clear: both; +} + +.row-fluid .thumbnails { + margin-left: 0; +} + +.thumbnails > li { + float: left; + margin-bottom: 20px; + margin-left: 20px; +} + +.thumbnail { + display: block; + padding: 4px; + line-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +a.thumbnail:hover { + border-color: #0088cc; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} + +.thumbnail > img { + display: block; + max-width: 100%; + margin-right: auto; + margin-left: auto; +} + +.thumbnail .caption { + padding: 9px; + color: #555555; +} + +.label, +.badge { + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + white-space: nowrap; + vertical-align: baseline; + background-color: #999999; +} + +.label { + padding: 1px 4px 2px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.badge { + padding: 1px 9px 2px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} + +a.label:hover, +a.badge:hover { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.label-important, +.badge-important { + background-color: #b94a48; +} + +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} + +.label-warning, +.badge-warning { + background-color: #f89406; +} + +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} + +.label-success, +.badge-success { + background-color: #468847; +} + +.label-success[href], +.badge-success[href] { + background-color: #356635; +} + +.label-info, +.badge-info { + background-color: #3a87ad; +} + +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} + +.label-inverse, +.badge-inverse { + background-color: #333333; +} + +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} + +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} + +.btn-mini .label, +.btn-mini .badge { + top: 0; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} + +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} + +.progress .bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + color: #ffffff; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} + +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); +} + +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} + +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} + +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} + +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} + +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} + +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.accordion { + margin-bottom: 20px; +} + +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.accordion-heading { + border-bottom: 0; +} + +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} + +.accordion-toggle { + cursor: pointer; +} + +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} + +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel .item { + position: relative; + display: none; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} + +.carousel .item > img { + display: block; + line-height: 1; +} + +.carousel .active, +.carousel .next, +.carousel .prev { + display: block; +} + +.carousel .active { + left: 0; +} + +.carousel .next, +.carousel .prev { + position: absolute; + top: 0; + width: 100%; +} + +.carousel .next { + left: 100%; +} + +.carousel .prev { + left: -100%; +} + +.carousel .next.left, +.carousel .prev.right { + left: 0; +} + +.carousel .active.left { + left: -100%; +} + +.carousel .active.right { + left: 100%; +} + +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.carousel-control.right { + right: 15px; + left: auto; +} + +.carousel-control:hover { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} + +.carousel-caption { + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} + +.carousel-caption h4, +.carousel-caption p { + line-height: 20px; + color: #ffffff; +} + +.carousel-caption h4 { + margin: 0 0 5px; +} + +.carousel-caption p { + margin-bottom: 0; +} + +.hero-unit { + padding: 60px; + margin-bottom: 30px; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + letter-spacing: -1px; + color: inherit; +} + +.hero-unit p { + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.hide { + display: none; +} + +.show { + display: block; +} + +.invisible { + visibility: hidden; +} + +.affix { + position: fixed; +} diff --git a/src/app/install/bootstrap/css/bootstrap.min.css b/src/app/install/bootstrap/css/bootstrap.min.css new file mode 100644 index 00000000..31d8b960 --- /dev/null +++ b/src/app/install/bootstrap/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.1.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}.text-warning{color:#c09853}.text-error{color:#b94a48}.text-info{color:#3a87ad}.text-success{color:#468847}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:1;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1{font-size:36px;line-height:40px}h2{font-size:30px;line-height:40px}h3{font-size:24px;line-height:40px}h4{font-size:18px;line-height:20px}h5{font-size:14px;line-height:20px}h6{font-size:12px;line-height:20px}h1 small{font-size:24px}h2 small{font-size:18px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:9px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"]{float:left}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info>label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;font-size:14px;vertical-align:top;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on,.input-append .btn{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topleft:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table [class*=span],.row-fluid table [class*=span]{display:table-cell;float:none;margin-left:0}.table .span1{float:none;width:44px;margin-left:0}.table .span2{float:none;width:124px;margin-left:0}.table .span3{float:none;width:204px;margin-left:0}.table .span4{float:none;width:284px;margin-left:0}.table .span5{float:none;width:364px;margin-left:0}.table .span6{float:none;width:444px;margin-left:0}.table .span7{float:none;width:524px;margin-left:0}.table .span8{float:none;width:604px;margin-left:0}.table .span9{float:none;width:684px;margin-left:0}.table .span10{float:none;width:764px;margin-left:0}.table .span11{float:none;width:844px;margin-left:0}.table .span12{float:none;width:924px;margin-left:0}.table .span13{float:none;width:1004px;margin-left:0}.table .span14{float:none;width:1084px;margin-left:0}.table .span15{float:none;width:1164px;margin-left:0}.table .span16{float:none;width:1244px;margin-left:0}.table .span17{float:none;width:1324px;margin-left:0}.table .span18{float:none;width:1404px;margin-left:0}.table .span19{float:none;width:1484px;margin-left:0}.table .span20{float:none;width:1564px;margin-left:0}.table .span21{float:none;width:1644px;margin-left:0}.table .span22{float:none;width:1724px;margin-left:0}.table .span23{float:none;width:1804px;margin-left:0}.table .span24{float:none;width:1884px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.warning td{background-color:#fcf8e3}.table tbody tr.info td{background-color:#d9edf7}.table-hover tbody tr.success:hover td{background-color:#d0e9c6}.table-hover tbody tr.error:hover td{background-color:#ebcccc}.table-hover tbody tr.warning:hover td{background-color:#faf2cc}.table-hover tbody tr.info:hover td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 14px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:2px}.btn-small{padding:3px 9px;font-size:12px;line-height:18px}.btn-small [class^="icon-"]{margin-top:0}.btn-mini{padding:2px 6px;font-size:11px;line-height:17px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-image:-moz-linear-gradient(top,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-image:-moz-linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-image:-moz-linear-gradient(top,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu{font-size:14px}.btn-group>.btn-mini{font-size:11px}.btn-group>.btn-small{font-size:12px}.btn-group>.btn-large{font-size:16px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical .btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible;color:#777}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;width:100%;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse{color:#999}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-image:-moz-linear-gradient(top,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#ccc}.breadcrumb .active{color:#999}.pagination{height:40px;margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:0 14px;line-height:38px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a,.pager span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a,.pager .next span{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover,.pager .disabled span{color:#999;cursor:default;background-color:#fff}.modal-open .modal .dropdown-menu{z-index:2050}.modal-open .modal .dropdown.open{*z-index:2050}.modal-open .modal .popover{z-index:2060}.modal-open .modal .tooltip{z-index:2080}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1030;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-bottom:10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-right:10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow:after{z-index:-1;content:""}.popover.top .arrow{bottom:-10px;left:50%;margin-left:-10px;border-top-color:#fff;border-width:10px 10px 0}.popover.top .arrow:after{bottom:-1px;left:-11px;border-top-color:rgba(0,0,0,0.25);border-width:11px 11px 0}.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-right-color:#fff;border-width:10px 10px 10px 0}.popover.right .arrow:after{bottom:-11px;left:-1px;border-right-color:rgba(0,0,0,0.25);border-width:11px 11px 11px 0}.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-bottom-color:#fff;border-width:0 10px 10px}.popover.bottom .arrow:after{top:-1px;left:-11px;border-bottom-color:rgba(0,0,0,0.25);border-width:0 11px 11px}.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-left-color:#fff;border-width:10px 0 10px 10px}.popover.left .arrow:after{right:-1px;bottom:-11px;border-left-color:rgba(0,0,0,0.25);border-width:11px 0 11px 11px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.label,.badge{font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel .item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit p{font-size:18px;font-weight:200;line-height:30px;color:inherit}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/src/app/install/bootstrap/img/glyphicons-halflings-white.png b/src/app/install/bootstrap/img/glyphicons-halflings-white.png new file mode 100644 index 00000000..3bf6484a Binary files /dev/null and b/src/app/install/bootstrap/img/glyphicons-halflings-white.png differ diff --git a/src/app/install/bootstrap/img/glyphicons-halflings.png b/src/app/install/bootstrap/img/glyphicons-halflings.png new file mode 100644 index 00000000..a9969993 Binary files /dev/null and b/src/app/install/bootstrap/img/glyphicons-halflings.png differ diff --git a/src/app/install/bootstrap/js/bootstrap.js b/src/app/install/bootstrap/js/bootstrap.js new file mode 100644 index 00000000..f73fcb8e --- /dev/null +++ b/src/app/install/bootstrap/js/bootstrap.js @@ -0,0 +1,2027 @@ +/* =================================================== + * bootstrap-transition.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#transitions + * =================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + $(function () { + + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + + $.support.transition = (function () { + + var transitionEnd = (function () { + + var el = document.createElement('bootstrap') + , transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + , name + + for (name in transEndEventNames){ + if (el.style[name] !== undefined) { + return transEndEventNames[name] + } + } + + }()) + + return transitionEnd && { + end: transitionEnd + } + + })() + + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-alert.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#alerts + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT DATA-API + * ============== */ + + $(function () { + $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) + }) + +}(window.jQuery);/* ============================================================ + * bootstrap-button.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON DATA-API + * =============== */ + + $(function () { + $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-carousel.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#carousel + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.options = options + this.options.slide && this.slide(this.options.slide) + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , to: function (pos) { + var $active = this.$element.find('.item.active') + , children = $active.parent().children() + , activePos = children.index($active) + , that = this + + if (pos > (children.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activePos == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle() + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e = $.Event('slide', { + relatedTarget: $next[0] + }) + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + if ($next.hasClass('active')) return + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL DATA-API + * ================= */ + + $(function () { + $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) + $target.carousel(options) + e.preventDefault() + }) + }) + +}(window.jQuery);/* ============================================================= + * bootstrap-collapse.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSIBLE PLUGIN DEFINITION + * ============================== */ + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = typeof option == 'object' && option + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSIBLE DATA-API + * ==================== */ + + $(function () { + $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + }) + +}(window.jQuery);/* ============================================================ + * bootstrap-dropdown.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + $parent.toggleClass('open') + $this.focus() + } + + return false + } + + , keydown: function (e) { + var $this + , $items + , $active + , $parent + , isActive + , index + + if (!/(38|40|27)/.test(e.keyCode)) return + + $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + if (!isActive || (isActive && e.keyCode == 27)) return $this.click() + + $items = $('[role=menu] li:not(.divider) a', $parent) + + if (!$items.length) return + + index = $items.index($items.filter(':focus')) + + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items + .eq(index) + .focus() + } + + } + + function clearMenus() { + getParent($(toggle)) + .removeClass('open') + } + + function getParent($this) { + var selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + $parent.length || ($parent = $this.parent()) + + return $parent + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + $.fn.dropdown = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(function () { + $('html') + .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) + $('body') + .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) + }) + +}(window.jQuery);/* ========================================================= + * bootstrap-modal.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#modals + * ========================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (element, options) { + this.options = options + this.$element = $(element) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + this.options.remote && this.$element.find('.modal-body').load(this.options.remote) + } + + Modal.prototype = { + + constructor: Modal + + , toggle: function () { + return this[!this.isShown ? 'show' : 'hide']() + } + + , show: function () { + var that = this + , e = $.Event('show') + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + $('body').addClass('modal-open') + + this.isShown = true + + this.escape() + + this.backdrop(function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } + + that.$element + .show() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element + .addClass('in') + .attr('aria-hidden', false) + .focus() + + that.enforceFocus() + + transition ? + that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : + that.$element.trigger('shown') + + }) + } + + , hide: function (e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + $('body').removeClass('modal-open') + + this.escape() + + $(document).off('focusin.modal') + + this.$element + .removeClass('in') + .attr('aria-hidden', true) + + $.support.transition && this.$element.hasClass('fade') ? + this.hideWithTransition() : + this.hideModal() + } + + , enforceFocus: function () { + var that = this + $(document).on('focusin.modal', function (e) { + if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { + that.$element.focus() + } + }) + } + + , escape: function () { + var that = this + if (this.isShown && this.options.keyboard) { + this.$element.on('keyup.dismiss.modal', function ( e ) { + e.which == 27 && that.hide() + }) + } else if (!this.isShown) { + this.$element.off('keyup.dismiss.modal') + } + } + + , hideWithTransition: function () { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end) + that.hideModal() + }, 500) + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout) + that.hideModal() + }) + } + + , hideModal: function (that) { + this.$element + .hide() + .trigger('hidden') + + this.backdrop() + } + + , removeBackdrop: function () { + this.$backdrop.remove() + this.$backdrop = null + } + + , backdrop: function (callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('