[ Index ]
 

Code source de SPIP Agora 1.4

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

title

Body

[fermer]

/Agora1-4/ecrire/include/clevermail/admin/ -> post.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  require_once  'include/settings.php';
  20  
  21  if (isset($_GET['pst_id'])) {
  22      if (isset($_GET['mode'])) {
  23          $mode = $_GET['mode'];
  24      }
  25      else {
  26          $mode = 'text';
  27      }
  28  
  29      if ($mode == 'text') {
  30          header('Content-type: text/plain');
  31      }
  32  
  33      $post = $db->getRow("SELECT * FROM " . CM_TABLE_PREFIX . "_posts WHERE pst_id = " . $_GET['pst_id']);
  34      if (is_array($post)) {
  35          $list = $db->getRow("SELECT * FROM " . CM_TABLE_PREFIX . "_lists WHERE lst_id = " . $post['lst_id']);
  36          if ($mode == 'text') {
  37              echo $list['lst_text_header']. $post['pst_text']. $list['lst_text_footer'];
  38          }
  39          else {
  40  ?>
  41  
  42              <html>
  43                  <head>
  44                      <title>
  45  
  46                      <?php
  47                      if ($list['lst_subject_tag'] == 1) {
  48                          echo '[' . $list['lst_name']. '] ';
  49                      }
  50  
  51                      echo $post['pst_subject'];
  52                      ?>
  53  
  54                      </title>
  55                  </head>
  56  
  57                  <body>
  58  
  59                      <?php
  60                      echo $list['lst_html_header'];
  61                      echo $post['pst_html'];
  62                      echo $list['lst_html_footer'];
  63                      ?>
  64  
  65                  </body>
  66              </html>
  67  
  68  <?php
  69          }
  70      }
  71      else {
  72          echo 'Invalid post identifier.';
  73      }
  74  }
  75  ?>


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