[opencourrier-Commits] r813 - branches/test_5.0.0-a1/obj

0 views
Skip to first unread message

fray...@adullact.net

unread,
Oct 21, 2016, 4:32:38 PM10/21/16
to openmairie-...@googlegroups.com
Author: fraynaud
Date: 2016-10-21 22:31:54 +0200 (Fri, 21 Oct 2016)
New Revision: 813

Modified:
branches/test_5.0.0-a1/obj/courrier.class.php
branches/test_5.0.0-a1/obj/diffusion.class.php
Log:

mise en place de diffusion



Modified: branches/test_5.0.0-a1/obj/courrier.class.php
===================================================================
--- branches/test_5.0.0-a1/obj/courrier.class.php 2016-10-21 11:09:00 UTC (rev 812)
+++ branches/test_5.0.0-a1/obj/courrier.class.php 2016-10-21 20:31:54 UTC (rev 813)
@@ -791,6 +791,8 @@
echo "</div>";
}
}
+ if ($this->f->getParameter("dematerialisation") == "true")
+ $this->affichediffusion($maj);
}

/**
@@ -798,17 +800,81 @@
*
* Cette méthode à surcharger permet d'afficher des informations
* spécifiques après le formulaire.
+ *
+ * affichage de la diffusion en dematerialisation
*
* @return void
*/
- function afterFormSpecificContent() {
- if(($this->correct AND $this->validation>0) OR $this->maj>0){
- echo "ici je saisis mes services diffusion si scanpdf est true ";
- }
- echo $this->validation."***";
- echo $this->maj."***";
- echo $this->correct."***";
-
+ //function afterFormSpecificContent() {
+ function affichediffusion($maj){
+ if(($this->correct AND $this->validation>0) OR $this->maj>0){
+ if($this->validation>0 && $maj != 2) {
+ $courrier=$this->valF['courrier'];
+ //$code_liaison=$this->valF['liaison'];
+ } else {
+ $courrier=$this->val[array_search('courrier',$this->champs,true)];
+ //$code_liaison=$this->val[array_search('liaison',$this->champs,true)];
+ }
+
+ // Compatibilite sgbd
+ $sql = "select diffusion, service, datediffusion, typediffusion, envoi, typetraitement from ".
+ DB_PREFIXE."diffusion where courrier = ".$courrier;
+ $res=$this->db->query($sql);
+ if (database::isError($res))
+ die($res->getDebugInfo()." ".$sql_liste_courrier);
+ else {
+ echo "<div id=\"courriers_lies\" class=\"formEntete ui-corner-all\">";
+ if($res->numRows()>0) {
+ // En mode ajouter et modifier seulement
+ if ($maj < 2) {
+ echo "<a href=\"\" onclick=\"deleteLink(".$courrier.", ".$courrier.");return false;\" ><span class=\"om-icon om-icon-16 om-icon-fix delete-16\" title=\""._("Supprimer la diffusion")."\">"._("Supprimer la diffusion")."</span>"._("supprimer la liste ci-dessous")."</a>";
+ }
+ }
+
+ echo "<fieldset class=\"cadre ui-corner-all ui-widget-content\"><legend>"._("Courriers lies")."</legend>";
+ echo "<table class=\"tab-tab\">";
+ echo "<tr class=\"ui-tabs-nav ui-accordion ui-state-default tab-title\">";
+ echo "<th class=\"icons\">";
+ // En mode ajouter et modifier seulement
+ if ($maj < 2) {
+ echo "<a id=\"activator\" href=\"\" onclick=\"getMailSearch(".$courrier
+ .");return false;\" ><span class=\"om-icon om-icon-16 om-icon-fix add-16\" title=\""
+ ._("diffuser un courrier")."\">"._("diffuser un courrier")."</span></a>";
+ }
+ echo "</th>";
+ echo "<th lass=\"title\">"._("diffusion")."</th>";
+ echo "<th class=\"title\">"._("service")."</th>";
+ echo "<th class=\"title\">"._("datediffusion")."</th>";
+ echo "<th class=\"title\">"._("typediffusion")."</th>";
+ echo "<th class=\"title\">"._("typetraitement")."</th>";
+ echo "<th class=\"title\">"._("envoi")."</th>";
+ echo "</tr>";
+ $i=0;
+ $oddeven=array("odd","even");
+ while ($line=$res->fetchrow(DB_FETCHMODE_ASSOC)) {
+ echo "<tr class=\"tab-data ".$oddeven[$i%2]."\">";
+ echo "<td class=\"icons\">";
+ // Bouton consulter
+ echo '<a id="action-tab-courrier-left-consulter-3" href="form.php?obj=diffusion&amp;action=3&amp;idx='.$line['diffusion'].'&amp;idz='.$line['service'].'&amp;premier='.$this->getParameter('premier').'&amp;advs_id='.$this->getParameter('advs_id').'&amp;recherche='.$this->getParameter('recherche').'&amp;tricol='.$this->getParameter('tricol').'&amp;selectioncol='.$this->getParameter('selectioncol').'&amp;valide='.$this->getParameter('valide').'&amp;retour=tab"><span title="Consulter" class="om-icon om-icon-16 om-icon-fix consult-16">Consulter</span></a>';
+ if ($maj != 3) {
+ echo "<a href=\"\" onclick=\"deleteLink(".$line['diffusion'].",".$courrier.");return false;\" ><span class=\"om-icon om-icon-16 om-icon-fix delete-16\" title=\""._("Supprimer le lien")."\">"._("Supprimer le lien")."</span></a>";
+ }
+ echo "</td>";
+ $line_link_content = '<a href="form.php?obj=diffusion&amp;action=3&amp;idx='.$line['diffusion'].'&amp;idz='.$line['service'].'&amp;premier='.$this->getParameter('premier').'&amp;advs_id='.$this->getParameter('advs_id').'&amp;recherche='.$this->getParameter('recherche').'&amp;tricol='.$this->getParameter('tricol').'&amp;selectioncol='.$this->getParameter('selectioncol').'&amp;valide='.$this->getParameter('valide').'&amp;retour=tab">';
+ echo '<td>'.$line_link_content.$line['diffusion'].'</a></td>';
+ echo '<td>'.$line_link_content.$line['service'].'</a></td>';
+ echo '<td>'.$line_link_content.$line['datediffusion'].'</a></td>';
+ echo '<td>'.$line_link_content.$line['typediffusion'].'</a></td>';
+ echo '<td>'.$line_link_content.$line['typetraitement'].'</a></td>';
+ echo '<td>'.$line_link_content.$line['envoi'].'</a></td>';
+ echo "</tr>";
+ $i++;
+ }
+ echo "</table>";
+ echo "</fieldset>";
+ echo "</div>";
+ }
+ }
}



Modified: branches/test_5.0.0-a1/obj/diffusion.class.php
===================================================================
--- branches/test_5.0.0-a1/obj/diffusion.class.php 2016-10-21 11:09:00 UTC (rev 812)
+++ branches/test_5.0.0-a1/obj/diffusion.class.php 2016-10-21 20:31:54 UTC (rev 813)
@@ -339,11 +339,12 @@
}

/*
- * cette fonction a pour objectif d envoyer par
+ *
+ * cette fonction a pour objectif d envoyer un dossier/document par
* - mail en pj
* - mail avec un lien
- * - ged
- * - opencourrier
+ * - ged en ftp
+ * - ouvrir un droit d accès à un courrier à un om_utilisateur
*
* */

@@ -443,6 +444,10 @@
}

}
+
+ /*
+ * recherche de key pour un dossier
+ */

function get_key_dossier($val = array()) {
$sql= "select key from ".DB_PREFIXE."dossier where dossier=".$this->valF['dossier'];
@@ -456,6 +461,11 @@
}else
return $res;
}
+
+ /*
+ * recherche du registre du courrier
+ *
+ */

function get_registre_courrier($val = array()) {
$sql= "select registre from ".DB_PREFIXE."courrier where courrier=".$this->valF['courrier'];
@@ -470,6 +480,10 @@
return $res;
}

+ /*
+ * recherche du chemin pour le dossier
+ */
+
function get_chemin_dossier($val = array()) {
// recherche de la clé du dossier
$key=$this->get_key_dossier($val=array());
@@ -482,6 +496,11 @@
return $chemin;
}

+ /*
+ * valide un envoi en table diffusion
+ *
+ */
+
function valider_envoi($val = array()) {
//envoi
$this->begin_treatment(__METHOD__);
@@ -499,6 +518,9 @@
}
}

+ /*
+ * fonction exemple
+ */

function cloturer($val = array()) {
// Begin

Reply all
Reply to author
Forward
0 new messages