28 include_once (
"FDL/editutil.php");
30 $this->lay->Set(
"docid", $this->
id);
31 $this->lay->Set(
"TITLE", $this->title);
32 if ((
$docid = $this->
id) != 0) {
33 $this->lay->Set(
"onclick",
"edit_transition($docid);");
35 $this->lay->Set(
"onclick",
"alert('veuillez valider le document avant d editer les transitions');");
38 $title = $this->Getattribute(
"BA_TITLE");
39 $this->lay->Set(
"name1",
$title->getLabel());
43 $descrip = $this->Getattribute(
"WOR_DESCRIP");
44 $this->lay->Set(
"name2", $descrip->getLabel());
45 $value = $this->GetValue($descrip->id);
48 $etat = $this->Getattribute(
"WOR_ETAT");
49 $this->lay->Set(
"name3", $etat->getLabel());
50 $value = $this->GetValue($etat->id);
53 $tt = $this->Getattribute(
"WOR_TT");
54 $this->lay->Set(
"name4", $tt->getLabel());
55 $value = $this->GetValue($tt->id);
58 $tt = $this->Getattribute(
"WOR_FAM");
59 $this->lay->Set(
"name5", $tt->getLabel());
60 $value = $this->GetValue($tt->id);
68 $nom_etats = explode(
"\n", $this->GetValue(
"wor_nometat"));
69 $id_etats = explode(
"\n", $this->GetValue(
"wor_idetat"));
70 $idetats_ini = explode(
"\n", $this->GetValue(
"wor_trans_idetat_ini"));
71 $idetats_fin = explode(
"\n", $this->GetValue(
"wor_trans_idetat_fin"));
72 $descriptions = explode(
"\n", $this->GetValue(
"wor_trans_descrip"));
73 $tts = explode(
"\n", $this->GetValue(
"wor_trans_tt"));
74 $tab_tts = explode(
"\n", $this->Getvalue(
"wor_tt"));
76 while (list($k, $xmlencode) = each($tab_tts)) {
77 $temp = base64_decode($xmlencode);
78 $entete =
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\" ?>";
82 $tab_relation_tts[
$id][
"xml"] = $xmlencode;
88 while (list($k, $v) = each($idetats_ini)) {
89 $descrip[$v][$idetats_fin[$k]] = $descriptions[$k];
90 $type_trans[$v][$idetats_fin[$k]] = $tts[$k];
95 $nom_etats2 = $nom_etats;
96 $nom_etats[-1] =
"transition_initiale";
99 $lignes[-1][
"etat"] =
"transition_initiale";
100 $lignes[-1][
"LIGNEEE"] =
"LIGNE_transition_initiale:-1";
102 while (list($i, $etat) = each($nom_etats)) {
104 $ligne1[$i][
"nom_etat"] = $etat;
106 $lignes[$i][
"etat"] = $etat;
107 $lignes[$i][
"LIGNEEE"] =
"LIGNE_$etat";
111 $this->lay->setBlockData(
"LIGNE1", $ligne1);
112 $this->lay->setBlockData(
"LIGNE2", $ligne2);
113 $this->lay->setBlockData(
"LIGNES", $lignes);
117 while (list($i, $etat) = each($nom_etats)) {
119 while (list($x, $etat2) = each($nom_etats2)) {
123 $idetat_ini = $id_etats[$i];
125 $idetat_fin = $id_etats[$x];
127 $result = 100 /
sizeof($nom_etats);
129 $id_tt = $type_trans[$idetat_ini][$idetat_fin];
132 $inputlay =
new Layout(
"FREEDOM/Layout/input_transition2.xml", $action);
133 $inputlay->set(
"width",
"$result");
134 $inputlay->set(
"value_descrip", $descrip[$idetat_ini][$idetat_fin]);
135 $xml_tt = $tab_relation_tts[
"$id_tt"][
"xml"];
136 $inputlay->set(
"xml", $xml_tt);
137 $text_tt = $tab_relation_tts[
"$id_tt"][
"title"];
138 $inputlay->set(
"text_tt", $text_tt);
139 $inputlay->set(
"famid", 555);
141 $inte[$i][$x][
"input"] = $inputlay->gen();
143 $inte[$i][$x][
"input"] =
"<td></td>";
149 while (list($i, $etat) = each($nom_etats)) {
151 $this->lay->setBlockData($lignes[$i][
"LIGNEEE"], $inte[$i]);