コード例 #1
0
ファイル: matiereController.php プロジェクト: jpainam/cosba
 public function index()
 {
     if (!isAuth(209)) {
         return;
     }
     $this->view->clientsJS("matiere" . DS . "index");
     $matieres = $this->Matiere->selectAll();
     /* $this->Assign("content", (new View())->output(
        array('matieres' => $matieres,
        'errors' => false), false)); */
     $grid = new Grid($matieres, 0);
     $grid->addcolonne(0, 'IDMATIERE', 'IDMATIERE', false);
     $grid->addcolonne(1, 'Code', 'CODE', TRUE);
     $grid->addcolonne(2, 'Libellé', 'LIBELLE', TRUE);
     $grid->droitdelete = 515;
     $grid->droitedit = 514;
     $grid->editbutton = true;
     $grid->dataTable = "tableMatieres";
     $grid->editbuttontext = "Editer";
     $grid->deletebutton = true;
     $grid->deletebuttontext = "Supprimer";
     $grid->selectbutton = false;
     $total = count($matieres);
     $this->Assign("content", (new View())->output(array("matieres" => $grid->display(), "errors" => false, "total" => $total), false));
 }
コード例 #2
0
ファイル: personnelController.php プロジェクト: ktla/locan-2
 function index()
 {
     if (!isAuth(203)) {
         return;
     }
     $this->view->clientsJS("personnel" . DS . "personnel");
     $data = $this->Fonction->selectAll();
     $fonctions = new Combobox($data, "fonction", "IDFONCTION", "LIBELLE");
     $fonctions->first = "Toutes";
     $fonctions->onchange = "showPersonnelByFunction();";
     $data = $this->Personnel->selectAll();
     $personnels = new Grid($data, 0);
     $personnels->addcolonne(0, "IDPERSONNEL", "IDPERSONNEL", false);
     $personnels->addcolonne(1, "Civ", "CIVILITE");
     $personnels->addcolonne(2, "Matricule", "MATRICULE");
     $personnels->addcolonne(3, "Nom", "NOM");
     $personnels->addcolonne(4, "Prénom", "PRENOM");
     $personnels->addcolonne(5, "Fonction", "LIBELLE");
     $personnels->addcolonne(6, "Portable", "PORTABLE");
     $personnels->droitdelete = 507;
     $personnels->droitedit = 513;
     $personnels->dataTable = "tablePersonnel";
     $personnels->actionbutton = true;
     $personnels->deletebutton = true;
     $personnels->editbutton = true;
     $total = count($data);
     $this->Assign("content", (new View())->output(["fonctions" => $fonctions->view("50%"), "personnels" => $personnels->display(), "total" => $total], false));
 }
コード例 #3
0
ファイル: eleveController.php プロジェクト: ktla/locan-2
 private function showEleves()
 {
     $eleves = $this->Eleve->selectAll();
     $grid = new Grid($eleves, 0);
     $grid->addcolonne(0, "IDELEVE", "IDELEVE", false);
     $grid->addcolonne(1, "Matricule", "MATRICULE");
     $grid->addcolonne(2, "Nom et Prénom", "CNOM");
     $grid->addcolonne(3, "Sexe", "SEXE");
     $grid->addcolonne(4, "Date de Naiss.", "DATENAISS");
     $grid->setColDate(4);
     $grid->editbutton = true;
     $grid->deletebutton = true;
     $view = new View();
     $view->Assign("eleves", $grid->display());
     $view->Assign("errors", false);
     $view->Assign("total", count($eleves));
     $content = $view->Render("eleve" . DS . "showEleves", false);
     $this->Assign("content", $content);
 }
コード例 #4
0
ファイル: repertoireController.php プロジェクト: ktla/locan-2
 public function index()
 {
     if (!isAuth(206)) {
         return;
     }
     $view = new View();
     $this->view->clientsJS("repertoire" . DS . "index");
     $rep = $this->Repertoire->selectAll();
     $repertoires = new Grid($rep, 1);
     $repertoires->actionbutton = false;
     $repertoires->addcolonne(0, "CIVILITE", "CIVILITE");
     $repertoires->addcolonne(1, "NOM", "NOM");
     $repertoires->addcolonne(2, "TELEPHONE", "TELEPHONE");
     $repertoires->addcolonne(3, "PORTABLE", "PORTABLE");
     $repertoires->addcolonne(4, "EMAIL", "EMAIL");
     $repertoires->dataTable = "tableRepertoire";
     $view->Assign("total", count($rep));
     $view->Assign("repertoires", $repertoires->display());
     $content = $view->Render("repertoire" . DS . "index", false);
     $this->Assign("content", $content);
 }
