Agenda op Apple en Windows

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

George van Baasbank

George van Baasbank

30/01/2014 17:11:51
Quote Anchor link
Hallo allemaal,

Ik heb een agenda ontwikkeld (zie voorgaande vragen) die op dit moment op mijn Windows-laptop goed werkt. Ik kan scrollen tussen verschillende maanden en op de dagen dat er een item in de agenda is geboekt wordt de betreffende dag in een andere kleur weergegeven.

Als deze agenda op een Apple-machine wordt weergegeven loopt alles in het honderd. Jaaraanduiding verdwijnt en ook het scrollen door de maanden heen verloopt niet goed.

Mijn vraag is dan ook: Moet ik rekening houden met verschillende platformen danwel browsers?

De bewuste pagina is bereikbaar onder http://www.podiumspektakel.eu/es-agenda.php

Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<?php

/**
 * @author             George van Baasbank
 * @package            Podiumspektakel
 * @subpackage        ES-agenda
 * @copyright        Ermelo Software
 * @since            28-01-2014
 * bestandsnaam        es-agenda.php
 * beschrijving        Agenda                 
 * opmerking        
 * taalmodule        
 * e-mail            [email protected]
 * project            Podiumspektakel
 *
 */
 
 /**
 * Wijzigingslog
 *
 * Datum        Developer    Aanpassing
 * 28-01-2014   George      Ontwikkeling
 *
 */

 
session_start();
 
error_reporting(0);

include "include/systeem.inc.php";
include "functies/functiebieb.inc.php";

// Geindexeerde array met dagen
$aDagen = array (
    0 => 'zondag',
         'maandag',
         'dinsdag',
         'woensdag',
         'donderdag',
         'vrijdag',
         'zaterdag',
);


// Geïndexeerde array met maanden
$aMaanden = array (
    1 => 'januari',
         'februari',
         'maart',
         'april',
         'mei',
         'juni',
         'juli',
         'augustus',
         'september',
         'oktober',
         'november',
         'december'
);

include "include/connectie.inc.php";
$sql = "select
   count(id) as aantal,
   datum
from
   sys__agenda
group by
   day(datum)"
;
  
$cResultAgenda = mysqli_query($verbinding,$sql);
$aDatum = array();
$aAantal = array();

while($rowAgenda = mysqli_fetch_array($cResultAgenda)) {
    $aDatum[]  = $rowAgenda['datum'];
    $aAantal[] = $rowAgenda['aantal'];
}


mysqli_close($verbinding);

$lStop = false;
$nJaar = date("Y");   // Jaartal
$nMaand_n = date("n");  // Maand
$nMaand = date("m");
$cMaandAanduiding = $aMaanden[$nMaand_n] . " " . $nJaar;


if($_SERVER['REQUEST_METHOD'] === 'POST') {
    
    $cActie = $_POST['actie'];

    $nMaand = $_SESSION['maand'];
    $nMaand_n = $_SESSION['maand_n'];
    $nJaar = $_SESSION['jaar'];
    
    if($cActie == "vorige maand") {
        $nMaand = $nMaand - 1;
        $nMaand_n = $nMaand_n - 1;
        if($nMaand == 0) {
            $nMaand = 12;
            $nMaand_n = 12;
            $nJaar = $nJaar - 1;
        }
    }
else {
        $nMaand++;
        $nMaand_n++;
        if($nMaand === 13) {
            $nMaand = 1;
            $nMaand_n = 1;
            $nJaar = $nJaar + 1;
        }
    }

    $_SESSION['maand'] = $nMaand;
    $_SESSION['maand_n'] = $nMaand_n;
    $_SESSION['jaar'] = $nJaar;
    $cMaandAanduiding = $aMaanden[$nMaand_n] . " " . $nJaar;
}


?>



<!DOCTYPE html>

<html lang="nl">

<head>
    <title>Podiumspektakel 2015</title>
    <meta charset="utf-8" />    
    <meta http-equiv="content-type" content="text/html" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="robots" content="noindex,nofollow" />
    <meta name="googlebot" content="noodp, noarchive, nosnippet, noindex, nofollow" />
    <meta name="keywords" content="<?php echo $cMetaKeywords ; ?>" />
    <meta name="author" content="<?php echo $cMetaAuteur ; ?>" />
    <meta name="description" content="<?php echo $cMetaDescription ; ?>" />
    <meta name="copyright" content="Ermelo Software 2014" />
    <link rel="stylesheet" href="styles/elegant-press.css" type="text/css" />
    <script src="scripts/elegant-press.js" type="text/javascript"></script>
    <!--[if IE]><style>#header h1 a:hover{font-size:75px;}</style><![endif]-->
</head>

