[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/tools/link/ -> edit_cat.php (source)

   1  <?php
   2  /*

   3  # ***** BEGIN LICENSE BLOCK *****

   4  # This file is part of Plume CMS, a website management application.

   5  # Copyright (C) 2001-2005 Loic d'Anterroches and contributors.

   6  #

   7  # Plume CMS is free software; you can redistribute it and/or modify

   8  # it under the terms of the GNU General Public License as published by

   9  # the Free Software Foundation; either version 2 of the License, or

  10  # (at your option) any later version.

  11  #

  12  # Plume CMS is distributed in the hope that it will be useful,

  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of

  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

  15  # GNU General Public License for more details.

  16  #

  17  # The Initial Developer of the Original Code is

  18  # Olivier Meunier.

  19  # Portions created by the Initial Developer are Copyright (C) 2003

  20  # the Initial Developer. All Rights Reserved.

  21  #

  22  # Contributor(s):

  23  # - Sebastien Fievet

  24  #

  25  # You should have received a copy of the GNU General Public License

  26  # along with this program; if not, write to the Free Software

  27  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

  28  #

  29  # ***** END LICENSE BLOCK ***** */

  30  

  31  $id = $_REQUEST['id'];

  32  

  33  $rs =& $link->getEntry($id);

  34  

  35  $c_title = $rs->f('title');

  36  

  37  if (!$rs->isEmpty() && $action == 'edit_cat')

  38  {

  39      $c_title = trim($_POST['c_title']);

  40      

  41      if ($c_title)

  42      {

  43          if ($link->updCat($id,$c_title) == false) {

  44              $err = $link->con->error();

  45          } else {

  46              header('Location: '.$url);

  47              exit;

  48          }

  49      }

  50  }

  51  

  52  # Affichage

  53  $px_submenu->addItem(

  54      '<strong>'.__('Back').'</strong>',array($url),$icon,false);

  55  

  56  

  57  echo('<h2>'.__('Edit rubric').'</h2>');

  58  

  59  if ($err != '') {

  60      echo(

  61      '<div class="erreur"><p><strong>'.__('Error(s)').' :</strong></p>'.

  62      '<p>'.$err.'</p>'.

  63      '</div>'

  64      );

  65  }

  66  

  67  if ($rs->isEmpty())

  68  {

  69      echo('<p>'.__('No link').'</p>');

  70  }

  71  else

  72  {

  73      echo(

  74      '<form action="'.$url.'" method="post">'.

  75      '<fieldset><legend>'.__('Edit rubric').'</legend>'.

  76      

  77      '<p class="field"><strong>'.

  78      '<label for="c_title" class="float">'.__('Title').' : </label></strong>'.

  79      form::textField('c_title',40,255,htmlspecialchars($c_title)).'</p>'.

  80      

  81      

  82      '<p>'.form::hidden('action','edit_cat').

  83      form::hidden('page','edit_cat').

  84      form::hidden('id',$id).

  85      '<input type="submit" class="submit" value="'.__('save').'"/></p>'.

  86      '</fieldset>'.

  87      '</form>'

  88      );

  89  }

  90  ?>



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics