website/media/*
admin/media/*
admin/lib/vendor/*
+admin/tools/*
\r
RewriteEngine on\r
DirectoryIndex index.php index.html \r
-php_flag display_startup_errors on\r
-php_flag display_errors on\r
-php_flag html_errors on\r
+php_flag display_startup_errors off\r
+php_flag display_errors off\r
+php_flag html_errors off\r
RewriteCond %{REQUEST_FILENAME} !-f\r
RewriteCond %{REQUEST_FILENAME} !-d\r
RewriteRule "^(.*)$" "index.php" [NC,L,QSA]
\ No newline at end of file
-/* W3PRO.CSS 4.13 June 2019 by Jan Egil and Borge Refsnes */
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}
/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
.hover-text-theme:hover {color:#6a92d3 !important}
.hover-border-theme:hover {border-color:#6a92d3 !important}
-/* .label { color: #000; font-size: 8pt;} */
-/* #main {margin-left: 210px;} */
-/* @media (max-width:768px){
- #sidebar { display: none;}
- #main { margin-left: 0px;}
-} */
.info-panel {
padding: 3px;
background-color: #d3d3d3!important;
}
-
-
-.right-side-bg {
- background: url("../img/bg1.jpg");
- background-size: cover;
- min-height: 100vh;
-}
-
-
-
-
/* .mceContentBody {
background: #fff;
color:#000;
background-color: #343434;
}
-
-
-
header
{
background-color: #fff;
}
-div.group_container
-{
- background-color: #e3e3e3;
- border-top-color: rgba(80%,80%,80%,1);
- border-right-color: rgba(80%,80%,80%,1);
- border-bottom-color: rgba(80%,80%,80%,1);
- border-left-color: rgba(80%,80%,80%,1);
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-width: 1pt;
- border-right-width: 1pt;
- border-bottom-width: 1pt;
- border-left-width: 1pt;
- padding-top: 4px;
- padding-bottom: 8px;
-}
-
-/* Custom Styles */
-.ListView_Default
-{
-
- background-color: rgba(0%,0%,0%,0);
- border-top-style: none;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
-
- color: #000;
- text-align: left;
- margin-top: 2pt;
- margin-right: 2pt;
- margin-bottom: 2pt;
- margin-left: 2pt;
-}
-
-
-button.btnNavigation
-{
-
- background-color: rgba(0%,0%,0%,0);
-
- font-family: -fm-font-family(Arial,Arial-BoldMT);
- font-weight: bold;
- font-size: 10pt;
- color: #fff;
- padding-top: 0pt;
- padding-right: 0pt;
- padding-bottom: 0pt;
- padding-left: 0pt;
-}
-
-div.PageListHeader
-{
- border-top-color: rgba(80%,80%,80%,1);
- border-right-color: rgba(80%,80%,80%,1);
- border-bottom-color: rgba(80%,80%,80%,1);
- border-left-color: rgba(80%,80%,80%,1);
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-width: 1pt;
- border-right-width: 1pt;
- border-bottom-width: 1pt;
- border-left-width: 1pt;
- color: #fff;
- -fm-text-vertical-align: center;
-}
-div.PageListHeader .inner_border
-{
- padding-top: 5pt;
- padding-right: 5pt;
- padding-bottom: 5pt;
- padding-left: 5pt;
-}
-
.moduletoolbar
{
background-color: #293146;
color: #fff;
}
-div.BodySectionHeader
-{
- font-family: -fm-font-family(Arial,Arial-BoldMT);
- font-weight: bold;
-}
div.PageHeadTitle
color: #fff;
}
-div.SectionHeader
-{
-
- background-color: rgba(22.3529%,26.6667%,38.4314%,1);
-
-}
-
button.toolbarbtn
{
border: 0.5px solid #c6c6c6;
border-left-color: rgba(80%,80%,80%,1);
}
-
-div.ListView_Header
-{
- border-top-color: rgba(80%,80%,80%,1);
- border-right-color: rgba(80%,80%,80%,1);
- border-bottom-color: rgba(80%,80%,80%,1);
- border-left-color: rgba(80%,80%,80%,1);
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-width: 1pt;
- border-right-width: 1pt;
- border-bottom-width: 1pt;
- border-left-width: 1pt;
- font-weight: normal;
- color: #fff;
- -fm-text-vertical-align: center;
-}
-div.ListView_Header .inner_border
-{
- padding-top: 2pt;
- padding-right: 2pt;
- padding-bottom: 2pt;
- padding-left: 2pt;
-}
-
div.toolbar
{
border: 1px solid white;
}
-
-
-
-
select {
/* -webkit-appearance: none; */
display: block;
font-weight: normal;
font-size: 11pt;
background-color: #fff;
- /* background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),
- linear-gradient(to bottom, #fff 0%,#fff 100%);
- background-repeat: no-repeat, repeat;
- background-position: right .7em top 50%, 0 0;
- background-size: .65em auto, 100%; */
}
div.DataFooter{
background: #384462;
}
-.input-sum{padding:2px;display:block;border: 1px solid #ccc;width:100%;background-color: #4D4D4D; }
-
-
-.currency-sum {padding:2px;display:block;border: 1px solid #ccc;width:100%;background-color: #4D4D4D;}
-
-.currency-sum,.currency-sum:read-only {
- display: block;
- color: #fff;
- padding: 2px;
- padding-right: 12px;
- width: 100%;
- max-width: 100%;
- box-sizing: border-box;
- margin: 0;
- border: 1px solid #ccc;
- border-radius: unset;
- -moz-appearance: none;
- -webkit-appearance: none;
- appearance: none;
- background-color: #4D4D4D;
- background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20fill=%22white%22%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%3C/svg%3E');
- background-repeat: no-repeat, repeat;
- background-position: right 2px top 50%, 0 0;
- background-size: 9px auto, 100%;
-}
-
-
-
/* input[type=date]::-webkit-inner-spin-button,
input[type=date]::-webkit-outer-spin-button {
border: 1px solid green;
} */
-input[class=currency] {
- padding: 2px;
+input[class*="currency"] {
+ padding: 6px;
padding-right: 12px;
text-align: right;
background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%0A%3C/svg%3E'),
background-size: 9px auto, 100%;
}
-input[class=currency]:read-only {
+input[class*="currency"]:read-only {
background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%0A%3C/svg%3E'),
linear-gradient(to bottom, #d3d3d3 0%,#d3d3d3 100%);
}
-input[class=percent] {
- padding: 2px;
+input[class*="percent"] {
+ padding: 6px;
padding-right: 12px;
text-align: right;
background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22232%22%20version=%221.0%22%3E%3Cg%20transform=%22translate(-112.3674,-128.3649)%22%3E%3Cpath%20style=%22fill:black;fill-opacity:1;stroke:none%22%20d=%22M%20317.1674,257.53698%20C%20308.53463,257.53708%20301.73774,261.20839%20296.77671,268.55094%20C%20291.91449,275.89365%20289.48349,286.1138%20289.48368,299.2114%20C%20289.48349,312.11067%20291.91449,322.2812%20296.77671,329.72303%20C%20301.73774,337.06568%20308.53463,340.737%20317.1674,340.73698%20C%20325.60128,340.737%20332.24934,337.06568%20337.11159,329.72303%20C%20342.07258,322.2812%20344.5532,312.11067%20344.55345,299.2114%20C%20344.5532,286.21302%20342.07258,276.04249%20337.11159,268.69977%20C%20332.24934,261.25801%20325.60128,257.53708%20317.1674,257.53698%20M%20317.1674,238.63466%20C%20332.84469,238.63477%20345.29739,244.09213%20354.52554,255.00675%20C%20363.75318,265.92157%20368.36713,280.65644%20368.3674,299.2114%20C%20368.36713,317.76648%20363.70357,332.50135%20354.37671,343.41605%20C%20345.14855,354.23156%20332.74546,359.6393%20317.1674,359.63931%20C%20301.29123,359.6393%20288.7393,354.23156%20279.51159,343.41605%20C%20270.28351,332.50135%20265.66956,317.76648%20265.66973,299.2114%20C%20265.66956,280.55721%20270.28351,265.82234%20279.51159,255.00675%20C%20288.83853,244.09213%20301.39045,238.63477%20317.1674,238.63466%20M%20163.5674,147.9928%20C%20155.03401,147.993%20148.28673,151.71393%20143.32554,159.15559%20C%20138.46349,166.49841%20136.03248,176.61933%20136.03252,189.51838%20C%20136.03248,202.61621%20138.46349,212.83635%20143.32554,220.17884%20C%20148.18751,227.52161%20154.93479,231.19292%20163.5674,231.1928%20C%20172.19989,231.19292%20178.94717,227.52161%20183.80926,220.17884%20C%20188.77041,212.83635%20191.25103,202.61621%20191.25113,189.51838%20C%20191.25103,176.71856%20188.77041,166.59764%20183.80926,159.15559%20C%20178.84794,151.71393%20172.10066,147.993%20163.5674,147.9928%20M%20297.9674,129.09047%20L%20321.78136,129.09047%20L%20182.7674,359.63931%20L%20158.95345,359.63931%20L%20297.9674,129.09047%20M%20163.5674,129.09047%20C%20179.24484,129.0907%20191.74715,134.54806%20201.07438,145.46256%20C%20210.4014,156.27827%20215.06496,170.96352%20215.06508,189.51838%20C%20215.06496,208.27201%20210.4014,223.05649%20201.07438,233.87187%20C%20191.84638,244.68748%20179.34406,250.09523%20163.5674,250.09512%20C%20147.79061,250.09523%20135.28829,244.68748%20126.06043,233.87187%20C%20116.93172,222.95727%20112.36739,208.17279%20112.3674,189.51838%20C%20112.36739,171.06275%20116.98134,156.37749%20126.20926,145.46256%20C%20135.43713,134.54806%20147.88983,129.0907%20163.5674,129.09047%22%20/%3E%3C/g%3E%3C/svg%3E'),
<?php
- require("lib/config.php");
- require("lib/database.php");
- require("lib/session.php");
- require("lib/modules/templates.php");
- require("lib/modules/gallery.php");
+ $mainclasses = scandir("lib");
+ foreach ($mainclasses as $key => $value)
+ {
+ if ((is_file("lib/".$value) && strpos($value,'.') !== 0) && substr_compare($value, ".php", -strlen(".php")) === 0){
+ require("lib/".$value);
+ }
+ }
+ $moduleclasses = scandir("lib/modules");
+ foreach ($moduleclasses as $key => $value)
+ {
+ if ((is_file("lib/modules/".$value) && strpos($value,'.') !== 0) && substr_compare($value, ".php", -strlen(".php")) === 0){
+ require("lib/modules/".$value);
+ }
+ }
+
$db = new database($cfg["db"]);
$sess = new session($db);
$vars = array();
}
if (isset($vars["sid"]) && ($vars["sid"] != "")){
$vars["session"] = $sess->getSession($vars["sid"]);
- // if (!isset($vars["session"]["id_session"])){
- // $vars["sid"] = "";
- // }
}
$params = array();
$html["session"] = $vars["session"];
$params = json_decode(file_get_contents('php://input'), true);
+ //$params =$_GET;
$html["params"] = $params;
if(count($vars["session"]) == 0) {
header('Content-Type: application/json');
echo json_encode($html);
exit(1);
}
- if (isset($params["get"])){
- if (strpos($params["get"], 'gallery_') === 0) {
- $gl = new Gallery($db);
- if ($params["get"] == "gallery_galleries"){
- $html["data"] = $gl->getGalleries();
- }
- elseif ($params["get"] == "gallery_data"){
- $html["data"] = $gl->getGallery($params["id"]);
+ if (isset($params["cl"]) && isset($params["fn"])){
+ if (class_exists($params["cl"])) {
+ $strclass=$params["cl"];
+ $cl = new $strclass($db,$cfg);
+ if (!method_exists($cl,$params["fn"])){
+ $html["error"] = "class ".$params["cl"]."->method ".$params["fn"]." does not exist!";
}
- elseif ($params["get"] == "gallery_items"){
- $html["data"] = $gl->getGalleryItems($params["id"]);
+ $r = new ReflectionMethod($strclass, $params["fn"]);
+ $metparams = $r->getParameters();
+ $fnp = array();
+ $prcnt = 0;
+ foreach ($metparams as $p) {
+ if (isset($params[$p->getName()])){
+ array_push($fnp,$params[$p->getName()]);
+ }
+ if ($p->isOptional() === false){
+ $prcnt++;
+ }
+ $html["fnparams"][$p->getName()] = (($p->isOptional() === true)?"optional":"required");
}
- } elseif (strpos($params["get"], 'rdv_') === 0){
-
- } elseif (strpos($params["get"], 'website_') === 0){
-
- } elseif (strpos($params["get"], 'users_') === 0){
-
- } elseif (strpos($params["get"], 'template_') === 0){
- $tmpl = new templates($cfg["sitetemplatepath"]);
- if ($params["get"] == "template_files"){
- $html["files"] = $tmpl->gettemplatefiles();
- }
- elseif ($params["get"] == "template_media"){
- $html["files"] = $tmpl->getmediafiles();
+ if (count($fnp) < $prcnt){
+ $html["error"] = "Function has ".$prcnt." required parameters!";
+ } else {
+ $html["data"] = call_user_func_array(array($cl, $params["fn"]), $fnp);
}
- }
-
- } elseif (isset($params["fn"])){
-
-
- } elseif(isset($params["savefield"])){
- db.exec("UPDATE ".$params["table"]." set ".$params["column"]."=".$db->value($params["value"])." where id=".$db->value($params["id"]).";");
- }
+ } else {
+ $html["error"] = "class ".$params["cl"]." does not exist!";
+ }
+ }
+ elseif(isset($params["savefield"])){
+ db.exec("UPDATE ".$params["table"]." set ".$params["column"]."=".$db->value($params["value"])." where id=".$db->value($params["id"]).";");
+ }
+ elseif(isset($params["logout"])){
+ $html["data"] = $sess->deleteSession($vars["sid"]);
+ }
header('Content-Type: application/json');
echo json_encode($html);
-?>
\ No newline at end of file
+
+?>
<?php
require('lib/vendor/mustache/mustache/src/Mustache/Autoloader.php');
Mustache_Autoloader::register();
-
require("lib/config.php");
require("lib/database.php");
require("lib/session.php");
echo $mainsite;
}
- echo "<pre>".print_r($vars)."</pre>";
+ //echo "<pre>".print_r($vars,true)."</pre>";
?>
\ No newline at end of file
}
fdata["savefield"] = 1;
postData({fdata}).then(ret => {
-
+ console.log(ret);
});
return false;
},
+
let galleries = {
tbl: null,
tblitems: null,
layout: "fitColumns",
responsiveLayout:true,
selectable: 1,
+ // rowDblClick:function(e, row){
+ // //e.preventDefault();
+ // galleries.edit();
+ // },
rowContext:function(e, row){ e.preventDefault(); },
columns: [
{title: "Gallerie", field: "gallery"},
galleries.gettbldata();
},
gettbldata: function(){
- postData({"get":"gallery_galleries"}).then(data => {
+ postData({"cl":"gallery","fn":"getAll"}).then(data => {
console.log("galleries Data",data.data);
galleries.tbl.setData(data.data);
let sel = galleries.tbl.getSelectedData();
this.gallery_folder = sel[0].link;
dataform.cleanform("galleries");
- postData({"get":"gallery_data","id":gallery.id_gallery}).then(data => {
+ postData({"cl":"gallery","fn":"get","id":gallery.id_gallery}).then(data => {
console.log("Gallery Data:",data.data);
dataform.fillform("galleries",gallery.selects,data.data);
gallery.gettabledata();
selectable: 1,
autoResize:false,
rowFormatter:function(row, data){
- console.log(row);
+ //console.log(row);
},
});
},
gettabledata: function(){
- postData({"get":"gallery_items","id":gallery.id_gallery}).then(data => {
+ postData({"cl":"gallery","fn":"getItems","id":gallery.id_gallery}).then(data => {
console.log("Gallery Items:",data.data);
gallery.tbl.setData(data.data);
})
myapp.viewdialog("addgalleryitem");
},
uploadItem: function(){
- let data = dataform.getformcontent("addgalleryitem");
+ let data = {};
+ data["folder"] = "galleries/" + this.gallery_folder;
myapp.closedlg("addgalleryitem");
- myapp.openDataLoad("Téléchargement en cours","Attendez s.v.p.!");
- postFile("addgalleryitem_file",data).then(data => {
- myapp.closeDataLoad();
-
- // postData({"fn":"gallery_addfiles",}).then( data => {
-
- // });
-
-
- }).catch(err => {
- myapp.closeDataLoad();
- });
+ var uplfiles = document.getElementById("addgalleryitem_file");
+ console.log("files:",uplfiles.files);
+ progresssteps = uplfiles.files.length * 2;
+ cstep = 0;
+ myapp.openDataLoad("Téléchargement en cours","Attendez s.v.p.!",progresssteps);
+ for (let i = 0; i < uplfiles.files.length; i++) {
+ myapp.setDataLoadMsg("Upload File " + uplfiles.files[i].name,cstep);
+ postFile(uplfiles.files[i],data).then(filedata => {
+ console.log("File uploaded!",filedata);
+ cstep++;
+ myapp.setDataLoadMsg("Process File " + uplfiles.files[i].name,cstep);
+ postData({"cl":"gallery","fn":"addItem","idgallery":gallery.id_gallery,"filename":filedata.file}).then( data => {
+ console.log(data," added!");
+ if (cstep >= progresssteps){
+ gallery.gettabledata();
+ myapp.closeDataLoad();
+ }
+ }) .catch(err => {
+
+ console.log("postData RETURN ERROR",err);
+ console.log(err);
+ gallery.gettabledata();
+ myapp.closeDataLoad();
+ return false;
+ });
+ }).catch(err => {
+ console.log("postFile RETURN ERROR",err);
+ gallery.gettabledata();
+ myapp.closeDataLoad();
+ return false;
+ });
+ cstep++;
+ }
+
+
},
confirmRemove: function(){
},
remove: function(){
var sel = gallery.tbl.getSelectedData();
- postData({"fn":"gallery_deleteitem","id":id}).then(data => {
+ postData({"cl":"gallery","fn":"remove","id":id}).then(data => {
gallery.tbl.deselectRow(sel[0].id);
gallery.gettabledata();
});
let pictureFormatter = function(cell, formatterParams){
- return '<div><img style="height: 75px;" src="data/galleries/' + gallery.gallery_folder + '/thumb/'+ cell.getValue()+'" /></div>';
+ return '<div><img style="height: 75px;" src="media/galleries/' + gallery.gallery_folder + '/'+ cell.getValue()+'" /></div>';
};
\ No newline at end of file
--- /dev/null
+let notification = {
+ current_id: null,
+ selects:{},
+ init: function(){
+
+ },
+ viewpanel: function(id){
+ notification.current_id=id;
+ }
+}
\ No newline at end of file
--- /dev/null
+let webarticles = {
+ tbl: null,
+ selects:{},
+ init: function(){
+
+ },
+ gettabledata: function(){
+
+ },
+ add: function(){
+
+ },
+ edit: function(){
+
+ },
+ confirmRemove: function(){
+
+ },
+ remove: function(){
+
+ }
+
+}
\ No newline at end of file
--- /dev/null
+let order = {
+ current_id: null,
+ selects:{},
+ init: function(){
+
+ },
+ viewpanel: function(id){
+ order.current_id=id;
+ }
+}
\ No newline at end of file
--- /dev/null
+let orders = {
+ tbl: null,
+ selects:{},
+ init: function(){
+
+ },
+ gettabledata: function(){
+
+ },
+ add: function(){
+
+ },
+ edit: function(){
+
+ },
+ confirmRemove: function(){
+
+ },
+ remove: function(){
+
+ }
+
+}
\ No newline at end of file
--- /dev/null
+let products = {
+ tbl: null,
+ selects: {"products_productgroup":null},
+ init: function(){
+ flatpickr("#products_publishdate",{altInput: true,
+ altFormat: "d.m.Y", dateFormat: "Y-m-d","locale": "fr",
+ onClose: function(selectedDates, dateStr, instance) {dataform.savefield(document.getElementById('products_publishdate'),null); }
+ });
+ flatpickr("#products_unpublishdate",{altInput: true,
+ altFormat: "d.m.Y",dateFormat: "Y-m-d","locale": "fr",
+ onClose: function(selectedDates, dateStr, instance) {dataform.savefield(document.getElementById('products_unpublishdate'),null);}
+ });
+ products.selects["products_productgroup"] = new SlimSelect({
+ select: "#products_productgroup",
+ allowDeselectOption: true,
+ searchPlaceholder:"groupe...",
+ placeholderText: "groupe...",
+ searchText:"pas de groupe...",
+ addable: function (value) {return value;/*return {text: value,value: value.toLowerCase()}*/},
+ afterClose: function(){
+ //console.log("set timetrack");
+ dataform.savefield(document.getElementById('products_productgroup'),null);
+ }
+ });
+ products.selects["products_productoptions"] = new SlimSelect({
+ select: "#products_productoptions",
+ searchPlaceholder:"options...",
+ placeholderText: "option...",
+ allowDeselectOption: true,
+ searchText:"pas d'options'...",
+ addable: function (value) {return value;/*return {text: value,value: value.toLowerCase()}*/},
+ afterClose: function(){
+ //console.log("set timetrack");
+ dataform.savefield(document.getElementById('products_productoptions'),null);
+ }
+ });
+ tinymce.init({
+ selector: '#products_description',
+ plugins: 'paste importcss searchreplace autolink directionality visualblocks visualchars template charmap nonbreaking advlist lists textpattern noneditable charmap autoresize ',
+ menubar: false,
+ entity_encoding : 'raw',
+ toolbar: 'bold italic underline strikethrough | fontsizeselect | forecolor removeformat | charmap',
+ toolbar_sticky: false,
+ language: 'fr',
+ content_css: [
+ 'css/theme.css'
+ ],
+ statusbar: false,
+ forced_root_block : '',
+ min_height: 350,
+ branding: false,
+ importcss_append: true,
+ noneditable_noneditable_class: "mceNonEditable",
+ contextmenu: false,
+ setup: function(editor) {
+ editor.on('blur', function(e) {
+ console.log("tmce blur:",e.target.id);
+ if (e.target.id == "products_description"){
+ dataform.savefield(document.getElementById(e.id));
+ console.log("TODO: savefield");
+ }
+ //
+ //e.id
+ //console.log('The Editor has initialized.');
+ });
+ }
+ });
+ products.tbl =new Tabulator("#tbl_products",{
+ height: "calc(100vh - 60px)",
+ layout: "fitColumns",
+ responsiveLayout:true,
+ selectable: 1,
+ autoResize:false,
+ groupBy:["productgroup"],
+ groupStartOpen:[true],
+ groupHeader:[function(value, count, data){ return ((value)?value:"");}],
+ rowClick:function(e, row){
+ products.edit();
+ },
+
+ rowContext:function(e, row){ e.preventDefault(); },
+ columns: [
+ {title: "Produit", field: "name" ,width: 100},
+ ]
+ });
+ },
+ gettabledata: function(){
+ postData({"cl":"products","fn":"getAll"}).then(data => {
+ products.tbl.setData(data.data);
+ });
+ },
+ calculate: function(){
+
+ },
+ edit: function(){
+ let sel = products.tbl.getSelectedData();
+ if (sel[0]){
+ dataform.cleanform("products");
+ postData({"get":"products","fn":"get","id":sel[0].id}).then(data => {
+ dataform.fillform("products",data.data);
+ });
+ }
+ },
+ add: function(){
+ postData({"cl":"products","fn":"add"}).then(data => {
+ products.gettabledata();
+ });
+ },
+ confirmRemove: function(){
+ let sel = products.tbl.getSelectedData();
+ if (sel[0]){
+ myapp.confirm("supprimer le produit?","êtes-vous sûre de voulvoir supprimer ce produit?","Supprimer","Abondonner",'products.remove();');
+ }
+ },
+ remove: function(){
+ let sel = products.tbl.getSelectedData();
+ if (sel[0]){
+ postData({"cl":"products","fn":"delete","id":sel[0].id}).then(data => {
+ products.gettabledata();
+ });
+ }
+ },
+ duplicate: function(){
+ let sel = products.tbl.getSelectedData();
+ if (sel[0]){
+ postData({"cl":"products","fn":"duplicate","id":sel[0].id}).then(data => {
+ products.gettabledata();
+ });
+ }
+ }
+}
\ No newline at end of file
let rendezvous = {
+ tblday: null,
+ tblweek: null,
+ init: function(){
+ flatpickr("#filter_daydate",{altInput: true,
+ altFormat: "D, d.m.Y", dateFormat: "Y-m-d","locale": "fr",
+ disableMobile: true,
+ onClose: function(selectedDates, dateStr, instance) {
+ rendezvous.gettabledata();
+ }
+ });
+ rendezvous.tblday = new Tabulator("#tbl_day",{
+ height: "calc(100vh - 60px)",
+ layout: "fitColumns",
+ responsiveLayout:true,
+ selectable: 1,
+ // rowDblClick:function(e, row){
+ // //e.preventDefault();
+ // galleries.edit();
+ // },
+ rowContext:function(e, row){ e.preventDefault(); },
+ columns: [
+ {title: "heure", field: "rdvtime",width: 70,headerSort: false},
+ {title: "RendezVous",field: "clientname",headerSort: false,formatter:RDVFormatter}
+ ]
+ });
+ document.getElementById("filter_daydate")._flatpickr.setDate(moment().format('YYYY-MM-DD'));
+ rendezvous.gettabledata();
+ },
+ gettabledata: function(){
+ postData({"cl":"rendezvous","fn":"getRDVByDay","daydate":document.getElementById("filter_daydate").value}).then(data => {
+ rendezvous.tblday.setData(data.data);
+ });
+ },
+ nextday: function(){
+ document.getElementById("filter_daydate")._flatpickr.setDate(moment(document.getElementById("filter_daydate").value).add(1,'day').format('YYYY-MM-DD'));
+ rendezvous.gettabledata();
+ },
+ prevday: function(){
+ document.getElementById("filter_daydate")._flatpickr.setDate(moment(document.getElementById("filter_daydate").value).subtract(1,'day').format('YYYY-MM-DD'));
+ rendezvous.gettabledata();
+ }
+}
+
+let RDVFormatter = function(cell, formatterParams){
+ if (cell.getValue()){
+ var newcelldata = '<span style="font-weight: bold;">' + cell.getValue() + '</span> - <a href="tel:'+cell._cell.row.data.clientphone+'">'+cell._cell.row.data.clientphone+'</a><br/>'+cell._cell.row.data.product
+ return newcelldata;
+ }
+ return cell.getValue();
}
\ No newline at end of file
+let rdvcfg = {
+ tbl: null,
+ tblexclude: null,
+ init: function(){
+
+ }
+}
\ No newline at end of file
--- /dev/null
+let webarticle = {
+ current_id: null,
+ selects:{},
+ init: function(){
+
+ },
+ viewpanel: function(id){
+ webarticle.current_id=id;
+ }
+}
\ No newline at end of file
--- /dev/null
+let webarticles = {
+ tbl: null,
+ selects:{},
+ init: function(){
+
+ },
+ gettabledata: function(){
+
+ },
+ add: function(){
+
+ },
+ edit: function(){
+
+ },
+ confirmRemove: function(){
+
+ },
+ remove: function(){
+
+ }
+
+}
\ No newline at end of file
--- /dev/null
+let webpage = {
+ current_id: null,
+ tbl: null,
+ selects:{},
+ viewpanel: function(id){
+ webpage.current_id=id;
+ },
+ init: function(){
+
+ },
+
+}
\ No newline at end of file
--- /dev/null
+let webpages = {
+ tbl: null,
+ selects:{},
+ init: function(){
+ webpages.tbl = new Tabulator("#tbl_webpages",{
+ height: "calc(100vh - 60px)",
+ layout: "fitColumns",
+ responsiveLayout:true,
+ selectable: 1,
+ // rowDblClick:function(e, row){
+ // //e.preventDefault();
+ // galleries.edit();
+ // },
+ rowContext:function(e, row){ e.preventDefault(); },
+ columns: [
+ {title: "title", field: "gallery"},
+ {title: "description" , field:"description"}
+ ]
+ });
+ webpages.gettabledata();
+ },
+ gettabledata: function(){
+ postData({"cl":"webpages","fn":"getAll"}).then(data => {
+ webpages.tbl.setData(data.data);
+ });
+ },
+ add: function(){
+ postData({"cl":"webpages","fn":"add"}).then(data => {
+ webpages.tbl.setData(data.data);
+ });
+ },
+ edit: function(){
+ let sel = webpages.getSelectedData();
+ if (sel[0]){
+ webpage.viewpanel(sel[0].id);
+ }
+ },
+ confirmRemove: function(){
+ var sel = gallery.tbl.getSelectedData();
+ //delcallback = ;
+ if (sel[0]) {
+ myapp.confirm("Supprimer cette page?","êtes vous sûre de supprimer cette Page?","oui","non","webpages.remove();");
+ }
+ },
+ remove: function(){
+ var sel = webpages.tbl.getSelectedData();
+ postData({"cl":"webpages","fn":"remove","id":id}).then(data => {
+ webpages.tbl.deselectRow(sel[0].id);
+ webpages.gettabledata();
+ });
+ }
+}
\ No newline at end of file
}\r
},\r
logout: function() {\r
- postData(location.href, { "logout": "1" }).then (data => { location.href = 'login.html';});\r
+ postData({"logout":1}).then (data => { location.href = 'login.html';}).catch(err => {\r
+ console.log(err);\r
+ location.href = 'login.html';\r
+ });\r
},\r
\r
viewpanel: function(pnlname){\r
}\r
},\r
closedlg: function(dlgid){\r
- document.getElementById(dlgid).style.display='none';\r
+ document.getElementById("dlg_" + dlgid).style.display='none';\r
},\r
confirm(title,message,strbtnok,strbtncancel,action){\r
document.getElementById("dlgconfirm_title").innerHTML = title;\r
document.getElementById('dlgmessage').style.display='block';\r
return false;\r
},\r
- openDataLoad: function(title,message){\r
+ openDataLoad: function(title,message,steps){\r
document.getElementById('dlgdataload_title').innerHTML=title;\r
document.getElementById('dlgdataload_text').innerHTML=message;\r
+ document.getElementById('dlgdataload_progress').removeAttribute("value");\r
+ if (steps){\r
+ //document.getElementById('dlgdataload_progress').addAttribute("value");\r
+ document.getElementById('dlgdataload_progress').value = 0;\r
+ document.getElementById('dlgdataload_progress').max = steps;\r
+ }\r
document.getElementById('dlgdataload').style.display='block';\r
+ \r
return false;\r
},\r
closeDataLoad(){\r
document.getElementById('dlgdataload').style.display='none';\r
return false;\r
},\r
- setDataLoadMsg(msg){\r
+ setDataLoadMsg(msg,step){\r
document.getElementById('dlgdataload_text').innerHTML=msg;\r
+ document.getElementById('dlgdataload_progress').value=step;\r
}\r
+ \r
}\r
document.addEventListener("DOMContentLoaded", function() {\r
moment.locale('fr');\r
return response.json();
}
-async function postFile(fileobjid,data = {}) {
+async function postFile(fileobj,data = {}) {
var mfd = new FormData();
for (var o in data){
- mfd.append(o,mfd);
- }
- var fileobj = document.getElementById(fileobjid);
- for (let i = 0; i < fileobj.files.length; i++) {
- mfd.append('file', fileobj.files[i]);
+ mfd.append(o,data[o]);
}
+ //var fileobj = document.getElementById(fileobjid);
+ //console.log("files:",fileobj.files);
+ // for (let i = 0; i < fileobj.files.length; i++) {
+
+ mfd.append('file', fileobj,fileobj.name);
+ // }
const response = await fetch(api + 'upload.php', {
method: 'POST',
- mode: 'same-origin',
- cache: 'no-cache',
- credentials: 'same-origin',
- headers: {
- 'Content-Type': 'multipart/form-data'
- },
- redirect: 'follow',
- referrerPolicy: 'strict-origin',
+ // mode: 'same-origin',
+ // cache: 'no-cache',
+ // credentials: 'same-origin',
+ // headers: {
+ // 'Content-Type': undefined
+ // },
+ // redirect: 'follow',
+ // referrerPolicy: 'strict-origin',
body: mfd
});
-
+ console.log(response);
return response.json();
}
"templatepath" => "tmpl/",
"webdocroot" => $_SERVER["DOCUMENT_ROOT"].'/oldbell_lu/',
"webmediapath" => $_SERVER["DOCUMENT_ROOT"].'/oldbell_lu/media/',
+ "adminmediapath" => $_SERVER["DOCUMENT_ROOT"].'/oldbelladmin/media/',
"datapath" => "data/",
"db"=> array(
"type" => "pgsql",
),
"appversion" => date("YmdHis"),
"minify" => "",
- "sitename" => "oldbell",
+ "sitename" => "oldbell.lu",
"sitetemplatepath" => $_SERVER["DOCUMENT_ROOT"].'/oldbell_lu'
);
class database {
private $conn;
private $dbconf;
- private $debug=1;
+ private $debug=0;
public function __construct($pdbconf){
$this->dbconf = $pdbconf;
try {
return -1;
}
+ public function createUpdateDDL($schema,$table,$idents,$data){
+ $da = array();
+ $di = array();
+ foreach ($data as $col => $val){
+ array_push($da,$col."=".$this->value($val));
+ }
+ foreach ($idents as $col => $val){
+ array_push($di,$col."=".$this->value($val));
+ }
+ $updsql = "UPDATE ".$schema.".".$table." SET ".join(",",$da)." WHERE ".join(" AND ",$di).";";
+ return $updsql;
+ }
+
+ public function createInsertDDL($schema,$table,$data){
+ $dc = array();
+ $dv = array();
+ foreach ($data as $col => $val){
+ array_push($dc,$col);
+ array_push($dv,$this->value($val));
+ }
+ $inssql = "INSERT INTO ".$schema.".".$table." (".join(",",$dc).") VALUES (".join(",",$dv).");";
+ return $inssql;
+ }
+
public function newuuid(){
$nid = $this->query("SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring) as id");
return $nid["id"];
--- /dev/null
+<?php
+
+class image{
+ #private $picdef= array("density" => 72,"img_height" => 380,"img_width" => 700, "thumb_width" => 128, "thumb_height" => 128);
+ private $picdef= array();
+ public function __construct($npicdef,$env){
+ foreach ($npicdef as $key => $value){
+ $this->picdef[$key] = $value["pref"];
+ }
+ }
+ public function __destruct(){
+
+ }
+ public function set_picdef($npicdef){
+ foreach ($npicdef as $key => $value){
+ $this->picdef[$key] = $value["pref"];
+ }
+ }
+ public function resize($imgfile,$outpath,$wm){
+ $outfile = null;
+ if (!is_dir($outpath)){
+ mkdir($outpath);
+ }
+ if (file_exists($imgfile)){
+ $fpinfo = pathinfo($imgfile);
+ list($pwidth, $pheight) = getimagesize($imgfile);
+ $width=0;
+ $height =0;
+ $density = $this->picdef["density"];
+ if ($pwidth>$this->picdef["img_width"]){
+ $width = $this->picdef["img_width"];
+ } elseif ($height > $this->picdef["img_height"]) {
+ $height = $this->picdef["img_height"];
+ }
+ if ($height == 0){
+ $height = ($pheight/$pwidth) * $width;
+ }
+ elseif ($width == 0) {
+ $width = ($pwidth/$pheight) * $height;
+ }
+ if ($height > $this->picdef["img_height"]){
+ $height = $this->picdef["img_height"];
+ $width = ($width/$height) * $height;
+ }
+ if ($outpath === null){
+ $outfile = $imgfile;
+ $res = system("mogrify -resize ".$width."x".$height." -density ".$density." ".$imgfile);
+ } else {
+ $outfile = $outpath.'/'.$fpinfo['basename'];
+ error_log("convert -resize ".$width."x".$height." -density ".$density." ".$imgfile." ".$outfile);
+ $res = system("convert -resize ".$width."x".$height." -density ".$density." ".$imgfile." ".$outfile);
+ }
+ if (($wm !== null) && (file_exists($wm))){
+ $tmpcopy = $outpath.'/'.$fpinfo['name'].".copy.".$fpinfo['extension'];
+ copy($outfile,$tmpcopy);
+ $res = system("composite -gravity ".$this->picdef["wm_gravity"]." ".$this->picdef["wm_image"]." ".$tmpcopy." ".$outfile);
+ unlink($tmpcopy);
+ }
+ }
+ return $outfile;
+ }
+
+ public function createthump($imgfile,$outpath){
+ $fpinfo = pathinfo($imgfile);
+
+ $outfile = $outpath.'/thumb/'.$fpinfo['filename'].'.'.$fpinfo['extension'];
+ if (!id_dir($outpath.'/thumb')){
+ mkdir($outpath.'/thumb');
+ }
+ if ($imgfile == $outfile) { return null;}
+
+ system('convert -thumbnail x'.$this->picdef['thumbwidth'].' -background black -alpha remove "'.$imgfile.'" "'.$outfile.'"');
+ // if ($type == "cube"){
+ // system("convert ".$imgfile." -gravity center -crop ".$this->picdef['thumbwidth']."x".$this->picdef['thumbheight']."+0+0 +repage \"".$outfile."\"");
+ // }
+ return $outfile;
+ }
+
+ public function extractframefromvideo($videofile,$outpath){
+ $outfile = null;
+ $ffmpeg= dirname($_SERVER['SCRIPT_FILENAME']).'/tools/ffmpeg/ffmpeg';
+ if (!is_dir($outpath)){
+ mkdir($outpath);
+ }
+
+ if (file_exists($videofile)){
+ $vfinfo=pathinfo($videofile);
+ $outfile=$outpath.'/'.$vfinfo['basename'].'.png';
+ if (file_exists($outfile)){
+ unlink($oufile);
+ }
+ system($ffmpeg." -ss ".$this->picdef["video_extract_start"]." -i ".$videofile." -frames:v ".$this->picdef["video_extract_frames"]." ".$outfile);
+ //convert input.mp4[1] thumbnail.png
+ }
+ return $outfile;
+ }
+
+}
+?>
\ No newline at end of file
<?php
- class websites {
+ class webmenus {
private $dbh = null;
public function __construct($dblink){
$this->dbh = $dblink;
<?php
class gallery {
private $dbh;
- public function __construct($dblink){
+ private $cfg;
+ public function __construct($dblink,$cfg){
$this->dbh = $dblink;
+ $this->cfg = $cfg;
}
- public function getGalleries(){
+ public function getAll(){
$sql = "select * from galleries";
return $this->dbh->queryarray($sql);
}
- public function getGallery($id){
+ public function get($id){
$sql = "select * from galleries where id='".$id."'";
return $this->dbh->query($sql);
}
- public function getGalleryItems($id){
+ public function getItems($id){
$sql = "select * from galleryitems where id_gallery='".$id."'";
return $this->dbh->queryarray($sql);
}
- public function addgallery(){
-
+ public function addItem($filename,$idgallery){
+ $gld = $this->dbh->query("select id,link from galleries where id=".$this->dbh->value($idgallery).";");
+ $filepath = $this->cfg["adminmediapath"].'galleries/'.$gld["link"].'/'.$filename;
+ if (file_exists($filepath)){
+ $mt = mime_content_type($filepath);
+ $newitemid = $this->dbh->newuuid();
+ $thumbname = $filename;
+ if (strpos($mt,'image/') !== 0){
+ $findo =pathinfo($filename);
+ $thumbname=$finfo["basename"].'.png';
+ }
+ $data = array("id" => $newitemid,"id_gallery" => $gld["id"],"filename" => $filename,"filetype" => $mt,"thumnname" => $thumbname);
+ $inssql = $this->dbh->createInsertDDL("public","galleryitems",$data);
+ $this->dbh->exec($inssql);
+ $this->setItemCopies($newitemid);
+ } else {
+ return 0;
+ }
+ return 1;
}
- public function duplicateGallery($id){
+ public function setDefaultImage($idgallery,$id){
}
- public function removeGallery($id){
-
- }
-
- public function updateGallery($id,$data){
-
+ private function setItemCopies($id){
+ $gld = $this->dbh->query("SELECT gi.filename,g.link,gi.filetype,gi.thumbname from public.galleries g join public.galleryitems gi on (g.id=gi.id_gallery) where gi.id=".$this->dbh->value($id).";");
+ $imgopts = $this->dbh->querybykey("id","select id,pref from defaultdata where category='gallery';");
+ $img = new image($imgopts);
+ $filepath = $this->cfg["adminmediapath"]."galleries/".$gld["link"]."/".$gld["filename"];
+ $adminoutpath = $this->cfg["adminmediapath"]."galleries/".$gld["link"];
+ $weboutpath = $this->cfg["webmediapath"]."galleries/".$gld["link"];
+ if (strpos($gld["filetype"],'video/') === 0){
+ $newfile = $img->extractframefromvideo($filepath,$adminoutpath);
+ $filepath = $newfile;
+ }
+ $img->resize($filepath,$weboutpath,$this->cfg["adminmediapath"]."galleries/wm.png");
+ $img->createthumb($filepath,$adminoutpath);
+ $img->createthumb($filepath,$weboutpath);
+ return 1;
}
- public function newItem(){
-
+ public function removeItem($idgallery,$id){
+ $sqlfile = "SELECT gi.filename,g.link,gi.filetype,gi.thumbname from public.galleries g join public.galleryitems gi on (g.id=gi.id_gallery) where gi.id=".$this->dbh->value($id)." AND gi.id_gallery=".$this->dbh->value($idgallery).";";
+ $sqldel ="DELETE FROM galleryitems WHERE id=".$this->dbh->value($id)." and id_gallery=".$this->dbh->value($idgallery).";";
+ $fdata = $this->dbh->query($sqlfile);
+ $this->dbh->exec($sqldel);
+ unlink($this->cfg["adminmediapath"]."galleries/".$gld["link"]."/".$gld["filename"]);
+ unlink($this->cfg["adminmediapath"]."galleries/".$gld["link"]."/thumb/".$gld["thumbname"]);
+ unlink($this->cfg["webmediapath"]."galleries/".$gld["link"]."/".$gld["filename"]);
+ unlink($this->cfg["webmediapath"]."galleries/".$gld["link"]."/thumb/".$gld["thumbname"]);
+ return 1;
}
- public function setItemFile($id,$file){
-
+ public function updateItemData($id,$data){
+ $updsql = $this->dbh->createUpdateDDL("public","galleryitems",array("id" => $this->dbh->value($id)),$data);
+ $this->dbh->exec($updsql);
+ $gi = $this->dbh->query("SELECT * from galleryitems WHERE id=".$this->dbh->value($id).";");
}
- public function removeItem($id){
-
+ public function remove($id){
+ $this->dbh->exec("DELETE FROM galleryitems where id_gallery=".$this->dbh->value($id).";");
+ $gld = $this->dbh->query("select * from galleries where id=".$this->dbh->value($id).";");
+ $this->dbh->exec("DELETE FROM galleries where id=".$this->dbh->value($id).";");
+ $this->deleteDirectory($this->cfg["webmediapath"]."galleries/".$gld["link"]);
+ $this->deleteDirectory($this->cfg["adminmediapath"]."galleries/".$gld["link"]);
+ return 1;
}
- public function duplicateItem($id){
+ public function update($id,$data){
}
- public function updateItem($id,$data){
-
+ private function deleteDirectory($dir) {
+ if (!file_exists($dir)) {return true;}
+ if (!is_dir($dir)) {return unlink($dir);}
+ foreach (scandir($dir) as $item) {
+ if ($item == '.' || $item == '..') {continue;}
+ if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {return false;}
+ }
+ return rmdir($dir);
}
public function __destruct(){
<?php
class rendezvous {
private $dbh;
- public function __construct($dblink){
+ private $cfg;
+ public function __construct($dblink,$cfg){
$this->dbh = $dblink;
+ $this->cfg = $cfg;
}
-
public function __destruct(){
$this->dbh = null;
}
+ public function getRDVByDay($daydate){
+ $sql = "select tm.daydate,tm.rdvtime,clientname,product,clientphone,isconfirmed,iscanceled from (
+ select date(rdvtime) as daydate,to_char(rdvtime,'HH24:MI') as rdvtime from (
+ select generate_series(date('".$daydate."') + starttime::interval,date('".$daydate."') + endtime::interval,timesteps) as rdvtime
+ from rendezvoushours where date_part('isodow',date('".$daydate."')) = weekday) altm
+ ) tm
+ left join (
+ select daydate,to_char(timestart,'HH24:MI') as timestart,clientname,clientphone,product,isconfirmed,iscanceled from rendezvous where daydate=date('2020-11-16')) rdv
+ on (tm.daydate=rdv.daydate and rdv.timestart=tm.rdvtime)";
+ return $this->dbh->queryarray($sql);
+ }
+
+ public function get($id){
+ return $this->dbh->query("select * from rendezvous where id=".$this->dbh->value($id).";");
+ }
+
+ public function add($data){
+ $data["id"] = $this->dbh->newuuid();
+ $sql = $this->dbh->createInsertDDL("public","rendezvous",$data);
+ $this->dbh->exec($sql);
+ return array("id" => $data["id"]);
+ }
+
+ public function delete($id){
+ $this->dbh->exec("DELETE from rendezvous where id=".$this->dbh->value($id).";");
+ return 1;
+ }
+
}
+/*select calweek,max(mon) as mon,max(tue) as tue,max(wed) as wed,max(thu) as thu,max(fri) as fri,max(sat) as sat,max(sun) as sun from (
+ select calweek,
+ case when dow = 1 then daydate else null end as mon,
+ case when dow = 2 then daydate else null end as tue,
+ case when dow = 3 then daydate else null end as wed,
+ case when dow = 4 then daydate else null end as thu,
+ case when dow = 5 then daydate else null end as fri,
+ case when dow = 6 then daydate else null end as sat,
+ case when dow = 7 then daydate else null end as sun from (
+ select date_part('year',generate_series) || '-' || date_part('week',generate_series) as calweek ,
+ date_part('isodow',generate_series) as dow,
+ date(generate_series) as daydate
+ from pg_catalog.generate_series(date('2020-12-01'),date('2020-12-01') + interval '1 month' - interval '1 day','1 day')
+ ) monthdays) monthweeks group by calweek order by calweek;*/
?>
\ No newline at end of file
+<?php
+class webarticles {
+ private $dbh;
+ private $cfg;
+ public function __construct($dblink,$cfg){
+ $this->dbh = $dblink;
+ $this->cfg = $cfg;
+ }
+ public function __destruct(){
+ $this->dbh = null;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class orders {
+ private $dbh;
+ private $cfg;
+ public function __construct($dblink,$cfg){
+ $this->dbh = $dblink;
+ $this->cfg = $cfg;
+ }
+ public function __destruct(){
+ $this->dbh = null;
+ }
+
+ public function add(){
+
+ }
+
+ public function remove(){
+
+ }
+
+ public function duplicate(){
+
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class products {
+ private $dbh;
+ private $cfg;
+ public function __construct($dblink,$cfg){
+ $this->dbh = $dblink;
+ $this->cfg = $cfg;
+ }
+ public function __destruct(){
+ $this->dbh = null;
+ }
+
+ public function getAll(){
+ return $this->dbh->queryarray("select * from products;");
+ }
+
+ public function get($id){
+ return $this->dbh->query("select * from products where id=".$this->dbh->value($id).";");
+ }
+
+ public function add(){
+ $tblvals = array("id" => $this->dbh->newuuid(),"product" => "nouveau produit");
+ $sql = $this->dbh->createInsertDDL("public","products",$tblvals);
+ $this->dbh->exec($sql);
+ return array("id" => $tblvals["id"]);
+ }
+
+ public function delete($id){
+ $this->dbh->exec("DELETE from products where id=".$this->dbh->value($id).";");
+ return 1;
+ }
+
+ public function duplicate($id){
+ $copydata = $this->dbh->query("select * from products where id=".$this->dbh->value($id).";");
+ $copydata["id"] = $this->dbh->newuuid();
+ $sql = $this->dbh->createInsertDDL("public","products",$copydata);
+ $this->dbh->exec($sql);
+ return array("id" => $copydata["id"]);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class users {
+ private $dbh;
+ private $cfg;
+ public function __construct($dblink,$cfg){
+ $this->dbh = $dblink;
+ $this->cfg = $cfg;
+ }
+ public function __destruct(){
+ $this->dbh = null;
+ }
+ public function getAll(){
+ return $this->dbh->queryarray("select * from users;");
+ }
+
+ public function get($id){
+ return $this->dbh->query("select * from users where id=".$this->dbh->value($id).";");
+ }
+
+ public function checkusername($username){
+ return $this->dbh->query("select count(*) as found from users where username=".$this->dbh->value($usernme).";");
+ }
+
+ public function add($username){
+ $tblvals = array("id" => $this->dbh->newuuid(),"username" => $this->dbh->securetext($username));
+ $sql = $this->dbh->createInsertDDL("public","users",$tblvals);
+ $this->dbh->exec($sql);
+ return array("id" => $tblvals["id"]);
+ }
+
+ public function delete($id){
+ $this->dbh->exec("DELETE from users where id=".$this->dbh->value($id).";");
+ return 1;
+ }
+
+}
+?>
\ No newline at end of file
<?php
class websites {
- private $dbh = null;
- public function __construct($dblink){
+ private $dbh;
+ private $cfg;
+ public function __construct($dblink,$cfg){
$this->dbh = $dblink;
+ $this->cfg = $cfg;
+ }
+ public function __destruct(){
+ $this->dbh = null;
}
-
public function addWebsite($id){
-
+
}
public function updateWebsite($id,$data){
public function duplicateWebsite($id){
}
-
-
- public function __destruct(){
- $this->dbh = null;
- }
+
}
?>
\ No newline at end of file
return null;
}
+ public function deleteSession($sid){
+ $this->dbh->exec("DELETE FROM public.sessions where id=".$this->dbh->value($sid).";");
+ return 1;
+ }
+
public function __destruct(){
$this->conn = null;
}
Attentez s.v.p.!
</div>
<div class="container padding">
- <progress class="progress block" indeterminate=""></progress>
+ <progress class="progress block" id="dlgdataload_progress" value="" max=""></progress>
</div>
</div>
<footer class="container right-align padding-16">
</div>
<script>
-function showdataloaddlg(title,message){
-document.getElementById('dlgdataload_title').innerHTML=title;
-document.getElementById('dlgdataload_text').innerHTML=message;
-document.getElementById('dlgdataload').style.display='block';
-return false;
-}
-function closedataloaddlg(){
-document.getElementById('dlgdataload_title').innerHTML='';
-document.getElementById('dlgdataload_text').innerHTML='';
-document.getElementById('dlgdataload').style.display='none';
-return false;
-}
-
-function setloadtext(msg){
-document.getElementById('dlgdataload_text').innerHTML=msg;
-}
</script>
\ No newline at end of file
<div class="container">
<div id="dlg_addgalleryitem_infomsg"></div>
<form id="frm_addgalleryitem">
- <input type="hidden" class="data_addgalleryitems" id="addgalleryitem_id_gallery" data-table="galleryitems" data-column="id_gallery" data-id="" value=""/>
+ <!--<input type="hidden" class="data_addgalleryitems" id="addgalleryitem_id_gallery" data-table="galleryitems" data-column="id_gallery" data-id="" value=""/>
- <input type="hidden" class="data_addgalleryitems" id="addgalleryitem_folder" data-table="galleryitems" data-column="" data-id="" value=""/>
+ <input type="hidden" class="data_addgalleryitems" id="addgalleryitem_folder" data-table="galleryitems" data-column="" data-id="" value=""/>-->
<div class="row">
- <div class="cell container" style="width: 200px;">
+ <div class="cell container" style="width: 400px;">
<label for="addgalleryitem_file" class="label">Fichier</label>
- <input type="file" class="input data_addgalleryitem " id="addgalleryitem_file" data-column="filename" data-table="galleryitems" data-id="" value="" />
+ <input type="file" class="input data_addgalleryitem " id="addgalleryitem_file" data-column="filename" data-table="galleryitems" multiple data-id="" value="" />
</div>
</div>
</div>
<footer>
<button class="button theme-light margin-right border" onclick="document.getElementById('dlg_addgalleryitem').style.display='none'; return false;"><span class="icon icon-remove"></span> Annuler</button>
- <button class="button actionbtn margin-right border" onclick="gallery.addItem();"><span class="icon icon-save"></span> Ajouter</button>
+ <button class="button actionbtn margin-right border" onclick="gallery.uploadItem();"><span class="icon icon-save"></span> Ajouter</button>
</footer>
</div>
</div>
<textarea class="input richeditarea data_galleries" type="text" style="width: 100%; height: 100px;" id="galleries_description" data-id="" data-column="description" data-table="galleries"></textarea>
</div>
</div>
+ <div class="cell-row">
+ <div class="cell container">
+ <label class="label">Link</label>
+ <input class="input data_galleries readonly" type="text" id="galleries_link" data-id="" data-column="gallery" data-table="galleries" readonly/>
+ </div>
+ </div>
</form>
</div>
</div>
--- /dev/null
+<div class="panel" id="pnl_order" style="display: none;">
+<div class="bar toolbar">
+<button class="bar-item toolbarbtn" onclick="myapp.viewpanel('orders');"><span class="icon-back" style="font-size: 18px;"></span>retour</button>
+ <div class="bar-item PageHeadTitle">Page</div>
+</div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="panel" id="pnl_orders">
+<div class="bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Pages</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="orders.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="orders.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+
+ <button class="bar-item toolbarbtn right" onclick="orders.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ <button class="bar-item toolbarbtn right" onclick="orders.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_orders');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_orders" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="orders.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="orders.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="orders.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn" onclick="orders.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ </div>
+ </div>
+</div>
+<div id="tbl_orders"></div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="panel" id="pnl_rdvhours">
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Configuration Rendez-Vous</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_galleries');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_galleries" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="galleries.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="galleries.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="galleries.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ {{! <button class="bar-item toolbarbtn" onclick="galleries.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button> }}
+ </div>
+ </div>
+</div>
+<div id="tbl_rdvhours">
+
+</div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="panel" id="pnl_rendezvous">
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">rendezvous</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="rendezvous.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn right" onclick="rendezvous.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn right" onclick="rendezvous.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="rendezvous.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_rendezvous');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_rendezvous" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="rendezvous.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="rendezvous.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="rendezvous.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ {{! <button class="bar-item toolbarbtn" onclick="rendezvous.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button> }}
+ </div>
+ </div>
+</div>
+<div id="tbl_rendezvous"></div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="panel" id="pnl_webarticle" style="display: none;">
+<div class="bar toolbar">
+<button class="bar-item toolbarbtn" onclick="myapp.viewpanel('webarticles');"><span class="icon-back" style="font-size: 18px;"></span>retour</button>
+ <div class="bar-item PageHeadTitle">Page</div>
+</div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="panel" id="pnl_webarticles">
+<div class="bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Pages</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="webarticles.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="webarticles.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+
+ <button class="bar-item toolbarbtn right" onclick="webarticles.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ <button class="bar-item toolbarbtn right" onclick="webarticles.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_webarticles');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_webarticles" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="webarticles.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="webarticles.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="webarticles.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn" onclick="webarticles.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ </div>
+ </div>
+</div>
+<div id="tbl_webarticles"></div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="panel" id="pnl_webpage" style="display: none;">
+<div class="bar toolbar">
+<button class="bar-item toolbarbtn" onclick="myapp.viewpanel('webpages');"><span class="icon-back" style="font-size: 18px;"></span>retour</button>
+ <div class="bar-item PageHeadTitle">Page</div>
+</div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="panel" id="pnl_webpages">
+<div class="bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Pages</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="webpages.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="webpages.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+
+ <button class="bar-item toolbarbtn right" onclick="webpages.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ <button class="bar-item toolbarbtn right" onclick="webpages.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_webpages');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_webpages" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="webpages.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="webpages.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="webpages.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn" onclick="webpages.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ </div>
+ </div>
+</div>
+<div id="tbl_webpages"></div>
+</div>
\ No newline at end of file
<div class="main">
{{ pagedata }}
</div>
- <script>
- let schemata = "[% session.sessiondata.schemata %]";
- </script>
+
<script type="text/javascript" src="js/vendors/tabulator/js/tabulator{{minify}}.js?v={{config.appversion}}"></script>
<script type="text/javascript" src="js/vendors/moment/moment-with-locales{{minify}}.js?v={{config.appversion}}"></script>
<script type="text/javascript" src="js/vendors/slimselect/slimselect.min.js?v={{config.appversion}}"></script>
<script type="text/javascript" src="js/vendors/tinymce/js/tinymce/tinymce.min.js?v={{config.appversion}}" ></script>
<!-- <script type="text/javascript" src="js/vendors/dropzone/dropzone.js?v={{config.appversion}}" ></script> -->
<script type="text/javascript" src="js/request{{minify}}.js?v={{config.appversion}}"></script>
- <script type="text/javascript" src="js/fieldata{{minify}}.js?v={{config.appversion}}"></script>
- <script type="text/javascript" src="js/myapp{{minify}}.js?v={{config.appversion}}"></script>
+ <script type="text/javascript" src="js/filedata{{minify}}.js?v={{config.appversion}}"></script>
<script type="text/javascript" src="js/timecalc{{minify}}.js?v={{config.appversion}}"></script>
<script type="text/javascript" src="js/dataform{{minify}}.js?v={{config.appversion}}"></script>
+ <script type="text/javascript" src="js/myapp{{minify}}.js?v={{config.appversion}}"></script>
<!-- <script type="text/javascript" src="js/report{{minify}}.js?v={{config.appversion}}"></script> -->
</body>
+++ /dev/null
-<div class="container bar toolbar">
- <a class="bar-item toolbarbtn" href="index.html"><span class="icon-back" style="font-size: 17px;"></span>retour</a>
- <div class="bar-item PageHeadTitle">Galleries</div>
- <div class="hide-small">
- <button class="bar-item toolbarbtn right" onclick="templates.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
- <button class="bar-item toolbarbtn right" onclick="templates.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
- <button class="bar-item toolbarbtn right" onclick="templates.confirmremove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
- <button class="bar-item toolbarbtn right" onclick="templates.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
- </div>
- <div class="hide-large hide-medium">
- <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
- </div>
- <div class="toolbar" id="mobilemenu" style="display: none;">
- <div class="bar">
- <button class="bar-item toolbarbtn" onclick="templates.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
- <button class="bar-item toolbarbtn" onclick="templates.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
- <button class="bar-item toolbarbtn" onclick="templates.confirmremove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
- <button class="bar-item toolbarbtn" onclick="templates.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
- </div>
- </div>
-</div>
-<div class="dispay-container panel">
- <div id="tbl_templates"></div>
-</div>
-<div class="dispay-container panel" style="display: none;">
-</div>
-<script type="text/javascript" src="js/modules/templates.js"></script>
-<script>
- function initpage(){
- templates.init();
- }
-</script>
\ No newline at end of file
--- /dev/null
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">FrontPage</div>
+ <div class="hide-small">
+ <!-- <button class="bar-item toolbarbtn right" onclick="product.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="product.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+
+ <button class="bar-item toolbarbtn right" onclick="product.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ <button class="bar-item toolbarbtn right" onclick="product.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button> -->
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_product');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_product" style="display: none;">
+ <div class="bar">
+ <!-- <button class="bar-item toolbarbtn" onclick="product.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="product.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="product.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn" onclick="product.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button> -->
+ </div>
+ </div>
+</div>
+<div class="tbl_frontpage"></div>
+<script type="text/javascript" src="js/modules/frontpage.js?v={{config.appversion}}"></script>
+<script>
+ function initpage(){
+ frontpage.init();
+ }
+</script>
\ No newline at end of file
{{> dialogs/dlg_galleryitem.html.mustache }}
{{> dialogs/confirm.html.mustache }}
{{> dialogs/dataload.html.mustache }}
-<script type="text/javascript" src="js/modules/galleries.js"></script>
-<script type="text/javascript" src="js/modules/gallery.js"></script>
+<script type="text/javascript" src="js/modules/galleries.js?v={{config.appversion}}"></script>
+<script type="text/javascript" src="js/modules/gallery.js?v={{config.appversion}}"></script>
<script>
function initpage(){
galleries.init();
<div class="container bar toolbar">
<a class="bar-item toolbarbtn" onclick="index.viewpanel();"><img src="img/favicon/apple-icon-57x57.png" style="height: 40px;" style="border: 1px solid bloack; border-radius: 3px;"></a>
- <div class="bar-item PageHeadTitle">{{ sitename }}</div>
- <a class="bar-item toolbarbtn right" onclick="index.viewpanel();"><span class="icon-logout" style="font-size: 20px;"></span>Logout</a>
+ <div class="bar-item PageHeadTitle">{{ config.sitename }}</div>
+ <a class="bar-item toolbarbtn right" onclick="myapp.logout();"><span class="icon-logout" style="font-size: 20px;"></span>Logout</a>
</div>
<div class="display-container" >
<div class="container">
</header>
<div class="bar">
<a class="bar-item bodybtn" href="galleries.html"><span class="icon-images" style="font-size: 24px;"></span>Galleries</a>
- <a class="bar-item bodybtn" href="websites.html"><span class="icon-news" style="font-size: 24px;"></span>Pages</button>
+ <a class="bar-item bodybtn" href="webarticles.html"><span class="icon-newspaper" style="font-size: 24px;"></span>News-Articles</button>
+ <a class="bar-item bodybtn" href="webpages.html"><span class="icon-website" style="font-size: 24px;"></span>Pages</button>
<a class="bar-item bodybtn" href="rendezvous.html"><span class="icon-rendezvous" style="font-size: 24px;"></span>Rendez-Vous</a>
- <a class="bar-item bodybtn" href="shop.html"><span class="icon-cart" style="font-size: 24px;"></span>Shop</a>
- <a class="bar-item bodybtn" href="orders.html"><span class="icon-" style="font-size: 24px;"></span>Commandes</a>
- <a class="bar-item bodybtn" href="popup.html"><span class="icon-push" style="font-size: 24px;"></span>Popup</a>
+ <a class="bar-item bodybtn" href="products.html"><span class="icon-cart" style="font-size: 24px;"></span>Produits</a>
+ <a class="bar-item bodybtn" href="orders.html"><span class="icon-shopbasket" style="font-size: 24px;"></span>Commandes</a>
+ <a class="bar-item bodybtn" href="notifications.html"><span class="icon-pushpin" style="font-size: 24px;"></span>Notifications</a>
</div>
</div>
</div>
<h3>Configuration</h3>
</header>
<div class="bar">
- <a class="bar-item bodybtn" href="config/rendezvous.html"><span class="icon-rendezvous" style="font-size: 24px;"></span>Rendez-Vous</a>
- <a class="bar-item bodybtn" href="config/media.html"><span class="icon-images" style="font-size: 24px;"></span>Media</a>
- <a class="bar-item bodybtn" href="config/template.html"><span class="icon-cube" style="font-size: 24px;"></span>Template</a>
- <a class="bar-item bodybtn" href="config/menu.html"><span class="icon-cube" style="font-size: 24px;"></span>Bars de Navigations</a>
- <a class="bar-item bodybtn" href="config/files.html"><span class="icon-cube" style="font-size: 24px;"></span>Pages Web</button>
- <a class="bar-item bodybtn" href="config/site.html"><span class="icon-cube" style="font-size: 24px;"></span>Site</a>
- <a class="bar-item bodybtn" href="config/shop.html"><span class="icon-cart" style="font-size: 24px;"></span>Shop</a>
- <a class="bar-item bodybtn" href="config/users.html"><span class="icon-profile" style="font-size: 24px;"></span>Utilisateurs</a>
+ <a class="bar-item bodybtn" href="frontpage.html"><span class="icon-home" style="font-size: 24px;"></span>Frontpage</a>
+ <a class="bar-item bodybtn" href="rendezvous_config.html"><span class="icon-rendezvous" style="font-size: 24px;"></span>Rendez-Vous</a>
+ <a class="bar-item bodybtn" href="site.html"><span class="icon-cube" style="font-size: 24px;"></span>Site</a>
+ <a class="bar-item bodybtn" href="shop.html"><span class="icon-cart" style="font-size: 24px;"></span>Shop</a>
+ <a class="bar-item bodybtn" href="users.html"><span class="icon-profile" style="font-size: 24px;"></span>Utilisateurs</a>
</div>
</div>
</div>
</div>
-<script type="text/javascript" src="js/modules/index.js"></script>
+<script type="text/javascript" src="js/modules/index.js?v={{config.appversion}}"></script>
<script>
function initpage(){
index.init();
+{{> panels/pnl_orders.html.mustache }}
+{{> panels/pnl_order.html.mustache }}
+{{> dialogs/confirm.html.mustache }}
+{{> dialogs/dataload.html.mustache }}
+<script type="text/javascript" src="js/modules/orders.js?v={{config.appversion}}"></script>
+<script type="text/javascript" src="js/modules/order.js?v={{config.appversion}}"></script>
+<script>
+ function initpage(){
+ orders.init();
+ order.init();
+ }
+</script>
\ No newline at end of file
--- /dev/null
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Produits</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="product.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="product.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+
+ <button class="bar-item toolbarbtn right" onclick="product.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ <button class="bar-item toolbarbtn right" onclick="product.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_product');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_product" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="product.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="product.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="product.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn" onclick="product.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ </div>
+ </div>
+</div>
+<div class="display-container">
+ <div class="row">
+ <div class="cell" style="width: 300px;">
+ <div id="tbl_products"></div>
+ </div>
+ <div class="cell padding" style="width: calc(100vw - 550px);">
+ <form id="frm_products">
+ <input type="hidden" class="data_products" is="products_id" data-id="" data-column="" data-table=""/>
+ <div class="row">
+ <div class="cell" style="width: 400px;">
+ <label class="label" for="products_name">Nom</label>
+ <input class="input border data_products " data-column="name" data-id="" data-table="products" id="products_name" type="text" onblur="dataform.savefield(this);">
+ </div>
+ <div class="cell" style="width: 300px;">
+ <label class="label" for="products_unpublishdate">Groupe</label>
+ <select class="select border data_products " data-column="productgroup" data-id="" data-table="products" id="products_productgroup"></select>
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell" style="width: 120px;">
+ <label for="products_netprice" class="label">prix net</label>
+ <input type="number" data-id="" data-column="netprice" data-table="products" class="input data_products border right-align currency" id="products_netprice" onblur="products.calculate();" onblur="dataform.savefield(this);" />
+ </div>
+ <div class="cell" style="width: 120px;">
+ <label for="products_taxpercent" class="label">MwSt.(%)</label>
+ <input type="number" data-id="" data-column="taxpercent" data-table="products" class="input data_products border percent right-align" id="products_taxpercent" onblur="products.calculate();" onblur="dataform.savefield(this);"/>
+ </div>
+ <div class="cell" style="width: 120px;">
+ <label for="products_grossprice" class="label">prix de vente</label>
+ <input type="number" data-id="" data-column="grossprice" data-table="products" class="input data_products border currency right-align readonly" id="products_grossprice" onblur="products.calculate();" onblur="dataform.savefield(this);" readonly/>
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell" style="max-width: 140px;">
+ <label class="label" for="products_publishdate">Publication</label>
+ <input class="input border date data_products datefield" data-column="publishdate" data-id="" data-table="products" id="products_publishdate" type="date">
+ </div>
+ <div class="cell" style="max-width: 140px;">
+ <label class="label" for="products_unpublishdate">Fin Publication</label>
+ <input class="input border date data_products datefield" data-column="unpublishdate" data-id="" data-table="products" id="products_unpublishdate" type="date">
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell container" style="width: calc(100vw - 600px);>
+ <label for="products_description" class="label">description</label>
+ <textarea class="input data_products" id="products_description" data-column="description" data-table="products" data-id="" ></textarea>
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell" style="width: calc(100vw - 600px);">
+ <label class="label" for="products_options">Options</label>
+ <select class="select border data_products" data-column="productoptions" data-id="" multiple data-table="products" id="products_productoptions"></select>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div class="cell" style="width: 250px">
+ <div class="bar moduletoolbar">
+ <div class="bar-item SubHeadTitle">Images</div>
+ <button class="bar-item toolbarbtn right" onclick="product.confirmRemoveImage();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="product.addImage();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ </div>
+ <div id="tbl_productimages"></div>
+ </div>
+ </div>
+</div>
+<script type="text/javascript" src="js/modules/products.js?v={{config.appversion}}"></script>
+<script>
+ function initpage(){
+ products.init();
+ }
+</script>
-<script type="text/javascript" src="js/modules/rendezvous.js"></script>
+<style>
+ .calhead {
+ width: 13.5vw; height: 30px;text-align: center; font-weight: bold; vertical-align: middle;
+ }
+ .calcard {
+ width: 13.5vw; height: 15vh;
+ }
+ .week {
+ width: 5.5vw;
+ }
+ </style>
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Rendez-Vous</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="rendezvous.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="rendezvous.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn right" onclick="rendezvous.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+
+
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_rendezvous');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_rendezvous" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="rendezvous.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="rendezvous.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="rendezvous.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+
+ </div>
+ </div>
+</div>
+<div class="display-container" id="pnl_dayview">
+ <div class="bar moduletoolbar">
+ <div class="bar-item" style="width: 185px;">
+ <input class="input border date data_filterdate datefield" id="filter_daydate" type="date" >
+ </div>
+ <button class="bar-item button" onclick="rendezvous.prevday();"><span class="icon-back" style="font-size: 17px;"></span>jour -</button>
+ <button class="bar-item button" onclick="rendezvous.nextday();"><span class="icon-next" style="font-size: 17px;"></span>jour +</button>
+ </div>
+ <div id="tbl_day"></div>
+</div>
+<div class="display-container" id="pnl_weekview">
+
+</div>
+<div class="display-container" id="pnl_monthview" style="display: none;">
+<div class="row">
+ <div class="col card calhead week" ><div>semaine</div></div>
+ <div class="col card calhead">Lundi</div>
+ <div class="col card calhead">Mardi</div>
+ <div class="col card calhead">Mercedi</div>
+ <div class="col card calhead">Jeudi</div>
+ <div class="col card calhead">Vendredi</div>
+ <div class="col card calhead">Samedi</div>
+ <div class="col card calhead">Dimanche</div>
+</div>
+<div class="cell-row">
+ <div class="cell card calcard week">YYYY-MM</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+</div>
+<div class="cell-row">
+ <div class="cell card calcard week">YYYY-MM</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+</div>
+<div class="cell-row">
+ <div class="cell card calcard week">YYYY-MM</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+</div>
+<div class="cell-row">
+ <div class="cell card calcard week">YYYY-MM</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+</div>
+<div class="cell-row">
+ <div class="cell card calcard week">YYYY-MM</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+</div>
+<div class="cell-row">
+ <div class="cell card calcard week">YYYY-MM</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+ <div class="cell card calcard">DD.MM.YYYY</div>
+</div>
+</div>
+<script type="text/javascript" src="js/modules/rendezvous.js?v={{config.appversion}}"></script>
<script>
function initpage(){
rendezvous.init();
--- /dev/null
+{{> panels/pnl_rdvcfg.html.mustache }}
+<script type="text/javascript" src="js/modules/rendezvous_config.js?v={{config.appversion}}"></script>
+<script>
+ function initpage(){
+ rdvcfg.init();
+
+ }
+</script>
\ No newline at end of file
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Shop</div>
+ <div class="hide-small">
+ <!-- <button class="bar-item toolbarbtn right" onclick="product.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn right" onclick="product.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+
+ <button class="bar-item toolbarbtn right" onclick="product.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button>
+ <button class="bar-item toolbarbtn right" onclick="product.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button> -->
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_product');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_product" style="display: none;">
+ <div class="bar">
+ <!-- <button class="bar-item toolbarbtn" onclick="product.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="product.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="product.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn" onclick="product.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button> -->
+ </div>
+ </div>
+</div>
\ No newline at end of file
--- /dev/null
+
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Site</div>
+ <div class="hide-small">
+ <!-- <button class="bar-item toolbarbtn right" onclick="rdvcfg.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>-->
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_site');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_site" style="display: none;">
+ <div class="bar">
+ <!-- <button class="bar-item toolbarbtn" onclick="site.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="site.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="site.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ <button class="bar-item toolbarbtn" onclick="site.duplicate()"><span class="icon-duplicate" style="font-size: 17px;"></span>dupl.</button> -->
+ </div>
+ </div>
+</div>
+
--- /dev/null
+<div class="display-container bar toolbar">
+ <a class="bar-item toolbarbtn" href="index.html"><span class="icon-home" style="font-size: 18px;"></span>Home</a>
+ <div class="bar-item PageHeadTitle">Utilisateurs</div>
+ <div class="hide-small">
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn right" onclick="rdvcfg.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ </div>
+ <div class="hide-large hide-medium">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu('mobilemenu_user');"><span class="icon-menu xxlarge" style="font-size: 20px;"></span></button>
+ </div>
+ <div class="toolbar" id="mobilemenu_user" style="display: none;">
+ <div class="bar">
+ <button class="bar-item toolbarbtn" onclick="user.add();"><span class="icon-plus" style="font-size: 17px;"></span>ajouter</button>
+ <button class="bar-item toolbarbtn" onclick="user.edit();"><span class="icon-edit" style="font-size: 17px;"></span>édit.</button>
+ <button class="bar-item toolbarbtn" onclick="user.confirmRemove();"><span class="icon-trash" style="font-size: 17px;"></span>suppr.</button>
+ </div>
+ </div>
+</div>
+<div class="display-container">
+ <div class="row">
+ <div class="cell" style="width: 200px;">
+ <div class="tbl_users">
+ </div>
+ <div class="cell">
+ <form id="frm_user">
+ </form>
+ </div>
+ </div>
+</div>
+</div>
+{{> dialogs/confirm.html.mustache }}
+{{> dialogs/dataload.html.mustache }}
+<script type="text/javascript" src="js/modules/users.js?v={{config.appversion}}"></script>
+<script>
+ function initpage(){
+ users.init();
+ }
+</script>
\ No newline at end of file
--- /dev/null
+{{> panels/pnl_webarticles.html.mustache }}
+{{> panels/pnl_webarticle.html.mustache }}
+{{> dialogs/confirm.html.mustache }}
+{{> dialogs/dataload.html.mustache }}
+<script type="text/javascript" src="js/modules/webarticles.js?v={{config.appversion}}"></script>
+<script type="text/javascript" src="js/modules/webarticle.js?v={{config.appversion}}"></script>
+<script>
+ function initpage(){
+ webarticles.init();
+ webarticle.init();
+ }
+</script>
\ No newline at end of file
--- /dev/null
+
+{{> panels/pnl_webpages.html.mustache }}
+{{> panels/pnl_webpage.html.mustache }}
+{{> dialogs/confirm.html.mustache }}
+{{> dialogs/dataload.html.mustache }}
+<script type="text/javascript" src="js/modules/webpages.js?v={{config.appversion}}"></script>
+<script type="text/javascript" src="js/modules/webpage.js?v={{config.appversion}}"></script>
+<script>
+ function initpage(){
+ webpages.init();
+ webpage.init();
+ }
+</script>
}
if (isset($vars["sid"]) && ($vars["sid"] != "")){
$vars["session"] = $sess->getSession($vars["sid"]);
- // if (!isset($vars["session"]["id_session"])){
- // $vars["sid"] = "";
- // }
}
-
-
$html["session"] = $vars["session"];
if(count($vars["session"]) == 0) {
echo json_encode($html);
exit(1);
}
- //header('Content-Type: application/json');
- header('Content-Type: text/html');
- print_r($params);
+ if (isset($_POST["folder"])){
+ $mfolder = $_POST["folder"];
+ $mfolder = str_replace(".","",$mfolder);
+
+ if (!is_dir($cfg["adminmediapath"].$mfolder)){
+ mkdir($cfg["adminmediapath"].$mfolder);
+ }
+ else {
+ error_log("mediafolder: ".$cfg["adminmediapath"].$mfolder." exists!");
+ }
+ $cnum = date('YmdHis');
+ $cfiles = glob($cfg["adminmediapath"].$mfolder .'/'. "*");
+ $xfiles = count($cfiles) + 1;
+ $cnum = $cnum."_".$xfiles;
+ $uplfi = pathinfo($_FILES['file']['name']);
+ $newfilename = basename($mfolder)."_".$cnum.".".strtolower($uplfi['extension']);
+ move_uploaded_file($_FILES['file']['tmp_name'],$cfg["adminmediapath"].$mfolder.'/'.$newfilename);
+ $html["file"] = $newfilename;
+ }
+ header('Content-Type: application/json');
+ echo json_encode($html);
?>
\ No newline at end of file
#SetEnv PERL5LIB "/usr/home/dksalu/public_html/perl5"
+#SetEnv PATH "$PATH:/usr/home/dksalu/public_html/oldbelladmin/tools"
RewriteEngine on
DirectoryIndex index.php index.html
AddHandler cgi-script .cgi
$db = new database($cfg["db"]);
$vars = array();
$html = array();
-
+
$params = array();
$params = json_decode(file_get_contents('php://input'), true);
$html["params"] = $params;
<?php
+ putenv('PATH',getenv('PATH').":".$_SERVER["DOCUMENT_ROOT"].'/oldbelladmin/tools');
+ echo getenv('PATH')."<br/>";
phpinfo();
// echo "<pre>".print_r($vars).print_r($_SERVER["REQUEST_URI"])."</pre>";
?>
\ No newline at end of file
+++ /dev/null
-mkdir weeklysoap
-mkdir suggestion
-mkdir ourspecials
-mkdir aboutus
-mkdir photos
-mkdir videos
-mkdir productions
\ No newline at end of file
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes">
- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+ <!-- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
- <meta http-equiv="Expires" content="0" />
+ <meta http-equiv="Expires" content="0" /> -->
<meta name="robots" content="index,follow">
<link rel="apple-touch-icon" sizes="57x57" href="img/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="img/favicon/apple-icon-60x60.png">
</div>
</div>
<div class="main" style="margin-top: 66px; background-color: #000; height: calc(100vh - 68px); overflow-y: scroll;">
-
- <div class="row">
+
+ <div class="row" style="max-width: 1024px;margin: auto;">
<div class="col s12">
<video controls style="width: 100%;" src="media/galleries/videos/10000000_166728851767629_1882139570219937158_n.mp4"></video>
</div>
</div>
- <div class="row" style="background-color: #000;padding-top: 5px;">
+ <div class="row" style="background-color: #000;padding-top: 5px;max-width: 1024px;margin: auto;">
<div class="text-white col s12" id="gallery_description" style="padding-bottom: 10px;" >
gallery dexcription text
</div>
</div>
- <div class="row">
+ <div class="row" style="max-width: 1024px;margin: auto;">
<div class="bar red-white">
- <button class="bar-item button"><span class="icon-arrow-left" style="font-size: 30px;"></span> prev</button>
- <button class="bar-item button right">next <span class="icon-arrow-right" style="font-size: 30px;"></span></button>
+ <button class="bar-item button"><span class="icon-arrow-left" style="font-size: 30px;"></span><br/>précédant</button>
+ <button class="bar-item button"><span class="icon-image" style="font-size: 30px;"></span><br/>Gallerie</button>
+ <button class="bar-item button right"><span class="icon-arrow-right" style="font-size: 30px;"></span><br/>prochain</button>
</div>
</div>