[ 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/ -> lists.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  require_once  'design/top.php';
  22  ?>
  23  
  24  <div class = "content">
  25      <h1>Newsletters</h1>
  26  
  27      <?php
  28      if ($db->getOne("SELECT COUNT(*) FROM " . CM_TABLE_PREFIX . "_lists") > 0) {
  29          echo '<p>Below is the list of existing newsletters:</p>';
  30          $lists = $db->query(
  31                       "SELECT lst_id, lst_name, lst_comment FROM " . CM_TABLE_PREFIX . "_lists ORDER BY lst_name");
  32          while ($list = $lists->fetchRow()) {
  33              $listInfo = array();
  34              $listInfo['subscribers'] = $db->getOne(
  35                                             "SELECT COUNT(*) FROM " . CM_TABLE_PREFIX . "_lists_subscribers WHERE lst_id = " . $list['lst_id']);
  36              $listInfo['posts'] = $db->getOne("SELECT COUNT(*) FROM " . CM_TABLE_PREFIX . "_posts WHERE lst_id = " . $list['lst_id']);
  37      ?>
  38  
  39              <div class = "list">
  40                  <h2><?php
  41                  echo $list['lst_name']
  42                  ?></h2>
  43  
  44                  <p><?php
  45                  echo $list['lst_comment']
  46                      ?>
  47  
  48                      <p>
  49  
  50                      <p>
  51                          Statistics:
  52  
  53                          <?php
  54                  if ($listInfo['subscribers'] > 0) {
  55                          ?>
  56  
  57          <a href = "lists_subscribers.php?id=<?php echo $list['lst_id']?>"><?php
  58                      echo $listInfo['subscribers']
  59                      ?>
  60  
  61                      subscriber<?php
  62                      echo ($listInfo['subscribers'] > 1 ? 's' : '')
  63                      ?></a>
  64  
  65                  <?php
  66                  }
  67                  else {
  68                      echo 'no subscriber';
  69                  }
  70  
  71                  echo ' | ';
  72  
  73                  if ($listInfo['posts'] > 0) {
  74                  ?>
  75  
  76                      <a href = "posts.php?lst_id=<?php echo $list['lst_id']?>"><?php
  77                      echo $listInfo['posts']
  78                      ?>
  79  
  80                      post<?php
  81                      echo ($listInfo['posts'] > 1 ? 's' : '')
  82                      ?></a>
  83  
  84                  <?php
  85                  }
  86                  else {
  87                      echo 'no post';
  88                  }
  89                  ?>
  90  
  91                      </p>
  92  
  93                      <p>
  94                          Actions:<a href = "lists_edit.php?id=<?php echo $list['lst_id']?>">modify</a>
  95  
  96                          <?php
  97                          if ($listInfo['subscribers'] == 0) {
  98                          ?>
  99  
 100                              |<a href = "lists_remove.php?id=<?php echo $list['lst_id']?>">remove</a>
 101  
 102                          <?php
 103                          }
 104                          else {
 105                              echo '| <span class="help" title="Can\'t remove a list with subscribers">remove</span>';
 106                          }
 107                          ?>
 108  
 109                          |<a href = "post_edit.php?lst_id=<?php echo $list['lst_id']?>&pst_id=-1"> New post</a>
 110                      </p>
 111              </div>
 112  
 113      <?php
 114          }
 115      }
 116      else {
 117      ?>
 118  
 119          <p>
 120              There is currently no list defined.</p>
 121  
 122      <?php
 123      }
 124      ?>
 125  
 126      <p>
 127          <a href = "lists_edit.php?id=-1">Create</a> a new list!</p>
 128  </div>
 129  
 130  <?php
 131  require_once  'design/bottom.php';
 132  ?>


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