public static function prepareForSale(Vehicle $vehicle) { $registration = new Registration($vehicle); $registration->allocateVehicleNumber(); $registration->allocateLicensePlate(); Documentation::printBrochure($vehicle); $vehicle->cleanInterior(); $vehicle->cleanExteriorBody(); $vehicle->polishWindows(); $vehicle->takeForTestDrive(); return 'Vehicle prepared for sale'; }
public function index() { $member = Member::currentUserID(); if (Permission::checkMember($member, 'CMS_ACCESS')) { $Documentation = Documentation::get(); $list = new ArrayList(); foreach ($Documentation as $Document) { $list->push($Document); } return $this->customise(array('Documentation' => $list))->renderWith(array('Documentation', 'Page')); } else { // Debug::dump('no access'); // die(); return $this->redirect('/Security/login'); } }
} //fin du for ($i=$s;$i<$suite;$i++) /* -------------------- DOCUMENTATIONS LIEES A UN TYPE DE DOC OU A UN NUMPARA OU A UNE RECHERCHE MOT CLE OU AUTEUR --------- */ } else { if ($nb_doc_date || $nb_doc_type || $nb_doc_rech || $nb_doc_numpara) { //fin if ($nb_doc_menu) : documentations liées à la date et/ou au type de doc $n = 1; $k = "fond_clair2"; foreach ($listdoc as $paras) { if ($k == "fond_clair") { $k = "fond_clair2"; } else { $k = "fond_clair"; } //On récupère les infos complètes de la doc (on n'a stocké que l'année dans le tableau $paras[]) $laDoc = new Documentation(); $laDoc->numpara = $paras->numpara; $laDoc->infosDoc(); $nom_fiche = ""; $fiche = new ListeFichiers(); $fiche->numpara = $paras->numpara; $fiche->afficherListeFichiers(); foreach ($fiche as $fichiers) { $nom_fiche = $fichiers->nomFichier; $poids_fiche = $fichiers->poidsFichier; break; } ?> <tr class="<? echo $k; if ($laDoc->contenuPara) echo" highlight";?>"> <td><?php echo $n;
/** * API Method inserts a new Documentation record and render response as JSON */ public function Create() { try { $json = json_decode(RequestUtil::GetBody()); if (!$json) { throw new Exception('The request body does not contain valid JSON'); } $documentation = new Documentation($this->Phreezer); // TODO: any fields that should not be inserted by the user should be commented out // this is an auto-increment. uncomment if updating is allowed // $documentation->Iddocumentation = $this->SafeGetVal($json, 'iddocumentation'); $documentation->Item = $this->SafeGetVal($json, 'item'); $documentation->Institution = $this->SafeGetVal($json, 'institution'); $documentation->Type = $this->SafeGetVal($json, 'type'); $documentation->Description = $this->SafeGetVal($json, 'description'); $documentation->Notes = $this->SafeGetVal($json, 'notes'); $documentation->Validate(); $errors = $documentation->GetValidationErrors(); if (count($errors) > 0) { $this->RenderErrorJSON('Please check the form for errors', $errors); } else { $documentation->Save(); $this->RenderJSON($documentation, $this->JSONPCallback(), true, $this->SimpleObjectParams()); } } catch (Exception $ex) { $this->RenderExceptionJSON($ex); } }
$result = $documentation->updateDocumentation($datos, $data['id']); if ($result->resultado) { echo 'ok'; } } } else { $datos = array(); $datos['eliminado_admin'] = 1; $result = $documentation->updateDocumentation($datos, $data['id']); if ($result->resultado) { echo 'ok'; } } break; case "get_files": $documentation = new Documentation($db); $patient = new Patient($db); $filtros = array(); if (isset($data['paciente'])) { add_filter($filtros, 'id_patient', $data['paciente']); } else { if ($_SESSION['user']['type'] == PATIENT) { add_filter($filtros, 'id_patient', $_SESSION['user']['id']); } } if ($_SESSION['user']['type'] == PATIENT) { add_filter($filtros, 'eliminado_paciente', 0); } else { add_filter($filtros, 'eliminado_admin', 0); } if (isset($data['limit'])) {
public function renderDetail(Documentation $oDocumentation = null) { if (self::$DOCUMENTATION_PARTS == null) { self::$DOCUMENTATION_PARTS = DocumentationPartQuery::create()->filterByDocumentationId($oDocumentation->getId())->filterByIsPublished(true)->orderBySort()->find(); } if ($oDocumentation) { $sName = $oDocumentation->getName(); $sEmbedUrl = $oDocumentation->getYoutubeUrl(); $sDescription = RichtextUtil::parseStorageForFrontendOutput(stream_get_contents($oDocumentation->getDescription())); } else { $sName = TranslationPeer::getString('documentations.uncategorized'); $sEmbedUrl = null; $sDescription = null; } $oTemplate = $this->constructTemplate('documentation'); // render video if exists if ($sEmbedUrl != null) { $this->embedVideo($oTemplate, $sEmbedUrl); } $oTemplate->replaceIdentifier('documentation_name', $sName); $oTemplate->replaceIdentifier('description', $sDescription); // render parts $oPartTmpl = $this->constructTemplate('part'); $sLinkToSelf = LinkUtil::linkToSelf(); $bRequiresQuicklinks = count(self::$DOCUMENTATION_PARTS) > 1; $oPartLinkPrototype = $this->constructTemplate('part_link'); foreach (self::$DOCUMENTATION_PARTS as $sKey => $mPart) { if ($mPart === true) { $mPart = DocumentationPartQuery::create()->filterByKey($sKey)->findOne(); } $bIsOverview = false; if ($mPart instanceof DocumentationPart) { //Internal documentation $sBody = RichtextUtil::parseStorageForFrontendOutput(stream_get_contents($mPart->getBody())); $sLinkText = $mPart->getName(); $sTitle = $mPart->getTitle(); $sImageUrl = null; if ($mPart->getDocument()) { $sImageUrl = $mPart->getDocument()->getDisplayUrl(); if (RichtextUtil::$USE_ABSOLUTE_LINKS) { $sImageUrl = LinkUtil::absoluteLink($sImageUrl); } } $sKey = $mPart->getKey(); $bIsOverview = $mPart->getIsOverview(); $sExternalLink = null; } else { //External documentation $aData = DocumentationProviderTypeModule::dataForPart($sKey, Session::language()); $sBody = new Template($aData['content'], null, true); $sLinkText = $aData['title']; $sTitle = null; $sImageUrl = null; $sExternalLink = $aData['url']; } // Add quick links if ($bRequiresQuicklinks) { $oPartLink = clone $oPartLinkPrototype; $oPartLink->replaceIdentifier('href', $sLinkToSelf . '#' . $sKey); $oPartLink->replaceIdentifier('link_text', $sLinkText); if ($sTitle != null) { $oPartLink->replaceIdentifier('title', $sTitle); } $oTemplate->replaceIdentifierMultiple('part_links', $oPartLink, null, Template::NO_NEW_CONTEXT); } // Add documentation part $oPartTemplate = clone $oPartTmpl; $oPartTemplate->replaceIdentifier('name', $sLinkText); $oPartTemplate->replaceIdentifier('anchor', $sKey); $oPartTemplate->replaceIdentifier('href_top', $sLinkToSelf . "#top_of_page"); $oPartTemplate->replaceIdentifier('external_link', $sExternalLink); if ($sImageUrl) { $oPartTemplate->replaceIdentifier('image', TagWriter::quickTag('img', array('class' => !$bIsOverview ? 'image_float' : "image_fullwidth", 'src' => $sImageUrl, 'alt' => 'Bildschirmfoto von ' . $sLinkText))); $oPartTemplate->replaceIdentifier('margin_left_class', $bIsOverview ? '' : ' margin_left_class'); } $oPartTemplate->replaceIdentifier('content', $sBody); $oTemplate->replaceIdentifierMultiple('part', $oPartTemplate); } return $oTemplate; }
<?php $this->page_title = $this->t('admin', 'update'); $this->tabs = array($this->t('admin', 'manage') => $this->createUrl("manage"), $this->t('admin', 'sorting') => $this->createUrl("sorting"), $this->t('admin', 'create') => $this->createUrl("create", array('parent_id' => 1))); ?> <div> Это страница для сортировки категорий.<br/> Для удобства использования сайта созданы некоторые ограничения:<br/> Нельзя главную категорией сделать второстепенной и наоборот.<br/> В остальном вы имеете полную своботу их перемещения.<br/> </div> <?php $this->widget('content.portlets.NestedSortable', array('model' => Documentation::model(), 'sortable' => true, 'id' => 'docs_sorting'));
/** * @brief permet d'aller chercher toutes les docs liées à une categ + sscateg dans le moteur * @details on vide le tableau des Docs de la catégorie sélectionnée (créé par afficherDocs() ) * car il faut éviter un effet mémoire. */ function afficherDocsSousCateg() { $this->listdoc = array(); // récupération du tableau des docs de la categ sélectionnée (les numpara) $tab_docs_categ = $this->listdocnumpara; $tab_docs_sscateg = array(); $result = mysql_query("SELECT numsscateg FROM if_sscateg WHERE numcateg='{$this->nummenu}'"); while ($row = mysql_fetch_row($result)) { $res = mysql_query("SELECT if_para_sscateg.numpara FROM if_para_sscateg, if_v_doc WHERE numsscateg='{$row['0']}' \r\n\t\t\tAND if_para_sscateg.numpara=if_v_doc.numpara AND publiee='o' {$this->tri_date} ORDER BY date,numpara DESC"); if (mysql_num_rows($res) > 0) { while ($riw = mysql_fetch_row($res)) { $tab_docs_sscateg[] = $riw[0]; } } // fin if } // fin while $tab_des_docs = array_merge($tab_docs_categ, $tab_docs_sscateg); sort($tab_des_docs); $tab_des_docs = array_unique($tab_des_docs); $tab_des_docs = array_values($tab_des_docs); // reindexation for ($i = 0; $i < count($tab_des_docs); $i++) { $laDoc = new Documentation(); $laDoc->numpara = $tab_des_docs[$i]; $laDoc->infosDoc(); $this->listdoc[] = $laDoc; } //tri multidimentionnel sur tableau d'objets (la fonction de reference est dans fonctions.php usort($this->listdoc, 'trierDocs'); //fonction modifiee sept. 2009 pour tri sur le champ date et non plus annee //print_r($this->listdoc); if (count($this->listdoc) > 1) { return true; } }
$template->setVariable("URL", Url::showUrl()); $template->setVariable("CONTENT", Folder::showContent()); $template->setVariable("SUBURL", Url::showUrl()); $template->setVariable("SUBFOLDERS", Folder::showSubContent()); break; case "download": unset($_SESSION['parent_folder']); unset($_SESSION['current_folder']); $template->setVariable("TITLE", "Aktuelle Version des Posemuckel Client"); $template->setVariable("CONTENT", Download::getContent($template)); break; case "docs": #$doc_links ="<a href=\"doc/javadoc\" target=\"_blank\">Javadocs</a><br>"; #$doc_links .="<a href=\"doc/phpdoc\" target=\"_blank\">PHPdocs</a>"; #$template->setVariable("TITLE", "Dokumentation zur Software dieses Projektes"); $template->setVariable("CONTENT", Documentation::getContent($template)); break; case "screenshots": $browsertitle = $_SESSION['translate']->it('SCREENSHOT_BROWSER_TITLE'); $browseralt = $_SESSION['translate']->it('SCREENSHOT_BROWSER_ALT'); $projectstitle = $_SESSION['translate']->it('SCREENSHOT_PROJECTS_TITLE'); $projectsalt = $_SESSION['translate']->it('SCREENSHOT_PROJECTS_ALT'); $html = "<b>{$projectstitle}</b><br><img src=\"images\\Projects_Shot.jpg\" alt=\"{$projectsalt}\"><br><br>"; $html .= "<b>{$browsertitle}</b><br><img src=\"images\\Browser_Shot.jpg\" alt=\"{$browseralt}\">"; $template->setVariable("CONTENT", $html); break; case "faq": $template->setVariable("TITLE", $_SESSION['translate']->it('FAQs')); $template->setVariable("CONTENT", FAQ::getContent($template)); break; case "hall_of_fame":
/** * Erzeugt die HTML-Repäsentation des Dokumentationsbereichs * @param string $template Verweis auf das Template der Seite. * @return String $html die HTML-Repäsentation der derzeitig betrachteten Ordnerebene */ function getContent(&$template) { $devdoc = $_SESSION['translate']->it('DEVELOPER_DOC'); $userdoc = $_SESSION['translate']->it('USER_DOC'); $userdesc = $_SESSION['translate']->it('USER_DESC'); $admindoc = $_SESSION['translate']->it('ADMIN_DOC'); $javadoc = $_SESSION['translate']->it('JAVADOC'); $phpdoc = $_SESSION['translate']->it('PHPDOC'); $html = "<br><b>{$userdoc}</b><br><br>"; $html .= "Online:<br>"; $html .= "<table width=\"100%\">\n\t"; $html .= "<tr>\n\t"; $html .= "<td><a href=\"doc/userdoc/\" target=\"_blank\">Userdocs</a></td>\n\t"; $html .= "<td>"; $html .= $userdesc; $html .= "</td>\n\t"; $html .= "</tr>\n\t"; $html .= "</table>\n\t"; $html .= "<br><hr>"; $html .= Documentation::getAdmindoc(); $html .= "<br><hr>"; $html .= Documentation::getPresentations(); $html .= "<br><hr>"; $html .= "<br><b>{$devdoc}</b><br><br>"; $html .= "Online:<br>"; $html .= "<table width=\"100%\">\n\t"; $html .= "<tr>\n\t"; $html .= "<td><a href=\"doc/javadoc\" target=\"_blank\">Javadocs</a></td>\n\t"; $html .= "<td>"; $html .= $javadoc; $html .= "</td>\n\t"; $html .= "</tr>\n\t"; $html .= "<tr>\n\t"; $html .= "<td><a href=\"doc/phpdoc\" target=\"_blank\">PHPdocs</a></td>\n\t"; $html .= "<td>"; $html .= $phpdoc; $html .= "</td>\n\t"; $html .= "</tr>\n\t"; $html .= "</table>\n\t"; $html .= "<br><br>Download:<br>"; $html .= Documentation::getDevelFiles(); return $html; }
/** * affiche la liste des paragraphes * @return si on voit les docs on retourne le nombre de doc, sinon on retourne le nombre de paragraphes */ function afficherListeParas() { //requete sql if ($this->numpage) { // Liste des paragraphes liés à la page if (isset($this->colonne)) { $fin_req = "AND colonne='{$this->colonne}'"; } $result = mysql_query("SELECT numpara FROM if_page_para WHERE numpage='{$this->numpage}' {$fin_req} ORDER BY ordre"); //echo "SELECT numpara FROM if_page_para WHERE numpage='$this->numpage' $fin_req ORDER BY ordre<br/>"; while ($row = mysql_fetch_row($result)) { $unPara = new Paragraphe(); $unPara->numpara = $row[0]; $unPara->numpage = $this->numpage; $unPara->infosPara(); $this->paras[] = $unPara; } //fin du while } else { if ($this->formation) { // Liste des formations IFIP $result = mysql_query("SELECT numpara FROM if_v_form {$this->tri_date}"); while ($row = mysql_fetch_row($result)) { $unPara = new Formation(); $unPara->numpara = $row[0]; $unPara->infosFormation(); $this->paras[] = $unPara; } //fin du while } else { if ($this->doc) { // Liste des docs IFIP $result = mysql_query("SELECT numpara FROM if_v_doc {$this->req_doc}"); while ($row = mysql_fetch_row($result)) { $unPara = new Documentation(); $unPara->numpara = $row[0]; if ($this->docvcourte) { $unPara->infosDocVersionCourte(); } else { $unPara->infosDoc(); } $this->paras[] = $unPara; //mise en commentaire HC sept. 2009 - on refait un tri sur le champ date //usort($this->paras, 'trierDocs');//tri sur le tableau d'ojets Documentation (sur anneeDoc créée dans InfosDoc) } //fin du while if ($this->docvcourte) { $this->nbdocs = count($this->paras); $this->paras = array_slice($this->paras, $this->borneinf, $this->bornesup); // troncage du tableau //print_r($this->paras); } } else { if ($this->breve) { // Liste des brèves internationales IFIP $result = mysql_query("SELECT numpara FROM if_v_breve {$this->req_breve}"); while ($row = mysql_fetch_row($result)) { $unPara = new Breve(); $unPara->numpara = $row[0]; $unPara->infosBreve(); $this->paras[] = $unPara; } //fin du while } else { if ($this->actu) { // Liste des brèves d'actualités IFIP $result = mysql_query("SELECT numpara FROM if_v_actu {$this->req_actu}"); while ($row = mysql_fetch_row($result)) { $unPara = new Actualite(); $unPara->numpara = $row[0]; $unPara->infosActu(); $this->paras[] = $unPara; } //fin du while } else { // Liste de tous les paragraphes (pour choisir un paragraphe à associer lors de la création ou modification de la page sauf les paragraphes de type Formation et de type Doc $result = mysql_query("SELECT numpara FROM if_paragraphe WHERE numpara NOT IN (SELECT numpara FROM if_v_form) AND NOT IN (SELECT numpara FROM if_v_doc)"); while ($row = mysql_fetch_row($result)) { $unPara = new Paragraphe(); $unPara->numpara = $row[0]; $unPara->numpage = $this->numpage; $unPara->infosPara(); $this->paras[] = $unPara; } //fin du while } } } } } if ($this->docvcourte) { return $this->nbdocs; } else { return count($this->paras); } }
/** * Get the rows for the sitemap */ protected function getRows() { $_rows = array(); // Grab blog cats $blogCats = BlogCats::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($blogCats)) { foreach ($blogCats as $blogCat) { $_rows[] = $this->makeData($this->getFullUrl('/blog/category/' . $blogCat->alias), time(), 'monthly', 0.1); } } // Grab blog rows $blogRows = Blog::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($blogRows)) { foreach ($blogRows as $blogRow) { $_rows[] = $this->makeData($this->getFullUrl('/blog/view/' . $blogRow->alias), $blogRow->postdate, 'weekly', 1); } } // Grab tutorials cats $tutorialsCats = TutorialsCats::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($tutorialsCats)) { foreach ($tutorialsCats as $tutorialsCat) { $_rows[] = $this->makeData($this->getFullUrl('/tutorials/category/' . $tutorialsCat->alias), time(), 'monthly', 0.1); } } // Grab tutorials rows $tutorialsRows = Tutorials::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($tutorialsRows)) { foreach ($tutorialsRows as $tutorialsRow) { $_rows[] = $this->makeData($this->getFullUrl('/tutorials/view/' . $tutorialsRow->alias), $tutorialsRow->postdate, 'weekly', 1); } } // Grab extensions cats $extensionsCats = ExtensionsCats::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($extensionsCats)) { foreach ($extensionsCats as $extensionsCat) { $_rows[] = $this->makeData($this->getFullUrl('/extensions/category/' . $extensionsCat->alias), time(), 'monthly', 0.1); } } // Grab extensions rows $extensionsRows = Extensions::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($extensionsRows)) { foreach ($extensionsRows as $extensionsRow) { $_rows[] = $this->makeData($this->getFullUrl('/extensions/view/' . $extensionsRow->alias), $extensionsRow->postdate, 'weekly', 1); } } // Grab users rows $usersRows = Members::model()->findAll(); if (count($usersRows)) { foreach ($usersRows as $usersRow) { $_rows[] = $this->makeData($this->getFullUrl('/user/' . $usersRow->id . '-' . $usersRow->seoname), $usersRow->joined, 'monthly', 1); } } // Grab forum topics rows $forumTopics = ForumTopics::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($forumTopics)) { foreach ($forumTopics as $forumTopic) { $_rows[] = $this->makeData($this->getFullUrl('/forum/topic/' . $forumTopic->id . '-' . $forumTopic->alias), $forumTopic->dateposted, 'daily', 1); } } // Grab custom pages $customPages = CustomPages::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($customPages)) { foreach ($customPages as $customPage) { $_rows[] = $this->makeData($this->getFullUrl('/' . $forumTopic->alias), $customPage->dateposted, 'weekly', 1); } } // Grab documentation pages $documentations = Documentation::model()->findAll('language=:langauge', array(':langauge' => Yii::app()->language)); if (count($documentations)) { foreach ($documentations as $documentation) { $_rows[] = $this->makeData($this->getFullUrl('/documentation/guide/' . $documentation->type . '/topic/' . $documentation->mkey), $documentation->last_updated, 'weekly', 1); } } // Return array return $_rows; }
/** * Filter the query by a related Documentation object * * @param Documentation|PropelObjectCollection $documentation The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return DocumentationPartQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByDocumentation($documentation, $comparison = null) { if ($documentation instanceof Documentation) { return $this->addUsingAlias(DocumentationPartPeer::DOCUMENTATION_ID, $documentation->getId(), $comparison); } elseif ($documentation instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(DocumentationPartPeer::DOCUMENTATION_ID, $documentation->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByDocumentation() only accepts arguments of type Documentation or PropelCollection'); } }
/** * Import the topics to the DB */ public function importTopics($lang = 'he') { // Topics $guides = Documentation::model()->documentationFolders; if (count($guides)) { foreach ($guides as $key => $guide) { // Load the guides files $files = $this->grabTopics($key, $lang); if (count($files)) { foreach ($files as $file) { // make a short name $name = str_replace('.txt', '', end(explode('/', $file))); // Check if we have one in the DB $exists = Documentation::model()->exists('mkey=:key AND type=:type AND language=:lang', array(':lang' => $lang, ':key' => $name, ':type' => $key)); if ($exists) { continue; } $contents = file_get_contents($file); $contents = str_replace('«', '<', $contents); $contents = str_replace('»', '>', $contents); // Add $save = new Documentation(); $save->name = $name; $save->mkey = $name; $save->language = $lang; $save->type = $key; $save->content = $contents; $save->save(); } } } } }
<?php /* Date de cration: 19/01/2009 */ if ($numpara) { //on est en modification $modifDoc = new Documentation(); $modifDoc->numpara = $numpara; $modifDoc->infosDoc(); } /**mysql_query("INSERT INTO if_type_doc (type_doc,nom) VALUES (1,'fiche actions')"); mysql_query("INSERT INTO if_type_doc (type_doc,nom) VALUES (2,'article de revue \"Techniporc\"')"); mysql_query("INSERT INTO if_type_doc (type_doc,nom) VALUES (3,'article de revue \"Baromètre porc\"')"); mysql_query("INSERT INTO if_type_doc (type_doc,nom) VALUES (4,'article de revue \"PATHO-Gènes\"')"); mysql_query("INSERT INTO if_type_doc (type_doc,nom) VALUES (5,'ouvrage de référence')"); mysql_query("INSERT INTO if_type_doc (type_doc,nom) VALUES (6,'fiche repères techniques')");**/ ?> <div class="item" id="coltexteAdmin"> <div class="sap-content"> <div class="TabbedPanels"> <div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent"> <fieldset> <legend><?php if ($numpara) { echo "Modifier la documentation"; } else { echo "Ajouter une documentation"; } ?> </legend>
/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->aLanguage instanceof Persistent) { $this->aLanguage->clearAllReferences($deep); } if ($this->aDocumentation instanceof Persistent) { $this->aDocumentation->clearAllReferences($deep); } if ($this->aDocument instanceof Persistent) { $this->aDocument->clearAllReferences($deep); } if ($this->aUserRelatedByCreatedBy instanceof Persistent) { $this->aUserRelatedByCreatedBy->clearAllReferences($deep); } if ($this->aUserRelatedByUpdatedBy instanceof Persistent) { $this->aUserRelatedByUpdatedBy->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) $this->aLanguage = null; $this->aDocumentation = null; $this->aDocument = null; $this->aUserRelatedByCreatedBy = null; $this->aUserRelatedByUpdatedBy = null; }
/** * Liste les articles de la commande * @return renoie un tableau contenant la liste des articles de la commande */ function listerArticles() { $list_article = array(); $result = mysql_query("SELECT * FROM if_bo_detail WHERE numcom='{$this->numcom}' AND designation!='Inscription formation' AND numpara!='0'"); while ($row = mysql_fetch_array($result)) { $article["numdetail"] = $row["numdetail"]; $article["numpara"] = $row["numpara"]; $doc = new Documentation(); $doc->numpara = $row["numpara"]; $doc->infosDoc(); $article["titre"] = $doc->titrePara; $article["reference"] = $row["reference"]; $article["qte"] = $row["qte"]; $article["prix_vente"] = number_format(str_replace(",", ".", $row["prix_vente"]), 2, ",", " "); $article["prix_total"] = number_format(str_replace(",", ".", $row["prix_vente"]) * $row["qte"], 2, ",", " "); $list_article[] = $article; } return $list_article; }
} else { if ($nb_doc_def || $nb_doc_critere || $nb_doc_type || $nb_doc_rech || $nb_doc_numpara) { //fin if ($nb_doc_menu) : documentations par défaut ou liées au type de doc //echo count($listdoc->paras); //print_r($listdoc->paras); //reset($listdoc->paras); $n = 1; foreach ($listdoc as $paras) { //NB : le tableau est tronqué dans l'objet selon le nbre souhaite par page if (!$cl) { $cl = "class=\"fond_clair\""; } else { $cl = ""; } //On récupère les infos complètes de la doc (on n'a stocké que l'année dans le tableau $paras[]) $laDoc = new Documentation(); $laDoc->numpara = $paras->numpara; $laDoc->infosDoc(); ?> <tr <?php echo $cl; ?> > <td><?php echo $n; ?> <? if ($laDoc->numpara) echo " - ".$laDoc->numpara?></td> <td><?php echo $laDoc->titrePara; ?> </td>
/** * Grab all topics from the toc.txt file to display them as a list */ public function getTopics($type = 'guide') { if ($this->_topics === null) { $model = Documentation::model()->find('mkey=:mkey AND type=:type AND language=:lang', array(':type' => $type, ':mkey' => 'toc', ':lang' => $this->language)); if (!$model) { $model = Documentation::model()->find('mkey=:mkey AND type=:type AND language=:lang', array(':type' => $type, ':mkey' => 'toc', ':lang' => 'source')); } $lines = explode("\n", $model->content); $chapter = ''; foreach ($lines as $line) { if (($line = trim($line)) === '') { continue; } if ($line[0] === '*') { $chapter = trim($line, '* '); } else { if ($line[0] === '-' && preg_match('/\\[(.*?)\\]\\((.*?)\\)/', $line, $matches)) { $this->_topics[$chapter][$matches[2]] = $matches[1]; } } } } return $this->_topics; }
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when you override doSelect*() * methods in your stub classes -- you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * * @param Documentation $obj A Documentation object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null DocumentationPeer::$instances[$key] = $obj; } }
/** * Exclude object from result * * @param Documentation $documentation Object to remove from the list of results * * @return DocumentationQuery The current query, for fluid interface */ public function prune($documentation = null) { if ($documentation) { $this->addUsingAlias(DocumentationPeer::ID, $documentation->getId(), Criteria::NOT_EQUAL); } return $this; }