misc bugfixes
authorKilian Saffran <ksaffran@dks.lu>
Fri, 22 Mar 2019 15:40:57 +0000 (16:40 +0100)
committerKilian Saffran <ksaffran@dks.lu>
Fri, 22 Mar 2019 15:40:57 +0000 (16:40 +0100)
.htaccess
img/annuaire.svg
lib/mail.log
lib/process_profile.php
lib/processdata.php
tmpl/pages/profile/applications.php
tmpl/pages/profile/profile.php
tmpl/pages/profile/rendezvous/rendezvouslist.php
tmpl/pages/profile/rendezvous/rendezvouslistold.php

index c523b66..2f9ed54 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,3 +1,6 @@
+#php_flag display_startup_errors on
+#php_flag display_errors on
+#php_flag html_errors on
 
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-f
index c249b8f..d47efcb 100644 (file)
@@ -5,11 +5,35 @@
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    id="svg8"
    version="1.1"
    viewBox="0 0 88 68"
    height="68mm"
-   width="88mm">
+   width="88mm"
+   sodipodi:docname="annuaire.svg"
+   inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1017"
+     id="namedview859"
+     showgrid="false"
+     inkscape:zoom="3.2995098"
+     inkscape:cx="166.29921"
+     inkscape:cy="128.50394"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg8" />
   <defs
      id="defs2">
     <clipPath
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
+        <dc:title />
       </cc:Work>
     </rdf:RDF>
   </metadata>
+  <path
+     id="path1016"
+     d="M 1.1909226,5.8613645 H 4.6096721 V 56.491279 h 1.022936 c 25.9617429,0 34.0375359,5.232224 36.4090009,7.737163 h 3.819977 c 2.3971,-2.491063 10.524166,-7.737163 36.341067,-7.737163 h 1.025499 V 5.8613645 h 3.422593 V 59.858968 h -4.448092 c -28.303733,0 -33.636318,6.305998 -34.149068,7.024807 l -0.51275,0.71243 H 40.336718 L 39.823968,66.86104 C 39.618856,66.575844 34.645203,59.858968 5.6326006,59.858968 H 1.1909226 Z M 7.7978039,1.993352 C 35.756804,2.3524021 41.165535,9.8973204 41.883282,11.128986 V 59.098532 C 37.320442,55.79017 27.765357,51.952519 7.7978039,51.694832 Z m 72.2384171,0 v 49.70148 C 60.065102,51.95265 50.515367,55.79017 45.952009,59.098532 V 11.146666 C 46.733997,9.8000419 52.284316,2.352141 80.036221,1.993352 Z"
+     style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.27252173;stroke-opacity:1"
+     inkscape:connector-curvature="0" />
   <g
