diff --git a/html/confirm_remove.php b/html/confirm_remove.php new file mode 100644 index 000000000..5db9996e2 --- /dev/null +++ b/html/confirm_remove.php @@ -0,0 +1,161 @@ + +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/* !\file + */ + +/* \brief confirm the removal of a template , folder and remove it if confirmed + * + */ +include_once("postgres.php"); +include_once("debug.php"); +include_once("ac_common.php"); + +$rep=DbConnect(); +include_once ("class_user.php"); +$User=new cl_user($rep); +html_page_start($User->theme,'onLoad="window.focus();"'); +$User->Check(); +if ($User->admin != 1) { + +print "
| ".$Dossier['dos_description']." | -"; ++'. + ' | '. +""; - $compteur++; + $compteur++; } diff --git a/html/js/confirm.js b/html/js/confirm.js new file mode 100644 index 000000000..e953caeff --- /dev/null +++ b/html/js/confirm.js @@ -0,0 +1,35 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/* !\file + */ + +/* \brief Manage the confirmation process + * + */ + +// \brief Confirm the removal of a template +function confirm_remove(p_phpsessid,p_obj_id,p_type) { + alert ("Effacement demandé"); + var + a=open('confirm_remove.php?PHPSESSID='+p_phpsessid+'&ob_id='+p_obj_id+'&p_type='+p_type,'Confirmez effacement','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); + +} \ No newline at end of file diff --git a/include/constant.php b/include/constant.php index 5f8415e15..330447fbe 100644 --- a/include/constant.php +++ b/include/constant.php @@ -142,6 +142,8 @@ define ("ATTR_DEF_DEPENSE_NON_DEDUCTIBLE",20); define ("ATTR_DEF_TVA_NON_DEDUCTIBLE",21); define ("ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP",22); define ("ATTR_DEF_QUICKCODE",23); +define ("JS_CONFIRM", +""); define ("JS_SEARCH_POSTE", ""); diff --git a/include/modele.inc.php b/include/modele.inc.php index 458a67e57..7fe93fefe 100644 --- a/include/modele.inc.php +++ b/include/modele.inc.php @@ -26,7 +26,7 @@ /* \brief concerne only the template * */ - +echo JS_CONFIRM; $cn=DbConnect(); if ( isset($_GET['rm']) && isset($_GET['mod_id'])) { @@ -58,7 +58,7 @@ $Res=ExecSql($cn_mod,"truncate table centralized"); $Res=ExecSql($cn_mod,"truncate table stock_goods"); $Res=ExecSql($cn_mod,"truncate table jrn_rapt"); -// Reset the closed periode + // Reset the closed periode $Res=ExecSql($cn_mod,"update parm_periode set p_closed='f'"); // Reset Sequence $a_seq=array('s_jrn','s_jrn_op','s_centralized','s_stock_goods'); @@ -99,9 +99,9 @@ '%s | '. '%s | '. ''. - ''. - ' | '. + ' '. + ''. '', $mod['mod_name'],