From 734e6f48298458d0b24fc0dae66828181224be43 Mon Sep 17 00:00:00 2001 From: Chouchen Date: Mon, 27 Sep 2010 10:48:53 +0000 Subject: [PATCH] =?UTF-8?q?Version=20avec=20modules=20s=C3=A9par=C3=A9s=20?= =?UTF-8?q?!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/AccueilModules.php | 8 +- class/Clock.php | 33 ------- class/Module.php | 9 ++ class/Search.php | 39 -------- getUncompletedTasks.php | 12 --- images/weather/nuage.png | Bin 2253 -> 0 bytes images/weather/peu-nuageux.png | Bin 2414 -> 0 bytes images/weather/pluie.png | Bin 2537 -> 0 bytes images/weather/soleil.png | Bin 2391 -> 0 bytes addLink.php => includes/addLink.php | 0 calculator.html => includes/calculator.html | 0 notepad.html => includes/notepad.html | 0 js/gmap.js | 23 ----- js/jquery.xdomainajax.js | 75 --------------- {class => modules/blogs}/Blogs.php | 11 ++- modules/blogs/css/blogs.css | 0 {db => modules/blogs/db}/blog_links.xml | 0 CURL.php => modules/blogs/includes/CURL.php | 0 .../blogs/includes/addSite.php | 0 blogs.php => modules/blogs/includes/blogs.php | 0 .../blogs/includes/blogs_last_post.php | 2 +- .../blogs/js/blogs.js | 2 +- modules/clock/Clock.php | 48 ++++++++++ modules/clock/css/clock.css | 0 .../clock/js/clock.js | 0 .../clockAdvanced}/ClockAdvanced.php | 5 +- modules/clockAdvanced/css/clockAdvanced.css | 0 .../clockAdvanced/js/clockAdvanced.js | 0 {class => modules/gmap}/Gmap.php | 25 ++--- {css => modules/gmap/css}/gmap.css | 0 modules/gmap/js/gmap.js | 89 ++++++++++++++++++ {class => modules/links}/Links.php | 16 +++- .../links/ajax}/listToReserve.php | 0 {ajax => modules/links/ajax}/loadReserve.php | 3 +- .../links/ajax}/reserveToList.php | 0 .../links/ajax}/update-links-order.php | 0 {css => modules/links/css}/links.css | 0 {db => modules/links/db}/links.xml | 0 .../links/js/links.js | 8 +- {class => modules/mappy}/Mappy.php | 6 +- {css => modules/mappy/css}/mappy.css | 0 {js => modules/mappy/js}/mappy.js | 0 {class => modules/news}/News.php | 0 {class => modules/notes}/Notes.php | 14 ++- .../notes/ajax}/update_position.php | 0 css/note.css => modules/notes/css/notes.css | 2 +- {db => modules/notes/db}/notes.xml | 0 .../notes/includes/add_note.html | 0 .../notes/includes/notes_extract.php | 2 +- .../notes/js/notes.js | 6 +- {class => modules/ouifm}/Ouifm.php | 5 +- modules/ouifm/css/ouifm.css | 0 .../ouifm/js/ouifm.js | 0 {class => modules/rssblogs}/Rssblogs.php | 7 +- {css => modules/rssblogs/css}/rssblogs.css | 0 {db => modules/rssblogs/db}/rss.xml | 0 modules/rssblogs/js/rssblogs.js | 0 modules/search/Search.php | 62 ++++++++++++ {css => modules/search/css}/search.css | 8 +- .../search/js/search.js | 0 {class => modules/todo}/Todo.php | 16 ++-- {ajax => modules/todo/ajax}/saveTodoist.php | 0 {css => modules/todo/css}/todo.css | 4 +- {db => modules/todo/db}/todoist.xml | 0 .../todo/includes/getProjectsList.php | 4 +- modules/todo/includes/getUncompletedTasks.php | 12 +++ .../todo/includes/install-todoist.php | 4 +- {js => modules/todo/js}/getProjectsList.php | 2 +- .../todo/js}/getUncompletedTasks.php | 0 {js => modules/todo/js}/index.js | 2 +- modules/todo/js/todo.js | 0 {class => modules/weather}/Weather.php | 14 ++- {css => modules/weather/css}/neige.css | 0 {css => modules/weather/css}/nuage.css | 0 {css => modules/weather/css}/peunuage.css | 0 {css => modules/weather/css}/pluie.css | 0 {css => modules/weather/css}/soleil.css | 0 {css => modules/weather/css}/weather.css | 0 .../weather/includes/GoogleMeteo.php | 10 +- .../weather/includes/meteo.php | 0 .../weather/js/weather.js | 0 81 files changed, 324 insertions(+), 264 deletions(-) delete mode 100644 class/Clock.php delete mode 100644 class/Search.php delete mode 100644 getUncompletedTasks.php delete mode 100644 images/weather/nuage.png delete mode 100644 images/weather/peu-nuageux.png delete mode 100644 images/weather/pluie.png delete mode 100644 images/weather/soleil.png rename addLink.php => includes/addLink.php (100%) rename calculator.html => includes/calculator.html (100%) rename notepad.html => includes/notepad.html (100%) delete mode 100644 js/gmap.js delete mode 100644 js/jquery.xdomainajax.js rename {class => modules/blogs}/Blogs.php (76%) create mode 100644 modules/blogs/css/blogs.css rename {db => modules/blogs/db}/blog_links.xml (100%) rename CURL.php => modules/blogs/includes/CURL.php (100%) rename addSite.php => modules/blogs/includes/addSite.php (100%) rename blogs.php => modules/blogs/includes/blogs.php (100%) rename blogs_last_post.php => modules/blogs/includes/blogs_last_post.php (93%) rename js/jquery.blogs.js => modules/blogs/js/blogs.js (88%) create mode 100644 modules/clock/Clock.php create mode 100644 modules/clock/css/clock.css rename js/jquery.jclock.js => modules/clock/js/clock.js (100%) rename {class => modules/clockAdvanced}/ClockAdvanced.php (88%) create mode 100644 modules/clockAdvanced/css/clockAdvanced.css rename js/jquery.jclockAdvanced.js => modules/clockAdvanced/js/clockAdvanced.js (100%) rename {class => modules/gmap}/Gmap.php (51%) rename {css => modules/gmap/css}/gmap.css (100%) create mode 100644 modules/gmap/js/gmap.js rename {class => modules/links}/Links.php (74%) rename {ajax => modules/links/ajax}/listToReserve.php (100%) rename {ajax => modules/links/ajax}/loadReserve.php (78%) rename {ajax => modules/links/ajax}/reserveToList.php (100%) rename {ajax => modules/links/ajax}/update-links-order.php (100%) rename {css => modules/links/css}/links.css (100%) rename {db => modules/links/db}/links.xml (100%) rename js/jquery.links.js => modules/links/js/links.js (85%) rename {class => modules/mappy}/Mappy.php (77%) rename {css => modules/mappy/css}/mappy.css (100%) rename {js => modules/mappy/js}/mappy.js (100%) rename {class => modules/news}/News.php (100%) rename {class => modules/notes}/Notes.php (59%) rename {ajax => modules/notes/ajax}/update_position.php (100%) rename css/note.css => modules/notes/css/notes.css (90%) rename {db => modules/notes/db}/notes.xml (100%) rename add_note.html => modules/notes/includes/add_note.html (100%) rename notes_extract.php => modules/notes/includes/notes_extract.php (87%) rename js/jquery.notes.js => modules/notes/js/notes.js (91%) rename {class => modules/ouifm}/Ouifm.php (73%) create mode 100644 modules/ouifm/css/ouifm.css rename js/jquery.ouifm.js => modules/ouifm/js/ouifm.js (100%) rename {class => modules/rssblogs}/Rssblogs.php (82%) rename {css => modules/rssblogs/css}/rssblogs.css (100%) rename {db => modules/rssblogs/db}/rss.xml (100%) create mode 100644 modules/rssblogs/js/rssblogs.js create mode 100644 modules/search/Search.php rename {css => modules/search/css}/search.css (87%) rename js/jquery.search.js => modules/search/js/search.js (100%) rename {class => modules/todo}/Todo.php (73%) rename {ajax => modules/todo/ajax}/saveTodoist.php (100%) rename {css => modules/todo/css}/todo.css (85%) rename {db => modules/todo/db}/todoist.xml (100%) rename getProjectsList.php => modules/todo/includes/getProjectsList.php (75%) create mode 100644 modules/todo/includes/getUncompletedTasks.php rename install-todoist.php => modules/todo/includes/install-todoist.php (83%) rename {js => modules/todo/js}/getProjectsList.php (74%) rename {js => modules/todo/js}/getUncompletedTasks.php (100%) rename {js => modules/todo/js}/index.js (77%) create mode 100644 modules/todo/js/todo.js rename {class => modules/weather}/Weather.php (80%) rename {css => modules/weather/css}/neige.css (100%) rename {css => modules/weather/css}/nuage.css (100%) rename {css => modules/weather/css}/peunuage.css (100%) rename {css => modules/weather/css}/pluie.css (100%) rename {css => modules/weather/css}/soleil.css (100%) rename {css => modules/weather/css}/weather.css (100%) rename GoogleMeteo.php => modules/weather/includes/GoogleMeteo.php (72%) rename meteo.php => modules/weather/includes/meteo.php (100%) rename js/jquery.weather.js => modules/weather/js/weather.js (100%) diff --git a/class/AccueilModules.php b/class/AccueilModules.php index b3f1f01..955d75f 100644 --- a/class/AccueilModules.php +++ b/class/AccueilModules.php @@ -19,7 +19,7 @@ class AccueilModules { $this->getModules(); $this->buildConfigMenu(); }else{ - echo 'baaaaad persistance...'; + echo 'Impossible de trouver le fichier de configuration.'; } } @@ -29,12 +29,12 @@ class AccueilModules { */ function getModules(){ foreach($this->modules as $module=>$moduleConf){ - if(file_exists('class/'.ucfirst($module).'.php') && $moduleConf->visibility == "true"){ + if(file_exists('modules/'.$module.'/'.ucfirst($module).'.php') && $moduleConf->visibility == "true"){ $params = array(); foreach($moduleConf as $confParam){ $params[$confParam->getName()] = "$confParam"; } - require ucfirst($module).'.php'; + require 'modules/'.$module.'/'.ucfirst($module).'.php'; call_user_func(array($module, "start"), $params); } } @@ -88,7 +88,7 @@ class AccueilModules { * @return "ok" String si c'est bon, ou le message d'erreur */ public static function updateModule($module, $things2change){ - require ucfirst($module).'.php'; + require '../modules/'.$module.'/'.ucfirst($module).'.php'; return call_user_func(array($module, "updateConfig"), $things2change); } } \ No newline at end of file diff --git a/class/Clock.php b/class/Clock.php deleted file mode 100644 index 5c0ed2f..0000000 --- a/class/Clock.php +++ /dev/null @@ -1,33 +0,0 @@ -setParams($params); - echo ''; - echo '
'; - } - - private function setParams($params){ - $this->params = $params; - } - - public static function start($params){ - $clock = new clock($params); - } - - public static function updateConfig($updated){ - foreach ($updated as $what=>$withWhat){ - if(in_array($what, self::$paramsList)){ - call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat); - } - } - } -} \ No newline at end of file diff --git a/class/Module.php b/class/Module.php index 616900c..05ec710 100644 --- a/class/Module.php +++ b/class/Module.php @@ -8,6 +8,15 @@ abstract class Module */ protected static $paramsList = array(); + // Nom du module (aka le nom de la classe en minuscule) + protected $moduleName; + + // Libellé du module (aka le nom affiché) + protected $moduleTitle; + + // Le chemin vers le module + protected $pathToModule; + /** * Liste des paramètres et leurs valeurs de l'object * diff --git a/class/Search.php b/class/Search.php deleted file mode 100644 index 5b7bcf3..0000000 --- a/class/Search.php +++ /dev/null @@ -1,39 +0,0 @@ - - -
-
- - - -
    -
  • Web
  • -
  • Images
  • -
  • News
  • -
  • Videos
  • -
- -
-
'; - } - - private function setParams($params){ - $this->params = $params; - } - - public static function start($params){ - $search = new search($params); - } - - public static function updateConfig($updated){ - - } -} \ No newline at end of file diff --git a/getUncompletedTasks.php b/getUncompletedTasks.php deleted file mode 100644 index a7a33ce..0000000 --- a/getUncompletedTasks.php +++ /dev/null @@ -1,12 +0,0 @@ -token== '' || $xmla->token == null) - header('Location: index.php'); -if($xmla->id != '' || $xmla->id != null): -$token = $xmla->token; -$id = $xmla->id;?> - - - 3)X zjfshgiHnVki;IhljE#+ri;t3zkB^X$kc^U*larH_l$4W}myws6mX?;6mzR^7o0yoG zlbW5Do1K-MpPQSTnVp`Uot>DUqMe?enV_SepP!hbrk$apprD|eqNSXprkkXwprfRp zq@|pts-2~%qobpuq@|vwsidT&p{A&xr>dc-tEZ=@qN=W^si~={simu}q^z&0tE;N3 ztEH{5rLMB3uCb=Cv#hPIt*x!8ud=DIw6CwPtFg1HvbC$Swz09Xth2VRw6?Lcw6n9b zt+lzdw6wCdwy(CiueZCjwz#&owz0Xrv%0;pyT7@)xwpEzw!6Kwyui7;ySux)y1c!# zzQeY@!nD7{y}iA&!N&LR z#J%hlP_)6>k>+SJt4%h%n_ z*WAn4-ptwG&)MD1+TYjL*UQ`E(AwV3+u_*Q*v{PI&fVnF+~CgN=iA%c(BJ3O-s05X z*h-QC^M;px`k(%4x+2ZHb+9t1^V#zK?Ck8|@b}*F`sMHR+VubC@b%&H`tI)T=kfO8^ZefR z|Karg-}V0J^7rHP`|$Aa==1pC_W$Gc{^#`i>Gb*I_W$bj`sVlk^YioT_WS4f|Lpht z_4W1b`2Fko{_FYw?)m=r_xJDm|M~g(LOInghUVt5y&ANa?3G?1c^hWTzuffF^Uo)BqR_D58-n-5 z{MYPl*-ua@0BpXR+&SB*1HtuctK#9g@kDm26aYFeTkXYp15l8xee}V`qld=k5PjTS zy)=L|=lqeik9Qw&jjy+>)%v^c(I%DAfVENK~3ps!sg4Wxf_xtbB(G&JY zKF<8Mx-d&g-1VK-oLM6jF@XfZduPsTUwz2jp)S9@F6@=*!|l4NCvK{x(C(-i!Uq7u z=%2i>?$(}|zp2#Y0DxCs>?`?j>fn*OK@z=Dcl$|E7zAlQ?uG_YxuWOmr|+(e<@J}} zw3lod8!ZbA4B)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PuPK&-ec06b|(vc=-kHFg~)D!?nnX zA?>0AN7zfjX#CN`YU!n=m^Cd-8|RT-8+Jz~kgG z1ppG=hY`vtz}*C3KsfWtA<-&Y-ycc=oIbyh`$>@l@WCx}@9|EfOP4SL)cf-yxSN0h z;iErX-uVq>x-|Akxf5d*qJ)77bp0lZjTh>pX=&}7;|c^31~Bv68M??vf&Qyk@FELHgMhGDnp3@Z$cLMHoeEot) z0JwGzZk$4Qsn|2BgQ@Jf=`0tT%}nh&xqOwWs(QtK%5allF*xp*#$`eXGL^qC*dh1u zaP9qlyS9;pkdG%P3?Q^4Zy{W^I6??w04WB%%d|4uLjbb>7shnRKbfBIC*z|617Oh+ zxFm6FJzq1wJZu2MZoInONGb!)r@Qu+Apl5D9G;vX9!d{O4ZX|&U=RO#za7dG_T(1_ z2loR4o_hA#I>wG(8M;v!lEJwEK#(RNftzI8PiFG_r$g|M9lbi=e`0(90s#8?HE&yw z2S-1$PHhNV|DHKp>)X5LDYw2e(V6PR%z=X+Y69+|*oGzrbUp<<^bZL4KW}$YtlN{2 zyWfv)ArFG^U!ZP^ZROt*V&wmUHqG6T4c{D~`WpyB_mx zz*}FCCP7vWMH^7HdTFF*vs?xMNi(3dZdOg|IqP&5id>UwW%?w+4Cf|by5DUE5|UZTcJP$f}SjY7Vi zr%i2fPCk-OVL=fDYFG6gs`a45W%nL)*YE!W#C|0QcreNX00000NkvXXu0mjfDn6N9 diff --git a/images/weather/soleil.png b/images/weather/soleil.png deleted file mode 100644 index f9b9e4c72c1ff1e0fe73b6fe2aef4dbce41c6181..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2391 zcmWlbi9ZzhAI85!?kFNFhKOv*_N!f$mGkFHo8(ATi?!vqAw|ehH0>lg)|GM0mN209=w24Cyi3GUqA_+Le z{~K}fV!THP@QC+VNDzetj}b&6c#H&3&_}DK-7$k^8TXBe!AS8%K zoJ6#lfFK_66A&*6ag#*2$%vCA!AX*a#O)#{NJfx^cux^O1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kRca_(Gj$*_(v6EwIh)DXV!YhtNS|$6%P!`Sv1+%bL<=&j z1xu+U@`Wpp!yg35APG#`nTI~!$-^s)qoVk(`1I33PEMK=IdEwAot#U9w%&f5p<{&~*FJ@6i+mG<+lD#> zr9I}i4=Fe#JjzAx#T#ap)bR!@zok;%fSZ-gaU5~dF2wqYirmu+2U7B4Q}bW4lonnQ zlFEK=E%8i}wb4IC*lGVj=<&n<5JD`)JEBU$nbYTMJk_tS zyt;fUhUS7~==HCb$FUnv+`m6+yzEzK)ZKZonJ7c-i|kO>iVVbhCc3i5yjY(TvACL_L)EW{dq$v#iA*&DBuhc^S|mXd$xHt1E^l+W93#ale*IcSt>N0CpTgfeWx4k_;PzOS zU$H({K(+KA3HGq43H-BJijs9h#r1tL!?h~;l4tBO%E4lit8Zu`|GL5-{Koj3g0I+r z+;X~`3!Z)25!(~3c-?Ew z-D8#UVp(_3IuIJL^q1O9>*jqPh|FTh1NZb3?cu>$8vdhHJ z)w}4t?;i&J^I2?7asS;9{&1AgyJ}Z86{0q|FHZAKMI29bTs#PCcx@#ol5fVgvxq)r zd~!CbJq#JWAO7fl)Ng=({i+UQ1aEfjb-7+eq{v<6Ge*spiY1q&iyO*#mMR1EgLYze zbt;*Pc)nSly`=w*@>;Rz_W;_d ovM}1J9?HMg>FpsV)b|Q7>t<8 diff --git a/addLink.php b/includes/addLink.php similarity index 100% rename from addLink.php rename to includes/addLink.php diff --git a/calculator.html b/includes/calculator.html similarity index 100% rename from calculator.html rename to includes/calculator.html diff --git a/notepad.html b/includes/notepad.html similarity index 100% rename from notepad.html rename to includes/notepad.html diff --git a/js/gmap.js b/js/gmap.js deleted file mode 100644 index bd5deb5..0000000 --- a/js/gmap.js +++ /dev/null @@ -1,23 +0,0 @@ - -$(document).ready(function(){ - - $('#menu-bar').append($('#myAdress')); - $('#map').css({'visibility':'hidden'}); - $('#gmapLink').fancybox({ - 'transitionIn': 'elastic', - 'transitionOut': 'elastic', - 'onClosed': function(){$('#map').css({'visibility':'hidden'});}, - 'onStart': function(){$('#map').css({'visibility':'visible'});} - }); - $('#myAdressField').keydown(function(e){ - var code = (e.keyCode ? e.keyCode : e.which); - if(code == 13) { - var adress = $(this).val(); - geocodeMarker(adress,adress,adress,'','http://maps.gstatic.com/intl/fr_ALL/mapfiles/markers/marker_sprite.png'); - geocodeCenter(adress); - $('#gmapLink').trigger('click'); - - } - }); -}); - diff --git a/js/jquery.xdomainajax.js b/js/jquery.xdomainajax.js deleted file mode 100644 index 2764709..0000000 --- a/js/jquery.xdomainajax.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * jQuery.ajax mid - CROSS DOMAIN AJAX - * --- - * @author James Padolsey (http://james.padolsey.com) - * @version 0.11 - * @updated 12-JAN-10 - * --- - * Note: Read the README! - * --- - * @info http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/ - */ - -jQuery.ajax = (function(_ajax){ - - var protocol = location.protocol, - hostname = location.hostname, - exRegex = RegExp(protocol + '//' + hostname), - YQL = 'http' + (/^https/.test(protocol)?'s':'') + '://query.yahooapis.com/v1/public/yql?callback=?', - query = 'select * from html where url="{URL}" and xpath="*"'; - - function isExternal(url) { - return !exRegex.test(url) && /:\/\//.test(url); - } - - return function(o) { - - var url = o.url; - - if ( /get/i.test(o.type) && !/json/i.test(o.dataType) && isExternal(url) ) { - - // Manipulate options so that JSONP-x request is made to YQL - - o.url = YQL; - o.dataType = 'json'; - - o.data = { - q: query.replace( - '{URL}', - url + (o.data ? - (/\?/.test(url) ? '&' : '?') + jQuery.param(o.data) - : '') - ), - format: 'xml' - }; - - // Since it's a JSONP request - // complete === success - if (!o.success && o.complete) { - o.success = o.complete; - delete o.complete; - } - - o.success = (function(_success){ - return function(data) { - - if (_success) { - // Fake XHR callback. - _success.call(this, { - responseText: data.results[0] - // YQL screws with -
'; + echo ' + '; + require($this->pathToModule.'includes/blogs_last_post.php'); + echo '
'; echo ''; echo '
@@ -24,7 +27,7 @@ class blogs extends Module { echo '
  • '.$link['url'].'
  • '; echo '

    Insert Site feed

    -
    +
    diff --git a/modules/blogs/css/blogs.css b/modules/blogs/css/blogs.css new file mode 100644 index 0000000..e69de29 diff --git a/db/blog_links.xml b/modules/blogs/db/blog_links.xml similarity index 100% rename from db/blog_links.xml rename to modules/blogs/db/blog_links.xml diff --git a/CURL.php b/modules/blogs/includes/CURL.php similarity index 100% rename from CURL.php rename to modules/blogs/includes/CURL.php diff --git a/addSite.php b/modules/blogs/includes/addSite.php similarity index 100% rename from addSite.php rename to modules/blogs/includes/addSite.php diff --git a/blogs.php b/modules/blogs/includes/blogs.php similarity index 100% rename from blogs.php rename to modules/blogs/includes/blogs.php diff --git a/blogs_last_post.php b/modules/blogs/includes/blogs_last_post.php similarity index 93% rename from blogs_last_post.php rename to modules/blogs/includes/blogs_last_post.php index 952afc4..20fd63e 100644 --- a/blogs_last_post.php +++ b/modules/blogs/includes/blogs_last_post.php @@ -30,7 +30,7 @@ function getResult() } public function getLinks(){ - if($linksXML = simplexml_load_file('db/blog_links.xml')){ + if($linksXML = simplexml_load_file('../db/blog_links.xml')){ foreach($linksXML->link as $individualLink){ $this->link[] = array('name'=>$individualLink->name, 'url'=>$individualLink->url, 'number'=>$individualLink->number); } diff --git a/js/jquery.blogs.js b/modules/blogs/js/blogs.js similarity index 88% rename from js/jquery.blogs.js rename to modules/blogs/js/blogs.js index 01cd285..7a030db 100644 --- a/js/jquery.blogs.js +++ b/modules/blogs/js/blogs.js @@ -10,7 +10,7 @@ var tmp; make_draggable($('#blogs')); $.ajax( - {url : "blogs.php", + {url : "modules/blogs/includes/blogs.php", timeout : 36000, error: function(data){ $("#blogs").html(' Délai dépassé !'); diff --git a/modules/clock/Clock.php b/modules/clock/Clock.php new file mode 100644 index 0000000..0e948f4 --- /dev/null +++ b/modules/clock/Clock.php @@ -0,0 +1,48 @@ +moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; + $this->setParams($params); + echo ' + '; + echo '
    '; + } + + private function setParams($params){ + $this->params = $params; + } + + public static function start($params){ + $clock = new clock($params); + } + + public function setVisibility($visibility){ + // Saving the position and z-index of the note: + $xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE); + + $path = $xmla->xpath("//item[@id='clock']"); + $path[0]->visibility = $visibility; + + $xmla->asXML('../'.AccueilModules::CONFIG_FILE); + + echo "ok"; + } + + public static function updateConfig($updated){ + foreach ($updated as $what=>$withWhat){ + if(in_array($what, self::$paramsList)){ + call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat); + } + } + } +} \ No newline at end of file diff --git a/modules/clock/css/clock.css b/modules/clock/css/clock.css new file mode 100644 index 0000000..e69de29 diff --git a/js/jquery.jclock.js b/modules/clock/js/clock.js similarity index 100% rename from js/jquery.jclock.js rename to modules/clock/js/clock.js diff --git a/class/ClockAdvanced.php b/modules/clockAdvanced/ClockAdvanced.php similarity index 88% rename from class/ClockAdvanced.php rename to modules/clockAdvanced/ClockAdvanced.php index 3e6ce58..560b6e8 100644 --- a/class/ClockAdvanced.php +++ b/modules/clockAdvanced/ClockAdvanced.php @@ -13,8 +13,11 @@ class clockAdvanced extends Module { public $params = array(); public function __construct($params){ + $this->moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); - echo ''; + echo ' + '; echo '
    '; $options = ''; foreach (self::$paramsList as $paramName){ diff --git a/modules/clockAdvanced/css/clockAdvanced.css b/modules/clockAdvanced/css/clockAdvanced.css new file mode 100644 index 0000000..e69de29 diff --git a/js/jquery.jclockAdvanced.js b/modules/clockAdvanced/js/clockAdvanced.js similarity index 100% rename from js/jquery.jclockAdvanced.js rename to modules/clockAdvanced/js/clockAdvanced.js diff --git a/class/Gmap.php b/modules/gmap/Gmap.php similarity index 51% rename from class/Gmap.php rename to modules/gmap/Gmap.php index 2a033f3..53840d6 100644 --- a/class/Gmap.php +++ b/modules/gmap/Gmap.php @@ -9,27 +9,14 @@ class gmap extends Module { public $params = array(); public function __construct($params){ + $this->moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); - echo ' - + echo ' + + -
    '; - - include 'GoogleMapAPIv3.class.php'; - $gmap = new GoogleMapAPI(); - $gmap->setDivId('mymap'); //crée une div avec l'id donnée - //$gmap->setDirectionDivId('route'); - $gmap->setCenter('Paris France'); // Adresse du centre par défaut - $gmap->setEnableWindowZoom(true); // Permet de zoomer (trop important !) - $gmap->setEnableAutomaticCenterZoom(false); // FALSE ! ou sinon le setCenter ne sert à rien ! - //$gmap->setDisplayDirectionFields(false); - $gmap->setSize('400px','400px'); // La taille... duh ! - $gmap->setZoom(11); // Le zoom (+ il est haut, plus le zoom est proche) - $gmap->setLang('fr'); // La langue par défaut - $gmap->setDefaultHideMarker(false); // Cache les markers ? - $gmap->generate(); // Génère le JS - echo $gmap->getGoogleMap(); - echo '
    '; +
    '; } private function setParams($params){ diff --git a/css/gmap.css b/modules/gmap/css/gmap.css similarity index 100% rename from css/gmap.css rename to modules/gmap/css/gmap.css diff --git a/modules/gmap/js/gmap.js b/modules/gmap/js/gmap.js new file mode 100644 index 0000000..1461275 --- /dev/null +++ b/modules/gmap/js/gmap.js @@ -0,0 +1,89 @@ + +$(document).ready(function(){ +var geocoder = new google.maps.Geocoder(); +var map; +var gmarkers = []; +var infowindow; +var directions = new google.maps.DirectionsRenderer(); +var directionsService = new google.maps.DirectionsService(); +var current_lat = 0; +var current_lng = 0; +function getCurrentLat() { + return current_lat; +} +function getCurrentLng() { + return current_lng; +} +function addMarker(latlng,title,content,category,icon) { + var marker = new google.maps.Marker({ + map: map, + title : title, + icon: new google.maps.MarkerImage(icon, new google.maps.Size(57,34)), + position: latlng + }); + var html = '
    '+content+'
    ' + google.maps.event.addListener(marker, "click", function() { + if (infowindow) infowindow.close(); + infowindow = new google.maps.InfoWindow({content: html}); + infowindow.open(map,marker); + map.setCenter(new google.maps.LatLng(latlng.lat(),latlng.lng()),3); + }); + marker.mycategory = category; + gmarkers.push(marker); +} +function geocodeMarker(address,title,content,category,icon) { + if (geocoder) { + geocoder.geocode( { "address" : address}, function(results, status) { + if (status == google.maps.GeocoderStatus.OK) { + var latlng = results[0].geometry.location; + addMarker(results[0].geometry.location,title,content,category,icon) + } + }); + } +} +function geocodeCenter(address) { + if (geocoder) { + geocoder.geocode( { "address": address}, function(results, status) { + if (status == google.maps.GeocoderStatus.OK) { + map.setCenter(results[0].geometry.location); + } else { + alert("Geocode was not successful for the following reason: " + status); + } + }); + } +} +function initialize() { + var myLatlng = new google.maps.LatLng(48.8792,2.34778); + var myOptions = { + zoom: 11, + center: myLatlng, + mapTypeId: google.maps.MapTypeId.ROADMAP + } + map = new google.maps.Map(document.getElementById("mymap"), myOptions); + geocodeCenter("Paris France"); + google.maps.event.addListener(map,"click",function(event) { if (event) { current_lat=event.latLng.lat();current_lng=event.latLng.lng(); }}) ; + directions.setMap(map); + directions.setPanel(document.getElementById("route")) +} + initialize(); + $('#menu-bar').append($('#myAdress')); + $('#map').css({'visibility':'hidden'}); + $('#gmapLink').fancybox({ + 'transitionIn': 'elastic', + 'transitionOut': 'elastic', + 'onClosed': function(){$('#map').css({'visibility':'hidden'});}, + 'onStart': function(){$('#map').css({'visibility':'visible'});} + }); + $('#myAdressField').keydown(function(e){ + var code = (e.keyCode ? e.keyCode : e.which); + if(code == 13) { + e.preventDefault(); + var adress = $(this).val(); + geocodeMarker(adress,adress,adress,'','http://maps.gstatic.com/intl/fr_ALL/mapfiles/markers/marker_sprite.png'); + geocodeCenter(adress); + $('#gmapLink').trigger('click'); + + } + }); +}); + diff --git a/class/Links.php b/modules/links/Links.php similarity index 74% rename from class/Links.php rename to modules/links/Links.php index b57e95c..dc4decc 100644 --- a/class/Links.php +++ b/modules/links/Links.php @@ -1,6 +1,10 @@ moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); - echo ' - + echo ' +
    '; - if($links_xml = simplexml_load_file(self::LINKS_FILE)){ + if($links_xml = simplexml_load_file($this->pathToModule.self::LINKS_FILE)){ $links = $links_xml->label; foreach($links as $label){ //'.$label['id'].' @@ -27,7 +33,7 @@ class links {
    '; } }else{ - echo 'Can\'t find '.self::LINKS_FILE; + echo 'Can\'t find '.$this->pathToModule.self::LINKS_FILE; } echo '
    '; diff --git a/ajax/listToReserve.php b/modules/links/ajax/listToReserve.php similarity index 100% rename from ajax/listToReserve.php rename to modules/links/ajax/listToReserve.php diff --git a/ajax/loadReserve.php b/modules/links/ajax/loadReserve.php similarity index 78% rename from ajax/loadReserve.php rename to modules/links/ajax/loadReserve.php index 0985268..4832053 100644 --- a/ajax/loadReserve.php +++ b/modules/links/ajax/loadReserve.php @@ -1,6 +1,5 @@ reserve; foreach($links as $label){ echo '
      '; diff --git a/ajax/reserveToList.php b/modules/links/ajax/reserveToList.php similarity index 100% rename from ajax/reserveToList.php rename to modules/links/ajax/reserveToList.php diff --git a/ajax/update-links-order.php b/modules/links/ajax/update-links-order.php similarity index 100% rename from ajax/update-links-order.php rename to modules/links/ajax/update-links-order.php diff --git a/css/links.css b/modules/links/css/links.css similarity index 100% rename from css/links.css rename to modules/links/css/links.css diff --git a/db/links.xml b/modules/links/db/links.xml similarity index 100% rename from db/links.xml rename to modules/links/db/links.xml diff --git a/js/jquery.links.js b/modules/links/js/links.js similarity index 85% rename from js/jquery.links.js rename to modules/links/js/links.js index e2e6dbb..a3ed412 100644 --- a/js/jquery.links.js +++ b/modules/links/js/links.js @@ -15,7 +15,7 @@ $(document).ready(function(){ // Apparition de la reserve de liens $('#links-menu').live('click', function(){ - $.get('ajax/loadReserve.php', function(html){ + $.get('modules/links/ajax/loadReserve.php', function(html){ $.fancybox( html, { @@ -32,7 +32,7 @@ $(document).ready(function(){ // Passage Reserve => Liste $('#reserveiconlist .iconitem').live('click', function(e){ e.preventDefault(); - $.post("ajax/reserveToList.php", {reserve: $(this).attr('id')}); + $.post("modules/links/ajax/reserveToList.php", {reserve: $(this).attr('id')}); $('.iconlist').last().append('
    • '+$(this).html()+'
    • '); $.fancybox.close(); }); @@ -47,7 +47,7 @@ $(document).ready(function(){ }); $('.deleteLink').click(function(){ - $.post("ajax/listToReserve.php", {reserve: $(this).parent().attr('id')}); + $.post("modules/links/ajax/listToReserve.php", {reserve: $(this).parent().attr('id')}); $(this).parent().fadeOut(); }); @@ -59,7 +59,7 @@ $(document).ready(function(){ var linkOrder = $(this).sortable('toArray').toString(); var label = $(ui.item).parent()[0].id; var itemMoved = $(ui.item)[0].id; - $.post("ajax/update-links-order.php", {order: linkOrder, label : label, itemMoved: itemMoved}); + $.post("modules/links/ajax/update-links-order.php", {order: linkOrder, label : label, itemMoved: itemMoved}); }, start: function(e) { // have to remvoe click handler off item so drop doesn't click diff --git a/class/Mappy.php b/modules/mappy/Mappy.php similarity index 77% rename from class/Mappy.php rename to modules/mappy/Mappy.php index 130f4c3..62a0392 100644 --- a/class/Mappy.php +++ b/modules/mappy/Mappy.php @@ -8,10 +8,12 @@ class mappy extends Module { public $params = array(); public function __construct($params){ + $this->moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); + echo ' + '; echo ' - -
      '; } diff --git a/css/mappy.css b/modules/mappy/css/mappy.css similarity index 100% rename from css/mappy.css rename to modules/mappy/css/mappy.css diff --git a/js/mappy.js b/modules/mappy/js/mappy.js similarity index 100% rename from js/mappy.js rename to modules/mappy/js/mappy.js diff --git a/class/News.php b/modules/news/News.php similarity index 100% rename from class/News.php rename to modules/news/News.php diff --git a/class/Notes.php b/modules/notes/Notes.php similarity index 59% rename from class/Notes.php rename to modules/notes/Notes.php index 2fbc07a..f7a0dab 100644 --- a/class/Notes.php +++ b/modules/notes/Notes.php @@ -1,6 +1,10 @@ moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); - echo ' - - Add a note'; - include 'notes_extract.php'; + echo ' + + Add a note'; + include $this->pathToModule.'includes/notes_extract.php'; } private function setParams($params){ diff --git a/ajax/update_position.php b/modules/notes/ajax/update_position.php similarity index 100% rename from ajax/update_position.php rename to modules/notes/ajax/update_position.php diff --git a/css/note.css b/modules/notes/css/notes.css similarity index 90% rename from css/note.css rename to modules/notes/css/notes.css index 2124335..d0cdae4 100644 --- a/css/note.css +++ b/modules/notes/css/notes.css @@ -112,7 +112,7 @@ h3.popupTitle{ } #note-submit{ margin:20px auto; } -.delete {display:none; height:16px; width:16px; background:url(../images/interface/delete.png) top left no-repeat; position:absolute; top:5px; right:5px; z-index:9999;} +.delete {display:none; height:16px; width:16px; background:url(../../../images/interface/delete.png) top left no-repeat; position:absolute; top:5px; right:5px; z-index:9999;} .delete:hover{cursor:pointer !important;} diff --git a/db/notes.xml b/modules/notes/db/notes.xml similarity index 100% rename from db/notes.xml rename to modules/notes/db/notes.xml diff --git a/add_note.html b/modules/notes/includes/add_note.html similarity index 100% rename from add_note.html rename to modules/notes/includes/add_note.html diff --git a/notes_extract.php b/modules/notes/includes/notes_extract.php similarity index 87% rename from notes_extract.php rename to modules/notes/includes/notes_extract.php index 00c7660..81c78ed 100644 --- a/notes_extract.php +++ b/modules/notes/includes/notes_extract.php @@ -1,5 +1,5 @@ 
      note[$i]->text;?>
      note[$i]['id'];?>
      diff --git a/js/jquery.notes.js b/modules/notes/js/notes.js similarity index 91% rename from js/jquery.notes.js rename to modules/notes/js/notes.js index a0fcba5..fb32e78 100644 --- a/js/jquery.notes.js +++ b/modules/notes/js/notes.js @@ -14,7 +14,7 @@ $(document).ready(function(){ var data2 = {'id' : $(this).attr("id")}; $(this).replaceWith(''); /* Sending an AJAX POST request: */ - $.post('ajax/delete-notes.php',data2,function(msg2){ + $.post('modules/notes/ajax/delete-notes.php',data2,function(msg2){ if(parseInt(msg2)) { msg2--; @@ -88,7 +88,7 @@ $(document).ready(function(){ }; /* Sending an AJAX POST request: */ - $.post('ajax/post-notes.php',data,function(msg){ + $.post('modules/notes/ajax/post-notes.php',data,function(msg){ if(parseInt(msg)) { @@ -119,7 +119,7 @@ function make_draggable(elements) stop:function(e,ui){ /* Sending the z-index and positon of the note to update_position.php via AJAX GET: */ - $.get('ajax/update_position.php',{ + $.get('modules/notes/ajax/update_position.php',{ x : ui.position.left, y : ui.position.top, z : zIndex, diff --git a/class/Ouifm.php b/modules/ouifm/Ouifm.php similarity index 73% rename from class/Ouifm.php rename to modules/ouifm/Ouifm.php index 42dfd9a..202ba22 100644 --- a/class/Ouifm.php +++ b/modules/ouifm/Ouifm.php @@ -10,8 +10,11 @@ class ouifm extends Module { public $params = array(); public function __construct($params){ + $this->moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); - echo ''; + echo ' + '; echo '
      '; } diff --git a/modules/ouifm/css/ouifm.css b/modules/ouifm/css/ouifm.css new file mode 100644 index 0000000..e69de29 diff --git a/js/jquery.ouifm.js b/modules/ouifm/js/ouifm.js similarity index 100% rename from js/jquery.ouifm.js rename to modules/ouifm/js/ouifm.js diff --git a/class/Rssblogs.php b/modules/rssblogs/Rssblogs.php similarity index 82% rename from class/Rssblogs.php rename to modules/rssblogs/Rssblogs.php index 22c7b37..a43239f 100644 --- a/class/Rssblogs.php +++ b/modules/rssblogs/Rssblogs.php @@ -10,8 +10,11 @@ class rssblogs extends Module { public $params = array(); public function __construct($params){ + $this->moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); - echo '
      '; + echo ' + '; require('class/lastRSS.php'); $rss = new lastRSS; // options lastRSS @@ -19,7 +22,7 @@ class rssblogs extends Module { $rss->cache_time = 3600; // fréquence de mise à jour du cache (en secondes) $rss->date_format = 'd/m/y'; // format de la date (voir fonction date() pour syntaxe) $rss->CDATA = 'content'; // on retire les tags CDATA en conservant leur contenu - if($linksXML = simplexml_load_file('db/rss.xml')){ + if($linksXML = simplexml_load_file($this->pathToModule.'db/rss.xml')){ foreach($linksXML->link as $individualLink){ if ($rs = $rss->get($individualLink->url)) echo ''.$rs['items'][0]['pubDate'].' '.$rs['items'][0]['title'].'
      '; diff --git a/css/rssblogs.css b/modules/rssblogs/css/rssblogs.css similarity index 100% rename from css/rssblogs.css rename to modules/rssblogs/css/rssblogs.css diff --git a/db/rss.xml b/modules/rssblogs/db/rss.xml similarity index 100% rename from db/rss.xml rename to modules/rssblogs/db/rss.xml diff --git a/modules/rssblogs/js/rssblogs.js b/modules/rssblogs/js/rssblogs.js new file mode 100644 index 0000000..e69de29 diff --git a/modules/search/Search.php b/modules/search/Search.php new file mode 100644 index 0000000..e1c7b24 --- /dev/null +++ b/modules/search/Search.php @@ -0,0 +1,62 @@ +moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; + $this->setParams($params); + echo ' + +
      +
      + + + +
        +
      • Web
      • +
      • Images
      • +
      • News
      • +
      • Videos
      • +
      + +
      +
      '; + } + + private function setParams($params){ + $this->params = $params; + } + + public static function start($params){ + $search = new search($params); + } + + public function setVisibility($visibility){ + // Saving the position and z-index of the note: + $xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE); + + $path = $xmla->xpath("//item[@id='search']"); + $path[0]->visibility = $visibility; + + $xmla->asXML('../'.AccueilModules::CONFIG_FILE); + + echo "ok"; + } + + public static function updateConfig($updated){ + foreach ($updated as $what=>$withWhat){ + if(in_array($what, self::$paramsList)){ + call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat); + } + } + } +} \ No newline at end of file diff --git a/css/search.css b/modules/search/css/search.css similarity index 87% rename from css/search.css rename to modules/search/css/search.css index 77ceee5..973bca9 100644 --- a/css/search.css +++ b/modules/search/css/search.css @@ -21,7 +21,7 @@ fieldset{ border:none; color:#888888; /*background:url("../images/interface/searchBox.png") no-repeat;*/ - background:url('../images/interface/zoom.png') 10px center no-repeat; + background:url('../../../images/interface/zoom.png') 10px center no-repeat; border:1px solid #888888; float:left; font-family:Arial,Helvetica,sans-serif; @@ -58,7 +58,7 @@ fieldset{ } .icons li{ - background:url("../images/interface/icons.png") no-repeat; + background:url("../../../images/interface/icons.png") no-repeat; float:left; height:19px; text-indent:-999px; @@ -91,7 +91,7 @@ span.arrow{ height:6px; margin:21px 0 0 5px; position:absolute; - background:url('../images/interface/arrow.png') no-repeat; + background:url('../../../images/interface/arrow.png') no-repeat; left:0; } @@ -154,7 +154,7 @@ span.arrow{ #more{ width:83px; height:24px; - background:url('../images/interface/more.png') no-repeat; + background:url('../../../images/interface/more.png') no-repeat; cursor:pointer; margin:40px auto; } diff --git a/js/jquery.search.js b/modules/search/js/search.js similarity index 100% rename from js/jquery.search.js rename to modules/search/js/search.js diff --git a/class/Todo.php b/modules/todo/Todo.php similarity index 73% rename from class/Todo.php rename to modules/todo/Todo.php index 9b4eb82..6ff2c2e 100644 --- a/class/Todo.php +++ b/modules/todo/Todo.php @@ -1,6 +1,7 @@ moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); - echo ''; - if($xmla = simplexml_load_file($this->persistance)){ + echo ' + '; + if($xmla = simplexml_load_file($this->pathToModule.self::TODO_FILE)){ $this->setToken($xmla->token); $this->setProjectName($xmla->name); $this->setProjectId($xmla->id); echo '
      '; if($this->token == null || $this->project_id == null) - echo 'Impossible de trouver votre configuration. Cliquez ici pour la mettre en place.
      '; + echo 'Impossible de trouver votre configuration. Cliquez ici pour la mettre en place.
      '; else{ $token = $xmla->token; $id = $xmla->id; - echo '
    '; + echo '
    '; } echo ''; }else{ echo 'baaaaad persistance...'; diff --git a/ajax/saveTodoist.php b/modules/todo/ajax/saveTodoist.php similarity index 100% rename from ajax/saveTodoist.php rename to modules/todo/ajax/saveTodoist.php diff --git a/css/todo.css b/modules/todo/css/todo.css similarity index 85% rename from css/todo.css rename to modules/todo/css/todo.css index 10df132..f3e6655 100644 --- a/css/todo.css +++ b/modules/todo/css/todo.css @@ -6,12 +6,12 @@ #todo ul{list-style:none;} #todo ul li{white-space : nowrap; padding-left:16px;} -#todo ul li div.puce{width: 16px; height: 16px; background:url(../images/interface/ui-icons_888888_256x240.png) -32px -48px no-repeat; display:inline-block;} +#todo ul li div.puce{width: 16px; height: 16px; background:url(../../../images/interface/ui-icons_888888_256x240.png) -32px -48px no-repeat; display:inline-block;} .ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; background-position: -80px -224px;background-image: url(../images/interface/ui-icons_888888_256x240.png);} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; background-position: -80px -224px;background-image: url(../../../images/interface/ui-icons_888888_256x240.png);} .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } diff --git a/db/todoist.xml b/modules/todo/db/todoist.xml similarity index 100% rename from db/todoist.xml rename to modules/todo/db/todoist.xml diff --git a/getProjectsList.php b/modules/todo/includes/getProjectsList.php similarity index 75% rename from getProjectsList.php rename to modules/todo/includes/getProjectsList.php index f89a6a4..ba97bba 100644 --- a/getProjectsList.php +++ b/modules/todo/includes/getProjectsList.php @@ -1,5 +1,5 @@ token== '' || $xmla->token == null) header('Location: install-todoist.php'); if($xmla->name == '' || $xmla->name == null):?> @@ -7,7 +7,7 @@ if($xmla->name == '' || $xmla->name == null):?> Todoist : getProjects - + diff --git a/modules/todo/includes/getUncompletedTasks.php b/modules/todo/includes/getUncompletedTasks.php new file mode 100644 index 0000000..14a2d3f --- /dev/null +++ b/modules/todo/includes/getUncompletedTasks.php @@ -0,0 +1,12 @@ +token== '' || $xmla->token == null) + header('Location: ./'); +if($xmla->id != '' || $xmla->id != null): +$token = $xmla->token; +$id = $xmla->id;?> + + + token == '' || $xmla->token == null):?> Todoist : Login - + diff --git a/js/getProjectsList.php b/modules/todo/js/getProjectsList.php similarity index 74% rename from js/getProjectsList.php rename to modules/todo/js/getProjectsList.php index 13a27f3..24f4e53 100644 --- a/js/getProjectsList.php +++ b/modules/todo/js/getProjectsList.php @@ -2,5 +2,5 @@ $token = $_GET['token']; ?> function cbfunc(o){ $('body').append('

    Select your project

    '); $('#results').append('
        '); for(var i in o) { $('#uncompletedList').append('
      • '+o[i].name+'
      • '); } } -$(document).ready(function(){ var token = ""; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://todoist.com/API/getProjects?token='+token+'&format=json&callback=cbfunc'; document.getElementsByTagName('head')[0].appendChild(script); $('.selectableProject').live('click', function(){ var name = $(this).text(); var id = $(this).attr('id'); $.post('ajax/saveTodoist.php', {name: name, id: id}, function(msg){ $('body').append('Etape suivante'); if(msg=="ok"){ location.reload(); }else{ alert(msg); } }); }); +$(document).ready(function(){ var token = ""; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://todoist.com/API/getProjects?token='+token+'&format=json&callback=cbfunc'; document.getElementsByTagName('head')[0].appendChild(script); $('.selectableProject').live('click', function(){ var name = $(this).text(); var id = $(this).attr('id'); $.post('../ajax/saveTodoist.php', {name: name, id: id}, function(msg){ $('body').append('Etape suivante'); if(msg=="ok"){ location.reload(); }else{ alert(msg); } }); }); }); \ No newline at end of file diff --git a/js/getUncompletedTasks.php b/modules/todo/js/getUncompletedTasks.php similarity index 100% rename from js/getUncompletedTasks.php rename to modules/todo/js/getUncompletedTasks.php diff --git a/js/index.js b/modules/todo/js/index.js similarity index 77% rename from js/index.js rename to modules/todo/js/index.js index 2b3746c..90b2de2 100644 --- a/js/index.js +++ b/modules/todo/js/index.js @@ -3,7 +3,7 @@ function cbfunc(o){ if(token == undefined){ $('#error').html('Identification erronnée'); }else{ - $.post('ajax/saveTodoist.php', {token: token}, function(data){ $('body').append('Etape suivante'); if(data=="ok"){ + $.post('../ajax/saveTodoist.php', {token: token}, function(data){ $('body').append('Etape suivante'); if(data=="ok"){ location.reload(); }else{ alert(data); } }); } diff --git a/modules/todo/js/todo.js b/modules/todo/js/todo.js new file mode 100644 index 0000000..e69de29 diff --git a/class/Weather.php b/modules/weather/Weather.php similarity index 80% rename from class/Weather.php rename to modules/weather/Weather.php index 54fceac..4eb3f3e 100644 --- a/class/Weather.php +++ b/modules/weather/Weather.php @@ -1,7 +1,11 @@ moduleName = get_class(); + $this->pathToModule = 'modules/'.$this->moduleName.'/'; $this->setParams($params); $ville = $params['city']; - include 'GoogleMeteo.php'; - echo ' - '; + include $this->pathToModule.'includes/GoogleMeteo.php'; + echo ' + '; echo '
        '.$city.'
        diff --git a/css/neige.css b/modules/weather/css/neige.css similarity index 100% rename from css/neige.css rename to modules/weather/css/neige.css diff --git a/css/nuage.css b/modules/weather/css/nuage.css similarity index 100% rename from css/nuage.css rename to modules/weather/css/nuage.css diff --git a/css/peunuage.css b/modules/weather/css/peunuage.css similarity index 100% rename from css/peunuage.css rename to modules/weather/css/peunuage.css diff --git a/css/pluie.css b/modules/weather/css/pluie.css similarity index 100% rename from css/pluie.css rename to modules/weather/css/pluie.css diff --git a/css/soleil.css b/modules/weather/css/soleil.css similarity index 100% rename from css/soleil.css rename to modules/weather/css/soleil.css diff --git a/css/weather.css b/modules/weather/css/weather.css similarity index 100% rename from css/weather.css rename to modules/weather/css/weather.css diff --git a/GoogleMeteo.php b/modules/weather/includes/GoogleMeteo.php similarity index 72% rename from GoogleMeteo.php rename to modules/weather/includes/GoogleMeteo.php index 7d462cf..1187d89 100644 --- a/GoogleMeteo.php +++ b/modules/weather/includes/GoogleMeteo.php @@ -18,19 +18,19 @@ } if(strpos(strtolower($present_weather),"soleil") !== false) {?> - + - + - + - + - +