-     transform="translate(0,-229)"
-     id="layer1">
-    <g
-       transform="matrix(1.8889006,0,0,1.8650012,-37.54194,-189.44711)"
-       id="g1039">
-      <path
-         id="path1016"
-         d="m 20.505506,227.5111 h 1.809915 v 27.14739 h 0.541551 c 13.744367,0 18.01976,2.80548 19.275234,4.14861 h 2.022328 c 1.269045,-1.33569 5.571583,-4.14861 19.239269,-4.14861 h 0.542908 V 227.5111 h 1.81195 v 28.95312 h -2.354858 c -14.984236,0 -17.807352,3.38123 -18.078806,3.76665 l -0.271454,0.382 h -3.813921 l -0.271454,-0.39419 c -0.108588,-0.15292 -2.741682,-3.75446 -18.1012,-3.75446 h -2.351462 z m 3.497739,-2.074 c 14.801732,0.19252 17.66516,4.23805 18.045141,4.89846 v 25.72092 c -2.415606,-1.77392 -7.474149,-3.83164 -18.045141,-3.96981 z m 38.243631,0 v 26.64957 c -10.57288,0.13824 -15.628591,2.19589 -18.044471,3.96981 v -25.71144 c 0.413991,-0.72205 3.352377,-4.71556 18.044471,-4.90794 z"
-         style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.67798656;stroke-opacity:1" />
-      <g
-         aria-label="J"
-         transform="matrix(0.94604439,0,0,1.0570329,16.309846,36.231024)"
-         style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.6859417px;font-family:'Good Times Rg';-inkscape-font-specification:GoodTimesRg-Regular;writing-mode:lr-tb;fill:#dddad4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33374342"
-         id="text857">
-        <path
-           d="m 9.9051939,195.33647 v -1.99211 h 4.1724601 q 1.992115,0 2.870528,-0.76861 0.878413,-0.76862 0.878413,-2.43133 v -6.21163 h 1.992114 v 6.21163 q 0,2.65093 -1.380363,3.92149 -1.380363,1.27056 -4.360692,1.27056 z"
-           style="stroke-width:0.33374342"
-           id="path1013" />
-      </g>
-      <g
-         aria-label="uri"
-         transform="matrix(0.60172093,0,0,0.46194144,11.955163,158.51361)"
-         style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.68101978px;font-family:'Good Times Rg';-inkscape-font-specification:GoodTimesRg-Regular;writing-mode:lr-tb;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33374342"
-         id="text861">
-        <path
-           d="m 22.810302,195.33647 z m 7.721154,-8.4921 h 1.448446 v 4.74249 q 0,0.98121 -0.256982,1.71711 -0.256983,0.72423 -0.805991,1.20315 -0.549008,0.47892 -1.425084,0.71254 -0.864396,0.23362 -2.102584,0.23362 -1.226507,0 -2.102583,-0.23362 -0.864396,-0.23362 -1.413404,-0.71254 -0.549008,-0.47892 -0.80599,-1.20315 -0.256982,-0.7359 -0.256982,-1.71711 v -4.74249 h 1.530213 v 4.74249 q 0,0.64246 0.151853,1.09802 0.163535,0.45556 0.513965,0.74759 0.362112,0.29202 0.957844,0.43219 0.595732,0.12849 1.471808,0.12849 0.876077,0 1.471809,-0.12849 0.595732,-0.14017 0.946162,-0.43219 0.362112,-0.29203 0.513965,-0.74759 0.163535,-0.45556 0.163535,-1.09802 z"
-           style="fill:#ffffff;fill-opacity:1;stroke-width:0.33374342"
-           id="path1006" />
-        <path
-           d="m 34.491325,195.33647 z m 7.884688,0 -2.149307,-2.35956 h -3.177238 v -1.30828 h 3.539349 q 0.805991,0 1.214826,-0.4322 0.408836,-0.44388 0.408836,-1.27323 0,-0.82935 -0.432198,-1.2265 -0.420516,-0.40884 -1.191464,-0.40884 h -4.625684 v 7.00861 h -1.471808 v -8.4921 h 6.097492 q 0.724223,0 1.296593,0.22194 0.57237,0.21026 0.969525,0.61909 0.397155,0.39716 0.607413,0.96953 0.210258,0.57237 0.210258,1.28491 0,1.06297 -0.46724,1.7872 -0.45556,0.71254 -1.284912,1.02793 l 2.558143,2.5815 z"
-           style="fill:#ffffff;fill-opacity:1;stroke-width:0.33374342"
-           id="path1008" />
-        <path
-           d="m 46.499411,195.33647 z m 0,0 v -8.4921 h 1.48349 v 8.4921 z"
-           style="fill:#ffffff;fill-opacity:1;stroke-width:0.33374342"
-           id="path1010" />
-      </g>
-      <g
-         aria-label="D"
-         transform="matrix(0.94604439,0,0,1.0570329,0.39687501,36.247917)"
-         style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16.35342789px;font-family:'Good Times Rg';-inkscape-font-specification:GoodTimesRg-Regular;writing-mode:lr-tb;fill:#dddad4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33374342"
-         id="text865">
-        <path
-           d="m 50.99852,195.33647 v -11.88894 h 6.884793 q 1.259214,0 2.322187,0.42519 1.062973,0.42519 1.831584,1.1938 0.768611,0.76861 1.1938,1.84794 0.441543,1.06297 0.441543,2.35489 0,1.29192 -0.441543,2.40395 -0.425189,1.11204 -1.1938,1.92971 -0.768611,0.80132 -1.831584,1.27557 -1.062973,0.45789 -2.322187,0.45789 z m 6.884793,-2.07688 q 0.801318,0 1.471809,-0.29437 0.686844,-0.29436 1.177447,-0.80131 0.506956,-0.52331 0.784964,-1.24286 0.278008,-0.71955 0.278008,-1.55358 0,-0.83402 -0.278008,-1.53722 -0.278008,-0.71955 -0.784964,-1.22651 -0.490603,-0.50696 -1.177447,-0.78496 -0.670491,-0.29437 -1.471809,-0.29437 h -4.824261 v 7.73518 z"
-           style="stroke-width:0.33374342"
-           id="path1003" />
-      </g>
-      <g
-         aria-label="ig"
-         transform="matrix(0.60172093,0,0,0.46194144,8.51558,158.91049)"
-         style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.68225002px;font-family:'Good Times Rg';-inkscape-font-specification:GoodTimesRg-Regular;writing-mode:lr-tb;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33374342"
-         id="text869">
-        <path
-           d="m 66.866227,195.33647 z m 0,0 v -9.21999 h 1.610646 v 9.21999 z"
-           style="fill:#ffffff;fill-opacity:1;stroke-width:0.33374342"
-           id="path998" />
-        <path
-           d="m 71.165505,195.33647 z m 4.476834,0 q -0.963851,0 -1.788197,-0.3551 -0.811664,-0.36779 -1.420412,-0.98922 -0.596066,-0.63411 -0.938486,-1.4965 -0.329739,-0.8624 -0.329739,-1.86429 0,-1.01458 0.329739,-1.85161 0.34242,-0.83703 0.938486,-1.42041 0.608748,-0.59607 1.420412,-0.91313 0.824346,-0.32973 1.788197,-0.32973 h 4.996807 v 1.61064 h -4.996807 q -0.62143,0 -1.154084,0.22828 -0.519973,0.2156 -0.90044,0.60875 -0.380468,0.39315 -0.596066,0.93849 -0.215598,0.54533 -0.215598,1.20481 0,0.6468 0.215598,1.20481 0.215598,0.55802 0.596066,0.96386 0.380467,0.39314 0.90044,0.62143 0.532654,0.22828 1.154084,0.22828 h 3.94418 v -2.39695 h -4.159778 v -1.357 h 5.783106 v 5.36459 z"
-           style="fill:#ffffff;fill-opacity:1;stroke-width:0.33374342"
-           id="path1000" />
-      </g>
-    </g>
+     aria-label="J"
+     transform="matrix(1.7869838,0,0,1.9713676,-6.7342621,-350.87621)"
+     style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.6859417px;font-family:'Good Times Rg';-inkscape-font-specification:GoodTimesRg-Regular;writing-mode:lr-tb;fill:#dddad4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33374342"
+     id="text857">
+    <path
+       d="m 9.9051939,195.33647 v -1.99211 h 4.1724601 q 1.992115,0 2.870528,-0.76861 0.878413,-0.76862 0.878413,-2.43133 v -6.21163 h 1.992114 v 6.21163 q 0,2.65093 -1.380363,3.92149 -1.380363,1.27056 -4.360692,1.27056 z"
+       style="stroke-width:0.33374342"
+       id="path1013"
+       inkscape:connector-curvature="0" />
+  </g>
+  <g
+     aria-label="D"
+     transform="matrix(1.7869838,0,0,1.9713676,-36.792283,-350.8447)"
+     style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16.35342789px;font-family:'Good Times Rg';-inkscape-font-specification:GoodTimesRg-Regular;writing-mode:lr-tb;fill:#dddad4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33374342"
+     id="text865">
+    <path
+       d="m 50.99852,195.33647 v -11.88894 h 6.884793 q 1.259214,0 2.322187,0.42519 1.062973,0.42519 1.831584,1.1938 0.768611,0.76861 1.1938,1.84794 0.441543,1.06297 0.441543,2.35489 0,1.29192 -0.441543,2.40395 -0.425189,1.11204 -1.1938,1.92971 -0.768611,0.80132 -1.831584,1.27557 -1.062973,0.45789 -2.322187,0.45789 z m 6.884793,-2.07688 q 0.801318,0 1.471809,-0.29437 0.686844,-0.29436 1.177447,-0.80131 0.506956,-0.52331 0.784964,-1.24286 0.278008,-0.71955 0.278008,-1.55358 0,-0.83402 -0.278008,-1.53722 -0.278008,-0.71955 -0.784964,-1.22651 -0.490603,-0.50696 -1.177447,-0.78496 -0.670491,-0.29437 -1.471809,-0.29437 h -4.824261 v 7.73518 z"
+       style="stroke-width:0.33374342"
+       id="path1003"
+       inkscape:connector-curvature="0" />
   </g>
 </svg>
