Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00030 $profile=$cn->get_value("select p_id from profile_menu where pm_id=$1",array($pm_id));
00031 $a_value=$cn->make_array("select me_code,me_code||' '||me_menu||' '||coalesce(me_description,'') from menu_ref",0);
00032 $ame_code_dep=$cn->make_array("
00033 select me_code,me_code||' '||me_menu||' '||coalesce(me_description,'') from
00034 menu_ref
00035 where
00036 me_file is null and me_javascript is null and me_url is null and me_type<>'PR' and me_type <> 'SP'
00037 and me_code in (select me_code from profile_menu where p_id=".sql_string($profile).")".
00038 " UNION ALL
00039 select me_code,me_code||' '||me_menu||' '||coalesce(me_description,'') from menu_ref
00040 where
00041 me_code='EXT'
00042 order by 1
00043 ",1);
00044 $a_type=$cn->make_array("select pm_type,pm_desc from profile_menu_type",1);
00045
00046 $array=$cn->get_array("select p_id,pm_id,me_code,me_code_dep,p_order,p_type_display,pm_default
00047 from profile_menu
00048 where pm_id=$1",array($pm_id));
00049 if ( empty($array)) {
00050 alert("Code invalide");
00051 exit();
00052 }
00053
00054
00055 echo HtmlInput::title_box($array[0]['me_code'],'divdm'.$pm_id);
00056
00057 $me_code=new ISelect('me_code');
00058 $me_code->value=$a_value;
00059 $me_code->selected=$array[0]['me_code'];
00060
00061 $me_code_dep=new ISelect('me_code_dep');
00062 $me_code_dep->value=$ame_code_dep;
00063 $me_code_dep->selected=$array[0]['me_code_dep'];
00064
00065 $p_order=new Inum('p_order',$array[0]['p_order']);
00066 $pm_default=new ICheckBox('pm_default','1');
00067 $pm_default->set_check($array[0]['pm_default']);
00068
00069 ?>
00070 <form method="POST" onsubmit="return confirm('<?php echo _("Vous confirmez")?> ?')">
00071 <?php echo HtmlInput::hidden('pm_id',$array[0]['pm_id'])?>
00072 <?php echo HtmlInput::hidden('p_id',$array[0]['p_id'])?>
00073 <table>
00074 <tr>
00075 <td><?php echo _("Code");?></td>
00076 <td><?php echo $me_code->input()?></td>
00077 </tr>
00078 <?php
00079 if ($array[0]['p_type_display']!='P'):
00080 ?>
00081 <tr>
00082 <td><?php echo _('Dépendant de');?> </td>
00083 <td><?php echo $me_code_dep->input()?></td>
00084 </tr>
00085
00086 <tr>
00087 <td><?php echo _("Ordre d'apparition");?></td>
00088 <td><?php echo $p_order->input()?></td>
00089 </tr>
00090 <tr>
00091 <td><?php echo _("Menu par défaut");?></td>
00092 <td><?php echo $pm_default->input()?></td>
00093 </tr>
00094 <?php endif;?>
00095 </table>
00096 <p>
00097 <?php echo _("Cochez cette case si vous souhaitez effacer ce menu");?>
00098 <?php
00099 $delete=new ICheckBox('delete',"1");
00100 echo $delete->input();
00101 ?>
00102 </p>
00103 <?php
00104 if ($array[0]['p_type_display']!='P'):
00105 ?>
00106 <p>
00107 <?php echo _("Cochez cette case si vous souhaitez effacer ce menu ainsi que ceux qui en dépendent");?>
00108 <?php
00109 $delete=new ICheckBox('del_dep',"1");
00110 echo $delete->input();
00111 ?>
00112 </p>
00113 <?php endif;?>
00114 <?php
00115 echo HtmlInput::submit('mod',_("Valider"));
00116 echo '</form>';
00117
00118
00119 ?>