/** * Exclude object from result * * @param CahierTexteCompteRendu $cahierTexteCompteRendu Object to remove from the list of results * * @return CahierTexteCompteRenduQuery The current query, for fluid interface */ public function prune($cahierTexteCompteRendu = null) { if ($cahierTexteCompteRendu) { $this->addUsingAlias(CahierTexteCompteRenduPeer::ID_CT, $cahierTexteCompteRendu->getIdCt(), Criteria::NOT_EQUAL); } return $this; }
$ctCompteRendu->setContenu($contenu_cor); $ctCompteRendu->setDateCt($date_ct); $ctCompteRendu->setGroupe($groupe); $ctCompteRendu->setHeureEntry($heure_entry); //enregistrement de l'objet $ctCompteRendu->save(); //traitement de telechargement de documents joints if (!empty($doc_file['name'][0])) { require_once "traite_doc.php"; $total_max_size = getSettingValue("total_max_size"); $max_size = getSettingValue("max_size"); $multi = isset($multisite) && $multisite == 'y' ? $_COOKIE['RNE'] . '/' : NULL; if (isset($multisite) && $multisite == 'y' && is_dir('../documents/' . $multi) === false) { mkdir('../documents/' . $multi); } $dest_dir = '../documents/' . $multi . 'cl' . $ctCompteRendu->getIdCt(); //il y a au plus trois documents joints dans l'interface de saisie for ($index_doc = 0; $index_doc < 3; $index_doc++) { if (!empty($doc_file['tmp_name'][$index_doc])) { $file_path = ajout_fichier($doc_file, $dest_dir, $index_doc, $id_groupe); if ($file_path != null) { //création de l'objet ctDocument $ctDocument = new CahierTexteCompteRenduFichierJoint(); $ctDocument->setIdCt($ctCompteRendu->getIdCt()); $ctDocument->setTaille($doc_file['size'][$index_doc]); $ctDocument->setEmplacement($file_path); if ($doc_name[$index_doc] != null) { $ctDocument->setTitre(corriger_caracteres($doc_name[$index_doc])); } else { $ctDocument->setTitre(basename($file_path)); }
//mb_strlen($info_volume) echo "<div style='float:right; width:10em; text-align:center; background: " . $color_fond_notices[$type_couleur] . ";' title=\"Les documents joints aux compte-rendus occupent {$volume_cdt_groupe_cr_h} sur un total de {$volume_cdt_groupe_h} pour l'enseignement de " . $groupe->getName() . " " . $groupe->getDescriptionAvecClasses() . ".\">" . $info_volume . "</div>"; } } echo "<br /><br />\n"; // Nombre de notices pour ce jour : $num_notice = NULL; echo "<fieldset style=\"border: 1px solid grey; padding-top: 8px; padding-bottom: 8px; margin-left: auto; margin-right: auto; background: " . $color_fond_notices[$type_couleur] . ";\">\n"; if (isset($info)) { echo "<legend style=\"border: 1px solid grey; background: " . $color_fond_notices[$type_couleur] . "; font-variant: small-caps;\"> Informations générales - " . $groupe->getNameAvecClasses(); } else { echo "<legend style=\"border: 1px solid grey; background: " . $color_fond_notices[$type_couleur] . "; font-variant: small-caps;\"> Compte rendu - " . $groupe->getNameAvecClasses(); } if (!$ctCompteRendu->isNew() || isset($info)) { echo " - <b><font color=\"red\">Modification de la notice</font></b> - \n\t\t\t<a href=\"#\" onclick=\"javascript:\n\t\t\t\tgetWinEditionNotice().setAjaxContent('ajax_edition_compte_rendu.php?id_groupe=" . $groupe->getId() . "&today=" . $ctCompteRendu->getDateCt() . "&ajout_nouvelle_notice=oui',\n\t\t\t\t\t{ onComplete:\n\t\t\t\t\t\tfunction(transport) {\n\t\t\t\t\t\t\tgetWinEditionNotice().updateWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tcompte_rendu_en_cours_de_modification('aucun');\n\t\t\t\treturn false;\n\t\t\t\">\n\t\t\tAjouter une notice\n\t\t\t</a> - \n"; echo "<a href=\"#\" onclick=\"javascript:\n\t\t\t\tnew Ajax.Updater(\$('dupplication_notice'), 'ajax_affichage_duplication_notice.php?id_groupe=" . $groupe->getId() . "&type=CahierTexteCompteRendu&id_ct=" . $ctCompteRendu->getIdCt() . "',\n\t\t\t\t\t{ onComplete:\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\$('dupplication_notice').show();\n\t\t\t\t\t\t\tcalendarDuplicationInstanciation = null;"; if (!isset($info)) { //on affiche le calendrier de duplication uniquement si ce n'est pas une notice d'information generale echo "calendarDuplicationInstanciation = Calendar.setup({\n\t\t\t\t\t\t\t\t\t\tflat : 'calendar-duplication-container', // ID of the parent element\n\t\t\t\t\t\t\t\t\t\tdaFormat : '%s' , \t\t\t //date format\n\t\t\t\t\t\t\t\t\t\tweekNumbers : false\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tcalendarDuplicationInstanciation.setDate(calendarInstanciation.date);"; } echo "\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\treturn false;\n\t\t\t\t\">\n\t\tDupliquer la notice</a> - \n"; } else { echo " - <b><font color=\"red\">Nouvelle notice</font></b> - \n"; } echo "<a href=\"#\" onclick=\"javascript:\n\t\t\tnew Ajax.Updater(\$('deplacement_notice'), 'ajax_affichage_deplacement_notice.php?id_groupe=" . $groupe->getId() . "&type=CahierTexteCompteRendu&id_ct=" . $ctCompteRendu->getIdCt() . "',\n\t\t\t\t{ onComplete:\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\$('deplacement_notice').show();\n\t\t\t\t\t\tcalendarDeplacementInstanciation = null;"; if (!isset($info)) { //on affiche le calendrier de duplication uniquement si ce n'est pas une notice d'information generale echo "calendarDeplacementInstanciation = Calendar.setup({\n\t\t\t\t\t\t\t\t\tflat : 'calendar-deplacement-container', // ID of the parent element\n\t\t\t\t\t\t\t\t\tdaFormat : '%s' , \t\t\t //date format\n\t\t\t\t\t\t\t\t\tweekNumbers : false\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcalendarDeplacementInstanciation.setDate(calendarInstanciation.date);"; } echo "\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn false;\n\t\t\t\">\n\tDeplacer la notice</a>\n"; //il faut échapper les single quote pour le contenu à importer
/** * Filter the query by a related CahierTexteCompteRendu object * * @param CahierTexteCompteRendu|PropelCollection $cahierTexteCompteRendu The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CahierTexteCompteRenduFichierJointQuery The current query, for fluid interface */ public function filterByCahierTexteCompteRendu($cahierTexteCompteRendu, $comparison = null) { if ($cahierTexteCompteRendu instanceof CahierTexteCompteRendu) { return $this ->addUsingAlias(CahierTexteCompteRenduFichierJointPeer::ID_CT, $cahierTexteCompteRendu->getIdCt(), $comparison); } elseif ($cahierTexteCompteRendu instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this ->addUsingAlias(CahierTexteCompteRenduFichierJointPeer::ID_CT, $cahierTexteCompteRendu->toKeyValue('PrimaryKey', 'IdCt'), $comparison); } else { throw new PropelException('filterByCahierTexteCompteRendu() only accepts arguments of type CahierTexteCompteRendu or PropelCollection'); } }
/** * Declares an association between this object and a CahierTexteCompteRendu object. * * @param CahierTexteCompteRendu $v * @return CahierTexteCompteRenduFichierJoint The current object (for fluent API support) * @throws PropelException */ public function setCahierTexteCompteRendu(CahierTexteCompteRendu $v = null) { if ($v === null) { $this->setIdCt(0); } else { $this->setIdCt($v->getIdCt()); } $this->aCahierTexteCompteRendu = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the CahierTexteCompteRendu object, it will not be re-added. if ($v !== null) { $v->addCahierTexteCompteRenduFichierJoint($this); } return $this; }