コード例 #5
0
ファイル: fraisController.php プロジェクト: jpainam/cosba
 public function index()
 {
     if (!isAuth(211)) {
         return;
     }
     $this->view->clientsJS("frais" . DS . "index");
     $view = new View();
     $frais = $this->Frais->getFrais($this->session->anneeacademique);
     $grid = new Grid($frais, 0);
     $grid->addcolonne(0, "IDFRAIS", "IDFRAIS", false);
     $grid->addcolonne(1, "Classe", "LIBELLE");
     $grid->addcolonne(2, "Niveau", "NIVEAUHTML");
     $grid->addcolonne(3, "Description du frais", "DESCRIPTION");
     $grid->addcolonne(4, "Montant", "MONTANT");
     $grid->addcolonne(5, "Echéances", "ECHEANCES");
     $grid->dataTable = "fraisTable";
     $grid->actionbutton = true;
     $grid->deletebutton = true;
     $grid->droitdelete = 510;
     $grid->droitedit = 511;
     $grid->setColDate(5);
     $view->Assign("frais", $grid->display());
     $content = $view->Render("frais" . DS . "index", false);
     $this->Assign("content", $content);
 }
コード例 #6
0
ファイル: classeController.php プロジェクト: ktla/locan-2
 private function showClasses()
 {
     $classes = $this->Classe->selectAll();
     $grid = new Grid($classes, 0);
     $grid->addcolonne(0, "ID", "IDCLASSE", false);
     $grid->addcolonne(1, "Code", "NIVEAUSELECT");
     $grid->addcolonne(2, "Libellé", "LIBELLE");
     $grid->addcolonne(3, "Découpage", "FK_DECOUPAGE");
     $grid->editbutton = true;
     $grid->deletebutton = true;
     $grid->droitedit = 517;
     $grid->droitdelete = 518;
     /* $this->Assign("content", (new View())->output(array("classes",
        $grid->display(),
        "errors", false), false)); */
     $view = new View();
     $view->Assign("classes", $grid->display());
     $view->Assign("errors", false);
     $view->Assign("total", count($classes));
     $content = $view->Render("classe" . DS . "showClasses", false);
     $this->Assign("content", $content);
 }
コード例 #7
0
ファイル: fraisController.php プロジェクト: ktla/locan-2
 public function index()
 {
     if (!isAuth(211)) {
         return;
     }
     $this->view->clientsJS("frais" . DS . "frais");
     $view = new View();
     $frais = $this->Frais->getFrais($this->session->anneeacademique);
     $grid = new Grid($frais, 0);
     $grid->addcolonne(0, "IDFRAIS", "IDFRAIS", false);
     $grid->addcolonne(1, "CLASSE", "LIBELLE");
     $grid->addcolonne(2, "Description du frais", "DESCRIPTION");
     $grid->addcolonne(3, "MONTANT", "MONTANT");
     $grid->addcolonne(4, "ECHEANCES", "ECHEANCES");
     //510: Droit de suppression des frais scolaires
     if (isAuth(510)) {
         $grid->actionbutton = true;
         $grid->deletebutton = true;
     }
     $view->Assign("frais", $grid->display());
     $content = $view->Render("frais" . DS . "index", false);
     $this->Assign("content", $content);
 }
コード例 #8
0
 public function index()
 {
     if (!isAuth(201)) {
         return;
     }
     $this->view->clientsJS("etablissement" . DS . "index");
     $view = new View();
     $ets = $this->Locan->selectAll()[0];
     $view->Assign("ets", $ets['NOM']);
     $view->Assign("responsable", $ets['RESPONSABLE']);
     $view->Assign("adresse", $ets['ADRESSE']);
     $view->Assign("tel1", $ets['TELEPHONE']);
     $view->Assign("tel2", $ets['TELEPHONE2']);
     $view->Assign("mobile", $ets['MOBILE']);
     $view->Assign("email", $ets['EMAIL']);
     $data = $this->Personnel->selectAll();
     $personnels = new Grid($data, 2);
     $personnels->dataTable = "persoTable";
     $personnels->addcolonne(1, "Civ", "CIVILITE");
     $personnels->addcolonne(2, "Matricule", "IDPERSONNEL", false);
     $personnels->addcolonne(3, "Nom", "NOM");
     $personnels->addcolonne(4, "Prénom", "PRENOM");
     $personnels->addcolonne(5, "Fonction", "LIBELLE");
     $personnels->addcolonne(6, "Téléphone", "TELEPHONE");
     $personnels->actionbutton = false;
     $view->Assign("personnels", $personnels->display());
     $data = $this->Eleve->selectAllInscrit();
     $eleves = new Grid($data, 0);
     $eleves->dataTable = "eleveTable";
     $eleves->addcolonne(0, "IDELEVE", "IDELEVE", false);
     $eleves->addcolonne(1, "Matricule", "MATRICULE");
     $eleves->addcolonne(2, "Nom", "NOM");
     $eleves->addcolonne(3, "Prenom", "PRENOM");
     $eleves->addcolonne(4, "Sexe", "SEXE");
     $eleves->addcolonne(5, "Classe", "NIVEAUHTML");
     $eleves->addcolonne(6, "Naissance", "DATENAISS");
     $eleves->actionbutton = false;
     $eleves->setColDate(6);
     $view->Assign("eleves", $eleves->display());
     $content = $view->Render("etablissement" . DS . "index", false);
     $this->Assign("content", $content);
 }
