-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
386 changed files
with
86,300 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,39 @@ | ||
# attendance | ||
# Zeiterfassung für EGroupware | ||
|
||
# Clone Github Repository | ||
```$``` ```git clone https://github.com/agroviva/attendance``` | ||
# Nginx Configuration | ||
Add to this file: ```sudo nano /etc/egroupware-docker/egroupware-nginx.conf``` | ||
``` | ||
# Routing Templates | ||
location /egroupware/attendance/graph { | ||
alias /usr/share/egroupware/attendance/graph; | ||
try_files $uri $uri/ @attendancegraph; | ||
location ~ \index.php$ { | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $request_filename; | ||
fastcgi_pass $egroupware:9000; | ||
} | ||
} | ||
location @attendancegraph { | ||
rewrite /graph/(.*)$ /egroupware/attendance/graph/index.php?/$1 last; | ||
} | ||
# Export (PDF, Excel etc.) | ||
location /egroupware/attendance/export { | ||
alias /usr/share/egroupware/attendance/export; | ||
try_files $uri $uri/ @export; | ||
location ~ \index.php$ { | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $request_filename; | ||
fastcgi_pass $egroupware:9000; | ||
} | ||
} | ||
location @export { | ||
rewrite /export/(.*)$ /egroupware/attendance/export/index.php?/$1 last; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@import url("/egroupware/attendance/app/vlive/css/desktop.css"); | ||
|
||
@import url('/egroupware/attendance/app/vlive/css/mobile.css'); | ||
|
||
/* | ||
@import url('/egroupware/attendance/css/mobile.css') (max-width: 1024px); | ||
@import url("/egroupware/attendance/css/desktop.css") (min-width: 1025px); | ||
*/ | ||
|
||
/* phone-portrait | ||
@import url(“/egroupware/attendance/css/mobile.css”) only screen | ||
and (min-width:320px ) | ||
and (max-width: 568px ) | ||
and ( orientation: portrait ); | ||
/* phone4 -landscape | ||
@import url(‘/egroupware/attendance/css/mobile.css’) only screen | ||
and (min-width:321px ) | ||
and (max-width: 480px) | ||
and (orientation: landscape ); | ||
/* phone5 -landscape | ||
@import url(‘/egroupware/attendance/css/mobile.css’) only screen | ||
and (min-width:481px ) | ||
and (max-width: 568px) | ||
and (orientation: landscape ); | ||
/* ———- Tablets ———- | ||
@import url(“/egroupware/attendance/css/mobile.css”) only screen | ||
and (min-width: 569px ) | ||
and (max-width: 1024px) | ||
and (orientation: portrait); | ||
@import url(‘/egroupware/attendance/css/mobile.css’) only screen | ||
and (min-width: 569px) | ||
and (max-width: 1024px) | ||
and (orientation: landscape); | ||
/* desktop | ||
@import url(“/egroupware/attendance/css/desktop.css”) only screen | ||
and (min-width: 1025px); */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
header('Content-type: text/css', true); | ||
$path = include dirname(__FILE__).'/../default.php'; | ||
$version = $path['version']; | ||
echo | ||
" | ||
@import url('/egroupware/attendance/app/v{$version}/css/desktop.css'); | ||
@import url('/egroupware/attendance/app/v{$version}/css/mobile.css'); | ||
"; | ||
?> | ||
|
||
/* | ||
@import url('/egroupware/attendance/css/mobile.css') (max-width: 1024px); | ||
|
||
@import url("/egroupware/attendance/css/desktop.css") (min-width: 1025px); | ||
*/ | ||
|
||
/* phone-portrait | ||
@import url(“/egroupware/attendance/css/mobile.css”) only screen | ||
and (min-width:320px ) | ||
and (max-width: 568px ) | ||
and ( orientation: portrait ); | ||
|
||
/* phone4 -landscape | ||
@import url(‘/egroupware/attendance/css/mobile.css’) only screen | ||
and (min-width:321px ) | ||
and (max-width: 480px) | ||
and (orientation: landscape ); | ||
|
||
/* phone5 -landscape | ||
@import url(‘/egroupware/attendance/css/mobile.css’) only screen | ||
and (min-width:481px ) | ||
and (max-width: 568px) | ||
and (orientation: landscape ); | ||
|
||
/* ———- Tablets ———- | ||
@import url(“/egroupware/attendance/css/mobile.css”) only screen | ||
and (min-width: 569px ) | ||
and (max-width: 1024px) | ||
and (orientation: portrait); | ||
|
||
@import url(‘/egroupware/attendance/css/mobile.css’) only screen | ||
and (min-width: 569px) | ||
and (max-width: 1024px) | ||
and (orientation: landscape); | ||
|
||
/* desktop | ||
@import url(“/egroupware/attendance/css/desktop.css”) only screen | ||
and (min-width: 1025px); */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
return [ | ||
'version' => 'live', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?php | ||
|
||
use AgroEgw\App; | ||
use AgroEgw\DB; | ||
use Attendance\Ajax; | ||
use Attendance\Core\Update; | ||
use EGroupware\Api\Asyncservice; | ||
|
||
if (!function_exists("errorHandler")) { | ||
function errorHandler($error_level, $error_message, $error_file, $error_line, $error_context) | ||
{ | ||
$error = "lvl: " . $error_level . " | msg:" . $error_message . " | file:" . $error_file . " | ln:" . $error_line; | ||
switch ($error_level) { | ||
case E_ERROR: | ||
case E_CORE_ERROR: | ||
case E_COMPILE_ERROR: | ||
case E_PARSE: | ||
mylog($error, "fatal"); | ||
break; | ||
case E_USER_ERROR: | ||
case E_RECOVERABLE_ERROR: | ||
mylog($error, "error"); | ||
break; | ||
case E_WARNING: | ||
case E_CORE_WARNING: | ||
case E_COMPILE_WARNING: | ||
case E_USER_WARNING: | ||
mylog($error, "warn"); | ||
break; | ||
case E_NOTICE: | ||
case E_USER_NOTICE: | ||
mylog($error, "info"); | ||
break; | ||
case E_STRICT: | ||
mylog($error, "debug"); | ||
break; | ||
default: | ||
mylog($error, "warn"); | ||
} | ||
} | ||
} | ||
|
||
if (!function_exists("shutdownHandler")) { | ||
function shutdownHandler() //will be called when php script ends. | ||
{ | ||
$lasterror = error_get_last(); | ||
switch ($lasterror['type']) | ||
{ | ||
case E_ERROR: | ||
case E_CORE_ERROR: | ||
case E_COMPILE_ERROR: | ||
case E_USER_ERROR: | ||
case E_RECOVERABLE_ERROR: | ||
case E_CORE_WARNING: | ||
case E_COMPILE_WARNING: | ||
case E_PARSE: | ||
$error = "[SHUTDOWN] lvl:" . $lasterror['type'] . " | msg:" . $lasterror['message'] . " | file:" . $lasterror['file'] . " | ln:" . $lasterror['line']; | ||
mylog($error, "fatal"); | ||
} | ||
} | ||
} | ||
|
||
if (!function_exists("mylog")) { | ||
function mylog($error, $errlvl) | ||
{ | ||
// echo $error; | ||
} | ||
} | ||
|
||
set_error_handler("errorHandler"); | ||
register_shutdown_function("shutdownHandler"); | ||
|
||
require_once __DIR__.'/../../../../agroviva/vendor/autoload.php'; | ||
|
||
if (!defined('APPDIR')) { | ||
define('APPDIR', dirname(__DIR__)); | ||
} | ||
|
||
if (!defined('TEMPLATE')) { | ||
define('TEMPLATE', __DIR__.'/../views'); | ||
} | ||
|
||
App::setName('attendance'); | ||
App::Start(); | ||
require_once '/usr/share/egroupware/header.inc.php'; | ||
require_once EGW_INCLUDE_ROOT.'/attendance/setup/setup.inc.php'; | ||
require_once __DIR__.'/functions.php'; | ||
require_once __DIR__.'/../classes/autoload.php'; | ||
|
||
$async = new asyncservice(); | ||
|
||
$async->delete('attendance_api'); | ||
if (($async->read('attendance')['attendance']['method'] != 'attendance.attendance_sync.synchron')) { | ||
$async->delete('attendance'); | ||
$async->set_timer(['hour' => '*/2'], 'attendance', 'attendance.attendance_sync.synchron', null); | ||
} | ||
|
||
$db = (new DB("SHOW TABLES LIKE 'egw_attendance'"))->Fetch(); | ||
if (empty($db)) { | ||
$async->delete('attendance'); | ||
die(); | ||
} | ||
|
||
Update::Start(); | ||
|
||
require_once APPDIR.'/inc/class.attendance_ui.inc.php'; | ||
require_once APPDIR.'/inc/class.attendance_so.inc.php'; | ||
require_once APPDIR.'/inc/class.attendance_bo.inc.php'; | ||
|
||
Ajax::Response(); | ||
App::Clean(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
use Attendance\Export; | ||
|
||
ini_set('memory_limit', '-1'); | ||
include __DIR__.'/../app.php'; | ||
|
||
$so = new attendance_so(); | ||
$bo = new attendance_bo(); | ||
|
||
if (isset($_GET)) { | ||
$export = new Export($_GET); | ||
} elseif (isset($_POST)) { | ||
$export = new Export($_POST); | ||
} | ||
|
||
$export->exec(); |
Oops, something went wrong.