index 2ef460e..fdc9107 100644 (file)
@@ -4,3 +4,4 @@ perl "/mnt/c/Users/ksaff/Workspace/Websites/juridig/lib/sendEmail" -f support@dk
 Mar 20 11:36:46 dks-laptop sendEmail[500]: ERROR => mail.your-server.de:587 returned a zero byte response to our query.
 perl "/mnt/c/Users/ksaff/Workspace/Websites/juridig/lib/sendEmail" -f support@dks.lu  -s "mail.your-server.de:587" -xu "ksaffran@dks.lu" -xp "FB1ia1ka" -q -l "/mnt/c/Users/ksaff/Workspace/Websites/juridig/lib/mail.log" -o tls=auto -o message-content-type=html -o message-charset=utf-8 -t "kilian@saffran.lu" -u "Votre demande de rendezvous via juridig.lu" -m "<html>  <head>    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">    <style>    body,html {        margin: 0;        background-color: ;    }  </style>  </head>  <body bgcolor=\"#e8e8e8\">    <div class=\"maincontainer\" align=\"center\" style=\"padding-top: 5px; padding-bottom: 5px; width: auto; background-color: #e8e8e8; color: #000;\">        <img src=\"http://localhost/juridig/img/txtjuridig_normal.png\" alt=\"juridig\">      <div  style=\"background-color: #fff;\">        <div class=\"mailcontent\" align=\"left\" style=\"padding: 5px; margin: 5px;\">          <p>Bonjour,<br/><br/>Vous avez demandé un rendez-vous via juridig.lu,</p><br/><a href=\"http://localhost/juridig/rendezvousevent?uuid=c027a180-4afc-11e9-8402-60029210ec96&setstatus=confirm\">Confirmer la demande</a><br/><a href=\"http://localhost/juridig/rendezvousevent?uuid=c027a180-4afc-11e9-8402-60029210ec96&setstatus=cancel\">Annuler la demande</a><br/><br/>Meilleurs Salutations,<br/><br/>votre équipe de juridig.lu<br/>        </div>      </div>      <div style=\"margin-top: 5px; margin-bottom: 5px; font-size:12px;\">        <img src=http://localhost/juridig/img/logo.png\" alt=\"juridig\" width=\"82\" height=\"100\"><br/>            l\'avocat en ère numerique    </div>    </div>  </body></html>" Mar 20 11:41:46 dks-laptop sendEmail[502]: Email was sent successfully!  From: <support@dks.lu> To: <kilian@saffran.lu> Subject: [Votre demande de rendezvous via juridig.lu] Server: [mail.your-server.de:587]
 perl "/mnt/c/Users/ksaff/Workspace/Websites/juridig/lib/sendEmail" -f support@dks.lu  -s "mail.your-server.de:587" -xu "ksaffran@dks.lu" -xp "FB1ia1ka" -q -l "/mnt/c/Users/ksaff/Workspace/Websites/juridig/lib/mail.log" -o tls=auto -o message-content-type=html -o message-charset=utf-8 -t "kilian@saffran.lu" -u "Votre demande de rendezvous via juridig.lu" -m "<html>  <head>    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">    <style>    body,html {        margin: 0;        background-color: ;    }  </style>  </head>  <body bgcolor=\"#e8e8e8\">    <div class=\"maincontainer\" align=\"center\" style=\"padding-top: 5px; padding-bottom: 5px; width: auto; background-color: #e8e8e8; color: #000;\">        <img src=\"http://dks-laptop/juridig/img/txtjuridig_normal.png\" alt=\"juridig\">      <div  style=\"background-color: #fff;\">        <div class=\"mailcontent\" align=\"left\" style=\"padding: 5px; margin: 5px;\">          <p>Bonjour,<br/><br/>Vous avez demandé un rendez-vous via juridig.lu,</p><br/><a href=\"http://dks-laptop/juridig/rendezvousevent?uuid=d7712987-4afd-11e9-8402-60029210ec96&setstatus=confirm\">Confirmer la demande</a><br/><a href=\"http://dks-laptop/juridig/rendezvousevent?uuid=d7712987-4afd-11e9-8402-60029210ec96&setstatus=cancel\">Annuler la demande</a><br/><br/>Meilleurs Salutations,<br/><br/>votre équipe de juridig.lu<br/>        </div>      </div>      <div style=\"margin-top: 5px; margin-bottom: 5px; font-size:12px;\">        <img src=\"http://dks-laptop/juridig/img/logo.png\" alt=\"juridig\" width=\"82\" height=\"100\"><br/>        l'avocat en ère numerique    </div>    </div>  </body></html>" Mar 20 11:49:35 dks-laptop sendEmail[504]: Email was sent successfully!  From: <support@dks.lu> To: <kilian@saffran.lu> Subject: [Votre demande de rendezvous via juridig.lu] Server: [mail.your-server.de:587]
