noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
document_mod_change.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00020 
00021 /**\file
00022  * \brief this file respond to an ajax request to modify a type of document
00023  */
00024 require_once 'class_document_type.php';
00025 echo HtmlInput::title_box(_('Type de document'),'change_doc_div');
00026 
00027 $doc_type=new Document_type($cn,$dt_id);
00028 $doc_type->get();
00029 ?>
00030 <form method="POST" id="cat_doc_f" onsubmit="cat_doc_change_record('cat_doc_f');">
00031         <?php echo HtmlInput::request_to_hidden(array("ac","gDossier","dt_id"))?>
00032 <table>
00033 <tr>
00034   <td> <?php echo _('Nom')?>
00035   </td>
00036   <td>
00037           <?php 
00038           $name=new IText('dt_name',$doc_type->dt_value);
00039           echo $name->input();
00040           ?>
00041   </td>
00042 </tr>
00043 
00044 <tr>
00045   <td><?php echo _('Préfixe')?>
00046   </td>
00047   <td>
00048           <?php 
00049           $prefix=new IText('dt_prefix',$doc_type->dt_prefix);
00050           echo $prefix->input();
00051           ?>
00052   </td>
00053 </tr>
00054 
00055 <tr>
00056   <td><?php echo _('numéro actuel')?>
00057   </td>
00058   <td>
00059         <?php 
00060         $ret= $cn->get_array("select last_value,is_called from seq_doc_type_".$doc_type->dt_id) ;
00061 
00062     $last=$ret[0]['last_value'];
00063              /*!
00064                   *\note  With PSQL sequence , the last_value column is 1 when before   AND after the first call, to make the difference between them
00065                   * I have to check whether the sequence has been already called or not */
00066     if ($ret[0]['is_called']=='f' ) $last--;
00067         echo $last;
00068         ?>
00069   </td>
00070   <tr>
00071   <td><?php echo _('Prochain numéro')?>
00072           <?php echo 
00073                 HtmlInput::infobulle(15);
00074         ?>
00075   </td>
00076    <td>
00077           <?php 
00078           $seq=new INum('seq',0);
00079           echo $seq->input();
00080           ?>
00081   </td>
00082 </tr>
00083 
00084 </table>
00085 
00086   <?php echo HtmlInput::submit("save",_('Sauver'));?>
00087 </form>
 All Data Structures Namespaces Files Functions Variables Enumerations