[ Index ]
 

Code source de SPIP Agora 1.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Agora1-4/ -> inc-urls-html.php (source)

   1  <?php
   2  /*****************************************************
   3  * This file is part of Agora, web based content management system.
   4  *
   5  * Agora is free software; you can redistribute it and/or modify
   6  * it under the terms of the GNU General Public License as published by
   7  * the Free Software Foundation; version 2 of the License.
   8  *
   9  * Agora is distributed in the hope that it will be useful,
  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  * GNU General Public License for more details (file "COPYING").
  13  *
  14  * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière.
  15  * List of authors detailed in "copyright_fr.html" file.
  16  * E-mail : agora@sig.premier-ministre.gouv.fr
  17  * Web site : http://www.agora.gouv.fr
  18  *****************************************************/
  19  // executer une seule fois
  20  if (defined("_INC_URLS2"))
  21      return;
  22  
  23  define("_INC_URLS2", "1");
  24  
  25  require_once ("PEAR.php");
  26  require_once (dirname(__FILE__). "/ecrire/include/bd/inc_document_factory.php");
  27  
  28  function generer_url_article ($id_article) {
  29      return "article$id_article.html";
  30  }
  31  
  32  function generer_url_rubrique ($id_rubrique) {
  33      return "rubrique$id_rubrique.html";
  34  }
  35  
  36  function generer_url_breve ($id_breve) {
  37      return "breve$id_breve.html";
  38  }
  39  
  40  function generer_url_forum ($id_forum) {
  41      return "forum$id_forum.html";
  42  }
  43  
  44  function generer_url_mot ($id_mot) {
  45      return "mot$id_mot.html";
  46  }
  47  
  48  function generer_url_auteur ($id_auteur) {
  49      return "auteur$id_auteur.html";
  50  }
  51  
  52  function generer_url_document ($id_document) {
  53      if ($id_document > 0) {
  54          $documentMetier = &recuperer_instance_document();
  55          $loadOK = $documentMetier->load($id_document);
  56          if (PEAR::isError($loadOK)) {
  57              die ($loadOK->getMessage());
  58          }
  59          else {
  60              $url = $documentMetier->getFichier();
  61          }
  62      }
  63      return $url;
  64  }
  65  
  66  function generer_url_rubrique_mot ($id_rubrique, $id_mot) {
  67      $url = "rubrique$id_rubrique.html";
  68  
  69      if ($id_mot) {
  70          $url .= '?id_mot='.$id_mot;
  71      }
  72      return $url;
  73  }
  74  
  75  function generer_url_mot_rubrique ($id_mot, $id_rubrique) {
  76      $url = "mot$id_mot.html";
  77  
  78      if ($id_rubrique) {
  79          $url .= '?id_rubrique='.$id_rubrique;
  80      }
  81      return $url;
  82  }
  83  
  84  function generer_url_article_mot ($id_article, $id_mot) {
  85      $url = "article$id_article.html";
  86  
  87      if ($id_mot) {
  88          $url .= '?id_mot='.$id_mot;
  89      }
  90      return $url;
  91  }
  92  
  93  function generer_url_mot_article ($id_mot, $id_article) {
  94      $url = "mot$id_mot.html";
  95  
  96      if ($id_article) {
  97          $url .= '?id_article='.$id_article;
  98      }
  99      return $url;
 100  }
 101  
 102  function generer_url_breve_mot ($id_breve, $id_mot) {
 103      $url = "breve$id_breve.html";
 104  
 105      if ($id_mot) {
 106          $url .= '?id_mot='.$id_mot;
 107      }
 108      return $url;
 109  }
 110  
 111  function generer_url_mot_breve ($id_mot, $id_breve) {
 112      $url = "mot$id_mot.html";
 113  
 114      if ($id_breve) {
 115          $url .= '?id_breve='.$id_breve;
 116      }
 117      return $url;
 118  }
 119  
 120  function generer_url_auteur_mot ($id_auteur, $id_mot) {
 121      $url = "auteur$id_auteur.html";
 122  
 123      if ($id_mot) {
 124          $url .= '?id_mot='.$id_mot;
 125      }
 126      return $url;
 127  }
 128  
 129  function generer_url_mot_auteur ($id_mot, $id_auteur) {
 130      $url = "mot$id_mot.html";
 131  
 132      if ($id_auteur) {
 133          $url .= '?id_auteur='.$id_auteur;
 134      }
 135      return $url;
 136  }
 137  
 138  function recuperer_parametres_url ($fond, $url) {
 139      global $contexte;
 140      return;
 141  }
 142  ?>


Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7