Einchecken des OnlineStands
677
administrator/css/cs_l1.css
Normal file
@@ -0,0 +1,677 @@
|
||||
body
|
||||
{
|
||||
position : relative;
|
||||
margin : 0px auto;
|
||||
font-family : verdana;
|
||||
font-size : 10px;
|
||||
height : 100%;
|
||||
}
|
||||
input , select , textarea
|
||||
{
|
||||
font-family : verdana;
|
||||
font-size : .625rem;
|
||||
line-height : 1rem;
|
||||
}
|
||||
b , strong
|
||||
{
|
||||
font-weight : bold;
|
||||
}
|
||||
.grid_1col
|
||||
{
|
||||
width : 24px;
|
||||
}
|
||||
.grid_2col
|
||||
{
|
||||
width : 48px;
|
||||
}
|
||||
.grid_3col
|
||||
{
|
||||
width : 72px;
|
||||
}
|
||||
.grid_4col
|
||||
{
|
||||
width : 96px;
|
||||
}
|
||||
.grid_5col
|
||||
{
|
||||
width : 120px;
|
||||
}
|
||||
.grid_6col
|
||||
{
|
||||
width : 144px;
|
||||
}
|
||||
.grid_7col
|
||||
{
|
||||
width : 168px;
|
||||
}
|
||||
.grid_8col
|
||||
{
|
||||
width : 192px;
|
||||
}
|
||||
.grid_9col
|
||||
{
|
||||
width : 216px;
|
||||
}
|
||||
.grid_10col
|
||||
{
|
||||
width : 240px;
|
||||
}
|
||||
.grid_11col
|
||||
{
|
||||
width : 264px;
|
||||
}
|
||||
.grid_12col
|
||||
{
|
||||
width : 288px;
|
||||
}
|
||||
.grid_13col
|
||||
{
|
||||
width : 312px;
|
||||
}
|
||||
.grid_14col
|
||||
{
|
||||
width : 336px;
|
||||
}
|
||||
.grid_15col
|
||||
{
|
||||
width : 360px;
|
||||
}
|
||||
.grid_16col
|
||||
{
|
||||
width : 384px;
|
||||
}
|
||||
.grid_17col
|
||||
{
|
||||
width : 408px;
|
||||
}
|
||||
.grid_18col
|
||||
{
|
||||
width : 432px;
|
||||
}
|
||||
.grid_19col
|
||||
{
|
||||
width : 456px;
|
||||
}
|
||||
.grid_20col
|
||||
{
|
||||
width : 480px;
|
||||
}
|
||||
.grid_21col
|
||||
{
|
||||
width : 504px;
|
||||
}
|
||||
.grid_22col
|
||||
{
|
||||
width : 528px;
|
||||
}
|
||||
.grid_23col
|
||||
{
|
||||
width : 552px;
|
||||
}
|
||||
.grid_24col
|
||||
{
|
||||
width : 576px;
|
||||
}
|
||||
.grid_25col
|
||||
{
|
||||
width : 600px;
|
||||
}
|
||||
.grid_26col
|
||||
{
|
||||
width : 624px;
|
||||
}
|
||||
.grid_27col
|
||||
{
|
||||
width : 648px;
|
||||
}
|
||||
.grid_28col
|
||||
{
|
||||
width : 672px;
|
||||
}
|
||||
.grid_29col
|
||||
{
|
||||
width : 696px;
|
||||
}
|
||||
.grid_30col
|
||||
{
|
||||
width : 720px;
|
||||
}
|
||||
.grid_31col
|
||||
{
|
||||
width : 744px;
|
||||
}
|
||||
.grid_32col
|
||||
{
|
||||
width : 768px;
|
||||
}
|
||||
.grid_33col
|
||||
{
|
||||
width : 792px;
|
||||
}
|
||||
.grid_34col
|
||||
{
|
||||
width : 816px;
|
||||
}
|
||||
.grid_35col
|
||||
{
|
||||
width : 840px;
|
||||
}
|
||||
.grid_36col
|
||||
{
|
||||
width : 864px;
|
||||
}
|
||||
.grid_37col
|
||||
{
|
||||
width : 888px;
|
||||
}
|
||||
.grid_38col
|
||||
{
|
||||
width : 912px;
|
||||
}
|
||||
.grid_39col
|
||||
{
|
||||
width : 936px;
|
||||
}
|
||||
.grid_40col
|
||||
{
|
||||
width : 960px;
|
||||
}
|
||||
.grid_41col
|
||||
{
|
||||
width : 984px;
|
||||
}
|
||||
.grid_42col
|
||||
{
|
||||
width : 1008px;
|
||||
}
|
||||
.grid_43col
|
||||
{
|
||||
width : 1032px;
|
||||
}
|
||||
.grid_44col
|
||||
{
|
||||
width : 1056px;
|
||||
clear : both;
|
||||
}
|
||||
.grid_1col ,
|
||||
.grid_2col ,
|
||||
.grid_3col ,
|
||||
.grid_4col ,
|
||||
.grid_5col ,
|
||||
.grid_6col ,
|
||||
.grid_7col ,
|
||||
.grid_8col ,
|
||||
.grid_9col ,
|
||||
.grid_10col ,
|
||||
.grid_11col ,
|
||||
.grid_12col ,
|
||||
.grid_13col ,
|
||||
.grid_14col ,
|
||||
.grid_15col ,
|
||||
.grid_16col ,
|
||||
.grid_17col ,
|
||||
.grid_18col ,
|
||||
.grid_19col ,
|
||||
.grid_20col ,
|
||||
.grid_21col ,
|
||||
.grid_22col ,
|
||||
.grid_23col ,
|
||||
.grid_24col ,
|
||||
.grid_25col ,
|
||||
.grid_26col ,
|
||||
.grid_27col ,
|
||||
.grid_28col ,
|
||||
.grid_29col ,
|
||||
.grid_30col ,
|
||||
.grid_31col ,
|
||||
.grid_32col ,
|
||||
.grid_33col ,
|
||||
.grid_34col ,
|
||||
.grid_35col ,
|
||||
.grid_36col ,
|
||||
.grid_37col ,
|
||||
.grid_38col ,
|
||||
.grid_39col ,
|
||||
.grid_40col ,
|
||||
.grid_41col ,
|
||||
.grid_42col ,
|
||||
.grid_43col
|
||||
{
|
||||
float : left;
|
||||
display : inline-block;
|
||||
min-height : 1px;
|
||||
}
|
||||
.spacer
|
||||
{
|
||||
height : 12px;
|
||||
}
|
||||
.white
|
||||
{
|
||||
color : #ffffff;
|
||||
}
|
||||
.inverted
|
||||
{
|
||||
background-color : rgba( 255 , 255 , 255 , .8 );
|
||||
color : black;
|
||||
}
|
||||
.fix
|
||||
{
|
||||
clear : both;
|
||||
}
|
||||
.error
|
||||
{
|
||||
margin-bottom : 12px;
|
||||
color : #e3000b;
|
||||
}
|
||||
.tbl_head
|
||||
{
|
||||
line-height : 24px;
|
||||
min-height : 25px;
|
||||
background-color : #000000;
|
||||
color : #ffffff;
|
||||
padding-left : 12px;
|
||||
font-weight : bold;
|
||||
border-bottom : 1px solid #ffffff;
|
||||
border-left : 1px solid #ffffff;
|
||||
}
|
||||
.tbl_head img
|
||||
{
|
||||
float : left;
|
||||
}
|
||||
.tbl_sub
|
||||
{
|
||||
line-height : 24px;
|
||||
min-height : 25px;
|
||||
background-color : #cccccc;
|
||||
color : #000000;
|
||||
padding-left : 12px;
|
||||
font-weight : bold;
|
||||
}
|
||||
.tbl_cell
|
||||
{
|
||||
line-height : 24px;
|
||||
min-height : 25px;
|
||||
}
|
||||
.tbl_cell.highlight
|
||||
{
|
||||
line-height : 24px;
|
||||
min-height : 25px;
|
||||
background-color : #cccccc;
|
||||
color : #000000;
|
||||
padding-left : 12px;
|
||||
border-bottom : 1px solid #ffffff;
|
||||
border-left : 1px solid #ffffff;
|
||||
}
|
||||
.clickable .tbl_cell
|
||||
{
|
||||
cursor : pointer;
|
||||
}
|
||||
.main_row:hover .tbl_cell
|
||||
{
|
||||
background-color : #000000;
|
||||
color : #ffffff;
|
||||
}
|
||||
.hidden_row
|
||||
{
|
||||
display : none;
|
||||
}
|
||||
.left
|
||||
{
|
||||
text-align : left;
|
||||
}
|
||||
.right
|
||||
{
|
||||
text-align : right;
|
||||
}
|
||||
.data_inactive .main_row
|
||||
{
|
||||
font-style : italic;
|
||||
}
|
||||
.data_active .activate
|
||||
{
|
||||
display : none;
|
||||
}
|
||||
.data_inactive .deactivate
|
||||
{
|
||||
display : none;
|
||||
}
|
||||
.box
|
||||
{
|
||||
border : 1px solid #cccccc;
|
||||
padding : 12px 0px;
|
||||
max-height : 240px;
|
||||
overflow-y : auto;
|
||||
}
|
||||
.box input[type=checkbox]
|
||||
{
|
||||
margin-top : 0px;
|
||||
}
|
||||
.box label
|
||||
{
|
||||
top : 0px;
|
||||
}
|
||||
.box li
|
||||
{
|
||||
padding-left : 18px;
|
||||
position : relative;
|
||||
}
|
||||
.box li:before
|
||||
{
|
||||
content : ' ';
|
||||
display : -inline-block;
|
||||
width : 16px;
|
||||
height : 16px;
|
||||
float : left;
|
||||
}
|
||||
.box li.hasChild:before
|
||||
{
|
||||
content : '+';
|
||||
cursor : pointer;
|
||||
}
|
||||
.box li.showChild:before
|
||||
{
|
||||
content : '-';
|
||||
cursor : pointer;
|
||||
}
|
||||
.level_1
|
||||
{
|
||||
margin-left : 24px;
|
||||
}
|
||||
.hint
|
||||
{
|
||||
padding : 12px 0px;
|
||||
}
|
||||
.full div
|
||||
{
|
||||
width : 100%;
|
||||
}
|
||||
.half div
|
||||
{
|
||||
width : 50%;
|
||||
}
|
||||
.half div.left
|
||||
{
|
||||
padding-right : 24px;
|
||||
}
|
||||
div.full , .full
|
||||
{
|
||||
width : 100%;
|
||||
}
|
||||
#popup_layer
|
||||
{
|
||||
position : fixed;
|
||||
top : 1%;
|
||||
height : 98%;
|
||||
border : 1px solid #000000;
|
||||
z-index : 999;
|
||||
background-color : rgba( 255 , 255 , 255 , 1.0 );
|
||||
box-shadow : 4px 4px 2px #cccccc;
|
||||
padding-bottom : 48px;
|
||||
}
|
||||
#popup_header
|
||||
{
|
||||
height : 36px;
|
||||
background-color : #000000;
|
||||
position : absolute;
|
||||
z-index : 999;
|
||||
}
|
||||
#popup_title
|
||||
{
|
||||
height : 36px;
|
||||
line-height : 36px;
|
||||
color : #ffffff;
|
||||
font-size : 1.25rem;
|
||||
font-weight : bold;
|
||||
}
|
||||
#popup_layer_close
|
||||
{
|
||||
margin : 6px 0px;
|
||||
cursor : pointer;
|
||||
}
|
||||
#popup_frame
|
||||
{
|
||||
position : absolute;
|
||||
top : 0px;
|
||||
left : 0px;
|
||||
height : 100%;
|
||||
padding-top : 36px;
|
||||
padding-right : 2px;
|
||||
padding-left : 48px;
|
||||
z-index : 1;
|
||||
}
|
||||
#page
|
||||
{
|
||||
position : relative;
|
||||
z-index : 1;
|
||||
}
|
||||
#header
|
||||
{
|
||||
height : 96px;
|
||||
}
|
||||
#logo
|
||||
{
|
||||
position : absolute;
|
||||
padding-top : 12px;
|
||||
text-align : right;
|
||||
z-index : 5;
|
||||
}
|
||||
#login
|
||||
{
|
||||
border : 1px solid #999999;
|
||||
padding : 11px;
|
||||
box-shadow : 4px 4px 2px #cccccc
|
||||
}
|
||||
#login div
|
||||
{
|
||||
position : relative;
|
||||
}
|
||||
p
|
||||
{
|
||||
line-height : 1.0rem;
|
||||
}
|
||||
form div
|
||||
{
|
||||
position : relative;
|
||||
float : left;
|
||||
}
|
||||
label
|
||||
{
|
||||
position : absolute;
|
||||
top : 7px;
|
||||
left : 6px;
|
||||
color : #666666;
|
||||
height : 16px;
|
||||
line-height : 16px;
|
||||
}
|
||||
input[type=checkbox] + label
|
||||
{
|
||||
position : relative;
|
||||
}
|
||||
input[type=radio] , input[type=checkbox]
|
||||
{
|
||||
margin-top : 7px;
|
||||
float : left;
|
||||
}
|
||||
input[type=text] , input[type=password]
|
||||
{
|
||||
border : 0px none;
|
||||
border-bottom : 1px solid #cccccc;
|
||||
width : 100%;
|
||||
padding-top : 7px;
|
||||
padding-left : 6px;
|
||||
font-weight : bold;
|
||||
}
|
||||
input[type=submit] , .button a
|
||||
{
|
||||
padding : 6px 0px;
|
||||
background-color : #cccccc;
|
||||
line-height : 1.0rem;
|
||||
text-align : center;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
color : #000000;
|
||||
}
|
||||
.button a
|
||||
{
|
||||
width : 100%;
|
||||
display : inline-block;
|
||||
}
|
||||
input[type=submit]
|
||||
{
|
||||
float : right;
|
||||
margin-top : 24px;
|
||||
padding : 6px 24px;
|
||||
min-width : 144px;
|
||||
cursor : pointer;
|
||||
}
|
||||
input[type=submit]:hover , .button a:hover
|
||||
{
|
||||
background-color : #e3000b;
|
||||
color : #ffffff;
|
||||
}
|
||||
input:not([type="checkbox"]):not([type='radio']):focus + label
|
||||
{
|
||||
color : #cccccc;
|
||||
}
|
||||
label.transparent , input:not([type="checkbox"]):not([type='radio']):focus + label.transparent
|
||||
{
|
||||
color : transparent;
|
||||
background-color : transparent;
|
||||
}
|
||||
select
|
||||
{
|
||||
width : 100%;
|
||||
height : 28px;
|
||||
line-height : 28px;
|
||||
padding : 0px 6px;
|
||||
margin : 0px;
|
||||
border : 0px none;
|
||||
background-color : #cccccc;
|
||||
color : #000000;
|
||||
outline : none;
|
||||
appearance : none;
|
||||
cursor : pointer;
|
||||
display : inline-block;
|
||||
}
|
||||
label.select
|
||||
{
|
||||
top : 0px;
|
||||
left : 0px;
|
||||
position : relative;
|
||||
height : auto;
|
||||
}
|
||||
label.select:before
|
||||
{
|
||||
content : '';
|
||||
right : 0px;
|
||||
top : 0px;
|
||||
width : 28px;
|
||||
height : 28px;
|
||||
background : #cccccc;
|
||||
position : absolute;
|
||||
pointer-events : none;
|
||||
display : block;
|
||||
}
|
||||
label.select:after
|
||||
{
|
||||
content : '<>';
|
||||
font : 11px "Consolas", monospace;
|
||||
color : #000000;
|
||||
-webkit-transform : rotate(90deg);
|
||||
-moz-transform : rotate(90deg);
|
||||
-ms-transform : rotate(90deg);
|
||||
transform : rotate(90deg);
|
||||
right : 0px;
|
||||
top : 0px;
|
||||
width : 28px;
|
||||
height : 28px;
|
||||
padding : 6px 8px;
|
||||
border-bottom : 1px solid #ffffff;
|
||||
position : absolute;
|
||||
pointer-events : none;
|
||||
box-sizing : border-box;
|
||||
font-weight : bold;
|
||||
}
|
||||
form p
|
||||
{
|
||||
font-weight : bold;
|
||||
}
|
||||
form > div
|
||||
{
|
||||
/* margin-bottom : 12px; */
|
||||
}
|
||||
#navi_special , #headline_main
|
||||
{
|
||||
padding : 24px 0px;
|
||||
}
|
||||
#headline_main
|
||||
{
|
||||
font-size : .75rem;
|
||||
font-weight : bold;
|
||||
}
|
||||
#navi_special li
|
||||
{
|
||||
float : left;
|
||||
margin-right : 24px;
|
||||
}
|
||||
#navi_main li
|
||||
{
|
||||
width : 100%;
|
||||
display : inline-block;
|
||||
}
|
||||
#navi_main a
|
||||
{
|
||||
border-bottom : 1px solid #999999;
|
||||
padding : 6px 0px;
|
||||
}
|
||||
#navi_main li li > a
|
||||
{
|
||||
padding-left : 12px;
|
||||
}
|
||||
|
||||
#navi_special a , #navi_main a
|
||||
{
|
||||
width : 100%;
|
||||
color : #000000;
|
||||
text-decoration : none;
|
||||
font-weight : bold;
|
||||
font-size : .625rem;
|
||||
line-height : .625rem;
|
||||
display : inline-block;
|
||||
}
|
||||
|
||||
#navi_special a:before , #navi_main a:before
|
||||
{
|
||||
content : "> ";
|
||||
color : #e3000b;
|
||||
}
|
||||
#heading
|
||||
{
|
||||
position : relative;
|
||||
}
|
||||
#keyvisual
|
||||
{
|
||||
position : relative;
|
||||
top : 0px;
|
||||
left : 0px;
|
||||
z-index : 1;
|
||||
}
|
||||
#headline_site
|
||||
{
|
||||
position : absolute;
|
||||
bottom : 0px;
|
||||
left : 0px;
|
||||
z-index : 3;
|
||||
}
|
||||
#headline_site h1
|
||||
{
|
||||
font-size : 1.25rem;
|
||||
line-height : 2rem;
|
||||
padding-left : 12px;
|
||||
font-weight : bold;
|
||||
}
|
||||
#content
|
||||
{
|
||||
padding-top : 24px;
|
||||
}
|
||||
|
||||
44
administrator/css/reset.css
Normal file
@@ -0,0 +1,44 @@
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, input, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
}
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
617
administrator/css/svjf_editor.css
Normal file
@@ -0,0 +1,617 @@
|
||||
.grid_44col
|
||||
{
|
||||
width : 1056px;
|
||||
float : none;
|
||||
}
|
||||
|
||||
.grid_43col
|
||||
{
|
||||
width : 1032px;
|
||||
float : left;
|
||||
}
|
||||
|
||||
.grid_42col
|
||||
{
|
||||
width : 1008px;
|
||||
float : left;
|
||||
}
|
||||
|
||||
.editor_wrapper
|
||||
{
|
||||
margin : 0px auto;
|
||||
height : 99%;
|
||||
padding : 35px 0px 0px 0px;
|
||||
width : 1058px;
|
||||
}
|
||||
|
||||
.editable_hover
|
||||
{
|
||||
cursor : crosshair;
|
||||
opacity : .5;
|
||||
background-color : #ff0000;
|
||||
}
|
||||
|
||||
.spacer24
|
||||
{
|
||||
height : 24px;
|
||||
}
|
||||
|
||||
.onright
|
||||
{
|
||||
float : right;
|
||||
}
|
||||
|
||||
#rist_editor
|
||||
{
|
||||
height : 100%;
|
||||
}
|
||||
|
||||
#editor_layer
|
||||
{
|
||||
position : fixed;
|
||||
height : 100%;
|
||||
width : 100%;
|
||||
left : 0px;
|
||||
top : 0px;
|
||||
z-index : 999;
|
||||
background-color : rgba( 255 , 255 , 255 , .3 );
|
||||
padding : 0px;
|
||||
margin : 0px;
|
||||
display : none;
|
||||
}
|
||||
|
||||
#editor_layer .grid_40col
|
||||
{
|
||||
float : left;
|
||||
clear : none;
|
||||
}
|
||||
|
||||
#editor_header
|
||||
{
|
||||
background-color : #000000;
|
||||
height : 36px;
|
||||
position : absolute;
|
||||
top : 0px;
|
||||
}
|
||||
|
||||
#editor_title
|
||||
{
|
||||
height : 36px;
|
||||
line-height : 36px;
|
||||
color : #ffffff;
|
||||
font-size : 1.25rem;
|
||||
font-weight : bold;
|
||||
}
|
||||
|
||||
#editor_layer_close
|
||||
{
|
||||
margin : 6px 0px;
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
#editor_content_outer
|
||||
{
|
||||
height : 100%;
|
||||
background-color : #ffffff;
|
||||
background-image : linear-gradient(0deg, transparent 23px, #cccccc 24px ),
|
||||
linear-gradient(90deg, transparent 23px, #cccccc 24px);
|
||||
background-image : -webkit-linear-gradient(0deg, transparent 23px, #cccccc 24px ),
|
||||
-webkit-linear-gradient(90deg, transparent 23px, #cccccc 24px);
|
||||
background-size : 24px 24px;
|
||||
}
|
||||
|
||||
#editor_content
|
||||
{
|
||||
position : relative;
|
||||
height : 100%;
|
||||
padding : 24px 39px 48px 39px;
|
||||
}
|
||||
|
||||
#editor_content > div
|
||||
{
|
||||
height : 100%;
|
||||
overflow-y : auto;
|
||||
overflow-x : hidden;
|
||||
width : 1000px;
|
||||
}
|
||||
|
||||
#editor_content .bottom
|
||||
{
|
||||
position : absolute;
|
||||
bottom : 12px;
|
||||
left : 48px;
|
||||
width : 100%;
|
||||
padding-right : 96px;
|
||||
}
|
||||
|
||||
.submitButton
|
||||
{
|
||||
padding : 4px 0px;
|
||||
background-color : #cccccc;
|
||||
line-height : 1.0rem;
|
||||
text-align : center;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
color : #000000;
|
||||
float : right;
|
||||
margin-top : 24px;
|
||||
min-width : 144px;
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
.submitButton:not(:first-of-type)
|
||||
{
|
||||
float : left;
|
||||
}
|
||||
|
||||
.submitButton:hover
|
||||
{
|
||||
background-color : #e3000b;
|
||||
color : #ffffff;
|
||||
}
|
||||
|
||||
.buttonGroup
|
||||
{
|
||||
width : 193px;
|
||||
float : left;
|
||||
border : 1px solid #666666;
|
||||
padding : 0px 22px 22px 23px;
|
||||
}
|
||||
|
||||
.buttonGroup.onright
|
||||
{
|
||||
margin-right : -1px;
|
||||
float : right;
|
||||
}
|
||||
|
||||
.buttonGroup .submitButton
|
||||
{
|
||||
float : left;
|
||||
margin-top : 0px;
|
||||
}
|
||||
|
||||
.buttonGroup .submitButton
|
||||
{
|
||||
margin-top : -1px;
|
||||
}
|
||||
|
||||
.editor_slider
|
||||
{
|
||||
height : 100%;
|
||||
}
|
||||
|
||||
.editor_slider > div
|
||||
{
|
||||
height : 100%;
|
||||
display : none;
|
||||
}
|
||||
|
||||
.editor_slider > div:first-of-type
|
||||
{
|
||||
display : block;
|
||||
}
|
||||
|
||||
.editor_slider .inner
|
||||
{
|
||||
padding : 1px 9px;
|
||||
}
|
||||
|
||||
input , select , textarea, label
|
||||
{
|
||||
font-family : verdana;
|
||||
font-size : 1.0rem;
|
||||
line-height : 1.0rem;
|
||||
float : left;
|
||||
}
|
||||
|
||||
label
|
||||
{
|
||||
margin-top : 6px;
|
||||
padding-bottom : 2px;
|
||||
}
|
||||
|
||||
input[type=radio] , input[type=checkbox]
|
||||
{
|
||||
margin-top : 6px;
|
||||
margin-left : 5px;
|
||||
margin-right : 6px;
|
||||
}
|
||||
|
||||
input[type=text] , input[type=password]
|
||||
{
|
||||
border : 0px none;
|
||||
border-bottom : 1px solid #666666;
|
||||
width : 383px;
|
||||
padding-top : 4px;
|
||||
padding-left : 6px;
|
||||
height : 24px;
|
||||
}
|
||||
|
||||
textarea
|
||||
{
|
||||
width : 755px;
|
||||
height : 114px;
|
||||
border : 0px none;
|
||||
padding : 2px 6px;
|
||||
border-bottom : 1px solid #666666;
|
||||
margin-top : 1px;
|
||||
line-height : 1.5rem;
|
||||
}
|
||||
|
||||
label
|
||||
{
|
||||
width : 192px;
|
||||
display : inline-block;
|
||||
color : #666666;
|
||||
}
|
||||
|
||||
input.date_picker , input.short
|
||||
{
|
||||
width : 191px;
|
||||
}
|
||||
|
||||
input.tiny
|
||||
{
|
||||
width : 47px;
|
||||
margin-right : 1px;
|
||||
}
|
||||
|
||||
label.tiny
|
||||
{
|
||||
width : 24px;
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
label.tinyleft
|
||||
{
|
||||
width : 96px;
|
||||
}
|
||||
|
||||
input.max
|
||||
{
|
||||
width : 768px;
|
||||
}
|
||||
|
||||
li.navclose ul
|
||||
{
|
||||
display : none;
|
||||
}
|
||||
|
||||
#struktur
|
||||
{
|
||||
margin : 0px 16px 0px 8px;
|
||||
font-size : 0.75rem;
|
||||
line-height : 0.875rem;
|
||||
border : 2px solid #666666;
|
||||
background-color : #FFFFFF;
|
||||
height : 100%;
|
||||
width : 472px;
|
||||
overflow-y : auto;
|
||||
float : left;
|
||||
position : relative;
|
||||
}
|
||||
|
||||
#struktur ul , #otherMain_box ul
|
||||
{
|
||||
padding-left : 24px;
|
||||
}
|
||||
#otherMain_box > ul
|
||||
{
|
||||
padding-left : 0px;
|
||||
}
|
||||
|
||||
#struktur > ul
|
||||
{
|
||||
padding-left : 0px;
|
||||
}
|
||||
|
||||
#navPoint
|
||||
{
|
||||
display : none;
|
||||
width : 472px;
|
||||
height : 100%;
|
||||
float : left;
|
||||
border : 2px solid #666666;
|
||||
padding : 23px 22px 10px 14px;
|
||||
position : relative;
|
||||
overflow-y : auto;
|
||||
}
|
||||
|
||||
#imageEditor
|
||||
{
|
||||
margin : 0px 0px 0px 8px;
|
||||
padding : 0;
|
||||
width : 960px;
|
||||
background-color : transparent;
|
||||
position : relative;
|
||||
}
|
||||
|
||||
#rist_editor .ui-widget-content
|
||||
{
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.ui-datepicker
|
||||
{
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#imgHolder
|
||||
{
|
||||
padding : 0px;
|
||||
position : relative;
|
||||
left : 22px;
|
||||
margin-bottom : 48px;
|
||||
}
|
||||
|
||||
#imgImage
|
||||
{
|
||||
position : absolute;
|
||||
z-index : 10;
|
||||
}
|
||||
|
||||
#imgBlende
|
||||
{
|
||||
position : absolute;
|
||||
z-index : 100;
|
||||
}
|
||||
|
||||
#imgPreview
|
||||
{
|
||||
left : 0px;
|
||||
top : 0px;
|
||||
cursor : move;
|
||||
}
|
||||
|
||||
#blendeTop, #blendeLeft, #blendeRight, #blendeBottom
|
||||
{
|
||||
position : absolute;
|
||||
background-color : rgba( 255 , 255 ,255 , .7 );
|
||||
}
|
||||
|
||||
.preserveChanges
|
||||
{
|
||||
width : 100%;
|
||||
height : 100%;
|
||||
position : absolute;
|
||||
top : 0px;
|
||||
left : 0px;
|
||||
z-index : 50;
|
||||
background-color : rgba( 100 , 100 , 100 , .5);
|
||||
display : none;
|
||||
}
|
||||
|
||||
li.open > span
|
||||
{
|
||||
content : '-';
|
||||
}
|
||||
|
||||
li.navclose > span
|
||||
{
|
||||
content : '+';
|
||||
}
|
||||
|
||||
li.open > span , li.navclose > span , li.empty > span
|
||||
{
|
||||
width : 24px;
|
||||
display : inline-block;
|
||||
cursor : pointer;
|
||||
background-image : url('../images/folders.png');
|
||||
}
|
||||
|
||||
li.open > span
|
||||
{
|
||||
background-position : 0px -27px;
|
||||
}
|
||||
|
||||
li.navclose > span
|
||||
{
|
||||
background-position : 0px -2px;
|
||||
}
|
||||
|
||||
li.empty > span
|
||||
{
|
||||
cursor : default;
|
||||
background-position : 0px -51px;
|
||||
}
|
||||
|
||||
li.not_editable
|
||||
{
|
||||
color : #AAAAAA;
|
||||
cursor : default;
|
||||
}
|
||||
|
||||
li.editable
|
||||
{
|
||||
color : #222222;
|
||||
cursor : crosshair;
|
||||
}
|
||||
|
||||
li.editorDeactive
|
||||
{
|
||||
color : #AAAAAA;
|
||||
font-style : italic;
|
||||
}
|
||||
|
||||
li.editorChosen
|
||||
{
|
||||
font-weight : bold;
|
||||
}
|
||||
|
||||
li.editorChosen li
|
||||
{
|
||||
font-weight : normal;
|
||||
}
|
||||
|
||||
.hidden
|
||||
{
|
||||
display : none;
|
||||
}
|
||||
|
||||
.disabled
|
||||
{
|
||||
background-color : #eeeeee;
|
||||
color : #cccccc;
|
||||
font-style : italic;
|
||||
cursor : default;
|
||||
}
|
||||
|
||||
.disabled:hover
|
||||
{
|
||||
background-color : #eeeeee;
|
||||
color : #cccccc;
|
||||
font-style : italic;
|
||||
}
|
||||
|
||||
.highlight
|
||||
{
|
||||
background-color : #e3000b;
|
||||
color : #ffffff;
|
||||
}
|
||||
|
||||
input#content
|
||||
{
|
||||
padding-top : 4px;
|
||||
}
|
||||
|
||||
input.headline
|
||||
{
|
||||
font-size : 1.25rem;
|
||||
border : none;
|
||||
width : 960px;
|
||||
}
|
||||
|
||||
#editor_elements
|
||||
{
|
||||
position : absolute;
|
||||
z-index : 100;
|
||||
right : 0px;
|
||||
top : 462px;
|
||||
border : 1px solid #000000;
|
||||
overflow : hidden;
|
||||
background-color : #ffffff;
|
||||
}
|
||||
|
||||
#element_title
|
||||
{
|
||||
background-color : #000000;
|
||||
color : #ffffff;
|
||||
font-weight : bold;
|
||||
padding : 0px 11px;
|
||||
cursor : move;
|
||||
}
|
||||
|
||||
#element_content
|
||||
{
|
||||
padding : 12px 11px 4px 11px;
|
||||
}
|
||||
|
||||
#element_content .grid_40col
|
||||
{
|
||||
width : 100%;
|
||||
float : none;
|
||||
height : 24px;
|
||||
background-color : #999999;
|
||||
display : inline-block;
|
||||
overflow : hidden;
|
||||
text-align : center;
|
||||
font-weight : bold;
|
||||
color : #ffffff;
|
||||
cursor : move;
|
||||
}
|
||||
|
||||
#element_content .grid_40col p
|
||||
{
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
#element_content h2 , p
|
||||
{
|
||||
font-size : 1.0rem;
|
||||
}
|
||||
|
||||
#element_content img
|
||||
{
|
||||
display : none;
|
||||
}
|
||||
|
||||
#element_content .content
|
||||
{
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
#content.highlight
|
||||
{
|
||||
background-color : rgba( 160 , 160 , 160 , .2 );
|
||||
color : #000000;
|
||||
}
|
||||
|
||||
#content .new_box
|
||||
{
|
||||
border : 1px dashed #000000;
|
||||
background-color : #ffffff;
|
||||
}
|
||||
|
||||
#content .sort_handle , #rist_editor .sort_handle
|
||||
{
|
||||
background-color : #ffffff;
|
||||
position : absolute;
|
||||
right : 0px;
|
||||
top : 0px;
|
||||
width : 24px;
|
||||
height : 24px;
|
||||
background-image : url( '../images/svjf/icon-sortable.png' );
|
||||
cursor : move;
|
||||
}
|
||||
#content .del_handle, #rist_editor .del_handle
|
||||
{
|
||||
background-color : #ffffff;
|
||||
position : absolute;
|
||||
right : 24px;
|
||||
top : 0px;
|
||||
width : 24px;
|
||||
height : 24px;
|
||||
background-image : url( '../images/svjf/icon-delete.png' );
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
#newSort_box li
|
||||
{
|
||||
position : relative;
|
||||
list-style-type : none;
|
||||
}
|
||||
|
||||
#generalSettings
|
||||
{
|
||||
padding-bottom : 96px;
|
||||
}
|
||||
|
||||
#generalSettings .bottom
|
||||
{
|
||||
left : 48px;
|
||||
}
|
||||
|
||||
#imgThumbs img
|
||||
{
|
||||
display : block;
|
||||
float : none;
|
||||
}
|
||||
|
||||
#wait
|
||||
{
|
||||
position : absolute;
|
||||
width : 100%;
|
||||
height : 100%;
|
||||
background-color : rgba( 255 , 255 , 255 , .7 );
|
||||
z-index : 99;
|
||||
display : none;
|
||||
}
|
||||
|
||||
#wait img
|
||||
{
|
||||
position : absolute;
|
||||
top : 50%;
|
||||
left : 50%;
|
||||
margin-top : -48px;
|
||||
margin-left : -48px;
|
||||
}
|
||||
BIN
administrator/images/cs_l1/keyvisual_0.jpg
Normal file
|
After Width: | Height: | Size: 160 KiB |
BIN
administrator/images/cs_l1/svj_logo.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
administrator/images/folders.png
Normal file
|
After Width: | Height: | Size: 877 B |
BIN
administrator/images/icon-lupe.png
Normal file
|
After Width: | Height: | Size: 809 B |
BIN
administrator/images/icon-sortable.png
Normal file
|
After Width: | Height: | Size: 419 B |
BIN
administrator/images/icon-sortdown.png
Normal file
|
After Width: | Height: | Size: 495 B |
BIN
administrator/images/icon-sortup.png
Normal file
|
After Width: | Height: | Size: 496 B |
BIN
administrator/images/icon-sortwo.png
Normal file
|
After Width: | Height: | Size: 452 B |
BIN
administrator/images/layer_close.png
Normal file
|
After Width: | Height: | Size: 471 B |
BIN
administrator/images/portal_icons.png
Normal file
|
After Width: | Height: | Size: 217 B |
BIN
administrator/images/svjf/icon-delete.png
Normal file
|
After Width: | Height: | Size: 455 B |
BIN
administrator/images/svjf/icon-sortable.png
Normal file
|
After Width: | Height: | Size: 419 B |
143
administrator/index.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
|
||||
session_start( );
|
||||
|
||||
define ( 'PATH_ROOT' , '../' );
|
||||
define ( 'TBL_PREFIX' , 'portal' );
|
||||
|
||||
include_once ( PATH_ROOT . '.config/config_global.php' );
|
||||
require_once ( PATH_CLS . 'rendering/viewClass.php' );
|
||||
|
||||
/* Funktionen und Aktionen einbinden */
|
||||
include_once ( PATH_FNC . 'fnc_portal.php' );
|
||||
include_once ( PATH_ACT . 'portal_actions.php' );
|
||||
|
||||
/* Variablen aufbereiten */
|
||||
$_GET[ 'siteId' ] = ( isset ( $_GET[ 'siteId' ] ) && ! empty ( $_GET[ 'siteId' ] ) )
|
||||
? $_GET[ 'siteId' ]
|
||||
: 'login';
|
||||
$textsFromConfig = true;
|
||||
|
||||
/* Portal Zugriffsrechte prüfen */
|
||||
include_once ( PATH_INC . 'portal_rights.php' );
|
||||
|
||||
/* ToDo: Daten für Content Tabellen auslagern */
|
||||
|
||||
/* Daten für Template aufbereiten */
|
||||
if ( ( ! is_numeric ( $_GET[ 'siteId' ] ) && $_GET[ 'siteId' ] !== 'login' ) || ( isset ( $_SESSION[ 'sess_loginStatus' ] ) && $_SESSION[ 'sess_loginStatus' ] === 'changePW' ) )
|
||||
{
|
||||
$content = $db -> query ( 'SELECT * FROM ' . TBL_PREFIX . '_' . TBL_CONTENT . ' WHERE siteName = "' . $_GET[ 'siteId' ] . '";' );
|
||||
if ( $content -> num_rows !== 0 )
|
||||
{
|
||||
$content_data = $content -> fetch_assoc ( );
|
||||
$table = explode( '_' , $content_data[ 'siteContents' ] )[ 0 ];
|
||||
$id = explode( '_' , $content_data[ 'siteContents' ] )[ 1 ];
|
||||
|
||||
$form = $db -> query( 'SELECT * FROM ' . TBL_PREFIX . '_' . TBL_CONTENT . '_' . $table . ' WHERE id = "' . $id . '";' );
|
||||
$form_data = $form -> fetch_assoc( );
|
||||
$fields = explode( ';' , $form_data[ 'content' ] );
|
||||
unset ( $form_data[ 'id' ] );
|
||||
unset ( $form_data[ 'content' ] );
|
||||
|
||||
$data[ 'content' ] = $form_data;
|
||||
$data[ 'content' ][ 'type' ] = $table;
|
||||
$data[ 'content' ][ 'elems' ] = array( );
|
||||
|
||||
foreach ( $fields as $field )
|
||||
{
|
||||
$tmp_field = explode( ':' , $field );
|
||||
$elem = explode( '_' , $tmp_field[ 0 ] );
|
||||
$elem_data = explode( '_' , $tmp_field[ 1 ] );
|
||||
$tmp_data = ( isset( $elem[ 1 ] ) )
|
||||
? array( 'tag_name' => $elem[ 0 ] , 'type' => $elem[ 1 ] )
|
||||
: array( 'tag_name' => $elem[ 0 ] );
|
||||
$tmp_data[ 'name' ] = $elem_data[ 0 ];
|
||||
$tmp_data[ 'value' ] = ( isset ( $elem_data[ 1 ] ) )
|
||||
? $elem_data[ 1 ]
|
||||
: '';
|
||||
$tmp_data[ 'text' ] = ( isset ( $lang[ $table ][ $elem_data[ 0 ] ] ) )
|
||||
? $lang[ $table ][ $elem_data[ 0 ] ]
|
||||
: '';
|
||||
$data[ 'content' ][ 'elems' ][ ] = $tmp_data;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
elseif ( isset ( $_SESSION[ 'sess_loginStatus' ] ) && $_SESSION[ 'sess_loginStatus' ] === 'loggedIn' )
|
||||
{
|
||||
/* Angemeldet */
|
||||
$data[ 'navi_special' ] = fnc_getNavigationArray ( TBL_PREFIX , true , $navPositions = array( 'special' , 'login' ) , $lang[ 'navi' ] );
|
||||
$navi_main = fnc_getNavigationArray ( TBL_PREFIX , true , $navPositions = array( 'main' ) , $lang[ 'navi' ] );
|
||||
$data[ 'navi_main' ] = ( $_SESSION[ 'sess_portalRightsType' ] === 'ALL' )
|
||||
? $navi_main
|
||||
: fnc_getPortalNavigationArray ( TBL_PREFIX , $navi_main , $_SESSION[ 'sess_portalRights' ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$data[ 'navi_special' ] = fnc_getNavigationArray( TBL_PREFIX , true , $navPositions = array( 'special' , 'logout' ) , $lang[ 'navi' ] );
|
||||
$login = $db -> query( 'SELECT * FROM ' . TBL_PREFIX . '_' . TBL_CONTENT . ' WHERE siteName = "login";' );
|
||||
$login_data = $login -> fetch_assoc( );
|
||||
$table = explode( '_' , $login_data[ 'siteContents' ] )[ 0 ];
|
||||
$id = explode( '_' , $login_data[ 'siteContents' ] )[ 1 ];
|
||||
|
||||
$form = $db -> query( 'SELECT * FROM ' . TBL_PREFIX . '_' . TBL_CONTENT . '_' . $table . ' WHERE id = "' . $id . '";' );
|
||||
$form_data = $form -> fetch_assoc( );
|
||||
$fields = explode( ';' , $form_data[ 'content' ] );
|
||||
unset ( $form_data[ 'id' ] );
|
||||
unset ( $form_data[ 'content' ] );
|
||||
|
||||
$data[ 'login' ] = $form_data;
|
||||
$data[ 'login' ][ 'elems' ] = array( );
|
||||
foreach ( $fields as $field )
|
||||
{
|
||||
$tmp_field = explode( ':' , $field );
|
||||
$elem = explode( '_' , $tmp_field[ 0 ] );
|
||||
$elem_data = explode( '_' , $tmp_field[ 1 ] );
|
||||
$tmp_data = ( isset( $elem[ 1 ] ) )
|
||||
? array( 'tag_name' => $elem[ 0 ] , 'type' => $elem[ 1 ] )
|
||||
: array( 'tag_name' => $elem[ 0 ] );
|
||||
$tmp_data[ 'name' ] = $elem_data[ 0 ];
|
||||
$tmp_data[ 'value' ] = ( isset ( $elem_data[ 1 ] ) )
|
||||
? $elem_data[ 1 ]
|
||||
: '';
|
||||
$tmp_data[ 'text' ] = ( isset ( $lang[ $table ][ $elem_data[ 0 ] ] ) )
|
||||
? $lang[ $table ][ $elem_data[ 0 ] ]
|
||||
: '';
|
||||
$data[ 'login' ][ 'elems' ][ ] = $tmp_data;
|
||||
}
|
||||
}
|
||||
|
||||
$data[ 'headline_main' ] = $lang[ 'headline_main' ];
|
||||
$data[ 'headline_site' ] = $lang[ 'headline' ][ $_GET[ 'siteId' ] ];
|
||||
$data[ 'keyvisual' ] = ( file_exists( PATH_IMG . $vC[ 'portal' ][ 'layout' ] . '/keyvisual_' . $_GET[ 'siteId' ] . '.jpg' ) )
|
||||
? PATH_IMG . $vC[ 'portal' ][ 'layout' ] . '/keyvisual_' . $_GET[ 'siteId' ] . '.jpg'
|
||||
: PATH_IMG . $vC[ 'portal' ][ 'layout' ] . '/keyvisual_0.jpg';
|
||||
|
||||
/* Template rendern */
|
||||
$render = new viewClass ( );
|
||||
$render -> setPrefix ( $vC['portal']['layout'] );
|
||||
$render -> setPathTpl ( PATH_PORTAL_TPL );
|
||||
$render -> setConfig ( $vC );
|
||||
$render -> setTemplate ( 'portal' );
|
||||
$render -> setSiteId ( $_GET[ 'siteId' ] );
|
||||
$render -> setEditable ( false );
|
||||
$render -> setData ( $data );
|
||||
$render -> setLang( $lang );
|
||||
if ( isset ( $arrError ) && ! empty ( $arrError ) )
|
||||
{
|
||||
/* ToDo: Fehlerbehandlung */
|
||||
$render -> setErrors ( $arrError );
|
||||
}
|
||||
if ( isset ( $_POST ) && ! empty ( $_POST ) )
|
||||
{
|
||||
/* ToDo: POST Daten */
|
||||
$render -> setFormData ( $_POST );
|
||||
}
|
||||
|
||||
$html = $render -> output ( );
|
||||
$html = str_replace ( array ( 'PHP_ROOT_PATH/' , 'PHP_SITE_PATH/' ) , array ( PATH_ROOT , PATH_SITE ) , $html );
|
||||
$html = str_replace ( array ( "\r" , "\n" , "\t" ) , array ( '' , '' , '' ) , $html );
|
||||
echo $html;
|
||||
|
||||
?>
|
||||
9190
administrator/js/jquery-2.1.1.js
vendored
Normal file
4
administrator/js/jquery-2.1.1.min.js
vendored
Normal file
1
administrator/js/jquery-2.1.1.min.map
Normal file
12
administrator/js/lang.js.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
header('Content-Type: text/javascript; charset=UTF-8');
|
||||
|
||||
session_start( );
|
||||
|
||||
define ( 'PATH_ROOT' , '../../' );
|
||||
include_once ( PATH_ROOT . '.config/config_global.php' );
|
||||
|
||||
echo 'var lang = ' . json_encode ( $lang ) . ';';
|
||||
|
||||
?>
|
||||
229
administrator/js/portal.js
Normal file
@@ -0,0 +1,229 @@
|
||||
var dataReferer = { };
|
||||
var dataDisabled = { };
|
||||
|
||||
var checkDependence = function ( )
|
||||
{
|
||||
dataReferer.each ( function ( key , elem )
|
||||
{
|
||||
showElement = false;
|
||||
switch ( elem.tagName.toLowerCase( ) )
|
||||
{
|
||||
case 'input' :
|
||||
switch ( elem.type.toLowerCase( ) )
|
||||
{
|
||||
case 'checkbox' :
|
||||
showElement = ( this.checked )
|
||||
? true
|
||||
: false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
if ( ! showElement )
|
||||
{
|
||||
$( '#' + $( this ).attr( 'data-referer' ) ).hide( );
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#' + $( this ).attr( 'data-referer' ) ).show( );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
$ ( document ).ready ( function ( )
|
||||
{
|
||||
/* Popup-Layer */
|
||||
$( '#popup_layer' ).hide ( );
|
||||
$( '#popup_layer_close' ).click ( function ( )
|
||||
{
|
||||
$( '#popup_layer' ).hide ( 400 , function ( )
|
||||
{
|
||||
$( '#popup_title' ).html ( '' );
|
||||
$( '#popup_frame' ).attr ( 'src' , '' );
|
||||
|
||||
} );
|
||||
} );
|
||||
|
||||
/* Behandlung von Eingabefeldern */
|
||||
var inputElements = $( 'input , textarea' ).not( ':input[type=checkbox] , :input[type=radio]' );
|
||||
|
||||
inputElements.each ( function ( key , elem )
|
||||
{
|
||||
if ( $( elem ).val ( ) !== '' )
|
||||
{
|
||||
$ ( elem ).next ( ).addClass ( 'transparent' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$ ( elem ).next ( ).removeClass ( 'transparent' );
|
||||
}
|
||||
} );
|
||||
|
||||
inputElements.keyup ( function ( )
|
||||
{
|
||||
if ( $ ( this ).val ( ) !== '' )
|
||||
{
|
||||
$ ( this ).next ( ).addClass ( 'transparent' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$ ( this ).next ( ).removeClass ( 'transparent' );
|
||||
}
|
||||
} );
|
||||
|
||||
/* Popup-Klick Events */
|
||||
$( '.clickable' ).click ( function ( )
|
||||
{
|
||||
$( '.hidden_row' , $( this ).parent( ) ).toggle( );
|
||||
} );
|
||||
|
||||
/* Data-Disabled */
|
||||
dataDisabled = $( '[data-disabled]' , '.data_active' );
|
||||
dataDisabled.each ( function ( )
|
||||
{
|
||||
$( this ).hide( );
|
||||
} );
|
||||
|
||||
/* Data-Referer */
|
||||
dataReferer = $( '[data-referer]' );
|
||||
checkDependence( );
|
||||
|
||||
dataReferer.click ( function ( )
|
||||
{
|
||||
showElement = false;
|
||||
switch ( this.tagName.toLowerCase( ) )
|
||||
{
|
||||
case 'input' :
|
||||
switch ( this.type.toLowerCase( ) )
|
||||
{
|
||||
case 'checkbox' :
|
||||
showElement = ( this.checked )
|
||||
? true
|
||||
: false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
if ( showElement )
|
||||
{
|
||||
$( '#' + $( this ).attr( 'data-referer' ) ).show( 400 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#' + $( this ).attr( 'data-referer' ) ).hide( 400 );
|
||||
}
|
||||
} );
|
||||
|
||||
/* Abhängigkeiten */
|
||||
$( 'input[type=checkbox]' , '.checkDependencies' ).click( function ( )
|
||||
{
|
||||
node = this.parentNode;
|
||||
switch ( this.checked )
|
||||
{
|
||||
case true :
|
||||
while ( node = node.parentNode )
|
||||
{
|
||||
if ( typeof ( node.tagName ) !== 'undefined' && node.tagName.toLowerCase( ) === 'li' )
|
||||
{
|
||||
$( node ).find( 'input' )[ 0 ].checked = true;
|
||||
checkDependence( );
|
||||
}
|
||||
}
|
||||
break;
|
||||
case false :
|
||||
while ( node = $( node ).find ( 'li' )[ 0 ] )
|
||||
{
|
||||
$( node ).find( 'input' )[ 0 ].checked = false;
|
||||
checkDependence( );
|
||||
}
|
||||
break;
|
||||
}
|
||||
} );
|
||||
|
||||
$( '.all_rights' ).each( function( )
|
||||
{
|
||||
if ( $( this )[ 0 ].checked )
|
||||
{
|
||||
$( '#' + $( this ).attr( 'id' ).replace( 'Type_ALL' , '_outer' ) ).hide( );
|
||||
if ( $( this ).attr( 'id' ) === 'user_portalRightsType_ALL' )
|
||||
{
|
||||
$( '.websiteRights' ).show( );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
$( 'input[type=checkbox]' , '.websiteRights' ).click( function ( )
|
||||
{
|
||||
input = this;
|
||||
node = this.parentNode;
|
||||
|
||||
elems = $( 'input' , $( node ) );
|
||||
switch ( this.checked )
|
||||
{
|
||||
case true :
|
||||
$( elems ).each ( function ( key , value )
|
||||
{
|
||||
if ( value !== input )
|
||||
{
|
||||
value.checked = true;
|
||||
value.disabled = true;
|
||||
}
|
||||
} );
|
||||
break;
|
||||
case false :
|
||||
$( elems ).each ( function ( key , value )
|
||||
{
|
||||
if ( value !== input )
|
||||
{
|
||||
value.checked = false;
|
||||
value.disabled = false;
|
||||
}
|
||||
} );
|
||||
break;
|
||||
}
|
||||
} );
|
||||
|
||||
/* Auf- und Zuklappen von Navigationspunkten */
|
||||
$( 'ul' , 'li.hasChild' ).hide( );
|
||||
|
||||
$( document ).on( 'click' , 'li.hasChild' , function ( event )
|
||||
{
|
||||
if ( event.target === this )
|
||||
{
|
||||
$( event.target ).removeClass( 'hasChild' );
|
||||
$( event.target ).addClass( 'showChild' );
|
||||
$( event.target ).children( 'ul' ).show( );
|
||||
}
|
||||
} );
|
||||
|
||||
$( document ).on( 'click' , 'li.showChild' , function ( event )
|
||||
{
|
||||
if ( event.target === this )
|
||||
{
|
||||
$( event.target ).removeClass( 'showChild' );
|
||||
$( event.target ).addClass( 'hasChild' );
|
||||
$( event.target ).children( 'ul' ).hide( );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
/* Popup-Layer */
|
||||
function fnc_showLayer ( popup , navId )
|
||||
{
|
||||
$( '#popup_title' ).html ( lang[ 'popup' ][ popup ] );
|
||||
$( '#popup_layer' ).show ( 400 , function ( )
|
||||
{
|
||||
$( '#popup_frame' ).attr ( 'src' , 'popups/' + popup + '/index.php?siteId=' + navId );
|
||||
|
||||
} );
|
||||
}
|
||||
|
||||
function fnc_openEditorView ( navId )
|
||||
{
|
||||
var open;
|
||||
open = window.open ( 'popups/editor/index.php?siteId=' + navId , 'editorView' , 'height=700,left=0,location=nomenubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,top=0,width=1100' );
|
||||
}
|
||||
244
administrator/popups/editor/index.php
Normal file
@@ -0,0 +1,244 @@
|
||||
<?php
|
||||
|
||||
session_start( );
|
||||
|
||||
define ( 'PATH_ROOT' , '../../../' );
|
||||
include_once ( PATH_ROOT . '.config/config_global.php' );
|
||||
require_once ( PATH_CLS . 'rendering/viewClass.php' );
|
||||
|
||||
/* Funktionen und Aktionen einbinden */
|
||||
include_once ( PATH_FNC . 'fnc_portal.php' );
|
||||
|
||||
/* Variablen aufbereiten */
|
||||
$editable = false;
|
||||
$_GET[ 'navId' ] = ( isset ( $_GET[ 'navId' ] ) && ! empty ( $_GET[ 'navId' ] ) )
|
||||
? $_GET[ 'navId' ]
|
||||
: '1';
|
||||
$web_key = array_search ( $_GET[ 'siteId' ] , $vC[ 'portal' ][ 'website' ][ 'navId' ] );
|
||||
$prefix = ( $web_key !== false )
|
||||
? $vC[ 'portal' ][ 'website' ][ 'prefix' ][ $web_key ]
|
||||
: '';
|
||||
$pathWay = ( $prefix !== '' )
|
||||
? fnc_createPathHome ( $prefix , $_GET[ 'navId' ] )
|
||||
: array ( );
|
||||
|
||||
/* Portal Zugriffsrechte prüfen */
|
||||
include_once ( PATH_INC . 'portal_rights.php' );
|
||||
|
||||
/* Website Bearbeitungsrechte prüfen */
|
||||
include_once ( PATH_INC . 'website_rights.php' );
|
||||
|
||||
/* Template - Definitionen einbinden */
|
||||
include_once ( PATH_WEBSITE_TPL . $prefix . '/tpl_definitions.php' );
|
||||
|
||||
/* Daten für Template aufbereiten */
|
||||
$navComplete = fnc_getNavigationArray ( $prefix );
|
||||
$arr_navs = fnc_getSingleNavigationArrays ( $prefix , $navComplete , $def , $pathWay );
|
||||
|
||||
$specialSite = fnc_getNavType ( $prefix , $_GET[ 'navId' ] );
|
||||
|
||||
$navpointData = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . TBL_NAVI . '
|
||||
WHERE
|
||||
' . $prefix . '_navId = "' . $_GET[ 'navId' ] . '";'
|
||||
);
|
||||
$navpoint = $navpointData -> fetch_assoc ( );
|
||||
|
||||
if ( ! is_null ( $navpoint[ $prefix . '_keyvisual' ] ) )
|
||||
{
|
||||
/* Keyvisual */
|
||||
$keyvisualData = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . TBL_IMAGE . '
|
||||
WHERE
|
||||
id = "' . $navpoint[ $prefix . '_keyvisual' ] . '";'
|
||||
);
|
||||
$keyvisual = $keyvisualData -> fetch_assoc ( );
|
||||
$data[ 'keyvisual' ][ ] = array ( 'id' => $keyvisual[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $keyvisual[ 'imgName' ] . '.' . $keyvisual[ 'imgExtension' ] , 'title' => $keyvisual[ 'imgTitle' ] );
|
||||
$data[ 'galery' ][ ] = array ( 'id' => $keyvisual[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $keyvisual[ 'imgName' ] . '_orig.' . $keyvisual[ 'imgExtension' ] , 'title' => $keyvisual[ 'imgTitle' ] );
|
||||
|
||||
/* Slider - Daten */
|
||||
if ( $keyvisual[ 'sliderContent' ] !== '' )
|
||||
{
|
||||
$sliders = explode ( ';' , $keyvisual[ 'sliderContent' ] );
|
||||
|
||||
foreach ( $sliders as $imageId )
|
||||
{
|
||||
$imageData = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . TBL_IMAGE . '
|
||||
WHERE
|
||||
id = "' . $imageId . '";'
|
||||
);
|
||||
$image = $imageData -> fetch_assoc ( );
|
||||
$data[ 'keyvisual' ][ ] = array ( 'id' => $image[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $image[ 'imgName' ] . '.' . $image[ 'imgExtension' ] , 'title' => $image[ 'imgTitle' ] );
|
||||
$data[ 'galery' ][ ] = array ( 'id' => $image[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $image[ 'imgName' ] . '_orig.' . $image[ 'imgExtension' ] , 'title' => $image[ 'imgTitle' ] );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data[ 'keyvisual' ][ ] = array ( 'id' => null , 'path' => PATH_MED . $prefix . '/' , 'navId' => '' , 'src' => 'keyvisual_0.jpg' , 'title' => null );
|
||||
}
|
||||
|
||||
if ( $specialSite !== false )
|
||||
{
|
||||
if ( $specialSite === 'uebersicht' )
|
||||
{
|
||||
$contents = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . TBL_NAVI . '
|
||||
WHERE
|
||||
' . $prefix . '_navStart = "' . $_GET[ 'navId' ] . '"
|
||||
ORDER BY
|
||||
' . $prefix . '_navSort ASC;'
|
||||
);
|
||||
while ( $content = $contents -> fetch_assoc ( ) )
|
||||
{
|
||||
$tmp_content[ 'headline' ] = $content[ $prefix . '_navName' ];
|
||||
$tmp_content[ 'link' ] = $content[ $prefix . '_navTarget' ];
|
||||
$tmp_special = fnc_getNavType ( $prefix , $content[ $prefix . '_navId' ] );
|
||||
if ( $tmp_special !== false )
|
||||
{
|
||||
$sub_contents = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . $tmp_special . '
|
||||
WHERE
|
||||
siteId = "' . $content[ $prefix . '_navId' ] . '";'
|
||||
);
|
||||
if ( $sub_contents === false )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$sub_content = $sub_contents -> fetch_assoc ( );
|
||||
$sub_content[ 'type' ] = $tmp_special;
|
||||
}
|
||||
$data[ 'content' ][ 'uebersicht' ][ ] = $sub_content;
|
||||
}
|
||||
}
|
||||
elseif ( $specialSite === 'spielbericht' )
|
||||
{
|
||||
$contents = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . $specialSite . '
|
||||
WHERE
|
||||
siteId = "' . $_GET[ 'navId' ] . '";'
|
||||
);
|
||||
$content = $contents -> fetch_assoc ( );
|
||||
|
||||
$dateTime = DateTime::createFromFormat ( 'Y-m-d' , $content[ 'datum' ] );
|
||||
$data[ 'content' ][ 'spielbericht' ] = $content;
|
||||
}
|
||||
elseif ( $specialSite === 'turnier' )
|
||||
{
|
||||
$contents = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . $specialSite . '
|
||||
WHERE
|
||||
siteId = "' . $_GET[ 'navId' ] . '";'
|
||||
);
|
||||
$content = $contents -> fetch_assoc ( );
|
||||
|
||||
$dateTime = DateTime::createFromFormat ( 'Y-m-d' , $content[ 'datum' ] );
|
||||
$data[ 'content' ][ 'turnier' ] = $content;
|
||||
}
|
||||
elseif ( $specialSite === 'widget' )
|
||||
{
|
||||
$contents = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_' . $specialSite . '
|
||||
WHERE
|
||||
siteId = "' . $_GET[ 'navId' ] . '";'
|
||||
);
|
||||
if ( $contents -> num_rows !== 0 )
|
||||
{
|
||||
$content = $contents -> fetch_assoc ( );
|
||||
$data[ 'content' ][ 'widget' ] = array ( 'id' => $content[ 'id' ] , 'tpl' => $content[ 'widget' ] , 'schluessel' => $vC[ 'portal' ][ 'website' ][ $content[ 'widget' ] ][ $web_key ] , 'wettbewerb' => $content[ 'wettbewerb' ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$contents = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $prefix . '_content
|
||||
WHERE
|
||||
siteId = "' . $_GET[ 'navId' ] . '";'
|
||||
);
|
||||
if ( $contents -> num_rows !== 0 )
|
||||
{
|
||||
$content = $contents -> fetch_assoc ( );
|
||||
if ( $content[ 'siteContents' ] !== '' )
|
||||
{
|
||||
$data[ 'content' ][ 'pageContents' ] = fnc_getSiteContents( $content[ 'siteContents' ] , $prefix );
|
||||
foreach ( $data[ 'content' ][ 'pageContents' ] as $tmp_content )
|
||||
{
|
||||
if ( isset( $tmp_content[ 'type' ] ) && $tmp_content[ 'type' ] === 'textimage' )
|
||||
{
|
||||
$data[ 'galery' ][ ] = array ( 'id' => $tmp_content[ 'content_image_id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $tmp_content[ 'imgName' ] . '_orig.' . $tmp_content[ 'imgExtension' ] , 'title' => $tmp_content[ 'imgTitle' ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $arr_navs as $key => $value )
|
||||
{
|
||||
if ( $value !== null )
|
||||
{
|
||||
$data[ $def[ 'navPostion' ][ $key ] ] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/* Template rendern */
|
||||
$render = new viewClass ( );
|
||||
$render -> setConfig ( $vC );
|
||||
$render -> setPrefix ( $prefix );
|
||||
$render -> setPathTpl ( PATH_WEBSITE_TPL );
|
||||
$render -> setLang ( $lang[ 'website' ] );
|
||||
$render -> setTemplate ( 'main' );
|
||||
if ( $specialSite !== false )
|
||||
{
|
||||
$render -> setSpecialSite ( true );
|
||||
}
|
||||
$render -> setSiteId ( $_GET[ 'navId' ] );
|
||||
$render -> setEditable ( $editable );
|
||||
$render -> setWebkey ( $_GET[ 'siteId' ] );
|
||||
$render -> setData ( $data );
|
||||
$render -> setNavpath ( $pathWay );
|
||||
|
||||
$html = $render -> output ( );
|
||||
$html = str_replace ( array ( 'PHP_ROOT_PATH/' , 'PHP_SITE_PATH/' ) , array ( PATH_ROOT , PATH_SITE ) , $html );
|
||||
// $html = str_replace ( array ( "\r" , "\n" , "\t" ) , array ( '' , '' , '' ) , $html );
|
||||
echo $html;
|
||||
|
||||
?>
|
||||
79
administrator/popups/logfiles/index.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
session_start( );
|
||||
|
||||
define ( 'PATH_ROOT' , '../../../' );
|
||||
include_once ( PATH_ROOT . '.config/config_global.php' );
|
||||
require_once ( PATH_CLS . 'rendering/viewClass.php' );
|
||||
|
||||
/* Funktionen und Aktionen einbinden */
|
||||
include_once ( PATH_FNC . 'fnc_portal.php' );
|
||||
|
||||
/* Variablen aufbereiten */
|
||||
$_GET[ 'siteId' ] = '100';
|
||||
$_GET[ 'year' ] = ( isset ( $_GET[ 'year' ] ) && ! empty ( $_GET[ 'year' ] ) )
|
||||
? $_GET[ 'year' ]
|
||||
: date ( 'Y' );
|
||||
$_GET[ 'month' ] = ( isset ( $_GET[ 'month' ] ) && ! empty ( $_GET[ 'month' ] ) )
|
||||
? $_GET[ 'month' ]
|
||||
: date ( 'n' );
|
||||
$_GET[ 'orderBy' ] = ( isset ( $_GET[ 'orderBy' ] ) && ! empty ( $_GET[ 'orderBy' ] ) )
|
||||
? $_GET[ 'orderBy' ]
|
||||
: 'logTS';
|
||||
$_GET[ 'orderDir' ] = ( isset ( $_GET[ 'orderDir' ] ) && ! empty ( $_GET[ 'orderDir' ] ) )
|
||||
? $_GET[ 'orderDir' ]
|
||||
: 'DESC';
|
||||
$sort = array( );
|
||||
|
||||
/* Portal Zugriffsrechte prüfen */
|
||||
include_once ( PATH_INC . 'portal_rights.php' );
|
||||
|
||||
/* Daten für Template aufbereiten */
|
||||
$content = $db -> query ( 'SELECT * FROM ' . TBL_LOG . ' WHERE YEAR ( logTS ) = "' . $_GET[ 'year' ] . '" AND MONTH ( logTS ) = "' . $_GET[ 'month' ] . '" ORDER BY ' . $_GET[ 'orderBy' ] . ' ' . $_GET[ 'orderDir' ] . ';' );
|
||||
while ( $tmp_content = $content -> fetch_assoc ( ) )
|
||||
{
|
||||
$tmp_content[ 'logEntry' ] = fnc_readLog ( $lang[ 'log' ][ $tmp_content[ 'logEntry' ] ] , $tmp_content[ 'logParams' ] );
|
||||
$tmp_content[ 'logUser' ] = fnc_getUsernameById ( $tmp_content[ 'logUser' ] );
|
||||
$tmp_content[ 'logTS' ] = fnc_getTimeByTS ( $tmp_content[ 'logTS' ] );
|
||||
$sort[ ] = $tmp_content[ $_GET[ 'orderBy' ] ];
|
||||
$data[ 'sub_content' ][ 'main' ][ ] = $tmp_content;
|
||||
}
|
||||
|
||||
if ( $_GET[ 'orderBy' ] === 'logUser' )
|
||||
{
|
||||
$order = ( $_GET[ 'orderDir' ] === 'DESC' )
|
||||
? SORT_DESC
|
||||
: SORT_ASC;
|
||||
array_multisort( $sort , $order , $data[ 'sub_content' ][ 'main' ] );
|
||||
}
|
||||
|
||||
$year = $db -> query ( 'SELECT YEAR ( logTS ) AS firstYear FROM ' . TBL_LOG . ' ORDER BY logTS ASC LIMIT 1; ' );
|
||||
$tmp_year = $year -> fetch_assoc ( );
|
||||
$tmp_year = $tmp_year[ 'firstYear' ];
|
||||
for ( $tmp_year ; $tmp_year <= date ( 'Y' ) ; $tmp_year++ )
|
||||
{
|
||||
$data[ 'sub_content' ][ 'header' ][ 'year' ][ $tmp_year ] = $tmp_year;
|
||||
}
|
||||
|
||||
for ( $month = 1; $month <= 12 ; $month++ )
|
||||
{
|
||||
$data[ 'sub_content' ][ 'header' ][ 'month' ][ $month ] = $lang[ 'month' ][ $month ];
|
||||
}
|
||||
|
||||
/* Template rendern */
|
||||
$render = new viewClass ( );
|
||||
$render -> setPrefix ( $vC[ 'portal' ][ 'layout' ] );
|
||||
$render -> setPathTpl ( PATH_PORTAL_TPL );
|
||||
$render -> setConfig ( $vC );
|
||||
$render -> setTemplate ( 'logfiles' );
|
||||
$render -> setEditable ( false );
|
||||
$render -> setData ( $data );
|
||||
$render -> setLang ( $lang[ 'logfiles' ] );
|
||||
$render -> setFormdata ( array_merge ( $_GET , $_POST ) );
|
||||
|
||||
$html = $render -> output ( );
|
||||
$html = str_replace ( array ( 'PHP_ROOT_PATH/' , 'PHP_SITE_PATH/' ) , array ( PATH_ROOT , PATH_SITE ) , $html );
|
||||
$html = str_replace ( array ( "\r" , "\n" , "\t" ) , array ( '' , '' , '' ) , $html );
|
||||
echo $html;
|
||||
|
||||
?>
|
||||
177
administrator/popups/usermanagement/index.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
|
||||
session_start( );
|
||||
|
||||
define ( 'PATH_ROOT' , '../../../' );
|
||||
|
||||
include_once ( PATH_ROOT . '.config/config_global.php' );
|
||||
require_once ( PATH_CLS . 'rendering/viewClass.php' );
|
||||
|
||||
/* Funktionen und Aktionen einbinden */
|
||||
include_once ( PATH_FNC . 'fnc_portal.php' );
|
||||
// include_once ( PATH_FNC . 'fnc_usermanagement.php' );
|
||||
include_once ( PATH_ACT . 'usermanagement_actions.php' );
|
||||
|
||||
/* Variablen aufbereiten */
|
||||
$_GET[ 'siteId' ] = '3';
|
||||
$_GET[ 'todoId' ] = ( isset ( $_GET[ 'todoId' ] ) && ! empty ( $_GET[ 'todoId' ] ) )
|
||||
? $_GET[ 'todoId' ]
|
||||
: '1';
|
||||
$_GET[ 'filter' ] = ( isset ( $_GET[ 'filter' ] ) && ! empty ( $_GET[ 'filter' ] ) )
|
||||
? $_GET[ 'filter' ]
|
||||
: '';
|
||||
$_GET[ 'orderBy' ] = ( isset ( $_GET[ 'orderBy' ] ) && ! empty ( $_GET[ 'orderBy' ] ) )
|
||||
? $_GET[ 'orderBy' ]
|
||||
: 'userName';
|
||||
$_GET[ 'orderDir' ] = ( isset ( $_GET[ 'orderDir' ] ) && ! empty ( $_GET[ 'orderDir' ] ) )
|
||||
? $_GET[ 'orderDir' ]
|
||||
: 'ASC';
|
||||
|
||||
$sqlOrder = ( $_GET[ 'orderBy' ] === 'userName' )
|
||||
? 'userLastname ' . $_GET[ 'orderDir' ] . ' , userFirstname ' . $_GET[ 'orderDir' ]
|
||||
: $_GET[ 'orderBy' ] . ' ' . $_GET[ 'orderDir' ];
|
||||
|
||||
$dataParameter = array
|
||||
(
|
||||
'1' => array ( 'dataEditing' => 'userId' )
|
||||
);
|
||||
|
||||
$arr_todoIds = array
|
||||
(
|
||||
'1' => 'overview' , /* Übersicht */
|
||||
'2' => 'create' , /* Benutzer anlegen */
|
||||
'3' => 'activate' , /* Benutzer aktivieren */
|
||||
'4' => 'deactivate' , /* Benutzer deaktivieren */
|
||||
'5' => 'edit' , /* Benutzer bearbeiten */
|
||||
'6' => 'delete' , /* Benutzer löschen */
|
||||
'7' => 'pwreset' /* Passwort zurücksetzen */
|
||||
);
|
||||
|
||||
$form_data = null;
|
||||
$lang[ 'usermanagement' ][ 'error' ] = $lang[ 'error' ];
|
||||
|
||||
|
||||
/* Portal Zugriffsrechte prüfen */
|
||||
include_once ( PATH_INC . 'portal_rights.php' );
|
||||
|
||||
/* Daten für Template aufbereiten */
|
||||
if ( $_GET[ 'todoId' ] === '1' )
|
||||
{
|
||||
$content = $db -> query ( 'SELECT * FROM ' . TBL_USER . ' WHERE userDelete = "N" AND userId != "1" AND ( userFirstname LIKE "%' . $_GET[ 'filter' ] . '%" OR userLastname LIKE "%' . $_GET[ 'filter' ] . '%" ) ORDER BY ' . $sqlOrder . ';' );
|
||||
$data[ 'sub_content' ][ 'header' ][ 'filter' ] = $_GET[ 'filter' ];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( in_array ( $_GET[ 'todoId' ] , array ( '2' , '5' ) ) )
|
||||
{
|
||||
$portalNav = fnc_getNavigationArray ( 'portal' , true , array ( 'main' ) , $lang[ 'navi' ] );
|
||||
foreach ( $portalNav as $navStart => $navArray )
|
||||
{
|
||||
foreach ( $navArray as $key => $value )
|
||||
{
|
||||
$websiteKey = array_search ( $value[ 'portal_navId' ] , $vC[ 'portal' ][ 'website' ][ 'navId' ] );
|
||||
|
||||
if ( $websiteKey !== false )
|
||||
{
|
||||
$portalNav[ $navStart ][ $key ][ 'portal_navName' ] = $vC[ 'portal' ][ 'website' ][ 'names' ][ $websiteKey ];
|
||||
}
|
||||
else
|
||||
{
|
||||
$portalNav[ $navStart ][ $key ][ 'portal_navName' ] = $lang[ 'navi' ][ 'site_' . $value[ 'portal_navId' ] ];
|
||||
}
|
||||
|
||||
if ( $value[ 'portal_navId' ] === '1' )
|
||||
{
|
||||
unset ( $portalNav[ $navStart ][ $key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ 'portal_nav' ] = ( $_SESSION[ 'sess_portalRightsType' ] === 'ALL' )
|
||||
? $portalNav
|
||||
: fnc_getPortalNavigationArray ( 'portal' , $portalNav , $_SESSION[ 'sess_portalRights' ] );
|
||||
|
||||
|
||||
if ( ! empty ( $vC[ 'portal' ][ 'website' ][ 'navId' ] ) )
|
||||
{
|
||||
foreach ( $vC[ 'portal' ][ 'website' ][ 'navId' ] as $key => $navId )
|
||||
{
|
||||
$prefix = $vC[ 'portal' ][ 'website' ][ 'prefix' ][ $key ];
|
||||
$websiteNav = fnc_getNavigationArray ( $prefix , false );
|
||||
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ 'website_nav' ][ $prefix ] = array ( 'data' => $websiteNav , 'key' => $navId );
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset ( $_POST ) && ! empty ( $_POST ) )
|
||||
{
|
||||
$form_data = $_POST;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! in_array ( $_GET[ 'todoId' ] , array ( '2' ) ) )
|
||||
{
|
||||
$content = $db -> query ( 'SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $_GET[ 'userId' ] . '";' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset ( $_POST ) && count ( $_POST ) > 0 )
|
||||
{
|
||||
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ ] = $_POST;
|
||||
}
|
||||
elseif ( isset ( $content ) && $content -> num_rows !== 0 )
|
||||
{
|
||||
while ( $tmp_content = $content -> fetch_assoc ( ) )
|
||||
{
|
||||
$tmp_content[ 'userCreateUser' ] = fnc_getUsernameById ( $tmp_content[ 'userCreateUser' ] );
|
||||
$tmp_content[ 'userCreateTS' ] = fnc_getTimeByTS ( $tmp_content[ 'userCreateTS' ] );
|
||||
$tmp_content[ 'userActiveUser' ] = fnc_getUsernameById ( $tmp_content[ 'userActiveUser' ] );
|
||||
$tmp_content[ 'userActiveTS' ] = fnc_getTimeByTS ( $tmp_content[ 'userActiveTS' ] );
|
||||
$tmp_content[ 'user_portalRightsType' ] = $tmp_content[ 'userPortalRightsType' ];
|
||||
$tmp_content[ 'user_portalRights' ] = explode ( ';' , $tmp_content[ 'userPortalRights' ] );
|
||||
|
||||
foreach ( $vC[ 'portal' ][ 'website' ][ 'prefix' ] as $website )
|
||||
{
|
||||
$tmp_right = $db -> query ( 'SELECT * FROM ' . TBL_RIGHTS . ' WHERE userId = "' . $tmp_content[ 'userId' ] . '" AND rightsPrefix = "' . $website . '" LIMIT 1;' );
|
||||
if ( $tmp_right -> num_rows === 0 )
|
||||
{
|
||||
$tmp_content[ 'user_' . $website . 'RightsType' ] = 'DEF';
|
||||
$tmp_content[ 'user_' . $website . 'Rights' ] = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$right = $tmp_right -> fetch_assoc ( );
|
||||
$tmp_content[ 'user_' . $website . 'RightsType' ] = $right[ 'rightsType' ];
|
||||
$tmp_content[ 'user_' . $website . 'Rights' ] = explode ( ';' , $right[ 'rights' ] );
|
||||
}
|
||||
}
|
||||
|
||||
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ ] = $tmp_content;
|
||||
$form_data = $tmp_content;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ 0 ] = array ( );
|
||||
}
|
||||
|
||||
/* Template rendern */
|
||||
$render = new viewClass ( );
|
||||
$render -> setPrefix ( $vC[ 'portal' ][ 'layout' ] );
|
||||
$render -> setPathTpl ( PATH_PORTAL_TPL );
|
||||
$render -> setConfig ( $vC );
|
||||
$render -> setTemplate ( 'usermanagement' );
|
||||
$render -> setSiteId ( $_GET[ 'siteId' ] );
|
||||
$render -> setEditable ( false );
|
||||
$render -> setLang ( $lang[ 'usermanagement' ] );
|
||||
$render -> setData ( $data );
|
||||
$render -> setFormdata( $form_data );
|
||||
if ( isset ( $arrError ) && ! empty ( $arrError ) )
|
||||
{
|
||||
$render -> setErrors ( $arrError );
|
||||
}
|
||||
|
||||
$html = $render -> output ( );
|
||||
$html = str_replace ( array ( 'PHP_ROOT_PATH/' , 'PHP_SITE_PATH/' ) , array ( PATH_ROOT , PATH_SITE ) , $html );
|
||||
$html = str_replace ( array ( "\r" , "\n" , "\t" ) , array ( '' , '' , '' ) , $html );
|
||||
echo $html;
|
||||
|
||||
?>
|
||||
10
administrator/templates/cs_l1/tpl_form.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<form action="<?php echo $this -> _data[ 'action' ]; ?>" method="<?php echo $this -> _data[ 'method' ]; ?>" class="<?php echo $this -> _data[ 'class' ]; ?>">
|
||||
<?php if( !empty($this->_error) ) { echo '<div class="error">'; foreach($this->_error as $error ) { echo $this->_lang['error'][$error]; } echo '</div>'; } foreach ( $this -> _data[ 'elems' ] as $element )
|
||||
{
|
||||
$elem = clone( $this );
|
||||
$elem -> setTemplate( $element[ 'tag_name' ] );
|
||||
$elem -> setData( $element );
|
||||
echo $elem -> output( );
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
14
administrator/templates/cs_l1/tpl_input.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
extract( $this -> _data );
|
||||
?>
|
||||
<div>
|
||||
<input type="<?php echo $type; ?>" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo ( $type === 'submit' ) ? $text : $value; ?>"/>
|
||||
<?php
|
||||
if ( in_array( $type , array( 'text' , 'passWord' , 'password' ) ) )
|
||||
{
|
||||
?>
|
||||
<label for="<?php echo $name; ?>"><?php echo $text; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
90
administrator/templates/cs_l1/tpl_logfiles.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
extract( $this -> _data[ 'sub_content' ][ 'header' ] );
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Logfiles</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="cache-control" content="no-cache"/>
|
||||
<link rel="stylesheet" type="text/css" href="PHP_SITE_PATH/css/reset.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="PHP_SITE_PATH/css/cs_l1.css"/>
|
||||
<script type="text/javascript" src="PHP_SITE_PATH/js/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="PHP_SITE_PATH/js/portal.js"></script>
|
||||
</head>
|
||||
<body class="grid_40col">
|
||||
<div id="page" class="grid_40col">
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div id="sub_content" class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<form action="index.php" name="filterForm" id="filterForm" method="get">
|
||||
<input type="hidden" name="siteId" value="<?php echo $this -> _formdata[ 'siteId' ]; ?>" />
|
||||
<input type="hidden" name="orderBy" id="orderBy" value="<?php echo $this -> _formdata[ 'orderBy' ]; ?>" />
|
||||
<input type="hidden" name="orderDir" id="orderDir" value="<?php echo $this -> _formdata[ 'orderDir' ]; ?>" />
|
||||
<div id="sub_content_header" class="grid_40col">
|
||||
<div class="grid_4col">
|
||||
<label class="grid_4col select">
|
||||
<select name="year" id="year" onchange="$( '#filterForm' ).submit( );">
|
||||
<?php
|
||||
|
||||
foreach ( $year as $key => $value )
|
||||
{
|
||||
?>
|
||||
<option name="year" value="<?php echo $key; ?>" <?php echo ( $key == $this -> _formdata[ 'year' ] ) ? 'selected="selected"' : ''; ?>><?php echo $value; ?></option>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="grid_1col spacer"></div>
|
||||
<div class="grid_5col">
|
||||
<label class="grid_5col select">
|
||||
<select name="month" id="month" onchange="$( '#filterForm' ).submit( );">
|
||||
<?php
|
||||
|
||||
foreach ( $month as $key => $value )
|
||||
{
|
||||
?>
|
||||
<option name="month" value="<?php echo $key; ?>" <?php echo ( $key == $this -> _formdata[ 'month' ] ) ? 'selected="selected"' : ''; ?>><?php echo $value; ?></option>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_24col tbl_head"><?php echo $this -> _lang[ 'entry' ]; ?></div>
|
||||
<div class="grid_8col tbl_head" style="cursor:pointer;" onclick="$( '#orderBy' ).val( 'logUser' ); $( '#orderDir' ).val( '<?php echo ( $this -> _formdata[ 'orderDir' ] === 'DESC' ) ? 'ASC' : 'DESC'; ?>' ); $( '#filterForm' ).submit( ); "><img src="<?php echo ( $this -> _formdata[ 'orderBy' ] === 'logUser' ) ? ( ( $this -> _formdata[ 'orderDir' ] === 'ASC' ) ? PATH_IMG . 'icon-sortup.png' : PATH_IMG . 'icon-sortdown.png' ) : PATH_IMG . 'icon-sortwo.png'; ?>" /> <?php echo $this -> _lang[ 'name' ]; ?></div>
|
||||
<div class="grid_8col tbl_head" style="cursor:pointer;" onclick="$( '#orderBy' ).val( 'logTS' ); $( '#orderDir' ).val( '<?php echo ( $this -> _formdata[ 'orderDir' ] === 'DESC' ) ? 'ASC' : 'DESC'; ?>' ); $( '#filterForm' ).submit( ); "><img src="<?php echo ( $this -> _formdata[ 'orderBy' ] === 'logTS' ) ? ( ( $this -> _formdata[ 'orderDir' ] === 'ASC' ) ? PATH_IMG . 'icon-sortup.png' : PATH_IMG . 'icon-sortdown.png' ) : PATH_IMG . 'icon-sortwo.png'; ?>" /> <?php echo $this -> _lang[ 'time' ]; ?></div>
|
||||
</div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<?php
|
||||
foreach ( $this -> _data[ 'sub_content' ][ 'main' ] as $data )
|
||||
{
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col main_row">
|
||||
<div class="grid_24col tbl_cell highlight" data-name="logEntry"><?php echo $data[ 'logEntry' ]; ?></div>
|
||||
<div class="grid_8col tbl_cell highlight" data-name="logUser"><?php echo $data[ 'logUser' ]; ?></div>
|
||||
<div class="grid_8col tbl_cell highlight" data-name="logTS"><?php echo $data[ 'logTS' ]; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
23
administrator/templates/cs_l1/tpl_navi.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<ul>
|
||||
<?php
|
||||
$param = ( is_null( $this -> _param ) )
|
||||
? 0
|
||||
: $this -> _param;
|
||||
|
||||
foreach ( $this -> _data[ $param ] as $nav_array )
|
||||
{
|
||||
extract ( $nav_array );
|
||||
?><li><a <?php echo ( in_array( ${$this -> _prefix . '_navId'} , $this -> _navpath ) ) ? ' class="active"' : ''; ?> href="<?php echo ( ${$this -> _prefix . '_navType'} === 'html' ) ? ${$this -> _prefix . '_navTarget'} : 'javascript:void( 0 );'; ?>"<?php echo ( ${$this -> _prefix . '_navType'} === 'js' ) ? 'onclick="' . ${$this -> _prefix . '_navTarget'} . ';"' : ''; ?>><?php echo ${$this -> _prefix . '_navName'}; ?></a>
|
||||
<?php
|
||||
if ( isset ( $this -> _data[ ${$this -> _prefix . '_navId'} ] ) )
|
||||
{
|
||||
$navi_main = clone( $this );
|
||||
$navi_main -> setTemplate ( 'navi' );
|
||||
$navi_main -> setData ( $this -> _data , ${$this -> _prefix . '_navId'} );
|
||||
echo $navi_main -> output ( );
|
||||
}
|
||||
?>
|
||||
</li><?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
45
administrator/templates/cs_l1/tpl_navirights.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<ul>
|
||||
<?php
|
||||
$param = ( is_null( $this -> _param ) )
|
||||
? 0
|
||||
: $this -> _param;
|
||||
|
||||
foreach ( $this -> _data[ $param ] as $nav_array )
|
||||
{
|
||||
extract ( $nav_array );
|
||||
|
||||
$referer = '';
|
||||
$disabled = '';
|
||||
|
||||
if ( $this -> _prefix === 'portal' )
|
||||
{
|
||||
if ( array_key_exists( ${$this -> _prefix . '_navId'} , $this -> _website ) )
|
||||
{
|
||||
$referer = 'data-referer="' . $this -> _website[ ${$this -> _prefix . '_navId'} ][ 'prefix' ] . 'Rights"';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $_SESSION[ 'sess_' . $this -> _prefix . 'Type' ] !== 'ALL' )
|
||||
{
|
||||
$disabled = 'disabled="disabled" ';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li <?php echo ( $this -> _prefix !== 'portal' && isset ( $this -> _data[ ${$this -> _prefix . '_navId'} ] ) ) ? 'class="hasChild"' : ''; ?>>
|
||||
<input <?php echo $disabled . $referer; ?> type="checkbox" name="user_<?php echo $this -> _prefix; ?>Rights[ ]" id="user_<?php echo $this -> _prefix; ?>Rights_<?php echo ${$this -> _prefix . '_navId'};?>" value="<?php echo ${$this -> _prefix . '_navId'}; ?>" <?php echo ( ( isset( $this -> _formdata ) && ( in_array( ${$this -> _prefix . '_navId'} , $this -> _formdata ) || in_array( $this -> _prefix . '_' . ${$this -> _prefix . '_navId'} , $this -> _formdata ) ) ) ) ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="user_<?php echo $this -> _prefix; ?>Rights_<?php echo ${$this -> _prefix . '_navId'};?>"><?php echo ${$this -> _prefix . '_navName'}; ?></label>
|
||||
<?php
|
||||
if ( isset ( $this -> _data[ ${$this -> _prefix . '_navId'} ] ) )
|
||||
{
|
||||
$navi_main = clone( $this );
|
||||
$navi_main -> setTemplate ( 'navirights' );
|
||||
$navi_main -> setData ( $this -> _data , ${$this -> _prefix . '_navId'} );
|
||||
echo $navi_main -> output ( );
|
||||
}
|
||||
?>
|
||||
</li><?php
|
||||
}
|
||||
|
||||
?>
|
||||
</ul>
|
||||
1
administrator/templates/cs_l1/tpl_p.php
Normal file
@@ -0,0 +1 @@
|
||||
<p><?php echo $this -> _data[ 'text' ]; ?></p>
|
||||
122
administrator/templates/cs_l1/tpl_portal.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>SVJ Fussball Bearbeitungsportal</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta http-equiv="cache-control" content="no-cache"/>
|
||||
<link rel="stylesheet" type="text/css" href="PHP_SITE_PATH/css/reset.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="PHP_SITE_PATH/css/cs_l1.css"/>
|
||||
<script type="text/javascript" src="PHP_SITE_PATH/js/lang.js.php"></script>
|
||||
<script type="text/javascript" src="PHP_SITE_PATH/js/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="PHP_SITE_PATH/js/portal.js"></script>
|
||||
</head>
|
||||
<body class="grid_44col">
|
||||
<div id="popup_layer" class="grid_44col">
|
||||
<div id="popup_header" class="grid_44col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div id="popup_title" class="grid_39col"></div>
|
||||
<div class="grid_1col">
|
||||
<img id="popup_layer_close" src="PHP_SITE_PATH/images/layer_close.png" />
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<iframe id="popup_frame" src="" class="grid_44col"></iframe>
|
||||
</div>
|
||||
<div id="page" class="grid_44col">
|
||||
<div id="header" class="grid_44col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div id="headline_main" class="grid_9col">
|
||||
<?php echo $this -> _data[ 'headline_main' ]; ?>
|
||||
</div>
|
||||
<div class="grid_1col spacer"></div>
|
||||
<div id="navi_special" class="grid_20col">
|
||||
<?php
|
||||
if ( isset ( $this -> _data[ 'navi_special' ] ) )
|
||||
{
|
||||
$navi_main = clone $this;
|
||||
$navi_main -> setTemplate ( 'navi' );
|
||||
$navi_main -> setNavpath ( $this -> _navpath );
|
||||
$navi_main -> setPrefix ( 'portal' );
|
||||
$navi_main -> setData( $this -> _data[ 'navi_special' ] , 0 );
|
||||
echo $navi_main -> output( );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="grid_1col spacer"></div>
|
||||
<div id="logo" class="grid_9col">
|
||||
<img src="PHP_SITE_PATH/images/cs_l1/svj_logo.png"/>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div id="wrapper" class="grid_40col">
|
||||
<?php
|
||||
if ( isset ( $this -> _data[ 'login' ] ) )
|
||||
{
|
||||
?>
|
||||
<div class="grid_9col">
|
||||
<div id="login" class="grid_9col">
|
||||
<?php
|
||||
$form = clone $this;
|
||||
$form -> setTemplate ( 'form' );
|
||||
$form -> setData( $this -> _data[ 'login' ] );
|
||||
$form -> setLang( $this -> _lang );
|
||||
$form -> setErrors( $this -> _error );
|
||||
echo $form -> output( );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ( isset ( $this -> _data[ 'navi_main' ] ) )
|
||||
{
|
||||
?>
|
||||
<div id="navi_main" class="grid_9col">
|
||||
<?php
|
||||
$navi_main -> setTemplate ( 'navi' );
|
||||
$navi_main -> setNavpath ( $this -> _navpath );
|
||||
$navi_main -> setPrefix ( 'portal' );
|
||||
$navi_main -> setData( $this -> _data[ 'navi_main' ] , 0 );
|
||||
echo $navi_main -> output( );
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="grid_1col spacer"></div>
|
||||
<div id="main" class="grid_30col">
|
||||
<div id="heading" class="grid_30col">
|
||||
<div id="keyvisual" class="grid_30col">
|
||||
<img src="<?php echo $this -> _data[ 'keyvisual' ]; ?>"/>
|
||||
</div>
|
||||
<div id="headline_site" class="grid_30col">
|
||||
<?php
|
||||
foreach ( $this -> _data[ 'headline_site' ] as $headline )
|
||||
{
|
||||
?>
|
||||
<h1 class="<?php echo $headline[ 1 ]; ?>"><?php echo $headline[ 0 ]; ?></h1>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="fix"></div>
|
||||
</div>
|
||||
<div id="content" class="grid_30col">
|
||||
<?php
|
||||
if ( isset ( $this -> _data[ 'content' ] ) )
|
||||
{
|
||||
$content = clone $this;
|
||||
$content -> setTemplate ( $this -> _data[ 'content' ][ 'type' ] );
|
||||
$content -> setData( $this -> _data[ 'content' ] );
|
||||
echo $content -> output( );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div id="footer" class="grid_44col"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
57
administrator/templates/cs_l1/tpl_usermanagement.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Usermanagement</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="cache-control" content="no-cache"/>
|
||||
<link rel="stylesheet" type="text/css" href="PHP_SITE_PATH/css/reset.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="PHP_SITE_PATH/css/cs_l1.css"/>
|
||||
<script type="text/javascript" src="PHP_SITE_PATH/js/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="PHP_SITE_PATH/js/portal.js"></script>
|
||||
</head>
|
||||
<body class="grid_40col">
|
||||
<div id="page" class="grid_40col">
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<?php
|
||||
|
||||
if ( isset ( $this -> _error ) )
|
||||
{
|
||||
?>
|
||||
<div class="grid_40col error">
|
||||
<?php
|
||||
foreach ( $this -> _error as $error )
|
||||
{
|
||||
?>
|
||||
<p><?php echo $this -> _lang[ 'error' ][ $error ]; ?></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="sub_content" class="grid_40col">
|
||||
<?php
|
||||
|
||||
if ( isset( $this -> _data[ 'main' ] ) )
|
||||
{
|
||||
|
||||
foreach ( $this -> _data[ 'main' ] as $tpl => $data )
|
||||
{
|
||||
$content = clone( $this );
|
||||
$content -> setTemplate( 'usermanagement_' . $tpl );
|
||||
$content -> setData( $data );
|
||||
echo $content -> output( );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
extract( $this -> _formdata );
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div id="sub_content_header" class="grid_40col tbl_head"><?php echo $this -> _lang[ 'QUE_002' ]; ?></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'lastname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userLastname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'firstname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userFirstname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdBy:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateUser; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdOn:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateTS; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'disabledBy:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userActiveUser; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'disabledOn:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userActiveTS; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<form action="index.php" name="userActivate" id="userActivate" method="post">
|
||||
<input type="hidden" name="siteId" id="siteId" value="3" />
|
||||
<input type="hidden" name="todoId" id="todoId" value="3" />
|
||||
<input type="hidden" name="formAction" id="formAction" value="enableUser" />
|
||||
<input type="hidden" name="userId" id="userId" value="<?php echo $userId; ?>" />
|
||||
<div class="grid_7col button">
|
||||
<a href="index.php?siteId=3"><?php echo $this -> _lang[ 'cancel' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_22col spacer"></div>
|
||||
<div class="grid_7col button">
|
||||
<a href="javascript:void( 0 );" onclick="$( '#userActivate' ).submit( );"><?php echo $this -> _lang[ 'save' ]; ?></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
233
administrator/templates/cs_l1/tpl_usermanagement_create.php
Normal file
@@ -0,0 +1,233 @@
|
||||
<?php
|
||||
|
||||
if ( isset( $this -> _formdata ) && ! empty( $this -> _formdata ) )
|
||||
{
|
||||
extract( $this -> _formdata );
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div id="sub_content_header" class="grid_40col tbl_head"><?php echo $this -> _lang[ 'userCreate' ]; ?></div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<form action="index.php" name="userEdit" id="userEdit" method="post">
|
||||
<!-- Allgemeine Angaben -->
|
||||
<div class="grid_40col tbl_sub"><?php echo $this -> _lang[ 'commonFields' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_30col">
|
||||
<div class="grid_30col">
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userLastname"><?php echo $this -> _lang[ 'lastname' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userLastname" id="userLastname" placeholder="<?php echo $this -> _lang[ 'lastname' ]; ?>" <?php echo ( isset( $userLastname ) ) ? 'value="' . $userLastname . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userFirstname"><?php echo $this -> _lang[ 'firstname' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userFirstname" id="userFirstname" placeholder="<?php echo $this -> _lang[ 'firstname' ]; ?>" <?php echo ( isset( $userFirstname ) ) ? 'value="' . $userFirstname . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_30col">
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userEmail"><?php echo $this -> _lang[ 'email' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userEmail" id="userEmail" placeholder="<?php echo $this -> _lang[ 'email' ]; ?>" <?php echo ( isset( $userEmail ) ) ? 'value="' . $userEmail . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userPhone"><?php echo $this -> _lang[ 'phone' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userPhone" id="userPhone" placeholder="<?php echo $this -> _lang[ 'phone' ]; ?>" <?php echo ( isset( $userPhone ) ) ? 'value="' . $userPhone . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_30col spacer"></div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
<div class="grid_10col spacer"></div>
|
||||
<br class="fix"/>
|
||||
<!-- Portal-Rechte -->
|
||||
<div class="grid_40col" id="portalRights">
|
||||
<div class="grid_40col tbl_sub"><?php echo $this -> _lang[ 'portalRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col hint"><?php echo $this -> _lang[ 'hintPortalRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_30col">
|
||||
<div class="grid_30col">
|
||||
<?php
|
||||
if ( $_SESSION[ 'sess_portalRightsType' ] === 'ALL' )
|
||||
{
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_portalRightsType_ALL"><?php echo $this -> _lang[ 'allRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="radio" onclick="$( '#userPortalRights_outer' ).hide( 400 );$( '.websiteRights' ).show( );" name="user_portalRightsType" id="user_portalRightsType_ALL" value="ALL" <?php echo ( isset( $user_portalRightsType ) && $user_portalRightsType === 'ALL' ) ? 'checked="checked"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_portalRightsType_DEF"><?php echo $this -> _lang[ 'defRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="radio" onclick="$( '#userPortalRights_outer' ).show( 400 );checkDependence( );" name="user_portalRightsType" id="user_portalRightsType_DEF" value="DEF" <?php echo ( isset( $user_portalRightsType ) && $user_portalRightsType === 'DEF' || ! isset( $user_portalRightsType ) ) ? 'checked="checked"' : ''; ?>/>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_14col spacer"></div>
|
||||
<div class="grid_14col box checkDependencies" id="userPortalRights_outer">
|
||||
<?php
|
||||
|
||||
if ( isset ( $this -> _data[ 'portal_nav' ] ) && ! empty ( $this -> _data[ 'portal_nav' ] ) )
|
||||
{
|
||||
$nav = clone ( $this );
|
||||
$nav -> setPrefix( 'portal' );
|
||||
$nav -> setTemplate( 'navirights' );
|
||||
$nav -> setData( $this -> _data[ 'portal_nav' ] );
|
||||
if ( isset ( $user_portalRights ) )
|
||||
{
|
||||
$nav -> setFormdata( $user_portalRights );
|
||||
}
|
||||
echo $nav -> output( );
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_30col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_10col spacer"></div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
<!-- Website-Rechte -->
|
||||
<?php
|
||||
|
||||
if ( isset ( $this -> _data[ 'website_nav' ] ) && ! empty ( $this -> _data[ 'website_nav' ] ) )
|
||||
{
|
||||
foreach ( $this -> _data[ 'website_nav' ] as $website )
|
||||
{
|
||||
?>
|
||||
<div class="websiteRights grid_40col" id="<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights">
|
||||
<div class="grid_40col tbl_sub"><?php echo $this -> _website[ $website[ 'key' ] ][ 'names' ] . ' ' . $this -> _lang[ 'websiteRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col hint"><?php echo $this -> _lang[ 'hintWebsiteRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_30col">
|
||||
<?php
|
||||
if ( isset ( $_SESSION[ 'sess_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'Type' ] ) && $_SESSION[ 'sess_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'Type' ] === 'ALL' )
|
||||
{
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_ALL"><?php echo $this -> _lang[ 'allRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="radio" onclick="$( '#user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer' ).hide( 400 );" name="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType" id="user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_ALL" value="ALL"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_DEF"><?php echo $this -> _lang[ 'defRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="radio" onclick="$( '#user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer' ).show( 400 );" name="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType" id="user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_DEF" value="DEF" checked="checked"/>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_14col spacer"></div>
|
||||
<div class="grid_14col box websiteRights" id="user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer">
|
||||
<?php
|
||||
|
||||
if ( isset ( $website[ 'data' ] ) && ! empty ( $website[ 'data' ] ) )
|
||||
{
|
||||
$nav = clone ( $this );
|
||||
$nav -> setPrefix( $this -> _website[ $website[ 'key' ] ][ 'prefix' ] );
|
||||
$nav -> setTemplate( 'navirights' );
|
||||
$nav -> setData( $website[ 'data' ] );
|
||||
if ( isset ( ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'Rights'} ) )
|
||||
{
|
||||
$nav -> setFormdata( ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'Rights'} );
|
||||
}
|
||||
echo $nav -> output( );
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( '#<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights' ).hide( );
|
||||
var <?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights = <?php echo json_encode ( explode ( ';' , $_SESSION[ 'sess_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] ] ) ); ?>;
|
||||
$( 'input' , '#user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer' ).each( function ( key , elem )
|
||||
{
|
||||
if ( $.inArray( '<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>_' + $( elem ).val( ) , <?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights ) !== -1 )
|
||||
{
|
||||
$( elem ).prop( 'disabled' , false );
|
||||
$( 'input' , $( elem ).parent( ) ).each( function( key , input )
|
||||
{
|
||||
$( input ).prop( 'disabled' , false );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
</script>
|
||||
<div class="grid_10col spacer"></div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- Hiddenfelder und Schaltflächen -->
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col" data-form="dataEditing">
|
||||
<input type="hidden" name="siteId" id="siteId" value="3" />
|
||||
<input type="hidden" name="todoId" id="todoId" value="2" />
|
||||
<input type="hidden" name="formAction" id="formAction" value="createUser" />
|
||||
<div class="grid_7col button">
|
||||
<a href="index.php?siteId=3"><?php echo $this -> _lang[ 'cancel' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_26col spacer"></div>
|
||||
<div class="grid_7col button">
|
||||
<a href="javascript:void( 0 );" onclick="$( '#userEdit' ).submit( );"><?php echo $this -> _lang[ 'save' ]; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_20col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
extract( $this -> _formdata );
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div id="sub_content_header" class="grid_40col tbl_head"><?php echo $this -> _lang[ 'QUE_001' ]; ?></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'lastname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userLastname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'firstname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userFirstname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdBy:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateUser; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdOn:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateTS; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<form action="index.php" name="userDeactivate" id="userDeactivate" method="post">
|
||||
<input type="hidden" name="siteId" id="siteId" value="3" />
|
||||
<input type="hidden" name="todoId" id="todoId" value="4" />
|
||||
<input type="hidden" name="formAction" id="formAction" value="disableUser" />
|
||||
<input type="hidden" name="userId" id="userId" value="<?php echo $userId; ?>" />
|
||||
<div class="grid_7col button">
|
||||
<a href="index.php?siteId=3"><?php echo $this -> _lang[ 'cancel' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_22col spacer"></div>
|
||||
<div class="grid_7col button">
|
||||
<a href="javascript:void( 0 );" onclick="$( '#userDeactivate' ).submit( );"><?php echo $this -> _lang[ 'save' ]; ?></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
72
administrator/templates/cs_l1/tpl_usermanagement_delete.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
extract( $this -> _formdata );
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div id="sub_content_header" class="grid_40col tbl_head"><?php echo $this -> _lang[ 'QUE_003' ]; ?></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'lastname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userLastname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'firstname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userFirstname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdBy:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateUser; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdOn:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateTS; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<form action="index.php" name="userDelete" id="userDelete" method="post">
|
||||
<input type="hidden" name="siteId" id="siteId" value="3" />
|
||||
<input type="hidden" name="todoId" id="todoId" value="6" />
|
||||
<input type="hidden" name="formAction" id="formAction" value="deleteUser" />
|
||||
<input type="hidden" name="userId" id="userId" value="<?php echo $userId; ?>" />
|
||||
<div class="grid_7col button">
|
||||
<a href="index.php?siteId=3"><?php echo $this -> _lang[ 'cancel' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_22col spacer"></div>
|
||||
<div class="grid_7col button">
|
||||
<a href="javascript:void( 0 );" onclick="$( '#userDelete' ).submit( );"><?php echo $this -> _lang[ 'delete' ]; ?></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
225
administrator/templates/cs_l1/tpl_usermanagement_edit.php
Normal file
@@ -0,0 +1,225 @@
|
||||
<?php
|
||||
|
||||
extract( $this -> _formdata );
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div id="sub_content_header" class="grid_40col tbl_head"><?php echo $this -> _lang[ 'userEdit' ]; ?></div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<form action="index.php" name="userEdit" id="userEdit" method="post">
|
||||
<!-- Allgemeine Angaben -->
|
||||
<div class="grid_40col tbl_sub"><?php echo $this -> _lang[ 'commonFields' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_30col">
|
||||
<div class="grid_30col">
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userLastname"><?php echo $this -> _lang[ 'lastname:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userLastname" id="userLastname" placeholder="<?php echo $this -> _lang[ 'lastname' ]; ?>" <?php echo ( isset( $userLastname ) ) ? 'value="' . $userLastname . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userFirstname"><?php echo $this -> _lang[ 'firstname:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userFirstname" id="userFirstname" placeholder="<?php echo $this -> _lang[ 'firstname' ]; ?>" <?php echo ( isset( $userFirstname ) ) ? 'value="' . $userFirstname . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_30col">
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userEmail"><?php echo $this -> _lang[ 'email:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userEmail" id="userEmail" placeholder="<?php echo $this -> _lang[ 'email' ]; ?>" <?php echo ( isset( $userEmail ) ) ? 'value="' . $userEmail . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="userPhone"><?php echo $this -> _lang[ 'phone:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="userPhone" id="userPhone" placeholder="<?php echo $this -> _lang[ 'phone' ]; ?>" <?php echo ( isset( $userPhone ) ) ? 'value="' . $userPhone . '"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_30col spacer"></div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
<div class="grid_10col spacer"></div>
|
||||
<br class="fix"/>
|
||||
<!-- Portal-Rechte -->
|
||||
<div class="grid_40col" id="portalRights">
|
||||
<div class="grid_40col tbl_sub"><?php echo $this -> _lang[ 'portalRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col hint"><?php echo $this -> _lang[ 'hintPortalRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_30col">
|
||||
<div class="grid_30col">
|
||||
<?php
|
||||
if ( $_SESSION[ 'sess_portalRightsType' ] === 'ALL' )
|
||||
{
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_portalRightsType_ALL"><?php echo $this -> _lang[ 'allRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input class="all_rights" type="radio" onclick="$( '#user_portalRights_outer' ).hide( 400 );$( '.websiteRights' ).show( );" name="user_portalRightsType" id="user_portalRightsType_ALL" value="ALL" <?php echo ( isset( $user_portalRightsType ) && $user_portalRightsType === 'ALL' ) ? 'checked="checked"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_portalRightsType_DEF"><?php echo $this -> _lang[ 'defRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="radio" onclick="$( '#user_portalRights_outer' ).show( 400 );checkDependence( );" name="user_portalRightsType" id="user_portalRightsType_DEF" value="DEF" <?php echo ( isset( $user_portalRightsType ) && $user_portalRightsType === 'DEF' || ! isset( $user_portalRightsType ) ) ? 'checked="checked"' : ''; ?>/>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_14col spacer"></div>
|
||||
<div class="grid_14col box checkDependencies" id="user_portalRights_outer">
|
||||
<?php
|
||||
|
||||
if ( isset ( $this -> _data[ 'portal_nav' ] ) && ! empty ( $this -> _data[ 'portal_nav' ] ) )
|
||||
{
|
||||
$nav = clone ( $this );
|
||||
$nav -> setPrefix( 'portal' );
|
||||
$nav -> setTemplate( 'navirights' );
|
||||
$nav -> setData( $this -> _data[ 'portal_nav' ] );
|
||||
$nav -> setFormdata( $user_portalRights );
|
||||
echo $nav -> output( );
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_30col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_10col spacer"></div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
<!-- Website-Rechte -->
|
||||
<?php
|
||||
|
||||
if ( isset ( $this -> _data[ 'website_nav' ] ) && ! empty ( $this -> _data[ 'website_nav' ] ) )
|
||||
{
|
||||
foreach ( $this -> _data[ 'website_nav' ] as $website )
|
||||
{
|
||||
?>
|
||||
<div class="websiteRights grid_40col" id="<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights">
|
||||
<div class="grid_40col tbl_sub"><?php echo $this -> _website[ $website[ 'key' ] ][ 'names' ] . ' ' . $this -> _lang[ 'websiteRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col hint"><?php echo $this -> _lang[ 'hintWebsiteRights' ]; ?></div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_30col">
|
||||
<?php
|
||||
if ( isset ( $_SESSION[ 'sess_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'Type' ] ) && $_SESSION[ 'sess_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'Type' ] === 'ALL' )
|
||||
{
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_ALL"><?php echo $this -> _lang[ 'allRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input class="all_rights" type="radio" onclick="$( '#user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer' ).hide( 400 );" name="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType" id="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_ALL" value="ALL" <?php echo ( isset( ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'RightsType'} ) && ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'RightsType'} === 'ALL' ) ? 'checked="checked"' : ''; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="grid_14col">
|
||||
<div class="grid_5col">
|
||||
<label for="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_DEF"><?php echo $this -> _lang[ 'defRights:' ]; ?></label>
|
||||
</div>
|
||||
<div class="grid_9col">
|
||||
<input type="radio" onclick="$( '#user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer' ).show( 400 );" name="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType" id="user_<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>RightsType_DEF" value="DEF" <?php echo ( isset( ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'RightsType'} ) && ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'RightsType'} === 'DEF' || ! isset( ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'RightsType'} ) ) ? 'checked="checked"' : ''; ?>/>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
<div class="grid_14col spacer"></div>
|
||||
<div class="grid_14col box websiteRights" id="user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer">
|
||||
<?php
|
||||
|
||||
if ( isset ( $website[ 'data' ] ) && ! empty ( $website[ 'data' ] ) )
|
||||
{
|
||||
$nav = clone ( $this );
|
||||
$nav -> setPrefix( $this -> _website[ $website[ 'key' ] ][ 'prefix' ] );
|
||||
$nav -> setTemplate( 'navirights' );
|
||||
$nav -> setData( $website[ 'data' ] );
|
||||
$nav -> setFormdata( ${'user_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] . 'Rights'} );
|
||||
echo $nav -> output( );
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( '#<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights' ).hide( );
|
||||
var <?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights = <?php echo json_encode ( explode ( ';' , $_SESSION[ 'sess_' . $this -> _website[ $website[ 'key' ] ][ 'prefix' ] ] ) ); ?>;
|
||||
$( 'input' , '#user<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights_outer' ).each( function ( key , elem )
|
||||
{
|
||||
if ( $.inArray( '<?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>_' + $( elem ).val( ) , <?php echo $this -> _website[ $website[ 'key' ] ][ 'prefix' ]; ?>Rights ) !== -1 )
|
||||
{
|
||||
$( elem ).prop( 'disabled' , false );
|
||||
$( 'input' , $( elem ).parent( ) ).each( function( key , input )
|
||||
{
|
||||
$( input ).prop( 'disabled' , false );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
</script>
|
||||
<div class="grid_10col spacer"></div>
|
||||
<br class="fix"/>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- Hiddenfelder und Schaltflächen -->
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col" data-form="dataEditing">
|
||||
<input type="hidden" name="siteId" id="siteId" value="3" />
|
||||
<input type="hidden" name="todoId" id="todoId" value="5" />
|
||||
<input type="hidden" name="formAction" id="formAction" value="editUser" />
|
||||
<input type="hidden" name="userId" id="userId" value="<?php echo ( isset ( $userId ) ) ? $userId : ''; ?>"/>
|
||||
<div class="grid_7col button">
|
||||
<a href="index.php?siteId=3"><?php echo $this -> _lang[ 'cancel' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_26col spacer"></div>
|
||||
<div class="grid_7col button">
|
||||
<a href="javascript:void( 0 );" onclick="$( '#userEdit' ).submit( );"><?php echo $this -> _lang[ 'save' ]; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_20col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
144
administrator/templates/cs_l1/tpl_usermanagement_overview.php
Normal file
@@ -0,0 +1,144 @@
|
||||
<div class="grid_40col">
|
||||
<div id="sub_content_header" class="grid_40col">
|
||||
<div class="grid_10col">
|
||||
<div class="grid_7col button new">
|
||||
<a href="index.php?siteId=2&todoId=2"><?php echo $this -> _lang[ 'new' ]; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_20col spacer"></div>
|
||||
<div class="grid_10col right">
|
||||
<form action="index.php" name="filterForm" id="filterForm" method="get">
|
||||
<input type="hidden" name="siteId" id="siteId" value="3"/>
|
||||
<input type="hidden" name="todoId" id="todoId" value="1"/>
|
||||
<div class="grid_9col">
|
||||
<input type="text" name="filter" id="filter" onclick="$( this ).val( '' );"/>
|
||||
<label for="filter" class="grid_9col left"><?php echo $this -> _lang[ 'search' ]; ?></label>
|
||||
</div>
|
||||
<img src="../../images/icon-lupe.png" onclick="$( '#filterForm' ).submit( );"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col tbl_head">
|
||||
<?php echo $this -> _lang[ 'name' ]; ?>
|
||||
</div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<?php
|
||||
|
||||
foreach ( $this -> _data as $userData )
|
||||
{
|
||||
if ( ! empty ( $userData ) )
|
||||
{
|
||||
extract( $userData );
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col main_row clickable">
|
||||
<div class="grid_10col tbl_cell highlight">
|
||||
<?php echo $userLastname; ?>, <?php echo $userFirstname; ?>
|
||||
</div>
|
||||
<div class="grid_30col tbl_cell highlight"></div>
|
||||
</div>
|
||||
<div class="grid_40col hidden_row">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'email:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userEmail; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdBy:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateUser; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdOn:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateTS; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if ( $userActive === 'N' )
|
||||
{
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'disabledBy:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userActiveUser; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'disabledOn:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userActiveTS; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<?php
|
||||
|
||||
if ( $userActive === 'N' )
|
||||
{
|
||||
?>
|
||||
<div class="grid_7col button activate">
|
||||
<a href="index.php?siteId=2&todoId=3&userId=<?php echo $userId; ?>"><?php echo $this -> _lang[ 'activate' ]; ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div class="grid_7col button deactivate">
|
||||
<a href="index.php?siteId=2&todoId=4&userId=<?php echo $userId; ?>"><?php echo $this -> _lang[ 'deactivate' ]; ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="grid_1col spacer"></div>
|
||||
<div class="grid_7col button edit">
|
||||
<a href="index.php?siteId=2&todoId=5&userId=<?php echo $userId; ?>"><?php echo $this -> _lang[ 'edit' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_1col spacer"></div>
|
||||
<div class="grid_7col button delete">
|
||||
<a href="index.php?siteId=2&todoId=6&userId=<?php echo $userId; ?>"><?php echo $this -> _lang[ 'delete' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_1col spacer"></div>
|
||||
<div class="grid_7col button pw_reset">
|
||||
<a href="index.php?siteId=2&todoId=7&userId=<?php echo $userId; ?>"><?php echo $this -> _lang[ 'pw_reset' ]; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
73
administrator/templates/cs_l1/tpl_usermanagement_pwreset.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
extract( $this -> _formdata );
|
||||
|
||||
?>
|
||||
<div class="grid_40col">
|
||||
<div id="sub_content_header" class="grid_40col tbl_head"><?php echo $this -> _lang[ 'QUE_004' ]; ?></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div id="sub_content_main" class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'lastname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userLastname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'firstname:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userFirstname; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdBy:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateUser; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<div class="grid_8col tbl_cell"><?php echo $this -> _lang[ 'createdOn:' ]; ?></div>
|
||||
<div class="grid_28col tbl_cell"><?php echo $userCreateTS; ?></div>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
<div class="grid_40col">
|
||||
<div class="grid_2col spacer"></div>
|
||||
<div class="grid_36col">
|
||||
<form action="index.php" name="userReset" id="userReset" method="post">
|
||||
<input type="hidden" name="siteId" id="siteId" value="3" />
|
||||
<input type="hidden" name="todoId" id="todoId" value="7" />
|
||||
<input type="hidden" name="formAction" id="formAction" value="resetPW" />
|
||||
<input type="hidden" name="userId" id="userId" value="<?php echo $userId; ?>" />
|
||||
<input type="hidden" name="userPasswordCrypt" id="userPasswordCrypt" value="<?php echo $userPasswordCrypt; ?>" />
|
||||
<input type="hidden" name="userPasswordOrgCrypt" id="userPasswordOrgCrypt" value="<?php echo $userPasswordOrgCrypt; ?>" />
|
||||
<div class="grid_7col button">
|
||||
<a href="index.php?siteId=3"><?php echo $this -> _lang[ 'cancel' ]; ?></a>
|
||||
</div>
|
||||
<div class="grid_22col spacer"></div>
|
||||
<div class="grid_7col button">
|
||||
<a href="javascript:void( 0 );" onclick="$( '#userReset' ).submit( );"><?php echo $this -> _lang[ 'save' ]; ?></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_2col spacer"></div>
|
||||
</div>
|
||||
<div class="grid_40col spacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
890
administrator/webservices/remote_data.php
Normal file
@@ -0,0 +1,890 @@
|
||||
<?php
|
||||
/* ToDo: Entfernen des headers */
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
// unset( $_POST[ 'uploadFile' ] );
|
||||
// die ( );
|
||||
|
||||
if ( ! isset ( $_POST[ 'request' ] ) )
|
||||
{
|
||||
die( 'Wrong parameters' );
|
||||
}
|
||||
|
||||
if ( ! isset ( $_POST[ 'userId' ] ) )
|
||||
{
|
||||
die( 'Wrong parameters' );
|
||||
}
|
||||
|
||||
if ( ( $_POST[ 'request' ] === 'getData' || $_POST[ 'request' ] === 'updateData' || $_POST[ 'request' ] === 'insertData' || $_POST[ 'request' ] === 'deleteData' ) && ! isset ( $_POST[ 'dataSet' ] ) )
|
||||
{
|
||||
die( 'Wrong parameters' );
|
||||
}
|
||||
|
||||
if ( ( $_POST[ 'request' ] === 'getData' || $_POST[ 'request' ] === 'updateData' || $_POST[ 'request' ] === 'insertData' || $_POST[ 'request' ] === 'deleteData' ) && ! isset ( $_POST[ 'prefix' ] ) )
|
||||
{
|
||||
die( 'Wrong parameters' );
|
||||
}
|
||||
|
||||
define ( 'PATH_ROOT' , '../../' );
|
||||
include_once ( PATH_ROOT . '.config/config_global.php' );
|
||||
include_once ( PATH_FNC . 'fnc_webservices.php' );
|
||||
|
||||
/* Aufbereiten der Tabellen - Daten */
|
||||
$dataSet = explode ( '_' , $_POST[ 'dataSet' ] );
|
||||
$table = ( is_numeric ( end ( $dataSet ) ) || end ( $dataSet ) === '' )
|
||||
? implode ( '_' , explode ( '_' , $_POST[ 'dataSet' ] , -1 ) )
|
||||
: $_POST[ 'dataSet' ];
|
||||
$table = ( $table === 'keyvisual' )
|
||||
? 'content_image'
|
||||
: $table;
|
||||
$id = ( is_numeric ( end ( $dataSet ) ) )
|
||||
? end ( $dataSet )
|
||||
: null;
|
||||
|
||||
$data = array( );
|
||||
$result = false;
|
||||
|
||||
/* Daten abholen */
|
||||
if ( $_POST[ 'request' ] === 'getData' )
|
||||
{
|
||||
if ( $table === 'navi' )
|
||||
{
|
||||
$result = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . TBL_RIGHTS . '
|
||||
WHERE
|
||||
userId = "' . $_POST[ 'userId' ] . '" AND
|
||||
rightsPrefix = "' . $_POST[ 'prefix' ] . '";'
|
||||
);
|
||||
|
||||
if ( $result -> num_rows !== 0 )
|
||||
{
|
||||
$rights = $result -> fetch_assoc( );
|
||||
$result = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
ORDER BY
|
||||
' . $_POST[ 'prefix' ] . '_navStart ASC ,
|
||||
' . $_POST[ 'prefix' ] . '_navSort ASC;'
|
||||
);
|
||||
$arr_rights = explode( ';' , $rights[ 'rights' ] );
|
||||
|
||||
while ( $fetch_data = $result -> fetch_assoc( ) )
|
||||
{
|
||||
$fetch_data[ $_POST[ 'prefix' ] . '_navEditable' ] = 'false';
|
||||
$fetch_data[ $_POST[ 'prefix' ] . '_navName' ] = $fetch_data[ $_POST[ 'prefix' ] . '_navName' ];
|
||||
|
||||
if ( $rights[ 'rightsType' ] === 'ALL' || ( $rights[ 'rightsType' ] === 'DEF' && ( in_array ( $_POST[ 'prefix' ] . '_' . $fetch_data[ $_POST[ 'prefix' ] . '_navId' ] , $arr_rights ) || in_array ( $_POST[ 'prefix' ] . '_' . $fetch_data[ $_POST[ 'prefix' ] . '_navStart' ] , $arr_rights ) ) ) )
|
||||
{
|
||||
if ( ! in_array ( $_POST[ 'prefix' ] . '_' . $fetch_data[ $_POST[ 'prefix' ] . '_navId' ] , $arr_rights ) )
|
||||
{
|
||||
$arr_rights[ ] = $_POST[ 'prefix' ] . '_' . $fetch_data[ $_POST[ 'prefix' ] . '_navId' ];
|
||||
}
|
||||
$fetch_data[ $_POST[ 'prefix' ] . '_navEditable' ] = 'true';
|
||||
}
|
||||
elseif ( $rights[ 'rightsType' ] === 'DEF' && ( in_array ( $fetch_data[ $_POST[ 'prefix' ] . '_navId' ] , $arr_rights ) || in_array ( $fetch_data[ $_POST[ 'prefix' ] . '_navStart' ] , $arr_rights ) ) )
|
||||
{
|
||||
if ( ! in_array ( $fetch_data[ $_POST[ 'prefix' ] . '_navId' ] , $arr_rights ) )
|
||||
{
|
||||
$arr_rights[ ] = $fetch_data[ $_POST[ 'prefix' ] . '_navId' ];
|
||||
}
|
||||
$fetch_data[ $_POST[ 'prefix' ] . '_navEditable' ] = 'true';
|
||||
file_put_contents ( 'test.log' , var_export( $arr_rights , true ) . "\n", FILE_APPEND );
|
||||
//$fetch_data[ $_POST[ 'prefix' ] . '_navEditable' ] = 'true';
|
||||
}
|
||||
$data[ 'navigation' ][ 'navStart_' . $fetch_data[ $_POST[ 'prefix' ] . '_navStart' ] ][ 'navId_' . $fetch_data[ $_POST[ 'prefix' ] . '_navId' ] ] = $fetch_data;
|
||||
}
|
||||
$data[ 'navPath' ] = explode ( ' ' , fnc_getNavPathArray( $_POST[ 'prefix' ] , $_POST[ 'navId' ] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = 'ERROR FETCHING USER RIGHTS';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
WHERE
|
||||
id = "' . $id . '";'
|
||||
);
|
||||
$fetch_data = $result -> fetch_assoc( );
|
||||
$data = $fetch_data;
|
||||
}
|
||||
|
||||
echo json_encode( $data , JSON_UNESCAPED_UNICODE );
|
||||
}
|
||||
|
||||
else if ( $_POST[ 'request' ] === 'updateData' )
|
||||
{
|
||||
$error = false;
|
||||
|
||||
if ( $table === 'navi' )
|
||||
{
|
||||
|
||||
switch ( $_POST[ 'formAction' ] )
|
||||
{
|
||||
case 'renameNavPoint' :
|
||||
|
||||
$result = $db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
SET
|
||||
' . $_POST[ 'prefix' ] . '_navName = "' . $_POST[ 'navName' ] . '"
|
||||
WHERE
|
||||
' . $_POST[ 'prefix' ] . '_navId = "' . $id . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'updateActive' :
|
||||
|
||||
$result = $db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
SET
|
||||
' . $_POST[ 'prefix' ] . '_navActive = "' . $_POST[ 'navActive' ] . '"
|
||||
WHERE
|
||||
' . $_POST[ 'prefix' ] . '_navId = "' . $id . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'sortNavPoint' :
|
||||
|
||||
$sort = 1;
|
||||
$newSort = json_decode ( $_POST[ 'newSort' ] );
|
||||
|
||||
foreach ( $newSort as $sortPoint )
|
||||
{
|
||||
$navPointArray = explode( '_' , $sortPoint );
|
||||
$navId = $navPointArray[ 1 ];
|
||||
$update = $db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
SET
|
||||
' . $_POST[ 'prefix' ] . '_navSort = "' . $sort . '"
|
||||
WHERE
|
||||
' . $_POST[ 'prefix' ] . '_navId = "' . $navId . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
++$sort;
|
||||
}
|
||||
|
||||
$result = true;
|
||||
break;
|
||||
|
||||
case 'moveNavPoint' :
|
||||
|
||||
$result = $db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
SET
|
||||
' . $_POST[ 'prefix' ] . '_navStart = "' . $_POST[ 'navStart' ] . '"
|
||||
WHERE
|
||||
' . $_POST[ 'prefix' ] . '_navId = "' . $_POST[ 'navId' ] . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
break;
|
||||
|
||||
default :
|
||||
|
||||
var_dump ( $_POST );
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if ( ! $result )
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$columns = $db -> query
|
||||
(
|
||||
'SHOW
|
||||
COLUMNS
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . ';'
|
||||
);
|
||||
|
||||
while ( $column = $columns -> fetch_assoc( ) )
|
||||
{
|
||||
$fieldNames[ ] = $column[ 'Field' ];
|
||||
}
|
||||
|
||||
foreach ( $_POST as $key => $value )
|
||||
{
|
||||
if ( in_array ( $key , $fieldNames ) )
|
||||
{
|
||||
$data[ ] = $key . ' = "' . $db -> real_escape_string( $value ) . '"';
|
||||
}
|
||||
}
|
||||
|
||||
/* Behandlung Keyvisual und Content-Image */
|
||||
if ( $table === 'content_image' )
|
||||
{
|
||||
if ( ! is_dir ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] ) )
|
||||
{
|
||||
mkdir ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] , 0755 );
|
||||
}
|
||||
|
||||
if ( isset ( $_POST[ 'uploadFile' ] ) && ! empty ( $_POST[ 'uploadFile' ] ) )
|
||||
{
|
||||
$old = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
WHERE
|
||||
id = "' . $id . '";'
|
||||
);
|
||||
$old_data = $old -> fetch_assoc( );
|
||||
|
||||
if ( ! isset ( $_POST[ 'formAction' ] ) || ( isset ( $_POST[ 'formAction' ] ) && $_POST[ 'formAction' ] !== 'appendImage' ) )
|
||||
{
|
||||
$file_path = PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $old_data[ 'imgName' ];
|
||||
|
||||
/* Alte Bilddaten löschen */
|
||||
unlink ( $file_path . '.' . $old_data[ 'imgExtension' ] );
|
||||
unlink ( $file_path . '_orig.' . $old_data[ 'imgExtension' ] );
|
||||
unlink ( $file_path . '_thumb.' . $old_data[ 'imgExtension' ] );
|
||||
}
|
||||
|
||||
/* Bilddaten auslesen */
|
||||
$imageData = explode( ',' , $_POST[ 'uploadFile' ] );
|
||||
|
||||
/* Bilddaten dekodieren */
|
||||
$mimetype = str_replace ( array ( 'data:' , ';base64' ) , '' , $imageData[ 0 ] );
|
||||
$encodedData = str_replace( ' ' , '+' , $imageData[ 1 ] );
|
||||
$decodedData = base64_decode( $encodedData );
|
||||
|
||||
/* Bildnamen und Erweiterung generieren */
|
||||
$keys = ( array_keys ( $vC['mimetypes'] , $mimetype ) );
|
||||
$extension = $keys[ 0 ];
|
||||
$file_name = fnc_buildUniqueFileName ( $_POST[ 'prefix' ] , $_POST[ 'navId' ] , $_POST[ 'imgName' ] , $extension );
|
||||
|
||||
/* Originales Bild speichern */
|
||||
$file_name_temp = substr( $file_name , 0 , strrpos ( $file_name , '.' ) ) . '_temp' . substr( $file_name , strrpos ( $file_name , '.' ) );
|
||||
$file_name_orig = substr( $file_name , 0 , strrpos ( $file_name , '.' ) ) . '_orig' . substr( $file_name , strrpos ( $file_name , '.' ) );
|
||||
|
||||
file_put_contents( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $file_name_temp , $decodedData );
|
||||
fnc_checkOrigResize( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' , $file_name_orig , $file_name_temp , $extension , ${ $_POST['prefix'] }[ 'dimOrig' ] );
|
||||
|
||||
if ( isset ( $_POST[ 'formAction' ] ) && $_POST[ 'formAction' ] === 'appendImage' )
|
||||
{
|
||||
/* Werte für Datenbank aktualisieren */
|
||||
foreach ( $data as $key => $value )
|
||||
{
|
||||
if ( strpos ( $value , 'imgExtension' ) !== false )
|
||||
{
|
||||
$data[ $key ] = 'imgExtension = "' . $db -> real_escape_string( $extension ) . '"';
|
||||
}
|
||||
else if ( strpos ( $value , 'imgName' ) !== false )
|
||||
{
|
||||
$data[ $key ] = 'imgName = "' . $db -> real_escape_string( str_replace ( '.' . $extension , '' , $file_name ) ) . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$new = $db -> query
|
||||
(
|
||||
'INSERT INTO
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
SET
|
||||
' . implode ( ' , ' , $data )
|
||||
);
|
||||
$new_id = $db -> insert_id;
|
||||
|
||||
unset ( $data );
|
||||
|
||||
if ( $old_data[ 'sliderContent' ] === '' )
|
||||
{
|
||||
$slider = array ( $new_id );
|
||||
}
|
||||
else
|
||||
{
|
||||
$slider = explode ( ';' , $old_data[ 'sliderContent' ] );
|
||||
$slider[ ] = $new_id;
|
||||
}
|
||||
|
||||
$data = array( );
|
||||
$data[ ] = 'sliderContent = "' . $db -> real_escape_string( implode ( ';' , $slider ) ) . '"';
|
||||
$data[ ] = 'hasSlider = "Y"';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isset ( $_POST[ 'formAction' ] ) && $_POST[ 'formAction' ] === 'updateSort' )
|
||||
{
|
||||
$db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . TBL_NAVI . '
|
||||
SET
|
||||
' . $_POST[ 'prefix' ] . '_keyvisual = "' . $id . '"
|
||||
WHERE
|
||||
' . $_POST[ 'prefix' ] . '_navId = "' . $_POST[ 'navId' ] . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Altes Bild umbenennen und neue Koordinaten speichern */
|
||||
$img = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
WHERE
|
||||
id = "' . $id . '";'
|
||||
);
|
||||
$img_data = $img -> fetch_assoc( );
|
||||
|
||||
$extension = $img_data[ 'imgExtension' ];
|
||||
$old_name = $img_data[ 'imgName' ] . '.' . $extension;
|
||||
$old_name_orig = substr( $old_name , 0 , strrpos ( $old_name , '.' ) ) . '_orig' . substr( $old_name , strrpos ( $old_name , '.' ) );
|
||||
$old_name_thmb = substr( $old_name , 0 , strrpos ( $old_name , '.' ) ) . '_thumb' . substr( $old_name , strrpos ( $old_name , '.' ) );
|
||||
|
||||
$img_name = $_POST[ 'imgName' ];
|
||||
$img_name = explode ( '_' , $img_name );
|
||||
foreach ( $img_name as $key => $value )
|
||||
{
|
||||
if ( is_numeric ( $value ) )
|
||||
{
|
||||
unset ( $img_name[ $key ] );
|
||||
}
|
||||
}
|
||||
$img_name = implode ( '_' , $img_name );
|
||||
|
||||
if ( $_POST[ 'imgName' ] . '.' . $_POST[ 'imgExtension' ] !== $old_name )
|
||||
{
|
||||
$file_name = fnc_buildUniqueFileName ( $_POST[ 'prefix' ] , $_POST[ 'navId' ] , $img_name , $extension , -1 );
|
||||
$file_name_orig = substr( $file_name , 0 , strrpos ( $file_name , '.' ) ) . '_orig' . substr( $file_name , strrpos ( $file_name , '.' ) );
|
||||
$file_name_thmb = substr( $file_name , 0 , strrpos ( $file_name , '.' ) ) . '_thumb' . substr( $file_name , strrpos ( $file_name , '.' ) );
|
||||
|
||||
rename( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $old_name_thmb , PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $file_name_thmb );
|
||||
rename( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $old_name_orig , PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $file_name_orig );
|
||||
rename( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $old_name , PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $file_name );
|
||||
}
|
||||
else
|
||||
{
|
||||
$file_name = $old_name;
|
||||
$file_name_orig = $old_name_orig;
|
||||
$file_name_thmb = $old_name_thmb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! isset ( $_POST[ 'formAction' ] ) || ( isset ( $_POST[ 'formAction' ] ) && $_POST[ 'formAction' ] !== 'updateSort' ) )
|
||||
{
|
||||
$dataSet = str_replace( 'content_' , '' , $_POST[ 'dataSet' ] );
|
||||
|
||||
/* Bilddaten aus Editor generieren */
|
||||
if ( strpos( $dataSet , 'image' ) === 0 )
|
||||
{
|
||||
${ $_POST['prefix'] }[ 'dim' . strtoupper( substr( $dataSet , 0 , 1 ) ) . substr( $dataSet , 1 , strrpos ( $dataSet , '_' ) - 1 ) ][ 'height' ] = ${ $_POST['prefix'] }[ 'dim' . strtoupper( substr( $dataSet , 0 , 1 ) ) . substr( $dataSet , 1 , strrpos ( $dataSet , '_' ) - 1 ) ][ 'width' ] * $_POST[ 'previewHeight' ] / $_POST[ 'previewWidth' ];
|
||||
}
|
||||
$img_created = fnc_buildImage ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' , $file_name_orig , $extension , ${ $_POST['prefix'] }[ 'dim' . strtoupper( substr( $dataSet , 0 , 1 ) ) . substr( $dataSet , 1 , strrpos ( $dataSet , '_' ) - 1 ) ] , $_POST );
|
||||
|
||||
/* Thumbnail aus generiertem Bild erzeugen */
|
||||
if ( ! is_null ( ${ $_POST['prefix'] }[ substr ( $dataSet , 0 , strrpos ( $dataSet , '_' ) ) . 'Thumb' ] ) )
|
||||
{
|
||||
if ( strpos( $dataSet , 'image' ) === 0 )
|
||||
{
|
||||
${ $_POST['prefix'] }[ substr ( $dataSet , 0 , strrpos ( $dataSet , '_' ) ) . 'Thumb' ][ 'height' ] = ${ $_POST['prefix'] }[ substr ( $dataSet , 0 , strrpos ( $dataSet , '_' ) ) . 'Thumb' ][ 'width' ] * $_POST[ 'previewHeight' ] / $_POST[ 'previewWidth' ];
|
||||
}
|
||||
$thumb = fnc_buildThumbnail ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' , $file_name , $extension , ${ $_POST['prefix'] }[ substr ( $dataSet , 0 , strrpos ( $dataSet , '_' ) ) . 'Thumb' ] );
|
||||
}
|
||||
|
||||
/* Werte für Datenbank aktualisieren */
|
||||
foreach ( $data as $key => $value )
|
||||
{
|
||||
if ( strpos ( $value , 'imgExtension' ) !== false )
|
||||
{
|
||||
$data[ $key ] = 'imgExtension = "' . $db -> real_escape_string( $extension ) . '"';
|
||||
}
|
||||
else if ( strpos ( $value , 'imgName' ) !== false )
|
||||
{
|
||||
$data[ $key ] = 'imgName = "' . $db -> real_escape_string( str_replace ( '.' . $extension , '' , $file_name ) ) . '"';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $img_created || ! $thumb )
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $error )
|
||||
{
|
||||
/* Daten in Tabelle schreiben */
|
||||
$dataString = implode ( ' , ' , $data );
|
||||
|
||||
if ( $dataString != '' )
|
||||
{
|
||||
$result = ( $table === 'content' )
|
||||
? $db -> query ( 'UPDATE ' . $_POST[ 'prefix' ] . '_' . $table . ' SET ' . $dataString . ' WHERE siteId = "' . $id . '";' )
|
||||
: $db -> query ( 'UPDATE ' . $_POST[ 'prefix' ] . '_' . $table . ' SET ' . $dataString . ' WHERE id = "' . $id . '";' );
|
||||
|
||||
if ( ! $result )
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $error )
|
||||
{
|
||||
echo 'ERROR';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode( 'SUCCESS' );
|
||||
}
|
||||
}
|
||||
else if ( $_POST[ 'request' ] === 'insertData' )
|
||||
{
|
||||
|
||||
$error = false;
|
||||
if ( $table === 'navi' )
|
||||
{
|
||||
|
||||
switch ( $_POST[ 'formAction' ] )
|
||||
{
|
||||
case 'addNavPoint' :
|
||||
$navis = $db -> query ( 'SELECT * FROM ' . $_POST[ 'prefix' ] . '_' . $table . ' WHERE ' . $_POST[ 'prefix' ] . '_navStart = "' . $_POST[ 'navStart' ] . '" ORDER BY ' . $_POST['prefix'] . '_navSort ASC;' );
|
||||
$sort = 1;
|
||||
|
||||
while ( $navi = $navis -> fetch_assoc( ) )
|
||||
{
|
||||
$update = $db -> query ( 'UPDATE ' . $_POST[ 'prefix' ] . '_' . $table . ' SET ' . $_POST[ 'prefix' ] . '_navSort = "' . $sort . '" WHERE ' . $_POST[ 'prefix' ] . '_navId = "' . $navi[ $_POST[ 'prefix' ] . '_navId' ] . '" LIMIT 1;' ) || $error = true;
|
||||
|
||||
if ( $error ) { break; }
|
||||
if ( $navi[ $_POST[ 'prefix' ] . '_navId' ] == $_POST[ 'navId' ] )
|
||||
{
|
||||
++$sort;
|
||||
$special = ( $_POST[ 'new_navType' ] === 'content' )
|
||||
? 'N'
|
||||
: 'Y';
|
||||
$navLink = fnc_buildUniqueLinkName ( $_POST[ 'prefix' ] , $_POST[ 'navStart' ] , $_POST[ 'new_navName' ] );
|
||||
|
||||
$insert = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_' . $table . ' ( ' . $_POST[ 'prefix' ] . '_navId , ' . $_POST[ 'prefix' ] . '_navStart , ' . $_POST[ 'prefix' ] . '_navName , ' . $_POST[ 'prefix' ] . '_navTarget , ' . $_POST[ 'prefix' ] . '_navLink , ' . $_POST[ 'prefix' ] . '_navActive , ' . $_POST[ 'prefix' ] . '_navSort , ' . $_POST[ 'prefix' ] . '_specialSite , ' . $_POST[ 'prefix' ] . '_specialType ) VALUES ( NULL , "' . $_POST[ 'navStart' ] . '" , "' . $_POST[ 'new_navName' ] . '" , "" , "' . $navLink . '" , "Y" , "' . $sort . '" , "' . $special . '" , "' . $_POST[ 'new_navType' ] . '" );' ) || $error = true;
|
||||
$new_navId = $db -> insert_id;
|
||||
$update = $db -> query ( 'UPDATE ' . $_POST[ 'prefix' ] . '_' . $table . ' SET ' . $_POST[ 'prefix' ] . '_navTarget = "index.php?siteId=' . $_POST[ 'siteId' ] . '&navId=' . $new_navId . '" WHERE ' . $_POST[ 'prefix' ] . '_navId = "' . $new_navId . '" LIMIT 1;' ) || $error = true;
|
||||
|
||||
if ( $error ) { break; }
|
||||
|
||||
if ( $_POST[ 'new_navType' ] !== 'uebersicht' )
|
||||
{
|
||||
|
||||
if ( $_POST[ 'new_navType' ] === 'content' )
|
||||
{
|
||||
$headline = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_content_headline ( id , content ) VALUES ( null , "Neue Überschrift" );' );
|
||||
$h_id = $db -> insert_id;
|
||||
$test = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_content_text ( id , content ) VALUES ( null , "Neuer Standardtext" );' );
|
||||
$t_id = $db -> insert_id;
|
||||
$site = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_content ( id , siteId , siteContents ) VALUES ( null , "' . $new_navId . '" , "headline_' . $h_id . ';text_' . $t_id . '" );' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$site = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_' . $_POST[ 'new_navType' ] . ' ( id , siteId ) VALUES ( null , "' . $new_navId . '" );' );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
++$sort;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'addSubNav' :
|
||||
$navis = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . $table . '
|
||||
WHERE
|
||||
' . $_POST[ 'prefix' ] . '_navStart = "' . $_POST[ 'navId' ] . '"
|
||||
ORDER BY
|
||||
' . $_POST[ 'prefix' ] . '_navSort
|
||||
ASC;'
|
||||
);
|
||||
$sort = 1;
|
||||
|
||||
$special = ( $_POST[ 'new_subnavType' ] === 'content' )
|
||||
? 'N'
|
||||
: 'Y';
|
||||
$navLink = fnc_buildUniqueLinkName ( $_POST[ 'prefix' ] , $_POST[ 'navId' ] , $_POST[ 'new_subnavName' ] );
|
||||
|
||||
$insert = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_' . $table . ' ( ' . $_POST[ 'prefix' ] . '_navId , ' . $_POST[ 'prefix' ] . '_navStart , ' . $_POST[ 'prefix' ] . '_navName , ' . $_POST[ 'prefix' ] . '_navTarget , ' . $_POST[ 'prefix' ] . '_navLink , ' . $_POST[ 'prefix' ] . '_navActive , ' . $_POST[ 'prefix' ] . '_navSort , ' . $_POST[ 'prefix' ] . '_specialSite , ' . $_POST[ 'prefix' ] . '_specialType ) VALUES ( NULL , "' . $_POST[ 'navId' ] . '" , "' . $_POST[ 'new_subnavName' ] . '" , "" , "' . $navLink . '" , "Y" , "' . $sort . '" , "' . $special . '" , "' . $_POST[ 'new_subnavType' ] . '" );' ) || $error = true;
|
||||
$new_navId = $db -> insert_id;
|
||||
$update = $db -> query ( 'UPDATE ' . $_POST[ 'prefix' ] . '_' . $table . ' SET ' . $_POST[ 'prefix' ] . '_navTarget = "index.php?siteId=' . $_POST[ 'siteId' ] . '&navId=' . $new_navId . '" WHERE ' . $_POST[ 'prefix' ] . '_navId = "' . $new_navId . '" LIMIT 1;' ) || $error = true;
|
||||
|
||||
if ( $error ) { break; }
|
||||
|
||||
if ( $_POST[ 'new_subnavType' ] !== 'uebersicht' )
|
||||
{
|
||||
|
||||
if ( $_POST[ 'new_subnavType' ] === 'content' )
|
||||
{
|
||||
$headline = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_content_headline ( id , content ) VALUES ( null , "Neue Überschrift" );' );
|
||||
$h_id = $db -> insert_id;
|
||||
$test = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_content_text ( id , content ) VALUES ( null , "Neuer Standardtext" );' );
|
||||
$t_id = $db -> insert_id;
|
||||
$site = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_content ( id , siteId , siteContents ) VALUES ( null , "' . $new_navId . '" , "headline_' . $h_id . ';text_' . $t_id . '" );' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$site = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_' . $_POST[ 'new_subnavType' ] . ' ( id , siteId ) VALUES ( null , "' . $new_navId . '" );' );
|
||||
}
|
||||
}
|
||||
|
||||
++$sort;
|
||||
|
||||
while ( $navi = $navis -> fetch_assoc( ) )
|
||||
{
|
||||
$update = $db -> query ( 'UPDATE ' . $_POST[ 'prefix' ] . '_' . $table . ' SET ' . $_POST[ 'prefix' ] . '_navSort = "' . $sort . '" WHERE ' . $_POST[ 'prefix' ] . '_navId = "' . $navi[ $_POST[ 'prefix' ] . '_navId' ] . '" LIMIT 1;' ) || $error = true;
|
||||
|
||||
if ( $error ) { break; }
|
||||
++$sort;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default :
|
||||
var_dump ( $_POST );
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if ( ! $error )
|
||||
{
|
||||
echo 'SUCCESS';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'ERROR';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$columns = $db -> query ( 'SHOW COLUMNS FROM ' . $_POST[ 'prefix' ] . '_' . $table . ';' );
|
||||
|
||||
while ( $column = $columns -> fetch_assoc( ) )
|
||||
{
|
||||
$fieldNames[ ] = $column[ 'Field' ];
|
||||
}
|
||||
|
||||
foreach ( $_POST as $key => $value )
|
||||
{
|
||||
if ( in_array ( $key , $fieldNames ) )
|
||||
{
|
||||
$data[ $key ] = $db -> real_escape_string( $value );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $table === 'content_image' )
|
||||
{
|
||||
if ( ! is_dir ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] ) )
|
||||
{
|
||||
mkdir ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] , 0755 );
|
||||
}
|
||||
|
||||
/* Bilddaten auslesen */
|
||||
$imageData = explode( ',' , $_POST[ 'uploadFile' ] );
|
||||
|
||||
/* Bilddaten dekodieren */
|
||||
$mimetype = str_replace ( array ( 'data:' , ';base64' ) , '' , $imageData[ 0 ] );
|
||||
$encodedData = str_replace( ' ' , '+' , $imageData[ 1 ] );
|
||||
$decodedData = base64_decode( $encodedData );
|
||||
|
||||
/* Bildnamen und Erweiterung generieren */
|
||||
$keys = ( array_keys ( $vC['mimetypes'] , $mimetype ) );
|
||||
$extension = $keys[ 0 ];
|
||||
$file_name = fnc_buildUniqueFileName ( $_POST[ 'prefix' ] , $_POST[ 'navId' ] , $_POST[ 'imgName' ] , $extension );
|
||||
|
||||
/* Originales Bild speichern */
|
||||
$file_name_orig = substr( $file_name , 0 , strrpos ( $file_name , '.' ) ) . '_orig' . substr( $file_name , strrpos ( $file_name , '.' ) );
|
||||
file_put_contents ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $file_name_orig , $decodedData );
|
||||
|
||||
/* Bilddaten aus Editor generieren */
|
||||
$img_created = fnc_buildImage ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' , $file_name_orig , $extension , ${ $_POST['prefix'] }[ 'dim' . strtoupper( substr( $_POST[ 'dataSet' ] , 0 , 1 ) ) . substr( $_POST[ 'dataSet' ] , 1 ) ] , $_POST );
|
||||
|
||||
/* Thumbnail aus generiertem Bild erzeugen */
|
||||
if ( ! is_null ( ${ $_POST['prefix'] }[ $_POST[ 'dataSet' ] . 'Thumb' ] ) )
|
||||
{
|
||||
$thumb = fnc_buildThumbnail ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' , $file_name , $extension , ${ $_POST['prefix'] }[ $_POST[ 'dataSet' ] . 'Thumb' ] );
|
||||
}
|
||||
|
||||
/* Werte für Datenbank aktualisieren */
|
||||
$data[ 'imgExtension' ] = $db -> real_escape_string( $extension );
|
||||
$data[ 'imgName' ] = $db -> real_escape_string( str_replace ( '.' . $extension , '' , $file_name ) );
|
||||
|
||||
if ( ! $img_created || ! $thumb )
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if ( $table === 'content_textimage' )
|
||||
{
|
||||
if ( ! is_dir ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] ) )
|
||||
{
|
||||
mkdir ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] , 0755 );
|
||||
}
|
||||
|
||||
/* Bildnamen und Erweiterung generieren */
|
||||
$extension = 'jpg';
|
||||
$file_name = fnc_buildUniqueFileName ( $_POST[ 'prefix' ] , $_POST[ 'navId' ] , 'sample_image' , $extension );
|
||||
|
||||
/* Originales Bild speichern */
|
||||
$file_name_orig = substr( $file_name , 0 , strrpos ( $file_name , '.' ) ) . '_orig' . substr( $file_name , strrpos ( $file_name , '.' ) );
|
||||
copy ( PATH_MED . $_POST[ 'prefix' ] . '/sample_image.jpg' , PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $file_name_orig );
|
||||
copy ( PATH_MED . $_POST[ 'prefix' ] . '/sample_image.jpg' , PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' . $file_name );
|
||||
|
||||
/* Thumbnail aus generiertem Bild erzeugen */
|
||||
if ( ! is_null ( ${ $_POST['prefix'] }[ 'imageThumb' ] ) )
|
||||
{
|
||||
$thumb = fnc_buildThumbnail ( PATH_MED . $_POST[ 'prefix' ] . '/' . $_POST[ 'navId' ] . '/' , $file_name , $extension , ${ $_POST['prefix'] }[ 'imageThumb' ] );
|
||||
}
|
||||
|
||||
if ( ! $thumb )
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
|
||||
$img_extension = $db -> real_escape_string( $extension );
|
||||
$img_name = $db -> real_escape_string( str_replace ( '.' . $extension , '' , $file_name ) );
|
||||
$img_title = $db -> real_escape_string( 'Sample Image' );
|
||||
|
||||
$image = $db -> query
|
||||
(
|
||||
'INSERT INTO
|
||||
' . $_POST[ 'prefix' ] . '_' . TBL_IMAGE . '
|
||||
( imgName , imgExtension , imgOrigname , imgTitle , previewWidth , previewHeight )
|
||||
VALUES
|
||||
( "' . $img_name . '" , "' . $img_extension . '" , "' . $img_name . '.' . $img_extension . '" , "' . $img_title . '" , "' . ${ $_POST['prefix'] }[ 'dimImage' ][ 'width' ] . '" , "' . ${ $_POST['prefix'] }[ 'dimImage' ][ 'width' ] * 4 / 3 . '" );'
|
||||
);
|
||||
$image_id = $db -> insert_id;
|
||||
|
||||
$text = $db -> query
|
||||
(
|
||||
'INSERT INTO
|
||||
' . $_POST[ 'prefix' ] . '_' . TBL_TEXT . '
|
||||
VALUES ( NULL , "' . $_POST[ 'content' ] . '" );'
|
||||
);
|
||||
$text_id = $db -> insert_id;
|
||||
|
||||
$data[ 'content_text_id' ] = $text_id;
|
||||
$data[ 'content_image_id' ] = $image_id;
|
||||
}
|
||||
|
||||
$keys = array ( );
|
||||
$values = array ( );
|
||||
foreach ( $data as $key => $value )
|
||||
{
|
||||
$keys[ ] = $key;
|
||||
$values[ ] = '"' . $value . '"';
|
||||
}
|
||||
|
||||
/* Daten in Tabelle schreiben */
|
||||
if ( ! empty ( $data ) && $error === false )
|
||||
{
|
||||
$result = $db -> query ( 'INSERT INTO ' . $_POST[ 'prefix' ] . '_' . $table . ' ( ' . implode ( ' , ' , $keys ) . ' ) VALUES ( ' . implode ( ' , ' , $values ) . ' );' );
|
||||
|
||||
if ( $result !== false )
|
||||
{
|
||||
if ( $_POST[ 'dataSet' ] === 'keyvisual' )
|
||||
{
|
||||
$insert = $db -> insert_id;
|
||||
$update = $db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . TBL_NAVI . '
|
||||
SET
|
||||
' . $_POST[ 'prefix' ] . '_keyvisual = "' . $insert . '"
|
||||
WHERE
|
||||
' . $_POST[ 'prefix' ] . '_navId = "' . $_POST[ 'navId' ] . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
|
||||
if ( $update )
|
||||
{
|
||||
$error = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
elseif ( $table === 'content_text' || $table === 'content_subline' || $table === 'content_textimage' )
|
||||
{
|
||||
$insert = $db -> insert_id;
|
||||
$siteContents = json_decode( $_POST[ 'order' ] );
|
||||
|
||||
foreach ( $siteContents as $key => $value )
|
||||
{
|
||||
$content = explode ( '_' , $value );
|
||||
$siteContents[ $key ] = str_replace( 'content_' , '' , $value );
|
||||
if ( ! is_numeric ( end ( $content ) ) )
|
||||
{
|
||||
$siteContents[ $key ] .= '_' . $insert;
|
||||
}
|
||||
}
|
||||
|
||||
$update = $db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . TBL_CONTENT . '
|
||||
SET
|
||||
siteContents = "' . implode ( ';' , $siteContents ) . '"
|
||||
WHERE
|
||||
siteId = "' . $_POST[ 'navId' ] . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
|
||||
if ( $update )
|
||||
{
|
||||
echo json_encode ( $insert );
|
||||
die( );
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
|
||||
}
|
||||
elseif ( isset ( $_POST[ 'formAction' ] ) && $_POST[ 'formAction' ] === 'appendContent' )
|
||||
{
|
||||
$newId = $table . '_' . $db -> insert_id;
|
||||
$mainSet = explode ( '_' , $_POST[ 'mainContent' ] );
|
||||
|
||||
$oldContent = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . $mainSet[ 0 ] . '
|
||||
WHERE
|
||||
id = "' . $mainSet[ 1 ] . '";'
|
||||
);
|
||||
$content = $oldContent -> fetch_assoc( );
|
||||
$siteContent = ( $content[ 'siteContents' ] === '' )
|
||||
? $newId
|
||||
: $content[ 'siteContents' ] . ';' . $newId;
|
||||
$update = $db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . $mainSet[ 0 ] . '
|
||||
SET
|
||||
siteContents = "' . $siteContent . '"
|
||||
WHERE
|
||||
id = "' . $mainSet[ 1 ] . '"
|
||||
LIMIT 1;'
|
||||
);
|
||||
if ( $update )
|
||||
{
|
||||
json_encode ( $update );
|
||||
die( );
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $error === false )
|
||||
{
|
||||
echo 'SUCCESS';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'ERROR';
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( $_POST[ 'request' ] === 'deleteData' )
|
||||
{
|
||||
$error = false;
|
||||
$result = ( $table === 'content' )
|
||||
? $db -> query ( 'DELETE FROM ' . $_POST[ 'prefix' ] . '_' . $table . ' WHERE siteId = "' . $id . '" LIMIT 1;' )
|
||||
: $db -> query ( 'DELETE FROM ' . $_POST[ 'prefix' ] . '_' . $table . ' WHERE id = "' . $id . '" LIMIT 1;' );
|
||||
|
||||
if ( $result && strpos( $table , 'content_' ) !== false )
|
||||
{
|
||||
$content_part = str_replace( 'content_' , '' , $_POST[ 'dataSet' ] );
|
||||
$content_data = $db -> query
|
||||
(
|
||||
'SELECT
|
||||
*
|
||||
FROM
|
||||
' . $_POST[ 'prefix' ] . '_' . TBL_CONTENT . '
|
||||
WHERE
|
||||
siteId = "' . $_POST[ 'navId' ] . '";'
|
||||
);
|
||||
|
||||
$content = $content_data -> fetch_assoc( );
|
||||
$siteContents = explode ( ';' , $content[ 'siteContents' ] );
|
||||
$content_key = array_keys ( $siteContents , $content_part );
|
||||
|
||||
if ( ! empty ( $content_key ) )
|
||||
{
|
||||
unset ( $siteContents[ $content_key[ 0 ] ] );
|
||||
$db -> query
|
||||
(
|
||||
'UPDATE
|
||||
' . $_POST[ 'prefix' ] . '_' . TBL_CONTENT . '
|
||||
SET
|
||||
siteContents = "' . implode ( ';' , $siteContents ) . '"
|
||||
WHERE
|
||||
id = "' . $content[ 'id' ] . '"
|
||||
LIMIT 1;'
|
||||
) || $error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $error )
|
||||
{
|
||||
echo 'SUCCESS';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'ERROR';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||