diff --git a/cms/cache/.gitignore b/cms/cache/.gitignore
deleted file mode 100644
index 86d0cb2..0000000
--- a/cms/cache/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore
\ No newline at end of file
diff --git a/cms/css/basic-style.css b/cms/css/basic-style.css
index a2c9e8b..9bd8a1f 100644
--- a/cms/css/basic-style.css
+++ b/cms/css/basic-style.css
@@ -1,523 +1,523 @@
-/*
-Simple Responsive Template v 1.2
-
-
-primary styles
- Author: www.prowebdesign.ro
- Add your own styles to customize the project.
-
-
-
-BASE (MOBILE) SIZE
- These are the mobile styles. It's what people see on their phones.
- Remember, keep it light: Speed is Important.
-*/
-
-/* typography */
-body{
- color:#666;
- font-family:'Ubuntu', Arial, Helvetica, sans-serif;
- font-size:1em;
- line-height:1.4em;
- font-weight:normal;
-}
-h1, h2, h3, h4, h5, h6{
- font-weight:normal;
- font-family:'Droid Serif', Arial, Helvetica, sans-serif;
- line-height:1.5em;
- margin:.45em 0;
- padding:0;
-}
-
-
-/* links */
-a,
-a:visited,
-a:active,
-a:hover{color:#0099ff;}
-a:hover{ text-decoration:none;}
-
-
-/* Box sizing. Awesome thing. Read about it here: http://www.w3schools.com/cssref/css3_pr_box-sizing.asp */
-*{ box-sizing:border-box;
- -moz-box-sizing:border-box;}
-
-
-/* structure */
-.wrapper{
- width: 92%;
- margin: 0 auto;
-}
-header{
- padding:15px 0;
-}
-#banner{
- text-align:center;
-}
-
-#hero,
-#page-header{
- background:#f3f3f3;
- border-top:1px solid #e2e2e2;
- border-bottom:1px solid #e2e2e2;
- padding:20px 0;
-}
-#hero h1{
- line-height:1.2em;
- margin-top:0px;
- margin-bottom:10px;}
-
-.flexslider{
- display:none;
-}
-
-#content {
- margin:40px 0;
-}
-
-aside {
- margin:40px 0;
-}
-
-p{ margin:0 0 1.5em;}
-
-
-/* RESPONSIVE IMAGES */
-img{ max-width:100%; height:auto;}
-
-
-/*MAIN MENU*/
-.menu-toggle{
- display:block;
- padding:10px;
- margin:20px 0 0;
- background:#666;
- color:#fff;
- cursor:pointer;
- text-transform:uppercase;
- font-size:20px;
-}
-.menu-toggle.toggled-on{
- background:#0099ff;
-}
-.srt-menu{
- display:none;
-}
-.srt-menu.toggled-on{
- display:block;
- position:relative;
- z-index:10;
-}
-
-.srt-menu{
- clear:both;
- margin-bottom:60px;
-
-}
-.srt-menu li a {
- background:#dadada;
- display:block;
- margin:1px 0;
- padding:10px;
- text-decoration:none;
-}
-.srt-menu li a:hover{
- background:#0099ff;
- color:#fff;
-}
-.srt-menu li li a {
- background:#e8e8e8;
- padding-left:40px;
-}
-.srt-menu li li li a {
- background:#efefef;
- padding-left:80px;
-}
-
-/*SECONDARY MENU*/
-#secondary-navigation{
- margin-bottom:60px;
-}
-#secondary-navigation ul{
- margin:0;
- padding:0;
-}
-#secondary-navigation ul li a{
- background:#E6E6E6;
- display:block;
- margin:5px 0;
- padding:10px;
- text-decoration:none;
-}
-#secondary-navigation ul li a:hover,
-#secondary-navigation ul li.active a{
- background:#0099ff;
- color:#fff;
-}
-
-/*SPACE GRID ELEMENTS VERTICALLY, SINCE THEY ARE ONE UNDER ANOTHER SO FAR*/
-.grid_1,
-.grid_2,
-.grid_3,
-.grid_4,
-.grid_5,
-.grid_6,
-.grid_7,
-.grid_8,
-.grid_9,
-.grid_10,
-.grid_11,
-.grid_12 {
- margin-bottom:40px;
- /*positioning and padding*/
- position: relative;
- min-height: 1px;
- padding-left: 15px;
- padding-right: 15px;
-}
-
-/*FOOTER*/
-footer{
- clear:both;
- font-size:80%;
- padding:20px 0;
-}
-footer ul{
- margin:0;
- padding:0;
-}
-
-/*colors and backgrounds*/
-body{
- background:#fff;
-}
-h1, h2, h3, h4, h5, h6{
- color:#333;
-}
-
-footer{
- background:#333;
- color:#ccc;
-}
-footer h1, footer h2, footer h3, footer h4{
- color:#CCC;
- margin-bottom:10px;
-}
-footer ul{
- margin:0 0 0 8%;
-}
-
-a.buttonlink{
- background:#0099ff;
- border-radius:7px;
- color:#fff;
- display:block;
- float:left;
- margin:10px 15px 10px 0;
- padding:10px;
- text-decoration:none;
-}
-a.buttonlink:hover{
- background:#8dbc01;
-}
-.greenelement{
- background:#5ec79e;
- color:#fff;
-}
-.violetelement{
- background:#887dc2;
- color:#fff;
-}
-
-
-
-/* Contain floats*/
-.clearfix:before,
-.clearfix:after,
-.row:before,
-.row:after {
- content: " ";
- display: table;
-}
-.clearfix:after,
-.container:after,
-.row:after{
- clear: both;
-}
-
-
-/*
-LARGER MOBILE DEVICES
-This is for mobile devices with a bit larger screens.
-*/
-@media only screen and (min-width: 481px) {
-#banner{
- float:left;
- text-align:left;
- margin-bottom:-20px;/*this depends on the height of the logo*/
-}
-.menu-toggle{/*make menu float right, instead of sitting under the logo*/
- margin-top:10px; /*this depends on the height of the logo*/
- float:right;
-}
-
-}
-
-/*
-TABLET & SMALLER LAPTOPS
-The average viewing window and preferred media query for those is 768px.
-But I think that some more breathing space is good:)
-*/
-@media only screen and (min-width: 920px) {
-
-.wrapper{
- max-width: 1200px;
- margin: .75em auto;
-}
-
-#banner{
- float:left;
- text-align:left;
- margin-bottom:0px;
-}
-header{
- padding:0;
-}
-#content {
- float:left;
- width:65%;
-}
-#content.wide-content{
- float:none;
- width:100%;
-}
-
-.flexslider{
-display:block;
-/*demo 1 slider theme*/
-margin: 0 0 60px;
-background: #fff;
-border: 4px solid #fff;
--webkit-border-radius: 4px;
--moz-border-radius: 4px;
--o-border-radius: 4px;
-border-radius: 4px;
-box-shadow: 0 1px 4px rgba(0,0,0,.2);
--webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2);
--moz-box-shadow: 0 1px 4px rgba(0,0,0,.2);
--o-box-shadow: 0 1px 4px rgba(0,0,0,.2);
-}
-
-
-aside {
- float:right;
- width:30%;
-}
-
-/*** MAIN MENU - ESSENTIAL STYLES ***/
-.menu-toggle{display:none;}
-#menu-main-navigation{display:block;}
-
-.srt-menu, .srt-menu * {
- margin: 0;
- padding: 0;
- list-style: none;
-}
-.srt-menu ul {
- position: absolute;
- display:none;
- width: 12em; /* left offset of submenus need to match (see below) */
-}
-.srt-menu ul li {
- width: 100%;
-}
-.srt-menu li:hover {
- visibility: inherit; /* fixes IE7 'sticky bug' */
-}
-.srt-menu li {
- float: left;
- position: relative;
- margin-left:1px;
-}
-.srt-menu li li {
- margin-left:0px;
-}
-.srt-menu a {
- display: block;
- position: relative;
-}
-.srt-menu li:hover ul,
-.srt-menu li.sfHover ul {
- display:block;
- left: 0;
- top: 45px; /* match top ul list item height */
- z-index: 99;
- -webkit-box-shadow: 2px 3px 2px 0px rgba(00, 00, 00, .3);
- box-shadow: 2px 3px 2px 0px rgba(00, 00, 00, .3);
-}
-ul.srt-menu li:hover li ul,
-ul.srt-menu li.sfHover li ul {
- top: -999em;
-}
-ul.srt-menu li li:hover ul,
-ul.srt-menu li li.sfHover ul {
- left: 12em; /* match ul width */
- top: 0;
-}
-ul.srt-menu li li:hover li ul,
-ul.srt-menu li li.sfHover li ul {
- top: -999em;
-}
-ul.srt-menu li li li:hover ul,
-ul.srt-menu li li li.sfHover ul {
- left: 10em; /* match ul width */
- top: 0;
-}
-
-/*** DEMO1 SKIN ***/
-#topnav, .srt-menu {
- float:right;
- margin: .35em 0 0 0;
-}
-.srt-menu a {
- text-decoration:none;
-}
-.srt-menu li a {
- background:#fff;
- margin:0;
- padding:10px 20px;
- height:45px;
-}
-.srt-menu a, .srt-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
- color: #0099ff;
-}
-.srt-menu li li a {
- border-top: 1px solid rgba(255,255,255,.2);
- background: #333; /*fallback for old IE*/
- background:rgba(0,0,0,.6);
- color: #fff;
- padding-left:20px;
- height:auto;
-}
-.srt-menu li li a:visited{color:#fff;}
-.srt-menu li li li a,
-.srt-menu li.active * li a{
- padding-left:20px;
- background:rgba(0,0,0,.6);
-}
-
-.srt-menu li:hover > a,
-.srt-menu li.active a{
- color:#fff;
- background:#0099ff;
-}
-.srt-menu li li:hover > a{
- color:#fff;
- background:#0099ff;
-}
-
-
-
-/*GRID*/
-/*
- & Columns : 12
-
- */
- .row{
- margin-left: -15px;
- margin-right: -15px;
-}
-
-.grid_1 { width: 8.33333333%; }
-.grid_2 { width: 16.66666667%; }
-.grid_3 { width: 25%; }
-.grid_4 { width: 33.33333333%; }
-.grid_5 { width: 41.66666667%; }
-.grid_6 { width: 50%; }
-.grid_7 { width: 58.33333333%; }
-.grid_8 { width: 66.66666667%; }
-.grid_9 { width: 75%; }
-.grid_10 { width: 83.33333333%; }
-.grid_11 { width: 91.66666667%; }
-.grid_12 { width: 100%; }
-
-.grid_1,
-.grid_2,
-.grid_3,
-.grid_4,
-.grid_5,
-.grid_6,
-.grid_7,
-.grid_8,
-.grid_9,
-.grid_10,
-.grid_11,
-.grid_12 {
- float: left;
- display: block;
-}
-
-.rightfloat{float:right;}
-/* @notation inspired by tinyGrid, .row and percentage by Twitter Bootstrap
- */
-
-#hero [class*="grid_"] { margin-bottom:-20px;}
-
-}
-
-/*
-DESKTOP
-This is the average viewing window. So Desktops, Laptops, and
-in general anyone not viewing on a mobile device. Here's where
-you can add resource intensive styles.
-*/
-@media only screen and (min-width: 1030px) {
-
-}
-
-/*
-LARGE VIEWING SIZE
-This is for the larger monitors and possibly full screen viewers.
-*/
-@media only screen and (min-width: 1240px) {
-
-}
-
-/*
-RETINA (2x RESOLUTION DEVICES)
-This applies to the retina iPhone (4s) and iPad (2,3) along with
-other displays with a 2x resolution.
-*/
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
- only screen and (min--moz-device-pixel-ratio: 1.5),
- only screen and (min-device-pixel-ratio: 1.5) {
-
-
-}
-
-/*
-iPHONE 5 MEDIA QUERY
-iPhone 5 or iPod Touch 5th generation styles (you can include your own file if you want)
-*/
-@media (device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) {
-
-
-}
-
-/*
-PRINT STYLESHEET
-*/
-@media print {
- * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
- a, a:visited { text-decoration: underline; }
- a[href]:after { content: " (" attr(href) ")"; }
- abbr[title]:after { content: " (" attr(title) ")"; }
- .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
- pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
- thead { display: table-header-group; } /* h5bp.com/t */
- tr, img { page-break-inside: avoid; }
- img { max-width: 100% !important; }
- @page { margin: 0.5cm; }
- p, h2, h3 { orphans: 3; widows: 3; }
- h2, h3 { page-break-after: avoid; }
+/*
+Simple Responsive Template v 1.2 test
+
+
+primary styles
+ Author: www.prowebdesign.ro
+ Add your own styles to customize the project.
+
+
+
+BASE (MOBILE) SIZE
+ These are the mobile styles. It's what people see on their phones.
+ Remember, keep it light: Speed is Important.
+*/
+
+/* typography */
+body{
+ color:#666;
+ font-family:'Ubuntu', Arial, Helvetica, sans-serif;
+ font-size:1em;
+ line-height:1.4em;
+ font-weight:normal;
+}
+h1, h2, h3, h4, h5, h6{
+ font-weight:normal;
+ font-family:'Droid Serif', Arial, Helvetica, sans-serif;
+ line-height:1.5em;
+ margin:.45em 0;
+ padding:0;
+}
+
+
+/* links */
+a,
+a:visited,
+a:active,
+a:hover{color:#0099ff;}
+a:hover{ text-decoration:none;}
+
+
+/* Box sizing. Awesome thing. Read about it here: http://www.w3schools.com/cssref/css3_pr_box-sizing.asp */
+*{ box-sizing:border-box;
+ -moz-box-sizing:border-box;}
+
+
+/* structure */
+.wrapper{
+ width: 92%;
+ margin: 0 auto;
+}
+header{
+ padding:15px 0;
+}
+#banner{
+ text-align:center;
+}
+
+#hero,
+#page-header{
+ background:#f3f3f3;
+ border-top:1px solid #e2e2e2;
+ border-bottom:1px solid #e2e2e2;
+ padding:20px 0;
+}
+#hero h1{
+ line-height:1.2em;
+ margin-top:0px;
+ margin-bottom:10px;}
+
+.flexslider{
+ display:none;
+}
+
+#content {
+ margin:40px 0;
+}
+
+aside {
+ margin:40px 0;
+}
+
+p{ margin:0 0 1.5em;}
+
+
+/* RESPONSIVE IMAGES */
+img{ max-width:100%; height:auto;}
+
+
+/*MAIN MENU*/
+.menu-toggle{
+ display:block;
+ padding:10px;
+ margin:20px 0 0;
+ background:#666;
+ color:#fff;
+ cursor:pointer;
+ text-transform:uppercase;
+ font-size:20px;
+}
+.menu-toggle.toggled-on{
+ background:#0099ff;
+}
+.srt-menu{
+ display:none;
+}
+.srt-menu.toggled-on{
+ display:block;
+ position:relative;
+ z-index:10;
+}
+
+.srt-menu{
+ clear:both;
+ margin-bottom:60px;
+
+}
+.srt-menu li a {
+ background:#dadada;
+ display:block;
+ margin:1px 0;
+ padding:10px;
+ text-decoration:none;
+}
+.srt-menu li a:hover{
+ background:#0099ff;
+ color:#fff;
+}
+.srt-menu li li a {
+ background:#e8e8e8;
+ padding-left:40px;
+}
+.srt-menu li li li a {
+ background:#efefef;
+ padding-left:80px;
+}
+
+/*SECONDARY MENU*/
+#secondary-navigation{
+ margin-bottom:60px;
+}
+#secondary-navigation ul{
+ margin:0;
+ padding:0;
+}
+#secondary-navigation ul li a{
+ background:#E6E6E6;
+ display:block;
+ margin:5px 0;
+ padding:10px;
+ text-decoration:none;
+}
+#secondary-navigation ul li a:hover,
+#secondary-navigation ul li.active a{
+ background:#0099ff;
+ color:#fff;
+}
+
+/*SPACE GRID ELEMENTS VERTICALLY, SINCE THEY ARE ONE UNDER ANOTHER SO FAR*/
+.grid_1,
+.grid_2,
+.grid_3,
+.grid_4,
+.grid_5,
+.grid_6,
+.grid_7,
+.grid_8,
+.grid_9,
+.grid_10,
+.grid_11,
+.grid_12 {
+ margin-bottom:40px;
+ /*positioning and padding*/
+ position: relative;
+ min-height: 1px;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+
+/*FOOTER*/
+footer{
+ clear:both;
+ font-size:80%;
+ padding:20px 0;
+}
+footer ul{
+ margin:0;
+ padding:0;
+}
+
+/*colors and backgrounds*/
+body{
+ background:#fff;
+}
+h1, h2, h3, h4, h5, h6{
+ color:#333;
+}
+
+footer{
+ background:#333;
+ color:#ccc;
+}
+footer h1, footer h2, footer h3, footer h4{
+ color:#CCC;
+ margin-bottom:10px;
+}
+footer ul{
+ margin:0 0 0 8%;
+}
+
+a.buttonlink{
+ background:#0099ff;
+ border-radius:7px;
+ color:#fff;
+ display:block;
+ float:left;
+ margin:10px 15px 10px 0;
+ padding:10px;
+ text-decoration:none;
+}
+a.buttonlink:hover{
+ background:#8dbc01;
+}
+.greenelement{
+ background:#5ec79e;
+ color:#fff;
+}
+.violetelement{
+ background:#887dc2;
+ color:#fff;
+}
+
+
+
+/* Contain floats*/
+.clearfix:before,
+.clearfix:after,
+.row:before,
+.row:after {
+ content: " ";
+ display: table;
+}
+.clearfix:after,
+.container:after,
+.row:after{
+ clear: both;
+}
+
+
+/*
+LARGER MOBILE DEVICES
+This is for mobile devices with a bit larger screens.
+*/
+@media only screen and (min-width: 481px) {
+#banner{
+ float:left;
+ text-align:left;
+ margin-bottom:-20px;/*this depends on the height of the logo*/
+}
+.menu-toggle{/*make menu float right, instead of sitting under the logo*/
+ margin-top:10px; /*this depends on the height of the logo*/
+ float:right;
+}
+
+}
+
+/*
+TABLET & SMALLER LAPTOPS
+The average viewing window and preferred media query for those is 768px.
+But I think that some more breathing space is good:)
+*/
+@media only screen and (min-width: 920px) {
+
+.wrapper{
+ max-width: 1200px;
+ margin: .75em auto;
+}
+
+#banner{
+ float:left;
+ text-align:left;
+ margin-bottom:0px;
+}
+header{
+ padding:0;
+}
+#content {
+ float:left;
+ width:65%;
+}
+#content.wide-content{
+ float:none;
+ width:100%;
+}
+
+.flexslider{
+display:block;
+/*demo 1 slider theme*/
+margin: 0 0 60px;
+background: #fff;
+border: 4px solid #fff;
+-webkit-border-radius: 4px;
+-moz-border-radius: 4px;
+-o-border-radius: 4px;
+border-radius: 4px;
+box-shadow: 0 1px 4px rgba(0,0,0,.2);
+-webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2);
+-moz-box-shadow: 0 1px 4px rgba(0,0,0,.2);
+-o-box-shadow: 0 1px 4px rgba(0,0,0,.2);
+}
+
+
+aside {
+ float:right;
+ width:30%;
+}
+
+/*** MAIN MENU - ESSENTIAL STYLES ***/
+.menu-toggle{display:none;}
+#menu-main-navigation{display:block;}
+
+.srt-menu, .srt-menu * {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+.srt-menu ul {
+ position: absolute;
+ display:none;
+ width: 12em; /* left offset of submenus need to match (see below) */
+}
+.srt-menu ul li {
+ width: 100%;
+}
+.srt-menu li:hover {
+ visibility: inherit; /* fixes IE7 'sticky bug' */
+}
+.srt-menu li {
+ float: left;
+ position: relative;
+ margin-left:1px;
+}
+.srt-menu li li {
+ margin-left:0px;
+}
+.srt-menu a {
+ display: block;
+ position: relative;
+}
+.srt-menu li:hover ul,
+.srt-menu li.sfHover ul {
+ display:block;
+ left: 0;
+ top: 45px; /* match top ul list item height */
+ z-index: 99;
+ -webkit-box-shadow: 2px 3px 2px 0px rgba(00, 00, 00, .3);
+ box-shadow: 2px 3px 2px 0px rgba(00, 00, 00, .3);
+}
+ul.srt-menu li:hover li ul,
+ul.srt-menu li.sfHover li ul {
+ top: -999em;
+}
+ul.srt-menu li li:hover ul,
+ul.srt-menu li li.sfHover ul {
+ left: 12em; /* match ul width */
+ top: 0;
+}
+ul.srt-menu li li:hover li ul,
+ul.srt-menu li li.sfHover li ul {
+ top: -999em;
+}
+ul.srt-menu li li li:hover ul,
+ul.srt-menu li li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+
+/*** DEMO1 SKIN ***/
+#topnav, .srt-menu {
+ float:right;
+ margin: .35em 0 0 0;
+}
+.srt-menu a {
+ text-decoration:none;
+}
+.srt-menu li a {
+ background:#fff;
+ margin:0;
+ padding:10px 20px;
+ height:45px;
+}
+.srt-menu a, .srt-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
+ color: #0099ff;
+}
+.srt-menu li li a {
+ border-top: 1px solid rgba(255,255,255,.2);
+ background: #333; /*fallback for old IE*/
+ background:rgba(0,0,0,.6);
+ color: #fff;
+ padding-left:20px;
+ height:auto;
+}
+.srt-menu li li a:visited{color:#fff;}
+.srt-menu li li li a,
+.srt-menu li.active * li a{
+ padding-left:20px;
+ background:rgba(0,0,0,.6);
+}
+
+.srt-menu li:hover > a,
+.srt-menu li.active a{
+ color:#fff;
+ background:#0099ff;
+}
+.srt-menu li li:hover > a{
+ color:#fff;
+ background:#0099ff;
+}
+
+
+
+/*GRID*/
+/*
+ & Columns : 12
+
+ */
+ .row{
+ margin-left: -15px;
+ margin-right: -15px;
+}
+
+.grid_1 { width: 8.33333333%; }
+.grid_2 { width: 16.66666667%; }
+.grid_3 { width: 25%; }
+.grid_4 { width: 33.33333333%; }
+.grid_5 { width: 41.66666667%; }
+.grid_6 { width: 50%; }
+.grid_7 { width: 58.33333333%; }
+.grid_8 { width: 66.66666667%; }
+.grid_9 { width: 75%; }
+.grid_10 { width: 83.33333333%; }
+.grid_11 { width: 91.66666667%; }
+.grid_12 { width: 100%; }
+
+.grid_1,
+.grid_2,
+.grid_3,
+.grid_4,
+.grid_5,
+.grid_6,
+.grid_7,
+.grid_8,
+.grid_9,
+.grid_10,
+.grid_11,
+.grid_12 {
+ float: left;
+ display: block;
+}
+
+.rightfloat{float:right;}
+/* @notation inspired by tinyGrid, .row and percentage by Twitter Bootstrap
+ */
+
+#hero [class*="grid_"] { margin-bottom:-20px;}
+
+}
+
+/*
+DESKTOP
+This is the average viewing window. So Desktops, Laptops, and
+in general anyone not viewing on a mobile device. Here's where
+you can add resource intensive styles.
+*/
+@media only screen and (min-width: 1030px) {
+
+}
+
+/*
+LARGE VIEWING SIZE
+This is for the larger monitors and possibly full screen viewers.
+*/
+@media only screen and (min-width: 1240px) {
+
+}
+
+/*
+RETINA (2x RESOLUTION DEVICES)
+This applies to the retina iPhone (4s) and iPad (2,3) along with
+other displays with a 2x resolution.
+*/
+@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
+ only screen and (min--moz-device-pixel-ratio: 1.5),
+ only screen and (min-device-pixel-ratio: 1.5) {
+
+
+}
+
+/*
+iPHONE 5 MEDIA QUERY
+iPhone 5 or iPod Touch 5th generation styles (you can include your own file if you want)
+*/
+@media (device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) {
+
+
+}
+
+/*
+PRINT STYLESHEET
+*/
+@media print {
+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
+ a, a:visited { text-decoration: underline; }
+ a[href]:after { content: " (" attr(href) ")"; }
+ abbr[title]:after { content: " (" attr(title) ")"; }
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
+ thead { display: table-header-group; } /* h5bp.com/t */
+ tr, img { page-break-inside: avoid; }
+ img { max-width: 100% !important; }
+ @page { margin: 0.5cm; }
+ p, h2, h3 { orphans: 3; widows: 3; }
+ h2, h3 { page-break-after: avoid; }
}
\ No newline at end of file
diff --git a/cms/front_content.php b/cms/front_content.php
index d9686b8..5056912 100644
--- a/cms/front_content.php
+++ b/cms/front_content.php
@@ -102,21 +102,12 @@ if (!empty($contenido)) {
page_open(array('sess' => 'Contenido_Frontend_Session', 'auth' => 'Contenido_Frontend_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
}
-/**
- * Bugfix
- * @see http://contenido.org/forum/viewtopic.php?t=18291
- *
- * added by H. Librenz (2007-12-07)
- */
-//includePluginConf();
-/**
- * fixed bugfix - using functions brokes variable scopes!
- *
- * added by H. Librenz (2007-12-21) based on an idea of A. Lindner
- */
require_once $cfg['path']['contenido'] . $cfg['path']['includes'] . 'functions.includePluginConf.php';
-$db = new DB_Contenido;
+// Call hook after plugins are loaded, added by Murat Purc, 2008-09-07
+CEC_Hook::execute('Contenido.Frontend.AfterLoadPlugins');
+
+$db = new DB_ConLite();
$sess->register("cfgClient");
$sess->register("errsite_idcat");
@@ -654,7 +645,7 @@ if (empty($inUse) && (isset($allow) && $allow == true) && $view == "edit" && ($p
WHERE B.name = 'front_allow' AND C.name = 'str' AND A.user_id = '" . Contenido_Security::escapeDB($user_id, $db2) . "' AND A.idcat = '" . Contenido_Security::toInteger($idcat) . "'
AND A.idarea = C.idarea AND B.idaction = A.idaction";
- $db2 = new DB_Contenido;
+ $db2 = new DB_ConLite();
$db2->query($sql);
if ($db2->num_rows() > 0) {
@@ -854,5 +845,4 @@ if (isset($savedlang)) {
}
$db->disconnect();
-page_close();
-?>
\ No newline at end of file
+page_close();
\ No newline at end of file
diff --git a/cms/templates/cms_filelist_style_default.html b/cms/templates/cms_filelist_style_default.html
index 010eeeb..3949b8f 100644
--- a/cms/templates/cms_filelist_style_default.html
+++ b/cms/templates/cms_filelist_style_default.html
@@ -1,18 +1,18 @@
-
-
{TITLE}
-
-
-
-
{FILENAME} ({FILEEXTENSION})
-
{LABEL_FILESIZE} {FILESIZE} {FILESIZE_UNIT}
-
{LABEL_UPLOAD_DATE} {FILECREATIONDATE}
- {FILEMETA_DESCRIPTION}
-
-
+
+{TITLE}
+
+
+
+
{FILENAME} ({FILEEXTENSION})
+
{LABEL_FILESIZE} {FILESIZE} {FILESIZE_UNIT}
+
{LABEL_UPLOAD_DATE} {FILECREATIONDATE}
+ {FILEMETA_DESCRIPTION}
+
+
\ No newline at end of file
diff --git a/conlite/external/backendedit/front_content.php b/conlite/external/backendedit/front_content.php
index dd8d55c..4555113 100644
--- a/conlite/external/backendedit/front_content.php
+++ b/conlite/external/backendedit/front_content.php
@@ -1,4 +1,5 @@
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
- *
- * {@internal
- * created 2003-01-21
- * modified 2008-07-02, Frederic Schneider, add security fix and include class_security
- * modified 2008-08-29, Murat Purc, synchronised with /cms/front_content.php
- * modified 2008-11-18, Timo Trautmann: in backendeditmode also check if logged in backenduser has permission to view preview of page
- * modified 2009-04-16, OliverL, check return from Contenido.Frontend.HTMLCodeOutput
- * modified 2009-10-23, Murat Purc, removed deprecated function (PHP 5.3 ready)
- * modified 2009-12-31, Murat Purc, fixed/modified CEC_Hook, see [#CON-256]
- * modified 2010-05-20, Murat Purc, moved security checks into startup process, see [#CON-307]
- * modified 2010-09-23, Murat Purc, fixed $encoding handling, see [#CON-305]
- * modified 2011-02-07, Dominik Ziegler, added exit after redirections to force their execution
- * modified 2011-02-10, Dominik Ziegler, moved function declaration of IP_match out of front_content.php
- *
- * $Id$:
- * }}
- *
*/
-
if (!defined("CON_FRAMEWORK")) {
define("CON_FRAMEWORK", true);
}
-# Contenido startup process
-include_once ('../../includes/startup.php');
+$contenido_path = dirname(__FILE__, 3) . DIRECTORY_SEPARATOR;
+if (!is_file($contenido_path . 'includes/startup.php')) {
+ die("Fatal Error
Couldn't include ConLite startup.");
+}
+include_once($contenido_path . 'includes/startup.php');
rereadClients();
+$frontend_path = cRegistry::getClientConfig(cRegistry::getClientId())['path']['frontend'];
-# include the config file of the frontend to init the Client and Language Id
-include_once ($cfgClient[$client]["path"]["frontend"]."config.php");
-chdir($cfgClient[$client]["path"]["frontend"]);
+// Include the environment definer file
+include_once($frontend_path . 'environment.php');
+
+if (defined('CL_ENVIRONMENT')) {
+ include_once($frontend_path . 'data/config/' . CL_ENVIRONMENT . '/config.php');
+
+ if (file_exists($frontend_path . 'data/config/' . CL_ENVIRONMENT . '/config.local.php')) {
+ @include($frontend_path . 'data/config/' . CL_ENVIRONMENT . '/config.local.php');
+ }
+} else {
+ if (file_exists($frontend_path . 'config.php')) {
+ include_once($frontend_path . 'config.php');
+ }
+ if (file_exists($frontend_path . 'config.local.php')) {
+ include_once($frontend_path . 'config.local.php');
+ }
+}
cInclude("includes", "functions.con.php");
cInclude("includes", "functions.con2.php");
cInclude("includes", "functions.api.php");
cInclude("includes", "functions.pathresolver.php");
-if ($cfg["use_pseudocron"] == true)
-{
+if ($cfg["use_pseudocron"] == true) {
/* Include cronjob-Emulator */
$oldpwd = getcwd();
- chdir($cfg["path"]["contenido"].$cfg["path"]["cronjobs"]);
+ chdir($cfg["path"]["contenido"] . $cfg["path"]["cronjobs"]);
cInclude("includes", "pseudo-cron.inc.php");
chdir($oldpwd);
}
@@ -92,49 +92,48 @@ if ($cfg["use_pseudocron"] == true)
* PHPLIB application development toolkit
* @see http://sourceforge.net/projects/phplib
*/
-if ($contenido)
-{
+if (!empty($contenido)) {
//Backend
- page_open(array ('sess' => 'Contenido_Session', 'auth' => 'Contenido_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
- i18nInit($cfg["path"]["contenido"].$cfg["path"]["locale"], $belang);
-}
-else
-{
+ page_open(array('sess' => 'Contenido_Session', 'auth' => 'Contenido_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
+ i18nInit($cfg["path"]["contenido"] . $cfg["path"]["locale"], $belang);
+} else {
//Frontend
- page_open(array ('sess' => 'Contenido_Frontend_Session', 'auth' => 'Contenido_Frontend_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
+ page_open(array('sess' => 'Contenido_Frontend_Session', 'auth' => 'Contenido_Frontend_Challenge_Crypt_Auth', 'perm' => 'Contenido_Perm'));
}
-/**
- * Bugfix
- * @see http://contenido.org/forum/viewtopic.php?t=18291
- *
- * added by H. Librenz (2007-12-07)
- */
-//includePluginConf();
-/**
- * fixed bugfix - using functions brokes variable scopes!
- *
- * added by H. Librenz (2007-12-21) based on an idea of A. Lindner
- */
require_once $cfg['path']['contenido'] . $cfg['path']['includes'] . 'functions.includePluginConf.php';
// Call hook after plugins are loaded, added by Murat Purc, 2008-09-07
CEC_Hook::execute('Contenido.Frontend.AfterLoadPlugins');
-$db = new DB_ConLite;
+$db = new DB_ConLite();
$sess->register("cfgClient");
$sess->register("errsite_idcat");
$sess->register("errsite_idart");
$sess->register("encoding");
-if ($cfgClient["set"] != "set")
-{
+if (empty($cfgClient["set"]) || $cfgClient["set"] != "set") {
rereadClients();
}
-if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0)
-{
+# Check if this request is for a compressed file
+if (isset($_GET['action']) && $_GET['action'] == 'get_compressed') {
+ # Get the calling parameters
+ $sFilename = ((isset($_GET['f'])) ? $_GET['f'] : $_GET['amp;f']);
+ $sContentType = ((isset($_GET['c'])) ? $_GET['c'] : $_GET['amp;c']);
+
+ # Output the file using the class output() function
+ Output_Compressor::output($cfgClient[$client]['path']['frontend'] . 'cache/', $sFilename, $sContentType);
+
+ # Don't do anything else
+ exit();
+}
+
+// Call hook after plugins are loaded, added by Murat Purc, 2008-09-07
+CEC_Hook::execute('Contenido.Frontend.AfterLoadPlugins');
+
+if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0) {
// get encodings of all languages
$encoding = array();
$sql = "SELECT idlang, encoding FROM " . $cfg["tab"]["lang"];
@@ -149,27 +148,25 @@ if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0)
// @TODO: Should be outsourced into startup process but requires a better detection (frontend or backend)
Contenido_Security::checkFrontendGlobals();
-
// update urlbuilder set http base path
Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']);
-
// Initialize language
if (!isset($lang)) {
// if there is an entry load_lang in frontend/config.php use it, else use the first language of this client
- if(isset($load_lang)){
+ if (isset($load_lang)) {
// load_client is set in frontend/config.php
$lang = $load_lang;
- }else{
+ } else {
$sql = "SELECT
B.idlang
FROM
- ".$cfg["tab"]["clients_lang"]." AS A,
- ".$cfg["tab"]["lang"]." AS B
+ " . $cfg["tab"]["clients_lang"] . " AS A,
+ " . $cfg["tab"]["lang"] . " AS B
WHERE
- A.idclient='".Contenido_Security::toInteger($client)."' AND
+ A.idclient='" . Contenido_Security::toInteger($client) . "' AND
A.idlang = B.idlang
LIMIT
0,1";
@@ -181,11 +178,12 @@ if (!isset($lang)) {
}
}
-if (!$sess->is_registered("lang") ) $sess->register("lang");
-if (!$sess->is_registered("client") ) $sess->register("client");
+if (!$sess->is_registered("lang"))
+ $sess->register("lang");
+if (!$sess->is_registered("client"))
+ $sess->register("client");
-if (isset ($username))
-{
+if (isset($username)) {
$auth->login_if(true);
}
@@ -198,8 +196,7 @@ header("Content-Type: text/html; charset={$encoding[$lang]}");
* if http global logout is set e.g. front_content.php?logout=true
* log out the current user.
*/
-if (isset ($logout))
-{
+if (isset($logout)) {
$auth->logout(true);
$auth->unauth(true);
$auth->auth["uname"] = "nobody";
@@ -208,8 +205,7 @@ if (isset ($logout))
/*
* local configuration
*/
-if (file_exists("config.local.php"))
-{
+if (file_exists("config.local.php")) {
@ include ("config.local.php");
}
@@ -217,156 +213,124 @@ if (file_exists("config.local.php"))
* If the path variable was passed, try to resolve it to a Category Id
* e.g. front_content.php?path=/company/products/
*/
-if (isset($path) && strlen($path) > 1)
-{
+if (isset($path) && strlen($path) > 1) {
/* Which resolve method is configured? */
- if ($cfg["urlpathresolve"] == true)
- {
+ if ($cfg["urlpathresolve"] == true) {
$iLangCheck = 0;
$idcat = prResolvePathViaURLNames($path, $iLangCheck);
-
- }
- else
- {
+ } else {
$iLangCheck = 0;
$idcat = prResolvePathViaCategoryNames($path, $iLangCheck);
- if(($lang != $iLangCheck) && ((int)$iLangCheck != 0)){
+ if (($lang != $iLangCheck) && ((int) $iLangCheck != 0)) {
$lang = $iLangCheck;
}
-
}
}
// error page
-$aParams = array (
- 'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client],
- 'lang' => $lang, 'error'=> '1'
+$aParams = array(
+ 'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client],
+ 'lang' => $lang, 'error' => '1'
);
$errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
-
/*
* Try to initialize variables $idcat, $idart, $idcatart, $idartlang
* Note: These variables can be set via http globals e.g. front_content.php?idcat=41&idart=34&idcatart=35&idartlang=42
* If not the values will be computed.
*/
-if ($idart && !$idcat && !$idcatart)
-{
+if ($idart && !$idcat && !$idcatart) {
/* Try to fetch the first idcat */
- $sql = "SELECT idcat FROM ".$cfg["tab"]["cat_art"]." WHERE idart = '".Contenido_Security::toInteger($idart)."'";
+ $sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "'";
$db->query($sql);
- if ($db->next_record())
- {
+ if ($db->next_record()) {
$idcat = $db->f("idcat");
}
}
-unset ($code);
-unset ($markscript);
+unset($code);
+unset($markscript);
-if (!$idcatart)
-{
- if (!$idart)
- {
- if (!$idcat)
- {
+if (empty($idcatart)) {
+ if (empty($idart)) {
+ if (empty($idcat)) {
# Note: In earlier Contenido versions the information if an article is startarticle of a category has been stored
# in relation con_cat_art.
- if ($cfg["is_start_compatible"] == true)
- {
+ if ($cfg["is_start_compatible"] == true) {
$sql = "SELECT
idart,
B.idcat
FROM
- ".$cfg["tab"]["cat_art"]." AS A,
- ".$cfg["tab"]["cat_tree"]." AS B,
- ".$cfg["tab"]["cat"]." AS C
+ " . $cfg["tab"]["cat_art"] . " AS A,
+ " . $cfg["tab"]["cat_tree"] . " AS B,
+ " . $cfg["tab"]["cat"] . " AS C
WHERE
A.idcat=B.idcat AND
B.idcat=C.idcat AND
is_start='1' AND
- idclient='".Contenido_Security::toInteger($client)."'
+ idclient='" . Contenido_Security::toInteger($client) . "'
ORDER BY
idtree ASC";
- }
- else
- {
+ } else {
# Note: Now the information if an article is startarticle of a category is stored in relation con_cat_lang.
$sql = "SELECT
A.idart,
B.idcat
FROM
- ".$cfg["tab"]["cat_art"]." AS A,
- ".$cfg["tab"]["cat_tree"]." AS B,
- ".$cfg["tab"]["cat"]." AS C,
- ".$cfg["tab"]["cat_lang"]." AS D,
- ".$cfg["tab"]["art_lang"]." AS E
+ " . $cfg["tab"]["cat_art"] . " AS A,
+ " . $cfg["tab"]["cat_tree"] . " AS B,
+ " . $cfg["tab"]["cat"] . " AS C,
+ " . $cfg["tab"]["cat_lang"] . " AS D,
+ " . $cfg["tab"]["art_lang"] . " AS E
WHERE
A.idcat=B.idcat AND
B.idcat=C.idcat AND
D.startidartlang = E.idartlang AND
- D.idlang='".Contenido_Security::toInteger($lang)."' AND
+ D.idlang='" . Contenido_Security::toInteger($lang) . "' AND
E.idart=A.idart AND
- E.idlang='".Contenido_Security::toInteger($lang)."' AND
- idclient='".Contenido_Security::toInteger($client)."'
+ E.idlang='" . Contenido_Security::toInteger($lang) . "' AND
+ idclient='" . Contenido_Security::toInteger($client) . "'
ORDER BY
idtree ASC";
}
$db->query($sql);
- if ($db->next_record())
- {
+ if ($db->next_record()) {
$idart = $db->f("idart");
$idcat = $db->f("idcat");
- }
- else
- {
- if ($contenido)
- {
+ } else {
+ if (!empty($contenido)) {
cInclude("includes", "functions.i18n.php");
die(i18n("No start article for this category"));
- }
- else
- {
- if ($error == 1)
- {
- echo "Fatal error: Could not display error page. Error to display was: 'No start article in this category'";
- }
- else
- {
+ } else {
+ if ($error == 1) {
+ die("Fatal error: Could not display error page. Error to display was: 'No start article in this category'");
+ } else {
header($errsite);
- exit;
+ exit;
}
}
}
- }
- else
- {
+ } else {
$idart = -1;
- if ($cfg["is_start_compatible"] == true)
- {
- $sql = "SELECT idart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND is_start='1'";
+ if ($cfg["is_start_compatible"] == true) {
+ $sql = "SELECT idart FROM " . $cfg["tab"]["cat_art"] . " WHERE idcat='" . Contenido_Security::toInteger($idcat) . "' AND is_start='1'";
$db->query($sql);
- if ($db->next_record())
- {
+ if ($db->next_record()) {
$idart = $db->f("idart");
}
- }
- else
- {
- $sql = "SELECT startidartlang FROM ".$cfg["tab"]["cat_lang"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND idlang='".Contenido_Security::toInteger($lang)."'";
+ } else {
+ $sql = "SELECT startidartlang FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat='" . Contenido_Security::toInteger($idcat) . "' AND idlang='" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
- if ($db->next_record())
- {
- if ($db->f("startidartlang") != 0)
- {
- $sql = "SELECT idart FROM ".$cfg["tab"]["art_lang"]." WHERE idartlang='".Contenido_Security::toInteger($db->f("startidartlang"))."'";
+ if ($db->next_record()) {
+ if ($db->f("startidartlang") != 0) {
+ $sql = "SELECT idart FROM " . $cfg["tab"]["art_lang"] . " WHERE idartlang='" . Contenido_Security::toInteger($db->f("startidartlang")) . "'";
$db->query($sql);
$db->next_record();
$idart = $db->f("idart");
@@ -374,36 +338,26 @@ if (!$idcatart)
}
}
- if ($idart != -1)
- {
- }
- else
- {
+ if ($idart != -1) {
+
+ } else {
// error message in backend
- if ($contenido)
- {
+ if ($contenido) {
cInclude("includes", "functions.i18n.php");
die(i18n("No start article for this category"));
- }
- else
- {
- if ($error == 1)
- {
+ } else {
+ if ($error == 1) {
echo "Fatal error: Could not display error page. Error to display was: 'No start article in this category'";
- }
- else
- {
+ } else {
header($errsite);
- exit;
+ exit;
}
}
}
}
}
-}
-else
-{
- $sql = "SELECT idcat, idart FROM ".$cfg["tab"]["cat_art"]." WHERE idcatart='".Contenido_Security::toInteger($idcatart)."'";
+} else {
+ $sql = "SELECT idcat, idart FROM " . $cfg["tab"]["cat_art"] . " WHERE idcatart='" . Contenido_Security::toInteger($idcatart) . "'";
$db->query($sql);
$db->next_record();
@@ -413,9 +367,8 @@ else
}
/* Get idcatart */
-if (0 != $idart && 0 != $idcat)
-{
- $sql = "SELECT idcatart FROM ".$cfg["tab"]["cat_art"]." WHERE idart = '".Contenido_Security::toInteger($idart)."' AND idcat = '".Contenido_Security::toInteger($idcat)."'";
+if (0 != $idart && 0 != $idcat) {
+ $sql = "SELECT idcatart FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "' AND idcat = '" . Contenido_Security::toInteger($idcat) . "'";
$db->query($sql);
$db->next_record();
@@ -425,10 +378,9 @@ if (0 != $idart && 0 != $idcat)
$idartlang = getArtLang($idart, $lang);
-if ($idartlang === false)
-{
+if ($idartlang === false) {
header($errsite);
- exit;
+ exit;
}
/*
@@ -444,8 +396,6 @@ if ($cfg["cache"]["disable"] != '1') {
$oCacheHandler->start($iStartTime); // $iStartTime ist optional und ist die startzeit des scriptes, z. b. am anfang von fron_content.php
}
// END: concache
-
-
##############################################
# BACKEND / FRONTEND EDITING
##############################################
@@ -460,44 +410,39 @@ if ($cfg["cache"]["disable"] != '1') {
* The reason is to avoid cross-site scripting errors in the backend, if the backend domain differs from
* the frontend domain.
*/
-if ($contenido)
-{
+if ($contenido) {
$perm->load_permissions();
/* Change mode edit / view */
- if (isset ($changeview))
- {
+ if (isset($changeview)) {
$sess->register("view");
$view = $changeview;
}
$col = new InUseCollection;
- if ($overrideid != "" && $overridetype != "")
- {
+ if ($overrideid != "" && $overridetype != "") {
$col->removeItemMarks($overridetype, $overrideid);
}
/* Remove all own marks */
$col->removeSessionMarks($sess->id);
/* If the override flag is set, override a specific InUseItem */
- list ($inUse, $message) = $col->checkAndMark("article", $idartlang, true, i18n("Article is in use by %s (%s)"), true, $cfg['path']['contenido_fullhtml']."external/backendedit/front_content.php?changeview=edit&action=con_editart&idartlang=$idartlang&type=$type&typenr=$typenr&idart=$idart&idcat=$idcat&idcatart=$idcatart&client=$client&lang=$lang");
+ list ($inUse, $message) = $col->checkAndMark("article", $idartlang, true, i18n("Article is in use by %s (%s)"), true, $cfg['path']['contenido_fullhtml'] . "external/backendedit/front_content.php?changeview=edit&action=con_editart&idartlang=$idartlang&type=$type&typenr=$typenr&idart=$idart&idcat=$idcat&idcatart=$idcatart&client=$client&lang=$lang");
$sHtmlInUse = '';
$sHtmlInUseMessage = '';
- if ($inUse == true)
- {
+ if ($inUse == true) {
$disabled = 'disabled="disabled"';
- $sHtmlInUseCss = '';
+ $sHtmlInUseCss = '';
$sHtmlInUseMessage = $message;
}
- $sql = "SELECT locked FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
+ $sql = "SELECT locked FROM " . $cfg["tab"]["art_lang"] . " WHERE idart='" . Contenido_Security::toInteger($idart) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
$db->next_record();
$locked = $db->f("locked");
- if ($locked == 1)
- {
+ if ($locked == 1) {
$inUse = true;
$disabled = 'disabled="disabled"';
}
@@ -505,47 +450,40 @@ if ($contenido)
// CEC to check if the user has permission to edit articles in this category
CEC_Hook::setBreakCondition(false, true); // break at "false", default value "true"
$allow = CEC_Hook::executeWhileBreakCondition(
- 'Contenido.Frontend.AllowEdit', $lang, $idcat, $idart, $auth->auth['uid']
+ 'Contenido.Frontend.AllowEdit', $lang, $idcat, $idart, $auth->auth['uid']
);
- if ($perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat) && $inUse == false && $allow == true)
- {
+ if ($perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat) && $inUse == false && $allow == true) {
/* Create buttons for editing */
$edit_preview = '';
- if ($view == "edit")
- {
+ if ($view == "edit") {
$edit_preview = '
-
+
|
- Preview
+ Preview
|
';
- }
- else
- {
+ } else {
$edit_preview = '
-
+
|
- Edit
+ Edit
|
';
}
/* Display articles */
- if ($cfg["is_start_compatible"] == true)
- {
- $sql = "SELECT idart, is_start FROM ".$cfg["tab"]["cat_art"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' ORDER BY idart";
+ if ($cfg["is_start_compatible"] == true) {
+ $sql = "SELECT idart, is_start FROM " . $cfg["tab"]["cat_art"] . " WHERE idcat='" . Contenido_Security::toInteger($idcat) . "' ORDER BY idart";
$db->query($sql);
- }
- else
- {
- $sql = "SELECT idart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' ORDER BY idart";
+ } else {
+ $sql = "SELECT idart FROM " . $cfg["tab"]["cat_art"] . " WHERE idcat='" . Contenido_Security::toInteger($idcat) . "' ORDER BY idart";
$db->query($sql);
}
@@ -554,53 +492,41 @@ if ($contenido)
$edit_preview .= 'Articles in category: ';
- while ($db->next_record() && ($db->affected_rows() != 1))
- {
+ while ($db->next_record() && ($db->affected_rows() != 1)) {
$class = "font-family:'Verdana'; font-size:10; color:#000000; text-decoration: underline; font-weight:normal";
- if (!isset ($idart))
- {
- if (isStartArticle(getArtLang($idart, $lang), $idcat, $lang))
- {
+ if (!isset($idart)) {
+ if (isStartArticle(getArtLang($idart, $lang), $idcat, $lang)) {
$class = "font-family: verdana; font-size:10; color:#000000; text-decoration: underline ;font-weight:bold";
}
- }
- else
- {
- if ($idart == $db->f("idart"))
- {
+ } else {
+ if ($idart == $db->f("idart")) {
$class = "font-family: verdana; font-size:10; color:#000000; text-decoration: underline; font-weight:bold";
}
}
- $edit_preview .= "url("front_content.php?idart=".$db->f("idart")."&idcat=$idcat")."\">$a ";
- $a ++;
+ $edit_preview .= "url("front_content.php?idart=" . $db->f("idart") . "&idcat=$idcat") . "\">$a ";
+ $a++;
}
$edit_preview .= ' |
|
';
-
}
-
} // end if $contenido
/* If mode is 'edit' and user has permission to edit articles in the current category */
-if ($inUse == false && $allow == true && $view == "edit" && ($perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat)))
-{
+if (empty($inUse) && (isset($allow) && $allow == true) && $view == "edit" && ($perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat))) {
cInclude("includes", "functions.tpl.php");
cInclude("includes", "functions.con.php");
- include ($cfg["path"]["contenido"].$cfg["path"]["includes"]."include.con_editcontent.php");
-}
-else
-{
+ include ($cfg["path"]["contenido"] . $cfg["path"]["includes"] . "include.con_editcontent.php");
+} else {
##############################################
# FRONTEND VIEW
##############################################
/* Mark submenuitem 'Preview' in the Contenido Backend (Area: Contenido --> Articles --> Preview) */
- if ($contenido)
- {
+ if ($contenido) {
$markscript = markSubMenuItem(4, true);
}
@@ -610,10 +536,10 @@ else
$sql = "SELECT
createcode
FROM
- ".$cfg["tab"]["cat_art"]."
+ " . $cfg["tab"]["cat_art"] . "
WHERE
- idcat = '".Contenido_Security::toInteger($idcat)."' AND
- idart = '".Contenido_Security::toInteger($idart)."'";
+ idcat = '" . Contenido_Security::toInteger($idcat) . "' AND
+ idart = '" . Contenido_Security::toInteger($idart) . "'";
$db->query($sql);
$db->next_record();
@@ -623,47 +549,36 @@ else
##############################################
/* Check if code is expired, create new code if needed */
- if ($db->f("createcode") == 0 && $force == 0)
- {
- $sql = "SELECT code FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
+ if ($db->f("createcode") == 0 && $force == 0 && $cfg['dceModEdit']['use'] !== true && $cfg['dceLayEdit']['use'] !== true) {
+ $sql = "SELECT code FROM " . $cfg["tab"]["code"] . " WHERE idcatart = '" . Contenido_Security::toInteger($idcatart) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
- if ($db->num_rows() == 0)
- {
+ if ($db->num_rows() == 0) {
/* Include here for performance reasons */
cInclude("includes", "functions.tpl.php");
conGenerateCode($idcat, $idart, $lang, $client);
- $sql = "SELECT code FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
+ $sql = "SELECT code FROM " . $cfg["tab"]["code"] . " WHERE idcatart = '" . Contenido_Security::toInteger($idcatart) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
}
- if ($db->next_record())
- {
+ if ($db->next_record()) {
$code = stripslashes($db->f("code"));
- }
- else
- {
+ } else {
if ($contenido)
$code = "echo \"No code available.\";";
- else
- {
- if ($error == 1)
- {
+ else {
+ if ($error == 1) {
echo "Fatal error: Could not display error page. Error to display was: 'No code available'";
- }
- else
- {
+ } else {
header($errsite);
- exit;
+ exit;
}
}
}
- }
- else
- {
- $sql = "DELETE FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."'";
+ } else {
+ $sql = "DELETE FROM " . $cfg["tab"]["code"] . " WHERE idcatart = '" . Contenido_Security::toInteger($idcatart) . "'";
$db->query($sql);
cInclude("includes", "functions.con.php");
@@ -672,7 +587,7 @@ else
conGenerateCode($idcat, $idart, $lang, $client);
- $sql = "SELECT code FROM ".$cfg["tab"]["code"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
+ $sql = "SELECT code FROM " . $cfg["tab"]["code"] . " WHERE idcatart = '" . Contenido_Security::toInteger($idcatart) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
$db->next_record();
@@ -681,16 +596,18 @@ else
}
/* Add mark Script to code if user is in the backend */
+ if(!empty($markscript)) {
$code = preg_replace("/<\/head>/i", "$markscript\n", $code, 1);
+ }
/* If article is in use, display notification */
- if ($sHtmlInUseCss && $sHtmlInUseMessage) {
+ if (!empty($sHtmlInUseCss) && !empty($sHtmlInUseMessage)) {
$code = preg_replace("/<\/head>/i", "$sHtmlInUseCss\n", $code, 1);
$code = preg_replace("/(]*)>/i", "\${1}> \n $sHtmlInUseMessage", $code, 1);
}
/* Check if category is public */
- $sql = "SELECT public FROM ".$cfg["tab"]["cat_lang"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND idlang='".Contenido_Security::toInteger($lang)."'";
+ $sql = "SELECT public FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat='" . Contenido_Security::toInteger($idcat) . "' AND idlang='" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
$db->next_record();
@@ -700,80 +617,68 @@ else
##############################################
# protected categories
##############################################
- if ($public == 0)
- {
- if ($auth->auth["uid"] == "nobody")
- {
- $sql = "SELECT user_id, value FROM ".$cfg["tab"]["user_prop"]." WHERE type='frontend' and name='allowed_ip'";
+ if ($public == 0) {
+ if ($auth->auth["uid"] == "nobody") {
+ $sql = "SELECT user_id, value FROM " . $cfg["tab"]["user_prop"] . " WHERE type='frontend' and name='allowed_ip'";
$db->query($sql);
- while ($db->next_record())
- {
+ while ($db->next_record()) {
$user_id = $db->f("user_id");
$range = urldecode($db->f("value"));
$slash = strpos($range, "/");
- if ($slash == false)
- {
+ if ($slash == false) {
$netmask = "255.255.255.255";
$network = $range;
- }
- else
- {
+ } else {
$network = substr($range, 0, $slash);
- $netmask = substr($range, $slash +1, strlen($range) - $slash -1);
+ $netmask = substr($range, $slash + 1, strlen($range) - $slash - 1);
}
- if (IP_match($network, $netmask, $_SERVER["REMOTE_ADDR"]))
- {
+ if (IP_match($network, $netmask, $_SERVER["REMOTE_ADDR"])) {
$sql = "SELECT idright
- FROM ".$cfg["tab"]["rights"]." AS A,
- ".$cfg["tab"]["actions"]." AS B,
- ".$cfg["tab"]["area"]." AS C
- WHERE B.name = 'front_allow' AND C.name = 'str' AND A.user_id = '".Contenido_Security::escapeDB($user_id, $db2)."' AND A.idcat = '".Contenido_Security::toInteger($idcat)."'
+ FROM " . $cfg["tab"]["rights"] . " AS A,
+ " . $cfg["tab"]["actions"] . " AS B,
+ " . $cfg["tab"]["area"] . " AS C
+ WHERE B.name = 'front_allow' AND C.name = 'str' AND A.user_id = '" . Contenido_Security::escapeDB($user_id, $db2) . "' AND A.idcat = '" . Contenido_Security::toInteger($idcat) . "'
AND A.idarea = C.idarea AND B.idaction = A.idaction";
$db2 = new DB_ConLite;
$db2->query($sql);
- if ($db2->num_rows() > 0)
- {
+ if ($db2->num_rows() > 0) {
$auth->auth["uid"] = $user_id;
$validated = 1;
}
}
}
- if ($validated != 1)
- {
+ if ($validated != 1) {
// CEC to check category access
CEC_Hook::setBreakCondition(true, false); // break at "true", default value "false"
$allow = CEC_Hook::executeWhileBreakCondition(
- 'Contenido.Frontend.CategoryAccess', $lang, $idcat, $auth->auth['uid']
+ 'Contenido.Frontend.CategoryAccess', $lang, $idcat, $auth->auth['uid']
);
$auth->login_if(!$allow);
}
- }
- else
- {
+ } else {
// CEC to check category access
CEC_Hook::setBreakCondition(true, false); // break at "true", default value "false"
$allow = CEC_Hook::executeWhileBreakCondition(
- 'Contenido.Frontend.CategoryAccess', $lang, $idcat, $auth->auth['uid']
+ 'Contenido.Frontend.CategoryAccess', $lang, $idcat, $auth->auth['uid']
);
/*
- added 2008-11-18 Timo Trautmann
- in backendeditmode also check if logged in backenduser has permission to view preview of page
- */
+ added 2008-11-18 Timo Trautmann
+ in backendeditmode also check if logged in backenduser has permission to view preview of page
+ */
if ($allow == false && $contenido && $perm->have_perm_area_action_item("con_editcontent", "con_editart", $idcat)) {
$allow = true;
}
- if (!$allow)
- {
+ if (!$allow) {
header($errsite);
- exit;
+ exit;
}
}
}
@@ -781,47 +686,24 @@ else
##############################################
# statistic
##############################################
- /* Sanity: If the statistic table doesn't contain an entry, create one */
- $sql = "SELECT idcatart FROM ".$cfg["tab"]["stat"]." WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idlang='".Contenido_Security::toInteger($lang)."'";
- $db->query($sql);
-
- if ($db->next_record())
- {
- /* Update the statistics. */
- $sql = "UPDATE ".$cfg["tab"]["stat"]." SET visited = visited + 1 WHERE idcatart = '".Contenido_Security::toInteger($idcatart)."' AND idclient = '".Contenido_Security::toInteger($client)."'
- AND idlang = '".Contenido_Security::toInteger($lang)."'";
- $db->query($sql);
- }
- else
- {
- /* Insert new record */
- $next = $db->nextid($cfg["tab"]["stat"]);
- $sql = "INSERT INTO ".$cfg["tab"]["stat"]." (visited, idcatart, idlang, idstat, idclient) VALUES ('1', '".Contenido_Security::toInteger($idcatart)."', '".Contenido_Security::toInteger($lang)."',
- '".Contenido_Security::toInteger($next)."', '".Contenido_Security::toInteger($client)."')";
- $db->query($sql);
- }
+ $oStatCol = new cApiStatCollection();
+ $oStatCol->trackView($idcatart);
/*
* Check if an article is start article of the category
*/
- if ($cfg["is_start_compatible"] == true)
- {
- $sql = "SELECT is_start FROM ".$cfg["tab"]["cat_art"]." WHERE idcatart='".Contenido_Security::toInteger($idcatart)."'";
+ if ($cfg["is_start_compatible"] == true) {
+ $sql = "SELECT is_start FROM " . $cfg["tab"]["cat_art"] . " WHERE idcatart='" . Contenido_Security::toInteger($idcatart) . "'";
$db->query($sql);
$db->next_record();
$isstart = $db->f("is_start");
- }
- else
- {
- $sql = "SELECT startidartlang FROM ".$cfg["tab"]["cat_lang"]." WHERE idcat='".Contenido_Security::toInteger($idcat)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
+ } else {
+ $sql = "SELECT startidartlang FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat='" . Contenido_Security::toInteger($idcat) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
$db->next_record();
- if ($db->f("idartlang") == $idartlang)
- {
+ if ($db->f("idartlang") == $idartlang) {
$isstart = 1;
- }
- else
- {
+ } else {
$isstart = 0;
}
}
@@ -829,18 +711,15 @@ else
##############################################
# time management
##############################################
- $sql = "SELECT timemgmt FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
+ $sql = "SELECT timemgmt FROM " . $cfg["tab"]["art_lang"] . " WHERE idart='" . Contenido_Security::toInteger($idart) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
$db->next_record();
- if (($db->f("timemgmt") == "1") && ($isstart != 1))
- {
- $sql = "SELECT online, redirect, redirect_url FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'
+ if (($db->f("timemgmt") == "1") && ($isstart != 1)) {
+ $sql = "SELECT online, redirect, redirect_url FROM " . $cfg["tab"]["art_lang"] . " WHERE idart='" . Contenido_Security::toInteger($idart) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'
AND NOW() > datestart AND NOW() < dateend";
- }
- else
- {
- $sql = "SELECT online, redirect, redirect_url FROM ".$cfg["tab"]["art_lang"]." WHERE idart='".Contenido_Security::toInteger($idart)."' AND idlang = '".Contenido_Security::toInteger($lang)."'";
+ } else {
+ $sql = "SELECT online, redirect, redirect_url FROM " . $cfg["tab"]["art_lang"] . " WHERE idart='" . Contenido_Security::toInteger($idart) . "' AND idlang = '" . Contenido_Security::toInteger($lang) . "'";
}
$db->query($sql);
@@ -850,15 +729,14 @@ else
$redirect = $db->f("redirect");
$redirect_url = $db->f("redirect_url");
- @ eval ("\$"."redirect_url = \"$redirect_url\";"); // transform variables
+ @ eval("\$" . "redirect_url = \"$redirect_url\";"); // transform variables
$insert_base = getEffectiveSetting('generator', 'basehref', "true");
/*
* generate base url
*/
- if ($insert_base == "true")
- {
+ if ($insert_base == "true") {
$is_XHTML = getEffectiveSetting('generator', 'xhtml', "false");
$str_base_uri = $cfgClient[$client]["path"]["htmlpath"];
@@ -867,21 +745,19 @@ else
$str_base_uri = CEC_Hook::executeAndReturn('Contenido.Frontend.BaseHrefGeneration', $str_base_uri);
if ($is_XHTML == "true") {
- $baseCode = '';
+ $baseCode = '';
} else {
- $baseCode = '';
+ $baseCode = '';
}
- $code = str_ireplace_once("", "\n".$baseCode, $code);
+ $code = str_ireplace_once("", "\n" . $baseCode, $code);
}
/*
* Handle online (offline) articles
*/
- if ($online)
- {
- if ($redirect == '1' && $redirect_url != '')
- {
+ if ($online) {
+ if ($redirect == '1' && $redirect_url != '') {
page_close();
/*
* Redirect to the URL defined in article properties
@@ -897,12 +773,9 @@ else
}
header("Location: $redirect_url");
exit;
- }
- else
- {
- if ($cfg["debug"]["codeoutput"])
- {
- echo "";
+ } else {
+ if ($cfg["debug"]["codeoutput"]) {
+ echo "";
}
/*
@@ -913,40 +786,34 @@ else
$aExclude = explode(',', getEffectiveSetting('frontend.no_outputbuffer', 'idart', ''));
if (in_array(Contenido_Security::toInteger($idart), $aExclude)) {
- eval ("?>\n".$code."\n\n" . $code . "\n\n".$code."\n\n" . $code . "\n\n".$code."\n\n" . $code . "\n
+$db->disconnect();
+page_close();
\ No newline at end of file
diff --git a/conlite/includes/functions.file.php b/conlite/includes/functions.file.php
index 40877fe..85f2c18 100644
--- a/conlite/includes/functions.file.php
+++ b/conlite/includes/functions.file.php
@@ -210,7 +210,8 @@ function fileEdit($filename, $sCode, $path) {
if (is_writable($path . $filename)) {
if (strlen(stripslashes(trim($sCode))) > 0) {
if (!empty($sCode)) {
- $sCode = mb_convert_encoding($sCode, 'UTF-8', 'OLD-ENCODING');
+ mb_detect_encoding($sCode);
+ $sCode = mb_convert_encoding($sCode, 'UTF-8',mb_detect_encoding($sCode));
}
cFileHandler::write($path . $filename, $sCode);
return true;
@@ -235,7 +236,8 @@ function fileEdit($filename, $sCode, $path) {
function getFileContent($filename, $path) {
$sCode = cFileHandler::read($path . $filename);
if (!empty($sCode)) {
- $sCode = mb_convert_encoding($sCode, 'UTF-8', 'OLD-ENCODING');
+ mb_detect_encoding($sCode);
+ $sCode = mb_convert_encoding($sCode, 'UTF-8', mb_detect_encoding($sCode));
}
return $sCode;
}
diff --git a/conlite/includes/include.frontend.group_edit.php b/conlite/includes/include.frontend.group_edit.php
index 8757fe8..6ca9801 100644
--- a/conlite/includes/include.frontend.group_edit.php
+++ b/conlite/includes/include.frontend.group_edit.php
@@ -158,7 +158,7 @@ if ($fegroup->virgin == false && $fegroup->get("idclient") == $client)
$fegroup->store();
}
- if (count($messages) > 0)
+ if (is_array($messages) && count($messages) > 0)
{
$notis = $notification->returnNotification("warning", implode("
", $messages)) . "
";
}
diff --git a/conlite/includes/include.frontend.group_rights.php b/conlite/includes/include.frontend.group_rights.php
index 45f93ef..e0e822a 100644
--- a/conlite/includes/include.frontend.group_rights.php
+++ b/conlite/includes/include.frontend.group_rights.php
@@ -1,4 +1,5 @@
setContent(i18n("Invalid plugin"));
-
+if (!in_array($useplugin, $cfg['plugins']['frontendlogic'])) {
+ $page->setContent(i18n("Invalid plugin"));
} else {
- cInclude("plugins", "frontendlogic/$useplugin/".$useplugin.".php");
+ cInclude("plugins", "frontendlogic/$useplugin/" . $useplugin . ".php");
- $className = "frontendlogic_".$useplugin;
- $class = new $className;
- $perms = new FrontendPermissionCollection;
+ $className = "frontendlogic_" . $useplugin;
+ $class = new $className;
+ $perms = new FrontendPermissionCollection;
+ $rights = new UI_Table_Form("rights");
+ $rights->setVar("area", $area);
+ $rights->setVar("frame", $frame);
+ $rights->setVar("useplugin", $useplugin);
+ $rights->setVar("idfrontendgroup", $idfrontendgroup);
+ $rights->setVar("action", "fegroups_save_perm");
- $rights = new UI_Table_Form("rights");
- $rights->setVar("area", $area);
- $rights->setVar("frame", $frame);
- $rights->setVar("useplugin", $useplugin);
- $rights->setVar("idfrontendgroup", $idfrontendgroup);
- $rights->setVar("action", "fegroups_save_perm");
+ $actions = $class->listActions();
+ $items = $class->listItems();
- $actions = $class->listActions();
- $items = $class->listItems();
+ if ($action == "fegroups_save_perm") {
+ $myitems = $items;
+ $myitems["__GLOBAL__"] = "__GLOBAL__";
- if ($action == "fegroups_save_perm")
- {
- $myitems = $items;
- $myitems["__GLOBAL__"] = "__GLOBAL__";
+ foreach ($actions as $action => $text) {
+ foreach ($myitems as $item => $text) {
- foreach ($actions as $action => $text)
- {
- foreach ($myitems as $item => $text)
- {
+ if ($item === "__GLOBAL__") {
+ $varname = "action_$action";
+ } else {
+ $varname = "item_" . $item . "_$action";
+ }
- if ($item === "__GLOBAL__")
- {
- $varname = "action_$action";
- } else {
- $varname = "item_".$item."_$action";
- }
-
- if ($_POST[$varname] == 1)
- {
- $perms->setPerm($idfrontendgroup, $useplugin, $action, $item);
- } else {
- $perms->removePerm($idfrontendgroup, $useplugin, $action, $item);
- }
- }
- }
-
- }
-
- $rights->addHeader(sprintf(i18n("Permissions for plugin '%s'"), $class->getFriendlyName()));
-
- foreach ($actions as $key => $action)
- {
- $check[$key] = new cHTMLCheckbox("action_$key", 1);
- $check[$key]->setLabelText($action." ".i18n("(All)"));
-
- if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, "__GLOBAL__"))
- {
- $check[$key]->setChecked(true);
- }
- }
-
- $rights->add(i18n("Global rights"), $check);
-
- foreach ($actions as $key => $action)
- {
- unset($check);
-
- if (count($items) > 0)
- {
- foreach ($items as $item => $value)
- {
- $check[$item] = new cHTMLCheckbox("item_".$item."_".$key, 1);
- $check[$item]->setLabelText($value);
-
- if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, $item))
- {
- $check[$item]->setChecked(true);
- }
-
- }
-
- $rights->add($action, $check);
- } else {
- $rights->add($action, i18n("No items found"));
- }
+ if ($_POST[$varname] == 1) {
+ $perms->setPerm($idfrontendgroup, $useplugin, $action, $item);
+ } else {
+ $perms->removePerm($idfrontendgroup, $useplugin, $action, $item);
+ }
+ }
+ }
}
- $page->setContent($rights->render());
+ $rights->addHeader(sprintf(i18n("Permissions for plugin '%s'"), $class->getFriendlyName()));
+
+ foreach ($actions as $key => $action) {
+ $check[$key] = new cHTMLCheckbox("action_$key", 1);
+ $check[$key]->setLabelText($action . " " . i18n("(All)"));
+
+ if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, "__GLOBAL__")) {
+ $check[$key]->setChecked(true);
+ }
+ }
+
+ $rights->add(i18n("Global rights"), $check);
+
+ foreach ($actions as $key => $action) {
+ unset($check);
+
+ if (is_array($items) && count($items) > 0) {
+ foreach ($items as $item => $value) {
+ $check[$item] = new cHTMLCheckbox("item_" . $item . "_" . $key, 1);
+ $check[$item]->setLabelText($value);
+
+ if ($perms->checkPerm($idfrontendgroup, $useplugin, $key, $item)) {
+ $check[$item]->setChecked(true);
+ }
+ }
+
+ $rights->add($action, $check);
+ } else {
+ $rights->add($action, i18n("No items found"));
+ }
+ }
+
+ $page->setContent($rights->render());
}
-$page->render();
-?>
\ No newline at end of file
+$page->render();
\ No newline at end of file
diff --git a/conlite/includes/include.frontend.user_edit.php b/conlite/includes/include.frontend.user_edit.php
index 468c52a..7381b9a 100644
--- a/conlite/includes/include.frontend.user_edit.php
+++ b/conlite/includes/include.frontend.user_edit.php
@@ -162,7 +162,7 @@ if ($oFeUser->virgin == false && $oFeUser->get("idclient") == $client) {
if($bStore) $oFeUser->store();
}
- if (count($messages) > 0) {
+ if (is_array($messages) && count($messages) > 0) {
$notis = $notification->returnNotification("warning", implode("
", $messages)) . "
";
}
diff --git a/conlite/includes/include.lay_edit_form.php b/conlite/includes/include.lay_edit_form.php
index 208ce06..42c65cb 100644
--- a/conlite/includes/include.lay_edit_form.php
+++ b/conlite/includes/include.lay_edit_form.php
@@ -107,7 +107,7 @@ if (!$layout->virgin) {
}
$types = array_unique($types);
- if (version_compare(PHP_VERSION, '8.0.0', '>=')) {
+ if (version_compare(PHP_VERSION, '7.4.0', '>=')) {
$layout->setProperty("layout", "used-types", implode(";", $types));
} else {
$layout->setProperty("layout", "used-types", implode($types, ";"));