+perl "/mnt/c/Users/ksaff/Workspace/Websites/juridig/lib/sendEmail" -f support@dks.lu  -s "mail.your-server.de:587" -xu "ksaffran@dks.lu" -xp "FB1ia1ka" -q -l "/mnt/c/Users/ksaff/Workspace/Websites/juridig/lib/mail.log" -o tls=auto -o message-content-type=html -o message-charset=utf-8 -t "kilian@saffran.lu" -u "Nouveau mot de passe pour le site juridig.lu" -m "<html>  <head>    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">    <style>    body,html {        margin: 0;        background-color: ;    }  </style>  </head>  <body bgcolor=\"#e8e8e8\">    <div class=\"maincontainer\" align=\"center\" style=\"padding-top: 5px; padding-bottom: 5px; width: auto; background-color: #e8e8e8; color: #000;\">        <img src=\"http://localhost/juridig/img/txtjuridig_normal.png\" alt=\"juridig\">      <div  style=\"background-color: #fff;\">        <div class=\"mailcontent\" align=\"left\" style=\"padding: 5px; margin: 5px;\">          Bonjour Saffran Michèle,<br/><br/>vous avez demandé un nouveau mot de passe via juridig.lu,<u>nouveau mot de passe</u>: wtiQvxI*V*<br/><br/>votre Equipe de jurique.lu        </div>      </div>      <div style=\"margin-top: 5px; margin-bottom: 5px; font-size:12px;\">        <img src=\"http://localhost/juridig/img/logo.png\" alt=\"juridig\" height=\"100\"><br/>        l'avocat en ère numerique    </div>    </div>  </body></html>" Mar 22 16:03:50 dks-laptop sendEmail[635]: Email was sent successfully!  From: <support@dks.lu> To: <kilian@saffran.lu> Subject: [Nouveau mot de passe pour le site juridig.lu] Server: [mail.your-server.de:587]
index 4478eb5..b0919a2 100644 (file)
@@ -102,7 +102,7 @@ function getsessiondata($sessid){
   from usersession ses 
   left JOIN users us on (ses.id_user=us.id) 
   left join userservices srv on (srv.id_user=us.id) 
-  join appprices prc on (prc.id_app=srv.id_app) 
+  left join appprices prc on (prc.id_app=srv.id_app) 
   where ses.sessionid='".$sessid."';";
   $sesuser = $db->dbquery($sql);
   return $sesuser;
index d9db952..daa9239 100644 (file)
@@ -1,8 +1,10 @@
 <?php
+include ('lib/process_payment.php');
 include ('lib/process_email.php');
 include ('lib/process_rdv.php');
 include ('lib/process_profile.php');
 
+
 function process_postdata($pdt){
         global $user;
         $submittype="";
index 9848f9f..12c5e23 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-    $sql = "select apps.id,apps.name,apps.description,apps.activated,userv.expiration,userv.payeddate,userv.isevaluation,userv.enabled, GROUP_CONCAT(apr.package) as packages, GROUP_CONCAT(apr.monthlyprice) as prices, apps.evaluationdays
+    $sql = "select apps.id,apps.name,apps.app,apps.description,apps.activated,userv.expiration,userv.payeddate,userv.isevaluation,userv.enabled, GROUP_CONCAT(apr.package) as packages, GROUP_CONCAT(apr.monthlyprice) as prices, apps.evaluationdays
     from apps 
     left join userservices userv on (apps.id=userv.id_app and userv.id_user='".$user["id"]."')
     left join appprices apr on (apps.id=apr.id_app)
@@ -31,7 +31,7 @@
         foreach($userapps as $app => $appdata){
             if (($appdata["activated"] == 1) || ($user["usergroup"] == "administrator")){
               echo '<tr>'.
-              '<td>'.$appdata["name"].'</td>'.
+              '<td><img src="'.$baseurl.'\/img\/'.$appdata['app'].'.svg" style="width: 50px;"/>&nbsp;&nbsp;&nbsp;'.$appdata["name"].'</td>'.
               '<td>'.$appdata["description"].'</td>'.
               '<td>';
               if (($appdata["prices"] == "0") || ($appdata["expiration"] >= $today )){  
index e5bf6cd..e119743 100644 (file)
@@ -13,8 +13,6 @@
 <div class="col-sm-2 sidebar">
 <h6 class="dropdown-header">Profile</h6>
         <a class="dropdown-item" href="<?php echo $baseurl; ?>/profile">Mon Profile</a>
-        <!-- <a class="dropdown-item" href="<?php echo $baseurl; ?>/profile/changepassword">Changer Mot de Passe</a> -->
-        <!-- <a class="dropdown-item" href="<?php echo $baseurl; ?>/profile/deleteuserprofile">Supprimer mon profile</a> -->
         <div class="dropdown-divider"></div>
         <?php
             if ($user['usergroup'] == 'client'){
index ec36119..3e3c275 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 $sql = "select ev.id,DATE_FORMAT(ev.eventdate,'%d/%m/%Y') as eventdate,ev.eventhour,ev.eventoptions,usr.userprename,usr.usersurname,ev.user_status,ev.client_status,ev.clientuuid,ev.useruuid from events ev LEFT JOIN users usr on (ev.id_client=usr.id) where ev.id_user=".$user['id']." and ev.eventdate >= CURRENT_DATE order by eventdate DESC,eventhour ASC;";
 if ($user['usergroup'] == 'client'){
-    $sql = "select ev.id,DATE_FORMAT(ev.eventdate,'%d/%m/%Y') as eventdate,ev.eventhour,usr.userprename,usr.usersurname,ev.user_status,ev.client_status,ev.clientuuid,ev.useruuid from events ev LEFT JOIN users usr on (ev.id_user=usr.id) where ev.id_user=".$user['id']." and ev.eventdate >= CURRENT_DATE order by eventdate DESC,eventhour ASC;";
+    $sql = "select ev.id,DATE_FORMAT(ev.eventdate,'%d/%m/%Y') as eventdate,ev.eventoptions,ev.eventhour,usr.userprename,usr.usersurname,ev.user_status,ev.client_status,ev.clientuuid,ev.useruuid from events ev LEFT JOIN users usr on (ev.id_user=usr.id) where ev.id_client=".$user['id']." and ev.eventdate >= CURRENT_DATE order by eventdate DESC,eventhour ASC;";
 }
 $tablelist = $db->dbqueryall($sql);
 ?>
@@ -63,8 +63,13 @@ $tablelist = $db->dbqueryall($sql);
                     } else {
                       echo '<span class="text-warning">INCONNUE</span>';
                     }; ?></td>
-                <?php } ?>
+                <?php }  ?>
+                <?php if (($user["usergroup"] == 'client') && ($row["client_status"] == 'unconfirmed')){ ?>
+                  <td><button class="btn btn-success" onclick="location.href='<?php echo $baseurl; ?>/rendezvousevent?setstatus=confirm&uuid=<?php echo (($user['usergroup'] == 'client')?$row['clientuuid']:$row['useruuid']); ?>'"><i class="fas fa-check"></i></button>
+                  <button class="btn btn-danger" onclick="location.href='<?php echo $baseurl; ?>/rendezvousevent?setstatus=cancel&uuid=<?php echo (($user['usergroup'] == 'client')?$row['clientuuid']:$row['useruuid']); ?>'"><i class="fas fa-times"></i></button></td>
+                <?php }  else { ?>
                 <td><button class="btn btn-info" onclick="location.href='<?php echo $baseurl; ?>/rendezvousevent?uuid=<?php echo (($user['usergroup'] == 'client')?$row['clientuuid']:$row['useruuid']); ?>'"><i class="fas fa-edit"></i></button></td>
+                <?php } ?>
         </tr>
         <?php    
                 }
index 6a152df..4f510a7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 $sql = "select ev.id,DATE_FORMAT(ev.eventdate,'%d/%m/%Y') as eventdate,ev.eventhour,ev.eventoptions,usr.userprename,usr.usersurname,ev.user_status,ev.client_status,ev.clientuuid,ev.useruuid from events ev LEFT JOIN users usr on (ev.id_client=usr.id) where ev.id_user=".$user['id']." and ev.eventdate < CURRENT_DATE order by eventdate DESC,eventhour ASC;";
 if ($user['usergroup'] == 'client'){
-    $sql = "select ev.id,DATE_FORMAT(ev.eventdate,'%d/%m/%Y') as eventdate,ev.eventhour,usr.userprename,usr.usersurname,ev.user_status,ev.client_status,ev.clientuuid,ev.useruuid from events ev LEFT JOIN users usr on (ev.id_user=usr.id) where ev.id_user=".$user['id']." and ev.eventdate < CURRENT_DATE order by eventdate DESC,eventhour ASC;";
+    $sql = "select ev.id,DATE_FORMAT(ev.eventdate,'%d/%m/%Y') as eventdate,ev.eventhour,ev.eventoptions,usr.userprename,usr.usersurname,ev.user_status,ev.client_status,ev.clientuuid,ev.useruuid from events ev LEFT JOIN users usr on (ev.id_user=usr.id) where ev.id_client=".$user['id']." and ev.eventdate < CURRENT_DATE order by eventdate DESC,eventhour ASC;";
 }
 $tablelist = $db->dbqueryall($sql);
 ?>
@@ -14,7 +14,9 @@ $tablelist = $db->dbqueryall($sql);
         <th data-sortable="true">Options</th>
         <th data-sortable="true">Mon status</th>
         <th data-sortable="true">Status <?php echo (($user['usergroup'] == 'client')?'Avocat':'Client'); ?></th>
+        <?php if ($user["usergroup"] != "client") {  ?>
         <th>Action</th>
+        <?php  } ?>
         </tr></thead>
         <tbody>
         <?php
@@ -62,9 +64,16 @@ $tablelist = $db->dbqueryall($sql);
                       echo '<span class="text-success">CONFIRMÉ</span>';
                     } else {
                       echo '<span class="text-warning">INCONNUE</span>';
-                    }; ?></td>
+                    }; ?>
+                    </td>
+                    <?php if ($user["usergroup"] != "client") { ?>
+                      <td>
+                <button class="btn btn-danger" onclick="location.href='<?php echo $baseurl.'/profile/rendezvous/rendezvouslistold?action=deleterdv&id='.$row['id']; ?>';"><i class="fas fa-trash"></i></button>
+                </td>
+                <?php    } ?>
+                
+                
                 <?php } ?>
-                <td><button class="btn btn-danger" onclick="location.href='<?php echo $baseurl.'/profile/rendezvous/rendezvouslistold?action=deleterdv&id='.$row['id']; ?>';"><i class="fas fa-trash"></i></button></td>
         </tr>
         <?php    
                 }