';
}
function ShowFicheDefInput($p_fiche_def)
{
$r="";
// Save the label
$p_fiche_def->Get();
$p_fiche_def->GetAttribut();
if (isset ($_REQUEST['label']) )
$p_fiche_def->SaveLabel($_REQUEST['label']);
$r.= '
'.$p_fiche_def->label.'
';
$r.= '";
$r.="
Attention : il n'y aura pas de demande de confirmation pour enlèver les
attributs sélectionnés. Il ne sera pas possible de revenir en arrière
";
return $r;
}
$recherche=true;
// Creation of a new model of card
// in the database
if ( isset($_POST['add_modele']) and $write != 0) {
// insert the model of card in database
$fiche_def=new fiche_def($cn);
$fiche_def->Add($_POST);
}
$r="";
// Add a line in the card model
if ( isset ($_POST["add_line"]) ) {
$r= '
';
$recherche=false;
}
//_________________________________________________________________________
// Display the detail of a card
if ($action== "detail" ) {
echo '
';
if ( $_SESSION['g_pagesize'] != -1 ){
// retrieve value
// with offet &offset=15&step=15&page=2&size=15
if ( isset($_GET['offset']) && $_SESSION['g_pagesize'] != -1) {
$str=sprintf("&offset=%s&step=%s&page=%s&size=%s",
$_GET['offset'],
$_GET['step'],
$_GET['page'],
$_GET['size']);
}
}
if ( $write != 0 )
echo '';
echo '
';
$recherche=false;
}
//_________________________________________________________________________
// Display the form where you can enter
// the property of the card model
if ($action == "add_modele" and $write !=0) {
echo '
';
CreateCategory($cn,$search);
echo '
';
$recherche=false;
}
//_________________________________________________________________________
// Modify a card Model
if ($action == "modifier" ) {
echo '
';
$recherche=false;
}
//_________________________________________________________________________
// Search a card
if ( $action == "search" )
{
ShowRecherche();
$sql="select distinct f_id,fd_id,av_text from fiche join jnt_fic_att_value using (f_id)
join attr_value using (jft_id) where
upper(av_text) like upper('%".FormatString($_GET["search_text"])."%') order by av_text,f_id";
$all=getArray($cn,$sql);
// test on the size
//
if ( sizeof($all) != 0 )
{
echo '
";
exit();
}
//------------------------------------------------------------------------------
// Add the data (attribute) of the card
if ( isset ($_POST["add_fiche"]) ) {
if ( $write ==0) {
echo '