Upgraded to latest icehrm core

This commit is contained in:
Thilina Hasantha
2015-12-13 02:56:30 +05:30
parent 8dacf2a8f1
commit ca3492e30e
56 changed files with 1525 additions and 689 deletions

View File

@@ -1,5 +1,5 @@
<?php <?php
error_reporting(E_ERROR); error_reporting(E_ALL);
ini_set("error_log", "/tmp/icehrm_install.log"); ini_set("error_log", "/tmp/icehrm_install.log");
define('CURRENT_PATH',dirname(__FILE__)); define('CURRENT_PATH',dirname(__FILE__));
define('CLIENT_APP_PATH',realpath(dirname(__FILE__)."/..")."/"); define('CLIENT_APP_PATH',realpath(dirname(__FILE__)."/..")."/");

View File

@@ -0,0 +1,117 @@
<?php
class DocumentExpiryNotificationTask extends EmailIceTask{
var $documentCache = array();
var $notificationList = array();
var $employeeDocList = array();
var $employeeEmails = array();
public function execute($cron){
if(SettingsManager::getInstance()->getSetting('Notifications: Send Document Expiry Emails') != '1'){
LogManager::getInstance()->info("Notifications: Send Document Expiry Emails is set to No. Do not send emails");
return;
}
//Get documents
$dayList = array();
$dayList[30] = 'expire_notification_month';
$dayList[7] = 'expire_notification_week';
$dayList[1] = 'expire_notification_day';
$dayList[0] = 'expire_notification';
foreach($dayList as $k => $v){
$this->expiryDayNotification($k, $v);
}
$this->getExpireDocumentHTMLByEmployee();
$this->sendEmployeeEmails($this->employeeEmails, "IceHrm Employee Document Expiry Reminder");
}
private function expiryDayNotification($day, $param){
$date = date('Y-m-d', strtotime("+".$day." days"));
$employeeDocument = new EmployeeDocument();
$employeeDocuments = $employeeDocument->Find("valid_until IS NOT NULL and valid_until = ? and (expire_notification_last > ? or expire_notification_last = -1) and status = ?",
array($date, $day, 'Active'));
if(!$employeeDocuments){
LogManager::getInstance()->error("Error :".$employeeDocument->ErrorMsg());
return;
}
$query = "valid_until IS NOT NULL and valid_until = $date and
(expire_notification_last > $day or expire_notification_last == -1)
and status = 'Active';";
LogManager::getInstance()->debug($query);
foreach($employeeDocuments as $doc){
LogManager::getInstance()->debug("Employee Doc :".print_r($doc, true));
if(empty($doc->document)){
continue;
}
$document = null;
if(isset($this->documentCache[$doc->id])){
$document = $this->documentCache[$doc->id];
}else{
$document = new Document();
$document->Load("id = ?",array($doc->document));
$this->documentCache[$document->id] = $document;
}
if($document->$param == "Yes"){
if(!isset($this->notificationList[$doc->employee])){
$this->notificationList[$doc->employee] = array();
}
$this->notificationList[$doc->employee][] = array($doc, $document, $day);
}
$doc->expire_notification_last = $day;
$doc->Save();
}
}
private function getExpireDocumentHTMLByEmployee(){
$row = '<p style="background-color: #EEE;padding: 5px;font-size: 0.9em;font-weight: bold;"><span style="font-size: 1em;font-weight: bold;">#_name_#</span> - Expire in #_days_# day(s)</p><br/><span style="font-size: 0.8em;font-weight: bold;">#_description_#</span><hr/>';
foreach($this->notificationList as $key => $val){
$employeeEmail = "";
foreach($val as $list){
$trow = $row;
$doc = $list[0];
$document = $list[1];
$days = $list[2];
$trow = str_replace("#_name_#",$document->name,$trow);
$trow = str_replace("#_days_#",$days,$trow);
$trow = str_replace("#_description_#",$doc->details,$trow);
$employeeEmail.=$trow;
}
$employee = new Employee();
$employee->Load("id = ?",array($key));
if(empty($employee->id) || $employee->id != $key){
LogManager::getInstance()->error("Could not load employee with id");
return;
}
$emailBody = file_get_contents(APP_BASE_PATH.'/admin/documents/emailTemplates/documentExpireEmailTemplate.html');
$emailBody = str_replace("#_employee_#",$employee->first_name,$emailBody);
$emailBody = str_replace("#_documents_#",$employeeEmail,$emailBody);
$this->employeeEmails[$employee->id] = $emailBody;
}
}
}

View File

@@ -9,13 +9,13 @@ define('HOME_LINK_ADMIN', CLIENT_BASE_URL."?g=admin&n=dashboard&m=admin_Admin");
define('HOME_LINK_OTHERS', CLIENT_BASE_URL."?g=modules&n=dashboard&m=module_Personal_Information"); define('HOME_LINK_OTHERS', CLIENT_BASE_URL."?g=modules&n=dashboard&m=module_Personal_Information");
//Version //Version
define('VERSION', '13.1.OS'); define('VERSION', '14.0.OS');
define('CACHE_VALUE', '13.1'); define('CACHE_VALUE', '14.0.OS');
define('VERSION_DATE', '09/10/2015'); define('VERSION_DATE', '12/12/2015');
if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');} if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');}
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');} if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');}
if(!defined('APP_SEC')){define('APP_SEC','dbcs234d2saaqw');} if(!defined('APP_SEC')){define('APP_SEC','dbcs234d2s111');}
define('UI_SHOW_SWITCH_PROFILE', true); define('UI_SHOW_SWITCH_PROFILE', true);
define('CRON_LOG', '/var/log/nginx/icehrmcron.log'); define('CRON_LOG', '/var/log/nginx/icehrmcron.log');

View File

@@ -1,519 +0,0 @@
.redFont{
color: red;
}
.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;
};
.navbar-inverse .brand, .navbar-inverse .nav > 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;
}

View File

