# $self->{$x} = $p->{$x};
#}
$self->{dbtype} = 'PgPP'; #PgPP,SQLite
- $self->{dbhost} = 'sql629.your-server.de';
- #$self->{dbhost} = 'localhost';
+
+ if ($ENV{SERVER_NAME} eq "localhost"){
+ $self->{dbhost} = 'localhost';
+ } else {
+ $self->{dbhost} = 'sql629.your-server.de';
+ }
+
+ #
$self->{dbname} = 'dks_lu';
$self->{dbuser} = 'dks_lu';
- #$self->{dbpassword} = 'dks_lu';
$self->{dbpassword} = 'DcrWuLd4KU3u68xd';
return $self;
}
# my $basepath = $ENV{"DOCUMENT_ROOT"};
my $filepath = substr($cgi->url({-absolute=>1}),length($basepath)+1);
#if (exists($p->{p})){
+
if ($filepath ne ""){
$page = $filepath;
$page =~ s/html$/tt/;
# if (!exists($sesdata->{usersession})){
# $p->{page} = "login";
# }
-print $cgi->header(-status => $status, -type=>'text/html', -charset=>"utf-8",-cookie => $cookie);
+if ( -d dirname($ENV{"SCRIPT_FILENAME"}).'/tmpl/'.$page){
+ $page = $page.'/index.tt';
+}
my $template = Template->new({INCLUDE_PATH => [dirname($ENV{"SCRIPT_FILENAME"}).'/tmpl']});
my @lv = split(/\//,$filepath);
-my $absnum = scalar(@lv)-1;
+my $absnum = 0;
+if (scalar(@lv) > 1){
+ $absnum = scalar(@lv)-1;
+} else {
+ $absnum = scalar(@lv);
+}
+# my $absnum = scalar(@lv)-1;
my $vars->{abspath} = "";
for (my $i=0;$i<$absnum;$i++){
$vars->{abspath} .= "../";
$vars->{page} = $page;
$vars->{pagename} = basename($page);
$vars->{pagename} =~ s/\.tt$//;
+
my ($appname) = $ENV{REQUEST_URI} =~ /.*\/apps\/(\w+)\/.*/;
+
#$vars->{requri} = $ENV{REQUEST_URI};
if ($p->{sid} ne ""){
$vars->{appname} = $appname;
if ($skl ne "skeleton/login.tt" && $page ne "index.tt"){
$skl = "skeleton/app.tt";
}
+# if ((! -f dirname($ENV{"SCRIPT_FILENAME"}).'/tmpl/'.$page) && ($skl ne "skeleton/login.tt")){
+# $status = '404 Not Found';
+# $skl = "skeleton/error.tt";
+# }
+print $cgi->header(-status => $status, -type=>'text/html', -charset=>"utf-8",-cookie => $cookie);
# print Dumper($template);
$template->process($skl,$vars) || die "Template process failed: ", $template->error(), "\n";
-# my %headers = map { $_ => $cgi->http($_) } $cgi->http();
-# print "Got the following headers:\n";
-# for my $header ( keys %headers ) {
-# print "$header: $headers{$header}<br/>";
-# }
+# print '/*';
+# # for my $e ( keys %ENV ) {
+# # print "$e: ".$ENV{$e}."<br/>";
+# # }
+# print Dumper($vars);
+# print scalar(@lv);
+# print '*/';
-var https ='http';
function logout() {
- myurl = https + '://'+ location.host + '/apps/';
+ var myurl = location.href;
$.ajax({
async: false,
url: myurl,
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+ <meta http-equiv="Pragma" content="no-cache" />
+ <meta http-equiv="Expires" content="0" />
<link rel="icon" href="../img/favicon/creorga.png">
<title>Creorga </title>
<head>
<title>Organisation Personnel</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/datatables.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css">
<head>
<title>Congé</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!--<link href="../../../oldvendor/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">-->
<link href="../../../oldvendor/css/datatables.min.css" rel="stylesheet" type="text/css">
<html lang="fr">
<head>
<meta charset="utf-8">
-
+
<title>Organisation Enfants</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/datatables.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css">
function setcrechevacancydata(thead,hdays){
var vacdata = getstaffvacancy();
- var staffsql = "SELECT uuid,prename || ' ' || surname as fullname,color from staff where entrydate <= date('"+initdate.toISOString().substring(0,10)+"','+1 month','-1 day') and (exitdate is null or exitdate >= date('"+initdate.toISOString().substring(0,10)+"'));";
+ var staffsql = "SELECT uuid,prename || ' ' || surname as fullname,color from staff where inactive is null and entrydate <= date('"+initdate.toISOString().substring(0,10)+"','+1 month','-1 day') and (exitdate is null or exitdate >= date('"+initdate.toISOString().substring(0,10)+"'));";
var staffnames = parent.appdb.dbquery(staffsql);
staffnames = staffnames.sqldata;
"timefrom,timeto, type "+
"from vacancycalendar where (datefrom is null or datefrom <= '"+bend.toISOString().substring(0,10)+"') and (dateto is null or dateto >= '"+bdate.toISOString().substring(0,10)+"')) vc "+
"join ("+drsql+") dd "+
- "on (dd.daydate between vc.datefrom and vc.dateto) left join staff st on (st.uuid=vc.staffuuid); ";
+ "on (dd.daydate between vc.datefrom and vc.dateto) left join staff st on (st.uuid=vc.staffuuid and st.inactive is null); ";
var vacdata = parent.appdb.dbquery(vacsql);
vacdata = vacdata.sqldata;
<title>Détails - Enfant</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!--<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">-->
<title>Enfants</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/datatables.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css">
<title>Crèche</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!--<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">-->
<link href="../../../oldvendor/css/datatables.min.css" rel="stylesheet" type="text/css">
<title>Présences par jour</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<!--<link href="css/glyphicons-bootstrap.css" rel="stylesheet">-->
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/datatables.min.css" rel="stylesheet" type="text/css">
<title>Présences par semaine</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<!--<link href="css/glyphicons-bootstrap.css" rel="stylesheet">-->
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/datatables.min.css" rel="stylesheet" type="text/css">
<title>Employé(e)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../../../vendor/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
} else {
savesql = "UPDATE vacancycalendar SET vacyear=" + encodeparam(evsvdata.datefrom, 'year') + ", datefrom = date("+encodeparam(evsvdata.datefrom, 'date')+"), dateto = date("+encodeparam(evsvdata.dateto, 'date')+"), timefrom = "+encodeparam(evsvdata.timefrom, 'text')+", timeto = strftime(\"%H:%M\",time("+encodeparam(evsvdata.timefrom, 'text')+",'+"+evsvdata.hours+" hours')), description = "+encodeparam(evsvdata.description, 'text')+", staffuuid = "+encodeparam(evsvdata.staffuuid, 'text')+", type = "+evsvdata.type+" WHERE uuid = '"+evsvdata.uuid+"';";
}
-
+ // console.log("save vacancy");
+ // console.log(savesql);
parent.appdb.dbexec(savesql);
load_table_vacancy();
<title>StaffList</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
-
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+ <meta http-equiv="Pragma" content="no-cache" />
+ <meta http-equiv="Expires" content="0" />
<link href="../../../oldvendor/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/datatables.min.css" rel="stylesheet" type="text/css">
<link href="../../../oldvendor/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Own DKS Generator" />
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link rel="apple-touch-icon" sizes="57x57" href="img/favicon/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="img/favicon/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/favicon/apple-touch-icon-72x72.png">
--- /dev/null
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="generator" content="Own DKS Generator" />
+ <link rel="apple-touch-icon" sizes="57x57" href="[% abspath %]img/favicon/apple-touch-icon-57x57.png">
+ <link rel="apple-touch-icon" sizes="60x60" href="[% abspath %]img/favicon/apple-touch-icon-60x60.png">
+ <link rel="apple-touch-icon" sizes="72x72" href="[% abspath %]img/favicon/apple-touch-icon-72x72.png">
+ <link rel="apple-touch-icon" sizes="76x76" href="[% abspath %]img/favicon/apple-touch-icon-76x76.png">
+ <link rel="apple-touch-icon" sizes="114x114" href="[% abspath %]img/favicon/apple-touch-icon-114x114.png">
+ <link rel="apple-touch-icon" sizes="120x120" href="[% abspath %]img/favicon/apple-touch-icon-120x120.png">
+ <link rel="apple-touch-icon" sizes="144x144" href="[% abspath %]img/favicon/apple-touch-icon-144x144.png">
+ <link rel="apple-touch-icon" sizes="152x152" href="[% abspath %]img/favicon/apple-touch-icon-152x152.png">
+ <link rel="apple-touch-icon" sizes="180x180" href="[% abspath %]img/favicon/apple-touch-icon-180x180.png">
+ <link rel="icon" type="image/png" href="[% abspath %]img/favicon/favicon-32x32.png" sizes="32x32">
+ <link rel="icon" type="image/png" href="[% abspath %]img/favicon/android-chrome-192x192.png" sizes="192x192">
+ <link rel="icon" type="image/png" href="[% abspath %]imgfavicon/favicon-96x96.png" sizes="96x96">
+ <link rel="icon" type="image/png" href="[% abspath %]img/favicon/favicon-16x16.png" sizes="16x16">
+ <meta name="theme-color" content="#ffffff">
+ <link rel="stylesheet" href="[% abspath %]vendor/bootstrap/css/bootstrap.min.css" >
+ <link rel="stylesheet" href="[% abspath %]css/apps.css" >
+ <link rel="stylesheet" href="[% abspath %]vendor/fontawesome/css/all.min.css" >
+ <link rel="stylesheet" href="[% abspath %]css/shop.css" >
+ <!-- <link rel="stylesheet" href="css/site.css" > -->
+ <title>DKS - Apps</title>
+ </head>
+ <body>
+ <nav class="navbar fixed-top navbar-expand-lg navbar-light bg-topbar">
+ <a class="navbar-brand" href="index.html">
+ <img src="[% abspath %]img/dks_logo.png" alt="dks" style="height:40px; width: 92px;"/>
+ </a>
+ <div class="mr-auto" style="line-height: 14px;">
+ <span style="color: #fff; font-size: 16px;font-weight: bold; font-variant: small-caps;">Database<br/>Knowledge<br/>Solutions</span>
+ </div>
+ <div class="collapse navbar-collapse" id="navbarNavDropdown" style="padding-left: 50px;">
+
+
+ </div>
+ </nav>
+ <div class="container main">
+ <hr>
+ <br/>
+
+ <div class="container">
+ <h3 class="h3">ERROR</h3>
+ <div class="row">
+ <p class="lead">This Page does not exist!</p><br/>
+ <p class="lead">Diese Seite existiert nicht!</p><br/>
+ <p class="lead">Cette Page n'existe pas!</p><br/>
+ </div>
+
+
+
+ <hr>
+ </div>
+ <script src="[% abspath %]vendor/jquery/jquery.min.js"></script>
+ <script src="[% abspath %]vendor/bootstrap/js/bootstrap.bundle.min.js" ></script>
+ <script src="[% abspath %]js/apps.js"></script>
+</body>
+</html>
\ No newline at end of file
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Own DKS Generator" />
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
<link rel="apple-touch-icon" sizes="57x57" href="[% abspath %]img/favicon/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="[% abspath %]img/favicon/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="[% abspath %]img/favicon/apple-touch-icon-72x72.png">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>DKS - Apps - Login</title>
- <link rel="stylesheet" href="vendors/mdi/css/materialdesignicons.min.css">
- <link rel="stylesheet" href="vendors/base/vendor.bundle.base.css">
- <link rel="stylesheet" href="css/style.css">
- <link rel="shortcut icon" href="images/favicon.png" />
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Expires" content="0" />
+ <link rel="stylesheet" href="[% abspath %]vendors/mdi/css/materialdesignicons.min.css">
+ <link rel="stylesheet" href="[% abspath %]vendors/base/vendor.bundle.base.css">
+ <link rel="stylesheet" href="[% abspath %]css/style.css">
+ <link rel="shortcut icon" href="[% abspath %]images/favicon.png" />
</head>
<body>
<div class="col-lg-6 d-flex align-items-center justify-content-center">
<div class="auth-form-transparent text-left p-3">
<div class="brand-logo">
- <img src="images/toplogo.svg" style="width: 300px;" alt="logo">
+ <img src="[% abspath %]images/toplogo.svg" style="width: 300px;" alt="logo">
</div>
<h4>Bienvenue de retour!</h4>
<h6 class="font-weight-light">Nous sommes content de vous revoir!</h6>
</div>
<div class="register-half-bg col-lg-6 d-flex align-items-center justify-content-center">
<div class="brand-logo">
- <img src="images/logo.svg" style="width: 300px;" alt="logo">
+ <img src="[% abspath %]images/logo.svg" style="width: 300px;" alt="logo">
</div>
</div>
print $cgi->header(-status=>$status, -type=>'text/html', -charset=>"utf-8");
$template->process("skeleton/index.tt",$vars) || die "Template process failed X: ", $template->error(), "\n";
+# for my $e ( keys %ENV ) {
+# print "$e: ".$ENV{$e}."<br/>";
+# }