Extension : change for security, now based on MENU_REF

Update the script to put the extension into menu_ref + profile_menu
This commit is contained in:
Dany De Bontridder 2011-11-08 23:04:55 +00:00
parent 4cee45d624
commit 58f3e38e84
11 changed files with 193 additions and 310 deletions

View file

@ -2,20 +2,33 @@
<div class="name">
<H2 class="dossier"> Dossier : <?=h(dossier::name())?></h2>
<?=IButton::show_calc()?>
<?php
if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
where user_name=$1 and with_calc=true",array($_SESSION['g_user'])) ==1):
echo IButton::show_calc();
endif;
if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
where user_name=$1 and with_direct_form=true",array($_SESSION['g_user'])) ==1):
?>
<div id="direct">
<form method="get">
<?=HtmlInput::default_value('ac', '', $_REQUEST)?>
<?=Dossier::hidden()?>
<?
$direct=new IText('ac');
$direct->style='class="direct"';
$direct->value=HtmlInput::default_value('ac', '', $_REQUEST);
$direct->value='';
$direct->size=(strlen($direct->value)<10)?10:strlen($direct->value);
echo $direct->input();
echo HtmlInput::submit('go','aller');
?>
</form>
</div>
<?
endif;
?>
</div>
<div class="acces_direct">
<table>