v20210112
authorKilian Saffran <ksaffran@dks.lu>
Tue, 12 Jan 2021 07:36:29 +0000 (08:36 +0100)
committerKilian Saffran <ksaffran@dks.lu>
Tue, 12 Jan 2021 07:36:29 +0000 (08:36 +0100)
47 files changed:
app/db.cgi
app/index.cgi
app/lib/POT/User.pm
app/lib/dksdb.pm
app/lib/session.pm
app/static/css/fonts/appicons.eot
app/static/css/fonts/appicons.svg
app/static/css/fonts/appicons.ttf
app/static/css/fonts/appicons.woff
app/static/css/icons.css
app/static/css/theme.css
app/tmpl/block/dlg_newpassword.tt [new file with mode: 0644]
app/tmpl/block/dlgperiodvalidation.tt
app/tmpl/file.tt
app/tmpl/index.tt
app/tmpl/lang/de.tt
app/tmpl/lang/fr.tt
app/tmpl/login.tt
app/tmpl/module/admin.tt
app/tmpl/module/admin/companies.js
app/tmpl/module/admin/sectors.js
app/tmpl/module/admin/users.js
app/tmpl/module/admin/worktimes.js
app/tmpl/module/company.tt
app/tmpl/module/company/company.js
app/tmpl/module/company/users.js
app/tmpl/module/index.tt
app/tmpl/module/index/index.js
app/tmpl/module/periods/reportperiod.js
app/tmpl/module/profile/profile.js [new file with mode: 0644]
app/tmpl/module/workplans.tt
app/tmpl/module/workplans/dlg_workplanday.tt
dev/apache/app.pot.conf [new file with mode: 0644]
dev/apache/plandutravail.lan.conf [new file with mode: 0644]
dev/db/tmp/schemas.csv [deleted file]
dev/db/tmp/update.brasserie_du_theatre.sql
dev/db/tmp/update.demo.sql
dev/db/tmp/update.demo50.sql [new file with mode: 0644]
dev/db/tmp/update.elch.sql
dev/db/tmp/update.etude_dbe.sql [new file with mode: 0644]
dev/db/tmp/update.portanova.sql
dev/db/tmp/update.public.sql
dev/db/update.live.sql
dev/diff_db.sh
dev/test.pl [new file with mode: 0644]
ipad/Import.log [new file with mode: 0644]
ipad/POT.fmp12 [new file with mode: 0644]

index dbc2b86..f277700 100644 (file)
@@ -217,6 +217,15 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
         #$mret = $eml->sendemail('user_forgotpasswd',$p->{email},$data);
       }
       $html->{result}->{data} = $data;
