diff --git a/html/fiche_new.php b/html/fiche_new.php new file mode 100644 index 000000000..fa89dc22d --- /dev/null +++ b/html/fiche_new.php @@ -0,0 +1,166 @@ + Vous ne pouvez pas ajouter de fiche'; + return; + } +} +include_once("fiche_inc.php"); +$l_Db=sprintf("dossier%d",$g_dossier); +$cn=DbConnect($l_Db); +foreach ($HTTP_GET_VARS as $key=>$element) { + // The value are e_name e_type e_PHPSESSID + ${"e_$key"}=$element; + echo("e_$key =$element
"); + +} + +function new_fiche($p_cn,$p_type) { + $ch_col=""; + $ch_li=''; + $r='
'; + $r.=''; + $l_sessid=(isset ($_POST["PHPSESSID"]))?$_POST["PHPSESSID"]:$_GET["PHPSESSID"]; + + $r.=JS_SHOW_TVA; + $r.=""; + echo '

New

'; + $p_f_id=""; + echo_debug("Array is null"); + // Find all the attribute of the existing cards + // --> Get_attr_def + $sql="select frd_id,ad_id,ad_text from fiche_def join jnt_fic_attr using (fd_id) + join attr_def using (ad_id) where fd_id=".$p_type." order by ad_id"; + + $Res=ExecSql($p_cn,$sql); + $Max=pg_NumRows($Res); + // Put the card modele id (fiche_def.fd_id) + $r.=''; + for ($i=0;$i < $Max;$i++) { + $l_line=pg_fetch_array($Res,$i); + + // The number of the attribute + $Hid=sprintf('', + $i,$l_line['ad_id']); + + $but_search_poste=""; + // Javascript for searching the account + if ( $l_line ['ad_id'] == ATTR_DEF_ACCOUNT ) { + $but_search_poste=''; + } + // Javascript for showing the tva + if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) { + $but_search_poste=''; + } + // content of the attribute + $r.= sprintf('', + $l_line['ad_text'], $i,$Hid,$but_search_poste); + } + $r.="
%s %s %s
"; + $r.=''; + $r.= ''; + $r.='
'; + return $r; +} +if ( isset($_POST['add_fiche'])) { + AddFiche($cn,$_POST["fiche"],$HTTP_POST_VARS); +?> + + 1 proposer choix cat +// recharger avec var. cat +if ( $a>1 and !isset ($_POST['cat'])) + { + echo "Choix catégories fiche"; + echo '
'; + foreach ($a as $element) { + printf('%s', + $element,GetFicheDefName($cn,$element)); + + } + echo ''; + echo ""; + } +?>