@@ -117,6 +117,9 @@ AdapterBase.method('addSuccessCallBack', function(callBackData,serverData, callG
}); });
AdapterBase.method('addFailCallBack', function(callBackData,serverData) { AdapterBase.method('addFailCallBack', function(callBackData,serverData) {
try{
this.closePlainMessage();
}catch(e){}
this.showMessage("Error saving",serverData); this.showMessage("Error saving",serverData);
this.trackEvent("addFailed",this.tab,this.table); this.trackEvent("addFailed",this.tab,this.table);
}); });
@@ -513,6 +516,163 @@ IdNameAdapter.method('getFormFields', function() {
}); });
/**
* ApproveAdminAdapter
*/
function ApproveAdminAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
ApproveAdminAdapter.inherits(AdapterBase);
ApproveAdminAdapter.method('openStatus', function(id,status) {
$('#'+this.itemNameLower+'StatusModel').modal('show');
$('#'+this.itemNameLower+'_status').val(status);
this.statusChangeId = id;
});
ApproveAdminAdapter.method('closeDialog', function() {
$('#'+this.itemNameLower+'StatusModel').modal('hide');
});
ApproveAdminAdapter.method('changeStatus', function() {
var status = $('#'+this.itemNameLower+'_status').val();
var reason = $('#'+this.itemNameLower+'_reason').val();
if(status == undefined || status == null || status == ""){
this.showMessage("Error", "Please select "+this.itemNameLower+" status");
return;
}
var object = {"id":this.statusChangeId,"status":status,"reason":reason};
var reqJson = JSON.stringify(object);
var callBackData = [];
callBackData['callBackData'] = [];
callBackData['callBackSuccess'] = 'changeStatusSuccessCallBack';
callBackData['callBackFail'] = 'changeStatusFailCallBack';
this.customAction('changeStatus','admin='+this.modulePathName,reqJson,callBackData);
this.closeDialog();
this.statusChangeId = null;
});
ApproveAdminAdapter.method('changeStatusSuccessCallBack', function(callBackData) {
this.showMessage("Successful", this.itemName + " Request status changed successfully");
this.get([]);
});
ApproveAdminAdapter.method('changeStatusFailCallBack', function(callBackData) {
this.showMessage("Error", "Error occurred while changing "+this.itemName+" request status");
});
ApproveAdminAdapter.method('getActionButtonsHtml', function(id,data) {
var editButton = '<img class="tableActionButton" src="_BASE_images/edit.png" style="cursor:pointer;" rel="tooltip" title="Edit" onclick="modJs.edit(_id_);return false;"></img>';
var deleteButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Delete" onclick="modJs.deleteRow(_id_);return false;"></img>';
var statusChangeButton = '<img class="tableActionButton" src="_BASE_images/run.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Change Status" onclick="modJs.openStatus(_id_);return false;"></img>';
var html = '<div style="width:80px;">_edit__delete__status_</div>';
html = html.replace('_status_',statusChangeButton);
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;
});
ApproveAdminAdapter.method('isSubProfileTable', function() {
if(this.user.user_level == "Admin"){
return false;
}else{
return true;
}
});
/**
* ApproveModuleAdapter
*/
function ApproveModuleAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
ApproveModuleAdapter.inherits(AdapterBase);
ApproveModuleAdapter.method('cancelRequest', function(id) {
var that = this;
var object = {};
object['id'] = id;
var reqJson = JSON.stringify(object);
var callBackData = [];
callBackData['callBackData'] = [];
callBackData['callBackSuccess'] = 'cancelSuccessCallBack';
callBackData['callBackFail'] = 'cancelFailCallBack';
this.customAction('cancel','modules='+this.modulePathName,reqJson,callBackData);
});
ApproveModuleAdapter.method('cancelSuccessCallBack', function(callBackData) {
this.showMessage("Successful", this.itemName + " cancellation request sent");
this.get([]);
});
ApproveModuleAdapter.method('cancelFailCallBack', function(callBackData) {
this.showMessage("Error Occurred while cancelling "+this.itemName, callBackData);
});
ApproveModuleAdapter.method('getActionButtonsHtml', function(id,data) {
var editButton = '<img class="tableActionButton" src="_BASE_images/edit.png" style="cursor:pointer;" rel="tooltip" title="Edit" onclick="modJs.edit(_id_);return false;"></img>';
var deleteButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Delete" onclick="modJs.deleteRow(_id_);return false;"></img>';
var requestCancellationButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Cancel '+this.itemName+'" onclick="modJs.cancelRequest(_id_);return false;"></img>';
var html = '<div style="width:80px;">_edit__delete_</div>';
if(this.showDelete){
if(data[7] == "Approved"){
html = html.replace('_delete_',requestCancellationButton);
}else{
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;
});
/** /**
* RequestCache * RequestCache
@@ -538,7 +698,16 @@ RequestCache.method('getData', function(key) {
var strData = localStorage.getItem(key); var strData = localStorage.getItem(key);
if(strData != undefined && strData != null && strData != ""){ if(strData != undefined && strData != null && strData != ""){
return JSON.parse(strData); data = JSON.parse(strData);
if(data == undefined || data == null){
return null;
}
if(data.status != undefined && data.status != null && data.status != "SUCCESS"){
return null;
}
return data;
} }
return null; return null;
@@ -550,6 +719,10 @@ RequestCache.method('setData', function(key, data) {
return null; return null;
} }
if(data.status != undefined && data.status != null && data.status != "SUCCESS"){
return null;
}
var strData = JSON.stringify(data); var strData = JSON.stringify(data);
var strData = localStorage.setItem(key,strData); var strData = localStorage.setItem(key,strData);
return strData; return strData;

View File

@@ -411,7 +411,7 @@ IceHRMBase.method('getTableTopButtonHtml', function() {
if(html != ""){ if(html != ""){
html += "&nbsp;&nbsp;"; html += "&nbsp;&nbsp;";
} }
html+='<button onclick="modJs.showFilters();return false;" class="btn btn-small btn-primary">Fillter <i class="fa fa-filter"></i></button>'; html+='<button onclick="modJs.showFilters();return false;" class="btn btn-small btn-primary">Filter <i class="fa fa-filter"></i></button>';
html += "&nbsp;&nbsp;"; html += "&nbsp;&nbsp;";
if(this.filtersAlreadySet){ if(this.filtersAlreadySet){
html+='<button id="__id___resetFilters" onclick="modJs.resetFilters();return false;" class="btn btn-small btn-default">__filterString__ <i class="fa fa-times"></i></button>'; html+='<button id="__id___resetFilters" onclick="modJs.resetFilters();return false;" class="btn btn-small btn-default">__filterString__ <i class="fa fa-times"></i></button>';
@@ -445,6 +445,10 @@ IceHRMBase.method('getTableHTMLTemplate', function() {
return '<div class="box-body table-responsive"><table cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-striped" id="grid"></table></div>'; return '<div class="box-body table-responsive"><table cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-striped" id="grid"></table></div>';
}); });
IceHRMBase.method('isSortable', function() {
return true;
});
/** /**
* Create the data table on provided element id * Create the data table on provided element id
* @method createTable * @method createTable
@@ -452,6 +456,9 @@ IceHRMBase.method('getTableHTMLTemplate', function() {
*/ */
IceHRMBase.method('createTable', function(elementId) { IceHRMBase.method('createTable', function(elementId) {
var that = this;
if(this.getRemoteTable()){ if(this.getRemoteTable()){
this.createTableServer(elementId); this.createTableServer(elementId);
@@ -497,7 +504,7 @@ IceHRMBase.method('createTable', function(elementId) {
}, },
"aaData": data, "aaData": data,
"aoColumns": headers, "aoColumns": headers,
"bSort": true, "bSort": that.isSortable(),
"iDisplayLength": 15, "iDisplayLength": 15,
"iDisplayStart": start "iDisplayStart": start
}; };
@@ -559,7 +566,7 @@ IceHRMBase.method('createTableServer', function(elementId) {
"bServerSide": true, "bServerSide": true,
"sAjaxSource": that.getDataUrl(that.getDataMapping()), "sAjaxSource": that.getDataUrl(that.getDataMapping()),
"aoColumns": headers, "aoColumns": headers,
"bSort": true, "bSort": that.isSortable(),
"parent":that, "parent":that,
"iDisplayLength": 15, "iDisplayLength": 15,
"iDisplayStart": start "iDisplayStart": start
@@ -683,6 +690,38 @@ IceHRMBase.method('renderModel', function(id,header,body) {
$('#'+id+'ModelBody').html(body); $('#'+id+'ModelBody').html(body);
}); });
IceHRMBase.method('renderYesNoModel', function(header,body,yesBtnName,noBtnName,callback, callbackParams) {
var that = this;
var modelId = "#yesnoModel";
if(body == undefined || body == null){
body = "";
}
$(modelId+'Label').html(header);
$(modelId+'Body').html(body);
if(yesBtnName != null){
$(modelId+'YesBtn').html(yesBtnName);
}
if(noBtnName != null){
$(modelId+'NoBtn').html(noBtnName);
}
$(modelId+'YesBtn').off().on('click',function(){
if(callback != undefined && callback != null){
callback.apply(that,callbackParams);
that.cancelYesno();
}
});
$(modelId).modal({
backdrop: 'static'
});
});
IceHRMBase.method('renderModelFromDom', function(id,header,element) { IceHRMBase.method('renderModelFromDom', function(id,header,element) {
$('#'+id+'ModelBody').html(""); $('#'+id+'ModelBody').html("");
@@ -746,8 +785,8 @@ IceHRMBase.method('showDomElement', function(title,element,closeCallback,closeCa
var that = this; var that = this;
var modelId = ""; var modelId = "";
if(isPlain){ if(isPlain){
modelId = "#plainMessageModel"; modelId = "#dataMessageModel";
this.renderModelFromDom('plainMessage',title,element); this.renderModelFromDom('dataMessage',title,element);
}else{ }else{
modelId = "#messageModel"; modelId = "#messageModel";
this.renderModelFromDom('message',title,element); this.renderModelFromDom('message',title,element);
@@ -781,10 +820,18 @@ IceHRMBase.method('closeMessage', function() {
$('#messageModel').modal('hide'); $('#messageModel').modal('hide');
}); });
IceHRMBase.method('cancelYesno', function() {
$('#yesnoModel').modal('hide');
});
IceHRMBase.method('closePlainMessage', function() { IceHRMBase.method('closePlainMessage', function() {
$('#plainMessageModel').modal('hide'); $('#plainMessageModel').modal('hide');
}); });
IceHRMBase.method('closeDataMessage', function() {
$('#dataMessageModel').modal('hide');
});
/** /**
* Create or edit an element * Create or edit an element
@@ -1435,7 +1482,7 @@ IceHRMBase.method('addDataGroup', function() {
$("#"+field[0]+"_div").html(html); $("#"+field[0]+"_div").html(html);
this.closePlainMessage(); this.closeDataMessage();
} }
}); });
@@ -1482,7 +1529,7 @@ IceHRMBase.method('editDataGroup', function() {
$("#"+field[0]+"_div").html(html); $("#"+field[0]+"_div").html(html);
this.closePlainMessage(); this.closeDataMessage();
} }
} }

View File

@@ -15,7 +15,7 @@ define('APP_DB', '_APP_DB_');
define('APP_USERNAME', '_APP_USERNAME_'); define('APP_USERNAME', '_APP_USERNAME_');
define('APP_PASSWORD', '_APP_PASSWORD_'); define('APP_PASSWORD', '_APP_PASSWORD_');
define('APP_HOST', '_APP_HOST_'); define('APP_HOST', '_APP_HOST_');
define('APP_CON_STR', 'mysql://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB); define('APP_CON_STR', 'mysqli://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB);
//file upload //file upload
define('FILE_TYPES', 'jpg,png,jpeg'); define('FILE_TYPES', 'jpg,png,jpeg');

7
src/app/cron.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
if(php_sapi_name() != 'cli'){
exit();
}
include ('config.php');
include (APP_BASE_PATH.'crons/cron.php');

18
src/app/entry.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
include ('config.php');
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
header("Location:".CLIENT_BASE_URL."login.php");
exit();
}
$group = $_REQUEST['g'];
$name= $_REQUEST['n'];
$groups = array('admin','modules');
if($group == 'admin' || $group == 'modules'){
$name = str_replace("..","",$name);
$name = str_replace("/","",$name);
include APP_BASE_PATH.'/'.$group.'/'.$name.'/entry.php';
}else{
exit();
}

View File

@@ -21,7 +21,7 @@ $action = $_REQUEST['action'];
if($action == "TEST_DB"){ if($action == "TEST_DB"){
$db = NewADOConnection('mysql'); $db = NewADOConnection('mysqli');
$res = $db->Connect($_REQUEST["APP_HOST"], $_REQUEST["APP_USERNAME"], $_REQUEST["APP_PASSWORD"], $_REQUEST["APP_DB"]); $res = $db->Connect($_REQUEST["APP_HOST"], $_REQUEST["APP_USERNAME"], $_REQUEST["APP_PASSWORD"], $_REQUEST["APP_DB"]);
if (!$res){ if (!$res){
@@ -72,7 +72,7 @@ if($action == "TEST_DB"){
$con = mysql_connect($_REQUEST["APP_HOST"],$_REQUEST["APP_USERNAME"],$_REQUEST["APP_PASSWORD"]); $con = mysql_connect($_REQUEST["APP_HOST"],$_REQUEST["APP_USERNAME"],$_REQUEST["APP_PASSWORD"]);
$db = NewADOConnection('mysql'); $db = NewADOConnection('mysqli');
$res = $db->Connect($_REQUEST["APP_HOST"], $_REQUEST["APP_USERNAME"], $_REQUEST["APP_PASSWORD"], $_REQUEST["APP_DB"]); $res = $db->Connect($_REQUEST["APP_HOST"], $_REQUEST["APP_USERNAME"], $_REQUEST["APP_PASSWORD"], $_REQUEST["APP_DB"]);

18
src/app/update.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
include ('config.php');
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
header("Location:".CLIENT_BASE_URL."login.php");
exit();
}
$group = $_REQUEST['g'];
$name= $_REQUEST['n'];
$groups = array('admin','modules');
if($group == 'admin' || $group == 'modules'){
$name = str_replace("..","",$name);
$name = str_replace("/","",$name);
include APP_BASE_PATH.'/'.$group.'/'.$name.'/update.php';
}else{
exit();
}

View File

@@ -59,6 +59,11 @@ abstract class AbstractModuleManager{
} }
*/ */
public abstract function setupModuleClassDefinitions(); public abstract function setupModuleClassDefinitions();
public function getDashboardItem(){
return null;
}
public function setupRestEndPoints(){ public function setupRestEndPoints(){

View File

@@ -0,0 +1,218 @@
<?php
abstract class ApproveAdminActionManager extends SubActionManager{
public abstract function getModelClass();
public abstract function getItemName();
public abstract function getModuleName();
public abstract function getModuleTabUrl();
public function changeStatus($req){
$class = $this->getModelClass();
$itemName = $this->getItemName();
$obj = new $class();
$obj->Load("id = ?",array($req->id));
if($obj->id != $req->id){
return new IceResponse(IceResponse::ERROR,"$itemName not found");
}
if($this->user->user_level != 'Admin' && $this->user->user_level != 'Manager'){
return new IceResponse(IceResponse::ERROR,"Only an admin or manager can do this");
}
$oldStatus = $obj->status;
$obj->status = $req->status;
$ok = $obj->Save();
if(!$ok){
LogManager::getInstance()->info($obj->ErrorMsg());
return new IceResponse(IceResponse::ERROR,"Error occurred while saving $itemName information. Please contact admin");
}
$this->baseService->audit(IceConstants::AUDIT_ACTION, "$itemName status changed from:".$oldStatus." to:".$obj->status." id:".$obj->id);
$currentEmpId = $this->getCurrentProfileId();
if(!empty($currentEmpId)){
$employee = $this->baseService->getElement('Employee',$currentEmpId);
$notificationMsg = "Your $itemName has been $obj->status by ".$employee->first_name." ".$employee->last_name;
if(!empty($req->reason)){
$notificationMsg.=" (Note:".$req->reason.")";
}
$this->baseService->notificationManager->addNotification($obj->employee,$notificationMsg,'{"type":"url","url":"'.$this->getModuleTabUrl().'"}',$this->getModuleName(), null, false, true);
}
return new IceResponse(IceResponse::SUCCESS,"");
}
}
abstract class ApproveModuleActionManager extends SubActionManager{
public abstract function getModelClass();
public abstract function getItemName();
public abstract function getModuleName();
public abstract function getModuleTabUrl();
public function cancel($req){
$employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true);
$class = $this->getModelClass();
$itemName = $this->getItemName();
$obj = new $class();
$obj->Load("id = ?",array($req->id));
if($obj->id != $req->id){
return new IceResponse(IceResponse::ERROR,"$itemName record not found");
}
if($this->user->user_level != 'Admin' && $this->getCurrentProfileId() != $obj->employee){
return new IceResponse(IceResponse::ERROR,"Only an admin or owner of the $itemName can do this");
}
if($obj->status != 'Approved'){
return new IceResponse(IceResponse::ERROR,"Only an approved $itemName can be cancelled");
}
$obj->status = 'Cancellation Requested';
$ok = $obj->Save();
if(!$ok){
LogManager::getInstance()->error("Error occurred while cancelling the $itemName:".$obj->ErrorMsg());
return new IceResponse(IceResponse::ERROR,"Error occurred while cancelling the $itemName. Please contact admin.");
}
$this->baseService->audit(IceConstants::AUDIT_ACTION, "Expense cancellation | start:".$obj->date_start."| end:".$obj->date_end);
$notificationMsg = $employee->first_name." ".$employee->last_name." cancelled a expense. Visit expense management module to approve";
$this->baseService->notificationManager->addNotification($employee->supervisor,$notificationMsg,'{"type":"url","url":"'.$this->getModuleTabUrl().'"}',
$this->getModuleTabUrl(), null, false, true);
return new IceResponse(IceResponse::SUCCESS,$obj);
}
}
class ApproveModel extends ICEHRM_Record {
public function executePreSaveActions($obj){
$preApprove = SettingsManager::getInstance()->getSetting($this->preApproveSettingName);
$sendNotificationEmail = true;
if(empty($obj->status)){
if($preApprove == "1"){
$obj->status = "Approved";
$sendNotificationEmail = false;
}else{
$obj->status = "Pending";
}
}
if($preApprove){
return new IceResponse(IceResponse::SUCCESS,$obj);
}
$currentEmpId = BaseService::getInstance()->getCurrentProfileId();
//Auto approve if the current user is an admin
if(!empty($currentEmpId)){
$employee = BaseService::getInstance()->getElement('Employee',$currentEmpId);
if(!empty($employee->supervisor)) {
$notificationMsg = "A new ".$this->notificationUnitName." has been added by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it";
BaseService::getInstance()->notificationManager->addNotification($employee->supervisor, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, null, false, $sendNotificationEmail);
}else{
$user = BaseService::getInstance()->getCurrentUser();
if($user->user_level == "Admin"){
//Auto approve
$obj->status = "Approved";
$notificationMsg = "Your ".$this->notificationUnitName." is auto approved since you are an administrator and do not have any supervisor assigned";
BaseService::getInstance()->notificationManager->addNotification(null, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, $user->id, false, $sendNotificationEmail);
}else{
//If the user do not have a supervisor, notify all admins
$admins = BaseService::getInstance()->getAllAdmins();
foreach($admins as $admin){
$notificationMsg = "A new ".$this->notificationUnitName." has been added by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it. You are getting this notification since you are an administrator and the user do not have any supervisor assigned.";
BaseService::getInstance()->notificationManager->addNotification(null, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, $admin->id, false, $sendNotificationEmail);
}
}
}
}
return new IceResponse(IceResponse::SUCCESS,$obj);
}
public function executePreUpdateActions($obj){
$preApprove = SettingsManager::getInstance()->getSetting($this->preApproveSettingName);
$sendNotificationEmail = true;
$fieldsToCheck = $this->fieldsNeedToBeApproved();
$travelRequest = new EmployeeTravelRecord();
$travelRequest->Load('id = ?',array($obj->id));
$needToApprove = false;
if($preApprove != "1"){
foreach($fieldsToCheck as $field){
if($obj->$field != $travelRequest->$field) {
$needToApprove = true;
break;
}
}
}else{
$sendNotificationEmail = false;
}
if($preApprove){
return new IceResponse(IceResponse::SUCCESS,$obj);
}
if($needToApprove && $obj->status != 'Pending'){
$currentEmpId = BaseService::getInstance()->getCurrentProfileId();
//Auto approve if the current user is an admin
if(!empty($currentEmpId)){
$employee = BaseService::getInstance()->getElement('Employee',$currentEmpId);
if(!empty($employee->supervisor)) {
$notificationMsg = $this->notificationUnitPrefix." ".$this->notificationUnitName." has been updated by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it";
BaseService::getInstance()->notificationManager->addNotification($employee->supervisor, $notificationMsg, '{"type":"url","url":"'.$this->notificationUnitAdminUrl.'"}', $this->notificationModuleName, null, false, $sendNotificationEmail);
}else{
$user = BaseService::getInstance()->getCurrentUser();
if($user->user_level == "Admin"){
}else{
//If the user do not have a supervisor, notify all admins
$admins = BaseService::getInstance()->getAllAdmins();
foreach($admins as $admin){
$notificationMsg = $this->notificationUnitPrefix." ".$this->notificationUnitName." request has been updated by " . $employee->first_name . " " . $employee->last_name . ". Please visit ".$this->notificationModuleName." module to review it. You are getting this notification since you are an administrator and the user do not have any supervisor assigned.";
BaseService::getInstance()->notificationManager->addNotification(null, $notificationMsg, '{"type":"url","url":"g=admin&n=travel&m=admin_Employees"}', "Travel Module", $admin->id, false, $sendNotificationEmail);
}
}
}
}
}
return new IceResponse(IceResponse::SUCCESS,$obj);
}
}

View File

@@ -1103,6 +1103,30 @@ class BaseService{
$data = $customField->Find("type = ?",array($type)); $data = $customField->Find("type = ?",array($type));
return $data; return $data;
} }
public function getAllAdmins(){
$user = new User();
$admins = $user->Find('user_level = ?',array('Admin'));
return $admins;
}
public function getCurrentEmployeeTimeZone(){
$cemp = $this->getCurrentProfileId();
if(empty($cemp)){
return NULL;
}
$emp = new Employee();
$emp->Load("id = ?",array($cemp));
if(empty($emp->id) || empty($emp->department)){
return NULL;
}
$dept = new CompanyStructure();
$dept->Load("id = ?",array($emp->department));
return $dept->timezone;
}
} }
class IceConstants{ class IceConstants{

View File

@@ -6,7 +6,7 @@ class CronUtils{
private static $me = null; private static $me = null;
private function __construct($clientBasePath, $cronFile){ private function __construct($clientBasePath, $cronFile){
$this->clientBasePath = $clientBasePath; $this->clientBasePath = $clientBasePath."/";
$this->cronFile = $cronFile; $this->cronFile = $cronFile;
} }
@@ -20,14 +20,178 @@ class CronUtils{
public function run(){ public function run(){
$ams = scandir($this->clientBasePath); $ams = scandir($this->clientBasePath);
$count = 0;
foreach($ams as $am){ foreach($ams as $am){
if(is_dir($this->clientBasePath.$am) && $am != '.' && $am != '..'){ if(is_dir($this->clientBasePath.$am) && $am != '.' && $am != '..'){
$command = "php ".$this->cronFile." -c".$this->clientBasePath.$am; //$command = "php ".$this->cronFile." -c".$this->clientBasePath.$am;
$command = "php ".$this->clientBasePath.$am."/".$this->cronFile;
echo "Run:".$command."\r\n"; echo "Run:".$command."\r\n";
passthru($command, $res); passthru($command, $res);
echo "Result :".$res."\r\n"; echo "Result :".$res."\r\n";
$count++;
if($count > 25){
sleep(1);
$count = 0;
}
} }
} }
} }
} }
class IceCron{
const MINUTELY = "Minutely";
const HOURLY = "Hourly";
const DAILY = "Daily";
const WEEKLY = "Weekly";
const MONTHLY = "Monthly";
const YEARLY = "Yearly";
private $cron;
public function __construct($cron){
$this->cron = $cron;
}
public function isRunNow(){
LogManager::getInstance()->debug("Cron ".print_r($this->cron,true));
$lastRunTime = $this->cron->lastrun;
if(empty($lastRunTime)){
LogManager::getInstance()->debug("Cron ".$this->cron->name." is running since last run time is empty");
return true;
}
$type = $this->cron->type;
$frequency = intval($this->cron->frequency);
$time = intval($this->cron->time);
if(empty($frequency) || !is_int($frequency)){
LogManager::getInstance()->debug("Cron ".$this->cron->name." is not running since frequency is not an integer");
return false;
}
if($type == self::MINUTELY){
$diff = (strtotime("now") - strtotime($lastRunTime));
if(empty($this->time) || !is_int($time)){
if($diff > 60){
return true;
}
}else{
if($diff > 60 * $time){
return true;
}
}
}else if($type == self::HOURLY){
if(empty($time) || !is_int($time)){
if(date('H') != date('H',strtotime($lastRunTime))){
return true;
}
}else{
if(intval(date('m')) <= intval($time) && date('H') != date('H',strtotime($lastRunTime))){
return true;
}
}
}else if($type == self::DAILY){
if(empty($time) || !is_int($time)){
if(date('d') != date('d',strtotime($lastRunTime))){
return true;
}
}else{
if(intval(date('H')) <= intval($time) && date('d') != date('d',strtotime($lastRunTime))){
return true;
}
}
}else if($type == self::MONTHLY){
if(empty($time) || !is_int($time)){
if(date('m') != date('m',strtotime($lastRunTime))){
return true;
}
}else{
if(intval(date('d')) <= intval($time) && date('m') != date('m',strtotime($lastRunTime))){
return true;
}
}
}else if($type == self::YEARLY){
if(empty($time) || !is_int($time)){
if(date('Y') != date('Y',strtotime($lastRunTime))){
return true;
}
}else{
if(intval(date('m')) <= intval($time) && date('Y') != date('Y',strtotime($lastRunTime))){
return true;
}
}
}
return false;
}
public function execute(){
$class = $this->cron->class;
$obj = new $class();
$obj->execute($this->cron);
$this->cronCompleted();
}
private function cronCompleted(){
$this->cron->lastrun = date("Y-m-d H:i:s");
$ok = $this->cron->Save();
if(!$ok){
LogManager::getInstance()->error("Error saving cron due to :".$this->cron->ErrorMsg());
}
}
}
interface IceTask{
public function execute($cron);
}
abstract class EmailIceTask implements IceTask{
public abstract function execute($cron);
public function sendEmployeeEmails($emailList, $subject){
foreach($emailList as $employeeId => $emailData){
$ccList = array();
if(SettingsManager::getInstance()->getSetting('Notifications: Copy Document Expiry Emails to Manager') == '1'){
$employee = new Employee();
$employee->Load("id = ?",array($employeeId));
if(!empty($employee->supervisor)){
$supperuser = BaseService::getInstance()->getUserFromProfileId($employee->supervisor);
if(!empty($supperuser)){
$ccList[] = $supperuser->email;
}
}
}
$user = BaseService::getInstance()->getUserFromProfileId($employeeId);
if(!empty($user) && !empty($user->email)){
$email = new IceEmail();
$email->subject = $subject;
$email->toEmail = $user->email;
$email->template = $emailData;
$email->params = '[]';
$email->cclist = json_encode($ccList);
$email->bcclist = '[]';
$email->status = 'Pending';
$email->created = date('Y-m-d H:i:s');
$email->updated = date('Y-m-d H:i:s');
$ok = $email->Save();
if(!$ok){
LogManager::getInstance()->error("Error Saving Email: ".$email->ErrorMsg());
}
}
}
}
}

View File

@@ -13,6 +13,56 @@ abstract class EmailSender{
$this->settings = $settings; $this->settings = $settings;
} }
public function sendEmailFromNotification($notification){
$toEmail = null;
$user = new User();
$user->Load("id = ?",array($notification->toUser));
if(!empty($user->email)){
$name = "User";
$employee = new Employee();
$employee->Load("id = ?",array($user->employee));
if($employee->id == $user->employee && !empty($employee->id)){
$name = $employee->first_name;
}
$action = json_decode($notification->action);
$emailBody = file_get_contents(APP_BASE_PATH.'/templates/email/notificationEmail.html');
$emailBody = str_replace("#_user_#", $name, $emailBody);
$emailBody = str_replace("#_message_#", $notification->message, $emailBody);
if($action->type == "url"){
$emailBody = str_replace("#_url_#", CLIENT_BASE_URL."?".$action->url, $emailBody);
}
$this->sendEmail('IceHrm Notification from '.$notification->type,
$user->email,
$emailBody,
array(),
array(),
array()
);
}
}
public function sendEmailFromDB($email){
$params = array();
if(!empty($email->params)){
$params = json_decode($email->params, true);
}
$cclist = array();
if(!empty($email->cclist)){
$cclist = json_decode($email->cclist, true);
}
$bcclist = array();
if(!empty($email->bcclist)){
$bcclist = json_decode($email->bcclist, true);
}
$resp = $this->sendEmail($email->subject, $email->toEmail, $email->template, $params, $cclist, $bcclist);
}
public function sendEmail($subject, $toEmail, $template, $params, $ccList = array(), $bccList = array()){ public function sendEmail($subject, $toEmail, $template, $params, $ccList = array(), $bccList = array()){
$body = $template; $body = $template;
@@ -225,7 +275,7 @@ class SMTPEmailSender extends EmailSender{
$mail = $smtp->send($toEmail, $headers, $body); $mail = $smtp->send($toEmail, $headers, $body);
return true; return $mail;
} }
} }
@@ -255,6 +305,6 @@ class PHPMailer extends EmailSender{
LogManager::getInstance()->info("PHP mailer result : ".$res); LogManager::getInstance()->info("PHP mailer result : ".$res);
return true; return $res;
} }
} }

View File

@@ -12,8 +12,8 @@ class ReportHandler{
return $this->executeReport($report,$query,$where[1]); return $this->executeReport($report,$query,$where[1]);
}else if($report->type == 'Class'){ }else if($report->type == 'Class'){
$className = $report->query; $className = $report->query;
include MODULE_PATH.'/reportClasses/ReportBuilder.php'; include APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
include MODULE_PATH.'/reportClasses/'.$className.".php"; include APP_BASE_PATH.'admin/reports/reportClasses/'.$className.".php";
$cls = new $className(); $cls = new $className();
$data = $cls->getData($report,$request); $data = $cls->getData($report,$request);
return $this->generateReport($report,$data); return $this->generateReport($report,$data);

View File

@@ -153,10 +153,27 @@ class UIManager{
} }
if($this->user->user_level == "Admin"){ if($this->user->user_level == "Admin"){
$reg = '';
$num = '';
if(class_exists('ProVersion')){
$pro = new ProVersion();
if(!empty($pro->employeeLimit)){
$num = "<br/>Employee Limit: ".$pro->employeeLimit;
}
if(method_exists($pro,'getRegisteredTo')){
$reg = "<br/>Registered To: ".$pro->getRegisteredTo();
}
}
$manuItems[] = new MenuItemTemplate('menuButtonHelp', array( $manuItems[] = new MenuItemTemplate('menuButtonHelp', array(
"APP_NAME"=>APP_NAME, "APP_NAME"=>APP_NAME,
"VERSION"=>VERSION, "VERSION"=>VERSION,
"VERSION_DATE"=>VERSION_DATE "VERSION_DATE"=>VERSION_DATE,
"REG"=>$reg,
"NUM"=>$num
)); ));
} }
@@ -199,6 +216,23 @@ class UIManager{
return $str; return $str;
} }
public function getCompanyLogoUrl(){
$logoFileSet = false;
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
$logoSettings = SettingsManager::getInstance()->getSetting("Company: Logo");
if(!empty($logoSettings)){
$logoFileName = FileService::getInstance()->getFileUrl($logoSettings);
$logoFileSet = true;
}
if(!$logoFileSet && !file_exists($logoFileName)){
return BASE_URL."images/logo.png";
}
return $logoFileName;
}
} }

23
src/common.cron.tasks.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
class EmailSenderTask implements IceTask{
public function execute($cron){
$email = new IceEmail();
$emails = $email->Find("status = ? limit 10",array('Pending'));
$emailSender = BaseService::getInstance()->getEmailSender();
foreach($emails as $email){
try{
$emailSender->sendEmailFromDB($email);
}catch(Exception $e){
LogManager::getInstance()->error("Error sending email:".$e->getMessage());
}
$email->status = 'Sent';
$email->updated = date('Y-m-d H:i:s');
$email->Save();
}
}
}
include('common.cron.tasks.ext.php');

View File

@@ -9,4 +9,4 @@ if(!defined('SIGN_IN_ELEMENT_MAPPING_FIELD_NAME')){define('SIGN_IN_ELEMENT_MAPPI
if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','ice-framework@gamonoid.com');} if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','ice-framework@gamonoid.com');}
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','iCEf');} if(!defined('KEY_PREFIX')){define('KEY_PREFIX','iCEf');}
if(!defined('APP_SEC')){define('APP_SEC','4dcxswfrds');} if(!defined('APP_SEC')){define('APP_SEC','4dcxudersqw');}

22
src/crons/cron.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
include dirname(__FILE__).'/include.cron.php';
$cron = new Cron();
$crons = $cron->Find("status = ?",array('Enabled'));
if(!$crons){
LogManager::getInstance()->info(CLIENT_NAME." error :".$cron->ErrorMsg());
}
LogManager::getInstance()->info(CLIENT_NAME." cron count :".count($crons));
foreach($crons as $cron){
$count++;
$iceCron = new IceCron($cron);
LogManager::getInstance()->info(CLIENT_NAME." check cron :".$cron->name);
if($iceCron->isRunNow()){
LogManager::getInstance()->info(CLIENT_NAME." execute cron :".$cron->name);
$iceCron->execute();
sleep(1);
}
}

View File

@@ -10,7 +10,7 @@ $basePath = $opts['p'];
include (dirname(__FILE__)."/../classes/CronUtils.php"); include (dirname(__FILE__)."/../classes/CronUtils.php");
$cronUtils = CronUtils::getInstance($basePath, dirname(__FILE__)."/".$file); $cronUtils = CronUtils::getInstance($basePath, $file);
echo "Cron Runner created \r\n"; echo "Cron Runner created \r\n";

View File

@@ -2,14 +2,10 @@
if(php_sapi_name() != 'cli'){ if(php_sapi_name() != 'cli'){
exit(); exit();
} }
$opts = getopt('c:');
$clientPath = $opts['c'];
if(empty($clientPath)){ define('CLIENT_PATH',dirname(__FILE__)."/..");
echo "No client path defined\r\n";
exit(); include (APP_BASE_PATH."config.base.php");
}
include $clientPath."/config.php";
include (APP_BASE_PATH."include.common.php"); include (APP_BASE_PATH."include.common.php");
include("server.includes.inc.php"); include(APP_BASE_PATH."server.includes.inc.php");

View File

@@ -407,7 +407,7 @@ table.dataTable{
-webkit-border-radius: 0px; -webkit-border-radius: 0px;
-moz-border-radius: 0px; -moz-border-radius: 0px;
border-radius: 0px; border-radius: 0px;
box-shadow: 0 1px 1px rgba(0,0,0,.12),0 1px 1px rgba(0,0,0,.24);
} }
@@ -457,6 +457,13 @@ table.dataTable{
background: #FFF; background: #FFF;
} }
/*
@media (min-width:1025px) {
.content {
min-height: 1100px;
}
}*/
.wrapper { .wrapper {
background: #FFF; background: #FFF;
} }
@@ -481,6 +488,16 @@ table.dataTable{
/*custom for v11.0 */
.table-bordered>thead>tr>th{ .table-bordered>thead>tr>th{
border:none !important; border:none !important;
} }
@@ -499,9 +516,11 @@ table.dataTable{
box-shadow: 0 1px 2px 0 rgba(0,0,0,.2); box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
} }
.reviewBlock{ .reviewBlock{/*
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box box-sizing: border-box*/
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
border: none;
} }
.treeview-menu li:hover{ .treeview-menu li:hover{
@@ -588,4 +607,48 @@ table.dataTable{
.fc-toolbar h2{ .fc-toolbar h2{
font-size: 15px; font-size: 15px;
}
.navbar, .right-side{
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
border: none;
}
.right-side{
margin-bottom: 20px;
}
.sidebar .sidebar-menu {
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
border: none;
background: #FFF;
}
.treeview.active{
box-shadow: 0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
border: none;
background: #FFF;
}
.sidebar .sidebar-menu .treeview-menu > li {
background: #FFF;
}
.skin-blue .sidebar > .sidebar-menu > li > a:hover, .skin-blue .sidebar > .sidebar-menu > li.active > a {
color: #222;
background: #fff !important;
}
.right-side > .content-header > h1 > small {
color: #FFF;
}
.modal-content {
border-radius: 0px;
}
.panel {
border-radius: 0px;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
} }

49
src/entry_footer.php Normal file
View File

@@ -0,0 +1,49 @@
</section><!-- /.content -->
</aside><!-- /.right-side -->
</div><!-- ./wrapper -->
<script type="text/javascript">
for (var prop in modJsList) {
if(modJsList.hasOwnProperty(prop)){
modJsList[prop].setPermissions(<?=json_encode($modulePermissions['perm'])?>);
modJsList[prop].setFieldTemplates(<?=json_encode($fieldTemplates)?>);
modJsList[prop].setTemplates(<?=json_encode($templates)?>);
modJsList[prop].setCustomTemplates(<?=json_encode($customTemplates)?>);
<?php if(isset($emailTemplates)){?>
modJsList[prop].setEmailTemplates(<?=json_encode($emailTemplates)?>);
<?php } ?>
modJsList[prop].setUser(<?=json_encode($user)?>);
//Test
<?php if(isset($_REQUEST['action']) && $_REQUEST['action'] == "new"){?>
if(modJsList[prop].newInitObject == undefined || modJsList[prop].newInitObject == null){
modJsList[prop].initFieldMasterData(null,modJsList[prop].renderForm);
}else{
modJsList[prop].initFieldMasterData(null,modJsList[prop].renderForm, modJsList[prop].newInitObject);
}
<?php }else{?>
modJsList[prop].initFieldMasterData(null, modJs.loadingFunction);
<?php }?>
modJsList[prop].setBaseUrl('<?=BASE_URL?>');
modJsList[prop].setCurrentProfile(<?=json_encode($activeProfile)?>);
modJsList[prop].setInstanceId('<?=$baseService->getInstanceId()?>');
modJsList[prop].setNoJSONRequests('<?=$noJSONRequests?>');
}
}
//Other static js objects
var timeUtils = new TimeUtils();
timeUtils.setServerGMToffset('<?=$diffHoursBetweenServerTimezoneWithGMT?>');
var clientUrl = '<?=CLIENT_BASE_URL?>';
</script>
<?php include 'popups.php';?>
<?php include APP_BASE_PATH.'js/bootstrapDataTable.php';?>
</body>
</html>

91
src/entry_header.php Normal file
View File

@@ -0,0 +1,91 @@
<?php
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
$logoFileUrl = CLIENT_BASE_URL."data/logo.png";
if(!file_exists($logoFileName)){
$logoFileUrl = BASE_URL."images/logo.png";
}
?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?=$meta->title?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="image_src" href="<?=!empty($meta->imageUrl)?$meta->imageUrl:$logoFileUrl?>"/>
<meta property="og:image" content="<?=!empty($meta->imageUrl)?$meta->imageUrl:$logoFileUrl?>"/>
<meta property="og:url" content="<?=$meta->url?>"/>
<meta property="og:title" content="<?=$meta->title?>"/>
<meta property="og:description" content="<?=$meta->description?>"/>
<link href="<?=BASE_URL?>themecss/bootstrap.min.css" rel="stylesheet">
<link href="<?=BASE_URL?>themecss/font-awesome.min.css" rel="stylesheet">
<link href="<?=BASE_URL?>themecss/ionicons.min.css" rel="stylesheet">
<script type="text/javascript" src="<?=BASE_URL?>js/jquery2.0.2.min.js"></script>
<script src="<?=BASE_URL?>themejs/bootstrap.js"></script>
<script src="<?=BASE_URL?>js/jquery.placeholder.js"></script>
<script src="<?=BASE_URL?>js/base64.js"></script>
<script src="<?=BASE_URL?>js/bootstrap-datepicker.js"></script>
<script src="<?=BASE_URL?>js/jquery.timepicker.js"></script>
<script src="<?=BASE_URL?>js/bootstrap-datetimepicker.js"></script>
<script src="<?=BASE_URL?>js/fullcalendar.min.js"></script>
<script src="<?=BASE_URL?>js/select2/select2.min.js"></script>
<script src="<?=BASE_URL?>js/bootstrap-colorpicker-2.1.1/js/bootstrap-colorpicker.min.js"></script>
<link href="<?=BASE_URL?>themecss/datatables/dataTables.bootstrap.css" rel="stylesheet">
<link href="<?=BASE_URL?>css/jquery.timepicker.css" rel="stylesheet">
<link href="<?=BASE_URL?>css/datepicker.css" rel="stylesheet">
<link href="<?=BASE_URL?>css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<link href="<?=BASE_URL?>css/fullcalendar.css" rel="stylesheet">
<link href="<?=BASE_URL?>js/select2/select2.css" rel="stylesheet">
<link href="<?=BASE_URL?>js/bootstrap-colorpicker-2.1.1/css/bootstrap-colorpicker.min.css" rel="stylesheet">
<link href="<?=BASE_URL?>themecss/AdminLTE.css" rel="stylesheet">
<script src="<?=BASE_URL?>themejs/plugins/datatables/jquery.dataTables.js"></script>
<script src="<?=BASE_URL?>themejs/plugins/datatables/dataTables.bootstrap.js"></script>
<script src="<?=BASE_URL?>themejs/AdminLTE/app.js"></script>
<link href="<?=BASE_URL?>css/style.css?v=<?=$cssVersion?>" rel="stylesheet">
<script type="text/javascript" src="<?=BASE_URL?>js/date.js"></script>
<script type="text/javascript" src="<?=BASE_URL?>js/json2.js"></script>
<script type="text/javascript" src="<?=BASE_URL?>js/CrockfordInheritance.v0.1.js"></script>
<script type="text/javascript" src="<?=BASE_URL?>api/Base.js?v=<?=$jsVersion?>"></script>
<script type="text/javascript" src="<?=BASE_URL?>api/AdapterBase.js?v=<?=$jsVersion?>"></script>
<script type="text/javascript" src="<?=BASE_URL?>api/FormValidation.js?v=<?=$jsVersion?>"></script>
<script type="text/javascript" src="<?=BASE_URL?>api/Notifications.js?v=<?=$jsVersion?>"></script>
<script type="text/javascript" src="<?=BASE_URL?>api/TimeUtils.js?v=<?=$jsVersion?>"></script>
<script type="text/javascript" src="<?=BASE_URL?>api/AesCrypt.js?v=<?=$jsVersion?>"></script>
<?php include APP_BASE_PATH.'/modulejslibs.inc.php';?>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script>
var baseUrl = '<?=CLIENT_BASE_URL?>service.php';
var CLIENT_BASE_URL = '<?=CLIENT_BASE_URL?>';
</script>
<script type="text/javascript" src="<?=BASE_URL?>js/app-global.js"></script>
</head>
<body>

View File

@@ -10,7 +10,7 @@ include_once ('server.includes.inc.php');
/** /**
* Handle file uploads via regular form post (uses the $_FILES array) * Handle file uploads via regular form post (uses the $_FILES array)
*/ */
class qqUploadedFileForm { class qqUploadedFileForm {
/** /**
* Save the file to the specified path * Save the file to the specified path
* @return boolean TRUE on success * @return boolean TRUE on success
@@ -30,64 +30,64 @@ class qqUploadedFileForm {
} }
class qqFileUploader { class qqFileUploader {
var $log = null; var $log = null;
private $allowedExtensions = array(); private $allowedExtensions = array();
private $sizeLimit = 10485760; private $sizeLimit = 10485760;
//private $sizeLimit = 2485760; //private $sizeLimit = 2485760;
private $file; private $file;
function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760){ function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760){
$allowedExtensions = array_map("strtolower", $allowedExtensions); $allowedExtensions = array_map("strtolower", $allowedExtensions);
$this->allowedExtensions = $allowedExtensions; $this->allowedExtensions = $allowedExtensions;
$this->sizeLimit = $sizeLimit; $this->sizeLimit = $sizeLimit;
$this->checkServerSettings(); $this->checkServerSettings();
$this->file = new qqUploadedFileForm(); $this->file = new qqUploadedFileForm();
} }
private function checkServerSettings(){ private function checkServerSettings(){
$postSize = $this->toBytes(ini_get('post_max_size')); $postSize = $this->toBytes(ini_get('post_max_size'));
$uploadSize = $this->toBytes(ini_get('upload_max_filesize')); $uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
/*if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){ /*if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){
$size = max(1, $this->sizeLimit / 1024 / 1024) . 'M'; $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
die("{'error':'increase post_max_size and upload_max_filesize to $size'}"); die("{'error':'increase post_max_size and upload_max_filesize to $size'}");
}*/ }*/
} }
private function toBytes($str){ private function toBytes($str){
$val = trim($str); $val = trim($str);
$last = strtolower($str[strlen($str)-1]); $last = strtolower($str[strlen($str)-1]);
switch($last) { switch($last) {
case 'g': $val *= 1024; case 'g': $val *= 1024;
case 'm': $val *= 1024; case 'm': $val *= 1024;
case 'k': $val *= 1024; case 'k': $val *= 1024;
} }
return $val; return $val;
} }
/** /**
* Returns array('success'=>1) or array('error'=>'error message') * Returns array('success'=>1) or array('error'=>'error message')
*/ */
function handleUpload($uploadDirectory,$saveFileName, $replaceOldFile = FALSE){ function handleUpload($uploadDirectory,$saveFileName, $replaceOldFile = FALSE){
if (!is_writable($uploadDirectory)){ if (!is_writable($uploadDirectory)){
return array('success'=>0,'error' => "Server error. Upload directory isn't writable."); return array('success'=>0,'error' => "Server error. Upload directory ($uploadDirectory) is not writable");
} }
if (!$this->file){ if (!$this->file){
return array('success'=>0,'error' => 'No files were uploaded.'); return array('success'=>0,'error' => 'No files were uploaded.');
} }
$size = $this->file->getSize(); $size = $this->file->getSize();
LogManager::getInstance()->info('file size ='.$size); LogManager::getInstance()->info('file size ='.$size);
LogManager::getInstance()->info('file size limit ='.$this->sizeLimit); LogManager::getInstance()->info('file size limit ='.$this->sizeLimit);
if ($size == 0) { if ($size == 0) {
return array('success'=>0,'error' => 'File is empty'); return array('success'=>0,'error' => 'File is empty');
} }
if ($size > $this->sizeLimit) { if ($size > $this->sizeLimit) {
return array('success'=>0,'error' => 'File is too large'); return array('success'=>0,'error' => 'File is too large');
} }
$pathinfo = pathinfo($this->file->getName()); $pathinfo = pathinfo($this->file->getName());
$filename = $pathinfo['filename']; $filename = $pathinfo['filename'];
//$filename = md5(uniqid()); //$filename = md5(uniqid());
@@ -100,18 +100,18 @@ class qqFileUploader {
//$filename .= microtime(true); //$filename .= microtime(true);
$filename = $saveFileName; // file with only name $filename = $saveFileName; // file with only name
$saveFileName = $saveFileName.'.'.strtolower($ext); // file with extention $saveFileName = $saveFileName.'.'.strtolower($ext); // file with extention
$final_img_location = $uploadDirectory . $saveFileName; $final_img_location = $uploadDirectory . $saveFileName;
if ($this->file->save($final_img_location)){ if ($this->file->save($final_img_location)){
$arr = explode("/", $final_img_location); $arr = explode("/", $final_img_location);
return array('success'=>1,'filename'=>$arr[count($arr)-1],'error'=>''); return array('success'=>1,'filename'=>$arr[count($arr)-1],'error'=>'');
} else { } else {
return array('success'=>0,'error'=> 'Could not save uploaded file.' . return array('success'=>0,'error'=> 'Could not save uploaded file.' .
'The upload was cancelled, or server error encountered'); 'The upload was cancelled, or server error encountered');
} }
} }
} }
//Generate File Name //Generate File Name
$saveFileName = $_POST['file_name']; $saveFileName = $_POST['file_name'];
@@ -119,12 +119,12 @@ $saveFileName = str_replace("..","",$saveFileName);
$saveFileName = str_replace("/","",$saveFileName); $saveFileName = str_replace("/","",$saveFileName);
if(stristr($saveFileName,".php")){ if(stristr($saveFileName,".php")){
$saveFileName = str_replace(".php","",$saveFileName); $saveFileName = str_replace(".php","",$saveFileName);
} }
if(empty($saveFileName) || $saveFileName == "_NEW_"){ if(empty($saveFileName) || $saveFileName == "_NEW_"){
$saveFileName = microtime(); $saveFileName = microtime();
$saveFileName = str_replace(".", "-", $saveFileName); $saveFileName = str_replace(".", "-", $saveFileName);
} }
$file = new File(); $file = new File();
@@ -150,45 +150,45 @@ $uploadedToS3 = false;
LogManager::getInstance()->info($uploadFilesToS3."|".$uploadFilesToS3Key."|".$uploadFilesToS3Secret."|".$s3Bucket."|".$s3WebUrl."|".CLIENT_NAME); LogManager::getInstance()->info($uploadFilesToS3."|".$uploadFilesToS3Key."|".$uploadFilesToS3Secret."|".$s3Bucket."|".$s3WebUrl."|".CLIENT_NAME);
if($uploadFilesToS3.'' == '1' && !empty($uploadFilesToS3Key) && !empty($uploadFilesToS3Secret) && if($uploadFilesToS3.'' == '1' && !empty($uploadFilesToS3Key) && !empty($uploadFilesToS3Secret) &&
!empty($s3Bucket) && !empty($s3WebUrl)){ !empty($s3Bucket) && !empty($s3WebUrl)){
$localFile = CLIENT_BASE_PATH.'data/'.$result['filename']; $localFile = CLIENT_BASE_PATH.'data/'.$result['filename'];
$f_size = filesize($localFile); $f_size = filesize($localFile);
$uploadname = CLIENT_NAME."/".$result['filename']; $uploadname = CLIENT_NAME."/".$result['filename'];
LogManager::getInstance()->info("Upload file to s3:".$uploadname); LogManager::getInstance()->info("Upload file to s3:".$uploadname);
LogManager::getInstance()->info("Local file:".$localFile); LogManager::getInstance()->info("Local file:".$localFile);
LogManager::getInstance()->info("Local file size:".$f_size); LogManager::getInstance()->info("Local file size:".$f_size);
$s3FileSys = new S3FileSystem($uploadFilesToS3Key, $uploadFilesToS3Secret); $s3FileSys = new S3FileSystem($uploadFilesToS3Key, $uploadFilesToS3Secret);
$res = $s3FileSys->putObject($s3Bucket, $uploadname, $localFile, 'authenticated-read'); $res = $s3FileSys->putObject($s3Bucket, $uploadname, $localFile, 'authenticated-read');
$file_url = $s3WebUrl.$uploadname; $file_url = $s3WebUrl.$uploadname;
$file_url = $s3FileSys->generateExpiringURL($file_url); $file_url = $s3FileSys->generateExpiringURL($file_url);
LogManager::getInstance()->info("Response from s3 file sys:".print_r($res,true)); LogManager::getInstance()->info("Response from s3 file sys:".print_r($res,true));
unlink($localFile); unlink($localFile);
$uploadedToS3 = true; $uploadedToS3 = true;
} }
if($result['success'] == 1){ if($result['success'] == 1){
$file->name = $saveFileName; $file->name = $saveFileName;
$file->filename = $result['filename']; $file->filename = $result['filename'];
$signInMappingField = SIGN_IN_ELEMENT_MAPPING_FIELD_NAME; $signInMappingField = SIGN_IN_ELEMENT_MAPPING_FIELD_NAME;
$file->$signInMappingField = $_POST['user']=="_NONE_"?null:$_POST['user']; $file->$signInMappingField = $_POST['user']=="_NONE_"?null:$_POST['user'];
$file->file_group = $_POST['file_group']; $file->file_group = $_POST['file_group'];
$file->Save(); $file->Save();
if($uploadedToS3){ if($uploadedToS3){
$result['data'] = $file_url; $result['data'] = $file_url;
}else{ }else{
$result['data'] = CLIENT_BASE_URL.'data/'.$result['filename']; $result['data'] = CLIENT_BASE_URL.'data/'.$result['filename'];
} }
$result['data'] .= "|".$saveFileName; $result['data'] .= "|".$saveFileName;
$result['data'] .= "|".$file->id; $result['data'] .= "|".$file->id;
} }
echo "<script>parent.closeUploadDialog(".$result['success'].",'".$result['error']."','".$result['data']."');</script>"; echo "<script>parent.closeUploadDialog(".$result['success'].",'".$result['error']."','".$result['data']."');</script>";

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

106
src/font/roboto/Roboto.css Normal file
View File

@@ -0,0 +1,106 @@
@font-face {
font-family: 'Roboto';
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-Regular-webfont.woff') format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Roboto';
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-Italic-webfont.woff') format('woff');
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: 'Roboto';
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-Bold-webfont.woff') format('woff');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'Roboto';
src: local('Roboto'), url('https://roboto-webfont.googlecode.com/files/Roboto-BoldItalic-webfont.woff') format('woff');
font-weight: 700;
font-style: italic;
}
@font-face {
font-family: 'Roboto Condensed';
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-Condensed-webfont.woff') format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Roboto Condensed';
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-CondensedItalic-webfont.woff') format('woff');
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: 'Roboto Condensed';
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-BoldCondensed-webfont.woff') format('woff');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'Roboto Condensed';
src: local('Roboto Condensed'), url('https://roboto-webfont.googlecode.com/files/Roboto-BoldCondensedItalic-webfont.woff') format('woff');
font-weight: 700;
font-style: italic;
}
@font-face {
font-family: 'Roboto Thin';
src: local('Roboto Thin'), url('https://roboto-webfont.googlecode.com/files/Roboto-Thin-webfont.woff') format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Roboto Thin';
src: local('Roboto Thin'), url('https://roboto-webfont.googlecode.com/files/Roboto-ThinItalic-webfont.woff') format('woff');
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: 'Roboto Light';
src: local('Roboto Light'), url('https://roboto-webfont.googlecode.com/files/Roboto-Light-webfont.woff') format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Roboto Light';
src: local('Roboto Light'), url('https://roboto-webfont.googlecode.com/files/Roboto-LightItalic-webfont.woff') format('woff');
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: 'Roboto Medium';
src: local('Roboto Medium'), url('https://roboto-webfont.googlecode.com/files/Roboto-Medium-webfont.woff') format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Roboto Medium';
src: local('Roboto Medium'), url('https://roboto-webfont.googlecode.com/files/Roboto-MediumItalic-webfont.woff') format('woff');
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: 'Roboto Black';
src: local('Roboto Black'), url('https://roboto-webfont.googlecode.com/files/Roboto-Black-webfont.woff') format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Roboto Black';
src: local('Roboto Black'), url('https://roboto-webfont.googlecode.com/files/Roboto-BlackItalic-webfont.woff') format('woff');
font-weight: 400;
font-style: italic;
}

View File

@@ -23,6 +23,8 @@ Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilin
include 'includes.inc.php'; include 'includes.inc.php';
if(empty($user)){ if(empty($user)){
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
SessionUtils::saveSessionObject('loginRedirect',$actual_link);
header("Location:".CLIENT_BASE_URL."login.php"); header("Location:".CLIENT_BASE_URL."login.php");
} }
@@ -54,6 +56,7 @@ if(!in_array($user->user_level, $modulePermissions['user'])){
$commonRoles = array_intersect($modulePermissions['user_roles'], $userRoles); $commonRoles = array_intersect($modulePermissions['user_roles'], $userRoles);
if(empty($commonRoles)){ if(empty($commonRoles)){
echo "You are not allowed to access this page"; echo "You are not allowed to access this page";
header("Location:".CLIENT_BASE_URL."logout.php");
exit(); exit();
} }
@@ -193,7 +196,7 @@ include('configureUIManager.php');
</header> </header>
<div class="wrapper row-offcanvas row-offcanvas-left"> <div class="wrapper row-offcanvas row-offcanvas-left">
<!-- Left side column. contains the logo and sidebar --> <!-- Left side column. contains the logo and sidebar -->
<aside class="left-side sidebar-offcanvas"> <aside class="left-side sidebar-offcanvas">
<!-- sidebar: style can be found in sidebar.less --> <!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar"> <section class="sidebar">
<!-- Sidebar user panel --> <!-- Sidebar user panel -->
@@ -266,7 +269,7 @@ include('configureUIManager.php');
<?=$meta['label']?> <?=$meta['label']?>
<small> <small>
<?=$meta['menu']?>&nbsp;&nbsp; <?=$meta['menu']?>&nbsp;&nbsp;
<a href="#" class="helpLink" target="_blank" style="display:none;"><i class="glyphicon glyphicon-question-sign"></i></a> <a href="#" class="helpLink" target="_blank" style="display:none;color:#fff;"><i class="glyphicon glyphicon-question-sign"></i></a>
</small> </small>
</h1> </h1>
</section> </section>

View File

@@ -19,7 +19,7 @@ $_GET = InputCleaner::cleanParameters($_GET);
$_POST = InputCleaner::cleanParameters($_POST); $_POST = InputCleaner::cleanParameters($_POST);
date_default_timezone_set('Asia/Colombo');
//Find timezone diff with GMT //Find timezone diff with GMT
$dateTimeZoneColombo = new DateTimeZone("Asia/Colombo"); $dateTimeZoneColombo = new DateTimeZone("Asia/Colombo");
$dateTimeColombo = new DateTime("now", $dateTimeZoneColombo); $dateTimeColombo = new DateTime("now", $dateTimeZoneColombo);

View File

@@ -46,12 +46,13 @@ if(empty($user)){
$tuser = SessionUtils::getSessionObject('user'); $tuser = SessionUtils::getSessionObject('user');
//check user //check user
/*
$logoFileName = CLIENT_BASE_PATH."data/logo.png"; $logoFileName = CLIENT_BASE_PATH."data/logo.png";
$logoFileUrl = CLIENT_BASE_URL."data/logo.png"; $logoFileUrl = CLIENT_BASE_URL."data/logo.png";
if(!file_exists($logoFileName)){ if(!file_exists($logoFileName)){
$logoFileUrl = BASE_URL."images/logo.png"; $logoFileUrl = BASE_URL."images/logo.png";
} }*/
$logoFileUrl = UIManager::getInstance()->getCompanyLogoUrl();
?><!DOCTYPE html> ?><!DOCTYPE html>
<html lang="en"> <html lang="en">
@@ -89,31 +90,45 @@ if(!file_exists($logoFileName)){
padding-top: 40px; padding-top: 40px;
} }
.container { .container {
width: 300px; width: 300px;
min-height: 0px !important;
} }
/* The white background content wrapper */ /* The white background content wrapper */
.container > .content { .container > .content {
background-color: #fff; min-height: 0px !important;
padding: 20px; background-color: #fff;
margin: 0 -20px; padding: 20px;
-webkit-border-radius: 10px 10px 10px 10px; margin: 0 -20px;
-moz-border-radius: 10px 10px 10px 10px; -webkit-border-radius:0px;
border-radius: 10px 10px 10px 10px; -moz-border-radius:0px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); border-radius: 0px;
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
box-shadow: 0 1px 2px rgba(0,0,0,.15); -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
box-shadow: 0 1px 2px rgba(0,0,0,.15);
} }
.login-form { .login-form {
margin-left: 65px; margin-left: 65px;
} }
legend { legend {
margin-right: -50px; margin-right: -50px;
font-weight: bold; font-weight: bold;
color: #404040; color: #404040;
} }
.add-on{
-webkit-border-radius:0px;
-moz-border-radius:0px;
border-radius: 0px;
}
input{
-webkit-border-radius:0px;
-moz-border-radius:0px;
border-radius: 0px;
}
</style> </style>

View File

@@ -83,5 +83,13 @@ class RestAccessToken extends ICEHRM_Record {
var $_table = 'RestAccessTokens'; var $_table = 'RestAccessTokens';
} }
class Cron extends ICEHRM_Record {
var $_table = 'Crons';
}
class IceEmail extends ICEHRM_Record {
var $_table = 'Emails';
}

View File

@@ -51,6 +51,42 @@
</div> </div>
<!-- Plain Message Modal --> <!-- Plain Message Modal -->
<!-- Data Message Modal -->
<div class="modal fade" id="dataMessageModel" tabindex="-1" role="dialog" aria-labelledby="dataMessageModelLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" style="border-bottom:none;/*background-color: #3c8dbc;*/">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="margin-top:-10px;"><li class="fa fa-times"/></button>
</div>
<div class="modal-body">
<p id="dataMessageModelBody"></p>
</div>
</div>
</div>
</div>
<!-- Data Message Modal -->
<!-- Yes No Modal -->
<div class="modal fade" id="yesnoModel" tabindex="-1" role="dialog" aria-labelledby="yesnoModelLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><li class="fa fa-times"/></button>
<h3 id="yesnoModelLabel" style="font-size: 17px;"></h3>
</div>
<div class="modal-body">
<p id="yesnoModelBody"></p>
</div>
<div class="modal-footer">
<button id="yesnoModelNoBtn" class="btn" onclick="modJs.cancelYesno();">No</button>
<button id="yesnoModelYesBtn" class="btn btn-primary">Yes</button>
</div>
</div>
</div>
</div>
<!-- Yes No Modal -->
<!-- Upload Modal --> <!-- Upload Modal -->
<div class="modal fade" id="uploadModel" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade" id="uploadModel" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">

View File

@@ -667,6 +667,8 @@ INSERT INTO `Nationality` (`id`, `name`) VALUES
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
('Company: Logo', '', '','[ "value", {"label":"Logo","type":"fileupload","validation":"none"}]'),
('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: 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: 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 Host', 'localhost', 'SMTP host IP',''),

View File

@@ -204,4 +204,34 @@ create table `Files` (
`file_group` varchar(100) NOT NULL, `file_group` varchar(100) NOT NULL,
primary key (`id`), primary key (`id`),
unique key `filename` (`filename`) unique key `filename` (`filename`)
) engine=innodb default charset=utf8;
create table `Crons` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`class` varchar(100) NOT NULL,
`lastrun` DATETIME default '0000-00-00 00:00:00',
`frequency` int(4) NOT NULL,
`time` varchar(50) NOT NULL,
`type` enum('Minutely','Hourly','Daily','Weekly','Monthly','Yearly') default 'Hourly',
`status` enum('Enabled','Disabled') default 'Enabled',
primary key (`id`),
key `KEY_Crons_frequency` (`frequency`)
) engine=innodb default charset=utf8;
create table `Emails` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`subject` varchar(300) NOT NULL,
`toEmail` varchar(300) NOT NULL,
`template` text NULL,
`params` text NULL,
`cclist` varchar(500) NULL,
`bcclist` varchar(500) NULL,
`error` varchar(500) NULL,
`created` DATETIME default '0000-00-00 00:00:00',
`updated` DATETIME default '0000-00-00 00:00:00',
`status` enum('Pending','Sent','Error') default 'Pending',
primary key (`id`),
key `KEY_Emails_status` (`status`),
key `KEY_Emails_created` (`created`)
) engine=innodb default charset=utf8; ) engine=innodb default charset=utf8;