+  } elsif ($p->{fn} eq "genpwd"){
+      my $newpwd = $se->randomstring(12);
+      $html->{result}->{data}->{password} = $newpwd;
+  } elsif ($p->{fn} eq "savenewpwd"){
+      if (length($db->securetext($p->{pwd})) > 9){
+         my $pwd = sha256_hex($db->securetext($p->{pwd}));
+        $db->exec("UPDATE public.users SET userpassword = '".$pwd."' WHERE id='".$db->securetext($p->{iduser})."';");
+      }
+      $html->{result}->{data} = "OK";
   }
   elsif (exists($p->{save})){
     my $schema = "public";
@@ -342,7 +351,7 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
       if ($p->{fn} eq "del_worktimes"){
         $html->{result} = $wk->deleteWorktime($schema,$db->securetext($p->{id}));
       } 
-    } elsif ($p->{fn} =~ /del_user$|add_user$|useracceptedterms$|validatelogin$/) {
+    } elsif ($p->{fn} =~ /del_user$|add_user$|useracceptedterms$|validatelogin$|changelanguage$/) {
       # print STDERR $p->{fn}.": User\n";
       my $us = POT::User->new({db => $db});
       if ($p->{fn} eq "del_user"){
@@ -356,6 +365,9 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){
       } elsif($p->{fn} eq "validatelogin"){
         
         $html->{result} = $us->ValidateLogin($db->securetext($p->{username}),$sess->{id});
+      } elsif($p->{fn} eq "changelanguage"){
+        
+        $html->{result} = $us->ChangeLanguage($db->securetext($p->{lang}),$sess->{id});
       }
   
     } elsif ($p->{fn} =~ /savetrackdatasets$/){
index d59828b..472fa2a 100644 (file)
@@ -25,10 +25,10 @@ my $sess = ();
 my $se = session->new({db => $db});
 
 $vars->{ua} = $ENV{HTTP_USER_AGENT};
-if ($vars->{ua} !~ /^POT/){
-    print "Location: https://www.plandutravail.lu\n\n";
-    exit(0);
-}
+if (($vars->{ua} !~ /^POT/) || ($vars->{ua} !~ /iPad/)){
+     print "Location: https://www.plandutravail.lu\n\n";
+     exit(0);
+ }
 $vars->{realpath} = $cgi->url({-absolute=>1});
 $vars->{filepath} = substr($cgi->url({-absolute=>1}),length($vars->{basepath})+1); 
 $vars->{baseurl} = $cgi->url({-base=>1}).'/'.$vars->{basepath};
@@ -48,6 +48,7 @@ $vars->{abspath} = "";
 
 
 $p->{sid} = $cgi->cookie($vars->{cookiename});
+print STDERR "cookie: ".$vars->{cookiename}." : ".$p->{sid}."\n--\n";
 if ($cgi->request_method() eq "GET"){
   my @params = $cgi->param();
   foreach my $pp (@params){
@@ -94,6 +95,7 @@ if (($cgi->request_method() eq "POST") || ($cgi->request_method() eq "GET")){
 }
 if ($p->{sid} ne ""){
   $sess = $se->getsession($p->{sid});
+  print STDERR "after sessioncheck:".Dumper($sess);
   if ($sess == undef){
     $p->{sid} = "";
     $skl = "login.tt";
@@ -130,7 +132,10 @@ $vars->{pagename} = basename($vars->{page});
 $vars->{pagename} =~ s/\.tt$//;
 
 $vars->{params}= $p;
-$vars->{lang} = 'fr';
+if ($sess->{lang} eq ""){
+  $sess->{lang} = "fr";
+}
+$vars->{lang} = $sess->{lang};
 
 $vars->{skl} = $skl;
 
@@ -139,8 +144,8 @@ $vars->{remote_addr} = $ENV{REMOTE_ADDR};
 my $template = Template->new({INCLUDE_PATH => [$sitecfg->{tmplpath}]});
 $template->process($skl,$vars) || die "Template process failed: ", $template->error(), "\n";
 $db->disconnect();
-if ($vars->{page} =~ /\.tt/){
-#     print '<pre style="display: none;" >'.Dumper($vars)."<pre>";
-# } 
+if ($vars->{page} =~ /\.tt/){
+     print '<pre style="display: none;" >'.Dumper($vars)."<pre>";
+ } 
 
 
index 07ee0f2..3a6662e 100644 (file)
@@ -102,4 +102,14 @@ sub ValidateLogin(){
   return $self->{db}->query($sql);
 }
 
+sub ChangeLanguage(){
+  my $self = shift;
+  my $lang = shift;
+  my $iduser = shift;
+  my $sql = "UPDATE public.users set lang='".$lang."' WHERE id='".$iduser."';";
+  $self->{db}->exec($sql);
+  return 1;
+
+}
+
 1;
\ No newline at end of file
index 3ca21b2..0d40d53 100644 (file)
@@ -20,7 +20,7 @@ sub new {
     my $class = shift;
     my $p = shift;
     my $self = bless {}, $class;
-    $self->{debug} = 0;
+    $self->{debug} = 1;
     $self->{dbh} = DBI->connect($p->{dsn},$p->{dbuser},$p->{dbpassword},{PrintError=>1,RaiseError=>1,AutoCommit=>1})  or return "query Connection Error!".$!;
     return $self;
 }
index f2587f3..74d63bb 100644 (file)
@@ -206,11 +206,12 @@ sub passwordforgotten(){
 sub getsession($){
   my $self = shift;
   my $sid = shift;
-  my $sql = "select se.id as idsession,us.id,us.username,ugrp.id as usergroup,us.id_staffgroups as staffgroups,se.sessiondata from sessions se 
+  my $sql = "select se.id as idsession,us.lang,us.id,us.username,ugrp.id as usergroup,us.id_staffgroups as staffgroups,se.sessiondata from sessions se 
 join users us on (us.id=se.id_user)
 left join usergroups ugrp on (ugrp.id=us.id_usergroup)
-where se.id= '".$self->{db}->securetext($sid)."' and se.remote_addr= '".$ENV{REMOTE_ADDR}."' and se.user_agent LIKE 'POT/%/%/%' and 
+where se.id= '".$self->{db}->securetext($sid)."' and se.remote_addr= '".$ENV{REMOTE_ADDR}."' and 
 us.isblocked is null group by se.id,us.id,ugrp.id;";
+ #and se.user_agent LIKE 'POT/%/%/%'
   my $res= $self->{db}->querysorted($sql);
   #print STDERR "AFTER  REQ:\n".$sql."\n";
   #print STDERR "SESSIONDATA: ".Dumper($res)."\n";
@@ -246,11 +247,26 @@ sub deletesession(){
 sub randomstring(){
        my $self = shift;
   my $num = shift;
-       my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9);
-       my $randstring = join '', map $alphanumeric[rand @alphanumeric], 0..$num;
+  my $randstring = $self->randstr($num);
+  #print STDERR "RandPWD:\n".$randstring."\n===\n";
+  my $cnt = 0;
+       while (($randstring !~ /[A-Z]+/) || ($randstring !~ /[a-z]+/) || ($randstring !~ /[0-9]+/)){
+    $randstring = $self->randstr($num);
+    $cnt++;
+    if ($cnt > 20){last;}
+    #print STDERR "RandPWD:\n".$randstring."\n===\n";
+  } 
        return $randstring;
 }
 
+sub randstr(){
+  my $self = shift;
+  my $num = shift;
+  my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9);
+       my $randstring = join '', map $alphanumeric[rand @alphanumeric], 0..$num;
+  return $randstring;
+}
+
 
 # sub deleteprofile(){
 #   my $self = shift;
index 86f1ead..87cbfb4 100644 (file)
Binary files a/app/static/css/fonts/appicons.eot and b/app/static/css/fonts/appicons.eot differ
index a14e422..7417680 100644 (file)
@@ -67,6 +67,8 @@
 <glyph unicode="&#xe939;" glyph-name="pdfexport" d="M186.878 198.357c-61.858-18.302-107.102-64.709-122.827-82.566 0.191 3.469-6.445-7.624-6.445-7.624s2.548 3.151 6.445 7.624c-0.066-1.354-1.068-4.711-4.028-12.017-10.629-26.259 22.267-25.589 22.267-25.589 93.244 14.117 104.589 120.172 104.589 120.172zM721.065 287.733c-17.328 0.001-28.016-1.035-28.016-1.035 99.242-80.847 191.531-62.003 191.531-62.003 37.782 4.708-19.861 37.254-19.861 37.254-53.296 21.995-110.573 25.78-143.653 25.783zM381.96 506.055c0 0-35.839-173.585-80.605-225.069l248.329 36.937c0 0-123.752 110.91-167.724 188.132zM845.111 705.497c4.827 0.315 10.331-1.799 16.15-6.633l38.243-31.943c18.558-15.55 48.954-40.949 67.525-56.433l38.272-31.99c18.607-15.533 18.321-40.666-0.508-55.8l-38.832-31.256c-18.859-15.249-49.683-40.059-68.539-55.228l-38.835-31.239c-18.822-15.249-34.021-2.515-33.753 28.201l0.526 59.012h-225.156c-15.85 0-28.705 12.878-28.705 28.729v62.246c0 15.834 12.855 28.694 28.705 28.694h226.241l0.506 59.362c0.198 21.13 7.54 33.585 18.16 34.279zM386.788 826.673c-2.777-0.341-5.637-3.384-8.408-10.615 0 0-13.398-64.091 20.135-170.59 0 0 28.535 84.507 7.050 149.183 0 0-8.859 33.241-18.777 32.022zM356.447 896.795c26.43 1.014 50.261-49.878 50.261-49.878 74.083-158.383 4.029-259.586 4.029-259.586 73.367-173.011 220.388-265.396 220.388-265.396 142.849 7.671 247.075-28.422 247.075-28.422 81.976-43.129 54.534-83.444 54.534-83.444-85.921-95.871-338.276 53.635-338.276 53.635l-325.281-54.828c-46.998-160.866-204.075-198.666-204.075-198.666-74.88-10.915-64.627 67.21-64.627 67.21 58.439 128.623 205.395 158.211 205.395 158.211 57.879 61.876 152.495 352.67 152.495 352.67-95.602 214.882-28.427 286.37-28.427 286.37 8.602 15.68 17.701 21.786 26.511 22.124z" />
 <glyph unicode="&#xe93a;" glyph-name="pictures" d="M490.078 477.525c115.421-29.010 218.49-140.465 249.026-175.898v112.194h74.003v-130.009h48.004v-60.007h-440.037v60.007h69.004zM146.397 671.379l-74.038-7.249 70.472-612.97 63.542 6.188zM778.103 777.091c45.819 0 83.007-37.202 83.007-83.032 0-45.824-37.188-83.026-83.007-83.026-45.814 0-83.003 37.202-83.003 83.026 0 45.83 37.188 83.032 83.003 83.032zM270.261 791.335l-68.169-6.625 68.169-698.111v596.849h-0.031c0 25.314 0 47.128 0 64.443h0.031zM336.703 851.095v-725.174h621.029v725.174h-71.381zM270.261 915.353h753.883v-853.631h-102.797l-708.662-69.13-0.089 0.931-129.677-12.684-82.919 740.739 140.175 13.684-10.439 106.832 140.525 13.751z" />
 <glyph unicode="&#xe93b;" glyph-name="plus" d="M388.095 960h247.889v-388.114h388.095v-247.869h-388.095v-388.075h-247.889v388.075h-388.095v247.869h388.095z" />
+<glyph unicode="&#xe93c;" glyph-name="eye-close" d="M614.831 504.313c6.385-14.123 10.082-29.628 10.082-46.128 0-62.324-50.504-112.825-112.818-112.825-7.969 0-15.65 0.874-23.092 2.376zM745.537 666.866c165.275-81.694 278.607-218.658 278.607-218.658s-229.284-278.172-512.082-278.172c-51 0-100.138 9.246-146.581 24.066l56.195 69.951c29.509-6.692 59.571-11.505 90.387-11.505 170.715 0 326.302 116.52 412.192 195.659-53.821 49.567-134.959 113.773-230.042 154.843zM512.103 726.395c22.377 0 44.327-2.246 65.955-5.5l-62.206-77.327c-174.47 0.316-330.062-116.213-415.954-195.348 40.447-37.258 96.649-82.512 162.278-120.273l-49.504-61.511c-128.656 80.387-212.673 181.784-212.673 181.784s229.299 278.176 512.103 278.176zM785.931 904.071l54.439-43.756-697.885-868.147-54.392 43.688z" />
+<glyph unicode="&#xe93d;" glyph-name="eye-open" d="M512.119 570.851c62.328 0 112.843-50.513 112.843-112.842 0-62.333-50.515-112.842-112.843-112.842s-112.843 50.508-112.843 112.842c0 62.329 50.515 112.842 112.843 112.842zM512.072 643.694c-170.705 0-326.292-116.534-412.173-195.668 85.882-79.144 241.468-195.654 412.173-195.654 170.708 0 326.292 116.51 412.173 195.654-85.882 79.134-241.465 195.668-412.173 195.668zM512.072 726.203c282.799 0 512.072-278.177 512.072-278.177s-229.273-278.182-512.072-278.182c-282.799 0-512.072 278.182-512.072 278.182s229.273 278.177 512.072 278.177z" />
 <glyph unicode="&#xe943;" glyph-name="staff" d="M852.529 206.541c-40.953 0.285-74.344-32.751-74.586-73.619-0.285-41.010 32.708-74.331 73.589-74.616 40.981-0.285 74.373 32.609 74.629 73.619 0.256 40.868-32.708 74.331-73.632 74.616zM853.184 311.346c15.493 0 30.472-2.421 44.755-6.123l5.909-39.159c14.453-5.696 27.795-13.385 39.529-23.068l37.065 13.955c20.847-21.502 36.211-48.13 44.213-77.891l-31.042-24.777c1.153-7.405 1.908-15.094 1.837-22.784-0.086-7.832-0.897-15.379-2.136-22.784l30.743-25.204c-8.415-29.619-24.122-56.105-45.224-77.322l-36.866 14.525c-11.876-9.541-25.332-17.088-39.813-22.641l-6.436-39.017c-14.353-3.702-29.333-5.696-44.812-5.696-15.521 0.142-30.472 2.421-44.811 6.265l-5.852 39.159c-14.439 5.554-27.824 13.385-39.557 23.068l-37.065-13.955c-20.818 21.36-36.211 48.13-44.242 77.891l31.070 24.635c-1.139 7.547-1.88 15.094-1.837 22.926 0.085 7.689 0.897 15.379 2.136 22.784l-30.743 25.062c8.387 29.761 24.122 56.105 45.21 77.464l36.909-14.525c11.847 9.541 25.318 17.088 39.828 22.499l6.365 39.159c14.382 3.56 29.362 5.696 44.868 5.553zM409.028 371.574l49.657-49.694-38.586-38.587 39.825-46.143-52.696-157.924-54.289 156.107 44.44 48.528-38.046 38.019zM618.515 376.928c38.144-7.169 73.391-22.554 103.826-44.248l0.426-0.317-2.897-1.86c-63.883-43.209-105.968-116.325-105.968-199.009 0-41.386 10.521-80.353 29.028-114.37l0.909-1.579h-643.838v102.668c0 127.586 90.779 233.999 211.264 258.14l194.355-304.663zM344.453 820.627c-25.958 0.065-58.686-6.617-62.522-39.908 0 0 0-64.687-17.265-73.32l-4.285-60.371-17.266 17.252 6.459-81.938 32.358-2.176c0 0 8.634-166.017 166.052-133.689 0 0 75.464 23.726 92.699 133.689l25.901 2.176 6.459 73.32-10.776-2.173c0 0-6.491 62.544-12.949 88.412l-4.317 62.531c0 0-36.645 30.199-90.556 4.316 0 0-62.546 2.173-77.637 8.633 0 0-14.592 3.203-32.352 3.248zM418.251 942.627c73.513 0.006 124.602-38.985 124.602-38.985 94.873-75.478 43.136-204.866 43.136-204.866 21.551-12.933 19.41-23.709 19.41-23.709 0-140.181-38.819-129.388-38.819-129.388-21.583-90.57-105.648-131.53-105.648-131.53-163.908-40.977-204.867 129.371-204.867 129.371-34.503 4.316-38.819 84.095-38.819 84.095-10.809 53.91 19.409 75.477 19.409 75.477-64.718 150.938 51.737 196.216 51.737 196.216 46.692 32.612 91.352 43.315 129.859 43.318z" />
 <glyph unicode="&#xe944;" glyph-name="back" d="M580.895 960h273.723l-413.813-509.791 2.338-2.896 415.046-511.313h-273.736l-280.542 345.584-1.234-1.48-136.868 168.605 136.868 168.646z" />
 <glyph unicode="&#xe945;" glyph-name="next" d="M165.81 960h273.728l280.547-345.583 1.234 1.48 136.87-168.604-415.080-511.292h-273.741l413.82 509.792-2.338 2.896-99.387 122.396z" />
index 0ea5112..24639cb 100644 (file)
Binary files a/app/static/css/fonts/appicons.ttf and b/app/static/css/fonts/appicons.ttf differ
index 499eabc..011a32b 100644 (file)
Binary files a/app/static/css/fonts/appicons.woff and b/app/static/css/fonts/appicons.woff differ
index a774857..feca1eb 100644 (file)
@@ -1,10 +1,10 @@
 @font-face {
   font-family: 'appicons';
-  src:  url('fonts/appicons.eot?6tri61');
-  src:  url('fonts/appicons.eot?6tri61#iefix') format('embedded-opentype'),
-    url('fonts/appicons.ttf?6tri61') format('truetype'),
-    url('fonts/appicons.woff?6tri61') format('woff'),
-    url('fonts/appicons.svg?6tri61#appicons') format('svg');
+  src:  url('fonts/appicons.eot?clkm3g');
+  src:  url('fonts/appicons.eot?clkm3g#iefix') format('embedded-opentype'),
+    url('fonts/appicons.ttf?clkm3g') format('truetype'),
+    url('fonts/appicons.woff?clkm3g') format('woff'),
+    url('fonts/appicons.svg?clkm3g#appicons') format('svg');
   font-weight: normal;
   font-style: normal;
   font-display: block;
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-eye-close:before {
+  content: "\e93c";
+}
+.icon-eye-open:before {
+  content: "\e93d";
+}
 .icon-house:before {
   content: "\e900";
 }
index 7d36c92..08ba912 100644 (file)
@@ -271,6 +271,13 @@ hr{border:0;border-top:1px solid #eee;margin:20px 0}
   background-color: #f89774;
 }
 
+.info-panel2 {
+  padding: 3px;
+  color: #000;
+  border: 1px solid #025788;
+  background-color: #a6dbfa;
+}
+
 .error-panel {
        padding: 3px;
   color: #ff0000;
diff --git a/app/tmpl/block/dlg_newpassword.tt b/app/tmpl/block/dlg_newpassword.tt
new file mode 100644 (file)
index 0000000..38bfc3a
--- /dev/null
@@ -0,0 +1,37 @@
+<div id="dlg_newpassword" class="modal">
+  <div class="modal-content animate-top card-4">
+    <header> 
+      <span onclick="document.getElementById('dlg_newpassword').style.display='none'; return false;" 
+       class="button toolbarbtn display-topright" ><span class="icon icon-remove" style="font-size: 18px;"></span></span>
+      <h2>[% lbl.newpassword %]</h2>
+    </header>
+    <div class="container">
+      <div id="newpasswordmsg">
+        <div class="info-panel2">[% lbl.pwdcondition %]</div>
+      </div>
+      <form id="frm_newpassword">
+        <div class="row" style="margin-top: 5px;">
+          <div class="container">
+            <label for="newpwd1" class="label">[% lbl.password %]</label>
+            <div class="cell">
+            <input type="password" class="input  data_newpassword  " id="newpwd1" data-column="newpwd1" style="width: 250px;display: inline-block;"  data-table="newpassword" data-id=""  value=""   />
+            <button class="button actionbtn  text-white" id="btn_newpwd1" onclick="profile.viewpwd('newpwd1');return false;"><span class="icon icon-eye-open" style="font-size: 16pt;"></span></button>
+          </div>
+          </div>
+          <div class="container">
+            <label for="newpwd2" class="label">[% lbl.retypepwd %]</label>
+            <div class="cell">
+            <input type="password" class="input  data_newpassword " id="newpwd2" data-column="newpwd2" style="width: 250px; display: inline-block;" data-table="newpassword" data-id="" value=""/>
+            <button class="button actionbtn text-white" id="btn_newpwd2" onclick="profile.viewpwd('newpwd2');return false;"><span class="icon icon-eye-open" style="font-size: 16pt;"></span></button>
+          </div>
+          </div>
+        </div>
+      </form>
+    </div>
+  <footer>
+        <button class="button theme-light border" onclick="document.getElementById('dlg_newpassword').style.display='none'; return false;"><span class="icon icon-remove"></span>[% lbl.cancel %]</button>
+        <button class="button actionbtn margin" onclick="profile.generatenewpassword();"><span class="icon icon-Save"></span>[% lbl.genpwd %]</button>
+        <button class="button actionbtn margin" onclick="profile.savepwd();"><span class="icon icon-Save"></span>[% lbl.save %]</button>
+   </footer>
+</div>
+</div>
\ No newline at end of file
index fa89b7a..c62bb0c 100644 (file)
@@ -65,8 +65,7 @@
             <div class="container cell">
               <div class="cell" style="width: 86px;">
                 <input class="data_staffreportperiod intervalfield readonly" id="payedhours0calc" name="staffreportperiod_payedhours0calc" placeholder="0:00" style="float: left;" type="text" value="">
-              </div><label class="label" for="staffreportperiod_payedhours0calc">[% lbl.  "transferhours" => "heures à reporter"
- %]</label>
+              </div><label class="label" for="staffreportperiod_payedhours0calc">[% lbl.transferhours %]</label>
             </div>
             </div>
           </div>
index 9aa2d40..87c20f7 100644 (file)
@@ -1 +1,2 @@
+[% PROCESS "lang/${lang}.tt" %]\r
 [% INCLUDE $page %]\r
index e360d18..cd18c85 100644 (file)
@@ -1,4 +1,4 @@
-[% appversion='1.0.26' %]
+[% appversion='1.0.28' %]
 [% minify = '' %]
 [% PROCESS "lang/${lang}.tt" %]
 <!DOCTYPE html>
index e69de29..9e6ef99 100644 (file)
@@ -0,0 +1,188 @@
+[% lbl = { 
+  "pot_long" => "Plan d'organisation du travail",
+  "weeklytemplates" => "Wochen-Vorlagen",
+  "template" => "Vorlagen",
+  "staff" => "Arbeitnehmer",
+  "sectorconfig" => "Konfiguration Sektor",
+  "sectorconfigpot" => "sektorielle Konfiguration POT",
+  "periodsconfig" => "Konfiguration Periode",
+  "sectorhoursconfig" => "sektorielle Stunden Konfiguration" ,
+  "back" => "zurück",
+  "delete" => "löschen",
+  "duplicate" => "dupl.",
+  "add" => "neu",
+  "rename" => "umbenennen",
+  "edit" => "bearb.",
+  "copy" => "kopiern",
+  "paste" => "einfügen",
+  "basedata" => "Stammdaten",
+  "periods" => "Perioden",
+  "refperiods" => "Referenz-Perioden",
+  "pdf" => "PDF",
+  "finalstatement" => "SchlussAbrechnung",
+  "finalstatementpot" => "POT Schluss<br/>Abrechnung",
+  "statement" => "Abrechnung",
+  "companyunit" => "Unternhemen / Standort",
+  "logout" => "Logout",
+  "modules" => "Module",
+  "staffcount" => "Arbeitnehmer Anz.",
+  "config" => "Konfiguration",
+  "company" => "Unternehmen",
+  "terms" => "AGB",
+  "administration" => "Administration",
+  "companies" => "Unternehmen",
+  "sectors" => "Sektoren",
+  "sector" => "Sektor",
+  "vacancydays" => "Feiertage",
+  "vacancytypes" => "Urlaubs-Bezeichnungen",
+  "vacancytype" => "Urlaubs-Bezeichnung",
+  "vacancy" => "Urlaub",
+  "recuperationtype" => "Art des Stunden-Ausgleichs",
+  "recuperation" => "Stunden-Ausgleich",
+  "hours" => "Stunden",
+  "infohours" => "Stunden-info",
+  "acceptterms" => "Ich habe die AGB gelesen und bin einverstanden",
+  "users" => "Benutzer",
+  "newpassword" => "neues Passwort",
+  "changelogin" => "Login ändern",
+  "editday" => "Tag bearbeiten",
+  "workhours" => "Arbeitsstunden",
+  "start" => "Anfang",
+  "startdate" => "Anfangs-Datum",
+  "enddate" => "End-Datum",
+  "end" => "Ende",
+  "total" => "Total",
+  "totalday" => "Total tag",
+  "pausehours" => "Pausen-Zeiten",
+  "totalpause" => "Total Pause",
+  "cancel" => "Abbrechen",
+  "save" => "Speichern",
+  "changetemplate" => "changer modèle",
+  "selecttemplate" => "Selection du modèle",
+  "commit" => "Validieren und Abschließen",
+  "pottemplate" => "POT (Vorlage)",
+  "name" => "Name",
+  "staffgroupname" => "Name der Abteilung",
+  "prename" => "Vorname",
+  "companytype" => "Rechtsform",
+  "companyunitname" => "Name der Firma / Geschäftsstelle",
+  "matricule" => "Matrikel-Nr.",
+  "birthdate" => "Geburtsdatum",
+  "job" => "Job / Position",
+  "department" => "Abteilung",
+  "departments" => "Abteilungen",
+  "departmentaccess" => "Abteilungen (Zugriff)",
+  "timetracker" => "Stechuhr",
+  "no" => "Nein",
+  "yes" => "Ja",
+  "address" => "Addresse",
+  "zip" => "PLZ",
+  "city" => "Ort",
+  "country" => "Land",
+  "phone" => "Telefon",
+  "email" => "E-Mail",
+  "contractdata" => "Vertrags-Daten",
+  "renewperiods" => "Perioden  aktualisieren",
+  "weekhours" => "Stunden / Woche",
+  "weekhours_short" => "h/Woche",
+  "minmaxvalues" => "Min/max Werte",
+  "maxdayhours" => "max h/Tag",
+  "maxweekhours" => "max h/Woche",
+  "maxcutoff" => "max Unterbrechung",
+  "maxtotal" => "max Total",
+  "mindailyfreehours" => "min Stunden Ruhezeit",
+  "mindailyouttime" => "min Stunden Ruhezeit",
+  "mindailyouttime2" => "min Stunden<br/>Ruhezeit",
+  "daytotal" => "Total Tag",
+  "weekdays" => "Tage / Woche",
+  "weekdays_short" => "t/Woche",
+  "addstaffmember" => "neuer Arbeitnehmer",
+  "timetracks" => "Zeitstempel",
+  "clean" => "leeren",
+  "cutoff" => "Unterbrechung",
+  "loginlink" => "EInlogggen",
+  "username" => "Login",
+  "password" => "Passwort",
+  "clientaccess" => "Kunden-Login",
+  "login" => "Einloggen",
+  "forgotpassword" => "Passwort vergessen",
+  "user" => "Benutzer",
+  "sendpassword" => "Passwort schicken",
+  "rcs" => "No. Handelsregister",
+  "vatnumber" => "Ust-Id International",
+  "dbschema" => "Datenbnak-Schema",
+  "duration" => "Dauer",
+  "unit" => "EInheit",
+  "payedpauses" => "bezahlte Pausen",
+  "pauses" => "Pausen",
+  "type" => "Typ",
+  "url" => "URL",
+  "lastsync" => "letzte Aktualisierung",
+  "accessblocked" => "Login blockieren",
+  "useraccess" => "Benutzer-Zugriff",
+  "datasetaccess" => "Datensatz-Zugriff",
+  "staffgroupaccess" => "Abteilungs-Zugriff",
+  "dataset" => "Datensatz",
+  "usernamechange" => "Login ändern",
+  "newusername" => "neuer Login",
+  "edittimetracks" => "Stechuhr bearbeiten",
+  "infoouttimes" => "Info Ruhezeiten davor/danach",
+  "freetimebefore" => "Ruhezeit davor",
+  "freetimeafter" => "Ruhezeit danach",
+  "statementbeforevalidation" => "Abrechnung vor Validierung",
+  "reopen" => "Freischalten",
+  "transferhours" => "zu übertragende Stunden",
+  "transferhours1_5" => "zu übertragende Stunden (x1,5)",
+  "weeklyavg" => "Wochen Durchschnitt",
+  "transferfreehours" => "zu übertragende Stunden<br/>Stunden-Ausgleich",
+  "plushourstopayplus40" => "Überstunden<br/>zu bezahlen mit +40%",
+  "hourstopayplus40" => "zu vergütenden Stunden (+40%)",
+  "hourstopayonly40" => "Überstunden<br/>zu beahlen (40%)",
+  "ok" => "OK",
+  "waitmsg" => "Bitte warten!",
+  "close" => "Schließen",
+  "keepvacancy" => "Urlaubs-Einstellungen behalten",
+  "keeprecuperation" => "Stundenausgleich-Einstellungen behalten",
+  "replace" => "austauschen",
+  "qdeletecompany" => "ausgewählte Firma wirklich löschen?",
+  "ddeletestaffgroup" => "ausgewählte Abteilung wirklich löschen?",
+  "qdeleteuser" => "ausgewählte Benutzer wirklich löschen?",
+  "qdeletehours" => "ausgewählte Stunden wirklich löschen?",
+  "qdeletestaff" => "ausgewählte Arbeitnehmer wirklich löschen?",
+  "qdeletedata" => "ausgewählte Daten  wirklich löschen?",
+  "qdeleteworkplan" => "ausgewählte Vorlage wirklich löschen?"
+  "allfieldsrequired" => "bitte alle Felder ausfüllen!",
+  "monday" => "Montag",
+  "tuesday" => "Dienstag",
+  "wednesday" => "Mittwoch",
+  "thursday" => "Donnerstag",
+  "friday" => "Freitag",
+  "saturday" => "Samstag",
+  "sunday" => "Sonntag",
+  "contract" => "Vertrag",
+  "work" => "Arbeit",
+  "contractrequired" => "Alle Felder sind erfordert (außer \"End-Datum\")!",
+  "recuperation_short" => "Ausgleich",
+  "vacancyill2" => "Krank",
+  "statementtransfered2" => "übertragene<br/>Abrechnung",
+  "supphourspayed2" => "bezahlte<br/>Überstunden",
+  "supp44h2" => "+Urlaub wg.<br/>+44 h",
+  "suppsunwork" => "+Urlaub wg.<br/>Sonntagsarbeit",
+  "avgweek_short" => "Wochen<br/>Durchschnitt",
+  "validated" => "validiert",
+  "diffcontract" => "Unterschied<br/>Vertrag",
+  "weekhours2" => "Arbeits-<br/>Stunden",
+  "worktotal2" => "Total<br/>Arbeit",
+  "standard" => "Standard",
+  "pausehours2" => "Pausen",
+  "totalpause2" => "Total<br/>PAuse",
+  "day" => "Tag",
+  "description" => "Beschreibung",
+  "msgdel_stdhours" => "Die Standard-Vorlage  kann nicht gelöscht werden!",
+  "newpassword" => "Neues Passwort",
+  "retypepwd" => "Neues Passwort wiederholen",
+  "pwdcondition" => "Passwörter müssen mindstens 10 Zeichen lang seien und mindestens 1 Grossbuchstabe, 1 Klein-Buchstabe und 1 Zahl enthalten",
+  "genpwd" => "Passwort vorschlagen",
+  "usergroup" => "Berechtigungen",
+  "language" => "Sprache"
+ } %]
\ No newline at end of file
index 33c5632..c20d16b 100644 (file)
@@ -1,4 +1,4 @@
-[% lang = { 
+[% lbl = { 
   "pot_long" => "Plan d'organisation du travail",
   "weeklytemplates" => "Modèles hebdomaires",
   "template" => "Modèle",
@@ -92,6 +92,7 @@
   "maxtotal" => "max total",
   "mindailyfreehours" => "min heures libre quotidienne",
   "mindailyouttime" => "min repos quotidien",
+  "mindailyouttime2" => "min h. libres<br/>quotidienne",
   "daytotal" => "Totaux Jour",
   "weekdays" => "jours / semaine",
   "weekdays_short" => "j/semaine",
   "pausehours2" => "heures de<br/>pause",
   "totalpause2" => "total<br/>pause",
   "day" => "jour",
+  "description" => "description",
+  "msgdel_stdhours" => "Le heures Standard ne peuvent pas être supprimés!"
+  "newpassword" => "Nouveau mot de passe",
+  "retypepwd" => "répéter mot de passe",
+  "pwdcondition" => "les mots de passes doivent contenir au moins 10 lettres , au moins une lettre majuscule, une lettre minuscule et un nombre",
+  "genpwd" => "Passwort vorschlagen",
+  "usergroup" => "Droits d'accès",
+  "language" => "Langue"
  } %]
\ No newline at end of file
index c0df1df..f945090 100644 (file)
@@ -1,8 +1,9 @@
 
 [% appversion = '0.9.9.6' %]
 [% minify = '' %]
+[% PROCESS "lang/${lang}.tt" %]
 <!DOCTYPE html>
-<html lang="fr">
+<html lang="[% lang %]">
 <head>
 
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
index b55537c..c04b8ee 100644 (file)
@@ -40,7 +40,7 @@
           <button class="bar-item toolbarbtn right" id="btn_delete_staffcontract" onclick="users.remove(); return false;"><span class="icon icon-remove text-red" style="font-size: 16px;"></span>[% lbl.delete %]</button> 
           <button class="bar-item toolbarbtn right" onclick="users.edit(); return false;"><span class="icon icon-edit" style="font-size: 16px;"></span>[% lbl.edit %]</button>
           <button class="bar-item toolbarbtn right" onclick="users.add(); return false;"><span class="icon icon-plus" style="font-size: 16px;"></span>[% lbl.add %]</button>
-          <button class="bar-item toolbarbtn right" id="btnnewpasswd" onclick="users.confirmchangepassword(); return false;"><span class="icon icon-access"></span>[% lbl.newpassword %]</button>
+          <button class="bar-item toolbarbtn right" id="btnchangepasswd" onclick="profile.showdlgnewpassword(true); return false;"><span class="icon icon-access"></span>[% lbl.newpassword %]</button>
           <button class="bar-item toolbarbtn right" id="btnnewpasswd" onclick="users.dlgchangelogin(); return false;"><span class="icon icon-user"></span>[% lbl.changelogin %]</button>
         </div>
         <div id="tbl_users"></div>
 [% INCLUDE module/admin/dlg_staffgroups.tt %] 
 [% INCLUDE module/admin/dlg_worktimes.tt %] 
 [% INCLUDE module/admin/dlg_users.tt %] 
+[% INCLUDE block/dlg_newpassword.tt %] 
 [% INCLUDE block/dlgusername.tt %] 
 <script type="text/javascript" src="admin/companies[% minify%].js?v=[% appversion %]"></script>
 <script type="text/javascript" src="admin/staffgroups[% minify%].js?v=[% appversion %]"></script> 
-<script type="text/javascript" src="admin/worktimes[% minify%].js?v=[% appversion %]"></script> 
 <script type="text/javascript" src="admin/users[% minify%].js?v=[% appversion %]"></script> 
 <script type="text/javascript" src="admin/schemadataset[% minify%].js?v=[% appversion %]"></script>
+<script type="text/javascript" src="profile/profile[% minify%].js?v=[% appversion %]"></script>
+<!--<script type="text/javascript" src="admin/worktimes[% minify%].js?v=x[% appversion %]"></script> -->
 [% END %]
index 4640be6..7cebe79 100644 (file)
@@ -7,9 +7,10 @@ let periodtypes = [{"value":"","text":"pas défini"},{"value":"1-14","text":"1-1
 function initpage(){
   companies.inittable();
   staffgroups.inittable();
-  worktimes.inittable();
+  //worktimes.inittable();
   users.inittable();
   schemadataset.initform();
+  profile.reftbl = users.tbl;
 }
 
 let companies ={
@@ -92,7 +93,7 @@ let companies ={
       postData("db.cgi",{ "get": "company", "schemata":udata[0].schemata}).then(data => {
         dataform.fillformbydataclass2("companies",companies.choices,data.result.data);});
       staffgroups.gettbldata();
-      worktimes.gettbldata();
+      //worktimes.gettbldata();
       users.gettbldata();
       companies.setview(companies.current_view);
     } else {
index b44fa18..1e85371 100644 (file)
@@ -20,18 +20,18 @@ let sector ={
       selectable: 1,
       rowContext:function(e, row){ e.preventDefault(); },
       columns: [
-        { title: "secteur",  field: "sector",headerFilter:"input",headerSort: true},
+        { title: "[% lbl.sector %]",  field: "sector",headerFilter:"input",headerSort: true},
         { title: "[% lbl.staffcount %]",  field: "periodtype",headerFilter:"input",headerSort: true},
         { title: "[% lbl.start %]",  field: "startdate",headerFilter:"input",headerSort: true,sorter:"date", sorterParams:{format:"YYYY-MM-DD",alignEmptyValues:"bottom"},formatter:"datetime",formatterParams:{inputFormat:"YYYY-MM-DD",outputFormat:"DD.MM.YYYY",invalidPlaceholder:""}},
         { title: "[% lbl.end %]",  field: "enddate",headerFilter:"input",headerSort: true,sorter:"date", sorterParams:{format:"YYYY-MM-DD",alignEmptyValues:"bottom"},formatter:"datetime",formatterParams:{inputFormat:"YYYY-MM-DD",outputFormat:"DD.MM.YYYY",invalidPlaceholder:""}},
-        { title: "max heures/jour",  field: "maxdayhours",headerSort: false,formatter:timeFormatter},
-        { title: "H/Sem.",  field: "defaultweekhours",headerSort: false,formatter:timeFormatter},
-        { title: "max heures/semaine",  field: "maxweekhours",headerSort: false,formatter:timeFormatter},
-        { title: "max coupure",  field: "maxinterruptionhours",headerSort: false,formatter:timeFormatter},
-        { title: "min h. libres<br/>quotidienne", field: "mindailyrecuperation",headerSort: false,formatter:timeFormatter},
+        { title: "[% lbl.maxdayhours %]",  field: "maxdayhours",headerSort: false,formatter:timeFormatter},
+        { title: "[% lbl.weekhours_short %]",  field: "defaultweekhours",headerSort: false,formatter:timeFormatter},
+        { title: "[% lbl.maxweekhours %]",  field: "maxweekhours",headerSort: false,formatter:timeFormatter},
+        { title: "[% lbl.cutoff %]",  field: "maxinterruptionhours",headerSort: false,formatter:timeFormatter},
+        { title: "[% lbl.mindailyouttime2 %]", field: "mindailyrecuperation",headerSort: false,formatter:timeFormatter},
         { title: "[% lbl.standard %]",  field: "isdefault",headerSort: false,formatter:"tickCross",hozAlign:"center",  
         formatterParams:{allowEmpty:true,allowTruthy:true,tickElement:'<span>&#10004;</span>'}},
-        { title: "Description", field:"description" ,headerSort: false},
+        { title: "[% lbl.description %]", field:"description" ,headerSort: false},
       ]
   });
     sector.gettbldata();
index e651880..b4af9b3 100644 (file)
@@ -38,9 +38,10 @@ let users ={
     columns:[
     {title:"[% lbl.name %]", field:"surname"},
     {title:"[% lbl.prename %]", field:"prename"},
-    {title:"Login", field:"username"},
-    {title:"Accès", field:"groupname"},
+    {title:"[% lbl.username %]", field:"username"},
+    {title:"[% lbl.usergroup %]", field:"groupname"},
     {title:"[% lbl.departmentaccess %]",field:"staffgroups"},
+    {title:"[% lbl.language %]",field:"language"},
     {title:"Bloqué", field:"isblocked",formatter:"tickCross",hozAlign:"center", 
      formatterParams:{allowEmpty:true,allowTruthy:true,tickElement:'<span style="color: red;">&#10004;</span>'}},
     ],
@@ -59,7 +60,7 @@ let users ={
   add: function(){
     document.getElementById("username").disabled = false;
     document.getElementById("username").classList.remove("readonly");
-    users.tbl.selectRow();
+    //users.tbl.selectRow();
     let udata = users.tbl.getSelectedData();
     if (udata[0]){
       users.tbl.deselectRow(udata[0]["id"]);
@@ -123,30 +124,6 @@ let users ={
     users.checkemail();
     return false; 
   },
-  confirmchangepassword: function(){
-    /* @preserve [% IF session.usergroup == 'admin' %]*/ 
-    let sel =users.tbl.getSelectedData();
-    if (sel[0]){
-      showinfodlg(">[% lbl.newpassword %]","Êtes vous sûre changer le [% lbl.password %]?",users.setnewpassword,{},"<span class=\"icon-Save\"></span>[% lbl.yes %]","<span class=\"icon-remove\"></span>[% lbl.no %]");
-    }
-    /* @preserve [% END %]*/
-  },  
-  setnewpassword: function(){
-    /* @preserve [% IF session.usergroup == 'admin' %]*/ 
-    let sel =users.tbl.getSelectedData();
-    if (sel[0]){
-    let fndata = {"fn":"setnewpassword","email":sel[0].username};
-    postData("db.cgi",fndata).then(data => {
-      document.getElementById('dlg_users').style.display='none';
-      if (data && data.result.data.password){
-        showmessagedlg(">[% lbl.newpassword %]!",'<div class="container"><input class="input" type="text" value="'+data.result.data.username+'" readonly> <label class="label" for="staffgroups_groupname">Utilisateur</label></div><div class="container"><input class="input" type="text" value="'+data.result.data.password+'" readonly> <label class="label" for="staffgroups_groupname">[% lbl.newpassword %]</label></div>');
-      }else {
-        showmessagedlg("Erreur!","Une erreur c'est produite pour l'envoie d'un >[% lbl.newpassword %]!");
-      }
-    });
-    }
-    /* @preserve [% END %]*/
-  },
   validatenewlogin: function(){
     let newusername = document.getElementById("newuseremail").value;
     if (users.validateEmail(newusername)){
@@ -165,6 +142,7 @@ let users ={
        document.getElementById("nunmsg").innerHTML= '<div class="panel red">inserez un email valide s.v.p.!</div>';
     }
   },
+  
   dlgchangelogin: function(){
     /* @preserve[% IF session.usergroup == 'admin' %]*/
     let sel = users.tbl.getSelectedData();
@@ -243,10 +221,15 @@ let users ={
     let udata = users.tbl.getSelectedData();
     if (udata[0]){
       flds["ident_users_id"] = udata[0]["id"];
+      delete flds["users_id"];
+      delete flds["null"]; 
+      delete flds["ident_users_id_users"];
+    } else {
+      flds["user_id"] = null;
+      delete flds["null"]; 
+      delete flds["ident_users_id_users"];
     }
-    delete flds["users_id"];
-    delete flds["null"]; 
-    delete flds["ident_users_id_users"];
+    
     console.log("userdata",flds);
     postData("db.cgi",flds).then(data2 => {
       console.log("data returned",data2);
index 58d5102..43b4ec5 100644 (file)
@@ -23,11 +23,11 @@ let worktimes = {
       columns: [
         { title: "[% lbl.start %]",  field: "startdate",headerSort: true,formatter:"datetime",formatterParams:{inputFormat:"YYYY-MM-DD",outputFormat:"DD.MM.YYYY",invalidPlaceholder:""}},
         { title: "[% lbl.end %]",  field: "enddate",headerSort: true,formatter:"datetime",formatterParams:{inputFormat:"YYYY-MM-DD",outputFormat:"DD.MM.YYYY",invalidPlaceholder:""}},
-        { title: "max heures/jour",  field: "maxdayhours",headerSort: false},
-        { title: "H/Sem.",  field: "defaultweekhours",headerSort: false},
-        { title: "max heures/semaine",  field: "maxweekhours",headerSort: false},
-        { title: "max coupure",  field: "maxinterruptionhours",headerSort: false},
-        { title: "min h. libres<br/>quotidienne", field: "mindailyrecuperation",headerSort: false},
+        { title: "[% lbl.maxdayhours %]",  field: "maxdayhours",headerSort: false},
+        { title: "[% lbl.weekhours_short %]",  field: "defaultweekhours",headerSort: false},
+        { title: "[% lbl.maxweekhours %]",  field: "maxweekhours",headerSort: false},
+        { title: "[% lbl.maxcutoff %]",  field: "maxinterruptionhours",headerSort: false},
+        { title: "[% lbl.mindailyouttime2 %]", field: "mindailyrecuperation",headerSort: false},
         { title: "[% lbl.standard %]",  field: "isdefault",headerSort: false,formatter:"tickCross",hozAlign:"center",  
         formatterParams:{allowEmpty:true,allowTruthy:true,tickElement:'<span>&#10004;</span>'}}
       ]
@@ -65,7 +65,7 @@ let worktimes = {
   remove: function(){
     let udata = worktimes.tbl.getSelectedData();
     if (udata[0].isdefault){
-      showmessagedlg("Info","Le heures Standard ne peuvent pas être supprimés!");
+      showmessagedlg("Info","[% lbl.msgdel_stdhours %]");
       return false;
     }
     if (udata[0]) {
index 16c7f36..ee2bce8 100644 (file)
@@ -14,7 +14,7 @@
         <div class="bar moduletoolbar">
           <div class="bar-item SubHeadTitle">[% lbl.users %]</div>
           [% IF session.usergroup != 'teamleader' %]
-          <button class="bar-item toolbarbtn right" id="btnnewpasswd" onclick="users.confirmchangepassword(); return false;"><span class="icon icon-access"></span>[% lbl.newpassword %]</button>
+          <button class="bar-item toolbarbtn right" id="btnnewpasswd" onclick="profile.showdlgnewpassword(true); return false;"><span class="icon icon-access"></span>[% lbl.newpassword %]</button>
           [% END %]
           
         </div>
@@ -25,7 +25,8 @@
 </div>
 [% #INCLUDE module/company/dlg_staffgroups.tt %] 
 
-[% #INCLUDE module/company/dlg_users.tt %] 
+[% INCLUDE block/dlg_newpassword.tt %] 
 <script type="text/javascript" src="company/company[% minify%].js?v=[% appversion %]"></script>
 <script type="text/javascript" src="company/staffgroups[% minify%].js?v=[% appversion %]"></script>
 <script type="text/javascript" src="company/users[% minify%].js?v=[% appversion %]"></script> 
+<script type="text/javascript" src="profile/profile[% minify%].js?v=[% appversion %]"></script>
index 9f17d1c..0a08775 100644 (file)
@@ -8,6 +8,7 @@ function initpage(){
   staffgroups.inittable();
   users.inittable();
   company.edit();
+  profile.reftbl = users.tbl;
 }
 
 let company = {
index c1fd105..bc21276 100644 (file)
@@ -32,28 +32,28 @@ let users ={
       users.tbl.setData(data.result.sqldata);
     });
   },
-  confirmchangepassword: function(){
-    /* @preserve[% IF session.usergroup == 'admin' ||  session.usergroup == 'manager' %]*/
-    let sel =users.tbl.getSelectedData();
-    if (sel[0]){
-      showinfodlg(">[% lbl.newpassword %]","Êtes vous sûre changer le [% lbl.password %]?",users.setnewpassword,{},"<span class=\"icon-Save\"></span>[% lbl.yes %]","<span class=\"icon-remove\"></span>[% lbl.no %]");
-    }
-    /* @preserve[% END %]*/
-  }, 
-  setnewpassword: function(){
-    /* @preserve[% IF session.usergroup == 'admin' ||  session.usergroup == 'manager' %]*/
-    let sel =users.tbl.getSelectedData();
-    if (sel[0]){
-    let fndata = {"fn":"setnewpassword","email":sel[0].username};
-    postData("db.cgi",fndata).then(data => {
-      document.getElementById('dlg_users').style.display='none';
-      if (data && data.result.data.password){
-        showmessagedlg(">[% lbl.newpassword %]!",'<div class="container"><input class="input" type="text" value="'+data.result.data.username+'" readonly> <label class="label" for="staffgroups_groupname">Utilisateur</label></div><div class="container"><input class="input" type="text" value="'+data.result.data.password+'" readonly> <label class="label" for="staffgroups_groupname">[% lbl.newpassword %]</label></div>');
-      }else {
-        showmessagedlg("Erreur!","Une erreur c'est produite pour l'envoie d'un >[% lbl.newpassword %]!");
-      }
-    });
-  }
-    /* @preserve[% END %]*/
-  }
+  // confirmchangepassword: function(){
+  //   /* @preserve[% IF session.usergroup == 'admin' ||  session.usergroup == 'manager' %]*/
+  //   let sel =users.tbl.getSelectedData();
+  //   if (sel[0]){
+  //     showinfodlg(">[% lbl.newpassword %]","Êtes vous sûre changer le [% lbl.password %]?",users.setnewpassword,{},"<span class=\"icon-Save\"></span>[% lbl.yes %]","<span class=\"icon-remove\"></span>[% lbl.no %]");
+  //   }
+  //   /* @preserve[% END %]*/
+  // }, 
+  // setnewpassword: function(){
+  //   /* @preserve[% IF session.usergroup == 'admin' ||  session.usergroup == 'manager' %]*/
+  //   let sel =users.tbl.getSelectedData();
+  //   if (sel[0]){
+  //   let fndata = {"fn":"setnewpassword","email":sel[0].username};
+  //   postData("db.cgi",fndata).then(data => {
+  //     document.getElementById('dlg_users').style.display='none';
+  //     if (data && data.result.data.password){
+  //       showmessagedlg(">[% lbl.newpassword %]!",'<div class="container"><input class="input" type="text" value="'+data.result.data.username+'" readonly> <label class="label" for="staffgroups_groupname">Utilisateur</label></div><div class="container"><input class="input" type="text" value="'+data.result.data.password+'" readonly> <label class="label" for="staffgroups_groupname">[% lbl.newpassword %]</label></div>');
+  //     }else {
+  //       showmessagedlg("Erreur!","Une erreur c'est produite pour l'envoie d'un >[% lbl.newpassword %]!");
+  //     }
+  //   });
+  // }
+  //   /* @preserve[% END %]*/
+  // }
 }
index 99b9135..14cf897 100644 (file)
@@ -5,10 +5,17 @@
       <div class="bar-item PageHeadTitle hide-small">[% lbl.pot_long %]</div>
       <a class="bar-item toolbarbtn  right" href="index.html?logout=1"><span class="icon icon-logout" style="font-size: 22px;"></span>[% lbl.logout %]</a> 
       <div class="bar-item right">
-        <select class="select data_session " id="current_schemata" data-column="current_schemata" data-selected="[% session.sessiondata.schemata %]" data-table="session" data-id="" value="portanova" name="session_current_schemata"  >
+        <select class="select data_session " id="current_schemata" data-column="current_schemata" data-selected="[% session.sessiondata.schemata %]" data-table="session" data-id="" value="" name="session_current_schemata"  >
         </select>
         <label for="session_current_schemata" class="label text-white">[% lbl.companyunit %]</label>
-  </div>
+      </div>
+      <div class="bar-item right">
+        <select class="select data_session " id="current_lang" data-column="current_lang" data-selected="[% session.sessiondata.lang %]" data-table="session" data-id="" value="" name="current_lang" >
+          <option value="fr">français</option>
+          <option value="de">deutsch</option>
+        </select>
+        <label for="current_lang" class="label text-white">[% lbl.language %]</label>
+      </div>
     </div>
   <!-- <span class="bar-item right" id="modulename" style="display: none;"></span> -->
 </div>
     </header>
       <div class="bar">
         <a class="bar-item bodybtn" href="[% abspath %]periods.html"><span class="icon icon-calendar" style="font-size: 24px;"/></span>[% lbl.refperiods %]</a>
-        <a class="bar-item bodybtn" href="[% abspath %]staff.html"><span class="icon icon-group" style="font-size: 24px;"/></span[% lbl.staff %]</a>
+        <a class="bar-item bodybtn" href="[% abspath %]staff.html"><span class="icon icon-group" style="font-size: 24px;"/></span>[% lbl.staff %]</a>
       </div>
   </div>
   <div class="card" style="margin-top: 10px;">
     <header class="container moduletoolbar">
-      <h3>[% lbl.configuration %]</h3>
+      <h3>[% lbl.config %]</h3>
     </header>
     <div class="bar">
       <a class="bar-item bodybtn" href="[% abspath %]company.html"><span class="icon icon-shop" style="font-size: 24px;"/></span>[% lbl.company %]</a>
       <a class="bar-item bodybtn" href="[% abspath %]workplans.html"><span class="icon icon-template" style="font-size: 24px;"/></span>[% lbl.weeklytemplates %]</a>
       <a class="bar-item bodybtn right" target="_blank" href="[% abspath %]/cgv/cgv.pdf"><span class="icon icon-aggrement" style="font-size: 24px;"/></span>[% lbl.terms %]</a>
+      <a class="bar-item bodybtn right" onclick="profile.showdlgnewpassword(); return false;"><span class="icon icon-access" style="font-size: 24px;"></span>[% lbl.newpassword %]</a>
     </div>
   </div>
   [% IF (session.usergroup == 'admin') %]
@@ -64,5 +72,6 @@
     </footer>
   </div>
 </div>
+[% INCLUDE block/dlg_newpassword.tt %] 
 <script type="text/javascript" src="index/index[% minify%].js?v=[% appversion %]"></script>
-
+<script type="text/javascript" src="profile/profile[% minify%].js?v=[% appversion %]"></script>
index 377aa39..f955aff 100644 (file)
@@ -6,7 +6,7 @@ function initpage(){
 }
 
 let index = {
-  choices:{"current_schemata":null},
+  choices:{"current_schemata":null,"current_lang":null},
   initform: function(){
     document.getElementById("current_schemata").value = schemata;
     index.choices["current_schemata"] = new SlimSelect({
@@ -14,7 +14,13 @@ let index = {
       showSearch: false,
       afterClose: function(){app.changedataset();}
     });
+    index.choices["current_lang"] = new SlimSelect({
+      select: "#current_lang",
+      showSearch: false,
+      afterClose: function(){index.change_language();}
+    });
     index.getDataSets();
+    index.choices["current_lang"].set("[% session.lang %]");
   },
   gettermsstatus: function(){
     postData("db.cgi",{"get":"termsstatus"}).then(data => {
@@ -37,5 +43,11 @@ let index = {
       document.getElementById("dlg_terms").style.display = 'none';
     })
     
+  },
+  change_language: function(){
+    var nl = index.choices["current_lang"].selected()
+    postData("db.cgi",{"fn":"changelanguage","lang":nl}).then(data => {
+      location.reload();
+    });
   }
 }
\ No newline at end of file
index 11c80c3..fc0ea13 100644 (file)
@@ -50,19 +50,19 @@ let reportperiod ={
         {title: '<span style="font-size: 9pt;">[% lbl.prename %]</span>',width: 170, field:"prename",headerSort: false},
         {title: '<span style="font-size: 9pt;">[% lbl.name %]</span>',width: 170, field:"surname",headerSort: false},
         {title: '<span style="font-size: 9pt;">[% lbl.contract %]</span>',width: 70, field:"contracthours",hozAlign:"right",headerSort: false},
-        {title: '<span style="font-size: 9pt;"[% lbl.work %]</span>',width: 65, field:"workhours",hozAlign:"right",headerSort: false},
+        {title: '<span style="font-size: 9pt;">[% lbl.work %]</span>',width: 65, field:"workhours",hozAlign:"right",headerSort: false},
         {title: '<span style="font-size: 9pt;">[% lbl.recuperation_short %]</span>',width: 65, field:"recuperationhours",hozAlign:"right",headerSort: false,formatter:periodRecupFormatter},
         {title: '<span style="font-size: 9pt;">[% lbl.vacancy %]</span>',width: 65, field:"vacancynormal",hozAlign:"right",headerSort: false},
         {title: '<span style="font-size: 8pt;">[% lbl.vacancyill2 %]</span>',width:65, field:"vacancyill",hozAlign:"right",headerSort: false},
-        {title: '<span style="font-size: 9pt;"[% lbl.total %]</span>',width: 65, field:"totalhours",hozAlign:"right",headerSort: false,formatter:periodTotalFormatter},
+        {title: '<span style="font-size: 9pt;">[% lbl.total %]</span>',width: 65, field:"totalhours",hozAlign:"right",headerSort: false,formatter:periodTotalFormatter},
         {title: '<span style="font-size: 8pt;">[% lbl.statementtransfered2 %]</span>',width: 70, field:"transferedhours",hozAlign:"right",headerSort: false},
         {title: '<span style="font-size: 9pt;">[% lbl.supphourspayed2 %]</span>',width: 65, field:"payedhours",hozAlign:"right",headerSort: false,headerVertical:true} ,
         {title: '<span style="font-size: 8pt;">[% lbl.finalstatementpot %]</span>',width: 70, field:"hoursdiff",hozAlign:"right",headerSort: false},
         {title: '<span style="font-size: 9pt;">[% lbl.supp44h2 %]</span>',width: 50, field:"suppvacancy44hours",hozAlign:"right",headerSort: false,headerVertical:true},
-        {title: '<span style="font-size: 9pt;">suppl.<br/>trav. dim.</span>',width: 50, field:"suppvacancysunwork",hozAlign:"right",headerSort: false,headerVertical:true},
+        {title: '<span style="font-size: 9pt;">[% lbl.suppsunwork %]</span>',width: 50, field:"suppvacancysunwork",hozAlign:"right",headerSort: false,headerVertical:true},
         {title: '<span style="font-size: 8pt;">[% lbl.avgweek_short %]</span>',width: 60, field:"avgtotalweekhours",hozAlign:"right",headerSort: false,formatter:periodAVGFormatter},
-        {title: '<span style="font-size: 9pt;">[% lbl.validated %]</span>',width: 40, field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false},headerVertical:true},
-        {title: '<span style="font-size: 9pt;">[% lbl.supphourspayed2 %]</span>',width: 65, field:"payedhours",hozAlign:"right",headerSort: false,headerVertical:true} ,
+        {title: '<span style="font-size: 9pt;">[% lbl.validated %]</span>',width: 40, field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false},headerVertical:true}
+        
       ] 
     });
     reportperiod.tblsplitted = new Tabulator("#tbl_rpsplitted", {
@@ -92,7 +92,7 @@ let reportperiod ={
         {title: '<span style="font-size: 9pt;">[% lbl.supphourspayed2 %]</span>',width: 70, field:"payedhours",formatter:nullrFormatter,hozAlign:"right",headerSort: false,headerVertical:true, bottomCalc:reportperiod.setpayedhours} ,
         {title: '<span style="font-size: 8pt;">[% lbl.finalstatementpot %]</span>',width: 80, field:"hoursdiff",formatter:nullrFormatter,hozAlign:"right",headerSort: false, bottomCalc:reportperiod.sethoursdiff},
         {title: '<span style="font-size: 9pt;">[% lbl.supp44h2 %]</span>',width: 50, field:"suppvacancy44hours",formatter:nullrFormatter,hozAlign:"right",headerSort: false,headerVertical:true, bottomCalc:reportperiod.setsuppvacancy44hours},
-        {title: '<span style="font-size: 9pt;">suppl.<br/>trav. dim.</span>',width: 50, field:"suppvacancysunwork",formatter:nullrFormatter,hozAlign:"right",headerSort: false,headerVertical:true, bottomCalc:reportperiod.setsuppvacancysunwork},
+        {title: '<span style="font-size: 9pt;">[% lbl.suppsunwork %]',width: 50, field:"suppvacancysunwork",formatter:nullrFormatter,hozAlign:"right",headerSort: false,headerVertical:true, bottomCalc:reportperiod.setsuppvacancysunwork},
         {title: '<span style="font-size: 8pt;">[% lbl.avgweek_short %]</span>',width: 60, field:"avgtotalweekhours",formatter:nullrFormatter,hozAlign:"right",headerSort: false, bottomCalc:reportperiod.setavgtotalweekhours},
         {title: '<span style="font-size: 9pt;">[% lbl.validated %]</span>',width: 40, field:"isvalidated",formatter:nullrFormatter,hozAlign:"center",headerSort: false,headerVertical:true, bottomCalc:reportperiod.setisvalidated, bottomCalcFormatter:"html",headerVertical:true},
       ],
diff --git a/app/tmpl/module/profile/profile.js b/app/tmpl/module/profile/profile.js
new file mode 100644 (file)
index 0000000..670ec63
--- /dev/null
@@ -0,0 +1,79 @@
+let profile = {
+  reftbl: null,
+generatenewpassword: function(){
+  let fndata = {"fn":"genpwd"};
+  postData("db.cgi",fndata).then(data => {
+    if (data && data.result.data.password){
+      document.getElementById("newpwd1").value=data.result.data.password;
+      profile.viewpwd('newpwd1',"text");
+
+      document.getElementById("newpwd2").value=data.result.data.password; 
+    }
+  });
+},
+showdlgnewpassword: function(tbl=false){
+  let sel = [];
+  if (tbl == true){
+    sel =profile.reftbl.getSelectedData();
+    if (sel.length == 0){
+      return false;
+    }
+  } 
+  document.getElementById("newpwd1").value = "";
+  document.getElementById("newpwd2").value = "";
+  profile.viewpwd('newpwd1',"pwd");
+  profile.viewpwd('newpwd2',"pwd");
+  app.viewdialog("newpassword");
+  return false;
+},
+validatepwd: function(){
+  let pwd1 = document.getElementById("newpwd1").value;
+  let pwd2 = document.getElementById("newpwd1").value;
+  let res = true;
+  if (pwd1 != pwd2) { res =  false; console.log(pwd1 + "!=" +pwd2);}
+  if (pwd1.length < 10 || pwd2.length < 10) { res=false; console.log("pwd length mismatch!");}
+  if (/[a-z]/.test(pwd1) == false || /[a-z]/.test(pwd2) == false) {res = false; console.log("lower letters mismatch!");}
+  if (/[A-Z]/.test(pwd1) == false || /[A-Z]/.test(pwd2) == false) {res = false; console.log("upper letters mismatch!");}
+  if (/[0-9]/.test(pwd1) == false || /[0-9]/.test(pwd2) == false) { res =false; console.log("number letters mismatch!");}
+  return res;
+},
+viewpwd(id,force){
+  
+  if (force == "text"){
+    document.getElementById(id).type = "text";
+    document.getElementById("btn_" + id).innerHTML='<span class="icon icon-eye-close"></span>';
+  } else if (force == "pwd"){
+    document.getElementById(id).type = "password";
+    document.getElementById("btn_" + id).innerHTML='<span class="icon icon-eye-open"></span>';
+  }else {
+    var fldtype = document.getElementById(id).type;
+    if (fldtype == "text"){
+      document.getElementById(id).type = "password";
+      document.getElementById("btn_" + id).innerHTML='<span class="icon icon-eye-open"></span>';
+    } else {
+      document.getElementById(id).type = "text";
+      document.getElementById("btn_" + id).innerHTML='<span class="icon icon-eye-close"></span>';
+    }
+  }
+  
+  return false;
+},
+savepwd: function(){
+  let valp = profile.validatepwd();
+  let sel = [];
+  if (profile.reftbl){
+    sel =profile.reftbl.getSelectedData();
+    console.log("has reftbl!");
+  } else {
+    sel.push({id:"[% session.id %]"});
+    console.log("set own profile pwd!");
+  }
+  if (sel[0] && valp==true){
+    postData("db.cgi",{"fn":"savenewpwd","pwd":document.getElementById("newpwd1").value,"iduser":sel[0].id}).then(data => {
+      app.closedlg("dlg_newpassword");
+      dataform.formsaved({});
+    })
+  }
+  return false;
+}
+}
\ No newline at end of file
index e4918fc..bfde748 100644 (file)
@@ -19,8 +19,8 @@
     </div>
     <div class="cell">
       [% INCLUDE block/pnl_nodata.tt %]
-      <div class="panel" id="pnl_workplans" style="display: none;
-        <div class="bar moduletoolbar">">
+      <div class="panel" id="pnl_workplans" style="display: none;">
+        <div class="bar moduletoolbar">
           <div class="bar-item PageHeadTitle">[% lbl.titles.template %]</div>
             <button class="bar-item toolbarbtn right" onclick="workplans.edit();"><span class="icon icon-edit" style="font-size: 16px;"></span>[% lbl.edit %]</button>
             <button class="bar-item toolbarbtn right" onclick="workplans.setcopyday();"><span class="icon icon-copy" style="font-size: 16px;"></span>[% lbl.copy %]</button>
index 0e826d9..be51fe9 100644 (file)
@@ -3,7 +3,7 @@
       <div class="modal-content animate-top card-4">
         <header>
           <span onclick="document.getElementById('dlg_workplanday').style.display='none'; return false;" class="button toolbarbtn display-topright" ><span class="icon icon-remove" style="font-size: 18px;"></span></span>
-          <h2 id="dlg_workplanday_title">>[% lbl.editday %] : <span class="xlarge" id="display_date"></span></h2>
+          <h2 id="dlg_workplanday_title">[% lbl.editday %] : <span class="xlarge" id="display_date"></span></h2>
         </header>
         <div class="container">
         <div id="workplanday_errmsg"></div>
@@ -43,7 +43,7 @@
                   <div class="container cell" style="padding-left: 70px;">
                             <div class="cell" style="width: 86px;">
                               <input type="text" class="data_workplandays white text-black readonly " style="width: 60px;" id="interruptionhours" name="workplandays_interruptionhours" value="" disabled/>
-                              <label for="workplandays_interruptionhours" class="label"  style="font-weight: bold;">coupure</label>
+                              <label for="workplandays_interruptionhours" class="label"  style="font-weight: bold;">[% lbl.cutoff %]</label>
                             </div>
 
                   </div>
diff --git a/dev/apache/app.pot.conf b/dev/apache/app.pot.conf
new file mode 100644 (file)
index 0000000..c262b8d
--- /dev/null
@@ -0,0 +1,17 @@
+<VirtualHost *:80>
+Servername app.pot.lan
+ServerAdmin webmaster@localhost
+DocumentRoot /usr/home/dksalu/public_html/potapp
+DirectoryIndex index.html index.cgi
+
+<Directory "/usr/home/dksalu/public_html/potapp">
+
+Options +Indexes +ExecCGI
+AllowOverride All
+
+</Directory>
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+</VirtualHost>
\ No newline at end of file
diff --git a/dev/apache/plandutravail.lan.conf b/dev/apache/plandutravail.lan.conf
new file mode 100644 (file)
index 0000000..d08c02f
--- /dev/null
@@ -0,0 +1,17 @@
+<VirtualHost *:80>
+Servername lu.plandutravail.lan
+ServerAdmin webmaster@localhost
+DocumentRoot /usr/home/dksalu/public_html/plandutravail_lu
+DirectoryIndex index.html index.cgi
+
+<Directory "/usr/home/dksalu/public_html/plandutravail_lu">
+
+Options +Indexes +ExecCGI
+AllowOverride All
+
+</Directory>
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+</VirtualHost>
\ No newline at end of file
diff --git a/dev/db/tmp/schemas.csv b/dev/db/tmp/schemas.csv
deleted file mode 100644 (file)
index e7ed402..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-schema_name\r
-demo50\r
-etude_dbe\r
-elch\r
-brasserie_du_theatre\r
-demo\r
-demoold\r
-portanova\r
-barto\r
-public\r
index e5367de..8b13789 100644 (file)
@@ -1,3 +1 @@
 
-ALTER TABLE brasserie_du_theatre.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE brasserie_du_theatre.reportperiod ADD COLUMN subinterval text;
index 97887b5..8b13789 100644 (file)
@@ -1,3 +1 @@
 
-ALTER TABLE demo.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE demo.reportperiod ADD COLUMN subinterval text;
diff --git a/dev/db/tmp/update.demo50.sql b/dev/db/tmp/update.demo50.sql
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
index b7efbb2..8b13789 100644 (file)
@@ -1,3 +1 @@
 
-ALTER TABLE elch.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE elch.reportperiod ADD COLUMN subinterval text;
diff --git a/dev/db/tmp/update.etude_dbe.sql b/dev/db/tmp/update.etude_dbe.sql
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
index f8241fd..8b13789 100644 (file)
@@ -1,3 +1 @@
 
-ALTER TABLE portanova.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE portanova.reportperiod ADD COLUMN subinterval text;
index b6c66ad..7621479 100644 (file)
@@ -1,2 +1,2 @@
 
-ALTER TABLE public.companies ADD COLUMN subinterval text;
+ALTER TABLE public.users ADD COLUMN lang text;
index 8416c62..b7ca810 100644 (file)
@@ -1,16 +1,10 @@
 
 
-ALTER TABLE brasserie_du_theatre.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE brasserie_du_theatre.reportperiod ADD COLUMN subinterval text;
 
-ALTER TABLE demo.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE demo.reportperiod ADD COLUMN subinterval text;
 
 
-ALTER TABLE elch.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE elch.reportperiod ADD COLUMN subinterval text;
 
-ALTER TABLE portanova.reportperiod ADD COLUMN periodtype text;
-ALTER TABLE portanova.reportperiod ADD COLUMN subinterval text;
 
-ALTER TABLE public.companies ADD COLUMN subinterval text;
+
+
+ALTER TABLE public.users ADD COLUMN lang text;
index 2748e8f..f09ec4e 100644 (file)
@@ -8,17 +8,17 @@ source ${CALLDIR}"/dbfunctions.sh"
 #      exit 0
 # fi
 
-IFS='
-'
-ALLSCHEMA=(`psql -h ${DBLIVEHOST} -U ${DBUSER} -t -A -c "select schema_name from information_schema.schemata where (catalog_name='${DBNAME}' and schema_owner = '${DBUSER}') or (catalog_name='${DBNAME}' and schema_name='public');" ${DBNAME}`)
+IFS='
+'
+ALLSCHEMA=(`psql -h ${DBLIVEHOST} -U ${DBUSER} -t -A -c "select schema_name from information_schema.schemata where (catalog_name='${DBNAME}' and schema_owner = '${DBUSER}') or (catalog_name='${DBNAME}' and schema_name='public');" ${DBNAME}`)
 
 # #echo ${ALLSCHEMA};
-for schema in "${ALLSCHEMA[@]}"
-do 
-#      echo "Diff Schema $schema" 
-#      DBSCHEMA=$schema
-#      updschemadiff
-done
+for schema in "${ALLSCHEMA[@]}"
+do 
+       echo "Diff Schema $schema" 
+       DBSCHEMA=$schema
+       updschemadiff
+done
 FILES=`find ${CALLDIR}/db/tmp -type f`
 cat ${FILES} > ${CALLDIR}"/db/update.live.sql"
 
diff --git a/dev/test.pl b/dev/test.pl
new file mode 100644 (file)
index 0000000..df40ab0
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+use strict;
+
+my $num = 12;
+my $randstring = &randstr($num);
+  print  "RandPWD:\n".$randstring."\n===\n";
+       while (($randstring !~ /[A-Z]+/) || ($randstring !~ /[a-z]+/) || ($randstring !~ /[0-9]+/)){
+    $randstring = &randstr($num);
+    print  "RandPWD:\n".$randstring."\n===\n";
+  } 
+
+
+sub randstr(){
+  my $num = shift;
+  my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9);
+       my $randstring = join '', map $alphanumeric[rand @alphanumeric], 0..$num;
+  return $randstring;
+}
\ No newline at end of file
diff --git a/ipad/Import.log b/ipad/Import.log
new file mode 100644 (file)
index 0000000..f4c7ea4
--- /dev/null
@@ -0,0 +1,4 @@
+Timestamp   Filename        Error   Message
+2021-01-11 19:49:30.488 +0100  POT.fmp12       0       Import of script steps from clipboard started
+2021-01-11 19:49:30.504 +0100  Startup 0       script steps imported : 1
+2021-01-11 19:49:30.504 +0100  POT.fmp12       0       Import completed
diff --git a/ipad/POT.fmp12 b/ipad/POT.fmp12
new file mode 100644 (file)
index 0000000..7de0d74
Binary files /dev/null and b/ipad/POT.fmp12 differ