public function frmUpdate($id = NULL) { $object = $this->getInstance($id); $icons = array("asterisk", "plus", "euro", "eur", "minus", "cloud", "envelope", "pencil", "glass", "music", "search", "heart", "star", "star-empty", "user", "film", "th-large", "th", "th-list", "ok", "remove", "zoom-in", "zoom-out", "off", "signal", "cog", "trash", "home", "file", "time", "road", "download-alt", "download", "upload", "inbox", "play-circle", "repeat", "refresh", "list-alt", "lock", "flag", "headphones", "volume-off", "volume-down", "volume-up", "qrcode", "barcode", "tag", "tags", "book", "bookmark", "print", "camera", "font", "bold", "italic", "text-height", "text-width", "align-left", "align-center", "align-right", "align-justify", "list", "indent-left", "indent-right", "facetime-video", "picture", "map-marker", "adjust", "tint", "edit", "share", "check", "move", "step-backward", "fast-backward", "backward", "play", "pause", "stop", "forward", "fast-forward", "step-forward", "eject", "chevron-left", "chevron-right", "plus-sign", "minus-sign", "remove-sign", "ok-sign", "question-sign", "info-sign", "screenshot", "remove-circle", "ok-circle", "ban-circle", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "share-alt", "resize-full", "resize-small", "exclamation-sign", "gift", "leaf", "fire", "eye-open", "eye-close", "warning-sign", "plane", "calendar", "random", "comment", "magnet", "chevron-up", "chevron-down", "retweet", "shopping-cart", "folder-close", "folder-open", "resize-vertical", "resize-horizontal", "hdd", "bullhorn", "bell", "certificate", "thumbs-up", "thumbs-down", "hand-right", "hand-left", "hand-up", "hand-down", "circle-arrow-right", "circle-arrow-left", "circle-arrow-up", "circle-arrow-down", "globe", "wrench", "tasks", "filter", "briefcase", "fullscreen", "dashboard", "paperclip", "heart-empty", "link", "phone", "pushpin", "usd", "gbp", "sort", "sort-by-alphabet", "sort-by-alphabet-alt", "sort-by-order", "sort-by-order-alt", "sort-by-attributes", "sort-by-attributes-alt", "unchecked", "expand", "collapse-down", "collapse-up", "log-in", "flash", "log-out", "new-window", "record", "save", "open", "saved", "import", "export", "send", "floppy-disk", "floppy-saved", "floppy-remove", "floppy-save", "floppy-open", "credit-card", "transfer", "cutlery", "header", "compressed", "earphone", "phone-alt", "tower", "stats", "sd-video", "hd-video", "subtitles", "sound-stereo", "sound-dolby", "sound-5-1", "sound-6-1", "sound-7-1", "copyright-mark", "registration-mark", "cloud-download", "cloud-upload", "tree-conifer", "tree-deciduous", "cd", "save-file", "open-file", "level-up", "copy", "paste", "alert", "equalizer", "king", "queen", "pawn", "bishop", "knight", "baby-formula", "tent", "blackboard", "bed", "apple", "erase", "hourglass", "lamp", "duplicate", "piggy-bank", "scissors", "bitcoin", "yen", "ruble", "scale", "ice-lolly", "ice-lolly-tasted", "education", "option-horizontal", "option-vertical", "menu-hamburger", "modal-window", "oil", "grain", "sunglasses", "text-size", "text-color", "text-background", "object-align-top", "object-align-bottom", "object-align-horizontal", "object-align-left", "object-align-vertical", "object-align-right", "triangle-right", "triangle-left", "triangle-bottom", "triangle-top", "console", "superscript", "subscript", "menu-left", "menu-right", "menu-down", "menu-up"); $list = Gui::select($icons, $object->getIcon(), "Sélectionner une icône..."); $this->loadView("statut/vUpdate", array("select" => $list, "statut" => $object)); }
public function frm($id=NULL){ if(Auth::isAdmin() || ($id == Auth::getUser()->getId())){ $user=$this->getInstance($id); $groups = DAO::getAll("Groupe"); $listGrp=Gui::select($groups,$user->getGroupe()->getId(),"Sélectionner un Groupe ..."); $this->loadView("user/vAdd",array("user"=>$user, "groups"=>$listGrp)); }else{ $this->forward("users"); } }
public function frm($id=NULL){ $object=$this->getInstance($id); $categories=DAO::getAll("Categorie"); $idParent=-1; if(null!==$object->getCategorie()){ $idParent=$object->getCategorie()->getId(); } $list=Gui::select($categories,$idParent,"Sélectionner une catégorie parente..."); $this->loadView("categorie/vAdd",array("select"=>$list,"categorie"=>$object)); }
public function index($id=NULL){ $select=$this->getInstance($id); $genericFields=DAO::getAll("GenericField"); if($select->getLibelle()==null){ $champ=-1; }else{ $champ=$select->getLibelle()->getId(); } $listGenericField=Gui::select($genericFields,$champ,"Sélectionner un champ ..."); // $this->loadView("genericField/vSelect", array("genericFields"=>$genericFields)); // if(){}; }
public function frm($id = NULL) { $ticket = $this->getInstance($id); $categories = DAO::getAll("Categorie"); if ($ticket->getCategorie() == null) { $cat = -1; } else { $cat = $ticket->getCategorie()->getId(); } $listCat = Gui::select($categories, $cat, "Sélectionner une catégorie ..."); $listType = Gui::select(array("demande", "intervention"), $ticket->getType(), "Sélectionner un type ..."); $this->loadView("ticket/vAdd", array("ticket" => $ticket, "listCat" => $listCat, "listType" => $listType)); echo Jquery::execute("CKEDITOR.replace( 'description');"); }
public function modifierArticle($id) { $a = $this->getInstance($id[0]); $id = $a->getId(); $contenu = $a->getContenu(); $titre = $a->getTitre(); $user = $a->getUser(); $version = $a->getVersion(); $dateCreation = $a->getDateCreation(); $categorie = $a->getCategorie(); $popularity = $a->getPopularity(); $suspendre = $a->getSuspendre(); $categories = DAO::getAll("Categorie"); $listCat = Gui::select($categories, $categorie); $this->loadView("faq/vModif", array("suspendre" => $suspendre, "faqs" => $a, "titre" => $titre, "contenu" => $contenu, "user" => $user, "version" => $version, "dateCreation" => $dateCreation, "categorie" => $categorie, "popularity" => $popularity, "id" => $id, "listCat" => $listCat)); }
public function frm($id=NULL){ global $config; $faq=$this->getInstance($id); $faq->setUser(DAO::getAll("User", "id=".$faq->getUser()->getId())[0]); $categories=DAO::getAll("Categorie"); if($faq->getCategorie()==null){ $cat=-1; }else{ $cat=$faq->getCategorie()->getId(); } $listCat=Gui::select($categories,$cat,"Sélectionner une catégorie ..."); $this->loadView("faq/vAdd",array("faq"=>$faq,"listCat"=>$listCat)); if(!$config["test"]) echo Jquery::execute("CKEDITOR.replace('contenu');"); }
public function frm($id = NULL) { $ticket = $this->getInstance($id); $categories = DAO::getAll("Categorie"); $statut = DAO::getAll("Statut"); if ($ticket->getCategorie() == null) { $cat = -1; $stat = -1; } else { $cat = $ticket->getCategorie()->getId(); $stat = $ticket->getStatut()->getId(); } $listCat = Gui::select($categories, $cat, "Sélectionner une catégorie ..."); $listStatut = Gui::select($statut, $stat, "Sélectionner un statut ..."); $listType = Gui::select(array("demande", "intervention"), $ticket->getType(), "Sélectionner un type ..."); $stat = $ticket->getStatut()->getId(); $this->loadView("ticket/vAdd", array("ticket" => $ticket, "listCat" => $listCat, "listType" => $listType, "statut" => $statut, "listStatut" => $listStatut)); echo Jquery::execute("CKEDITOR.replace( 'description');"); //updteticket //s$statutUpdate='coucou1'; /* '<select class="form-control" class="idStatut" name="idStatut"><br>$listStatut<br></select>'; */ }
public function frm($id = NULL) { if (Auth::isAdmin()) { $faq = $this->getInstance($id); $categories = DAO::getAll("Categorie"); if ($faq->getCategorie() == null) { $cat = -1; } else { $cat = $faq->getCategorie()->getId(); } $listCat = Gui::select($categories, $cat, "Sélectionner une catégorie ..."); if (isset($id)) { $ajou_modif = "Modifier"; $this->loadView("faq/vUpdateTitre", array("faq" => $faq, "ajou_modif" => $ajou_modif, "idCategorie" => $cat, "listCat" => $listCat)); } else { $ajou_modif = "Ajouter"; $this->loadView("faq/vUpdateTitre", array("faq" => $faq, "ajou_modif" => $ajou_modif, "idCategorie" => $cat, "listCat" => $listCat)); } } else { echo "Vous devez vous connecter en tant qu'administrateur pour accéder à ce module"; } echo Jquery::execute("CKEDITOR.replace( 'contenu');"); }
public function updateStatut($id = NULL) { $ticket = $this->getInstance($id); $statut = DAO::getAll("Statut"); if ($ticket->getStatut() == null) { $stat = -1; } else { $stat = $ticket->getStatut()->getId(); } $listStatut = Gui::select($statut, $stat, "Sélectionner un statut ..."); $statuts = DAO::getAll("Statut", "1=1"); $this->loadView("ticket/vStatut", array("ticket" => $ticket, "listStatut" => $statuts)); }
public function ajaxCount() { $nb = sizeof(@$_POST["user"]); echo "<input type='hidden' id='res' value='" . $nb . "'>"; echo Gui::pluriel("Utilisateur désactivé", "Utilisateurs désactivés", $nb); }
public function frm($id=NULL){ $ticket=$this->getInstance($id); if ($ticket->getTitre() != "") { $notif = DAO::getOne("Notification", 'idUser = '******' AND idTicket = '.$ticket->getId()); if ($notif != null) { DAO::delete($notif); } } //recuperer les message associé au ticket DAO::getOneToMany($ticket,"messages"); $messages=$ticket->getMessages(); foreach ($messages as $message){ $message->setUser(DAO::getAll("User", "id=".$message->getUser()->getId())[0]); } //recuperer la ou les catégorie(s) du ticket $categories=DAO::getAll("Categorie"); if($ticket->getCategorie()==null){ $cat=-1; }else{ $cat=$ticket->getCategorie()->getId(); } //permet la séléction d'une catégorie $listCat=Gui::select($categories,$cat,"Sélectionner une catégorie ..."); $listType=Gui::select(array("demande","incident"),$ticket->getType(),"Sélectionner un type ..."); //affiche la vue vAdd du ticket $this->loadView("ticket/vAdd",array("ticket"=>$ticket,"listCat"=>$listCat,"listType"=>$listType)); //affiche la vue permettant l'affichage des information du ticket $this->loadView("ticket/vInfoTicket",array("ticket"=>$ticket,"listCat"=>$listCat,"listType"=>$listType)); //div contenant les messages echo "<div class='container contentMessages'>"; //charge les messages et les affiches $this->loadView("ticket/vMessage",array("messages"=>$messages, "ticket" => $ticket)); //instancie CKEditor echo Jquery::executeOn('.submitMessage', "click", " for ( instance in CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement(); "); //lors du clic sur le bouton submitMessage, éxécute l'update du message et l'affiche echo Jquery::postFormOn("click",".submitMessage","Messages/update","frm",".contentMessages"); if($ticket->getTitre() != "") echo Jquery::execute("$('.panel-body.infoTicket').hide();"); echo "</div>"; echo Jquery::executeOn(".montreInfoTicket","click", "$('.montreInfoTicket').toggleClass('glyphicon-chevron-up'); $('.montreInfoTicket').toggleClass('glyphicon-chevron-down'); $('.panel-body.infoTicket').slideToggle('slow');"); }
<?php use micro\views\Gui; ?> <form method="POST" action="messages/update"> <div class="for-group"> <label for="idTicket">Ticket</label> <input type="hidden" name="id" value="<?php echo $message->getId(); ?> "> <select class="form-control" name="idTicket" id="idTicket"> <?php echo Gui::select($tickets, $idTickets, "Selectionner un ticket..."); ?> </select> <label for="contenu">contenu du message</label> <textarea class="form-control ckeditor" id="contenu" name="contenu"> <?php echo $message->getContenu(); ?> </textarea> </div> <input type="text" class="form-control" disabled name="utilisateur" value="<?php echo $_SESSION["user"]; ?> "> <div class="form-group"> <input type="submit" class="btn btn-primary" value="valider">
public function frmUpdate($id = NULL) { $faq = $this->getInstance($id); $categories = DAO::getAll("Categorie"); if ($faq->getCategorie() == null) { $cat = -1; } else { $cat = $faq->getCategorie()->getId(); } $listCat = Gui::select($categories, $cat, "Sélectionner une catégorie ..."); $this->loadView("faq/vUpdate", array("faq" => $faq, "listCat" => $listCat)); }
public function frmUstat($id = NULL) { $ticket = $this->getInstance($id); $statuts = DAO::getAll("statut"); if ($ticket->getStatut() == null) { $stt = -1; } else { $stt = $ticket->getStatut()->getId(); } $listStatut = Gui::select($statuts, $stt, "Modifier le statut ..."); $this->loadView("ticket/vUstat", array("ticket" => $ticket, "listStatut" => $listStatut)); }
public function frm($id = NULL) { $ticket = $this->getInstance($id); $categories = DAO::getAll("Categorie"); $statut = DAO::getAll("Statut"); if ($ticket->getCategorie() == null) { $cat = -1; $stat = -1; } else { $cat = $ticket->getCategorie()->getId(); $stat = $ticket->getStatut()->getId(); } $listCat = Gui::select($categories, $cat, "Sélectionner une catégorie ..."); $listStatut = Gui::select($statut, $stat, "Sélectionner un statut ..."); $listType = Gui::select(array("demande", "intervention"), $ticket->getType(), "Sélectionner un type ..."); if (Auth::isAdmin() == false) { //$selectclass = '<select disabled class="form-control" name="idStatut"> '.statutNow.'</select>'; $this->loadView("ticket/vAdd", array("ticket" => $ticket, "listCat" => $listCat, "listType" => $listType, "listStatut" => $listStatut)); echo Jquery::execute("CKEDITOR.replace( 'description');"); //statutupdate //$statutUpdate= 'coucou'; /* '<div class="form-control" disabled name="idStatut"><br> <input type="hidden" name="idStatut" value=" echo $ticket->getStatut()->getId()"><br>$ticket->getStatut();<br></div>'; */ } if (Auth::isAdmin()) { $stat = $ticket->getStatut()->getId(); $this->loadView("ticket/vAdd", array("ticket" => $ticket, "listCat" => $listCat, "listType" => $listType, "statut" => $statut, "listStatut" => $listStatut)); echo Jquery::execute("CKEDITOR.replace( 'description');"); //updteticket //s$statutUpdate='coucou1'; /* '<select class="form-control" class="idStatut" name="idStatut"><br>$listStatut<br></select>'; */ } }