function show_consultation_form() { global $form_consult_action, $form_see_docnum, $msg, $charset, $pmb_gestion_devise, $dbh, $pmb_type_audit; $form_consult_action = str_replace('!!form_title!!', htmlentities($this->sujet_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!idstatut!!', htmlentities($this->statut_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!type_action!!', htmlentities($this->workflow->getTypeCommentById($this->type_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!statut_action!!', htmlentities($this->workflow->getStateCommentById($this->statut_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!detail_action!!', htmlentities($this->detail_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!date_action!!', htmlentities(formatdate($this->date_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!date_butoir_action!!', htmlentities(formatdate($this->deadline_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!time_action!!', htmlentities($this->time_elapsed . $msg['demandes_action_time_unit'], ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!cout_action!!', htmlentities($this->cout, ENT_QUOTES, $charset) . $pmb_gestion_devise, $form_consult_action); $form_consult_action = str_replace('!!progression_action!!', htmlentities($this->progression_action, ENT_QUOTES, $charset) . '%', $form_consult_action); $form_consult_action = str_replace('!!idaction!!', htmlentities($this->id_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!iddemande!!', htmlentities($this->num_demande, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!createur!!', htmlentities($this->getCreateur($this->actions_num_user, $this->actions_type_user), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!prive_action!!', htmlentities($this->prive_action ? $msg[40] : $msg[39], ENT_QUOTES, $charset), $form_consult_action); $path = "<a href=./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}>" . htmlentities($this->libelle_demande, ENT_QUOTES, $charset) . "</a>"; $form_consult_action = str_replace('!!path!!', $path, $form_consult_action); $act_cancel = "document.location='./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}'"; $form_consult_action = str_replace('!!cancel_action!!', $act_cancel, $form_consult_action); $states_btn = $this->getDisplayStateBtn($this->workflow->getStateList($this->statut_action)); $form_consult_action = str_replace('!!btn_etat!!', $states_btn, $form_consult_action); // bouton audit if ($pmb_type_audit) { $btn_audit = " <input class='bouton' type='button' onClick=\"openPopUp('./audit.php?type_obj=15&object_id={$this->id_action}', 'audit_popup', 700, 500, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" title=\"" . $msg['audit_button'] . "\" value=\"" . $msg['audit_button'] . "\" /> "; } else { $btn_audit = ""; } $form_consult_action = str_replace('!!btn_audit!!', $btn_audit, $form_consult_action); print $form_consult_action; //Notes print demandes_notes::show_dialog($this->notes, $this->id_action, $this->num_demande); //Documents Numériques $req = "select * from explnum_doc join explnum_doc_actions on num_explnum_doc=id_explnum_doc \n\t\twhere num_action='" . $this->id_action . "'"; $res = pmb_mysql_query($req, $dbh); if (pmb_mysql_num_rows($res)) { $tab_docnum = array(); while ($docnums = pmb_mysql_fetch_array($res)) { $tab_docnum[] = $docnums; } $explnum_doc = new explnum_doc(); $liste_docnum = $explnum_doc->show_docnum_table($tab_docnum, './demandes.php?categ=action&act=modif_docnum&idaction=' . $this->id_action); $form_see_docnum = str_replace('!!list_docnum!!', $liste_docnum, $form_see_docnum); } else { $form_see_docnum = str_replace('!!list_docnum!!', htmlentities($msg['demandes_action_no_docnum'], ENT_QUOTES, $charset), $form_see_docnum); } $form_see_docnum = str_replace('!!idaction!!', $this->id_action, $form_see_docnum); print $form_see_docnum; // Annulation de l'alerte sur l'action en cours après lecture des nouvelles notes si c'est la personne à laquelle est affectée l'action qui la lit $this->actions_read_gestion = demandes_actions::action_read($this->id_action, true, "_gestion"); // Mise à jour de la demande dont est issue l'action demandes_actions::action_majParentEnfant($this->id_action, $this->num_demande, "_gestion"); }
function show_consultation_form() { global $idetat, $form_consult_action, $msg, $charset, $pmb_gestion_devise, $dbh, $pmb_type_audit; $form_consult_action = str_replace('!!form_title!!', htmlentities($this->sujet_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!idstatut!!', htmlentities($this->statut_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!type_action!!', htmlentities($this->workflow->getTypeCommentById($this->type_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!statut_action!!', htmlentities($this->workflow->getStateCommentById($this->statut_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!detail_action!!', htmlentities($this->detail_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!date_action!!', htmlentities(formatdate($this->date_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!date_butoir_action!!', htmlentities(formatdate($this->deadline_action), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!time_action!!', htmlentities($this->time_elapsed . $msg['demandes_action_time_unit'], ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!cout_action!!', htmlentities($this->cout, ENT_QUOTES, $charset) . $pmb_gestion_devise, $form_consult_action); $form_consult_action = str_replace('!!progression_action!!', htmlentities($this->progression_action, ENT_QUOTES, $charset) . '%', $form_consult_action); $form_consult_action = str_replace('!!idaction!!', htmlentities($this->id_action, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!iddemande!!', htmlentities($this->num_demande, ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!createur!!', htmlentities($this->getCreateur($this->actions_num_user, $this->actions_type_user), ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!prive_action!!', htmlentities($this->prive_action ? $msg[40] : $msg[39], ENT_QUOTES, $charset), $form_consult_action); $form_consult_action = str_replace('!!params_retour!!', '&iddemande=' . $this->num_demande, $form_consult_action); print $form_consult_action; //Notes print demandes_notes::show_dialog($this->notes, $this->id_action, $this->num_demande, 'demandes-show_consultation_form'); // Annulation de l'alerte sur l'action en cours après lecture des nouvelles notes si c'est la personne à laquelle est affectée l'action qui la lit $this->actions_read_opac = demandes_actions::action_read($this->id_action, true, "_opac"); // Mise à jour de la demande dont est issue l'action demandes_actions::action_majParentEnfant($this->id_action, $this->num_demande, "_opac"); }
static function show_dialog($notes, $num_action, $num_demande, $redirect_to = 'demandes_actions-show_consultation_form') { global $form_dialog_note, $dbh, $msg, $charset, $id_empr; $form_dialog_note = str_replace('!!redirectto!!', $redirect_to, $form_dialog_note); $form_dialog_note = str_replace('!!idaction!!', $num_action, $form_dialog_note); $form_dialog_note = str_replace('!!iddemande!!', $num_demande, $form_dialog_note); $dialog = ''; if (sizeof($notes)) { foreach ($notes as $idNote => $note) { //Utilisateur ou lecteur ? if ($note->notes_type_user === "1") { $side = 'note_opac'; } elseif ($note->notes_type_user === "0") { $side = 'note_gest'; } $dialog .= '<div class="' . $side . '" id="note_' . $note->id_note . '">'; $dialog .= '<div class="btn_note">'; if ($note->prive) { $dialog .= "<input type='image' src='" . get_url_icon('interdit.gif') . "' alt='" . htmlentities($msg['demandes_note_privacy'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_privacy'], ENT_QUOTES, $charset) . "' onclick='return false;'/>"; } if ($note->rapport) { $dialog .= "<input type='image' src='" . get_url_icon('info.gif') . "' alt='" . htmlentities($msg['demandes_note_rapport'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_rapport'], ENT_QUOTES, $charset) . "' onclick='return false;'/>"; } if ($note->notes_read_opac) { $dialog .= "<input type='image' src='" . get_url_icon('notification_new.png') . "' alt='" . htmlentities($msg['demandes_note_vue'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_vue'], ENT_QUOTES, $charset) . "' onclick='return false;'/>"; } $dialog .= ' </div>'; $dialog .= "<div>"; $dialog .= '<div class="entete_note">' . $note->createur_note . ' ' . $msg['381'] . ' ' . formatdate($note->date_note) . '</div>'; $dialog .= '<p>' . $note->contenu . '</p>'; $dialog .= '</div>'; $dialog .= '</div>'; demandes_notes::note_read($note->id_note, true, "_opac"); } $dialog .= '<a name="fin"></a>'; } // Annulation de l'alerte sur l'action dépliée après lecture des nouvelles notes si c'est la personne à laquelle est affectée l'action qui la lit demandes_actions::action_read($num_action, true, "_opac"); // Mise à jour de la demande dont est issue l'action demandes_actions::action_majParentEnfant($num_action, $num_demande, "_opac"); $form_dialog_note = str_replace('!!dialog!!', $dialog, $form_dialog_note); return $form_dialog_note; }
<?php // +-------------------------------------------------+ // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: actions_ajax.inc.php,v 1.6 2014-04-02 08:50:38 mhoestlandt Exp $ if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) { die("no access"); } require_once "{$class_path}/demandes_actions.class.php"; require_once "{$include_path}/templates/demandes_actions.tpl.php"; switch ($quoifaire) { case 'change_read_action': $action = new demandes_actions($id_action, false); demandes_actions::change_read($action, "_gestion"); ajax_http_send_response(demandes_actions::action_majParentEnfant($id_action, $action->num_demande, "_gestion")); break; }