function generaHoraris($LOH)
{
    $RET = array();
    $ESP = array();
    if (sizeof($LOH) > 4) {
        foreach ($LOH as $OH) {
            $LOHE = $OH->getHorarisespaiss();
            $ESP[$LOHE[0]->getNomEspai()][$OH->getHorainici('H:i')][$OH->getDia('m')][$OH->getDia('d')] = $OH->getDia('d');
        }
        foreach ($ESP as $Espai => $D1) {
            foreach ($D1 as $Hi => $D2) {
                foreach ($D2 as $m => $D3) {
                    $RET[] = $Espai . ' a les ' . $Hi . ' els dies ' . implode(', ', $D3) . generaMes($m);
                }
            }
        }
        return implode('<br />', $RET);
    } else {
        foreach ($LOH as $OH) {
            $LOHE = $OH->getHorarisespaiss();
            $Espai = $LOHE[0]->getNomEspai();
            $RET[$OH->getHorarisid()] = generaData($OH->getDia('Y-m-d')) . ' a ' . $Espai . ' a les ' . $OH->getHorainici('H:i') . ' h.';
        }
        return implode('<br />', $RET);
    }
}
示例#2
0
    </div>

    <div>
        
    <?php 
$C = new Criteria();
$C->addAscendingOrderByColumn(HorarisPeer::DIA);
$cat_ant = "";
if (!$LLISTAT_CURSOS->getNbResults()) {
    echo '<div>';
    echo '<div class="h_llistat_activitat_titol">No hem trobat cap resultat amb aquests paràmetres.</div>';
    echo '</div>';
    echo '<div style="margin-top:10px; clear:both;"></div>';
} else {
    foreach ($LLISTAT_CURSOS->getResults() as $OC) {
        $DATA_INICI = $OC->getDatainici('d') . ' ' . generaMes($OC->getDatainici('m')) . ' de ' . $OC->getDatainici('Y');
        echo '<div style="margin-top:10px; margin-bottom:10px;">';
        //Si la categoria és diferent a l'anterior la mostrem
        if ($cat_ant != $OC->getCategoria()) {
            echo '<div class="h_llistat_activitat_tipus_titol">' . $OC->getCategoriaText() . '</div>';
        }
        echo '<div class="h_llistat_acivitat_titol">
                            <div style="float:left">
                                <a href="' . url_for('@hospici_detall_curs?idC=' . $OC->getIdcursos() . '&titol=' . $OC->getNomForUrl()) . '">' . $OC->getTitolcurs() . '</a>
                            </div>';
        //Si es pot reservar entrada per internet, es mostra.
        if ($OC->getIsEntrada()) {
            echo '  <div style="float:right">
                                    <a name="link_compra" style="text-decoration:underline; color:blue; font-size:10px;" href="' . url_for('@hospici_detall_curs?idC=' . $OA->getIdCursos() . '&titol=' . $OC->getNomForUrl()) . '">Reservar matrícula</a>
                                </div>';
        }
示例#3
0
function this_calendari_mes($data, $OCUPACIO = array())
{
    $RET = "";
    $month = date('m', $data);
    $year = date('Y', $data);
    //Agafem el primer dia del mes
    $data = mktime(0, 0, 0, $month, 1, $year);
    $blancs = date('w', $data) - 1;
    if ($blancs == -1) {
        $blancs = 6;
    }
    $RET = '<div style="width:140px; text-align:center; font-weight:bold; background-color:beige;">' . generaMes($month, true) . '</div>';
    while ($blancs-- > 0) {
        $RET .= '<div style="display:block; float:left; width: 20px; text-align:center; ">&nbsp;</div>';
    }
    $span = "";
    for ($dia = 1; $dia <= date('t', $data); $dia++) {
        $t = mktime(0, 0, 0, $month, $dia, $year);
        $d = $dia < 10 ? '0' . $dia : $dia;
        $class = '';
        if (isset($OCUPACIO[$year . '-' . $month . '-' . $d])) {
            $span = '<span>Ocupat les següents hores:';
            foreach ($OCUPACIO[$year . '-' . $month . '-' . $d] as $e => $A_H) {
                foreach ($A_H as $hi => $hf) {
                    if ($hf > $hi) {
                        $span .= '<br />de ' . $hi . ' a ' . $hf;
                        $class = ' class="selec" ';
                    }
                }
            }
            $span .= '</span>';
        }
        //Si el dia és dilluns, fem una nova línia
        if (date('w', $t) == 1) {
            $RET .= '<div style="display:block; float:left; width: 20px; text-align:center; clear:both; "><a class="tt2" href="#"><div ' . $class . '>' . $dia . '</div>' . $span . '</a></div>';
        } else {
            $RET .= '<div style="display:block; float:left; width: 20px; text-align:center; "><a class="tt2" href="#"><div ' . $class . '>' . $dia . '</div>' . $span . '</a></div>';
        }
    }
    return $RET;
}
示例#4
0
文件: _agenda.php 项目: nagiro/intra
		else  $('#DIV'+idA).fadeOut(2000);				
	}
</script>


<style>
	a.tt3:hover span { display:block; }  
	a.tt3 span { display:none; }
</style>

    <TD colspan="2" class="CONTINGUT">
    	<TABLE class="BOX">
    	<TR>
			<TD class="NOTICIA">
				<DIV class="TITOL">Durant el mes <?php 
echo generaMes($DATA);
?>
 hi ha <?php 
echo $QUANTES;
?>
 activitats coincidents de les quals <?php 
echo sizeof($ACTIVITATS_LLISTAT);
?>
 són consultables. </DIV>
				<DIV class="TEXT">
					<?php 
foreach ($ACTIVITATS_LLISTAT as $ID => $ACTIVITAT) {
    ?>
					<?php 
    $text = $ACTIVITAT['TEXT'] . '<br /><br />' . implode(' - ', $ACTIVITAT['DIES']);
    ?>