View File

@@ -26,6 +26,7 @@ if(defined("MODULE_PATH")){
$user = SessionUtils::getSessionObject('user'); $user = SessionUtils::getSessionObject('user');
include (APP_BASE_PATH."classes/BaseService.php"); include (APP_BASE_PATH."classes/BaseService.php");
include (APP_BASE_PATH."classes/CronUtils.php");
include (APP_BASE_PATH."classes/FileService.php"); include (APP_BASE_PATH."classes/FileService.php");
include (APP_BASE_PATH."classes/SubActionManager.php"); include (APP_BASE_PATH."classes/SubActionManager.php");
include (APP_BASE_PATH."classes/AbstractInitialize.php"); include (APP_BASE_PATH."classes/AbstractInitialize.php");
@@ -49,6 +50,8 @@ include APP_BASE_PATH.'admin/users/api/UsersAdminManager.php';
include APP_BASE_PATH.'admin/modules/api/ModulesAdminManager.php'; include APP_BASE_PATH.'admin/modules/api/ModulesAdminManager.php';
include APP_BASE_PATH.'admin/permissions/api/PermissionsAdminManager.php'; include APP_BASE_PATH.'admin/permissions/api/PermissionsAdminManager.php';
include (APP_BASE_PATH."classes/ApproveActionManager.php");
$dbLocal = NewADOConnection(APP_CON_STR); $dbLocal = NewADOConnection(APP_CON_STR);
File::SetDatabaseAdapter($dbLocal); File::SetDatabaseAdapter($dbLocal);
@@ -81,11 +84,11 @@ $noJSONRequests = SettingsManager::getInstance()->getSetting("System: Do not pas
$debugMode = SettingsManager::getInstance()->getSetting("System: Debug Mode"); $debugMode = SettingsManager::getInstance()->getSetting("System: Debug Mode");
if($debugMode == "1"){ if($debugMode == "1"){
if(!defined('LOG_LEVEL')){define('LOG_LEVEL',Monolog\Logger::DEBUG);}
error_reporting(E_ALL); error_reporting(E_ALL);
if(!defined('LOG_LEVEL')){define('LOG_LEVEL',Monolog\Logger::DEBUG);}
}else{ }else{
error_reporting(E_ERROR);
if(!defined('LOG_LEVEL')){define('LOG_LEVEL',Monolog\Logger::INFO);} if(!defined('LOG_LEVEL')){define('LOG_LEVEL',Monolog\Logger::INFO);}
error_reporting(E_ERROR);
} }
LogManager::getInstance(); LogManager::getInstance();
@@ -155,4 +158,6 @@ if($emailEnabled == "1"){
BaseService::getInstance()->setEmailSender($emailSender); BaseService::getInstance()->setEmailSender($emailSender);
include ('common.cron.tasks.php');
?> ?>

View File

@@ -6,6 +6,6 @@
<div class="pull-left info"> <div class="pull-left info">
<p>#_firstName_# #_lastName_#</p> <p>#_firstName_# #_lastName_#</p>
<a href="#"><i class="fa fa-circle text-warning"></i> Updating </a> <a href="#"><i class="fa fa-circle text-warning"></i> Switched </a>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,5 @@
Hello #_user_#<br/><br/>
#_message_#
<br/>
<br/>
Visit IceHrm: <a href="#_url_#">#_url_#</a>

View File

@@ -1,5 +1,27 @@
@import url(//fonts.googleapis.com/css?family=Ubuntu); @font-face {
font-family: "Roboto";
src: url("../font/roboto/Roboto-Thin-webfont.woff") format("woff");
font-weight: 200; }
@font-face {
font-family: "Roboto";
src: url("../font/roboto/Roboto-Light-webfont.woff") format("woff");
font-weight: 300; }
@font-face {
font-family: "Roboto";
src: url("../font/roboto/Roboto-Regular-webfont.woff") format("woff");
font-weight: 400; }
@font-face {
font-family: "Roboto";
src: url("../font/roboto/Roboto-Medium-webfont.woff") format("woff");
font-weight: 500; }
@font-face {
font-family: "Roboto";
src: url("../font/roboto/Roboto-Bold-webfont.woff") format("woff");
font-weight: 700; }
/*
@import url(//fonts.googleapis.com/css?family=Ubuntu);
*/
/* /*
@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic); @import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic);
*/ */
@@ -19,10 +41,10 @@
html, html,
body { body {
overflow-x: hidden!important; overflow-x: hidden!important;
font-family: 'Ubuntu', sans-serif; font-family: 'Roboto', sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
min-height: 100%; min-height: 100%;
background: #f9f9f9; background: #fff;
} }
a { a {
color: #3c8dbc; color: #3c8dbc;
@@ -406,7 +428,7 @@ body > .header .logo {
text-align: center; text-align: center;
padding: 0 10px; padding: 0 10px;
width: 220px; width: 220px;
font-family: 'Ubuntu', cursive; font-family: 'Roboto', cursive;
font-weight: 500; font-weight: 500;
height: 50px; height: 50px;
display: block; display: block;
@@ -661,9 +683,11 @@ body > .header .logo .icon {
margin: 0!important; margin: 0!important;
top: 100%; top: 100%;
border: 1px solid #dfdfdf; border: 1px solid #dfdfdf;
/*
-webkit-border-radius: 4px !important; -webkit-border-radius: 4px !important;
-moz-border-radius: 4px !important; -moz-border-radius: 4px !important;
border-radius: 4px !important; border-radius: 4px !important;
*/
} }
.navbar-nav > .notifications-menu > .dropdown-menu > li.header, .navbar-nav > .notifications-menu > .dropdown-menu > li.header,
.navbar-nav > .messages-menu > .dropdown-menu > li.header, .navbar-nav > .messages-menu > .dropdown-menu > li.header,
@@ -798,9 +822,9 @@ body > .header .logo .icon {
margin: 0px; margin: 0px;
line-height: 20px; line-height: 20px;
padding: 10px 5px 10px 5px; padding: 10px 5px 10px 5px;
-webkit-border-radius: 4px; -webkit-border-radius: 0px;
-moz-border-radius: 4px; -moz-border-radius: 0px;
border-radius: 4px; border-radius: 0px;
} }
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > div > img { .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > div > img {
margin: auto 10px auto auto; margin: auto 10px auto auto;
@@ -1151,9 +1175,9 @@ body > .header .logo .icon {
.small-box { .small-box {
position: relative; position: relative;
display: block; display: block;
-webkit-border-radius: 2px; -webkit-border-radius: 0px;
-moz-border-radius: 2px; -moz-border-radius: 0px;
border-radius: 2px; border-radius: 0px;
margin-bottom: 15px; margin-bottom: 15px;
} }
.small-box > .inner { .small-box > .inner {
@@ -1260,9 +1284,9 @@ body > .header .logo .icon {
background: #ffffff; background: #ffffff;
border-top: 2px solid #c1c1c1; border-top: 2px solid #c1c1c1;
margin-bottom: 20px; margin-bottom: 20px;
-webkit-border-radius: 3px; -webkit-border-radius: 0px;
-moz-border-radius: 3px; -moz-border-radius: 0px;
border-radius: 3px; border-radius: 0px;
width: 100%; width: 100%;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
} }
@@ -1291,12 +1315,12 @@ body > .header .logo .icon {
-webkit-border-top-right-radius: 3px; -webkit-border-top-right-radius: 3px;
-webkit-border-bottom-right-radius: 0; -webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0; -webkit-border-bottom-left-radius: 0;
-moz-border-radius-topleft: 3px; -moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 3px; -moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 0; -moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 0; -moz-border-radius-bottomleft: 0;
border-top-left-radius: 3px; border-top-left-radius: 0px;
border-top-right-radius: 3px; border-top-right-radius: 0px;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
border-bottom: 0px solid #f4f4f4; border-bottom: 0px solid #f4f4f4;
@@ -1337,12 +1361,12 @@ body > .header .logo .icon {
-webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-left-radius: 3px;
-moz-border-radius-topleft: 0; -moz-border-radius-topleft: 0;
-moz-border-radius-topright: 0; -moz-border-radius-topright: 0;
-moz-border-radius-bottomright: 3px; -moz-border-radius-bottomright: 0px;
-moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomleft: 0px;
border-top-left-radius: 0; border-top-left-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 3px; border-bottom-right-radius: 0px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 0px;
} }
.box .box-body > table, .box .box-body > table,
.box .box-body > .table { .box .box-body > .table {
@@ -1406,16 +1430,16 @@ body > .header .logo .icon {
border-top: 1px solid #f4f4f4; border-top: 1px solid #f4f4f4;
-webkit-border-top-left-radius: 0; -webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0; -webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-right-radius: 0px;
-webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-left-radius: 0px;
-moz-border-radius-topleft: 0; -moz-border-radius-topleft: 0;
-moz-border-radius-topright: 0; -moz-border-radius-topright: 0;
-moz-border-radius-bottomright: 3px; -moz-border-radius-bottomright: 0px;
-moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomleft: 0px;
border-top-left-radius: 0; border-top-left-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 3px; border-bottom-right-radius: 0px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 0px;
padding: 10px; padding: 10px;
background-color: #ffffff; background-color: #ffffff;
} }
@@ -1473,9 +1497,9 @@ body > .header .logo .icon {
box-shadow: none; box-shadow: none;
} }
.box.box-solid.collapsed-box .box-header { .box.box-solid.collapsed-box .box-header {
-webkit-border-radius: 3px; -webkit-border-radius: 0px;
-moz-border-radius: 3px; -moz-border-radius: 0px;
border-radius: 3px; border-radius: 0px;
} }
.box.box-solid[class*='bg'] > .box-header { .box.box-solid[class*='bg'] > .box-header {
color: #fff; color: #fff;
@@ -1496,9 +1520,9 @@ body > .header .logo .icon {
list-style: none; list-style: none;
} }
.box .todo-list > li { .box .todo-list > li {
-webkit-border-radius: 2px; -webkit-border-radius: 0px;
-moz-border-radius: 2px; -moz-border-radius: 0px;
border-radius: 2px; border-radius: 0px;
padding: 10px; padding: 10px;
background: #f3f4f5; background: #f3f4f5;
margin-bottom: 2px; margin-bottom: 2px;
@@ -1601,9 +1625,9 @@ body > .header .logo .icon {
font-weight: 600; font-weight: 600;
} }
.box .chat .item > .attachment { .box .chat .item > .attachment {
-webkit-border-radius: 3px; -webkit-border-radius: 0px;
-moz-border-radius: 3px; -moz-border-radius: 0px;
border-radius: 3px; border-radius: 0px;
background: #f0f0f0; background: #f0f0f0;
margin-left: 65px; margin-left: 65px;
margin-right: 15px; margin-right: 15px;
@@ -2456,8 +2480,10 @@ Component: timeline
} }
/* skin-blue content header */ /* skin-blue content header */
.skin-blue .right-side > .content-header { .skin-blue .right-side > .content-header {
background: #fbfbfb; /*background: #fbfbfb;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);*/
background: #367fa9;
color: #FFF;
} }
/* Skin-blue user panel */ /* Skin-blue user panel */
.skin-blue .user-panel > .image > img { .skin-blue .user-panel > .image > img {
@@ -2472,11 +2498,11 @@ Component: timeline
border-bottom: 1px solid #fff; border-bottom: 1px solid #fff;
} }
.skin-blue .sidebar > .sidebar-menu > li { .skin-blue .sidebar > .sidebar-menu > li {
border-top: 1px solid #fff; /*border-top: 1px solid #fff;
border-bottom: 1px solid #dbdbdb; border-bottom: 1px solid #dbdbdb;*/
} }
.skin-blue .sidebar > .sidebar-menu > li:first-of-type { .skin-blue .sidebar > .sidebar-menu > li:first-of-type {
border-top: 1px solid #dbdbdb; /*border-top: 1px solid #dbdbdb;*/
} }
.skin-blue .sidebar > .sidebar-menu > li:first-of-type > a { .skin-blue .sidebar > .sidebar-menu > li:first-of-type > a {
border-top: 1px solid #fff; border-top: 1px solid #fff;
@@ -2494,7 +2520,7 @@ Component: timeline
background: #f9f9f9; background: #f9f9f9;
} }
.skin-blue .left-side { .skin-blue .left-side {
background: #f4f4f4; /*background: #f4f4f4;*/
-webkit-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1); -webkit-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1);
box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.07); box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.07);