|
Publicité ' | ||||||||||||||||||||||||
|
|
#21 |
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
Oui je connais le modèle MVC mais c'est vrai que j'ai pas encore vraiment la méthodologie et le réflexe pour le mettre en place.
J'ai pas vraiment compris l’intérêt du bout de code que tu m'as fourni. |
|
|
00
|
|
|
#22 | ||
![]() ![]() Benjamin DelespierreDéveloppeur Web Inscription : février 2010 Messages : 3 904 ![]() |
C'est un exemple de couplage HTML / PHP.
Selon toi qu'est ce qui est plus propre: Code :
My 2 cents.
__________________
On vous a menti PHP, Injection de dépendances et composants La POO en PHP en 10 minutes pour moins Suivez-moi sur GitHub et TwitterN'oubliez pas de vous servir des bouttons , et
|
||
|
10
|
|
|
#23 |
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
Ha ok j'avais pas compris ça.
Merci du coup de pouce. |
|
|
00
|
|
|
#24 |
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
Est-ce que tu aurais déjà créé une connexion avec un google calendar?
J'ai importé Zend. Je me perd un peu dans les include et les requires dont j'ai besoin. Également dans mon choix d'authentification (ClientAuth, AuthSub). Etant donné que je veux seulement créé une connexion avec le calendar afin d'enregistrer et d'extraire des donnés et que ça soit ouvert à tout les clients sans authentification. Après niveau manip pour faire ça, je pense avoir trouvé ce qu'il me faut. |
|
|
00
|
|
|
#25 |
![]() ![]() Benjamin DelespierreDéveloppeur Web Inscription : février 2010 Messages : 3 904 ![]() |
Non et d'ailleurs je n'utilise pas Zend, j'ai mes propres outils
__________________
On vous a menti PHP, Injection de dépendances et composants La POO en PHP en 10 minutes pour moins Suivez-moi sur GitHub et TwitterN'oubliez pas de vous servir des bouttons , et
|
|
00
|
|
|
#26 |
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
Haha très très fort merci quand même.
|
|
|
00
|
|
|
#27 |
![]() ![]() Benjamin DelespierreDéveloppeur Web Inscription : février 2010 Messages : 3 904 ![]() |
__________________
On vous a menti PHP, Injection de dépendances et composants La POO en PHP en 10 minutes pour moins Suivez-moi sur GitHub et TwitterN'oubliez pas de vous servir des bouttons , et
|
|
00
|
|
|
#28 |
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
Je disais que tu es très fort par rapport au fait que tu ai créé tes propres outils.
Sinon pour Zend ça fonctionne, ça sent la fin!!! Le seul petit problème que je vais rencontrer, c'est comment rendre "picked" un td en fonction de son time. Si le lundi à 10h la plage est prise, je le vois grace au info que je récupère du calendar mais comment à partir de cette info et du time correspondant puis-je rendre le td picked? |
|
|
00
|
|
|
#29 |
![]() ![]() Benjamin DelespierreDéveloppeur Web Inscription : février 2010 Messages : 3 904 ![]() |
Avec une bête comparaison d'intervale lors de la construction du tableau, tu mets les classes picked là ou il faut.
__________________
On vous a menti PHP, Injection de dépendances et composants La POO en PHP en 10 minutes pour moins Suivez-moi sur GitHub et TwitterN'oubliez pas de vous servir des bouttons , et
|
|
00
|
|
|
#30 |
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
En PHP je vois pas comment faire à part un if dans chaque TD ce qui serait vraiment pas top je pense comme méthode.
Je pense qu'il doit y avoir une manière bien plus efficace en Javascript mais mes limites dans ce langage me bloquent encore une fois... |
|
|
00
|
|
|
#31 |
![]() ![]() Benjamin DelespierreDéveloppeur Web Inscription : février 2010 Messages : 3 904 ![]() |
La génération de ton tableau se fait bien à partir d'une boucle non ? Dans ce cas, c'est pas plus mal de tester les valeurs pour poser les classes aux bons endroits au moment de sa construction.
__________________
On vous a menti PHP, Injection de dépendances et composants La POO en PHP en 10 minutes pour moins Suivez-moi sur GitHub et TwitterN'oubliez pas de vous servir des bouttons , et
|
|
00
|
|
|
#32 | ||
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
Non, ça n'est plus une boucle.
Voilà à quoi ressemble le code maintenant. Code :
|
||
|
|
00
|
|
|
#33 |
![]() ![]() Benjamin DelespierreDéveloppeur Web Inscription : février 2010 Messages : 3 904 ![]() |
Code :
echo '<tr><th>'.$dateDuJour[0].'</th><td time="'.$format_heur[0].'10:00:00.000+02:00">00</td><td time="'.$format_heur[0].'10:20:00.000+02:00">20</td><td time="'.$format_heur[0].'10:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[0].'11:00:00.000+02:00">00</td><td time="'.$format_heur[0].'11:20:00.000+02:00">20</td><td time="'.$format_heur[0].'11:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[0].'12:00:00.000+02:00">00</td><td time="'.$format_heur[0].'12:20:00.000+02:00">20</td><td time="'.$format_heur[0].'12:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[0].'13:00:00.000+02:00">00</td><td time="'.$format_heur[0].'13:20:00.000+02:00">20</td><td time="'.$format_heur[0].'13:40:00.000+02:00">40</td><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><td time="'.$format_heur[0].'16:00:00.000+02:00">00</td><td time="'.$format_heur[0].'16:20:00.000+02:00">20</td><td time="'.$format_heur[0].'16:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[0].'17:00:00.000+02:00">00</td><td time="'.$format_heur[0].'17:20:00.000+02:00">20</td><td time="'.$format_heur[0].'17:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[0].'18:00:00.000+02:00">00</td><td time="'.$format_heur[0].'18:20:00.000+02:00">20</td><td time="'.$format_heur[0].'18:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[0].'19:00:00.000+02:00">00</td><td time="'.$format_heur[0].'19:20:00.000+02:00">20</td><td time="'.$format_heur[0].'19:40:00.000+02:00">40</td></tr><tr><th>'.$dateDuJour[1].'</th><td time="'.$format_heur[1].'10:00:00.000+02:00">00</td><td time="'.$format_heur[1].'10:20:00.000+02:00">20</td><td time="'.$format_heur[1].'10:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[1].'11:00:00.000+02:00">00</td><td time="'.$format_heur[1].'11:20:00.000+02:00">20</td><td time="'.$format_heur[1].'11:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[1].'12:00:00.000+02:00">00</td><td time="'.$format_heur[1].'12:20:00.000+02:00">20</td><td time="'.$format_heur[1].'12:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[1].'13:00:00.000+02:00">00</td><td time="'.$format_heur[1].'13:20:00.000+02:00">20</td><td time="'.$format_heur[1].'13:40:00.000+02:00">40</td><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><td time="'.$format_heur[1].'16:00:00.000+02:00">00</td><td time="'.$format_heur[1].'16:20:00.000+02:00">20</td><td time="'.$format_heur[1].'16:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[1].'17:00:00.000+02:00">00</td><td time="'.$format_heur[1].'17:20:00.000+02:00">20</td><td time="'.$format_heur[1].'17:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[1].'18:00:00.000+02:00">00</td><td time="'.$format_heur[1].'18:20:00.000+02:00">20</td><td time="'.$format_heur[1].'18:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[1].'19:00:00.000+02:00">00</td><td time="'.$format_heur[1].'19:20:00.000+02:00">20</td><td time="'.$format_heur[1].'19:40:00.000+02:00">40</td></tr><tr><th>'.$dateDuJour[2].'</th><td time="'.$format_heur[2].'10:00:00.000+02:00">00</td><td time="'.$format_heur[2].'10:20:00.000+02:00">20</td><td time="'.$format_heur[2].'10:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[2].'11:00:00.000+02:00">00</td><td time="'.$format_heur[2].'11:20:00.000+02:00">20</td><td time="'.$format_heur[2].'11:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[2].'12:00:00.000+02:00">00</td><td time="'.$format_heur[2].'12:20:00.000+02:00">20</td><td time="'.$format_heur[2].'12:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[2].'13:00:00.000+02:00">00</td><td time="'.$format_heur[2].'13:20:00.000+02:00">20</td><td time="'.$format_heur[2].'13:40:00.000+02:00">40</td><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><td time="'.$format_heur[2].'16:00:00.000+02:00">00</td><td time="'.$format_heur[2].'16:20:00.000+02:00">20</td><td time="'.$format_heur[2].'16:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[2].'17:00:00.000+02:00">00</td><td time="'.$format_heur[2].'17:20:00.000+02:00">20</td><td time="'.$format_heur[2].'17:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[2].'18:00:00.000+02:00">00</td><td time="'.$format_heur[2].'18:20:00.000+02:00">20</td><td time="'.$format_heur[2].'18:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[2].'19:00:00.000+02:00">00</td><td time="'.$format_heur[2].'19:20:00.000+02:00">20</td><td time="'.$format_heur[2].'19:40:00.000+02:00">40</td></tr><tr><th>'.$dateDuJour[3].'</th><td time="'.$format_heur[3].'10:00:00.000+02:00">00</td><td time="'.$format_heur[3].'10:20:00.000+02:00">20</td><td time="'.$format_heur[3].'10:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[3].'11:00:00.000+02:00">00</td><td time="'.$format_heur[3].'11:20:00.000+02:00">20</td><td time="'.$format_heur[3].'11:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[3].'12:00:00.000+02:00">00</td><td time="'.$format_heur[3].'12:20:00.000+02:00">20</td><td time="'.$format_heur[3].'12:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[3].'13:00:00.000+02:00">00</td><td time="'.$format_heur[3].'13:20:00.000+02:00">20</td><td time="'.$format_heur[3].'13:40:00.000+02:00">40</td><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><td time="'.$format_heur[3].'16:00:00.000+02:00">00</td><td time="'.$format_heur[3].'16:20:00.000+02:00">20</td><td time="'.$format_heur[3].'16:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[3].'17:00:00.000+02:00">00</td><td time="'.$format_heur[3].'17:20:00.000+02:00">20</td><td time="'.$format_heur[3].'17:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[3].'18:00:00.000+02:00">00</td><td time="'.$format_heur[3].'18:20:00.000+02:00">20</td><td time="'.$format_heur[3].'18:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[3].'19:00:00.000+02:00">00</td><td time="'.$format_heur[3].'19:20:00.000+02:00">20</td><td time="'.$format_heur[3].'19:40:00.000+02:00">40</td></tr><tr><th>'.$dateDuJour[4].'</th><td time="'.$format_heur[4].'10:00:00.000+02:00">00</td><td time="'.$format_heur[4].'10:20:00.000+02:00">20</td><td time="'.$format_heur[4].'10:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[4].'11:00:00.000+02:00">00</td><td time="'.$format_heur[4].'11:20:00.000+02:00">20</td><td time="'.$format_heur[4].'11:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[4].'12:00:00.000+02:00">00</td><td time="'.$format_heur[4].'12:20:00.000+02:00">20</td><td time="'.$format_heur[4].'12:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[4].'13:00:00.000+02:00">00</td><td time="'.$format_heur[4].'13:20:00.000+02:00">20</td><td time="'.$format_heur[4].'13:40:00.000+02:00">40</td><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><td time="'.$format_heur[4].'16:00:00.000+02:00">00</td><td time="'.$format_heur[4].'16:20:00.000+02:00">20</td><td time="'.$format_heur[4].'16:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[4].'17:00:00.000+02:00">00</td><td time="'.$format_heur[4].'17:20:00.000+02:00">20</td><td time="'.$format_heur[4].'17:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[4].'18:00:00.000+02:00">00</td><td time="'.$format_heur[4].'18:20:00.000+02:00">20</td><td time="'.$format_heur[4].'18:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[4].'19:00:00.000+02:00">00</td><td time="'.$format_heur[4].'19:20:00.000+02:00">20</td><td time="'.$format_heur[4].'19:40:00.000+02:00">40</td></tr><tr><th>'.$dateDuJour[5].'</th><td time="'.$format_heur[5].'10:00:00.000+02:00">00</td><td time="'.$format_heur[5].'10:20:00.000+02:00">20</td><td time="'.$format_heur[5].'10:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[5].'11:00:00.000+02:00">00</td><td time="'.$format_heur[5].'11:20:00.000+02:00">20</td><td time="'.$format_heur[5].'11:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[5].'12:00:00.000+02:00">00</td><td time="'.$format_heur[5].'12:20:00.000+02:00">20</td><td time="'.$format_heur[5].'12:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[5].'13:00:00.000+02:00">00</td><td time="'.$format_heur[5].'13:20:00.000+02:00">20</td><td time="'.$format_heur[5].'13:40:00.000+02:00">40</td><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><td time="'.$format_heur[5].'16:00:00.000+02:00">00</td><td time="'.$format_heur[5].'16:20:00.000+02:00">20</td><td time="'.$format_heur[5].'16:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[5].'17:00:00.000+02:00">00</td><td time="'.$format_heur[5].'17:20:00.000+02:00">20</td><td time="'.$format_heur[5].'17:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[5].'18:00:00.000+02:00">00</td><td time="'.$format_heur[5].'18:20:00.000+02:00">20</td><td time="'.$format_heur[5].'18:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[5].'19:00:00.000+02:00">00</td><td time="'.$format_heur[5].'19:20:00.000+02:00">20</td><td time="'.$format_heur[5].'19:40:00.000+02:00">40</td></tr><tr><th>'.$dateDuJour[6].'</th><td time="'.$format_heur[6].'10:00:00.000+02:00">00</td><td time="'.$format_heur[6].'10:20:00.000+02:00">20</td><td time="'.$format_heur[6].'10:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[6].'11:00:00.000+02:00">00</td><td time="'.$format_heur[6].'11:20:00.000+02:00">20</td><td time="'.$format_heur[6].'11:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[6].'12:00:00.000+02:00">00</td><td time="'.$format_heur[6].'12:20:00.000+02:00">20</td><td time="'.$format_heur[6].'12:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[6].'13:00:00.000+02:00">00</td><td time="'.$format_heur[6].'13:20:00.000+02:00">20</td><td time="'.$format_heur[6].'13:40:00.000+02:00">40</td><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><td time="'.$format_heur[6].'16:00:00.000+02:00">00</td><td time="'.$format_heur[6].'16:20:00.000+02:00">20</td><td time="'.$format_heur[6].'16:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[6].'17:00:00.000+02:00">00</td><td time="'.$format_heur[6].'17:20:00.000+02:00">20</td><td time="'.$format_heur[6].'17:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[6].'18:00:00.000+02:00">00</td><td time="'.$format_heur[6].'18:20:00.000+02:00">20</td><td time="'.$format_heur[6].'18:40:00.000+02:00">40</td><th> </th><td time="'.$format_heur[6].'19:00:00.000+02:00">00</td><td time="'.$format_heur[6].'19:20:00.000+02:00">20</td><td time="'.$format_heur[6].'19:40:00.000+02:00">40</td></tr>'; Pourquoi tu ne fais pas générer ça dans la boucle ?
__________________
On vous a menti PHP, Injection de dépendances et composants La POO en PHP en 10 minutes pour moins Suivez-moi sur GitHub et TwitterN'oubliez pas de vous servir des bouttons , et
|
|
00
|
|
|
#34 |
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
Faire une boucle pour chaque jours me pose pas de problème.
Par heure non plus. Mais gérer la ligne entière avec les cases vides, je vois pas comment mis prendre... |
|
|
00
|
|
|
#35 | ||
|
Invité de passage
![]() Inscription : juillet 2008 Messages : 28 ![]() |
J'ai fais ça de la façon suivante:
Code :
Mais il y a un petit soucis concernant la variable $k qui doit avoir comme première valeur '00' et qui se simplifie en '0'. Est-ce obligatoire de faire un if $k=0 $k='00' à l'intérieur de la boucle. |
||
|
|
00
|
Copyright © 2000-2013 - www.developpez.com