<body>
    <div class="main-container">
        <?php include "include/header.inc.php" ; ?>
    </div>
    
    <div class="main-container">
        
    </div>
    
    <div class="main-container">
        <div class="container1">
            
            <article class="box2" id="home_featured21">
                <div class="regelhoogte25"></div>
                <div class="box3">
                
                    <!-- Start agenda -->
                    <a id="bovenaan"></a>
                    <div class="regelhoogte25"></div>
                    
                    <p class="headertekst">Agenda&nbsp;<?php echo $cMaandAanduiding ; ?></p>
                    <form action="es-agenda.php#bovenaan" method="POST">
                        <div><input type="submit" name="actie" value="vorige maand" /><input type="submit" name="actie" value="volgende maand" /></div>
                    </form>
                    <?php
                        $nHor
= 1;
                        while($nHor < 8 ) {
                    ?>

                    <div class="ag_dagen"><?php echo $aDagen[$nHor - 1] ; ?></div>
                    <?php
                        $nHor
++;
                        }

                    ?>

                    <?php
                        $nHor
= 1;
                        $nVert = 1;
                        $nDatum = date("d");  // Datum
                        $nEerste = "01";
                        $nLaatste = date("t", strtotime($nJaar . "-" . $nMaand . "-01"));
                        $nDatumTeller = "";
                        $nDag = date("w");    // Dag van de week (maandag = 1, zondag = 7)
                        $cTest = date("w", strtotime($nJaar . "-" . $nMaand . "-" . $nEerste)); // Wanneer was de eerste van de maand
                        $lStart = FALSE;
                        $lStop = FALSE;
                        
                        while($nVert < 7 ) {
                            $nHor = 1;
                            while($nHor < 8 ) {
                                if(($cTest+1) == $nHor AND $lStart == FALSE ) {
                                    $lStart = TRUE;
                                }

                                if($lStart == TRUE ) {
                                    if(($nDatumTeller < $nLaatste) AND $lStop == FALSE)  {
                                        $nDatumTeller++;
                                    }
else {
                                        $nDatumTeller = "";
                                        $nVert = 9;
                                        $lStop = TRUE;
                                    }
                                }

                    ?>

                    <?php if ($nDatumTeller <= $nLaatste ) { ?>
                    
                    <?php
                        if($nMaand == 1) {
                            $cMaand = "01";
                        }

                        if($nMaand == 2) {
                            $cMaand = "02";
                        }

                        if($nMaand == 3) {
                            $cMaand = "03";
                        }

                        if($nMaand == 4) {
                            $cMaand = "04";
                        }

                        if($nMaand == 5) {
                            $cMaand = "05";
                        }

                        if($nMaand == 6) {
                            $cMaand = "06";
                        }

                        if($nMaand == 7) {
                            $cMaand = "07";
                        }

                        if($nMaand == 8) {
                            $cMaand = "08";
                        }

                        if($nMaand == 9) {
                            $cMaand = "09";
                        }

                        $dAgendaDatum = $nJaar . "-" . $cMaand . "-" . "$nDatumTeller";
                        $key = array_search($dAgendaDatum,$aDatum);
                        $nToonAantal = $aAantal[$key];
                        if($key > 0 ) {
                            $cOpbouw = "ag_opbouw_agenda";
                            if($nToonAantal >= $cMaxAfspraken) {
                                $cOpbouw = "ag_opbouw_max";
                            }
                        }
else {
                            $cOpbouw = "ag_opbouw";
                        }

                    ?>

                    <?php
                     if($key > 0 ) {
                    ?>

                    <a href="es-dag.php?datum=<?php echo $dAgendaDatum ; ?>" style="color: brown!important;"><div class="<?php echo $cOpbouw ; ?>">
                        <?php
                            echo $nDatumTeller ;
                            if($key > 0) {
                        ?>

                        <br />Aantal:&nbsp;
                        <?php echo $nToonAantal ;  } ?>
                    </div></a>
                    <?php } else { ?>
                    <div class="<?php echo $cOpbouw ; ?>">
                        <?php
                            echo $nDatumTeller ;
                        ?>

                    </div>
                    <?php } } ?>
                    
                    <?php
                        $nHor
++;
                        if($nHor == 8 ) {
                            $nVert++;
                        }
                        }
                        }

                    ?>

                    
                    <!-- Einde agenda -->
                </div>
                <div class="clear"></div>
            </article>    
        </div>
        <br />
        <br />
        <div class="container2">
        
        </div>
    </div>
    <div class="main-container">
    
    </div>
    
    <?php include "include/footer.inc.php" ; ?>

    <br />
    <br />

</body>

</html>
 
PHP hulp

PHP hulp

29/03/2024 08:02:07
 
- SanThe -

- SanThe -

30/01/2014 17:18:20
Quote Anchor link
Haal die pagina eens door de validator.
HTML 4 errors CSS 60 errors
 
George van Baasbank

George van Baasbank

30/01/2014 17:32:50
Quote Anchor link
San The

Ik krijg bij de CSE-Validator (versie 14.0) geen medlingen van fouten. Welke validator gebruik jij?
 
- SanThe -

- SanThe -

30/01/2014 17:36:36
Quote Anchor link
Van w3.org
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.