コード例 #9
0
 public function index()
 {
     $data = $this->Responsable->selectAll();
     $responsable = new Grid($data, 0);
     $responsable->addcolonne(0, "IDRESPONSABLE", "IDRESPONSABLE", false);
     $responsable->addcolonne(1, "Civ.", "CIVILITE");
     $responsable->addcolonne(2, "NOM & PRENOM", "CNOM");
     $responsable->addcolonne(3, "TELEPHONE", "TELEPHONE");
     $responsable->addcolonne(4, "PORTABLE", "PORTABLE");
     $responsable->addcolonne(5, "EMAIL", "EMAIL");
     $responsable->droitdelete = 318;
     $responsable->droitedit = 317;
     $responsable->actionbutton = true;
     $responsable->deletebutton = true;
     $responsable->editbutton = true;
     $responsable->dataTable = "responsableTable";
     $view = new View();
     $view->Assign("responsables", $responsable->display());
     $view->Assign("total", count($data));
     $content = $view->Render("responsable" . DS . "index", false);
     $this->Assign("content", $content);
 }
コード例 #10
0
ファイル: userController.php プロジェクト: ktla/locan-2
 /**
  * Ajax utiliser dans la page index de user
  */
 public function ajax()
 {
     //Envoyer les infos de l'utilisateur
     $user = $this->User->findSingleRowBy(["IDUSER" => $this->request->iduser]);
     $view = new View();
     $data = $this->User->mesConnexions($user["LOGIN"]);
     $grid = new Grid($data, 0);
     $grid->addcolonne(0, "IDCONNEXION", "IDCONNEXION", false);
     $grid->addcolonne(1, "Date de début", "DATEDEBUT");
     $grid->addcolonne(2, "Machine", "MACHINESOURCE");
     $grid->addcolonne(3, "Adresse", "IPSOURCE");
     $grid->addcolonne(4, "Connexion", "CONNEXION");
     $grid->addcolonne(5, "Date de fin", "DATEFIN");
     $grid->addcolonne(6, "Déconnexion", "DECONNEXION");
     $grid->setColDate(1);
     $grid->setColDate(5);
     $grid->actionbutton = true;
     $grid->deletebutton = true;
     $grid->editbutton = false;
     $total = count($data);
     $view->Assign("connexions", $grid->display());
     //Droit de l'utilisateur
     $this->loadModel("droit");
     $droits = $this->Droit->selectAll();
     $mesdroits = json_decode($user["DROITSPECIFIQUE"]);
     $view->Assign("droits", $droits);
     $view->Assign("mesdroits", $mesdroits);
     /*
      * Variables de l'onglet 1
      */
     $view->Assign("login", $user['LOGIN']);
     $this->loadModel("profile");
     $profile = $this->Profile->findSingleRowBy(["IDPROFILE" => $user['PROFILE']]);
     $view->Assign("profile", $profile['PROFILE']);
     $view->Assign("actif", $user['ACTIF'] == 1 ? 'Actif' : 'Non Actif');
     //information du personnel
     $this->loadModel("personnel");
     $pers = $this->Personnel->findSingleRowBy(["USER" => $this->request->iduser]);
     $view->Assign("idpersonnel", $pers['IDPERSONNEL']);
     $view->Assign("civilite", $pers['CIVILITE']);
     $view->Assign("nom", $pers['NOM']);
     $view->Assign("prenom", $pers['PRENOM']);
     $view->Assign("autrenom", $pers['AUTRENOM']);
     $this->loadModel("fonction");
     $fonction = $this->Fonction->findSingleRowBy(["IDFONCTION" => $pers['FONCTION']]);
     $view->Assign("fonction", $fonction['LIBELLE']);
     $view->Assign("grade", $pers['GRADE']);
     $view->Assign("datenaiss", $pers['DATENAISS']);
     $view->Assign("portable", $pers['PORTABLE']);
     $view->Assign("telephone", $pers['TELEPHONE']);
     $view->Assign("email", $pers['EMAIL']);
     $arr = array();
     $arr[0] = $view->Render("user" . DS . "ajax" . DS . "onglet1", false);
     $arr[1] = $view->Render("user" . DS . "ajax" . DS . "onglet2", false);
     $arr[2] = $view->Render("user" . DS . "ajax" . DS . "onglet3", false);
     $arr[3] = $total;
     echo json_encode($arr);
 }