From: Kilian Saffran Date: Mon, 25 Mar 2019 17:10:06 +0000 (+0100) Subject: rdvevent setstatus public users X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=54cac26d5bbae83b1123814412256ffb538d4506;p=juridig.git rdvevent setstatus public users --- diff --git a/lib/process_rdv.php b/lib/process_rdv.php index 2f75d04..3cea404 100644 --- a/lib/process_rdv.php +++ b/lib/process_rdv.php @@ -67,7 +67,7 @@ function rdv_changestatus($rdv){ from events ev left join users usr on (ev.id_user=usr.id) left join users cl on (ev.id_client=cl.id) where ev.clientuuid='".$db->secvalue($rdv["uuid"])."' or ev.useruuid='".$db->secvalue($rdv["uuid"])."'"; - + $event = $db->dbquery($sql); $sql = ""; $newrdv = 0; @@ -89,7 +89,7 @@ function rdv_changestatus($rdv){ $sql = "UPDATE events SET user_status='canceled' where useruuid='".$rdv["uuid"]."'"; } } - + if ($sql != ""){ $res = $db->dbexec($sql); if ($res !== false){ diff --git a/lib/processdata.php b/lib/processdata.php index daa9239..ca61408 100644 --- a/lib/processdata.php +++ b/lib/processdata.php @@ -77,7 +77,7 @@ function process_postdata($pdt){ function process_getdata($gdt){ global $baseurl,$p,$db,$user,$sp; - // print_r($gdt); + if ($user != null){ if (isset($gdt["action"])){ switch ($gdt['action']){ @@ -109,13 +109,14 @@ function process_getdata($gdt){ break; } } - if (isset($gdt["uuid"]) && isset($gdt["setstatus"])){ - rdv_changestatus($gdt); - } if (isset($gdt["enable"])){ enable_app($gdt); } - } + } + + if (isset($gdt["uuid"]) && isset($gdt["setstatus"])){ + rdv_changestatus($gdt); + } } function generateRandomString($length = 40) { diff --git a/tmpl/pages/rendezvousevent.php b/tmpl/pages/rendezvousevent.php index f5403f1..b69ba68 100644 --- a/tmpl/pages/rendezvousevent.php +++ b/tmpl/pages/rendezvousevent.php @@ -10,31 +10,10 @@ left join users usr on (ev.id_user=usr.id) left join users cl on (ev.id_client=cl.id) where ev.clientuuid='".$db->secvalue($_GET["uuid"])."' or ev.useruuid='".$db->secvalue($_GET["uuid"])."'"; $event = $db->dbquery($sql); + } if ($event != null){ if ($_GET["uuid"] == $event["clientuuid"]){ - if ($event["client_status"] == 'unconfirmed'){ - ?> -
-
-
-
-

Merci pour votre demande de rendez-vous,
Nous vous avons envoyé un email avec un liens pout confirmer votre demande de rendezvous!
-

- "/> -
- - -
- -
-

-
-
-
-
-
@@ -84,7 +63,7 @@