aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php
blob: c8172121c8f497d6ff083565b81858a4c325b2cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php

   if (_RIGHTS_OK !== true) die();

    global $ADAT,$aHetNapjai;

//if ($skin=='ajax') {

    $szulinapos= false;

//    if (__NAPLOADMIN===true || __TANAR===true) {
/*
	echo '<ul>';
	for ($i=0; $i<count($ADAT['ma']['diak']); $i++) {
	echo '<li>';
	echo $ADAT['ma']['diak'][$i]['viseltNevElotag'].' ';
	echo $ADAT['ma']['diak'][$i]['viseltCsaladinev'].' ';
	echo $ADAT['ma']['diak'][$i]['viseltUtonev'];
	echo '</li>';
	}
	echo '</ul>';
*/
    if ($skin!='ajax') echo '<div style="margin-left:40px">';

    echo '<style type="text/css">
	a.btn_szulinap {display:block;text-align:center; margin-top:4px; margin-bottom:2px; }
	a.btn_szulinap button { font-size:x-small;}
	div.szulinaposok_dt {text-align: left; padding-left:4px; color:#888;padding-top:4px; padding-bottom:2px;}
	ul.szulinap li span.eletkor {display:none;}
	ul.szulinap:hover li span.eletkor { display: inline-block; background-color: #ddd; border-radius:10%; padding: 0px 4px; margin-left: 2px; }
</style>';

    for ($n=0; $n<=6; $n++) {
	echo '<div class="szulinaposok_dt">'.(date('Y.m.d.',strtotime($ADAT['heti'][$n]['dt']))).' '.$aHetNapjai[(6+date('w',strtotime($ADAT['heti'][$n]['dt'])))%7].'</div>';
	echo '<ul class="szulinap" style="list-style-type: none;">';
	for ($i=0; $i<count($ADAT['heti'][$n]['diakok']['diak']); $i++) {
	    $_D = $ADAT['heti'][$n]['diakok']['diak'][$i];
	    $_diakId= $_D['diakId'];
	    $_diakOsztalyId = $ADAT['heti'][$n]['diakok']['diakOsztaly'][$_diakId][0];
	    echo '<li class="diakAdat diakNev" data-diakid="'.$_D['diakId'].'">';
	    echo $ADAT['heti'][$n]['diakok']['diak'][$i]['viseltNevElotag'].' ';
	    echo $ADAT['heti'][$n]['diakok']['diak'][$i]['viseltCsaladinev'].' ';
	    echo $ADAT['heti'][$n]['diakok']['diak'][$i]['viseltUtonev'];
	    if ($ADAT['heti'][$n]['diakok']['diak'][$i]['diakEletkor']<=20) echo '<span class="eletkor">'.$ADAT['heti'][$n]['diakok']['diak'][$i]['diakEletkor'].'</span>';
	    if ($ADAT['osztaly'][$_diakOsztalyId]['osztalyJel']!='') {
		echo ' ('.($ADAT['osztaly'][$_diakOsztalyId]['osztalyJel']).')';
	    }
	    echo '</li>';
	}

	for ($i=0; $i<count($ADAT['heti'][$n]['tanarok']); $i++) {
	    $_D = $ADAT['heti'][$n]['tanarok'][$i];
	    $_tanarId= $_D['tanarId'];
	    if (is_array($_D)) {
		echo '<li class="tanarAdat tanarNev" data-tanarid="'.$_tanarId.'">';
		echo $_D['tanarNev'].' (tanár)';
		echo '</li>';
	    }
	}
	echo '</ul>';

    }

    if (is_array($ADAT['ma']['diakOsztaly'])) foreach($ADAT['ma']['diakOsztaly'] as $_diakId => $_osztalyId) {
	$O[$_osztalyId[0]]++;
	if ( defined('__USERDIAKID') && __USERDIAKID == $_diakId ) $szulinapos = true;

    }

    if ($szulinapos) echo _HAPPYBIRTHDAY;

    if ($skin=='ajax') {
    echo '<a href="'.href('index.php?page=naplo&f=szulinap').'" class="btn_szulinap">';
	echo '<button><span class="icon-th-list" style="font-size:8px; color:#888"></span> Születésnaposok</button>';
    echo '</a>';
    }
    if ($skin!='ajax') echo '</div>';

/*
    if (is_array($O)) {
	echo '<ul>';
	foreach($O as $osztalyId => $db) {
	    echo '<li>';
	    echo $ADAT['osztaly'][$osztalyId]['osztalyJel'].': ' ;
	    echo $db.' ';
	    echo '</li>';
	}
	echo '</ul>';
    }
*/
//}

?>