From: Kilian Saffran Date: Fri, 20 Nov 2020 07:03:44 +0000 (+0100) Subject: v20201120 X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=c07e2197d517281f9692ac5bee9c02fb72fb50ed;p=oldbell_lu.git v20201120 --- diff --git a/website/css/site.css b/website/css/site.css new file mode 100644 index 0000000..5dfa760 --- /dev/null +++ b/website/css/site.css @@ -0,0 +1,9 @@ +.galleryimg { + width: 100%; +} + +.galleryitem { + padding-left: 2px; + padding-right: 2px; +} + diff --git a/website/css/style.css b/website/css/style.css deleted file mode 100644 index 0a029b4..0000000 --- a/website/css/style.css +++ /dev/null @@ -1,23 +0,0 @@ -/* body { - font-family: sans-serif; -} */ - -/* Make content area fill the entire browser window */ -/* html, -.fullscreen { - display: flex; - height: 100%; - margin: 0; - padding: 0; - width: 100%; -} */ - -/* Center the content in the browser window -.container { - margin: auto; - text-align: center; -} - -.title { - font-size: 3rem; -} */ diff --git a/website/db.php b/website/db.php index 8d2fd58..c95c59c 100644 --- a/website/db.php +++ b/website/db.php @@ -2,7 +2,9 @@ require("lib/config.php"); require("lib/database.php"); require("lib/modules/RendezVous.php"); - + require("lib/modules/Gallery.php"); + require("lib/modules/Shop.php"); + require("lib/modules/WebPage.php"); $db = new database($cfg["db"]); $vars = array(); $html = array(); @@ -21,10 +23,19 @@ $html["data"] = $rdv->getRDVDayFreeTimes($db->securetext($params->{daydate})); } } elseif (strpos($params["get"], 'gallery_') === 0){ - + $gal = new Gallery($db); + if ($params["get"] == 'gallery_gallery'){ + $html["data"] = $gal->getGallery($params->{name}); + } elseif ($params["get"] == 'gallery_galleries'){ + $html["data"] = $gal->getGalleries($params->{names}); + } elseif ($params["get"] == 'gallery_galleryitems'){ + $html["data"] = $gal->getGalleryItems($params->{name}); + } } elseif (strpos($params["get"], 'shop_') === 0){ - - } + $shop = new Shop($db); + } elseif (strpos($params["get"], 'page_') === 0){ + $shop = new WebPage($db); + } } elseif (isset($params["fn"])){ if (strpos($params["fn"], 'rdv_') === 0) { @@ -33,6 +44,11 @@ }elseif ($params["fn"] == 'rdv_cancel'){ + } + } else (strpos($params["fn"], 'shop_') === 0) { + $shop = new Shop($db); + if ($params["fn"] == 'shop_order'){ + } } diff --git a/website/js/gallery.js b/website/js/gallery.js index fb3bd67..8757d1b 100644 --- a/website/js/gallery.js +++ b/website/js/gallery.js @@ -1,7 +1,22 @@ function initpage(){ - + gallery.init(myapp.getSearchParams()); } let gallery = { + init: function(p){ + if (p["name"]){ + gallery.getgallery(p["name"]); + gallery.getgalleryitems(p["name"]); + } + }, + getgallery: function(name){ + postData({"get":"gallery_data","link":name}).then(gd => { + }); + }, + getgalleryitems: function(name){ + postData({"get":"gallery_items","link":name}).then(items => { + + }); + } } \ No newline at end of file diff --git a/website/js/myapp.js b/website/js/myapp.js index 4eb5749..08c96e8 100644 --- a/website/js/myapp.js +++ b/website/js/myapp.js @@ -76,6 +76,11 @@ let myapp={ document.getElementById('dlgmessage_text').innerHTML=message; document.getElementById('dlgmessage').style.display='block'; return false; + }, + getSearchParams:function(k){ + var p={}; + location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){p[k]=v}); + return k?p[k]:p; } } diff --git a/website/lib/modules/Gallery.php b/website/lib/modules/Gallery.php index f602ed7..9e50806 100644 --- a/website/lib/modules/Gallery.php +++ b/website/lib/modules/Gallery.php @@ -5,12 +5,22 @@ $this->dbh = $dblink; } - public function getGallery($gid){ - + public function getGalleries($glinks){ + $gsearch = null; + $cdate = $startdate = date("Y-m-d"); + $sql = "select gallery, description, link, picture from galleries where (publishdate is null or date('".$cdate."') between publishdate and unpublishdate )"; + if (($glinks !== null) && count($glinks) > 0){ + $sql .= " and link in (".join("'".$glinks."'",',').")"; + } + return $this->dbh->queryarray($sql); } - public function getGalleryItems($idg){ + public function getGallery($gallerylink){ + return $this->dbh->query("select gallery, description, link, picture from galleries where link='".$gallerylink."'"); + } + public function getGalleryItems($gallerylink){ + return $this->dbh->querryarray("select gg.link as gallerylink,gi.filename, gi.filetype, gi.link, gi.linktype, gi.description from galleryitems gi join galleries gg on (gi.id_galleries=gg.id) where gg.link='".$gallerylink."'"); } public function __destruct(){ diff --git a/website/lib/modules/WebArticles.php b/website/lib/modules/WebArticles.php new file mode 100644 index 0000000..e80e3ce --- /dev/null +++ b/website/lib/modules/WebArticles.php @@ -0,0 +1,28 @@ +dbh = $dblink; + } + + public function getSection($idsection){ + + } + + public function getSections($idsections){ + + } + + public function getSectionArticles($idsection){ + + } + + public function getArticle($idsection,$idarticle){ + + } + + public function __destruct(){ + $this->dbh = null; + } + } +?> \ No newline at end of file diff --git a/website/tmpl/blocks/salon.html.mustache b/website/tmpl/blocks/salon.html.mustache new file mode 100644 index 0000000..da38431 --- /dev/null +++ b/website/tmpl/blocks/salon.html.mustache @@ -0,0 +1,20 @@ +
+

Adresse

+

+34, rue du Fossé
+L-4123 Esch-sur-Alzette

+Phone: +352 2653 2264
+E-mail: info@oldbell.lu

+
+
+

Heure d'ouverture

+

Mardi 8h00 - 18h00
+Mercredi 8h00 - 18h00
+Jeudi 8h00 - 18h00
+Vendredi 8h00 - 20h30
+Samedi 8h00 - 15h00
+Fermé le dimanche

+
+
+
+
\ No newline at end of file diff --git a/website/tmpl/index.html.mustache b/website/tmpl/index.html.mustache index 1621808..2bfc726 100644 --- a/website/tmpl/index.html.mustache +++ b/website/tmpl/index.html.mustache @@ -31,8 +31,11 @@ + + +
@@ -41,6 +44,7 @@ + diff --git a/website/tmpl/pages/events.html.json b/website/tmpl/pages/events.html.json index 3e1694b..138400a 100644 --- a/website/tmpl/pages/events.html.json +++ b/website/tmpl/pages/events.html.json @@ -1,4 +1,4 @@ { "dayscol1":{"sqltype":"queryarray","sql":"SELECT id, to_char(daydate,'DD.MM.YYYY') as daydate, calendar, calgroup, calpublisstart, calpublishend, to_char(calstartime,'HH24:MI') as calstarttime, to_char(calendtime,'HH24:MI') as calendtime, caltitle, caldescription, callocation, callocationaddress FROM calendar WHERE calendar=(select prefvalue from config where pref='season') and calgroup='aller' order by daydate asc;"}, - "dayscol2":{"sqltype":"queryarray","sql":"SELECT id, to_char(daydate,'DD.MM.YYYY') as daydate, calendar, calgroup, calpublisstart, calpublishend, to_char(calstartime,'HH24:MI') as calstarttime, to_char(calendtime,'HH24:MI') as calendtime, caltitle, caldescription, callocation, callocationaddress FROM calendar WHERE calendar=(select prefvalue from config where pref='season') and calgroup='retoour' order by daydate asc;"} + "dayscol2":{"sqltype":"queryarray","sql":"SELECT id, to_char(daydate,'DD.MM.YYYY') as daydate, calendar, calgroup, calpublisstart, calpublishend, to_char(calstartime,'HH24:MI') as calstarttime, to_char(calendtime,'HH24:MI') as calendtime, caltitle, caldescription, callocation, callocationaddress FROM calendar WHERE calendar=(select prefvalue from config where pref='season') and calgroup='retour' order by daydate asc;"} } diff --git a/website/tmpl/pages/gallery.html.mustache b/website/tmpl/pages/gallery.html.mustache index 1ee9acb..2aa3933 100644 --- a/website/tmpl/pages/gallery.html.mustache +++ b/website/tmpl/pages/gallery.html.mustache @@ -1,73 +1,96 @@
-
-
retour
+
+
retour
- Gname{{ galleriename }}
+ {{ gallery_name }}
Gallerie
-
+
- -
-
- - +
+ - - - - - - - - - - - - - +
+ + + \ No newline at end of file diff --git a/website/tmpl/pages/index.html.mustache b/website/tmpl/pages/index.html.mustache index 73fd40d..38b8f50 100644 --- a/website/tmpl/pages/index.html.mustache +++ b/website/tmpl/pages/index.html.mustache @@ -77,9 +77,9 @@ diff --git a/website/tmpl/pages/salon.html.mustache b/website/tmpl/pages/salon.html.mustache new file mode 100644 index 0000000..19b7280 --- /dev/null +++ b/website/tmpl/pages/salon.html.mustache @@ -0,0 +1,11 @@ +
+
+
retour
+
+ Salon
+
+
+
+
+{{> salon.html.mustache }} +
\ No newline at end of file diff --git a/website/tmpl/pages/shop.html.mustache b/website/tmpl/pages/shop.html.mustache index 798c3ab..131e51b 100644 --- a/website/tmpl/pages/shop.html.mustache +++ b/website/tmpl/pages/shop.html.mustache @@ -1,6 +1,16 @@ -
-
SHOP
-
+
+
+
retour
+
+ Shop
+
+
+
+
+ +
-
\ No newline at end of file +
+
+ \ No newline at end of file