remove company data
authorKilian Saffran <ksaffran@dks.lu>
Mon, 11 Mar 2019 15:24:55 +0000 (16:24 +0100)
committerKilian Saffran <ksaffran@dks.lu>
Mon, 11 Mar 2019 15:24:55 +0000 (16:24 +0100)
lib/processdata.php
tmpl/pages/profile/addcompanyuser.php [deleted file]
tmpl/pages/profile/deletecompanyprofile.php [deleted file]
tmpl/pages/profile/etudeusers.php [deleted file]
tmpl/pages/profile/profile.php
tmpl/pages/profile/profileetude.php [deleted file]

index 6b28fa8..ffef6ac 100644 (file)
                     if (!isset($pdt["uservisibility"])) { $pdt["uservisibility"] = "";}
                     save_data('users',$pdt);
                     break;
-                case 'submit_profileetude':
-                    if (!isset($pdt["companyvisibility"])) { $pdt["companyvisibility"] = "";}
-                    save_data('company',$pdt);
-                    break;
-                case 'submit_deletecompanyprofile':
-                    delete_profile_company($pdt);
-                    break;
+                // case 'submit_profileetude':
+                //     if (!isset($pdt["companyvisibility"])) { $pdt["companyvisibility"] = "";}
+                //     save_data('company',$pdt);
+                //     break;
+                // case 'submit_deletecompanyprofile':
+                //     delete_profile_company($pdt);
+                //     break;
                 case 'submit_deleteuserprofile':
                     delete_profile_user($pdt);
                     break;
@@ -41,9 +41,9 @@
                 case 'submit_timesheet':
                     save_data('timesheets',$pdt);
                     break;
-                case 'submit_addcompanyprofile':
-                    send_company_invitation($pdt);
-                    break;
+                // case 'submit_addcompanyprofile':
+                //     send_company_invitation($pdt);
+                //     break;
                   
             }
         } else {
         return $rows;
     }
 
-    function send_company_invitation($pdt){
+    // function send_company_invitation($pdt){
 
-    }
+    // }
 
