noalyss Version-9
ajax_get_menu_detail.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21// Copyright Author Dany De Bontridder danydb@aevalys.eu
22
23/**
24 * @file
25 * @brief get detail of a menu
26 *
27 */
28// retrieve data
29if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
30$profile=$cn->get_value("select p_id from profile_menu where pm_id=$1",array($pm_id));
31$a_value=$cn->make_array("select me_code,me_code||' '||me_menu||' '||coalesce(me_description,'') from menu_ref",0);
32
33$array=$cn->get_array("select p_id,pm_id,me_code,me_code_dep,p_order,p_type_display,pm_default
34 from profile_menu
35 where pm_id=$1",array($pm_id));
36if ( empty($array)) {
37 alert("Code invalide");
38 exit();
39}
40
41
42echo HtmlInput::title_box($array[0]['me_code'],'divdm'.$pm_id);
43
44$me_code=new ISelect('me_code');
46$me_code->selected=$array[0]['me_code'];
47
48$p_order=new Inum('p_order',$array[0]['p_order']);
49$pm_default=new ICheckBox('pm_default','1');
50$pm_default->set_check($array[0]['pm_default']);
51
52?>
53<form method="POST" id="ajax_get_menu_detail_frm" onsubmit="return confirm_box(this,'<?php echo _("Vous confirmez")?> ?')">
54 <?php echo HtmlInput::hidden('pm_id',$array[0]['pm_id'])?>
55 <?php echo HtmlInput::hidden('p_id',$array[0]['p_id'])?>
56 <?php echo HtmlInput::hidden('tab',"profile_menu_div")?>
57 <?php echo HtmlInput::hidden('mod',"1")?>
58<table>
59<tr>
60 <td><?php echo _("Code");?></td>
61 <td><?php echo $me_code->input()?></td>
62</tr>
63<?php
64if ($array[0]['p_type_display']!='P'):
65?>
66<tr>
67 <td><?php echo _("Ordre d'apparition");?></td>
68 <td><?php echo $p_order->input()?></td>
69</tr>
70<tr>
71 <td><?php echo _("Menu par défaut");?></td>
72 <td><?php echo $pm_default->input()?></td>
73</tr>
74<?php endif;?>
75</table>
76<?php
77echo HtmlInput::submit('modbt',_("Valider"));
78echo '</form>';
79
80
81?>
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
alert($p_msg, $buffer=false)
alert in javascript
Definition: ac_common.php:738
static hidden($p_name, $p_value, $p_id="")
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Html Input.
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
$all table
for($e=0; $e< count($afiche); $e++) exit