コード例 #1
0
function affichage_cloture_user_par_user($tab_type_conges, $tab_all_users_du_hr, $tab_all_users_du_grand_resp, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $session = session_id();
    /************************************************************/
    /* CLOTURE EXERCICE USER PAR USER pour tous les utilisateurs du responsable */
    if (count($tab_all_users_du_hr) != 0 || count($tab_all_users_du_grand_resp) != 0) {
        echo "<form action=\"{$PHP_SELF}?session={$session}&onglet=cloture_year\" method=\"POST\"> \n";
        echo "<table>\n";
        echo '<tr>';
        echo "<td align=\"center\">\n";
        echo "<fieldset class=\"cal_saisie\">\n";
        echo "<legend class=\"boxlogin\">" . _('resp_cloture_exercice_users') . "</legend>\n";
        echo "\t<table>\n";
        echo "\t<tr>\n";
        echo "\t<td align=\"center\">\n";
        // AFFICHAGE TITRES TABLEAU
        echo "\t<table cellpadding=\"2\" class=\"tablo\">\n";
        echo "  <thead>\n";
        echo "\t<tr>\n";
        echo "\t<th>" . _('divers_nom_maj_1') . '</th>';
        echo "\t<th>" . _('divers_prenom_maj_1') . '</th>';
        echo "\t<th>" . _('divers_quotite_maj_1') . '</th>';
        foreach ($tab_type_conges as $id_conges => $libelle) {
            echo "\t<th>{$libelle}<br><i>(" . _('divers_solde') . ")</i></th>\n";
        }
        echo "\t<th>" . _('divers_cloturer_maj_1') . "<br></th>\n";
        echo "\t<th>" . _('divers_comment_maj_1') . "<br></th>\n";
        echo "\t</tr>\n";
        echo "  </thead>\n";
        echo "  <tbody>\n";
        // AFFICHAGE LIGNES TABLEAU
        // affichage des users dont on est responsable :
        $i = true;
        foreach ($tab_all_users_du_hr as $current_login => $tab_current_user) {
            affiche_ligne_du_user($current_login, $tab_type_conges, $tab_current_user, $i);
            $i = !$i;
        }
        echo "\t</tbody>\n\n";
        echo "\t</table>\n\n";
        echo "\t</td>\n";
        echo "\t</tr>\n";
        echo "\t<tr>\n";
        echo "\t<td align=\"center\">\n";
        echo "\t<input type=\"submit\" value=\"" . _('form_submit') . "\">\n";
        echo "\t</td>\n";
        echo "\t</tr>\n";
        echo "\t</table>\n";
        echo "</fieldset>\n";
        echo "</td></tr>\n";
        echo "</table>\n";
        echo "<input type=\"hidden\" name=\"cloture_users\" value=\"TRUE\">\n";
        echo "<input type=\"hidden\" name=\"session\" value=\"{$session}\">\n";
        echo "</form> \n";
    }
}
コード例 #2
0
function affichage_cloture_user_par_user($tab_type_conges, $tab_all_users_du_resp, $tab_all_users_du_grand_resp,  $DEBUG=FALSE)
{
	$PHP_SELF=$_SERVER['PHP_SELF'];
	$session=session_id() ;
	
	/************************************************************/
	/* CLOTURE EXERCICE USER PAR USER pour tous les utilisateurs du responsable */
	
	if( (count($tab_all_users_du_resp)!=0) || (count($tab_all_users_du_grand_resp)!=0) )
	{
		echo "<form action=\"$PHP_SELF?session=$session&onglet=cloture_exercice\" method=\"POST\"> \n";
		echo "<table>\n";
		echo "<tr>\n";
		echo "<td align=\"center\">\n";
		echo "<fieldset class=\"cal_saisie\">\n";
		echo "<legend class=\"boxlogin\">". _('resp_cloture_exercice_users') ."</legend>\n";
		echo "	<table>\n";
		echo "	<tr>\n";
		echo "	<td align=\"center\">\n";

		// AFFICHAGE TITRES TABLEAU
		echo "	<table cellpadding=\"2\" class=\"tablo\" width=\"700\">\n";
		echo "	<thead>\n";
		echo "	<tr align=\"center\">\n";
		echo "	<th>". _('divers_nom_maj_1') ."</th>\n";
		echo "	<th>". _('divers_prenom_maj_1') ."</th>\n";
		echo "	<th>". _('divers_quotite_maj_1') ."</th>\n";
		foreach($tab_type_conges as $id_conges => $libelle)
		{
			echo "	<th>$libelle<br><i>(". _('divers_solde') .")</i></th>\n";
		}
		echo "	<th>". _('divers_cloturer_maj_1') ."<br></th>\n" ;
		echo "	<th>". _('divers_comment_maj_1') ."<br></th>\n" ;
		echo "	</tr>\n";
		echo "	</thead>\n";
		echo "	<tbody>\n";
		
		// AFFICHAGE LIGNES TABLEAU

		// affichage des users dont on est responsable :
		foreach($tab_all_users_du_resp as $current_login => $tab_current_user)
		{		
			affiche_ligne_du_user($current_login, $tab_type_conges, $tab_current_user);
		}
		
		// affichage des users dont on est grand responsable :
		if( ($_SESSION['config']['double_validation_conges']) && ($_SESSION['config']['grand_resp_ajout_conges']) )
		{
			$nb_colspan=50;
			echo "<tr align=\"center\"><td class=\"histo\" style=\"background-color: #CCC;\" colspan=\"$nb_colspan\"><i>". _('resp_etat_users_titre_double_valid') ."</i></td></tr>\n";

			foreach($tab_all_users_du_grand_resp as $current_login => $tab_current_user)
			{		
				affiche_ligne_du_user($current_login, $tab_type_conges, $tab_current_user);
			}
		}	
		echo "	</tbody>\n";
		echo "	</table>\n\n";

		echo "	</td>\n";
		echo "	</tr>\n";
		echo "	<tr>\n";
		echo "	<td align=\"center\">\n";
		echo "	<input type=\"submit\" value=\"". _('form_submit') ."\">\n";
		echo "	</td>\n";
		echo "	</tr>\n";
		echo "	</table>\n";
		
		echo "</fieldset>\n";
		echo "</td></tr>\n";
		echo "</table>\n";
		echo "<input type=\"hidden\" name=\"cloture_users\" value=\"TRUE\">\n";
		echo "<input type=\"hidden\" name=\"session\" value=\"$session\">\n";
		echo "</form> \n";
	}
}