Esempio n. 1
0
function Arbo_afficher2($liste_elements, $html = '')
{
    if (!empty($liste_elements)) {
        echo '<ol class="dd-list">';
        foreach ($liste_elements as $element) {
            echo '<li class="dd-item" data-id="' . $element['id_arbo'] . '">';
            echo '<div class="dd-handle">';
            if ($element['id_arbo_pere'] == 0) {
                echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="20" align="center" valign="top">';
                if ($element['etat'] == 'inactif') {
                    echo '<a href="arbo_actions.php?action=Page_Etat&id_article=' . $element['id_pere'] . '&code_arbo=' . $data_out['code_arbo'] . '"><img src="../img/ico_ko.png" alt="Non publi&eacute;" width="16" height="16" border="0" align="absmiddle"	title="Non publi&eacute;" class="toolt" /></a>';
                }
                echo '	</td>';
                echo '	<td width="25" align="center" valign="top">
								<a href="site_dynamique_actions.php?action=Site_Apercu&id_article=' . $element['id_pere'] . '&tmsp=' . time() . '&code_arbo=' . $data_out['code_arbo'] . '">
									<img src="../img/ico_Modifier.gif" alt="Editer la page" title="Editer la page" width="16" height="16" border="0" align="absmiddle" class="toolt" />
								</a>
							</td>';
                echo '	<td align="left" valign="top">&nbsp;
								' . $element['id_pere'] . '&nbsp;- &nbsp;
								' . $element['intitule'] . ' 
							</td>';
                echo '	<td width="50">
								<div class="cat_sup">';
                if (count($element['liste_fils']) == 0) {
                    echo '<a href=\'javascript: if(confirm("%%ConfirmerSuppressionArticle%% ?"))  location.href= "arbo_actions.php?tmsp=' . time() . '&action=Element_DEL&id_arbo=' . $element['id_arbo'] . '&id_arbo_pere=' . $element['id_arbo_pere'] . '&id_pere=' . $element['id_pere'] . '&type_pere=' . $element['type_pere'] . '&code_arbo=' . $data_out['code_arbo'] . '"\'>
										<img src="../img/sup1.gif" alt="Supprimer" border="0" title="Supprimer" /></a>';
                }
                echo '		</div>
							</td>
						</tr>
					</table>';
            } else {
                $etat = $element['etat'] == 'actif' ? 'ok' : 'ko';
                $intitule = $element['intitule'] != '' ? $element['intitule'] : 'Sans intitul&eacute;';
                echo '<img src="../img/ico_' . $etat . '.png" alt="Actif" width="16" height="16" border="0" align="absmiddle" title="Actif" class="toolt" />';
                echo '<a href=\'site_dynamique_actions.php?action=Site_Apercu&id_article=' . $element['id_pere'] . '&tmsp=' . time() . '&code_arbo=' . $data_out['code_arbo'] . '\'><img src="../img/ico_Modifier.gif" alt="Editer la page de la cat&eacute;gorie" title="Editer la page de la cat&eacute;gorie" width="16" height="16" border="0" align="absmiddle" class="toolt" /></a>
			<a href=\'javascript: document.frm_categorie_upd.intitule.value=' . addslashes($element['intitule']) . '; document.frm_categorie_upd.id_arbo.value=' . $categorie['id_arbo'] . '; App2("ModifCat");\'>' . $intitule . '</a>';
                echo '<div class="cat_ajout"><a href=\'javascript: document.frm_ss_categorie_add.id_arbo_pere.value=' . $element['id_arbo_pere'] . '; App("AjoutSsCat_WD");\'><img  src="../img/bt_add.png" alt="Ajouter une sous-cat&eacute;gorie" width="16" height="16" border="0" align="absmiddle" />Ajouter une sous-cat&eacute;gorie</a></div>';
                echo '<div class="cat_sup">';
                if (count($element['liste_fils']) == 0) {
                    echo '<a href=\'javascript: if(confirm("%%ConfirmerSuppressionCategorie%% ?"))  location.href="arbo_actions.php?tmsp=' . time() . '&action=Element_DEL&id_arbo=' . $element['id_arbo'] . '&id_arbo_pere=' . $element['id_arbo_pere'] . '&id_pere=' . $element['id_pere'] . '&type_pere=' . $element['type_pere'] . '&code_arbo=' . $data_out['code_arbo'] . '"\'><img src="../img/sup1.gif" alt="Supprimer" width="13" height="13" border="0" title="Supprimer" class="toolt" /></a>';
                }
                echo '</div>';
            }
            echo '</div>';
            Arbo_afficher($element['liste_fils'], $html);
            echo '</li>';
        }
        echo '</ol>';
    }
}
Esempio n. 2
0
function Arbo_afficher($liste_elements, $data_out)
{
    if (!empty($liste_elements)) {
        echo '<ol class="dd-list">';
        foreach ($liste_elements as $element) {
            echo '<li class="dd-item dd3-item" data-id="' . $element['id_arbo'] . '">';
            echo '<div class="dd-handle dd3-handle"></div>';
            echo '<div class="dd3-content">';
            if ($element['id_arbo_pere'] == 0) {
                //Cas document
                echo '<table width="90%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="20" align="center" valign="top">';
                if ($element['etat'] == 'inactif') {
                    echo '<a href="actions.php?action=Arbo_ElementEtat&id_arbo=' . $element['id_arbo'] . '&code_arbo=' . $data_out['code_arbo'] . '"><img src="../img/ico_ko.png" alt="Non publi&eacute;" width="16" height="16" border="0" align="absmiddle"	title="Non publi&eacute;" class="toolt" /></a>';
                }
                echo '	</td>';
                echo '	<td width="1%" align="left" valign="top">
								<a href="javascript:popup_element_upd(' . $element['id_pere'] . ',\'' . $data_out['code_arbo'] . '\')" class="scrolltop" name="Element_UPD">
									<img src="../img/ico_Modifier.gif" alt="Editer la page" title="Modifier le document" width="16" height="16" border="0" align="absmiddle" class="toolt" />
								</a>
							</td>';
                echo '	<td width="90%" align="left" valign="top">&nbsp;
								' . $element['id_pere'] . '&nbsp;- &nbsp;
								' . $element['intitule'] . ' 
							</td>';
                echo '	<td align="right" width="9%" valign="top" nowrap="nowrap">
								<div class="cat_ajout">';
                if (count($element['liste_fils']) == 0) {
                    echo '<a href=\'javascript: if(confirm("%%ConfirmerSuppressionArticle%% ?"))  location.href= "actions.php?tmsp=' . time() . '&action=Arbo_Element_DEL&id_arbo=' . $element['id_arbo'] . '&id_arbo_pere=' . $element['id_arbo_pere'] . '&id_pere=' . $element['id_pere'] . '&type_pere=' . $element['type_pere'] . '&code_arbo=' . $data_out['code_arbo'] . '"\'><img src="../img/sup1.gif" alt="Supprimer" border="0" title="Supprimer" /></a>';
                }
                echo '		</div>
							</td>
						</tr>
					</table>';
            } else {
                //Cas catégorie
                $etat = $element['etat'] == 'actif' ? 'ok' : 'ko';
                $intitule = $element['intitule'] != '' ? $element['intitule'] : 'Sans intitul&eacute;';
                echo '<table width="95%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="1%" align="left" valign="top">
								<a href=\'actions.php?action=Arbo_ElementEtat&id_arbo=' . $element['id_arbo'] . '&code_arbo=' . $data_out['code_arbo'] . '\'>
									<img src="../img/ico_' . $etat . '.png" alt="Actif" width="16" height="16" border="0" align="absmiddle" title="Actif" class="toolt" /></a>
							</td>';
                echo '<td width="64%" align="left" valign="center">&nbsp;
						<!--<a href=\'actions.php?action=SiteDynamique_Apercu&id_article=' . $element['id_pere'] . '&tmsp=' . time() . '&code_arbo=' . $data_out['code_arbo'] . '\'>
							<img src="../img/ico_Modifier.gif" alt="Editer la page de la cat&eacute;gorie" title="Editer la page de la cat&eacute;gorie" width="16" height="16" border="0" align="absmiddle" class="toolt" />
						</a>-->
						<a href=\'javascript: popup_categorie_upd(' . $element['id_arbo'] . ', "' . $data_out['code_arbo'] . '");\'
						 class=scrolltop name="Categorie_UPD">' . $intitule . '</a>
					</td>';
                echo '<td width="35%" align="right" valign="top" nowrap="nowrap">
						<div class="cat_ajout">';
                if ($element['niveau'] < 2) {
                    echo '&nbsp;<a href=\'javascript: document.frm_ss_categorie_add.id_arbo_pere.value=' . $element['id_arbo'] . '; App_g("SsCategorie_ADD_WD");\'class=scrolltop name="SsCategorie_ADD"><img src="../img/bt_add.png" alt="Ajouter une sous cat&eacute;gorie" width="16" height="16" border="0" align="absmiddle" />Ajouter une sous cat&eacute;gorie</a>';
                }
                if (count($element['liste_fils']) == 0) {
                    echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href=\'javascript: if(confirm("%%ConfirmerSuppressionDossier%% ?"))  location.href="actions.php?tmsp=' . time() . '&action=Arbo_Element_DEL&id_arbo=' . $element['id_arbo'] . '&id_arbo_pere=' . $element['id_arbo_pere'] . '&id_pere=' . $element['id_pere'] . '&type_pere=' . $element['type_pere'] . '&code_arbo=' . $data_out['code_arbo'] . '"\'><img src="../img/sup1.gif" alt="Supprimer" width="13" height="13" border="0" title="Supprimer" class="toolt" align="absmiddle" /></a>';
                }
                echo '		</div>
						</td>
					</tr>
				</table>';
            }
            echo '</div>';
            Arbo_afficher($element['liste_fils'], $data_out);
            echo '</li>';
        }
        echo '</ol>';
    }
}
Esempio n. 3
0
function Arbo_afficher($liste_elements, $data_out)
{
    if (!empty($liste_elements)) {
        echo '<ol class="dd-list">';
        foreach ($liste_elements as $element) {
            $style = '';
            $style_pourcentage = '';
            $pourcentage = 0;
            if ($data_out['type_affichage'] == 'a_faire' && $element['id_arbo_pere'] != 0 && $element['nb_taches_a_faire'] == 0 || $data_out['type_affichage'] == 'a_faire' && $element['id_arbo_pere'] == 0 && $element['etat'] == 'actif') {
                $style = 'display:none;';
            }
            echo '<li class="dd-item dd3-item" data-id="' . $element['id_arbo'] . '" style="' . $style . '">';
            echo '<div class="dd-handle dd3-handle"></div>';
            echo '<div class="dd3-content">';
            if ($element['id_arbo_pere'] == 0) {
                //Cas document
                echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="20" align="center" valign="top">&nbsp;';
                echo '	</td>';
                echo '	<td width="1%" align="left" valign="top">
								<a href="javascript:popup_tache_upd(' . $element['id_pere'] . ',\'' . $data_out['code_arbo'] . '\')" class="scrolltop" name="ArticleUPD">
									<img src="../img/ico_Modifier.gif" alt="Editer la page" title="Modifier le document" width="16" height="16" border="0" align="absmiddle" class="toolt" />
								</a>
							</td>';
                echo '	<td width="90%" align="left" valign="top">&nbsp;' . $element['intitule'] . '<div class="' . $element['priorite'] . '"><strong>' . $element['priorite'] . '</strong></div></td>';
                echo '	<td align="right" width="9%" valign="top" nowrap="nowrap">
								<div class="cat_suppr">';
                if (count($element['liste_fils']) == 0) {
                    echo '<a href=\'javascript: if(confirm("%%ConfirmerSuppressionTache%% ?"))  location.href= "actions.php?tmsp=' . time() . '&action=Element_DEL&id_arbo=' . $element['id_arbo'] . '&id_arbo_pere=' . $element['id_arbo_pere'] . '&id_pere=' . $element['id_pere'] . '&type_pere=' . $element['type_pere'] . '&code_arbo=' . $data_out['code_arbo'] . '"\'><img src="../img/sup1.gif" alt="Supprimer" border="0" title="Supprimer" /></a>';
                }
                echo '		</div>
								<div class="etat_tache">';
                if ($element['etat'] == 'inactif') {
                    echo '<a href="actions.php?action=Element_Etat&id_arbo=' . $element['id_arbo'] . '&code_arbo=' . $data_out['code_arbo'] . '"><img src="../img/ico_ko.png" alt="A faire" width="16" height="16" border="0" align="absmiddle"	title="A faire" class="toolt" /></a>';
                } else {
                    echo '<a href=\'actions.php?action=Element_Etat&id_arbo=' . $element['id_arbo'] . '&code_arbo=' . $data_out['code_arbo'] . '\'>
												<img src="../img/ico_ok.png" alt="T&acirc;che effectu&eacute;e" width="16" height="16" border="0" align="absmiddle" title="T&acirc;che effectu&eacute;e" class="toolt" /></a>';
                }
                echo '		</div>
							</td>
						</tr>
					</table>';
            } else {
                //Cas dossier
                $etat = $element['etat'] == 'actif' ? 'ok' : 'ko';
                $intitule = $element['intitule'] != '' ? $element['intitule'] : 'Sans intitul&eacute;';
                $total_taches = $element['nb_taches_a_faire'] + $element['nb_taches_terminees'];
                $nb_taches = $element['nb_taches_a_faire'] > 0 ? $element['nb_taches_a_faire'] : 'Aucune';
                $nb_taches_finies = $element['nb_taches_terminees'];
                $taches = '(' . $nb_taches . ' t&acirc;che(s) &agrave; faire)';
                if ($total_taches != 0) {
                    $pourcentage = Lib_myRoundDisplay($nb_taches_finies / $total_taches * 100);
                }
                if ($total_taches == 0) {
                    $style_pourcentage = 'display:none;';
                }
                $style_progress = 'width:' . $pourcentage . '%;';
                echo '<table width="95%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="1%" align="left" valign="top">
								<!--<a href=\'actions.php?action=Element_Etat&id_arbo=' . $element['id_arbo'] . '&code_arbo=' . $data_out['code_arbo'] . '\'>
									<img src="../img/ico_' . $etat . '.png" alt="Actif" width="16" height="16" border="0" align="absmiddle" title="Actif" class="toolt" /></a>-->
							</td>';
                echo '<td width="64%" align="left" valign="center" nowrap="nowrap">&nbsp;
						<!--<a href=\'site_dynamique_actions.php?action=Site_Apercu&id_tache=' . $element['id_pere'] . '&tmsp=' . time() . '&code_arbo=' . $data_out['code_arbo'] . '\'>
							<img src="../img/ico_Modifier.gif" alt="Editer la page de la cat&eacute;gorie" title="Editer la page de la cat&eacute;gorie" width="16" height="16" border="0" align="absmiddle" class="toolt" />
						</a>-->
						<a href=\'javascript: popup_categorie_upd(' . $element['id_arbo'] . ', "' . $data_out['code_arbo'] . '");\'
						 class=scrolltop name="ModifCat">' . $intitule . '</a> ' . $taches . '
					</td>';
                echo '<td width="35%" align="right" valign="top" nowrap="nowrap">
						<div class="progress_bar" style="' . $style_pourcentage . '">
						  <div class="progress" style="' . $style_progress . '">' . $pourcentage . '%</div>
						</div>
						<div class="cat_ajout">';
                if ($element['niveau'] < 1) {
                    echo '&nbsp;<a href=\'javascript: document.frm_ss_categorie_add.id_arbo_pere.value=' . $element['id_arbo'] . '; App_g("AjoutSsCat_WD");\'class=scrolltop name="AjoutSsCat"><img src="../img/bt_add.png" alt="Ajouter une sous-cat&eacute;gorie" title="Ajouter une sous-cat&eacute;gorie" width="16" height="16" border="0" align="absmiddle" /></a>';
                }
                if (count($element['liste_fils']) == 0) {
                    echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href=\'javascript: if(confirm("%%ConfirmerSuppressionCategorie%% ?"))  location.href="actions.php?tmsp=' . time() . '&action=Element_DEL&id_arbo=' . $element['id_arbo'] . '&id_arbo_pere=' . $element['id_arbo_pere'] . '&id_pere=' . $element['id_pere'] . '&type_pere=' . $element['type_pere'] . '&code_arbo=' . $data_out['code_arbo'] . '"\'><img src="../img/sup1.gif" alt="Supprimer" width="13" height="13" border="0" title="Supprimer" class="toolt" align="absmiddle" /></a>';
                }
                echo '		</div>
						</td>
					</tr>
				</table>';
            }
            echo '</div>';
            Arbo_afficher($element['liste_fils'], $data_out);
            echo '</li>';
        }
        echo '</ol>';
    }
}