-    function delete_profile_company($pdt){
+    // function delete_profile_company($pdt){
 
-    }
+    // }
 
     function delete_profile_user($pdt){
 
diff --git a/tmpl/pages/profile/addcompanyuser.php b/tmpl/pages/profile/addcompanyuser.php
deleted file mode 100644 (file)
index 3248359..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-?>
-<form id="dksrdv_addcompanyuser" name="dksrdv_addcompanyuser" class="dks needs-validation" method="POST" novalidate>
-  <input type="hidden" name="id_user" value="<?php echo $user['id']; ?>" />
-<div class="row card">
-      <div class="card-header"><h5>Ajouter un utilisateur</h5></div>
-      <div class="card-body row">
-        <div class="col-sm-4">
-          <div class="form-group">
-              <label for="useremail">Email (...@barreau.lu) du avocat à inviter</label>
-              <input type="email" class="form-control" id="useremail" name="useremail" required value="">
-          </div>
-          <div class="form-group">
-              <button class="btn btn-primary" type="submit" name="submit_addcompanyprofile">Envoyer la demande</button> 
-          </div>
-        </div>
-      </div>
-</div>
-</form>
\ No newline at end of file
diff --git a/tmpl/pages/profile/deletecompanyprofile.php b/tmpl/pages/profile/deletecompanyprofile.php
deleted file mode 100644 (file)
index 0db0c81..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<form id="dksrdv_deletecompanyprofile" name="dksrdv_deleteprofile" class="dks needs-validation" method="POST" novalidate>
-    <div class="card">
-        <h5>êtes vous sûre de vouloir supprimer profile d'étude?</h5>
-        <button type="submit" name="submit_deletecompanyprofile" class="btn btn-danger" >Supprimer maintenant</button>
-    </div>
-</form>
-<script type="text/javascript">
-            function initdata(){
-                initstandard();
-            }
-        </script>
\ No newline at end of file
diff --git a/tmpl/pages/profile/etudeusers.php b/tmpl/pages/profile/etudeusers.php
deleted file mode 100644 (file)
index 5edf917..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php 
-  $where = " usr.id=".$user['id'];
-  if ($user['id_company'] != null){
-    $where = " usr.id_company=".$user['id_company'];
-  }
-  $sql = "select usr.id,usr.useremail,CONCAT(usr.userprename,' ',usr.usersurname) as username, usr.uservisibility,
-  case when usrv.service = 'rendezvous' then 1 else null end as apprendezvous,
-  case when usrv.service = 'billjee' then 1 else null end as appbilljee
-  from users usr LEFT join userservices usrv on (usr.id=usrv.id_user) where ".$where." group by usr.id;";
-  $tablelist = $db->dbqueryall($sql);
-?>
-<h5>Utilistateurs d'étude</h5>
-<table class="table table-striped table-bordered"  data-toggle="table">
-<thead class="thead-dark"><tr>
-<th data-sortable="true">Email</th>
-<th data-sortable="true">Nom</th>
-<th data-sortable="true">Annuaire</th>
-<th data-sortable="true">Rendez-Vous</th>
-<th data-sortable="true">Billjee</th>
-<th data-width="120">
-  <button class="btn btn-primary" onclick="location.href='<?php echo $baseurl; ?>/profile/addcompanyuser';"><i class="fas fa-plus"></i></button>
- </th>
-</tr></thead>
-        <tbody>
-            <?php
-                foreach ($tablelist as $row){
-            ?>
-            <tr data-id="<?php echo $row['id']; ?>">
-                <td><?php echo $row['useremail']; ?></td>
-                <td><?php echo $row['username']; ?></td>
-                <td><?php echo (($row['uservisibility'] == 1)?'<i class="fas fa-check"></i>':''); ?></td>
-                <td><?php echo (($row['apprendezvous'] == 1)?'<i class="fas fa-check"></i>':''); ?></td>
-                <td><?php echo (($row['appbilljee'] == 1)?'<i class="fas fa-check"></i>':''); ?></td>
-                <td>
-                  <?php
-                    if (count($tablelist) > 1){
-                      ?>
-                        <button class="btn btn-danger" onclick="location.href='<?php echo $baseurl; ?>/profile/etudeusers?action=removeuser&id=<?php echo $row['id']; ?>"><i class="fas fa-trash"></i></button>
-                      <?php  
-                    }
-                    
-                  ?>
-                </td>
-            </tr>
-            <?php    
-                }
-            ?>
-        </tbody>
-</table>
\ No newline at end of file
index f84a03b..b584c66 100644 (file)
         <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>
-        <?php
-          if ($user['usergroup'] != 'client'){
-            ?>
-            <h6 class="dropdown-header">Profile d'Étude</h6>
-            <a class="dropdown-item" href="<?php echo $baseurl; ?>/profile/profileetude">Profile d'Étude</a>
-            <a class="dropdown-item" href="<?php echo $baseurl; ?>/profile/etudeusers">Avocats d'Étude</a>
-            <a class="dropdown-item" href="<?php echo $baseurl; ?>/profile/deletecompanyprofile">Supprimer le profile</a>
-            <?php
-          }
-        ?>
+       
         
         <div class="dropdown-divider"></div>
         <?php
diff --git a/tmpl/pages/profile/profileetude.php b/tmpl/pages/profile/profileetude.php
deleted file mode 100644 (file)
index 33f917a..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-  $sql = "select * from company where id=(select id_company from users where id='".$user['id']."');";
-  $company = $db->dbquery($sql);
-?>
-  <form id="dksrdv_companyprofile" name="dksrdv_companyprofile" class="dks needs-validation" method="POST" novalidate>
-  <input type="hidden" name="id" value="<?php echo $company['id']; ?>" />
-<div class="row card">
-      <div class="card-header"><h5>Profile d'Étude</h5></div>
-      <div class="card-body row">
-
-<div class="col-sm-3">
-                      <h6>Coordonnées</h6>  
-                      <div class="form-group">
-                                  <label for="companyname">Nom de l'Étude</label>
-                                  <input type="text" class="form-control" id="companyname" name="companyname" value="<?php echo $company['companyname']; ?>">
-                              </div>
-                          <div class="form-group">
-                              <label for="companyemail">Email <sup>(*)</sup></label>
-                              <input type="email" class="form-control" id="companyemail" name="companyemail"   required  value="<?php echo $company['companyemail']; ?>">
-                         
-                          </div>
-                          <div class="form-group">
-                              <label for="companyphone">Phone</label>
-                              <input type="text" class="form-control" id="companyphone" name="companyphone" value="<?php echo $company['companyphone']; ?>">
-                          </div>
-                         
-                          
-                          <div class="form-group">
-                              <label for="companyaddress">addresse</label>
-                              <input type="text" class="form-control" id="companyaddress" name="companyaddress" value="<?php echo $company['companyaddress']; ?>">
-                          </div>
-                          <div class="form-group">
-                              <label for="companyzip">code postale</label>
-                              <input type="text" class="form-control" id="companyzip" name="companyzip" value="<?php echo $company['companyzip']; ?>">
-                          </div>
-                          <div class="form-group">
-                              <label for="companycity">Ville</label>
-                              <input type="text" class="form-control" id="companycity" name="companycity" value="<?php echo $company['companycity']; ?>">
-                          </div> 
-                  
-              </div>
-          
-              <div class="col-sm-8">
-              <h6>Descriptions</h6>
-              <div class="col-sm-12">
-                  <div class="row">
-                      
-                      
-                      <div class="col-sm-4">
-                          <img src="<?php echo (($company["companyphoto"] != '')?$company["companyphoto"]:$baseurl.'/img/no-image.png'); ?>" style="width: 150px; max-width: 150px; max-height: 150px;" id="preview"/>
-                      </div>
-  <div class="col-sm-8">
-          <div class="input-group">
-                  <div class="input-group-prepend">
-                    <span class="input-group-text" id="inputFile">Photo</span>
-                  </div>
-                  <div class="custom-file">
-                    <input type="file" class="custom-file-input" id="files" aria-describedby="inputFile" >
-                    <label class="custom-file-label" for="files">Selection fichier</label>
-                  </div>
-                </div>
-      <!-- <input type="file" id="photo" class="btn btn-info" /> -->
-    <!-- <button type="button" class="btn btn-info" >Ajouter/Remplayer Photo</button> -->
-    <a class="btn btn-danger" onclick="javascript:removephoto('company');"><i class="fas fa-trash"></i>&nbsp;supprimer la photo</a>
-  </div>
-</div>
-                  </div>
-              <div class="form-group">
-                <label for="companyspecialisations">Spécialisations</label>
-                  <input type="text" class="form-control" id="companyspecialisations" name="companyspecialisations" data-role="tagsinput"    value="<?php echo $company['companyspecialisations']; ?>">
-                </div>
-                <div class="row">
-                  <div class="col-sm-6">
-                  <div class="form-group">
-                    <label for="companyvisibility">Visualiser profile dans l'annuaire</label>
-                    <input type="checkbox" class="form-control" value="1" id="companyvisibility" name="companyvisibility" <?php echo (($company['companyvisibility'] == 1)? "checked":"") ?> />
-                    
-                  </div>
-                </div>
-                <div class="col-sm-6">
-                <div class="form-group">
-                <label for="companyprice">Prix mandataire (à partir de)</label>
-                <div class="input-group">
-                  <input type="text" class="form-control" style="text-align: right;" id="companyprice" name="companyprice" pattern="[0-9,]+" value="<?php echo $company['companyprice']; ?>">
-                  <div class="input-group-append">
-    <div class="input-group-text">&euro;</div>
-  </div>
-                  </div>
-                </div>
-                </div>
-                </div>
-                <div class="form-group">
-                  <label for="companydescription">Description individuelle</label>
-                    <textarea class="form-control richeditarea" rows="5" id="companydescription" name="companydescription"><?php echo $company['companydescription']; ?></textarea>
-                  </div>
-                  <div class="row">
-                  <div class="col-sm-12">
-                  <label for="companydescription">mes horaires de consultation</label>
-                  </div>
-                  <div class="col-sm-6">
-                    <div class="form-group">
-                    <label for="consultmon">Lundi</label>
-                    <input type="text" class="form-control" id="consultmo" name="consultmon" value="<?php echo $company['consultmon']; ?>"    >  
-                    </div>
-                    <div class="form-group">
-                    <label for="consulttue">Mardi</label><input type="text" class="form-control" id="consulttu" name="consulttue" value="<?php echo $company['consulttue']; ?>"    >  
-                    </div>
-                    <div class="form-group">
-                    <label for="consultwed">Merceredi</label><input type="text" class="form-control" id="consultwe" name="consultwed" value="<?php echo $company['consultwed']; ?>"    >  
-                    </div>
-                    <div class="form-group">
-                    <label for="consultthu">Jeudi</label><input type="text" class="form-control" id="consultth" name="consultthu" value="<?php echo $company['consultthu']; ?>"    >  
-                    </div>
-                  </div>
-                  <div class="col-sm-6">
-                    <div class="form-group">
-                    <label for="consultfri">Vendredi</label><input type="text" class="form-control" id="consultfr" name="consultfri" value="<?php echo $company['consultfri']; ?>"    >  
-                    </div>
-                    <div class="form-group">
-                    <label for="consultsat">Samedi</label><input type="text" class="form-control" id="consultsa" name="consultsat" value="<?php echo $company['consultsat']; ?>"   >  
-                    </div>
-                    <div class="form-group">
-                    <label for="consultsun">Dimanche</label><input type="text" class="form-control" id="consultsu" name="consultsun" value="<?php echo $company['consultsun']; ?>"   >  
-                    </div>
-                  </div>
-                  </div>
-                  
-              </div>
-
-              <div class="col-sm-12">
-                <button class="btn btn-primary" type="submit" name="submit_profileetude">Sauvegarder</button> 
-                
-                <p><small>(*) champs requis</small></p>
-              </div>
-             
-              </div>
-</form>
-<script type="text/javascript">
-var defaultphoto="<?php echo $baseurl; ?>/img/no-image.png";
-  function initdata(){
-    document.getElementById('files').addEventListener('change', handleFileSelect, false);           
-   initstandard();
-}
-</script>
-</div>
-</div>